Compfiles/Imo1979P2.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
8 declarations, 0 contain sorry, 0 declared as axioms
International Mathematical Olympiad 1979, Problem 2
A prism with pentagons $A_1A_2A_3A_4A_5$ and $B_1B_2B_3B_4B_5$ as the top and bottom faces is given. Each side of the two pentagons and each of the 25 segments $A_iB_j$ is colored red or green. Every triangle whose vertices are vertices of the prism and whose sides have all been colored has two sides of a different color. Prove that all 10 sides of the top and bottom faces have the same color.
Imports (2)
Imported by 1 file
- lemma
Imo1979P2.eq_of_ne_of_neIn a two-element palette, any two elements that both differ from a third element are equal line 33 sourceSource documentation
In a two-element palette, any two elements that both differ from a third element are equal.
no axioms what this means
Statement uses:
Bool,Ne,EqProof uses:
of_decide_eq_true,id,Decidable.decide,Bool.true,Eq.refl4 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
lemma eq_of_ne_of_ne : ∀ x y z : Bool, x ≠ z → y ≠ z → x = y := by decide
- lemma
Imo1979P2.eq_or_eq_of_neIn a two-element palette, any element equals one of two distinct elements line 36 sourceSource documentation
In a two-element palette, any element equals one of two distinct elements.
no axioms what this means
Statement uses:
Bool,Ne,Or,EqProof uses:
of_decide_eq_true,id,Decidable.decide,Bool.true,Eq.refl5 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
lemma eq_or_eq_of_ne : ∀ x y z : Bool, x ≠ y → z = x ∨ z = y := by decide
- lemma
Imo1979P2.three_eq_of_fiveAmong five booleans, some three (at pairwise distinct positions) coincide line 39 sourceSource documentation
Among five booleans, some three (at pairwise distinct positions) coincide.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,Bool,Exists,And,Ne,EqProof uses:
of_decide_eq_true,id,Decidable.decide,Bool.true,Eq.refl11 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
lemma three_eq_of_five : ∀ f : Fin 5 → Bool, ∃ i j k : Fin 5, i ≠ j ∧ i ≠ k ∧ j ≠ k ∧ f i = f j ∧ f j = f k := by …Mentions: f
- lemma
Imo1979P2.adjacent_of_threeAny three pairwise distinct elements ofFin 5contain two that are cyclically adjacent, i.e. of the formm, m + 1line 46 sourceSource documentation
Any three pairwise distinct elements of
Fin 5contain two that are cyclically adjacent, i.e. of the formm, m + 1.standard axioms: Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,Ne,Exists,And,Or,Eq,HAdd.hAddProof uses:
of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl18 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
lemma adjacent_of_three : ∀ i j k : Fin 5, i ≠ j → i ≠ k → j ≠ k → ∃ m : Fin 5, (m = i ∨ m = j ∨ m = k) ∧ (m + 1 = i ∨ m + 1 = j ∨ m + 1 = k) := by … - lemma
Imo1979P2.inter_of_threeTwo three-element subsets of the five-element set intersect line 52 sourceSource documentation
Two three-element subsets of the five-element set intersect.
standard axioms: Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,And,Ne,Exists,Or,EqProof uses:
of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl9 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
lemma inter_of_three : ∀ i j k i' j' k' : Fin 5, (i ≠ j ∧ i ≠ k ∧ j ≠ k ∧ i' ≠ j' ∧ i' ≠ k' ∧ j' ≠ k') → ∃ q : Fin 5, (q = i ∨ q = j ∨ q = k) ∧ (q = i' ∨ q = j' ∨ q = k') := by … - lemma
Imo1979P2.all_eq_of_cycleIf all cyclically adjacent values of aFin 5 → Boolare equal, then all its values are equal line 60 sourceSource documentation
If all cyclically adjacent values of a
Fin 5 → Boolare equal, then all its values are equal.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,Bool,Eq,HAdd.hAddProof uses:
of_decide_eq_true,id,Decidable.decide,Bool.true,Eq.refl18 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
lemma all_eq_of_cycle : ∀ f : Fin 5 → Bool, (∀ i, f i = f (i + 1)) → ∀ i, f i = f 0 := by …Mentions: f
- lemma
Imo1979P2.one_colorKey lemma line 69 sourceSource documentation
Key lemma. Consider two pentagons
PandQwith edge colorseandg(e pbeing the color of the sideP_pP_{p+1}, indices taken modulo 5) and cross edgesd(d p qthe color of the segmentP_pQ_q), such that no triangle with all sides colored is monochromatic. Then all sides ofPhave the same color.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,Bool,Not,And,Eq,HAdd.hAddProof uses:
Decidable.byContradiction,Ne,Exists,False, Imo1979P2.all_eq_of_cycle,Iff.mp,not_ne_iff,not_exists, Imo1979P2.three_eq_of_five,Or,Eq.refl,Eq.symm,Eq.trans, Imo1979P2.adjacent_of_three,And.intro, Imo1979P2.eq_of_ne_of_ne, Imo1979P2.eq_or_eq_of_ne18 instances, coercions and auxiliary constants left out.
Tactic trace: 28 steps
Open to load the checked before-and-after goal states.
lemma one_color (e g : Fin 5 → Bool) (d : Fin 5 → Fin 5 → Bool) (he : ∀ p q : Fin 5, ¬ (e p = d p q ∧ d p q = d (p + 1) q)) (hg : ∀ q p : Fin 5, ¬ (g q = d p q ∧ d p q = d p (q + 1))) : ∀ p : Fin 5, e p = e 0 := by … - problem
Imo1979P2.imo1979_p2line 110 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,Bool,Not,And,Eq,HAdd.hAdd,ExistsProof uses: Imo1979P2.one_color,
Decidable.byContradiction,Ne,False, Imo1979P2.three_eq_of_five,Or,Eq.refl,Eq.symm,Eq.trans, Imo1979P2.adjacent_of_three,And.intro, Imo1979P2.eq_of_ne_of_ne, Imo1979P2.inter_of_three,Exists.intro15 instances, coercions and auxiliary constants left out.
Tactic trace: 39 steps
Open to load the checked before-and-after goal states.