Compfiles/Imo1981P3.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
19 declarations, 0 contain sorry, 0 declared as axioms
International Mathematical Olympiad 1981, Problem 3
Determine the maximum value of m ^ 2 + n ^ 2, where m and n are integers in
{1, 2, ..., 1981} and (n ^ 2 - m * n - m ^ 2) ^ 2 = 1.
Imports (5)
Imported by 1 file
- structure
Imo1981P3.ProblemPredicateN = 1981 line 41 sourceSource comment
N = 1981standard axioms: propext what this means
Statement uses:
Nat,Intstructure ProblemPredicate (m n : ℤ) : Prop where …
- def
Imo1981P3.specifiedSetline 46 sourcestandard axioms: propext what this means
Statement uses:
Nat,Set,IntProof uses:
Set.ofPred,Exists,And,Eq,HAdd.hAdd,HPow.hPow,OfNat.ofNat, Imo1981P3.ProblemPredicate7 instances, coercions and auxiliary constants left out.
- theorem
Imo1981P3.ProblemPredicate.m_le_nline 65 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Int, Imo1981P3.ProblemPredicate,LE.leProof uses:
Decidable.byContradiction,Not,Eq,OfNat.ofNat,HPow.hPow,HSub.hSub,HMul.hMul,Mathlib.Tactic.LinearCombination.eq_of_eq,HAdd.hAdd,Eq.symm,Imo1981P3.ProblemPredicate.eq_one,Mathlib.Tactic.LinearCombination.eq_rearrange,Mathlib.Tactic.Ring.of_eq,Mathlib.Tactic.Ring.Common.sub_congr,Nat.rawCast,Int.rawCast,inferInstance,Ring,Int.negOfNat,Mathlib.Tactic.Ring.Common.add_congrand 79 more92 instances, coercions and auxiliary constants left out.
Tactic trace: 8 steps
Open to load the checked before-and-after goal states.
- theorem
Imo1981P3.ProblemPredicate.eq_imp_1line 72 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Int, Imo1981P3.ProblemPredicate,Eq,OfNat.ofNatProof uses:
HMul.hMul,Mathlib.Tactic.LinearCombination.eq_of_eq,HPow.hPow,HSub.hSub,HAdd.hAdd,Imo1981P3.ProblemPredicate.eq_one,Mathlib.Tactic.LinearCombination.eq_rearrange,Mathlib.Tactic.Ring.of_eq,Mathlib.Tactic.Ring.Common.sub_congr,Nat.rawCast,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.Common.add_muland 52 more64 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- theorem
Imo1981P3.ProblemPredicate.reductionline 76 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Int, Imo1981P3.ProblemPredicate,LT.lt,OfNat.ofNat,HSub.hSubProof uses:
Eq,Or,LE.le.eq_or_lt, Imo1981P3.ProblemPredicate.m_le_n, Imo1981P3.ProblemPredicate.eq_imp_1,absurd,Eq.symm,LT.lt.ne,Imo1981P3.ProblemPredicate.mk,Iff.mpr,sub_pos,HAdd.hAdd,Trans.trans,LE.le,sub_lt_self,And.left,Imo1981P3.ProblemPredicate.m_range,And.right,Imo1981P3.ProblemPredicate.n_range,And.introand 69 more84 instances, coercions and auxiliary constants left out.
Tactic trace: 10 steps
Open to load the checked before-and-after goal states.
- def
Imo1981P3.NatPredicateIt will be convenient to have the lemmas above in their natural number form line 98 sourceSource comment
It will be convenient to have the lemmas above in their natural number form. Most of these can be proved with the `norm_cast` family of tactics.standard axioms: propext what this means
Statement uses:
NatProof uses: Imo1981P3.ProblemPredicate,
Int2 instances, coercions and auxiliary constants left out.
def NatPredicate (m n : ℕ) : Prop := …
- theorem
Imo1981P3.NatPredicate.m_le_nline 105 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo1981P3.NatPredicate,LE.leProof uses:
cast,Int, Imo1981P3.ProblemPredicate.m_le_n15 instances, coercions and auxiliary constants left out.
- theorem
Imo1981P3.NatPredicate.eq_imp_1line 107 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo1981P3.NatPredicate,Eq,OfNat.ofNatProof uses:
cast,Int,Eq.trans,congrArg,Eq.symm,Nat.cast_one, Imo1981P3.ProblemPredicate.eq_imp_113 instances, coercions and auxiliary constants left out.
- theorem
Imo1981P3.NatPredicate.reductionline 109 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo1981P3.NatPredicate,LT.lt,OfNat.ofNat,HSub.hSubProof uses:
LE.le, Imo1981P3.NatPredicate.m_le_n,cast, Imo1981P3.ProblemPredicate,Int,congrFun',congrArg, Imo1981P3.ProblemPredicate.reduction,Eq.symm,Eq.trans,Nat.cast_one26 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- theorem
Imo1981P3.NatPredicate.n_posline 114 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo1981P3.NatPredicate,LT.lt,OfNat.ofNatProof uses:
cast,Int,Eq.trans,congrFun',congrArg,Eq.symm,Nat.cast_zero,And.left,LE.le,Imo1981P3.ProblemPredicate.n_range24 instances, coercions and auxiliary constants left out.
- theorem
Imo1981P3.NatPredicate.m_posline 116 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo1981P3.NatPredicate,LT.lt,OfNat.ofNatProof uses:
cast,Int,Eq.trans,congrFun',congrArg,Eq.symm,Nat.cast_zero,And.left,LE.le,Imo1981P3.ProblemPredicate.m_range24 instances, coercions and auxiliary constants left out.
- theorem
Imo1981P3.NatPredicate.n_le_Nline 118 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo1981P3.NatPredicate,LE.leProof uses:
cast,Int,And.right,LT.lt,OfNat.ofNat,Imo1981P3.ProblemPredicate.n_range18 instances, coercions and auxiliary constants left out.
- theorem
Imo1981P3.NatPredicate.imp_fibNow we can use induction to show that solutions must be Fibonacci numbers line 123 sourceSource comment
Now we can use induction to show that solutions must be Fibonacci numbers.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo1981P3.NatPredicate,Exists,And,Eq,Nat.fib,HAdd.hAdd,OfNat.ofNatProof uses:
Nat.strong_induction_on,LT.lt,LE.le, Imo1981P3.NatPredicate.m_le_n,Nat.succ,Or,LE.le.eq_or_lt,Iff.mpr,Nat.succ_le_iff, Imo1981P3.NatPredicate.n_pos,Exists.intro, Imo1981P3.NatPredicate.m_pos,Eq.mpr,id,Eq.trans,True,congrArg,of_decide_eq_true,Bool,Decidable.decideand 15 more29 instances, coercions and auxiliary constants left out.
Tactic trace: 18 steps
Open to load the checked before-and-after goal states.
theorem imp_fib {n : ℕ} : ∀ m : ℕ, NatPredicate N m n → ∃ k : ℕ, m = fib k ∧ n = fib (k + 1) := by …Mentions: Imo1981P3.NatPredicate
- theorem
Imo1981P3.m_n_boundsline 147 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,HAdd.hAdd,Nat.fib,OfNat.ofNat, Imo1981P3.NatPredicate,And,LE.leProof uses:
Eq,Exists, Imo1981P3.NatPredicate.imp_fib,dite,Iff.mp,Nat.succ,Nat.lt_succ_iff,And.intro,Trans.trans,Nat.fib_mono,Nat.succ_le_succ,Not,not_lt,Eq.mp,congrArg,Eq.symm,Nat.fib_add_two, Imo1981P3.NatPredicate.n_le_N,absurd,LE.le.not_gt22 instances, coercions and auxiliary constants left out.
Tactic trace: 17 steps
Open to load the checked before-and-after goal states.
- theorem
Imo1981P3.k_boundline 175 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,HAdd.hAdd,Nat.fib,OfNat.ofNat,Eq,HPow.hPow,Int, Imo1981P3.ProblemPredicate,LE.leProof uses:
LT.lt.le,And.left,Imo1981P3.ProblemPredicate.m_range,Imo1981P3.ProblemPredicate.n_range,Int.natAbs,And, Imo1981P3.m_n_bounds,Eq.mp,congrArg,Eq.symm,Int.natAbs_of_nonneg,Iff.mp,Int.natAbs_le_iff_sq_le,le_of_not_gt,Mathlib.Tactic.Linarith.lt_irrefl,Neg.neg,HSub.hSub,Mathlib.Tactic.Ring.of_eq,Mathlib.Tactic.Ring.Common.add_congr,Int.rawCastand 61 more83 instances, coercions and auxiliary constants left out.
Tactic trace: 8 steps
Open to load the checked before-and-after goal states.
- theorem
Imo1981P3.solution_boundline 185 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,HAdd.hAdd,Nat.fib,OfNat.ofNat,Eq,HPow.hPow,Int,Membership.mem,Set, Imo1981P3.specifiedSet,LE.leProof uses: Imo1981P3.ProblemPredicate, Imo1981P3.k_bound
25 instances, coercions and auxiliary constants left out.
- theorem
Imo1981P3.solution_greatestline 189 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,HAdd.hAdd,Nat.fib,OfNat.ofNat,Eq,HPow.hPow, Imo1981P3.ProblemPredicate,Int,IsGreatest, Imo1981P3.specifiedSetProof uses:
And.intro,Membership.mem,Set,upperBounds,Exists.intro,Exists,And,of_eq_true,Eq.trans,True,congrFun',congrArg,Nat.cast_add,congr,Nat.cast_pow,eq_self, Imo1981P3.solution_bound37 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- determine
Imo1981P3.solutionline 200 sourceno axioms what this means
Statement uses:
NatProof uses:
OfNat.ofNat1 instances, coercions and auxiliary constants left out.
- problem
Imo1981P3.imo1981_p3line 202 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
IsGreatest,Int, Imo1981P3.specifiedSet,OfNat.ofNat,Nat, Imo1981P3.solutionProof uses:
LT.lt,HAdd.hAdd,Nat.fib,Eq,HPow.hPow, Imo1981P3.ProblemPredicate, Imo1981P3.solution_greatest,Eq.mp,implies_congr,congrArg,Mathlib.Meta.NormNum.IsNat.to_eq,Mathlib.Meta.NormNum.isNat_add,Eq.refl,Mathlib.Meta.NormNum.isNat_ofNat,congr,congrFun',Mathlib.Meta.NormNum.isNat_natCast,of_decide_eq_true,id,Booland 18 more76 instances, coercions and auxiliary constants left out.
Tactic trace: 10 steps
Open to load the checked before-and-after goal states.