The rational numbers possess a linear order #
This file constructs the order on ℚ and proves various facts relating the order to
ring structure on ℚ. This only uses unbundled type classes, eg CovariantClass,
relating the order structure and algebra structure on ℚ.
For the bundled LinearOrderedCommRing instance on ℚ, see Algebra.Order.Ring.Rat.
Tags #
rat, rationals, field, ℚ, numerator, denominator, num, denom, order, ordering
Equations
- NNRatCast.toOfScientific = { ofScientific := fun (m : ℕ) (b : Bool) (d : ℕ) => ↑⟨Rat.ofScientific m b d, ⋯⟩ }
Extra instances to short-circuit type class resolution #
These also prevent non-computable instances being used to construct these instances non-computably.