Compfiles/Imo2000P4.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
56 declarations, 0 contain sorry, 0 declared as axioms
International Mathematical Olympiad 2000, Problem 4
100 cards are numbered 1 to 100 (each card different) and placed in 3 boxes (at least one card in each box). How many ways can this be done so that if two boxes are selected and a card is taken from each, then the knowledge of their sum alone is always sufficient to identify the third box?
Imports (8)
Imported by 1 file
- def
Imo2000P4.GoodDocumented declaration: Good line 63 sourceSource documentation
A placement of the cards
1, ..., ninto three boxes (labeled byZMod 3) is good if every box is nonempty and whenever two pairs of cards from two different pairs of boxes have the same sum, the pairs of boxes coincide.no axioms what this means
Statement uses:
Nat,ZMod,OfNat.ofNatProof uses:
And,Exists,LE.le,Eq,Ne,HAdd.hAdd,Or5 instances, coercions and auxiliary constants left out.
def Good (n : ℕ) (f : ℕ → ZMod 3) : Prop := …
Mentions: f
- def
Imo2000P4.Mod3The mod-3 placements: the box of cardadepends only ona % 3line 70 sourceSource documentation
The mod-3 placements: the box of card
adepends only ona % 3.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,ZMod,OfNat.ofNatProof uses:
Exists,Equiv.Perm,LE.le,Eq14 instances, coercions and auxiliary constants left out.
def Mod3 (n : ℕ) (f : ℕ → ZMod 3) : Prop := …
Mentions: f
- def
Imo2000P4.EndsThe "ends" placements: cards1andnare alone in two boxes and all cards2, ..., n - 1are in the third box line 75 sourceSource documentation
The "ends" placements: cards
1andnare alone in two boxes and all cards2, ..., n - 1are in the third box.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,ZMod,OfNat.ofNatProof uses:
Exists,Equiv.Perm,And,Eq,LE.le,HSub.hSub25 instances, coercions and auxiliary constants left out.
def Ends (n : ℕ) (f : ℕ → ZMod 3) : Prop := …
Mentions: f
- lemma
Imo2000P4.exists_thirdline 79 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
ZMod,OfNat.ofNat,Nat,Exists,And,NeProof uses:
of_decide_eq_true,Eq,id,Bool,Decidable.decide,Bool.true,Eq.refl9 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.eq_thirdline 82 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
ZMod,OfNat.ofNat,Nat,Ne,EqProof uses:
And,of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl,And.intro9 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.equiv_of_distinctline 88 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
ZMod,OfNat.ofNat,Nat,Ne,Exists,Equiv.Perm,And,EqProof uses:
Function.Injective,Fin,Nat.succ,Matrix.vecCons,Matrix.vecEmpty,List,List.Mem,List.finRange,HEq,Membership.mem,Finset,Fintype.elems,Fintype.complete,List.cons,List.Mem.head,Fin.mk,Nat.le_of_lt,Nat.le_refl,List.nil,of_eq_trueand 28 more69 instances, coercions and auxiliary constants left out.
Tactic trace: 7 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.triline 96 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
ZMod,OfNat.ofNat,Nat,Or,EqProof uses:
of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl42 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.pair_eq_of_sum_auxline 99 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
ZMod,OfNat.ofNat,Nat,Ne,Eq,HAdd.hAdd,Or,AndProof uses:
of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl26 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.pair_eq_of_sumline 102 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
ZMod,OfNat.ofNat,Nat,Ne,Eq,HAdd.hAdd,Or,AndProof uses: Imo2000P4.pair_eq_of_sum_aux
18 instances, coercions and auxiliary constants left out.
- lemma
Imo2000P4.cast_ne_add_one_twoline 106 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Or,Eq,OfNat.ofNat,Ne,ZMod,HAdd.hAddProof uses:
Eq.mpr,id,congrArg,Nat.cast_add,Nat.cast_one,add_zero,of_decide_eq_true,Bool,Decidable.decide,Bool.true,Eq.refl,add_left_cancel,Eq.symm,Nat.cast_ofNat51 instances, coercions and auxiliary constants left out.
Tactic trace: 17 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.good_monoIfn + 1shares its box with another card, then a good placement of1, ..., n + 1restricts to a good placement of1, ..., nline 120 sourceSource documentation
If
n + 1shares its box with another card, then a good placement of1, ..., n + 1restricts to a good placement of1, ..., n.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,ZMod,OfNat.ofNat, Imo2000P4.Good,HAdd.hAdd,Exists,And,LE.le,EqProof uses:
And.intro,Ne,Or,And.left,dite,Exists.intro,Not,Eq.mpr,id,congrArg,Eq.symm,And.right14 instances, coercions and auxiliary constants left out.
Tactic trace: 21 steps
Open to load the checked before-and-after goal states.
lemma good_mono {n : ℕ} {f : ℕ → ZMod 3} (hf : Good (n + 1) f) (h : ∃ m, 1 ≤ m ∧ m ≤ n ∧ f m = f (n + 1)) : Good n f := by …Mentions: f, Imo2000P4.Good, h
- lemma
Imo2000P4.case_aloneCase 1 of the induction step:n + 1is alone in its box line 136 sourceSource documentation
Case 1 of the induction step:
n + 1is alone in its box. Then1is also alone, and we get anEndsplacement.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,ZMod, Imo2000P4.Good,HAdd.hAdd,Ne, Imo2000P4.EndsProof uses:
le_rfl,Decidable.byContradiction,Eq,Not,And,Exists,False,Eq.mp,Eq.trans,Mathlib.Tactic.Push.not_forall_eq,congrArg,funext,Eq.symm, Imo2000P4.exists_third,And.left,Or,HSub.hSub,dite,Exists.intro,And.introand 8 more60 instances, coercions and auxiliary constants left out.
Tactic trace: 75 steps
Open to load the checked before-and-after goal states.
lemma case_alone {n : ℕ} (hn : 3 ≤ n) {f : ℕ → ZMod 3} (hf : Good (n + 1) f) (halone : ∀ a, 1 ≤ a → a ≤ n → f a ≠ f (n + 1)) : Ends (n + 1) f := by …Mentions: f, Imo2000P4.Good, Imo2000P4.Ends
- lemma
Imo2000P4.case_mod3Case 2a of the induction step: the restriction to1, ..., nis a mod-3 placement; thenn + 1must go into the box of its own residue line 195 sourceSource documentation
Case 2a of the induction step: the restriction to
1, ..., nis a mod-3 placement; thenn + 1must go into the box of its own residue.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,ZMod, Imo2000P4.Good,HAdd.hAdd, Imo2000P4.Mod3Proof uses:
Eq,Exists,Exists.intro,HSub.hSub,Equiv.Perm,Ne, Imo2000P4.cast_ne_add_one_two,Or.inl,rfl,Or.inr,Eq.mpr,id,congrArg,Iff.mpr,Equiv,Function.Injective.ne_iff,Equiv.injective,Decidable.byContradiction,Not,Andand 12 more55 instances, coercions and auxiliary constants left out.
Tactic trace: 53 steps
Open to load the checked before-and-after goal states.
lemma case_mod3 {n : ℕ} (hn : 3 ≤ n) {f : ℕ → ZMod 3} (hf : Good (n + 1) f) (hm : Mod3 n f) : Mod3 (n + 1) f := by …Mentions: f, Imo2000P4.Good, Imo2000P4.Mod3
- lemma
Imo2000P4.case_endsCase 2b of the induction step: the restriction to1, ..., nis anEndsplacement with4 ≤ n; then there is no room for the cardn + 1line 234 sourceSource documentation
Case 2b of the induction step: the restriction to
1, ..., nis anEndsplacement with4 ≤ n; then there is no room for the cardn + 1.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,ZMod, Imo2000P4.Good,HAdd.hAdd, Imo2000P4.Ends,FalseProof uses:
Equiv.Perm,And,Eq,HSub.hSub,le_rfl,Mathlib.Meta.NormNum.isNat_le_true,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,Bool,Bool.true,Ne,Iff.mpr,Equiv,Function.Injective.ne_iff,Equiv.injective,of_decide_eq_true,id,Decidable.decide,Exists,Equiv.surjectiveand 8 more58 instances, coercions and auxiliary constants left out.
Tactic trace: 80 steps
Open to load the checked before-and-after goal states.
lemma case_ends {n : ℕ} (hn : 4 ≤ n) {f : ℕ → ZMod 3} (hf : Good (n + 1) f) (he : Ends n f) : False := by …Mentions: f, Imo2000P4.Good, Imo2000P4.Ends
- lemma
Imo2000P4.base_caseBase case: every good placement of1, 2, 3puts the three cards in three different boxes line 268 sourceSource documentation
Base case: every good placement of
1, 2, 3puts the three cards in three different boxes.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,ZMod,OfNat.ofNat, Imo2000P4.Good, Imo2000P4.EndsProof uses:
Ne,Eq,And,Exists,False, Imo2000P4.exists_third,LE.le,And.left,HAdd.hAdd,Or,dite,Eq.symm,le_antisymm,Nat.rawCast,Mathlib.Tactic.IntervalCases.of_le_right,Mathlib.Meta.NormNum.IsNat.to_raw_eq,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,Not,Eq.mpand 11 more36 instances, coercions and auxiliary constants left out.
Tactic trace: 42 steps
Open to load the checked before-and-after goal states.
lemma base_case {f : ℕ → ZMod 3} (hf : Good 3 f) : Ends 3 f := by …Mentions: f, Imo2000P4.Good, Imo2000P4.Ends
- lemma
Imo2000P4.ends3_mod3Forn = 3the two families coincide line 299 sourceSource documentation
For
n = 3the two families coincide.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,ZMod,OfNat.ofNat, Imo2000P4.Ends, Imo2000P4.Mod3Proof uses:
Equiv.Perm,And,Eq,LE.le,HSub.hSub,le_rfl,Mathlib.Meta.NormNum.isNat_le_true,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,Mathlib.Meta.NormNum.isNat_natSub,Bool,Bool.true,Ne,Eq.mpr,id,congrArg,Iff.mpr,Equiv,Function.Injective.ne_iff,Equiv.injectiveand 17 more45 instances, coercions and auxiliary constants left out.
Tactic trace: 27 steps
Open to load the checked before-and-after goal states.
lemma ends3_mod3 {f : ℕ → ZMod 3} (he : Ends 3 f) : Mod3 3 f := by …Mentions: f, Imo2000P4.Ends, Imo2000P4.Mod3
- lemma
Imo2000P4.classifyThe classification: every good placement of1, ..., n(3 ≤ n) is either by residue mod 3 or anEndsplacement line 314 sourceSource documentation
The classification: every good placement of
1, ..., n(3 ≤ n) is either by residue mod 3 or anEndsplacement.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,ZMod, Imo2000P4.Good,Or, Imo2000P4.Mod3, Imo2000P4.EndsProof uses:
Nat.le_induction,Or.inr, Imo2000P4.base_case,HAdd.hAdd,dite,Ne,Classical.propDecidable, Imo2000P4.case_alone,Not,And,Eq,Exists,Eq.mp,Eq.trans,Mathlib.Tactic.Push.not_forall_eq,congrArg,funext, Imo2000P4.good_mono,Exists.intro,And.introand 8 more14 instances, coercions and auxiliary constants left out.
Tactic trace: 21 steps
Open to load the checked before-and-after goal states.
lemma classify (n : ℕ) (hn : 3 ≤ n) (f : ℕ → ZMod 3) : Good n f → Mod3 n f ∨ Ends n f := by …Mentions: f, Imo2000P4.Good, Imo2000P4.Mod3, Imo2000P4.Ends
- def
Imo2000P4.ValidPlacementDocumented declaration: ValidPlacement line 342 sourceSource documentation
A placement of the 100 cards into 3 boxes (labeled by
ZMod 3) is valid if every box is nonempty and whenever two boxes are selected and a card is taken from each, the sum of the two drawn cards always suffices to identify the third box: any two such selections of two distinct boxes and two cards with the same sum leave the same box unselected. Cardi + 1is represented by the indexi : Fin 100.no axioms what this means
Statement uses:
Fin,OfNat.ofNat,Nat,ZModProof uses:
And,Function.Surjective,Ne,Eq,HAdd.hAdd,Iff5 instances, coercions and auxiliary constants left out.
def ValidPlacement (f : Fin 100 → ZMod 3) : Prop := …
Mentions: f
- def
Imo2000P4.GoodPlacementCombinatorial form of validity: whenever two pairs of cards from two different pairs of boxes have the same sum of indices, the pairs of boxes coincide line 354 sourceSource documentation
Combinatorial form of validity: whenever two pairs of cards from two different pairs of boxes have the same sum of indices, the pairs of boxes coincide. Equivalent to
ValidPlacement(valid_iff_good); this is the form used in the classification argument.no axioms what this means
Statement uses:
Fin,OfNat.ofNat,Nat,ZModProof uses:
And,Function.Surjective,Ne,Eq,HAdd.hAdd,Or5 instances, coercions and auxiliary constants left out.
def GoodPlacement (f : Fin 100 → ZMod 3) : Prop := …
Mentions: f
- lemma
Imo2000P4.third_box_iff_pairTwo pairs of distinct boxes leave the same third box unselected if and only if the two pairs of boxes coincide line 361 sourceSource documentation
Two pairs of distinct boxes leave the same third box unselected if and only if the two pairs of boxes coincide.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
ZMod,OfNat.ofNat,Nat,Ne,Iff,And,Or,EqProof uses:
of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl12 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
lemma third_box_iff_pair {x y z w : ZMod 3} (hxy : x ≠ y) (hzw : z ≠ w) : (∀ b : ZMod 3, (b ≠ x ∧ b ≠ y) ↔ (b ≠ z ∧ b ≠ w)) ↔ (x = z ∧ y = w) ∨ (x = w ∧ y = z) := by … - lemma
Imo2000P4.valid_iff_goodDocumented declaration: valid_iff_good line 370 sourceSource documentation
The olympiad formulation of validity is equivalent to its combinatorial form: the sum of two cards drawn from two different boxes determines the third box iff equal sums force the two pairs of boxes to coincide.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,ZMod,Iff, Imo2000P4.ValidPlacement, Imo2000P4.GoodPlacementProof uses:
Iff.intro,Function.Surjective,Ne,Eq,HAdd.hAdd,And,And.intro,Or,Iff.mp, Imo2000P4.third_box_iff_pair,Iff.mpr8 instances, coercions and auxiliary constants left out.
Tactic trace: 9 steps
Open to load the checked before-and-after goal states.
lemma valid_iff_good (f : Fin 100 → ZMod 3) : ValidPlacement f ↔ GoodPlacement f := by …Mentions: f, Imo2000P4.ValidPlacement, Imo2000P4.GoodPlacement
- def
Imo2000P4.liftExtend a placementg : Fin 100 → ZMod 3to all ofℕ(by0outside[1, 100]); cardacorresponds to indexa - 1line 381 sourceSource documentation
Extend a placement
g : Fin 100 → ZMod 3to all ofℕ(by0outside[1, 100]); cardacorresponds to indexa - 1.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,ZModProof uses:
dite,And,LE.le,Fin.mk,HSub.hSub,Not16 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
def lift (g : Fin 100 → ZMod 3) (a : ℕ) : ZMod 3 := …
- lemma
Imo2000P4.lift_applyline 384 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,ZMod,LE.le,Eq, Imo2000P4.lift,Fin.mk,HSub.hSubProof uses:
dite_eq_left,And,And.intro,Not20 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.lift_apply_finline 387 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,ZMod,Eq, Imo2000P4.lift,HAdd.hAddProof uses:
Eq.mpr,Fin.mk,HSub.hSub,id,congrArg, Imo2000P4.lift_apply,Fin.ext14 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.lift_goodline 391 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,ZMod, Imo2000P4.GoodPlacement, Imo2000P4.Good, Imo2000P4.liftProof uses:
And.intro,Exists,And,LE.le,Eq,Ne,HAdd.hAdd,Or,And.left,Function.Surjective,Exists.intro,Eq.mpr,id,congrArg, Imo2000P4.lift_apply_fin,Fin.mk,HSub.hSub, Imo2000P4.lift_apply,And.right,Eq.mp15 instances, coercions and auxiliary constants left out.
Tactic trace: 19 steps
Open to load the checked before-and-after goal states.
- def
Imo2000P4.TThe box of cardiin an "ends" placement line 405 sourceSource documentation
The box of card
iin an "ends" placement.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,ZModProof uses:
ite,Eq21 instances, coercions and auxiliary constants left out.
def T (i : Fin 100) : ZMod 3 := if (i : ℕ) = 0 then 0 else if (i : ℕ) = 99 then 1 else 2
- lemma
Imo2000P4.T_of_zeroline 407 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,Eq,ZMod, Imo2000P4.TProof uses:
id,Eq.mpr,ite,congrArg,ite_eq_left,Eq.refl30 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.T_of_99line 410 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,Eq,ZMod, Imo2000P4.TProof uses:
id,Eq.mpr,ite,congrArg,ite_eq_right,ite_eq_left,Eq.refl31 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.T_of_otherline 413 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,Ne,Eq,ZMod, Imo2000P4.TProof uses:
id,Eq.mpr,ite,congrArg,ite_eq_right,Eq.refl34 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.eq_zero_of_Tline 416 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,Eq,ZMod, Imo2000P4.TProof uses:
Decidable.byContradiction,Not,dite,False,absurd,Eq.mp,congrArg, Imo2000P4.T_of_99,of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl, Imo2000P4.T_of_other33 instances, coercions and auxiliary constants left out.
Tactic trace: 10 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.eq_99_of_Tline 422 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,Eq,ZMod, Imo2000P4.TProof uses:
Decidable.byContradiction,Not,dite,False,absurd,Eq.mp,congrArg, Imo2000P4.T_of_zero,of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl, Imo2000P4.T_of_other33 instances, coercions and auxiliary constants left out.
Tactic trace: 10 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.ne_of_T2line 428 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,Eq,ZMod, Imo2000P4.T,And,NeProof uses:
And.intro,absurd,False,Eq.mp,congrArg, Imo2000P4.T_of_zero,of_decide_eq_true,Not,id,Bool,Decidable.decide,Bool.true,Eq.refl, Imo2000P4.T_of_9934 instances, coercions and auxiliary constants left out.
Tactic trace: 11 steps
Open to load the checked before-and-after goal states.
- def
Imo2000P4.mod3funThe mod-3 placements of the 100 cards line 434 sourceSource documentation
The mod-3 placements of the 100 cards.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Equiv.Perm,ZMod,OfNat.ofNat,Nat,FinProof uses:
HAdd.hAdd16 instances, coercions and auxiliary constants left out.
def mod3fun (σ : Equiv.Perm (ZMod 3)) : Fin 100 → ZMod 3 := …
- lemma
Imo2000P4.mod3fun_apply0line 437 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Equiv.Perm,ZMod,OfNat.ofNat,Nat,Eq, Imo2000P4.mod3fun,FinProof uses:
id,Eq.mpr,HAdd.hAdd,congrArg,rfl,Nat.cast_one,Eq.refl33 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.mod3fun_apply1line 441 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Equiv.Perm,ZMod,OfNat.ofNat,Nat,Eq, Imo2000P4.mod3fun,FinProof uses:
id,Eq.mpr,HAdd.hAdd,congrArg,rfl,Nat.cast_ofNat,Eq.refl34 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.mod3fun_apply2line 445 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Equiv.Perm,ZMod,OfNat.ofNat,Nat,Eq, Imo2000P4.mod3fun,FinProof uses:
id,Eq.mpr,HAdd.hAdd,congrArg,rfl,ZMod.natCast_self,Eq.refl40 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- def
Imo2000P4.endsfunThe "ends" placements of the 100 cards line 450 sourceSource documentation
The "ends" placements of the 100 cards.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Equiv.Perm,ZMod,OfNat.ofNat,Nat,FinProof uses: Imo2000P4.T
5 instances, coercions and auxiliary constants left out.
def endsfun (σ : Equiv.Perm (ZMod 3)) : Fin 100 → ZMod 3 := fun i ↦ σ (T i)
Mentions: Imo2000P4.T
- lemma
Imo2000P4.endsfun_apply0line 452 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Equiv.Perm,ZMod,OfNat.ofNat,Nat,Eq, Imo2000P4.endsfun,FinProof uses:
id,Eq.mpr, Imo2000P4.T,congrArg, Imo2000P4.T_of_zero,rfl,Eq.refl29 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.endsfun_apply1line 455 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Equiv.Perm,ZMod,OfNat.ofNat,Nat,Eq, Imo2000P4.endsfun,FinProof uses:
id,Eq.mpr, Imo2000P4.T,congrArg, Imo2000P4.T_of_other,of_decide_eq_true,Ne,Bool,Decidable.decide,Bool.true,Eq.refl33 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.endsfun_apply2line 458 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Equiv.Perm,ZMod,OfNat.ofNat,Nat,Eq, Imo2000P4.endsfun,FinProof uses:
id,Eq.mpr, Imo2000P4.T,congrArg, Imo2000P4.T_of_other,of_decide_eq_true,Ne,Bool,Decidable.decide,Bool.true,Eq.refl33 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.endsfun_apply99line 461 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Equiv.Perm,ZMod,OfNat.ofNat,Nat,Eq, Imo2000P4.endsfun,FinProof uses:
id,Eq.mpr, Imo2000P4.T,congrArg, Imo2000P4.T_of_99,rfl,Eq.refl29 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.mod3fun_validline 464 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Equiv.Perm,ZMod,OfNat.ofNat,Nat, Imo2000P4.GoodPlacement, Imo2000P4.mod3funProof uses:
And.intro,Function.Surjective,Fin,Ne,Eq,HAdd.hAdd,Or,And,Equiv,Exists,Equiv.surjective, Imo2000P4.tri,Exists.intro,Eq.mpr,id,congrArg, Imo2000P4.mod3fun_apply2,Eq.symm, Imo2000P4.mod3fun_apply0, Imo2000P4.mod3fun_apply1 and 8 more38 instances, coercions and auxiliary constants left out.
Tactic trace: 30 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.bucket_of_neFor a pair of indices from two differentT-boxes, the sum determines the (unordered) pair ofT-values line 488 sourceSource documentation
For a pair of indices from two different
T-boxes, the sum determines the (unordered) pair ofT-values.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,Ne,ZMod, Imo2000P4.T,Or,And,Eq,HAdd.hAdd,LT.ltProof uses: Imo2000P4.tri,
absurd,Eq.trans,Eq.symm,Or.inl,And.intro, Imo2000P4.eq_zero_of_T, Imo2000P4.eq_99_of_T,Or.inr, Imo2000P4.ne_of_T254 instances, coercions and auxiliary constants left out.
Tactic trace: 38 steps
Open to load the checked before-and-after goal states.
lemma bucket_of_ne {i j : Fin 100} (hij : T i ≠ T j) : (((T i = 0 ∧ T j = 1) ∨ (T i = 1 ∧ T j = 0)) ∧ (i : ℕ) + j = 99) ∨ (((T i = 0 ∧ T j = 2) ∨ (T i = 2 ∧ T j = 0)) ∧ (i : ℕ) + j < 99) ∨ (((T i = 1 ∧ T j = 2) ∨ (T i = 2 ∧ T j = 1)) ∧ 99 < (i : ℕ) + j) := by …Mentions: Imo2000P4.T
- lemma
Imo2000P4.ends_pairline 509 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,Ne,ZMod, Imo2000P4.T,Eq,HAdd.hAdd,Or,AndProof uses:
LT.lt, Imo2000P4.bucket_of_ne,of_eq_true,Eq.trans,True,False,congr,congrArg,eq_self,and_self,or_false,or_true,False.elim,eq_false,id,Not,Eq.mp,false_and41 instances, coercions and auxiliary constants left out.
Tactic trace: 10 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.endsfun_validline 519 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Equiv.Perm,ZMod,OfNat.ofNat,Nat, Imo2000P4.GoodPlacement, Imo2000P4.endsfunProof uses:
And.intro,Function.Surjective,Fin,Ne,Eq,HAdd.hAdd,Or,And,Equiv,Exists,Equiv.surjective, Imo2000P4.tri,Exists.intro,Eq.mpr,id,congrArg, Imo2000P4.endsfun_apply0,Eq.symm, Imo2000P4.endsfun_apply99, Imo2000P4.endsfun_apply1 and 7 more31 instances, coercions and auxiliary constants left out.
Tactic trace: 26 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.mem_solutionsEvery valid placement is one of the twelve explicit placements line 535 sourceSource documentation
Every valid placement is one of the twelve explicit placements.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,ZMod, Imo2000P4.GoodPlacement,Membership.mem,Set,Union.union,Set.range,Equiv.Perm, Imo2000P4.mod3fun, Imo2000P4.endsfunProof uses: Imo2000P4.Mod3, Imo2000P4.lift, Imo2000P4.Ends,
Or, Imo2000P4.classify,Mathlib.Meta.NormNum.isNat_le_true,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,Bool,Bool.true, Imo2000P4.lift_good,LE.le,Eq,Or.inl,Exists.intro,funext,HAdd.hAdd,Eq.symm,Eq.mp,congrArgand 12 more52 instances, coercions and auxiliary constants left out.
Tactic trace: 50 steps
Open to load the checked before-and-after goal states.
lemma mem_solutions {g : Fin 100 → ZMod 3} (hg : GoodPlacement g) : g ∈ Set.range mod3fun ∪ Set.range endsfun := by …Mentions: Imo2000P4.GoodPlacement, Imo2000P4.mod3fun, Imo2000P4.endsfun
- lemma
Imo2000P4.mod3fun_injectiveline 567 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Function.Injective,Equiv.Perm,ZMod,OfNat.ofNat,Nat,Fin, Imo2000P4.mod3funProof uses:
Eq,Equiv.Perm.ext,Or, Imo2000P4.tri,congrFun,Eq.mp,congrArg, Imo2000P4.mod3fun_apply2,Eq.symm, Imo2000P4.mod3fun_apply0, Imo2000P4.mod3fun_apply126 instances, coercions and auxiliary constants left out.
Tactic trace: 15 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.endsfun_injectiveline 581 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Function.Injective,Equiv.Perm,ZMod,OfNat.ofNat,Nat,Fin, Imo2000P4.endsfunProof uses:
Eq,Equiv.Perm.ext,Or, Imo2000P4.tri,congrFun,Eq.mp,congrArg, Imo2000P4.endsfun_apply0,Eq.symm, Imo2000P4.endsfun_apply99, Imo2000P4.endsfun_apply126 instances, coercions and auxiliary constants left out.
Tactic trace: 15 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.disjoint_rangesline 595 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Disjoint,Set,Fin,OfNat.ofNat,Nat,ZMod,Set.range,Equiv.Perm, Imo2000P4.mod3fun, Imo2000P4.endsfunProof uses:
Eq.mpr,LE.le,Inter.inter,EmptyCollection.emptyCollection,id,Eq,congrArg,propext,Set.disjoint_iff,Membership.mem,congrFun,Eq.trans,Eq.mp, Imo2000P4.endsfun_apply1, Imo2000P4.mod3fun_apply1,Eq.symm, Imo2000P4.endsfun_apply2, Imo2000P4.mod3fun_apply2,Equiv.injective,absurdand 6 more50 instances, coercions and auxiliary constants left out.
Tactic trace: 10 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.card_perm_zmod3line 606 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat,Fintype.card,Equiv.Perm,ZMod,OfNat.ofNatProof uses:
Nat.factorial,rfl,Eq.mpr,id,congrArg,Fintype.card_perm,ZMod.card,Eq.refl10 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.card_mod3fun_rangeline 610 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat,Set.ncard,Fin,OfNat.ofNat,ZMod,Set.range,Equiv.Perm, Imo2000P4.mod3funProof uses:
Eq.mpr,Set.image,Set.univ,id,congrArg,Set,Eq.symm,Set.image_univ,Set.ncard_image_of_injective, Imo2000P4.mod3fun_injective,Nat.card,Set.ncard_univ,Fintype.card,Nat.card_eq_fintype_card, Imo2000P4.card_perm_zmod3,Eq.refl6 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.card_endsfun_rangeline 614 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat,Set.ncard,Fin,OfNat.ofNat,ZMod,Set.range,Equiv.Perm, Imo2000P4.endsfunProof uses:
Eq.mpr,Set.image,Set.univ,id,congrArg,Set,Eq.symm,Set.image_univ,Set.ncard_image_of_injective, Imo2000P4.endsfun_injective,Nat.card,Set.ncard_univ,Fintype.card,Nat.card_eq_fintype_card, Imo2000P4.card_perm_zmod3,Eq.refl6 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.card_solutionsline 618 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat,Set.ncard,Fin,OfNat.ofNat,ZMod,Set.ofPred, Imo2000P4.GoodPlacementProof uses:
HAdd.hAdd,rfl,Set,Union.union,Set.range,Equiv.Perm, Imo2000P4.mod3fun, Imo2000P4.endsfun,Set.ext,Iff.intro,Membership.mem, Imo2000P4.mem_solutions, Imo2000P4.mod3fun_valid, Imo2000P4.endsfun_valid,Eq.mpr,id,congrArg,Set.ncard_union_eq, Imo2000P4.disjoint_ranges,Set.toFiniteand 3 more14 instances, coercions and auxiliary constants left out.
Tactic trace: 14 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2000P4.card_validThe valid placements are exactly the good placements, so there are twelve of them line 634 sourceSource documentation
The valid placements are exactly the good placements, so there are twelve of them.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat,Set.ncard,Fin,OfNat.ofNat,ZMod,Set.ofPred, Imo2000P4.ValidPlacementProof uses:
Set, Imo2000P4.GoodPlacement,Set.ext, Imo2000P4.valid_iff_good,Eq.mpr,id,congrArg, Imo2000P4.card_solutions2 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
lemma card_valid : {g : Fin 100 → ZMod 3 | ValidPlacement g}.ncard = 12 := by …Mentions: Imo2000P4.ValidPlacement
- determine
Imo2000P4.solution_valueline 643 sourceno axioms what this means
Statement uses:
NatProof uses:
OfNat.ofNat1 instances, coercions and auxiliary constants left out.
- problem
Imo2000P4.imo2000_p4line 645 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat,Set.ncard,Fin,OfNat.ofNat,ZMod,Set.ofPred, Imo2000P4.ValidPlacement, Imo2000P4.solution_valueProof uses: Imo2000P4.card_valid
1 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.