AFTD Auto-Formalizing Theoretical Domains

op309_clawfree_cubic_every_vertex_in_triangle

theoremverified

Every vertex of a finite claw-free cubic graph lies in a triangle.

Statement

theorem op309_clawfree_cubic_every_vertex_in_triangle
    {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (hclaw : IsClawFree G)
    (hdegree : ∀ v, G.degree v = 3) :
    ∀ v, ∃ a b, a ≠ b ∧ G.Adj v a ∧ G.Adj v b ∧ G.Adj a b
Source
Elementary structural step in the claw-free cubic route to OP-309.
Verified
20 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 2
  • IsClawFreeA simple graph G is claw-free if it does not contain the complete bipartite graph K_{1,3} as an induced subgraph.
  • is_claw_free_triple_neighborsIn any claw-free graph, among any three distinct neighbors of a vertex, at least two are adjacent.

The proof, explained

To show that every vertex v in a claw-free cubic graph belongs to a triangle, we inspect the neighborhood of v. Since the graph is cubic, v has exactly three distinct neighbors. Because the graph is claw-free, these three neighbors cannot form an independent set, so at least two of them must be adjacent to each other. That adjacent pair together with v forms a triangle containing v.

  1. Let v be an arbitrary vertex; its neighborhood consists of three pairwise distinct vertices a, b, c.

    Fix a vertex v. Since the graph G is cubic, the degree of v is 3, which means its neighbor finset has cardinality 3 by G.card_neighborFinset_eq_degree. By Finset.card_eq_three.mp, any 3-element finite set can be written as {a, b, c} with a ≠ b, a ≠ c, and b ≠ c.

    lines 6–8

    uses G.card_neighborFinset_eq_degree, Finset.card_eq_three.mp

      intro v
      have h3 : (G.neighborFinset v).card = 3 := by rw [G.card_neighborFinset_eq_degree]; exact hdegree v
      obtain ⟨a, b, c, hab, hac, hbc, hN⟩ := Finset.card_eq_three.mp h3
  2. The vertex v is adjacent to each of a, b, and c.

    Since the neighbor finset of v is {a, b, c}, each of the vertices a, b, and c belongs to this finset (verified by simp). Applying G.mem_neighborFinset translates set membership into the adjacency relations G.Adj v a, G.Adj v b, and G.Adj v c.

    lines 9–11

    uses G.mem_neighborFinset

      have ha : G.Adj v a := (G.mem_neighborFinset v a).mp (by rw [hN]; simp)
      have hb : G.Adj v b := (G.mem_neighborFinset v b).mp (by rw [hN]; simp)
      have hc : G.Adj v c := (G.mem_neighborFinset v c).mp (by rw [hN]; simp)
  3. The vertex v belongs to a triangle.

    Because G is claw-free, is_claw_free_triple_neighbors implies that among the three distinct neighbors a, b, c of v, at least one pair must be adjacent: a ~ b, a ~ c, or b ~ c. In each case, v and that pair of adjacent neighbors form the desired triangle.

    lines 12–15

    uses is_claw_free_triple_neighbors

      rcases is_claw_free_triple_neighbors G hclaw v a b c ha hb hc hab hbc hac with h | h | h
      · exact ⟨a, b, hab, ha, hb, h⟩
      · exact ⟨a, c, hac, ha, hc, h⟩
      · exact ⟨b, c, hbc, hb, hc, h⟩
G.card_neighborFinset_eq_degree
The cardinality of the neighbor finset of a vertex equals its degree.
Finset.card_eq_three.mp
A finite set has cardinality 3 if and only if it consists of three pairwise distinct elements (here used via the forward implication).
G.mem_neighborFinset
A vertex w is in the neighbor finset of v if and only if v is adjacent to w.
is_claw_free_triple_neighbors
In a claw-free graph, among any three pairwise distinct neighbors of a vertex, at least two must be adjacent to each other.

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_clawfree_cubic_every_vertex_in_triangle    {V : Type*} [Fintype V] [DecidableEq V]    (G : SimpleGraph V) [DecidableRel G.Adj] (hclaw : IsClawFree G)    (hdegree : ∀ v, G.degree v = 3) :    ∀ v, ∃ a b, a ≠ b ∧ G.Adj v a ∧ G.Adj v b ∧ G.Adj a b := by  intro v  have h3 : (G.neighborFinset v).card = 3 := by rw [G.card_neighborFinset_eq_degree]; exact hdegree v  obtain ⟨a, b, c, hab, hac, hbc, hN⟩ := Finset.card_eq_three.mp h3  have ha : G.Adj v a := (G.mem_neighborFinset v a).mp (by rw [hN]; simp)  have hb : G.Adj v b := (G.mem_neighborFinset v b).mp (by rw [hN]; simp)  have hc : G.Adj v c := (G.mem_neighborFinset v c).mp (by rw [hN]; simp)  rcases is_claw_free_triple_neighbors G hclaw v a b c ha hb hc hab hbc hac with h | h | h  · exact ⟨a, b, hab, ha, hb, h⟩  · exact ⟨a, c, hac, ha, hc, h⟩  · exact ⟨b, c, hbc, hb, hc, h⟩
See it in the graphDiscuss this resultChallenge it