Compfiles/Imo1978P3.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
15 declarations, 0 contain sorry, 0 declared as axioms
International Mathematical Olympiad 1978, Problem 3
The set of all positive integers is the union of two disjoint subsets {f(1), f(2), ..., f(n), ...} and {g(1), g(2), ..., g(n), ...}, where
f(1) < f(2) < ... < f(n) < ..., g(1) < g(2) < ... < g(n) < ...,
and g(n) = f(f(n)) + 1 for all n ≥ 1.
Determine f(240).
Imports (2)
Imported by 1 file
- determine
Imo1978P3.solutionline 33 sourceno axioms what this means
Statement uses:
NatProof uses:
OfNat.ofNat1 instances, coercions and auxiliary constants left out.
- def
Imo1978P3.aThe lower Wythoff sequence⌊n·φ⌋, which is the functionfin the problem line 52 sourceSource documentation
The lower Wythoff sequence
⌊n·φ⌋, which is the functionfin the problem.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
Int.toNat,Int.floor,Real,HMul.hMul,Real.goldenRatio7 instances, coercions and auxiliary constants left out.
noncomputable def a (n : ℕ) : ℕ := (⌊(n : ℝ) * φ⌋).toNat
- lemma
Imo1978P3.a_eqline 54 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,Int, Imo1978P3.a,Int.floor,Real,HMul.hMul,Real.goldenRatioProof uses:
id,Eq.mpr,Int.toNat,congrArg,Int.toNat_of_nonneg,Iff.mpr,LE.le,OfNat.ofNat,Int.floor_nonneg,mul_nonneg,Nat.cast_nonneg',le_of_lt,div_pos,HAdd.hAdd,Real.sqrt,add_pos',Mathlib.Meta.Positivity.pos_of_isNat,Mathlib.Meta.NormNum.isNat_ofNat,Nat.cast_one,Eq.refland 6 more61 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- lemma
Imo1978P3.a_add_eqa n + n = ⌊n·φ²⌋, usingφ² = φ + 1line 60 sourceSource documentation
a n + n = ⌊n·φ²⌋, usingφ² = φ + 1.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,Int,HAdd.hAdd, Imo1978P3.a,Int.floor,Real,HMul.hMul,HPow.hPow,Real.goldenRatio,OfNat.ofNatProof uses:
Eq.mpr,id,congrArg, Imo1978P3.a_eq,Real.goldenRatio_sq,Mathlib.Tactic.Ring.of_eq,Nat.rawCast,NNRat.rawCast,Real.sqrt,Mathlib.Tactic.Ring.Common.mul_congr,Mathlib.Tactic.Ring.Common.atom_pf,rfl,Eq.symm,Eq.refl,Mathlib.Tactic.Ring.Common.add_congr,Mathlib.Tactic.Ring.Common.div_congr,Mathlib.Tactic.Ring.cast_pos,Mathlib.Meta.NormNum.isNat_ofNat,Nat.cast_one,Mathlib.Tactic.Ring.Common.add_pf_add_ltand 24 more67 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
lemma a_add_eq (n : ℕ) : ((a n : ℤ) + n) = ⌊(n : ℝ) * φ ^ 2⌋ := by …
Mentions: Imo1978P3.a
- lemma
Imo1978P3.beattySeq_aline 65 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,Int,beattySeq,Real.goldenRatio, Imo1978P3.aProof uses:
Eq.mpr,Int.floor,Real,HMul.hMul,id,congrArg, Imo1978P3.a_eq,beattySeq.eq_1,congrFun',Int.cast_natCast,Eq.refl15 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- lemma
Imo1978P3.beattySeq_a_addline 68 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,Int,beattySeq,HPow.hPow,Real,Real.goldenRatio,OfNat.ofNat,HAdd.hAdd, Imo1978P3.aProof uses:
Eq.mpr,Int.floor,HMul.hMul,id,congrArg, Imo1978P3.a_add_eq,beattySeq.eq_1,congrFun',Int.cast_natCast,Eq.refl29 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- lemma
Imo1978P3.holderConjline 71 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real.HolderConjugate,Real.goldenRatio,HPow.hPow,Real,Nat,OfNat.ofNatProof uses:
Real.HolderTriple.mk,Eq.mpr,Eq,HAdd.hAdd,Inv.inv,id,congrArg,inv_one,Eq.symm,inv_pow,Neg.neg,Real.goldenConj,Real.inv_goldenRatio,neg_sq,Real.goldenConj_sq,Mathlib.Tactic.Ring.of_eq,Nat.rawCast,Mathlib.Meta.NormNum.instAddMonoidWithOne,Mathlib.Tactic.Ring.Common.add_congr,Rat.rawCastand 72 more99 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- lemma
Imo1978P3.a_posline 76 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat, Imo1978P3.aProof uses:
LE.le,Real,cast,Eq.symm,Eq.trans,congrFun',congrArg,Nat.cast_one,HMul.hMul,Real.goldenRatio,Trans.trans,Eq,Real.one_lt_goldenRatio,one_mul,mul_le_mul_of_nonneg_right,le_of_lt,div_pos,HAdd.hAdd,Real.sqrt,add_pos'and 82 more109 instances, coercions and auxiliary constants left out.
Tactic trace: 11 steps
Open to load the checked before-and-after goal states.
- lemma
Imo1978P3.a_strictMonoline 87 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
StrictMono,Nat, Imo1978P3.aProof uses:
strictMono_nat_of_lt_succ,LE.le,Int,HAdd.hAdd,OfNat.ofNat,Eq.mpr,Int.floor,Real,HMul.hMul,Real.goldenRatio,id,Eq,congrArg, Imo1978P3.a_eq,LT.lt,Real.one_lt_goldenRatio,le_of_not_gt,Mathlib.Tactic.Linarith.lt_irrefl,Eq.mp,HSub.hSuband 75 more86 instances, coercions and auxiliary constants left out.
Tactic trace: 16 steps
Open to load the checked before-and-after goal states.
- lemma
Imo1978P3.a_monoline 102 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le, Imo1978P3.aProof uses:
StrictMono.monotone, Imo1978P3.a_strictMono4 instances, coercions and auxiliary constants left out.
- lemma
Imo1978P3.ha_coverEvery positive integer isa kora k + kfor somek ≥ 1line 105 sourceSource documentation
Every positive integer is
a kora k + kfor somek ≥ 1.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat,Or,Exists,And,Eq, Imo1978P3.a,HAdd.hAddProof uses:
Int,cast,Eq.symm,Eq.trans,congrFun',congrArg,Nat.cast_zero,Set,symmDiff,Set.ofPred,GT.gt,beattySeq,Real.goldenRatio,HPow.hPow,Real,Irrational.beattySeq_symmDiff_beattySeq_pos, Imo1978P3.holderConj,Real.goldenRatio_irrational,Membership.mem,Notand 13 more52 instances, coercions and auxiliary constants left out.
Tactic trace: 31 steps
Open to load the checked before-and-after goal states.
lemma ha_cover (m : ℕ) (hm : 0 < m) : (∃ k, 0 < k ∧ a k = m) ∨ (∃ k, 0 < k ∧ a k + k = m) := by …Mentions: Imo1978P3.a
- lemma
Imo1978P3.ha_disjThe two sequencesa kanda k + kare disjoint line 129 sourceSource documentation
The two sequences
a kanda k + kare disjoint.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat,Ne, Imo1978P3.a,HAdd.hAddProof uses:
Eq,Int, Imo1978P3.a_pos,cast,Eq.symm,Eq.trans,congrFun',congrArg,Nat.cast_zero,Eq.mpr,id,Nat.cast_add,Mathlib.Tactic.Ring.of_eq,HMul.hMul,HPow.hPow,Nat.rawCast,Mathlib.Tactic.Ring.Common.add_congr,Mathlib.Tactic.Ring.Common.atom_pf,rfl,Eq.refland 25 more62 instances, coercions and auxiliary constants left out.
Tactic trace: 20 steps
Open to load the checked before-and-after goal states.
lemma ha_disj (j k : ℕ) (hj : 0 < j) (hk : 0 < k) : a j ≠ a k + k := by …
Mentions: Imo1978P3.a
- lemma
Imo1978P3.a_240line 140 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat, Imo1978P3.a,OfNat.ofNatProof uses:
Real,HPow.hPow,Real.sqrt,Real.sq_sqrt,Mathlib.Meta.NormNum.isNat_le_true,Mathlib.Meta.NormNum.isNat_ofNat,Nat.cast_zero,Eq.refl,Mathlib.Meta.NormNum.instAtLeastTwo,Bool,Bool.true,LE.le,Real.sqrt_nonneg,Real.goldenRatio,HDiv.hDiv,HAdd.hAdd,rfl,HMul.hMul,Eq.mpr,idand 105 more116 instances, coercions and auxiliary constants left out.
Tactic trace: 22 steps
Open to load the checked before-and-after goal states.
- lemma
Imo1978P3.wythoff_uniqueA strictly increasing positive sequenceFis uniquely determined by the property that{F k}and{F k + k}partition the positive integers line 158 sourceSource documentation
A strictly increasing positive sequence
Fis uniquely determined by the property that{F k}and{F k + k}partition the positive integers. We state this as: any two such sequencesFandAagree. The key fact is thatF nis the least positive integer not among{F k, F k + k : k < n}.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat,Or,Exists,And,Eq,HAdd.hAdd,NeProof uses:
LE.le,Decidable.byContradiction,Not,False,eq_or_lt_of_le,Eq.mp,lt_irrefl,congrArg,absurd,LT.lt.not_gt,Or.inl,Exists.intro,And.intro,Eq.mpr,id,Or.inr,ne_of_lt,Eq.symm,Nat.strong_induction_on25 instances, coercions and auxiliary constants left out.
Tactic trace: 36 steps
Open to load the checked before-and-after goal states.
lemma wythoff_unique (F A : ℕ → ℕ) (hFmono : ∀ p q, 0 < p → p < q → F p < F q) (hAmono : ∀ p q, 0 < p → p < q → A p < A q) (hFpos : ∀ k, 0 < k → 0 < F k) (hApos : ∀ k, 0 < k → 0 < A k) (coverF : ∀ m, 0 < m → (∃ k, 0 < k ∧ F k = m) ∨ (∃ k, 0 < k ∧ F k + k = m)) (coverA : ∀ m, 0 < m → (∃ k, 0 < k ∧ A k = m) ∨ (∃ k, 0 < k ∧ A k + k = m)) (disjF : ∀ p q, 0 < p → 0 < q → F p ≠ F q + q) (disjA : ∀ p q, 0 < p → 0 < q → A p ≠ A q + q) : ∀ n, 0 < n → F n = A n := by … - problem
Imo1978P3.imo1978_p3line 208 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat,Ne,Or,Exists,And,Eq,HAdd.hAdd, Imo1978P3.solutionProof uses:
Set.InjOn,Finset,Finset.Icc,Membership.mem,Set,lt_trichotomy,absurd,ne_of_lt,Eq.mp,LE.le,Eq.trans,Set.Icc,congrFun',congrArg,Finset.coe_Icc,Eq.symm,eq_or_lt_of_le,Eq.mpr,id,le_refland 40 more48 instances, coercions and auxiliary constants left out.
Tactic trace: 118 steps
Open to load the checked before-and-after goal states.