Compfiles/Usa1986P3.lean
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
- determine
Usa1986P3.solutionline 31 sourceno axioms what this means
Statement uses:
NatProof uses:
OfNat.ofNat1 instances, coercions and auxiliary constants left out.
- lemma
Usa1986P3.six_mul_sum_sqSix times the sum of the firstnnon-zero squares line 36 sourceSource documentation
Six times the sum of the first
nnon-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.hAddProof 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_pfand 31 more40 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 … - lemma
Usa1986P3.isUnit_gcd_of_coprimeTheGCDMonoidgcd of coprime naturals is a unit line 45 sourceSource documentation
The
GCDMonoidgcd of coprime naturals is a unit.standard axioms: Quot.sound, propext what this means
Statement uses:
Nat,Nat.Coprime,IsUnit,GCDMonoid.gcdProof uses:
Eq,OfNat.ofNat,Eq.mpr,Nat.gcd,id,congrArg,gcd_eq_nat_gcd,isUnit_one7 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
- lemma
Usa1986P3.eq_sq_of_coprime_mul_eq_sqIf coprime naturals have a square product, the left factor is a square line 53 sourceSource 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,ExistsProof uses:
exists_eq_pow_of_mul_eq_pow,Units, Usa1986P3.isUnit_gcd_of_coprime20 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
- lemma
Usa1986P3.no_small_solutionFinite check: the Pell-type equation4u² = 3w² + 1has no solution with2 ≤ u ≤ 12andw ≤ 13line 59 sourceSource documentation
Finite check: the Pell-type equation
4u² = 3w² + 1has no solution with2 ≤ u ≤ 12andw ≤ 13.standard axioms: propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat,LE.le,Ne,HMul.hMul,HPow.hPow,HAdd.hAddProof uses:
of_decide_eq_true,Eq,id,Bool,Decidable.decide,Bool.true,Eq.refl27 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 … - lemma
Usa1986P3.ge_337Minimality: ifn > 1and(n+1)(2n+1) = 6m², then337 ≤ nline 64 sourceSource documentation
Minimality: if
n > 1and(n+1)(2n+1) = 6m², then337 ≤ 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.leProof 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_muland 82 more119 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
- problem
Usa1986P3.usa1986_p3line 158 sourcestandard 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.solutionProof 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.bit0and 38 more70 instances, coercions and auxiliary constants left out.
Tactic trace: 22 steps
Open to load the checked before-and-after goal states.