The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V06. Rings, fields and ordered algebra

Mathlib.Algebra.Field.Defs

99 declarations. Mathlib docs · Source

Division (semi)rings and (semi)fields

This file introduces fields and division rings (also known as skewfields) and proves some basic statements about them. For a more extensive theory of fields, see the FieldTheory folder.

Main definitions

  • DivisionSemiring: Nontrivial semiring with multiplicative inverses for nonzero elements.
  • DivisionRing: Nontrivial ring with multiplicative inverses for nonzero elements.
  • Semifield: Commutative division semiring.
  • Field: Commutative division ring.
  • IsField: Predicate on a (semi)ring that it is a (semi)field, i.e. that the multiplication is commutative, that it has more than one element and that all non-zero elements have a multiplicative inverse. In contrast to Field, which contains the data of a function associating to an element of the field its multiplicative inverse, this predicate only assumes the existence and can therefore more easily be used to e.g. transfer along ring isomorphisms.

Implementation notes

By convention 0⁻¹ = 0 in a field or division ring. This is due to the fact that working with total functions has the advantage of not constantly having to check that x ≠ 0 when writing x⁻¹. With this convention in place, some statements like (a + b) * c⁻¹ = a * c⁻¹ + b * c⁻¹ still remain true, while others like the defining property a * a⁻¹ = 1 need the assumption a ≠ 0. If you are a beginner in using Lean and are confused by that, you can read more about why this convention is taken in Kevin Buzzard's blogpost

A division ring or field is an example of a GroupWithZero. If you cannot find a division ring / field lemma that does not involve +, you can try looking for a GroupWithZero lemma instead.

Tags

field, division ring, skew field, skew-field, skewfield

def DivisionRing.ctorIdx E1 #

{K : Type u_2} → DivisionRing K → ℕ

def DivisionSemiring.ctorIdx E1 #

{K : Type u_2} → DivisionSemiring K → ℕ

def Semifield.ctorIdx E1 #

{K : Type u_2} → Semifield K → ℕ

def Field.ctorIdx E1 #

{K : Type u} → Field K → ℕ

def NNRat.castRec E1 #

{K : Type u_1} → [NatCast K] → [Div K] → ℚ≥0 → K

The default definition of the coercion ℚ≥0 → K for a division semiring K.

↑q : K is defined as (q.num : K) / (q.den : K).

Do not use this directly (instances of DivisionSemiring are allowed to override that default for better definitional properties). Instead, use the coercion.

def Rat.castRec E1 #

{K : Type u_1} → [NatCast K] → [IntCast K] → [Div K] → ℚ → K

The default definition of the coercion ℚ → K for a division ring K.

↑q : K is defined as (q.num : K) / (q.den : K).

Do not use this directly (instances of DivisionRing are allowed to override that default for better definitional properties). Instead, use the coercion.

class DivisionSemiring E3 #

Type u_2 → Type u_2

A DivisionSemiring is a Semiring with multiplicative inverses for nonzero elements.

An instance of DivisionSemiring K includes maps nnratCast : ℚ≥0 → K and nnqsmul : ℚ≥0 → K → K. Those two fields are needed to implement the DivisionSemiring K → Algebra ℚ≥0 K instance since we need to control the specific definitions for some special cases of K (in particular K = ℚ≥0 itself). See also note [forgetful inheritance].

If the division semiring has positive characteristic p, our division by zero convention forces nnratCast (1 / p) = 1 / 0 = 0.

theorem DivisionSemiring.div_eq_mul_inv E1 #

∀ {K : Type u_2} [self : DivisionSemiring K] (a b : K), a / b = a * b⁻¹

a / b := a * b⁻¹

abbrev DivisionSemiring.toInv E1 #

{K : Type u_2} → [self : DivisionSemiring K] → Inv K

theorem DivisionSemiring.mul_inv_cancel E1 #

∀ {K : Type u_2} [self : DivisionSemiring K] (a : K), a ≠ 0 → a * a⁻¹ = 1

Every nonzero element of a group with zero is invertible.

instance DivisionSemiring.toGroupWithZero E0 #

{K : Type u_2} → [self : DivisionSemiring K] → GroupWithZero K

theorem DivisionSemiring.zpow_zero' E1 #

∀ {K : Type u_2} [self : DivisionSemiring K] (a : K), a ^ 0 = 1

a ^ 0 = 1

abbrev DivisionSemiring.toZPow E1 #

{K : Type u_2} → [self : DivisionSemiring K] → ZPow K

theorem DivisionSemiring.inv_zero E1 #

∀ {K : Type u_2} [self : DivisionSemiring K], 0⁻¹ = 0

The inverse of 0 in a group with zero is 0.

theorem DivisionSemiring.zpow_neg' E1 #

∀ {K : Type u_2} [self : DivisionSemiring K] (n : ℕ) (a : K), a ^ Int.negSucc n = (a ^ ↑n.succ)⁻¹

a ^ -(n + 1) = (a ^ (n + 1))⁻¹

instance DivisionSemiring.toNNRatCast E0 #

{K : Type u_2} → [self : DivisionSemiring K] → NNRatCast K

abbrev DivisionSemiring.toDiv E1 #

{K : Type u_2} → [self : DivisionSemiring K] → Div K

theorem DivisionSemiring.toNontrivial E1 #

∀ {K : Type u_2} [self : DivisionSemiring K], Nontrivial K

ctor DivisionSemiring.mk E0 #

{K : Type u_2} →
  [toSemiring : Semiring K] →
    [toInv : Inv K] →
      [toDiv : Div K] →
        [toZPow : ZPow K] →
          autoParam (∀ (a b : K), a / b = a * b⁻¹) DivInvMonoid.div_eq_mul_inv._autoParam →
            autoParam (∀ (a : K), a ^ 0 = 1) DivInvMonoid.zpow_zero'._autoParam →
              autoParam (∀ (n : ℕ) (a : K), a ^ ↑n.succ = a ^ ↑n * a) DivInvMonoid.zpow_succ'._autoParam →
                autoParam (∀ (n : ℕ) (a : K), a ^ Int.negSucc n = (a ^ ↑n.succ)⁻¹) DivInvMonoid.zpow_neg'._autoParam →
                  [toNontrivial : Nontrivial K] →
                    0⁻¹ = 0 →
                      (∀ (a : K), a ≠ 0 → a * a⁻¹ = 1) →
                        [toNNRatCast : NNRatCast K] →
                          autoParam (∀ (q : ℚ≥0), ↑q = ↑q.num / ↑q.den) DivisionSemiring.nnratCast_def._autoParam →
                            (nnqsmul : ℚ≥0 → K → K) →
                              autoParam (∀ (q : ℚ≥0) (a : K), nnqsmul q a = ↑q * a)
                                  DivisionSemiring.nnqsmul_def._autoParam →
                                DivisionSemiring K

instance DivisionSemiring.toSemiring E0 #

{K : Type u_2} → [self : DivisionSemiring K] → Semiring K

theorem DivisionSemiring.zpow_succ' E1 #

∀ {K : Type u_2} [self : DivisionSemiring K] (n : ℕ) (a : K), a ^ ↑n.succ = a ^ ↑n * a

a ^ (n + 1) = a ^ n * a

theorem DivisionSemiring.nnratCast_def E0 #

∀ {K : Type u_2} [self : DivisionSemiring K] (q : ℚ≥0), ↑q = ↑q.num / ↑q.den

However NNRat.cast is defined, it must be propositionally equal to a / b.

Do not use this lemma directly. Use NNRat.cast_def instead.

abbrev DivisionSemiring.nnqsmul E1 #

{K : Type u_2} → [self : DivisionSemiring K] → ℚ≥0 → K → K

Scalar multiplication by a nonnegative rational number.

Unless there is a risk of a Module ℚ≥0 _ instance diamond, write nnqsmul := _. This will set nnqsmul to (NNRat.cast · * ·) thanks to unification in the default proof of nnqsmul_def.

Do not use directly. Instead use the • notation.

theorem DivisionSemiring.nnqsmul_def E0 #

∀ {K : Type u_2} [self : DivisionSemiring K] (q : ℚ≥0) (a : K), DivisionSemiring.nnqsmul q a = ↑q * a

However qsmul is defined, it must be propositionally equal to multiplication by Rat.cast.

Do not use this lemma directly. Use NNRat.smul_def instead.

class DivisionRing E3 #

Type u_2 → Type u_2

A DivisionRing is a Ring with multiplicative inverses for nonzero elements.

An instance of DivisionRing K includes maps ratCast : ℚ → K and qsmul : ℚ → K → K. Those two fields are needed to implement the DivisionRing K → Algebra ℚ K instance since we need to control the specific definitions for some special cases of K (in particular K = ℚ itself). See also note [forgetful inheritance]. Similarly, there are maps nnratCast ℚ≥0 → K and nnqsmul : ℚ≥0 → K → K to implement the DivisionSemiring K → Algebra ℚ≥0 K instance.

If the division ring has positive characteristic p, our division by zero convention forces ratCast (1 / p) = 1 / 0 = 0.

abbrev DivisionRing.toZPow E1 #

{K : Type u_2} → [self : DivisionRing K] → ZPow K

instance DivisionRing.toRatCast E0 #

{K : Type u_2} → [self : DivisionRing K] → RatCast K

instance DivisionRing.toDivInvMonoid E0 #

{K : Type u_2} → [self : DivisionRing K] → DivInvMonoid K

instance DivisionRing.toRing E0 #

{K : Type u_2} → [self : DivisionRing K] → Ring K

ctor DivisionRing.mk E0 #

{K : Type u_2} →
  [toRing : Ring K] →
    [toInv : Inv K] →
      [toDiv : Div K] →
        [toZPow : ZPow K] →
          autoParam (∀ (a b : K), a / b = a * b⁻¹) DivInvMonoid.div_eq_mul_inv._autoParam →
            autoParam (∀ (a : K), a ^ 0 = 1) DivInvMonoid.zpow_zero'._autoParam →
              autoParam (∀ (n : ℕ) (a : K), a ^ ↑n.succ = a ^ ↑n * a) DivInvMonoid.zpow_succ'._autoParam →
                autoParam (∀ (n : ℕ) (a : K), a ^ Int.negSucc n = (a ^ ↑n.succ)⁻¹) DivInvMonoid.zpow_neg'._autoParam →
                  [toNontrivial : Nontrivial K] →
                    [toNNRatCast : NNRatCast K] →
                      [toRatCast : RatCast K] →
                        (∀ (a : K), a ≠ 0 → a * a⁻¹ = 1) →
                          0⁻¹ = 0 →
                            autoParam (∀ (q : ℚ≥0), ↑q = ↑q.num / ↑q.den) DivisionRing.nnratCast_def._autoParam →
                              (nnqsmul : ℚ≥0 → K → K) →
                                autoParam (∀ (q : ℚ≥0) (a : K), nnqsmul q a = ↑q * a)
                                    DivisionRing.nnqsmul_def._autoParam →
                                  autoParam (∀ (q : ℚ), ↑q = ↑q.num / ↑q.den) DivisionRing.ratCast_def._autoParam →
                                    (qsmul : ℚ → K → K) →
                                      autoParam (∀ (a : ℚ) (x : K), qsmul a x = ↑a * x)
                                          DivisionRing.qsmul_def._autoParam →
                                        DivisionRing K

abbrev DivisionRing.toDiv E1 #

{K : Type u_2} → [self : DivisionRing K] → Div K

instance DivisionRing.toNontrivial E0 #

∀ {K : Type u_2} [self : DivisionRing K], Nontrivial K

abbrev DivisionRing.toInv E1 #

{K : Type u_2} → [self : DivisionRing K] → Inv K

instance DivisionRing.toNNRatCast E0 #

{K : Type u_2} → [self : DivisionRing K] → NNRatCast K

theorem DivisionRing.zpow_neg' E2 #

∀ {K : Type u_2} [self : DivisionRing K] (n : ℕ) (a : K), a ^ Int.negSucc n = (a ^ ↑n.succ)⁻¹

a ^ -(n + 1) = (a ^ (n + 1))⁻¹

theorem DivisionRing.div_eq_mul_inv E2 #

∀ {K : Type u_2} [self : DivisionRing K] (a b : K), a / b = a * b⁻¹

a / b := a * b⁻¹

theorem DivisionRing.zpow_zero' E2 #

∀ {K : Type u_2} [self : DivisionRing K] (a : K), a ^ 0 = 1

a ^ 0 = 1

theorem DivisionRing.zpow_succ' E2 #

∀ {K : Type u_2} [self : DivisionRing K] (n : ℕ) (a : K), a ^ ↑n.succ = a ^ ↑n * a

a ^ (n + 1) = a ^ n * a

theorem DivisionRing.mul_inv_cancel E2 #

∀ {K : Type u_2} [self : DivisionRing K] (a : K), a ≠ 0 → a * a⁻¹ = 1

For a nonzero a, a⁻¹ is a right multiplicative inverse.

theorem DivisionRing.inv_zero E2 #

∀ {K : Type u_2} [self : DivisionRing K], 0⁻¹ = 0

The inverse of 0 is 0 by convention.

theorem DivisionRing.nnratCast_def E0 #

∀ {K : Type u_2} [self : DivisionRing K] (q : ℚ≥0), ↑q = ↑q.num / ↑q.den

However NNRat.cast is defined, it must be equal to a / b.

Do not use this lemma directly. Use NNRat.cast_def instead.

abbrev DivisionRing.nnqsmul E1 #

{K : Type u_2} → [self : DivisionRing K] → ℚ≥0 → K → K

Scalar multiplication by a nonnegative rational number.

Unless there is a risk of a Module ℚ≥0 _ instance diamond, write nnqsmul := _. This will set nnqsmul to (NNRat.cast · * ·) thanks to unification in the default proof of nnqsmul_def.

Do not use directly. Instead use the • notation.

theorem DivisionRing.nnqsmul_def E0 #

∀ {K : Type u_2} [self : DivisionRing K] (q : ℚ≥0) (a : K), DivisionRing.nnqsmul q a = ↑q * a

However qsmul is defined, it must be propositionally equal to multiplication by Rat.cast.

Do not use this lemma directly. Use NNRat.smul_def instead.

theorem DivisionRing.ratCast_def E0 #

∀ {K : Type u_2} [self : DivisionRing K] (q : ℚ), ↑q = ↑q.num / ↑q.den

However Rat.cast q is defined, it must be propositionally equal to q.num / q.den.

Do not use this lemma directly. Use Rat.cast_def instead.

abbrev DivisionRing.qsmul E1 #

{K : Type u_2} → [self : DivisionRing K] → ℚ → K → K

Scalar multiplication by a rational number.

Unless there is a risk of a Module ℚ _ instance diamond, write qsmul := _. This will set qsmul to (Rat.cast · * ·) thanks to unification in the default proof of qsmul_def.

Do not use directly. Instead use the • notation.

theorem DivisionRing.qsmul_def E0 #

∀ {K : Type u_2} [self : DivisionRing K] (a : ℚ) (x : K), DivisionRing.qsmul a x = ↑a * x

However qsmul is defined, it must be propositionally equal to multiplication by Rat.cast.

Do not use this lemma directly. Use Rat.cast_def instead.

instance DivisionRing.toDivisionSemiring E0 #

{K : Type u_1} → [DivisionRing K] → DivisionSemiring K

class Semifield E3 #

Type u_2 → Type u_2

A Semifield is a CommSemiring with multiplicative inverses for nonzero elements.

An instance of Semifield K includes maps nnratCast : ℚ≥0 → K and nnqsmul : ℚ≥0 → K → K. Those two fields are needed to implement the DivisionSemiring K → Algebra ℚ≥0 K instance since we need to control the specific definitions for some special cases of K (in particular K = ℚ≥0 itself). See also note [forgetful inheritance].

If the semifield has positive characteristic p, our division by zero convention forces nnratCast (1 / p) = 1 / 0 = 0.

abbrev Semifield.nnqsmul E1 #

{K : Type u_2} → [self : Semifield K] → ℚ≥0 → K → K

Scalar multiplication by a nonnegative rational number.

Unless there is a risk of a Module ℚ≥0 _ instance diamond, write nnqsmul := _. This will set nnqsmul to (NNRat.cast · * ·) thanks to unification in the default proof of nnqsmul_def.

Do not use directly. Instead use the • notation.

theorem Semifield.zpow_zero' E1 #

∀ {K : Type u_2} [self : Semifield K] (a : K), a ^ 0 = 1

a ^ 0 = 1

theorem Semifield.nnratCast_def E0 #

∀ {K : Type u_2} [self : Semifield K] (q : ℚ≥0), ↑q = ↑q.num / ↑q.den

However NNRat.cast is defined, it must be propositionally equal to a / b.

Do not use this lemma directly. Use NNRat.cast_def instead.

theorem Semifield.zpow_neg' E1 #

∀ {K : Type u_2} [self : Semifield K] (n : ℕ) (a : K), a ^ Int.negSucc n = (a ^ ↑n.succ)⁻¹

a ^ -(n + 1) = (a ^ (n + 1))⁻¹

abbrev Semifield.toInv E1 #

{K : Type u_2} → [self : Semifield K] → Inv K

theorem Semifield.mul_inv_cancel E1 #

∀ {K : Type u_2} [self : Semifield K] (a : K), a ≠ 0 → a * a⁻¹ = 1

Every nonzero element of a group with zero is invertible.

theorem Semifield.div_eq_mul_inv E1 #

∀ {K : Type u_2} [self : Semifield K] (a b : K), a / b = a * b⁻¹

a / b := a * b⁻¹

theorem Semifield.toNontrivial E1 #

∀ {K : Type u_2} [self : Semifield K], Nontrivial K

abbrev Semifield.toDiv E1 #

{K : Type u_2} → [self : Semifield K] → Div K

theorem Semifield.zpow_succ' E1 #

∀ {K : Type u_2} [self : Semifield K] (n : ℕ) (a : K), a ^ ↑n.succ = a ^ ↑n * a

a ^ (n + 1) = a ^ n * a

instance Semifield.toDivisionSemiring E0 #

{K : Type u_2} → [self : Semifield K] → DivisionSemiring K

theorem Semifield.inv_zero E1 #

∀ {K : Type u_2} [self : Semifield K], 0⁻¹ = 0

The inverse of 0 in a group with zero is 0.

abbrev Semifield.toZPow E1 #

{K : Type u_2} → [self : Semifield K] → ZPow K

theorem Semifield.nnqsmul_def E0 #

∀ {K : Type u_2} [self : Semifield K] (q : ℚ≥0) (a : K), Semifield.nnqsmul q a = ↑q * a

However qsmul is defined, it must be propositionally equal to multiplication by Rat.cast.

Do not use this lemma directly. Use NNRat.smul_def instead.

instance Semifield.toCommGroupWithZero E0 #

{K : Type u_2} → [self : Semifield K] → CommGroupWithZero K

ctor Semifield.mk E0 #

{K : Type u_2} →
  [toCommSemiring : CommSemiring K] →
    [toInv : Inv K] →
      [toDiv : Div K] →
        [toZPow : ZPow K] →
          autoParam (∀ (a b : K), a / b = a * b⁻¹) DivInvMonoid.div_eq_mul_inv._autoParam →
            autoParam (∀ (a : K), a ^ 0 = 1) DivInvMonoid.zpow_zero'._autoParam →
              autoParam (∀ (n : ℕ) (a : K), a ^ ↑n.succ = a ^ ↑n * a) DivInvMonoid.zpow_succ'._autoParam →
                autoParam (∀ (n : ℕ) (a : K), a ^ Int.negSucc n = (a ^ ↑n.succ)⁻¹) DivInvMonoid.zpow_neg'._autoParam →
                  [toNontrivial : Nontrivial K] →
                    0⁻¹ = 0 →
                      (∀ (a : K), a ≠ 0 → a * a⁻¹ = 1) →
                        [toNNRatCast : NNRatCast K] →
                          autoParam (∀ (q : ℚ≥0), ↑q = ↑q.num / ↑q.den) DivisionSemiring.nnratCast_def._autoParam →
                            (nnqsmul : ℚ≥0 → K → K) →
                              autoParam (∀ (q : ℚ≥0) (a : K), nnqsmul q a = ↑q * a)
                                  DivisionSemiring.nnqsmul_def._autoParam →
                                Semifield K

instance Semifield.toCommSemiring E0 #

{K : Type u_2} → [self : Semifield K] → CommSemiring K

abbrev Semifield.toNNRatCast E1 #

{K : Type u_2} → [self : Semifield K] → NNRatCast K

class Field E3 #

Type u → Type u

A Field is a CommRing with multiplicative inverses for nonzero elements.

An instance of Field K includes maps ratCast : ℚ → K and qsmul : ℚ → K → K. Those two fields are needed to implement the DivisionRing K → Algebra ℚ K instance since we need to control the specific definitions for some special cases of K (in particular K = ℚ itself). See also note [forgetful inheritance].

If the field has positive characteristic p, our division by zero convention forces ratCast (1 / p) = 1 / 0 = 0.

theorem Field.nnratCast_def E0 #

∀ {K : Type u} [self : Field K] (q : ℚ≥0), ↑q = ↑q.num / ↑q.den

However NNRat.cast is defined, it must be equal to a / b.

Do not use this lemma directly. Use NNRat.cast_def instead.

abbrev Field.nnqsmul E1 #

{K : Type u} → [self : Field K] → ℚ≥0 → K → K

Scalar multiplication by a nonnegative rational number.

Unless there is a risk of a Module ℚ≥0 _ instance diamond, write nnqsmul := _. This will set nnqsmul to (NNRat.cast · * ·) thanks to unification in the default proof of nnqsmul_def.

Do not use directly. Instead use the • notation.

abbrev Field.toRatCast E1 #

{K : Type u} → [self : Field K] → RatCast K

theorem Field.mul_inv_cancel E1 #

∀ {K : Type u} [self : Field K] (a : K), a ≠ 0 → a * a⁻¹ = 1

For a nonzero a, a⁻¹ is a right multiplicative inverse.

abbrev Field.toNNRatCast E1 #

{K : Type u} → [self : Field K] → NNRatCast K

abbrev Field.toDiv E1 #

{K : Type u} → [self : Field K] → Div K

theorem Field.zpow_neg' E1 #

∀ {K : Type u} [self : Field K] (n : ℕ) (a : K), a ^ Int.negSucc n = (a ^ ↑n.succ)⁻¹

a ^ -(n + 1) = (a ^ (n + 1))⁻¹

instance Field.toDivisionRing E0 #

{K : Type u} → [self : Field K] → DivisionRing K

theorem Field.zpow_zero' E1 #

∀ {K : Type u} [self : Field K] (a : K), a ^ 0 = 1

a ^ 0 = 1

ctor Field.mk E0 #

{K : Type u} →
  [toCommRing : CommRing K] →
    [toInv : Inv K] →
      [toDiv : Div K] →
        [toZPow : ZPow K] →
          autoParam (∀ (a b : K), a / b = a * b⁻¹) DivInvMonoid.div_eq_mul_inv._autoParam →
            autoParam (∀ (a : K), a ^ 0 = 1) DivInvMonoid.zpow_zero'._autoParam →
              autoParam (∀ (n : ℕ) (a : K), a ^ ↑n.succ = a ^ ↑n * a) DivInvMonoid.zpow_succ'._autoParam →
                autoParam (∀ (n : ℕ) (a : K), a ^ Int.negSucc n = (a ^ ↑n.succ)⁻¹) DivInvMonoid.zpow_neg'._autoParam →
                  [toNontrivial : Nontrivial K] →
                    [toNNRatCast : NNRatCast K] →
                      [toRatCast : RatCast K] →
                        (∀ (a : K), a ≠ 0 → a * a⁻¹ = 1) →
                          0⁻¹ = 0 →
                            autoParam (∀ (q : ℚ≥0), ↑q = ↑q.num / ↑q.den) DivisionRing.nnratCast_def._autoParam →
                              (nnqsmul : ℚ≥0 → K → K) →
                                autoParam (∀ (q : ℚ≥0) (a : K), nnqsmul q a = ↑q * a)
                                    DivisionRing.nnqsmul_def._autoParam →
                                  autoParam (∀ (q : ℚ), ↑q = ↑q.num / ↑q.den) DivisionRing.ratCast_def._autoParam →
                                    (qsmul : ℚ → K → K) →
                                      autoParam (∀ (a : ℚ) (x : K), qsmul a x = ↑a * x)
                                          DivisionRing.qsmul_def._autoParam →
                                        Field K

abbrev Field.qsmul E1 #

{K : Type u} → [self : Field K] → ℚ → K → K

Scalar multiplication by a rational number.

Unless there is a risk of a Module ℚ _ instance diamond, write qsmul := _. This will set qsmul to (Rat.cast · * ·) thanks to unification in the default proof of qsmul_def.

Do not use directly. Instead use the • notation.

instance Field.toCommRing E0 #

{K : Type u} → [self : Field K] → CommRing K

theorem Field.ratCast_def E0 #

∀ {K : Type u} [self : Field K] (q : ℚ), ↑q = ↑q.num / ↑q.den

However Rat.cast q is defined, it must be propositionally equal to q.num / q.den.

Do not use this lemma directly. Use Rat.cast_def instead.

theorem Field.inv_zero E1 #

∀ {K : Type u} [self : Field K], 0⁻¹ = 0

The inverse of 0 is 0 by convention.

theorem Field.zpow_succ' E1 #

∀ {K : Type u} [self : Field K] (n : ℕ) (a : K), a ^ ↑n.succ = a ^ ↑n * a

a ^ (n + 1) = a ^ n * a

abbrev Field.toInv E1 #

{K : Type u} → [self : Field K] → Inv K

theorem Field.qsmul_def E0 #

∀ {K : Type u} [self : Field K] (a : ℚ) (x : K), Field.qsmul a x = ↑a * x

However qsmul is defined, it must be propositionally equal to multiplication by Rat.cast.

Do not use this lemma directly. Use Rat.cast_def instead.

theorem Field.nnqsmul_def E0 #

∀ {K : Type u} [self : Field K] (q : ℚ≥0) (a : K), Field.nnqsmul q a = ↑q * a

However qsmul is defined, it must be propositionally equal to multiplication by Rat.cast.

Do not use this lemma directly. Use NNRat.smul_def instead.

theorem Field.div_eq_mul_inv E1 #

∀ {K : Type u} [self : Field K] (a b : K), a / b = a * b⁻¹

a / b := a * b⁻¹

abbrev Field.toZPow E1 #

{K : Type u} → [self : Field K] → ZPow K

theorem Field.toNontrivial E1 #

∀ {K : Type u} [self : Field K], Nontrivial K

instance Field.toSemifield E0 #

{K : Type u_1} → [Field K] → Semifield K

instance NNRat.smulDivisionSemiring E0 #

{K : Type u_1} → [DivisionSemiring K] → SMul ℚ≥0 K

theorem NNRat.cast_def E0 #

∀ {K : Type u_1} [inst : DivisionSemiring K] (q : ℚ≥0), ↑q = ↑q.num / ↑q.den

theorem NNRat.smul_def E0 #

∀ {K : Type u_1} [inst : DivisionSemiring K] (q : ℚ≥0) (a : K), q • a = ↑q * a

theorem NNRat.smul_one_eq_cast E0 #

∀ (K : Type u_1) [inst : DivisionSemiring K] (q : ℚ≥0), q • 1 = ↑q

theorem Rat.cast_def E0 #

∀ {K : Type u_1} [inst : DivisionRing K] (q : ℚ), ↑q = ↑q.num / ↑q.den

theorem Rat.cast_mk' E1 #

∀ {K : Type u_1} [inst : DivisionRing K] (a : ℤ) (b : ℕ) (h1 : b ≠ 0) (h2 : a.natAbs.Coprime b),
  ↑{ num := a, den := b, den_nz := h1, reduced := h2 } = ↑a / ↑b

instance Rat.smulDivisionRing E0 #

{K : Type u_1} → [DivisionRing K] → SMul ℚ K

theorem Rat.smul_def E0 #

∀ {K : Type u_1} [inst : DivisionRing K] (a : ℚ) (x : K), a • x = ↑a * x

theorem Rat.smul_one_eq_cast E0 #

∀ (A : Type u_2) [inst : DivisionRing A] (m : ℚ), m • 1 = ↑m

theorem Rat.ofScientific_eq_ofScientific E0 #

∀ (m : ℕ) (s : Bool) (e : ℕ), Rat.ofScientific (OfNat.ofNat m) s (OfNat.ofNat e) = OfScientific.ofScientific m s e

OfScientific.ofScientific is the simp-normal form.