Compfiles/Imo1979P2.lean

GitHub source file

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
  1. lemma Imo1979P2.eq_of_ne_of_ne In a two-element palette, any two elements that both differ from a third element are equal line 33 source

    Source 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, Eq

    Proof uses: of_decide_eq_true, id, Decidable.decide, Bool.true, Eq.refl

    4 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
  2. lemma Imo1979P2.eq_or_eq_of_ne In a two-element palette, any element equals one of two distinct elements line 36 source

    Source documentation

    In a two-element palette, any element equals one of two distinct elements.

    no axioms what this means

    Statement uses: Bool, Ne, Or, Eq

    Proof uses: of_decide_eq_true, id, Decidable.decide, Bool.true, Eq.refl

    5 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
  3. lemma Imo1979P2.three_eq_of_five Among five booleans, some three (at pairwise distinct positions) coincide line 39 source

    Source 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, Eq

    Proof uses: of_decide_eq_true, id, Decidable.decide, Bool.true, Eq.refl

    11 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

  4. lemma Imo1979P2.adjacent_of_three Any three pairwise distinct elements of Fin 5 contain two that are cyclically adjacent, i.e. of the form m, m + 1 line 46 source

    Source documentation

    Any three pairwise distinct elements of Fin 5 contain two that are cyclically adjacent, i.e. of the form m, m + 1.

    standard axioms: Quot.sound, propext what this means

    Statement uses: Fin, OfNat.ofNat, Nat, Ne, Exists, And, Or, Eq, HAdd.hAdd

    Proof uses: of_decide_eq_true, id, Bool, Decidable.decide, Bool.true, Eq.refl

    18 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
    …
  5. lemma Imo1979P2.inter_of_three Two three-element subsets of the five-element set intersect line 52 source

    Source 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, Eq

    Proof uses: of_decide_eq_true, id, Bool, Decidable.decide, Bool.true, Eq.refl

    9 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
    …
  6. lemma Imo1979P2.all_eq_of_cycle If all cyclically adjacent values of a Fin 5 → Bool are equal, then all its values are equal line 60 source

    Source documentation

    If all cyclically adjacent values of a Fin 5 → Bool are 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.hAdd

    Proof uses: of_decide_eq_true, id, Decidable.decide, Bool.true, Eq.refl

    18 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

  7. lemma Imo1979P2.one_color Key lemma line 69 source

    Source documentation

    Key lemma. Consider two pentagons P and Q with edge colors e and g (e p being the color of the side P_pP_{p+1}, indices taken modulo 5) and cross edges d (d p q the color of the segment P_pQ_q), such that no triangle with all sides colored is monochromatic. Then all sides of P have the same color.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Fin, OfNat.ofNat, Nat, Bool, Not, And, Eq, HAdd.hAdd

    Proof 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_ne

    18 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
    …
  8. problem Imo1979P2.imo1979_p2 line 110 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Fin, OfNat.ofNat, Nat, Bool, Not, And, Eq, HAdd.hAdd, Exists

    Proof 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.intro

    15 instances, coercions and auxiliary constants left out.

    Tactic trace: 39 steps

    Open to load the checked before-and-after goal states.