AFTD Auto-Formalizing Theoretical Domains

op309_four_cycle_six_colors_kernel

theoremverified

A sixth color cannot avoid five distinct colors in a five-color palette.

Statement

theorem op309_four_cycle_six_colors_kernel (a b c p s d : Fin 5)
  (hfive : ([a,b,c,p,s] : List (Fin 5)).Nodup)
  (hd : d ≠ a ∧ d ≠ b ∧ d ≠ c ∧ d ≠ p ∧ d ≠ s) : False
Source
OP-309 cubic four-cycle obstruction, experiment 40796.
Verified
26 Nov 2026
Axioms
Classical.choiceQuot.soundpropext

The proof, explained

The theorem proves that a five-element palette ($\mathrm{Fin}\; 5$) cannot contain five distinct colors and a sixth color that differs from all five. The proof constructs the six-element list $[a, b, c, p, s, d]$ and verifies that all entries are pairwise distinct. By the pigeonhole principle for finite types, the length of a duplicate-free list cannot exceed the cardinality of the type, forcing the impossible inequality $6 \le 5$.

  1. The list of six elements $[a, b, c, p, s, d]$ has no duplicates.

    Expanding the definition of duplicate-freeness (`List.nodup_cons`, `List.nodup_singleton`) and list membership (`List.mem_cons`, `List.mem_singleton`) using De Morgan's laws (`not_or`) reduces the goal to showing that all pairs among $a, b, c, p, s, d$ are distinct. The hypothesis `hfive` establishes that $a, b, c, p, s$ are pairwise distinct, and `hd` states that $d$ differs from each of them; `aesop` completes the sub-goal by matching these distinctness facts across all pairs.

    lines 4–7

    uses List.nodup_cons, List.mem_cons, List.mem_singleton, List.nodup_singleton, not_or

      have h6 : ([a,b,c,p,s,d] : List (Fin 5)).Nodup := by
        simp only [List.nodup_cons, List.mem_cons, List.mem_singleton,
          List.nodup_singleton, not_or] at *
        aesop
  2. A contradiction is reached by the pigeonhole principle.

    Because the list $[a, b, c, p, s, d]$ has no duplicate elements, its length (6) cannot exceed the cardinality of the ambient type $\mathrm{Fin}\; 5$ (5). The arithmetic tactic `norm_num` evaluates the resulting inequality $6 \le 5$, which is false, thereby closing the proof.

    lines 8–9

      have hh := h6.length_le_card
      norm_num at hh
List.nodup_cons
A list `a :: l` has no duplicates if and only if `a ∉ l` and `l` has no duplicates.
List.mem_cons
An element `a` belongs to `b :: l` if and only if `a = b` or `a ∈ l`.
List.mem_singleton
An element `a` belongs to `[b]` if and only if `a = b`.
List.nodup_singleton
Any singleton list `[a]` has no duplicates.
not_or
The negation of a disjunction `¬(p ∨ q)` is equivalent to `¬p ∧ ¬q`.

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 op309_four_cycle_six_colors_kernel (a b c p s d : Fin 5)  (hfive : ([a,b,c,p,s] : List (Fin 5)).Nodup)  (hd : d ≠ a ∧ d ≠ b ∧ d ≠ c ∧ d ≠ p ∧ d ≠ s) : False := by  have h6 : ([a,b,c,p,s,d] : List (Fin 5)).Nodup := by    simp only [List.nodup_cons, List.mem_cons, List.mem_singleton,      List.nodup_singleton, not_or] at *    aesop  have hh := h6.length_le_card  norm_num at hh
See it in the graphDiscuss this resultChallenge it