Compfiles/Usa1986P3.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 compfiles documentation, Pinned compfiles corpus index

7 declarations, 0 contain sorry, 0 declared as axioms

USA Mathematical Olympiad 1986, Problem 3

What is the smallest n > 1 for which the average of the first n (non-zero) squares is a square?

Imports (8)
Imported by 1 file
  1. determine Usa1986P3.solution line 31 source

    no axioms what this means

    Statement uses: Nat

    Proof uses: OfNat.ofNat

    1 instances, coercions and auxiliary constants left out.

  2. lemma Usa1986P3.six_mul_sum_sq Six times the sum of the first n non-zero squares line 36 source

    Source documentation

    Six times the sum of the first n non-zero squares.

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

    Statement uses: Nat, Eq, HMul.hMul, OfNat.ofNat, Finset.sum, Finset.range, HPow.hPow, HAdd.hAdd

    Proof uses: Nat.recAux, of_eq_true, Eq.trans, True, congr, congrArg, MulZeroClass.mul_zero, zero_add, mul_one, congrFun', eq_self, Eq.mpr, id, Finset.sum_range_succ, Nat.mul_add, Mathlib.Tactic.Ring.of_eq, Nat.rawCast, Mathlib.Tactic.Ring.Common.add_congr, Mathlib.Tactic.Ring.Common.mul_congr, Mathlib.Tactic.Ring.Common.atom_pf and 31 more

    40 instances, coercions and auxiliary constants left out.

    Tactic trace: 4 steps

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

    lemma six_mul_sum_sq (n : ℕ) :
        6 * ∑ i ∈ Finset.range n, (i + 1)^2 = n * (n + 1) * (2 * n + 1) := by
    …
  3. lemma Usa1986P3.isUnit_gcd_of_coprime The GCDMonoid gcd of coprime naturals is a unit line 45 source

    Source documentation

    The GCDMonoid gcd of coprime naturals is a unit.

    standard axioms: Quot.sound, propext what this means

    Statement uses: Nat, Nat.Coprime, IsUnit, GCDMonoid.gcd

    Proof uses: Eq, OfNat.ofNat, Eq.mpr, Nat.gcd, id, congrArg, gcd_eq_nat_gcd, isUnit_one

    7 instances, coercions and auxiliary constants left out.

    Tactic trace: 5 steps

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

    lemma isUnit_gcd_of_coprime {a b : ℕ} (h : Nat.Coprime a b) : IsUnit (gcd a b) := by
    …

    Mentions: h

  4. lemma Usa1986P3.eq_sq_of_coprime_mul_eq_sq If coprime naturals have a square product, the left factor is a square line 53 source

    Source documentation

    If coprime naturals have a square product, the left factor is a square.

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

    Statement uses: Nat, Nat.Coprime, Eq, HMul.hMul, HPow.hPow, OfNat.ofNat, Exists

    Proof uses: exists_eq_pow_of_mul_eq_pow, Units, Usa1986P3.isUnit_gcd_of_coprime

    20 instances, coercions and auxiliary constants left out.

    lemma eq_sq_of_coprime_mul_eq_sq {a b k : ℕ} (hcop : Nat.Coprime a b)
        (h : a * b = k^2) : ∃ u, a = u^2 :=
    …

    Mentions: h

  5. lemma Usa1986P3.no_small_solution Finite check: the Pell-type equation 4u² = 3w² + 1 has no solution with 2 ≤ u ≤ 12 and w ≤ 13 line 59 source

    Source documentation

    Finite check: the Pell-type equation 4u² = 3w² + 1 has no solution with 2 ≤ u ≤ 12 and w ≤ 13.

    standard axioms: propext what this means

    Statement uses: Nat, LT.lt, OfNat.ofNat, LE.le, Ne, HMul.hMul, HPow.hPow, HAdd.hAdd

    Proof uses: of_decide_eq_true, Eq, id, Bool, Decidable.decide, Bool.true, Eq.refl

    27 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

    lemma no_small_solution :
        ∀ u < 13, ∀ w < 14, 2 ≤ u → 4 * u^2 ≠ 3 * w^2 + 1 := by
    …
  6. lemma Usa1986P3.ge_337 Minimality: if n > 1 and (n+1)(2n+1) = 6m², then 337 ≤ n line 64 source

    Source documentation

    Minimality: if n > 1 and (n+1)(2n+1) = 6m², then 337 ≤ n.

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

    Statement uses: Nat, LT.lt, OfNat.ofNat, Eq, HMul.hMul, HAdd.hAdd, HPow.hPow, LE.le

    Proof uses: Decidable.byContradiction, Not, Nat.Coprime, Eq.mpr, IsCoprime, Int, id, congrArg, Eq.symm, propext, Nat.isCoprime_iff_coprime, Exists.intro, Exists, Neg.neg, congrFun', congr, Eq.trans, Nat.cast_add, Nat.cast_one, Nat.cast_mul and 82 more

    119 instances, coercions and auxiliary constants left out.

    Tactic trace: 124 steps

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

    lemma ge_337 {n m : ℕ} (hn : 1 < n) (h : (n+1) * (2*n+1) = 6 * m^2) :
        337 ≤ n := by
    …

    Mentions: h

  7. problem Usa1986P3.usa1986_p3 line 158 source

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

    Statement uses: IsLeast, Nat, Set.ofPred, And, LT.lt, OfNat.ofNat, Exists, Eq, Finset.sum, Finset.range, HPow.hPow, HAdd.hAdd, HMul.hMul, Usa1986P3.solution

    Proof uses: And.intro, Membership.mem, Set, lowerBounds, Mathlib.Meta.NormNum.isNat_lt_true, Mathlib.Meta.NormNum.isNat_ofNat, Eq.refl, Bool, Bool.false, Exists.intro, id, Eq.mpr, congrArg, Usa1986P3.six_mul_sum_sq, Mathlib.Meta.NormNum.isNat_eq_true, Mathlib.Meta.NormNum.isNat_mul, Mathlib.Meta.NormNum.isNat_add, Mathlib.Meta.NormNum.isNat_pow, Mathlib.Meta.NormNum.IsNatPowT.run, Mathlib.Meta.NormNum.IsNatPowT.bit0 and 38 more

    70 instances, coercions and auxiliary constants left out.

    Tactic trace: 22 steps

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