FormalConjectures/Wikipedia/SumOfThreeCubes.lean

GitHub source file

Explanation legend Lean4 Domain Explanation Language (L4DEL)

L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.

L4DEL
Lean4 Domain Explanation Language

Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.

Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1

7 declarations, 1 contain sorry, 0 declared as axioms

Sum of three cubes

An integer n : ℤ can be written as a sum of three cubes (of integers) if and only if n is not 4 or 5 mod 9.

References:

Imports (1)
Imported by 1 file
  1. def SumOfThreeCubes.IsSumOfThreeCubes The predicate that n : R is a sum of three cubes line 39 source

    Source documentation

    The predicate that n : R is a sum of three cubes.

    no axioms what this means

    Statement uses: Ring

    Proof uses: Exists, Eq, HAdd.hAdd, HPow.hPow, Nat, OfNat.ofNat

    9 instances, coercions and auxiliary constants left out.

    def IsSumOfThreeCubes (n : R) : Prop :=
    …
  2. theorem SumOfThreeCubes.isSumOfThreeCubes_2 line 43 source

    standard axioms: propext what this means

    Statement uses: SumOfThreeCubes.IsSumOfThreeCubes, Int, OfNat.ofNat

    Proof uses: Exists.intro, Exists, Eq, HAdd.hAdd, HPow.hPow, Nat, Mathlib.Meta.NormNum.isNat_eq_true, Mathlib.Meta.NormNum.isNat_ofNat, Eq.refl, Mathlib.Meta.NormNum.isNat_add, Mathlib.Meta.NormNum.isNat_pow, Mathlib.Meta.NormNum.one_natPow, Mathlib.Meta.NormNum.zero_natPow

    20 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

  3. theorem SumOfThreeCubes.isSumOfThreeCubes_33 line 47 source

    standard axioms: Quot.sound, propext what this means

    Statement uses: SumOfThreeCubes.IsSumOfThreeCubes, Int, OfNat.ofNat

    Proof uses: Exists.intro, Exists, Eq, HAdd.hAdd, HPow.hPow, Nat, Neg.neg, Mathlib.Meta.NormNum.isNat_eq_true, Mathlib.Meta.NormNum.isNat_ofNat, Eq.refl, Mathlib.Meta.NormNum.IsInt.to_isNat, Mathlib.Meta.NormNum.isInt_add, Int.ofNat, Int.negOfNat, Mathlib.Meta.NormNum.IsNat.to_isInt, Mathlib.Meta.NormNum.isNat_pow, Mathlib.Meta.NormNum.IsNatPowT.run, Mathlib.Meta.NormNum.IsNatPowT.bit1, Mathlib.Meta.NormNum.isInt_pow, Mathlib.Meta.NormNum.isInt_neg and 2 more

    24 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

  4. theorem SumOfThreeCubes.isSumOfThreeCubes_42 line 51 source

    standard axioms: Quot.sound, propext what this means

    Statement uses: SumOfThreeCubes.IsSumOfThreeCubes, Int, OfNat.ofNat

    Proof uses: Exists.intro, Exists, Eq, HAdd.hAdd, HPow.hPow, Nat, Neg.neg, Mathlib.Meta.NormNum.isNat_eq_true, Mathlib.Meta.NormNum.isNat_ofNat, Eq.refl, Mathlib.Meta.NormNum.IsInt.to_isNat, Mathlib.Meta.NormNum.isInt_add, Int.negOfNat, Int.ofNat, Mathlib.Meta.NormNum.isInt_pow, Mathlib.Meta.NormNum.isInt_neg, Mathlib.Meta.NormNum.IsNat.to_isInt, Mathlib.Meta.NormNum.intPow_negOfNat_bit1, Mathlib.Meta.NormNum.natPow_one, Mathlib.Meta.NormNum.isNat_pow and 2 more

    24 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

  5. theorem SumOfThreeCubes.mod_9_of_isSumOfThreeCubes line 55 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Int, SumOfThreeCubes.IsSumOfThreeCubes, Not, Or, Int.ModEq, OfNat.ofNat

    Proof uses: Eq.mpr, Nat, id, Eq, congrArg, rfl, ZMod, Eq.symm, propext, ZMod.intCast_eq_intCast_iff, Exists, HAdd.hAdd, HPow.hPow, of_decide_eq_true, Bool, Decidable.decide, Bool.true, Eq.refl, Eq.mp, Eq.trans and 3 more

    33 instances, coercions and auxiliary constants left out.

    Tactic trace: 9 steps

    Open to load the checked before-and-after goal states.

  6. theorem SumOfThreeCubes.isSumOfThreeCubesRat_any Any rational number is a sum of three rational cubes line 78 source

    Source documentation

    Any rational number is a sum of three rational cubes.

    First proved by Ryley in 1825, which can be found in [Ri1930]. The below parametrization is brought from the MSE answer [MSE].

    [Ri1930] Richmond, H. W. "On Rational Solutions of $x^3 + y^3 + z^3 = R$." Proceedings of the Edinburgh Mathematical Society 2.2 (1930): 92-100. [MSE] Kieren MacMillan, Proving that any rational number can be represented as the sum of the cubes of three rational numbers, https://math.stackexchange.com/q/4480969

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Rat, SumOfThreeCubes.IsSumOfThreeCubes

    Proof uses: dite, Eq, OfNat.ofNat, Exists.intro, Exists, HAdd.hAdd, HPow.hPow, Nat, Eq.mpr, id, congrArg, Mathlib.Meta.NormNum.IsNat.to_eq, Mathlib.Meta.NormNum.isNat_add, Eq.refl, Mathlib.Meta.NormNum.isNat_pow, Mathlib.Meta.NormNum.isNat_ofNat, Mathlib.Meta.NormNum.zero_natPow, Not, HDiv.hDiv, HSub.hSub and 124 more

    116 instances, coercions and auxiliary constants left out.

    Tactic trace: 13 steps

    Open to load the checked before-and-after goal states.

    theorem isSumOfThreeCubesRat_any (r : ℚ) : IsSumOfThreeCubes r := by
    …

    Mentions: SumOfThreeCubes.IsSumOfThreeCubes

  7. theorem SumOfThreeCubes.isSumOfThreeCubes_iff_mod_9 An integer n : ℤ can be written as a sum of three cubes (of integers) if and only if n is not 4 or 5 mod 9 sorry line 93 source

    Source documentation

    An integer n : ℤ can be written as a sum of three cubes (of integers) if and only if n is not 4 or 5 mod 9.

    depends on sorry what this means

    Statement uses: Iff, True, Int, SumOfThreeCubes.IsSumOfThreeCubes, Not, Or, Int.ModEq, OfNat.ofNat

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous, Nat

    5 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

    theorem isSumOfThreeCubes_iff_mod_9 :
        answer(sorry) ↔ ∀ n : ℤ, IsSumOfThreeCubes n ↔ ¬(n ≡ 4 [ZMOD 9] ∨ n ≡ 5 [ZMOD 9]) := by
    …

    Mentions: SumOfThreeCubes.IsSumOfThreeCubes