Compfiles/Imo1960P1.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
13 declarations, 0 contain sorry, 0 declared as axioms
International Mathematical Olympiad 1960, Problem 1
Determine all three-digit numbers N having the property that N is divisible by 11, and N/11 is equal to the sum of the squares of the digits of N.
Imported by 1 file
- def
Imo1960P1.sumOfSquaresline 31 sourcestandard axioms: propext what this means
Statement uses:
List,NatProof uses:
List.sum,List.map,HMul.hMul5 instances, coercions and auxiliary constants left out.
- def
Imo1960P1.ProblemPredicateline 34 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
And,Eq,List.length,Nat.digits,OfNat.ofNat,Dvd.dvd,HDiv.hDiv, Imo1960P1.sumOfSquares4 instances, coercions and auxiliary constants left out.
- determine
Imo1960P1.SolutionPredicateline 37 sourceno axioms what this means
Statement uses:
NatProof uses:
Or,Eq,OfNat.ofNat1 instances, coercions and auxiliary constants left out.
- theorem
Imo1960P1.not_zeroProving that three digit numbers are the ones in [100, 1000) line 45 sourceSource comment
Proving that three digit numbers are the ones in [100, 1000).standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo1960P1.ProblemPredicate,Ne,OfNat.ofNatProof uses:
List,Nat.digits,List.nil,List.ne_nil_of_length_eq_add_one,And.left,Eq,List.length,And,Dvd.dvd,HDiv.hDiv, Imo1960P1.sumOfSquares,Iff.mp,Nat.digits_ne_nil_iff_ne_zero5 instances, coercions and auxiliary constants left out.
theorem not_zero {n : ℕ} (h1 : ProblemPredicate n) : n ≠ 0 := …Mentions: Imo1960P1.ProblemPredicate
- theorem
Imo1960P1.ge_100line 49 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo1960P1.ProblemPredicate,LE.le,OfNat.ofNatProof uses:
HPow.hPow,HMul.hMul,Eq.mpr,List.length,Nat.digits,id,Eq,congrArg,Eq.symm,And.left,And,Dvd.dvd,HDiv.hDiv, Imo1960P1.sumOfSquares,Nat.base_pow_length_digits_le,of_eq_true,LT.lt, Imo1960P1.not_zero,le_of_not_gt,Mathlib.Tactic.Linarith.lt_irrefland 73 more86 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
- theorem
Imo1960P1.lt_1000line 56 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo1960P1.ProblemPredicate,LT.lt,OfNat.ofNatProof uses:
HPow.hPow,Eq.mpr,List.length,Nat.digits,id,Eq,congrArg,Eq.symm,And.left,And,Dvd.dvd,HDiv.hDiv, Imo1960P1.sumOfSquares,Nat.lt_base_pow_length_digits',lt_of_not_ge,LE.le,Mathlib.Tactic.Linarith.lt_irrefl,Int,Eq.mp,HAdd.hAddand 60 more73 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- def
Imo1960P1.SearchUpToWe do an exhaustive search to show that all results are covered bySolutionPredicateline 65 sourceSource comment
We do an exhaustive search to show that all results are covered by `SolutionPredicate`.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
And,Eq,HMul.hMul,OfNat.ofNat,LT.lt, Imo1960P1.ProblemPredicate, Imo1960P1.SolutionPredicate4 instances, coercions and auxiliary constants left out.
def SearchUpTo (c n : ℕ) : Prop := …
- theorem
Imo1960P1.searchUpTo_startline 68 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: Imo1960P1.SearchUpTo,
OfNat.ofNat,NatProof uses:
And.intro,Eq,HMul.hMul,LT.lt, Imo1960P1.ProblemPredicate, Imo1960P1.SolutionPredicate,rfl,False.elim,Mathlib.Tactic.Linarith.lt_irrefl,Int,Eq.mp,HAdd.hAdd,Neg.neg,HSub.hSub,congrArg,Mathlib.Tactic.Ring.of_eq,Mathlib.Tactic.Ring.Common.add_congr,Int.rawCast,inferInstance,Ringand 50 more68 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- theorem
Imo1960P1.searchUpTo_stepline 71 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo1960P1.SearchUpTo,Eq,HAdd.hAdd,OfNat.ofNat,List,Nat.digits, Imo1960P1.sumOfSquares,OrProof uses:
HMul.hMul,LT.lt, Imo1960P1.ProblemPredicate, Imo1960P1.SolutionPredicate,And.intro,Mathlib.Tactic.Ring.of_eq,Nat.rawCast,HPow.hPow,Mathlib.Tactic.Ring.Common.add_congr,Mathlib.Tactic.Ring.Common.mul_congr,Mathlib.Tactic.Ring.Common.atom_pf,rfl,Eq.mpr,id,congrArg,Eq.symm,Eq.refl,Mathlib.Tactic.Ring.cast_pos,Mathlib.Meta.NormNum.isNat_ofNat,Mathlib.Tactic.Ring.Common.add_muland 32 more44 instances, coercions and auxiliary constants left out.
Tactic trace: 17 steps
Open to load the checked before-and-after goal states.
- theorem
Imo1960P1.searchUpTo_endline 83 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo1960P1.SearchUpTo,OfNat.ofNat, Imo1960P1.ProblemPredicate, Imo1960P1.SolutionPredicateProof uses:
And.right,Eq,HMul.hMul,LT.lt,lt_of_not_ge,LE.le,Mathlib.Tactic.Linarith.lt_irrefl,Int,Eq.mp,HAdd.hAdd,Neg.neg,HSub.hSub,congrArg,Mathlib.Tactic.Ring.of_eq,Mathlib.Tactic.Ring.Common.add_congr,Nat.rawCast,Mathlib.Meta.NormNum.instAddMonoidWithOne,inferInstance,Ring,HPow.hPowand 50 more71 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- theorem
Imo1960P1.right_directionline 87 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo1960P1.ProblemPredicate, Imo1960P1.SolutionPredicateProof uses: Imo1960P1.SearchUpTo,
OfNat.ofNat, Imo1960P1.searchUpTo_start, Imo1960P1.searchUpTo_step,Eq.mpr,Eq,HAdd.hAdd,id,congrFun',congrArg,Mathlib.Meta.NormNum.IsNat.to_eq,Mathlib.Meta.NormNum.isNat_add,Eq.refl,Mathlib.Meta.NormNum.isNat_ofNat,Nat.digits,rfl,List, Imo1960P1.sumOfSquares,Or,Notand 32 more19 instances, coercions and auxiliary constants left out.
Tactic trace: 10 steps
Open to load the checked before-and-after goal states.
- theorem
Imo1960P1.left_directionNow we just need to prove the equivalence, for the precise problem statement line 98 sourceSource comment
Now we just need to prove the equivalence, for the precise problem statement.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo1960P1.SolutionPredicate, Imo1960P1.ProblemPredicateProof uses:
Eq,OfNat.ofNat,And.intro,List.length,Nat.digits,And,Dvd.dvd,HDiv.hDiv, Imo1960P1.sumOfSquares,of_eq_true,Eq.trans,True,congrFun',congrArg,List.cons,List.nil,HAdd.hAdd,List,HMod.hMod,Nat.digits_of_two_le_of_posand 21 more19 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
theorem left_direction (n : ℕ) (spn : SolutionPredicate n) : ProblemPredicate n := by …
Mentions: Imo1960P1.SolutionPredicate, Imo1960P1.ProblemPredicate
- problem
Imo1960P1.imo1960_p1line 103 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Iff, Imo1960P1.ProblemPredicate, Imo1960P1.SolutionPredicateProof uses:
Iff.intro, Imo1960P1.right_direction, Imo1960P1.left_direction