Compfiles/Usa2024P1.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
10 declarations, 0 contain sorry, 0 declared as axioms
USA Mathematical Olympiad 2024, Problem 1
Find all integers $n \geq 3$ such that the following property holds: if we list the divisors of $n!$ in increasing order as $1 = d_1 < d_2 < \cdots < d_k = n!$, then we have $d_2 - d_1 \leq d_3 - d_2 \leq \cdots \leq d_k - d_{k-1}$.
Imports (5)
Imported by 1 file
- def
Usa2024P1.GoodThe property required ofn: writing the divisors ofn !in increasing order as1 = d₁ < d₂ < ⋯ < dₖ = n !, the consecutive gaps are non-decreasing line 37 sourceSource documentation
The property required of
n: writing the divisors ofn !in increasing order as1 = d₁ < d₂ < ⋯ < dₖ = n !, the consecutive gaps are non-decreasing. We phrase this using consecutive triples: whenevera < b < care divisors ofn !such that no divisor ofn !lies strictly betweenaandb, or strictly betweenbandc, we haveb - a ≤ c - b. (Note: we writeNat.factorial ninstead ofn !since the!notation clashes withPiLp.vecNotationunder a fullMathlibimport.)standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
Membership.mem,Finset,Nat.divisors,Nat.factorial,LT.lt,Or,LE.le,HSub.hSub6 instances, coercions and auxiliary constants left out.
def Good (n : ℕ) : Prop := …
- determine
Usa2024P1.solution_setline 45 sourceno axioms what this means
Statement uses:
Set,NatProof uses:
Insert.insert,OfNat.ofNat,Singleton.singleton3 instances, coercions and auxiliary constants left out.
- lemma
Usa2024P1.mul_dvd_factorial_of_neIfaandbare distinct positive integers witha, b ≤ n, thena * b ∣ Nat.factorial n: both occur as distinct factors in `n ! line 72 sourceSource documentation
If
aandbare distinct positive integers witha, b ≤ n, thena * b ∣ Nat.factorial n: both occur as distinct factors inn ! = ∏ i ∈ Finset.range n, (i + 1).standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat,Ne,LE.le,Dvd.dvd,HMul.hMul,Nat.factorialProof uses:
Membership.mem,Finset,Finset.range,HSub.hSub,Iff.mpr,Finset.mem_range,Finset.erase,And,Finset.mem_erase,And.intro,Eq,HAdd.hAdd,Finset.prod,Finset.mul_prod_erase,Eq.mpr,id,congrArg,Eq.symm,Finset.prod_range_add_one_eq_factorial,Eq.mpand 20 more41 instances, coercions and auxiliary constants left out.
Tactic trace: 12 steps
Open to load the checked before-and-after goal states.
lemma mul_dvd_factorial_of_ne {a b n : ℕ} (ha : 0 < a) (hb : 0 < b) (hab : a ≠ b) (han : a ≤ n) (hbn : b ≤ n) : a * b ∣ Nat.factorial n := by … - lemma
Usa2024P1.good_threeThe divisors of `3 ! line 85 sourceSource documentation
The divisors of
3 ! = 6are1, 2, 3, 6, with gaps1, 1, 3.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: Usa2024P1.Good,
OfNat.ofNat,NatProof uses:
id,of_decide_eq_true,Membership.mem,Finset,Nat.divisors,Nat.factorial,LT.lt,Or,LE.le,HSub.hSub,Eq,Bool,Decidable.decide,Bool.true,Eq.refl14 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
lemma good_three : Good 3 := by …
Mentions: Usa2024P1.Good
- lemma
Usa2024P1.good_fourThe divisors of `4 ! line 91 sourceSource documentation
The divisors of
4 ! = 24are1, 2, 3, 4, 6, 8, 12, 24, with gaps1, 1, 1, 2, 2, 4, 12.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: Usa2024P1.Good,
OfNat.ofNat,NatProof uses:
id,of_decide_eq_true,Membership.mem,Finset,Nat.divisors,Nat.factorial,LT.lt,Or,LE.le,HSub.hSub,Eq,Bool,Decidable.decide,Bool.true,Eq.refl14 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
lemma good_four : Good 4 := by …
Mentions: Usa2024P1.Good
- lemma
Usa2024P1.not_good_fiven = 5fails:15, 20, 24are consecutive divisors of `5 ! line 97 sourceSource documentation
n = 5fails:15, 20, 24are consecutive divisors of5 ! = 120, but20 - 15 = 5 > 4 = 24 - 20.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Not, Usa2024P1.Good,OfNat.ofNat,NatProof uses:
LE.le,HSub.hSub,of_decide_eq_true,Membership.mem,Finset,Nat.divisors,Nat.factorial,id,Eq,Bool,Decidable.decide,Bool.true,Eq.refl,Mathlib.Meta.NormNum.isNat_lt_true,Mathlib.Meta.NormNum.isNat_ofNat,Bool.false,Or,False.elim,False,Eq.mpand 3 more20 instances, coercions and auxiliary constants left out.
Tactic trace: 11 steps
Open to load the checked before-and-after goal states.
lemma not_good_five : ¬ Good 5 := by …
Mentions: Usa2024P1.Good
- lemma
Usa2024P1.not_good_sixn = 6fails:90, 120, 144are consecutive divisors of `6 ! line 107 sourceSource documentation
n = 6fails:90, 120, 144are consecutive divisors of6 ! = 720, but120 - 90 = 30 > 24 = 144 - 120.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Not, Usa2024P1.Good,OfNat.ofNat,NatProof uses:
LE.le,HSub.hSub,of_decide_eq_true,Membership.mem,Finset,Nat.divisors,Nat.factorial,id,Eq,Bool,Decidable.decide,Bool.true,Eq.refl,Mathlib.Meta.NormNum.isNat_lt_true,Mathlib.Meta.NormNum.isNat_ofNat,Bool.false,Or,False.elim,False,Eq.mpand 3 more20 instances, coercions and auxiliary constants left out.
Tactic trace: 11 steps
Open to load the checked before-and-after goal states.
lemma not_good_six : ¬ Good 6 := by …
Mentions: Usa2024P1.Good
- lemma
Usa2024P1.not_good_of_seven_leDocumented declaration: not_good_of_seven_le line 117 sourceSource documentation
Every
nwith7 ≤ n ≤ 12fails:12, 14, 15are consecutive divisors ofn !(there is no divisor strictly between12and14since13 ∤ n !), but14 - 12 = 2 > 1 = 15 - 14.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Not, Usa2024P1.GoodProof uses:
Dvd.dvd,Nat.factorial,Nat.factorial_dvd_factorial,Dvd.dvd.trans,of_decide_eq_true,id,Eq,Bool,Decidable.decide,Bool.true,Eq.refl,Eq.mpr,congrArg,propext,Nat.Prime.dvd_factorial,Mathlib.Meta.NormNum.isNat_prime_2,Mathlib.Meta.NormNum.isNat_ofNat,Mathlib.Meta.NormNum.isNat_minFac_4,Mathlib.Meta.NormNum.IsNat.raw_refl,Mathlib.Meta.NormNum.minFacHelper_3and 28 more29 instances, coercions and auxiliary constants left out.
Tactic trace: 34 steps
Open to load the checked before-and-after goal states.
lemma not_good_of_seven_le {n : ℕ} (h7 : 7 ≤ n) (hn12 : n ≤ 12) : ¬ Good n := by …Mentions: Usa2024P1.Good
- lemma
Usa2024P1.not_good_of_thirteen_leEveryn ≥ 13fails line 147 sourceSource documentation
Every
n ≥ 13fails. Withm = ⌊n / 2⌋ ≥ 6, bothm² - 1andm²dividen !, hence are consecutive divisors ofn !with gap1. A downward induction usingGood nthen shows that every integer in[1, m²]dividesn !, which contradicts Bertrand's postulate: there is a primepwithn < p ≤ 2n ≤ m².standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Not, Usa2024P1.GoodProof uses:
And,HMul.hMul,HAdd.hAdd,Exists,False,Exists.intro,HDiv.hDiv,HPow.hPow,Eq,HSub.hSub,le_of_not_gt,LT.lt,Mathlib.Tactic.Linarith.lt_irrefl,Int,Eq.mp,Neg.neg,congrArg,Mathlib.Tactic.Ring.of_eq,Mathlib.Tactic.Ring.Common.add_congr,Int.rawCastand 114 more133 instances, coercions and auxiliary constants left out.
Tactic trace: 96 steps
Open to load the checked before-and-after goal states.
lemma not_good_of_thirteen_le {n : ℕ} (hn : 13 ≤ n) : ¬ Good n := by …Mentions: Usa2024P1.Good
- problem
Usa2024P1.usa2024_p1line 225 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Iff,Membership.mem,Set, Usa2024P1.solution_set, Usa2024P1.GoodProof uses:
Iff.intro,Or,Eq,Eq.mp,Eq.trans,Insert.insert,Singleton.singleton,congrArg, Usa2024P1.good_three,Eq.symm, Usa2024P1.good_four,Eq.mpr,id,And,Or.inl,rfl,Or.inr,absurd, Usa2024P1.not_good_five, Usa2024P1.not_good_six and 2 more14 instances, coercions and auxiliary constants left out.
Tactic trace: 28 steps
Open to load the checked before-and-after goal states.