AFTD Auto-Formalizing Theoretical Domains

op309_source_forest_odd_cycle_kernel

theoremverified

Three pairwise distinct colors adjacent to every vertex of a five-cycle cannot coexist with a proper five-coloring of that cycle.

Statement

theorem op309_source_forest_odd_cycle_kernel (a b c d e f g h : Fin 5)
    (h01 : a ≠ b)
    (h02 : a ≠ c)
    (h12 : b ≠ c)
    (h03 : a ≠ d)
    (h04 : a ≠ e)
    (h05 : a ≠ f)
    (h06 : a ≠ g)
    (h07 : a ≠ h)
    (h13 : b ≠ d)
    (h14 : b ≠ e)
    (h15 : b ≠ f)
    (h16 : b ≠ g)
    (h17 : b ≠ h)
    (h23 : c ≠ d)
    (h24 : c ≠ e)
    (h25 : c ≠ f)
    (h26 : c ≠ g)
    (h27 : c ≠ h)
    (h34 : d ≠ e)
    (h45 : e ≠ f)
    (h56 : f ≠ g)
    (h67 : g ≠ h)
    (h73 : h ≠ d) : False
Source
OP-309 source-forest quotient obstruction, experiments 42290 and 42300.
Verified
28 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Used by 2

The proof, explained

The theorem states that a 5-cycle (with vertices d, e, f, g, h) cannot be properly colored using only the 2 colors left over after fixing 3 distinct colors a, b, c in Fin 5. The proof formalizes this 2-colorability obstruction using the pigeonhole principle (List.Nodup.length_le_card): a list of 6 distinct elements in Fin 5 leads to 6 ≤ 5, which is impossible. Assuming vertices at distance two along the cycle are distinct would produce 6 distinct elements, forcing the equalities d = f and e = g. These identifications then force the remaining vertices d, e, h to be pairwise distinct, creating a final 6-element duplicate-free list and closing the contradiction.

  1. d = f

    We prove d = f by contradiction. If d ≠ f, then the six elements a, b, c, d, e, f in Fin 5 would be pairwise distinct: a, b, c are pairwise distinct and distinct from d, e, f by hypothesis, while d, e, f are distinct from each other by the cycle inequalities d ≠ e and e ≠ f together with the assumption d ≠ f. Hence [a, b, c, d, e, f] has no duplicates. By the pigeonhole principle (List.Nodup.length_le_card), the length of this list (6) must be at most the cardinality of Fin 5 (5), which norm_num refutes as an arithmetic impossibility.

    lines 25–45

    uses List.Nodup.length_le_card

      have hdf : d = f := by
        by_contra hdfne
        have hn : [a,b,c,d,e,f].Nodup := by
          have k01 : a ≠ b := h01
          have k02 : a ≠ c := h02
          have k03 : a ≠ d := h03
          have k04 : a ≠ e := h04
          have k05 : a ≠ f := h05
          have k12 : b ≠ c := h12
          have k13 : b ≠ d := h13
          have k14 : b ≠ e := h14
          have k15 : b ≠ f := h15
          have k23 : c ≠ d := h23
          have k24 : c ≠ e := h24
          have k25 : c ≠ f := h25
          have k34 : d ≠ e := h34
          have k35 : d ≠ f := hdfne
          have k45 : e ≠ f := h45
          simp [k01, k02, k03, k04, k05, k12, k13, k14, k15, k23, k24, k25, k34, k35, k45]
        have hc := List.Nodup.length_le_card hn
        norm_num at hc
  2. e = g

    We prove e = g by contradiction. If e ≠ g, then substituting d = f into the cycle inequality f ≠ g (h56) gives d ≠ g. Along with d ≠ e, the assumption e ≠ g, and the distinctness of a, b, c, the list [a, b, c, d, e, g] consists of 6 pairwise distinct elements in Fin 5. Applying List.Nodup.length_le_card again yields 6 ≤ 5, which norm_num recognizes as contradictory.

    lines 46–69

    uses List.Nodup.length_le_card

      have heg : e = g := by
        by_contra hegne
        have hdg : d ≠ g := by
          rw [hdf]
          exact h56
        have hn : [a,b,c,d,e,g].Nodup := by
          have k01 : a ≠ b := h01
          have k02 : a ≠ c := h02
          have k03 : a ≠ d := h03
          have k04 : a ≠ e := h04
          have k06 : a ≠ g := h06
          have k12 : b ≠ c := h12
          have k13 : b ≠ d := h13
          have k14 : b ≠ e := h14
          have k16 : b ≠ g := h16
          have k23 : c ≠ d := h23
          have k24 : c ≠ e := h24
          have k26 : c ≠ g := h26
          have k34 : d ≠ e := h34
          have k36 : d ≠ g := hdg
          have k46 : e ≠ g := hegne
          simp [k01, k02, k03, k04, k06, k12, k13, k14, k16, k23, k24, k26, k34, k36, k46]
        have hc := List.Nodup.length_le_card hn
        norm_num at hc
  3. d ≠ h and e ≠ h

    By symmetry of inequality (Ne.symm), the cycle hypothesis h ≠ d (h73) yields d ≠ h. Furthermore, rewriting with the identity e = g turns e ≠ h into g ≠ h, which is the cycle hypothesis h67.

    lines 70–73

    uses Ne.symm

      have hdh : d ≠ h := Ne.symm h73
      have heh : e ≠ h := by
        rw [heg]
        exact h67
  4. False (contradiction)

    With d ≠ h and e ≠ h established, d, e, h are pairwise distinct because d ≠ e is a cycle hypothesis. Combined with the pairwise distinctness of a, b, c and their distinctness from d, e, h, the list [a, b, c, d, e, h] has no duplicates. Applying List.Nodup.length_le_card one last time gives 6 ≤ 5, and norm_num derives the final contradiction.

    lines 74–92

    uses List.Nodup.length_le_card

      have hn : [a,b,c,d,e,h].Nodup := by
          have k01 : a ≠ b := h01
          have k02 : a ≠ c := h02
          have k03 : a ≠ d := h03
          have k04 : a ≠ e := h04
          have k07 : a ≠ h := h07
          have k12 : b ≠ c := h12
          have k13 : b ≠ d := h13
          have k14 : b ≠ e := h14
          have k17 : b ≠ h := h17
          have k23 : c ≠ d := h23
          have k24 : c ≠ e := h24
          have k27 : c ≠ h := h27
          have k34 : d ≠ e := h34
          have k37 : d ≠ h := hdh
          have k47 : e ≠ h := heh
          simp [k01, k02, k03, k04, k07, k12, k13, k14, k17, k23, k24, k27, k34, k37, k47]
      have hc := List.Nodup.length_le_card hn
      norm_num at hc
List.Nodup.length_le_card
A list without duplicates in a finite type α has length at most the cardinality of α.
Ne.symm
Inequality is symmetric: if a ≠ b, then b ≠ 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 op309_source_forest_odd_cycle_kernel (a b c d e f g h : Fin 5)    (h01 : a ≠ b)    (h02 : a ≠ c)    (h12 : b ≠ c)    (h03 : a ≠ d)    (h04 : a ≠ e)    (h05 : a ≠ f)    (h06 : a ≠ g)    (h07 : a ≠ h)    (h13 : b ≠ d)    (h14 : b ≠ e)    (h15 : b ≠ f)    (h16 : b ≠ g)    (h17 : b ≠ h)    (h23 : c ≠ d)    (h24 : c ≠ e)    (h25 : c ≠ f)    (h26 : c ≠ g)    (h27 : c ≠ h)    (h34 : d ≠ e)    (h45 : e ≠ f)    (h56 : f ≠ g)    (h67 : g ≠ h)    (h73 : h ≠ d) : False := by  have hdf : d = f := by    by_contra hdfne    have hn : [a,b,c,d,e,f].Nodup := by      have k01 : a ≠ b := h01      have k02 : a ≠ c := h02      have k03 : a ≠ d := h03      have k04 : a ≠ e := h04      have k05 : a ≠ f := h05      have k12 : b ≠ c := h12      have k13 : b ≠ d := h13      have k14 : b ≠ e := h14      have k15 : b ≠ f := h15      have k23 : c ≠ d := h23      have k24 : c ≠ e := h24      have k25 : c ≠ f := h25      have k34 : d ≠ e := h34      have k35 : d ≠ f := hdfne      have k45 : e ≠ f := h45      simp [k01, k02, k03, k04, k05, k12, k13, k14, k15, k23, k24, k25, k34, k35, k45]    have hc := List.Nodup.length_le_card hn    norm_num at hc  have heg : e = g := by    by_contra hegne    have hdg : d ≠ g := by      rw [hdf]      exact h56    have hn : [a,b,c,d,e,g].Nodup := by      have k01 : a ≠ b := h01      have k02 : a ≠ c := h02      have k03 : a ≠ d := h03      have k04 : a ≠ e := h04      have k06 : a ≠ g := h06      have k12 : b ≠ c := h12      have k13 : b ≠ d := h13      have k14 : b ≠ e := h14      have k16 : b ≠ g := h16      have k23 : c ≠ d := h23      have k24 : c ≠ e := h24      have k26 : c ≠ g := h26      have k34 : d ≠ e := h34      have k36 : d ≠ g := hdg      have k46 : e ≠ g := hegne      simp [k01, k02, k03, k04, k06, k12, k13, k14, k16, k23, k24, k26, k34, k36, k46]    have hc := List.Nodup.length_le_card hn    norm_num at hc  have hdh : d ≠ h := Ne.symm h73  have heh : e ≠ h := by    rw [heg]    exact h67  have hn : [a,b,c,d,e,h].Nodup := by      have k01 : a ≠ b := h01      have k02 : a ≠ c := h02      have k03 : a ≠ d := h03      have k04 : a ≠ e := h04      have k07 : a ≠ h := h07      have k12 : b ≠ c := h12      have k13 : b ≠ d := h13      have k14 : b ≠ e := h14      have k17 : b ≠ h := h17      have k23 : c ≠ d := h23      have k24 : c ≠ e := h24      have k27 : c ≠ h := h27      have k34 : d ≠ e := h34      have k37 : d ≠ h := hdh      have k47 : e ≠ h := heh      simp [k01, k02, k03, k04, k07, k12, k13, k14, k17, k23, k24, k27, k34, k37, k47]  have hc := List.Nodup.length_le_card hn  norm_num at hc
See it in the graphDiscuss this resultChallenge it