AFTD Auto-Formalizing Theoretical Domains

simple_graph_pendant_triple_recolor

def

The edge-colour function of the pendant-triple expansion attached to a colouring f of all vertex pairs of G: an edge coming from an old edge keeps its colour, the two new end edges u-0 and 2-v both get x, the new path edges 0-1 and 1-2 get y and z, and the three pendant edges 03, 14, 25 get A, B, C.

Statement

noncomputable def simple_graph_pendant_triple_recolor {V : Type*} (G : SimpleGraph V) (u v : V)
    (f : Sym2 V → Fin 5) (x y z A B C : Fin 5) :
    (simple_graph_pendant_triple_expand G u v).edgeSet → Fin 5
Source
step towards simple_graph_rich_neighbor_five_pendant_triple_extend
Verified
24 Oct 2026
Axioms
none listed
Built on 1
  • simple_graph_pendant_triple_expandReplace uv by the path u-0-1-2-v on three fresh internal vertices, with fresh pendant leaves 3,4,5 at 0,1,2. Other original edges remain…

Lean source view module on GitHub

/-- Edge colour function for the triple expansion: old edges keep the colour `f`, the end edges `u-0`,`2-v` get `x`, the paths edges `0-1`,`1-2` get `y`,`z`, the pendants `03`,`14`,`25` get `A`,`B`,`C`. -/
noncomputable def simple_graph_pendant_triple_recolor {V : Type*} (G : SimpleGraph V) (u v : V)
    (f : Sym2 V → Fin 5) (x y z A B C : Fin 5) :
    (simple_graph_pendant_triple_expand G u v).edgeSet → Fin 5 := fun E => by
    classical
    exact
      if h : (E : Sym2 (V ⊕ Fin 6)) ∈ Set.range (Sym2.map Sum.inl) then f (Classical.choose h)
      else if (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inl u, Sum.inr 0) then x
      else if (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 0, Sum.inr 1) then y
      else if (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 1, Sum.inr 2) then z
      else if (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 2, Sum.inl v) then x
      else if (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 0, Sum.inr 3) then A
      else if (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 1, Sum.inr 4) then B
      else if (E : Sym2 (V ⊕ Fin 6)) = s(Sum.inr 2, Sum.inr 5) then C
      else x
See it in the graphDiscuss this resultChallenge it