AFTD Auto-Formalizing Theoretical Domains

op309_diamond_template_rich_star

theoremverified

For a diamond with exactly the displayed neighbor sets and displayed five-color edge labels, its central edge and the two edges from the second central vertex form a rich star.

Statement

theorem op309_diamond_template_rich_star
    {V : Type*} [DecidableEq V] (G : SimpleGraph V)
    (u v a b x y : V) (hdist : [u,v,a,b].Nodup)
    (hx : x ∉ [u,v,a,b]) (hy : y ∉ [u,v,a,b])
    (hu : ∀ w, G.Adj u w ↔ w = v ∨ w = a ∨ w = b)
    (hv : ∀ w, G.Adj v w ↔ w = u ∨ w = a ∨ w = b)
    (ha : ∀ w, G.Adj a w ↔ w = u ∨ w = v ∨ w = x)
    (hb : ∀ w, G.Adj b w ↔ w = u ∨ w = v ∨ w = y)
    (c : G.edgeSet → Fin 5)
    (h0 : ∀ e : G.edgeSet, e.1 = s(u,v) → c e = 2)
    (h1 : ∀ e : G.edgeSet, e.1 = s(u,a) → c e = 1)
    (h2 : ∀ e : G.edgeSet, e.1 = s(u,b) → c e = 0)
    (h3 : ∀ e : G.edgeSet, e.1 = s(v,a) → c e = 3)
    (h4 : ∀ e : G.edgeSet, e.1 = s(v,b) → c e = 4)
    (h5 : ∀ e : G.edgeSet, e.1 = s(a,x) → c e = 0)
    (h6 : ∀ e : G.edgeSet, e.1 = s(b,y) → c e = 1) :
    (∀ e : G.edgeSet, e.1 = s(u,v) → simple_graph_edge_is_rich G c e) ∧
    (∀ e : G.edgeSet, e.1 = s(v,a) → simple_graph_edge_is_rich G c e) ∧
    (∀ e : G.edgeSet, e.1 = s(v,b) → simple_graph_edge_is_rich G c e)
Source
Local diamond template for the claw-free cubic route to OP-309; checked by finite enumeration in experiment 31385.
Verified
20 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
  • simple_graph_edge_is_richIn an edge colouring c, an edge e is rich if all edges adjacent to e receive pairwise distinct colours.

The proof, explained

To prove that the three edges s(u, v), s(v, a), and s(v, b) in the diamond template are rich, the proof establishes two preliminary lemmas: first, classifying every edge incident to an edge s(p, q) in the line graph by its endpoints; second, showing that an edge is rich whenever all its incident edges belong to a set of four candidates with pairwise distinct colors. The main theorem then decomposes into three goals, one for each edge. For each edge, the four-candidate lemma is applied with the edge's four specific incident neighbors and their distinct color labels (verified by decide), and the classification lemma together with the diamond's vertex neighborhoods proves that every incident edge matches one of the four candidates with its prescribed color.

  1. Any edge adjacent to s(p, q) in the line graph is of the form s(p, t) with p adjacent to t and t ≠ q, or s(q, t) with q adjacent to t and t ≠ p.

    By the definition of line graph adjacency, an adjacent edge f must be distinct from e = s(p, q) and share some vertex y with e. Since y ∈ s(p, q), y is either p or q. Representing f as s(y, t) for a neighbor t of y, the condition that e and f are distinct edges implies that t cannot be the other endpoint of e (so t ≠ q when y = p, and t ≠ p when y = q).

    lines 5–18

    uses SimpleGraph.lineGraph_adj_iff_exists, Sym2.mem_iff, Sym2.mem_iff_exists.mp, SimpleGraph.mem_edgeSet, Subtype.ext, Sym2.eq_swap

      rw [SimpleGraph.lineGraph_adj_iff_exists] at hadj
      obtain ⟨hne, y, hye, hyf⟩ := hadj
      rw [he, Sym2.mem_iff] at hye
      obtain ⟨t, ht⟩ := Sym2.mem_iff_exists.mp hyf
      have hft : G.Adj y t := by
        have := f.2; rw [ht] at this; exact (SimpleGraph.mem_edgeSet G).mp this
      refine ⟨t, ?_⟩
      rcases hye with rfl | rfl
      · left
        refine ⟨hft, ?_, ht⟩
        rintro rfl; exact hne (Subtype.ext (he.trans ht.symm))
      · right
        refine ⟨hft, ?_, ht⟩
        rintro rfl; exact hne (Subtype.ext (he.trans (ht.trans Sym2.eq_swap).symm))
  2. An edge is rich whenever every edge adjacent to it in the line graph belongs to a set of four candidate edges having pairwise distinct colors.

    Suppose for contradiction that two distinct incident edges f and f2 receive the same color. By hypothesis, each of f and f2 must be one of the four candidate edges. In all 16 combinations, either f and f2 are the same candidate edge, which contradicts their distinctness (f ≠ f2), or they are distinct candidates, which contradicts the assumption that their colors are equal since the four candidate colors are pairwise distinct.

    lines 27–33

    uses Subtype.ext

      intro f f2 hf hg hfg hc
      obtain ⟨d1, d2, d3, d4, d5, d6⟩ := hdist
      rcases h f hf with ⟨fA, fa⟩ | ⟨fA, fa⟩ | ⟨fA, fa⟩ | ⟨fA, fa⟩ <;>
      rcases h f2 hg with ⟨gA, ga⟩ | ⟨gA, ga⟩ | ⟨gA, ga⟩ | ⟨gA, ga⟩ <;>
      first
        | exact hfg (Subtype.ext (fA.trans gA.symm))
        | (rw [fa, ga] at hc; first | exact absurd hc ‹_› | exact absurd hc.symm ‹_›)
  3. The goal reduces to proving that each of the three edges s(u, v), s(v, a), and s(v, b) is rich.

    We split the conjunction of the three richness claims into three independent subgoals.

    line 54

      refine ⟨?_, ?_, ?_⟩
  4. The central edge s(u, v) is rich.

    We invoke op309_dia_tmpl_rich_of_four with the four candidate edges s(u, a), s(u, b), s(v, a), s(v, b) assigned colors 1, 0, 3, 4, whose pairwise distinctness is verified by decide. For any edge f adjacent to s(u, v), op309_dia_tmpl_adj_cases ensures that f is either s(u, t) with t ≠ v or s(v, t) with t ≠ u. Using the neighborhood characterizations of u and v, t must be a or b in each case, identifying f with one of the four candidate edges and confirming its assigned color via the color hypotheses.

    lines 55–66

    uses op309_dia_tmpl_rich_of_four, op309_dia_tmpl_adj_cases

      · intro e he
        refine op309_dia_tmpl_rich_of_four G c e s(u,a) s(u,b) s(v,a) s(v,b) 1 0 3 4 (by decide) ?_
        intro f hf
        obtain ⟨t, ⟨ht, htq, hft⟩ | ⟨ht, htq, hft⟩⟩ := op309_dia_tmpl_adj_cases G e f u v he hf
        · rcases (hu t).mp ht with h | h | h <;> subst t
          · exact absurd rfl htq
          · exact Or.inl ⟨hft, h1 f hft⟩
          · exact Or.inr (Or.inl ⟨hft, h2 f hft⟩)
        · rcases (hv t).mp ht with h | h | h <;> subst t
          · exact absurd rfl htq
          · exact Or.inr (Or.inr (Or.inl ⟨hft, h3 f hft⟩))
          · exact Or.inr (Or.inr (Or.inr ⟨hft, h4 f hft⟩))
  5. The edge s(v, a) is rich.

    We invoke op309_dia_tmpl_rich_of_four with candidate edges s(u, v), s(v, b), s(u, a), s(a, x) assigned colors 2, 4, 1, 0, which are pairwise distinct by decide. By op309_dia_tmpl_adj_cases, any adjacent edge f has the form s(v, t) with t ≠ a or s(a, t) with t ≠ v. Inspecting the neighbor sets of v and a shows that t must be u or b in the first case, and u or x in the second case; in each case, f matches one of the four candidate edges (using Sym2.eq_swap when endpoints are reversed) with the required color.

    lines 67–80

    uses op309_dia_tmpl_rich_of_four, op309_dia_tmpl_adj_cases, Sym2.eq_swap

      · intro e he
        refine op309_dia_tmpl_rich_of_four G c e s(u,v) s(v,b) s(u,a) s(a,x) 2 4 1 0 (by decide) ?_
        intro f hf
        obtain ⟨t, ⟨ht, htq, hft⟩ | ⟨ht, htq, hft⟩⟩ := op309_dia_tmpl_adj_cases G e f v a he hf
        · rcases (hv t).mp ht with h | h | h <;> subst t
          · have : (f : Sym2 V) = s(u, v) := hft.trans Sym2.eq_swap
            exact Or.inl ⟨this, h0 f this⟩
          · exact absurd rfl htq
          · exact Or.inr (Or.inl ⟨hft, h4 f hft⟩)
        · rcases (ha t).mp ht with h | h | h <;> subst t
          · have : (f : Sym2 V) = s(u, a) := hft.trans Sym2.eq_swap
            exact Or.inr (Or.inr (Or.inl ⟨this, h1 f this⟩))
          · exact absurd rfl htq
          · exact Or.inr (Or.inr (Or.inr ⟨hft, h5 f hft⟩))
  6. The edge s(v, b) is rich.

    We invoke op309_dia_tmpl_rich_of_four with candidate edges s(u, v), s(v, a), s(u, b), s(b, y) assigned colors 2, 3, 0, 1, distinct by decide. By op309_dia_tmpl_adj_cases, any adjacent edge f has the form s(v, t) with t ≠ b or s(b, t) with t ≠ v. Inspecting the neighbors of v and b reveals that t must be u or a in the first case, and u or y in the second case, so f is always one of the four candidate edges with the expected color.

    lines 81–94

    uses op309_dia_tmpl_rich_of_four, op309_dia_tmpl_adj_cases, Sym2.eq_swap

      · intro e he
        refine op309_dia_tmpl_rich_of_four G c e s(u,v) s(v,a) s(u,b) s(b,y) 2 3 0 1 (by decide) ?_
        intro f hf
        obtain ⟨t, ⟨ht, htq, hft⟩ | ⟨ht, htq, hft⟩⟩ := op309_dia_tmpl_adj_cases G e f v b he hf
        · rcases (hv t).mp ht with h | h | h <;> subst t
          · have : (f : Sym2 V) = s(u, v) := hft.trans Sym2.eq_swap
            exact Or.inl ⟨this, h0 f this⟩
          · exact Or.inr (Or.inl ⟨hft, h3 f hft⟩)
          · exact absurd rfl htq
        · rcases (hb t).mp ht with h | h | h <;> subst t
          · have : (f : Sym2 V) = s(u, b) := hft.trans Sym2.eq_swap
            exact Or.inr (Or.inr (Or.inl ⟨this, h2 f this⟩))
          · exact absurd rfl htq
          · exact Or.inr (Or.inr (Or.inr ⟨hft, h6 f hft⟩))
SimpleGraph.lineGraph_adj_iff_exists
In a simple graph G, two edges are adjacent in the line graph if and only if they are distinct and share at least one vertex.
Sym2.mem_iff
A vertex x belongs to the unordered pair s(a, b) if and only if x = a or x = b.
Sym2.mem_iff_exists.mp
If a vertex belongs to an unordered pair, that pair can be written in the form s(x, y) for some vertex y.
SimpleGraph.mem_edgeSet
An unordered pair s(v, w) belongs to the edge set of G if and only if v and w are adjacent in G.
Subtype.ext
Two elements of a subtype are equal whenever their underlying values are equal; here, two edges are equal if their underlying unordered vertex pairs are equal.
Sym2.eq_swap
The unordered pair s(a, b) equals s(b, a).
op309_dia_tmpl_adj_cases
For any edge e = s(p, q), any edge f adjacent to e in the line graph must be of the form s(p, t) with p adjacent to t and t ≠ q, or s(q, t) with q adjacent to t and t ≠ p.
op309_dia_tmpl_rich_of_four
An edge e is rich under coloring c if every edge adjacent to e in the line graph is one of four candidates A, B, C, D having pairwise distinct colors a, b, c', d.

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_dia_tmpl_adj_cases {V : Type*} (G : SimpleGraph V) (e f : G.edgeSet) (p q : V)    (he : (e : Sym2 V) = s(p, q)) (hadj : G.lineGraph.Adj e f) :    ∃ t, (G.Adj p t ∧ t ≠ q ∧ (f : Sym2 V) = s(p, t)) ∨         (G.Adj q t ∧ t ≠ p ∧ (f : Sym2 V) = s(q, t)) := by  rw [SimpleGraph.lineGraph_adj_iff_exists] at hadj  obtain ⟨hne, y, hye, hyf⟩ := hadj  rw [he, Sym2.mem_iff] at hye  obtain ⟨t, ht⟩ := Sym2.mem_iff_exists.mp hyf  have hft : G.Adj y t := by    have := f.2; rw [ht] at this; exact (SimpleGraph.mem_edgeSet G).mp this  refine ⟨t, ?_⟩  rcases hye with rfl | rfl  · left    refine ⟨hft, ?_, ht⟩    rintro rfl; exact hne (Subtype.ext (he.trans ht.symm))  · right    refine ⟨hft, ?_, ht⟩    rintro rfl; exact hne (Subtype.ext (he.trans (ht.trans Sym2.eq_swap).symm))theorem op309_dia_tmpl_rich_of_four {V : Type*} (G : SimpleGraph V) (c : G.edgeSet → Fin 5)    (e : G.edgeSet) (A B C D : Sym2 V) (a b c' d : Fin 5)    (hdist : a ≠ b ∧ a ≠ c' ∧ a ≠ d ∧ b ≠ c' ∧ b ≠ d ∧ c' ≠ d)    (h : ∀ f, G.lineGraph.Adj e f →      ((f : Sym2 V) = A ∧ c f = a) ∨ ((f : Sym2 V) = B ∧ c f = b) ∨      ((f : Sym2 V) = C ∧ c f = c') ∨ ((f : Sym2 V) = D ∧ c f = d)) :    simple_graph_edge_is_rich G c e := by  intro f f2 hf hg hfg hc  obtain ⟨d1, d2, d3, d4, d5, d6⟩ := hdist  rcases h f hf with ⟨fA, fa⟩ | ⟨fA, fa⟩ | ⟨fA, fa⟩ | ⟨fA, fa⟩ <;>  rcases h f2 hg with ⟨gA, ga⟩ | ⟨gA, ga⟩ | ⟨gA, ga⟩ | ⟨gA, ga⟩ <;>  first    | exact hfg (Subtype.ext (fA.trans gA.symm))    | (rw [fa, ga] at hc; first | exact absurd hc ‹_› | exact absurd hc.symm ‹_›)theorem op309_diamond_template_rich_star    {V : Type*} [DecidableEq V] (G : SimpleGraph V)    (u v a b x y : V) (hdist : [u,v,a,b].Nodup)    (hx : x ∉ [u,v,a,b]) (hy : y ∉ [u,v,a,b])    (hu : ∀ w, G.Adj u w ↔ w = v ∨ w = a ∨ w = b)    (hv : ∀ w, G.Adj v w ↔ w = u ∨ w = a ∨ w = b)    (ha : ∀ w, G.Adj a w ↔ w = u ∨ w = v ∨ w = x)    (hb : ∀ w, G.Adj b w ↔ w = u ∨ w = v ∨ w = y)    (c : G.edgeSet → Fin 5)    (h0 : ∀ e : G.edgeSet, e.1 = s(u,v) → c e = 2)    (h1 : ∀ e : G.edgeSet, e.1 = s(u,a) → c e = 1)    (h2 : ∀ e : G.edgeSet, e.1 = s(u,b) → c e = 0)    (h3 : ∀ e : G.edgeSet, e.1 = s(v,a) → c e = 3)    (h4 : ∀ e : G.edgeSet, e.1 = s(v,b) → c e = 4)    (h5 : ∀ e : G.edgeSet, e.1 = s(a,x) → c e = 0)    (h6 : ∀ e : G.edgeSet, e.1 = s(b,y) → c e = 1) :    (∀ e : G.edgeSet, e.1 = s(u,v) → simple_graph_edge_is_rich G c e) ∧    (∀ e : G.edgeSet, e.1 = s(v,a) → simple_graph_edge_is_rich G c e) ∧    (∀ e : G.edgeSet, e.1 = s(v,b) → simple_graph_edge_is_rich G c e) := by  refine ⟨?_, ?_, ?_⟩  · intro e he    refine op309_dia_tmpl_rich_of_four G c e s(u,a) s(u,b) s(v,a) s(v,b) 1 0 3 4 (by decide) ?_    intro f hf    obtain ⟨t, ⟨ht, htq, hft⟩ | ⟨ht, htq, hft⟩⟩ := op309_dia_tmpl_adj_cases G e f u v he hf    · rcases (hu t).mp ht with h | h | h <;> subst t      · exact absurd rfl htq      · exact Or.inl ⟨hft, h1 f hft⟩      · exact Or.inr (Or.inl ⟨hft, h2 f hft⟩)    · rcases (hv t).mp ht with h | h | h <;> subst t      · exact absurd rfl htq      · exact Or.inr (Or.inr (Or.inl ⟨hft, h3 f hft⟩))      · exact Or.inr (Or.inr (Or.inr ⟨hft, h4 f hft⟩))  · intro e he    refine op309_dia_tmpl_rich_of_four G c e s(u,v) s(v,b) s(u,a) s(a,x) 2 4 1 0 (by decide) ?_    intro f hf    obtain ⟨t, ⟨ht, htq, hft⟩ | ⟨ht, htq, hft⟩⟩ := op309_dia_tmpl_adj_cases G e f v a he hf    · rcases (hv t).mp ht with h | h | h <;> subst t      · have : (f : Sym2 V) = s(u, v) := hft.trans Sym2.eq_swap        exact Or.inl ⟨this, h0 f this⟩      · exact absurd rfl htq      · exact Or.inr (Or.inl ⟨hft, h4 f hft⟩)    · rcases (ha t).mp ht with h | h | h <;> subst t      · have : (f : Sym2 V) = s(u, a) := hft.trans Sym2.eq_swap        exact Or.inr (Or.inr (Or.inl ⟨this, h1 f this⟩))      · exact absurd rfl htq      · exact Or.inr (Or.inr (Or.inr ⟨hft, h5 f hft⟩))  · intro e he    refine op309_dia_tmpl_rich_of_four G c e s(u,v) s(v,a) s(u,b) s(b,y) 2 3 0 1 (by decide) ?_    intro f hf    obtain ⟨t, ⟨ht, htq, hft⟩ | ⟨ht, htq, hft⟩⟩ := op309_dia_tmpl_adj_cases G e f v b he hf    · rcases (hv t).mp ht with h | h | h <;> subst t      · have : (f : Sym2 V) = s(u, v) := hft.trans Sym2.eq_swap        exact Or.inl ⟨this, h0 f this⟩      · exact Or.inr (Or.inl ⟨hft, h3 f hft⟩)      · exact absurd rfl htq    · rcases (hb t).mp ht with h | h | h <;> subst t      · have : (f : Sym2 V) = s(u, b) := hft.trans Sym2.eq_swap        exact Or.inr (Or.inr (Or.inl ⟨this, h2 f this⟩))      · exact absurd rfl htq      · exact Or.inr (Or.inr (Or.inr ⟨hft, h6 f hft⟩))
See it in the graphDiscuss this resultChallenge it