Basics for the Rational Numbers #
Summary #
We define the integral domain structure on ℚ
and prove basic lemmas about it.
The definition of the field structure on ℚ
will be done in Mathlib.Data.Rat.Basic
once the
Field
class has been defined.
Main Definitions #
Rat.divInt n d
constructs a rational numberq = n / d
fromn d : ℤ
.
Notations #
/.
is infix notation forRat.divInt
.
Alias of Rat.num_intCast
.
Alias of Rat.den_intCast
.
Define a (dependent) function or prove ∀ r : ℚ, p r
by dealing with rational
numbers of the form n /. d
with 0 < d
and coprime n
, d
.
Equations
- x✝.numDenCasesOn x = match x✝, x with | { num := n, den := d, den_nz := h, reduced := c }, H => ⋯.mpr (H n d ⋯ c)
Instances For
Define a (dependent) function or prove ∀ r : ℚ, p r
by dealing with rational
numbers of the form n /. d
with d ≠ 0
.
Equations
Instances For
Define a (dependent) function or prove ∀ r : ℚ, p r
by dealing with rational
numbers of the form mk' n d
with d ≠ 0
.
Equations
Instances For
Alias of Rat.divInt_neg
.
Alias of Rat.divInt_eq_iff
.
Alias of Rat.mul_eq_mkRat
.
Alias of Rat.div_def'
.
The rational numbers are a group #
Equations
Equations
- Rat.addLeftCancelSemigroup = inferInstance
Equations
- Rat.addRightCancelSemigroup = inferInstance
Equations
- Rat.addCommSemigroup = inferInstance
Alias of Rat.intCast_eq_divInt
.
Alias of Rat.intCast_div_eq_divInt
.