Field Structure on the Rational Numbers #
Summary #
We put the (discrete) field structure on the type ℚ
of rational numbers that
was defined in Mathlib.Data.Rat.Defs
.
Main Definitions #
Rat.instField
is the field structure onℚ
.
Implementation notes #
We have to define the field structure in a separate file to avoid cyclic imports:
the Field
class contains a map from ℚ
(see Field
's docstring for the rationale),
so we have a dependency Rat.Field → Field → Rat
that is reflected in the import
hierarchy Mathlib.Data.Rat.Basic → Mathlib.Algebra.Field.Defs → Std.Data.Rat
.
Tags #
rat, rationals, field, ℚ, numerator, denominator, num, denom
Equations
- One or more equations did not get rendered due to their size.
Equations
- Rat.instLinearOrderedField = let __spread.0 := Rat.instLinearOrderedCommRing; let __spread.1 := Rat.instField; LinearOrderedField.mk ⋯ Field.zpow ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ Field.nnqsmul ⋯ ⋯ Field.qsmul ⋯