Compfiles/Imo2016P5.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
17 declarations, 0 contain sorry, 0 declared as axioms
International Mathematical Olympiad 2016, Problem 5
The equation
(x - 1)(x - 2) ... (x - 2016) = (x - 1)(x - 2) ... (x - 2016)
is written on the board. What is the least possible value of k for which it is possible to erase exactly k of these 4032 factors such that at least one factor remains on each side and the resulting equation has no real solutions?
Imports (5)
Imported by 1 file
- lemma
Imo2016P5.lemma1line 36 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
DecidableEq,Finset,DecidablePred,Eq,Nat,HAdd.hAdd,Finset.card,SDiff.sdiff,Finset.filterProof uses:
Finset.card_sdiff_add_card_eq_card,Finset.filter_subset3 instances, coercions and auxiliary constants left out.
- lemma
Imo2016P5.u_neg_iffline 44 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,Nat,Iff,LT.lt,HMul.hMul,HSub.hSub,HAdd.hAdd,OfNat.ofNat,AndProof uses:
Eq.mpr,Or,id,Eq,congrArg,propext,mul_neg_iff,Iff.intro,And.intro,lt_of_not_ge,LE.le,Mathlib.Tactic.Linarith.lt_irrefl,Eq.mp,Mathlib.Tactic.Ring.of_eq,Mathlib.Tactic.Ring.Common.add_congr,Nat.rawCast,Mathlib.Meta.NormNum.instAddMonoidWithOne,inferInstance,Ring,HPow.hPowand 57 more101 instances, coercions and auxiliary constants left out.
Tactic trace: 16 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2016P5.v_neg_iffline 55 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,Nat,Iff,LT.lt,HMul.hMul,HSub.hSub,HAdd.hAdd,OfNat.ofNat,AndProof uses:
Eq.mpr,Or,id,Eq,congrArg,propext,mul_neg_iff,Iff.intro,And.intro,lt_of_not_ge,LE.le,Mathlib.Tactic.Linarith.lt_irrefl,Eq.mp,Mathlib.Tactic.Ring.of_eq,Mathlib.Tactic.Ring.Common.add_congr,Nat.rawCast,Mathlib.Meta.NormNum.instAddMonoidWithOne,inferInstance,Ring,HPow.hPowand 52 more93 instances, coercions and auxiliary constants left out.
Tactic trace: 16 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2016P5.prod_P_fstline 66 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,Eq,Finset.prod,Nat,Finset.range,OfNat.ofNat,HSub.hSub,HAdd.hAdd,HMul.hMulProof uses:
rfl,Eq.mpr,id,congrArg,Finset.prod_range_succ',of_eq_true,Eq.trans,True,congrFun',Mathlib.Meta.NormNum.IsNat.to_eq,Mathlib.Meta.NormNum.isNat_add,Eq.refl,Mathlib.Meta.NormNum.isNat_mul,Mathlib.Meta.NormNum.isNat_ofNat,Mathlib.Meta.NormNum.instAtLeastTwo,Mathlib.Meta.NormNum.isNat_natCast,Nat.cast_one,eq_self,eq_true,True.introand 40 more76 instances, coercions and auxiliary constants left out.
Tactic trace: 8 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2016P5.prod_P_sndline 77 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,Eq,Finset.prod,Nat,Finset.range,OfNat.ofNat,HSub.hSub,HAdd.hAdd,HMul.hMulProof uses:
rfl,Eq.mpr,id,congrArg,Finset.prod_range_succ,HMul,Eq.rec,Eq.refl,of_eq_true,Eq.trans,True,Mathlib.Meta.NormNum.instAtLeastTwo,congrFun',Mathlib.Meta.NormNum.IsNat.to_eq,Mathlib.Meta.NormNum.isNat_add,Mathlib.Meta.NormNum.isNat_mul,Mathlib.Meta.NormNum.isNat_ofNat,Mathlib.Meta.NormNum.isNat_natCast,eq_self,eq_trueand 1 more42 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2016P5.prod_Q_fstline 85 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,Eq,Finset.prod,Nat,Finset.range,OfNat.ofNat,HSub.hSub,HAdd.hAdd,HMul.hMulProof uses:
rfl,Eq.mpr,id,congrArg,Finset.prod_range_succ',of_eq_true,Eq.trans,True,Mathlib.Meta.NormNum.instAtLeastTwo,congrFun',Mathlib.Meta.NormNum.IsNat.to_eq,Mathlib.Meta.NormNum.isNat_add,Eq.refl,Mathlib.Meta.NormNum.isNat_mul,Mathlib.Meta.NormNum.isNat_ofNat,Mathlib.Meta.NormNum.isNat_natCast,eq_self,eq_true,True.intro,Finset.prod_congrand 40 more73 instances, coercions and auxiliary constants left out.
Tactic trace: 8 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2016P5.prod_Q_sndline 96 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,Eq,Finset.prod,Nat,Finset.range,OfNat.ofNat,HSub.hSub,HAdd.hAdd,HMul.hMulProof uses:
rfl,Eq.mpr,id,congrArg,Finset.prod_range_succ,HMul,Eq.rec,Eq.refl,of_eq_true,Eq.trans,True,Mathlib.Meta.NormNum.instAtLeastTwo,congrFun',Mathlib.Meta.NormNum.IsNat.to_eq,Mathlib.Meta.NormNum.isNat_add,Mathlib.Meta.NormNum.isNat_mul,Mathlib.Meta.NormNum.isNat_ofNat,Mathlib.Meta.NormNum.isNat_natCast,eq_self,eq_trueand 1 more42 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2016P5.prod_repair_PRe-pairing of the left-hand product: isolate1and2016, and group the remaining factors into pairs(4j+4, 4j+5)line 106 sourceSource documentation
Re-pairing of the left-hand product: isolate
1and2016, and group the remaining factors into pairs(4j+4, 4j+5).standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,Eq,Finset.prod,Nat,Finset.range,OfNat.ofNat,HMul.hMul,HSub.hSub,HAdd.hAddProof uses:
Finset.prod_mul_distrib,Eq.mpr,id,congrArg, Imo2016P5.prod_P_fst, Imo2016P5.prod_P_snd,Mathlib.Tactic.Ring.of_eq,HPow.hPow,Nat.rawCast,Int.rawCast,inferInstance,Ring,Int.negOfNat,Mathlib.Meta.NormNum.instAddMonoidWithOne,Mathlib.Tactic.Ring.Common.mul_congr,Mathlib.Tactic.Ring.Common.sub_congr,Mathlib.Tactic.Ring.Common.atom_pf,rfl,Eq.symm,Eq.refland 34 more63 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
lemma prod_repair_P (x : ℝ) : (∏ k ∈ Finset.range 504, ((x - (4 * (k : ℝ) + 1)) * (x - (4 * (k : ℝ) + 4)))) = (x - 1) * (x - 2016) * ∏ j ∈ Finset.range 503, ((x - (4 * (j : ℝ) + 4)) * (x - (4 * (j : ℝ) + 5))) := by … - lemma
Imo2016P5.prod_repair_QRe-pairing of the right-hand product: isolate2and2015, and group the remaining factors into pairs(4j+3, 4j+6)line 119 sourceSource documentation
Re-pairing of the right-hand product: isolate
2and2015, and group the remaining factors into pairs(4j+3, 4j+6).standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,Eq,Finset.prod,Nat,Finset.range,OfNat.ofNat,HMul.hMul,HSub.hSub,HAdd.hAddProof uses:
Finset.prod_mul_distrib,Eq.mpr,id,congrArg, Imo2016P5.prod_Q_fst, Imo2016P5.prod_Q_snd,Mathlib.Tactic.Ring.of_eq,HPow.hPow,Nat.rawCast,Int.rawCast,inferInstance,Ring,Int.negOfNat,Mathlib.Meta.NormNum.instAddMonoidWithOne,Mathlib.Tactic.Ring.Common.mul_congr,Mathlib.Tactic.Ring.Common.sub_congr,Mathlib.Tactic.Ring.Common.atom_pf,rfl,Eq.symm,Eq.refland 33 more59 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
lemma prod_repair_Q (x : ℝ) : (∏ k ∈ Finset.range 504, ((x - (4 * (k : ℝ) + 2)) * (x - (4 * (k : ℝ) + 3)))) = (x - 2) * (x - 2015) * ∏ j ∈ Finset.range 503, ((x - (4 * (j : ℝ) + 3)) * (x - (4 * (j : ℝ) + 6))) := by … - lemma
Imo2016P5.keyThe two products remaining on the board never take the same real value: the left one is always strictly smaller than the right one line 132 sourceSource documentation
The two products remaining on the board never take the same real value: the left one is always strictly smaller than the right one.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,Ne,Finset.prod,Nat,Finset.range,OfNat.ofNat,HMul.hMul,HSub.hSub,HAdd.hAddProof uses:
Eq,Mathlib.Tactic.Ring.of_eq,Nat.rawCast,Mathlib.Meta.NormNum.instAddMonoidWithOne,inferInstance,Ring,HPow.hPow,Int.rawCast,Int.negOfNat,Mathlib.Tactic.Ring.Common.mul_congr,Mathlib.Tactic.Ring.Common.sub_congr,Mathlib.Tactic.Ring.Common.atom_pf,rfl,Eq.mpr,id,congrArg,Eq.symm,Eq.refl,Mathlib.Tactic.Ring.Common.add_congr,Mathlib.Tactic.Ring.cast_posand 121 more177 instances, coercions and auxiliary constants left out.
Tactic trace: 277 steps (first 200 of 277)
Open to load the checked before-and-after goal states.
lemma key (x : ℝ) : (∏ k ∈ Finset.range 504, ((x - (4 * (k : ℝ) + 1)) * (x - (4 * (k : ℝ) + 4)))) ≠ (∏ k ∈ Finset.range 504, ((x - (4 * (k : ℝ) + 2)) * (x - (4 * (k : ℝ) + 3)))) := by … - lemma
Imo2016P5.setLline 348 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Finset,Nat,SDiff.sdiff,Finset.Icc,OfNat.ofNat,Finset.filter,Or,HMod.hMod,Union.union,Finset.image,HAdd.hAdd,HMul.hMul,Finset.rangeProof uses:
Finset.ext,Eq.mpr,Iff,Membership.mem,And,LE.le,Not,Exists,LT.lt,id,congr,congrArg,Eq.trans,congrFun',funext,Iff.intro,Or.inr,Exists.intro,HSub.hSub,HDiv.hDivand 2 more53 instances, coercions and auxiliary constants left out.
Tactic trace: 28 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2016P5.setRline 366 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Finset,Nat,SDiff.sdiff,Finset.Icc,OfNat.ofNat,Finset.filter,Or,HMod.hMod,Union.union,Finset.image,HAdd.hAdd,HMul.hMul,Finset.rangeProof uses:
Finset.ext,Eq.mpr,Iff,Membership.mem,And,LE.le,Not,Exists,LT.lt,id,congr,congrArg,Eq.trans,congrFun',funext,Iff.intro,Or.inl,Exists.intro,HDiv.hDiv,Or.inrand 1 more51 instances, coercions and auxiliary constants left out.
Tactic trace: 28 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2016P5.disjLline 384 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Disjoint,Finset,Nat,Finset.image,HAdd.hAdd,HMul.hMul,OfNat.ofNat,Finset.rangeProof uses:
Eq.mpr,Membership.mem,Not,id,Eq,congrArg,propext,Finset.disjoint_left,And,LT.lt,Exists,False,Eq.mp,Eq.trans,funext,congrFun'24 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2016P5.disjRline 393 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Disjoint,Finset,Nat,Finset.image,HAdd.hAdd,HMul.hMul,OfNat.ofNat,Finset.rangeProof uses:
Eq.mpr,Membership.mem,Not,id,Eq,congrArg,propext,Finset.disjoint_left,And,LT.lt,Exists,False,Eq.mp,Eq.trans,funext,congrFun'24 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2016P5.prod_erase_auxAfter erasing the factors indexed byn % 4 = 2, 3on the left and byn % 4 = 0, 1on the right, the resulting equation has no real solution line 404 sourceSource documentation
After erasing the factors indexed by
n % 4 = 2, 3on the left and byn % 4 = 0, 1on the right, the resulting equation has no real solution.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,Ne,Finset.prod,Nat,SDiff.sdiff,Finset,Finset.Icc,OfNat.ofNat,Finset.filter,Or,Eq,HMod.hMod,HSub.hSubProof uses:
Finset.range,HMul.hMul,HAdd.hAdd,Eq.mpr,Union.union,Finset.image,id,congrArg, Imo2016P5.setL,Finset.prod_union, Imo2016P5.disjL,Finset.prod_image,Membership.mem,Set,Eq.symm,Finset.prod_mul_distrib,Finset.prod_congr,rfl,congrFun',congrand 54 more86 instances, coercions and auxiliary constants left out.
Tactic trace: 16 steps
Open to load the checked before-and-after goal states.
lemma prod_erase_aux (x : ℝ) : (∏ i ∈ Finset.Icc (1 : ℕ) 2016 \ ((Finset.Icc (1 : ℕ) 2016).filter (fun n ↦ n % 4 = 2 ∨ n % 4 = 3)), (x - (i : ℝ))) ≠ (∏ i ∈ Finset.Icc (1 : ℕ) 2016 \ ((Finset.Icc (1 : ℕ) 2016).filter (fun n ↦ n % 4 = 0 ∨ n % 4 = 1)), (x - (i : ℝ))) := by … - determine
Imo2016P5.solution_valueline 430 sourceno axioms what this means
Statement uses:
NatProof uses:
OfNat.ofNat1 instances, coercions and auxiliary constants left out.
- problem
Imo2016P5.imo2016_p5line 432 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
IsLeast,Nat,Set.ofPred,Exists,Finset,And,LT.lt,Finset.Icc,OfNat.ofNat,Eq,HAdd.hAdd,Finset.card,Not,Real,Finset.prod,SDiff.sdiff,HSub.hSub, Imo2016P5.solution_valueProof uses:
And.intro,Membership.mem,Set,lowerBounds,Eq.mpr,id,congrArg,Set.mem_ofPred_eq,Exists.intro,Finset.filter,Or,HMod.hMod,LE.le,LE.ofSetLike,Finset.filter_subset,of_decide_eq_true,Bool,Decidable.decide,Bool.true,Eq.refland 54 more99 instances, coercions and auxiliary constants left out.
Tactic trace: 59 steps
Open to load the checked before-and-after goal states.