AFTD Auto-Formalizing Theoretical Domains

op874_contraction_forces_equal_factor_palette

theoremverified

Four pairwise distinct colors exhaust the four-color palette, so any fifth color distinct from three of them equals the fourth.

Statement

theorem op874_contraction_forces_equal_factor_palette
    (a b c d e : Fin 4)
    (hab : a ≠ b) (hac : a ≠ c) (had : a ≠ d)
    (hbc : b ≠ c) (hbd : b ≠ d) (hcd : c ≠ d)
    (hea : e ≠ a) (hec : e ≠ c) (hed : e ≠ d) : e = b
Source
Disjoint matching-palette obstruction for OP-874; https://arxiv.org/abs/2610.41950.
Verified
26 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Used by 3

The proof, explained

Since $a, b, c, d$ are pairwise distinct elements of the four-element type $\mathrm{Fin}\;4$, the subset $\{a, b, c, d\}$ has cardinality 4 and therefore equals the entire universe. Any element $e \in \mathrm{Fin}\;4$ must belong to this set, meaning $e \in \{a, b, c, d\}$. Since $e$ is assumed distinct from $a$, $c$, and $d$, the only remaining possibility is $e = b$.

  1. The set $\{a, b, c, d\}$ has cardinality 4. automation

    Since the four elements $a, b, c, d$ are assumed pairwise distinct by the six inequality hypotheses, the set containing them has cardinality 4. The tactic `simp` simplifies the cardinality expression using these disequalities.

    lines 6–7

      have hcard : ({a,b,c,d} : Finset (Fin 4)).card = 4 := by
        simp [hab,hac,had,hbc,hbd,hcd]
  2. The set $\{a, b, c, d\}$ is the entire universe of $\mathrm{Fin}\;4$.

    Because $\{a, b, c, d\}$ has cardinality 4 and the ambient type $\mathrm{Fin}\;4$ also has 4 elements, `Finset.eq_univ_of_card` establishes that $\{a, b, c, d\} = \mathrm{Finset.univ}$.

    lines 8–10

    uses Finset.eq_univ_of_card

      have hall : ({a,b,c,d} : Finset (Fin 4)) = Finset.univ := by
        apply Finset.eq_univ_of_card
        simpa using hcard
  3. $e \in \{a, b, c, d\}$.

    Since $\{a, b, c, d\}$ is the full universe, every element of $\mathrm{Fin}\;4$, and in particular $e$, belongs to it by `Finset.mem_univ`.

    lines 11–13

    uses Finset.mem_univ

      have he : e ∈ ({a,b,c,d} : Finset (Fin 4)) := by
        rw [hall]
        exact Finset.mem_univ _
  4. $e = b$.

    Unfolding membership in $\{a, b, c, d\}$ with `Finset.mem_insert` and `Finset.mem_singleton` expresses $e \in \{a, b, c, d\}$ as $e = a \lor e = b \lor e = c \lor e = d$. A case split on this disjunction eliminates $e = a$, $e = c$, and $e = d$ using the contradiction hypotheses $e \neq a$, $e \neq c$, and $e \neq d$, leaving only $e = b$.

    lines 14–19

    uses Finset.mem_insert, Finset.mem_singleton

      simp only [Finset.mem_insert, Finset.mem_singleton] at he
      rcases he with h | h | h | h
      · exact (hea h).elim
      · exact h
      · exact (hec h).elim
      · exact (hed h).elim
Finset.eq_univ_of_card
A subset of a finite type whose cardinality equals that of the ambient type is the entire universe of elements.
Finset.mem_univ
Every element of a finite type belongs to the universal finset `univ`.
Finset.mem_insert
An element belongs to `insert b s` if and only if it equals `b` or belongs to `s`.
Finset.mem_singleton
An element belongs to the singleton set `{a}` if and only if it equals `a`.

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

theorem op874_contraction_forces_equal_factor_palette    (a b c d e : Fin 4)    (hab : a ≠ b) (hac : a ≠ c) (had : a ≠ d)    (hbc : b ≠ c) (hbd : b ≠ d) (hcd : c ≠ d)    (hea : e ≠ a) (hec : e ≠ c) (hed : e ≠ d) : e = b := by  have hcard : ({a,b,c,d} : Finset (Fin 4)).card = 4 := by    simp [hab,hac,had,hbc,hbd,hcd]  have hall : ({a,b,c,d} : Finset (Fin 4)) = Finset.univ := by    apply Finset.eq_univ_of_card    simpa using hcard  have he : e ∈ ({a,b,c,d} : Finset (Fin 4)) := by    rw [hall]    exact Finset.mem_univ _  simp only [Finset.mem_insert, Finset.mem_singleton] at he  rcases he with h | h | h | h  · exact (hea h).elim  · exact h  · exact (hec h).elim  · exact (hed h).elim
See it in the graphDiscuss this resultChallenge it