The rational numbers form a field #
This file contains the field instance on the rational numbers.
See note [foundational algebra order theory].
Tags #
rat, rationals, field, ℚ, numerator, denominator, num, denom
Equations
- One or more equations did not get rendered due to their size.
Extra instances to short-circuit type class resolution #
These also prevent non-computable instances being used to construct these instances non-computably.
Equations
- NNRat.instInv = { inv := fun (x : ℚ≥0) => ⟨(↑x)⁻¹, ⋯⟩ }
Equations
- NNRat.instDiv = { div := fun (x y : ℚ≥0) => ⟨↑x / ↑y, ⋯⟩ }
Equations
- NNRat.instZPow = { pow := fun (x : ℚ≥0) (n : ℤ) => ⟨↑x ^ n, ⋯⟩ }
Equations
- One or more equations did not get rendered due to their size.