AFTD Auto-Formalizing Theoretical Domains

op309_clawfree_cubic_at_most_one_triangle_free_edge

theoremverified

In a finite claw-free cubic graph, no vertex has two distinct edges that lie in no triangle; that is, if vx and vy are distinct edges and neither has a common neighbour of its endpoints, we get a contradiction.

Statement

theorem op309_clawfree_cubic_at_most_one_triangle_free_edge
    {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (hclaw : IsClawFree G)
    (hdegree : ∀ v, G.degree v = 3) (v x y : V)
    (hx : G.Adj v x) (hy : G.Adj v y) (hxy : x ≠ y)
    (hxT : ∀ w, ¬ (G.Adj v w ∧ G.Adj x w)) (hyT : ∀ w, ¬ (G.Adj v w ∧ G.Adj y w)) :
    False
Source
Step towards op309_claw_free_cubic_rich_neighbor_five (OP-309): the triangle-free edges of a claw-free cubic graph form a matching.
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

The proof argues by contradiction: if a vertex v in a claw-free cubic graph has two distinct incident edges vx and vy that lie in no triangle, then v must have at least four neighbors. Claw-freeness forces the three neighbors of v to contain an edge between some pair, producing a triangle containing v and two neighbors p and q. Because vx and vy are triangle-free, neither p nor q can equal x or y, implying that p, q, x, and y are four distinct neighbors of v, which contradicts the fact that v has degree 3.

  1. The neighborhood of v consists of exactly three pairwise distinct vertices a, b, c, all adjacent to v.

    Because G is 3-regular, the degree of v is 3, which equals the cardinality of its neighbor finset (by G.card_neighborFinset_eq_degree). By Finset.card_eq_three.mp, this neighbor set consists of three pairwise distinct vertices a, b, and c. By definition of the neighborhood finset (G.mem_neighborFinset), each of a, b, and c is adjacent to v.

    lines 8–13

    uses G.card_neighborFinset_eq_degree, Finset.card_eq_three.mp, G.mem_neighborFinset

      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)
  2. There exist two distinct neighbors p and q of v that are adjacent to each other.

    Since G is claw-free, no vertex can have three mutually non-adjacent neighbors; that is, among any three neighbors of v, at least one pair is connected by an edge (is_claw_free_triple_neighbors). Applying this to the three distinct neighbors a, b, and c yields a pair of adjacent neighbors, which we designate as p and q.

    lines 14–19

    uses is_claw_free_triple_neighbors

      have tri : ∃ p q, p ≠ q ∧ G.Adj v p ∧ G.Adj v q ∧ G.Adj p q := by
        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⟩
      obtain ⟨p, q, hpq, hp, hq, hpq'⟩ := tri
  3. The vertices p and q are distinct from both x and y.

    If p were equal to x, then q would be a common neighbor of v and x (since v is adjacent to q and p is adjacent to q), contradicting the assumption that the edge vx lies in no triangle (hxT). Symmetrically, p ≠ y by hyT, q ≠ x by hxT, and q ≠ y by hyT.

    lines 20–23

      have hpx : p ≠ x := by rintro rfl; exact hxT q ⟨hq, hpq'⟩
      have hpy : p ≠ y := by rintro rfl; exact hyT q ⟨hq, hpq'⟩
      have hqx : q ≠ x := by rintro rfl; exact hxT p ⟨hp, hpq'.symm⟩
      have hqy : q ≠ y := by rintro rfl; exact hyT p ⟨hp, hpq'.symm⟩
  4. The set {p, q, x, y} is a subset of the neighborhood of v.

    Every element of {p, q, x, y} is adjacent to v: p and q are neighbors of v by their construction as part of the triangle at v, while x and y are neighbors of v by assumption (hx and hy). By unfolding membership in the neighbor finset (G.mem_neighborFinset), each of the four vertices belongs to G.neighborFinset v.

    lines 24–28

    uses Finset.mem_insert, Finset.mem_singleton, G.mem_neighborFinset

      have hsub : ({p, q, x, y} : Finset V) ⊆ G.neighborFinset v := by
        intro t ht
        simp only [Finset.mem_insert, Finset.mem_singleton] at ht
        rw [G.mem_neighborFinset]
        rcases ht with rfl | rfl | rfl | rfl <;> assumption
  5. The set {p, q, x, y} has cardinality 4.

    By assumption, x ≠ y, so the pair {x, y} has cardinality 2 (Finset.card_pair). Since q is distinct from both x and y, inserting q produces a set of cardinality 3. Finally, since p is distinct from q, x, and y, inserting p yields a set of cardinality 4 (Finset.card_insert_of_notMem).

    lines 29–32

    uses Finset.card_insert_of_notMem, Finset.card_pair

      have hcard : ({p, q, x, y} : Finset V).card = 4 := by
        rw [Finset.card_insert_of_notMem, Finset.card_insert_of_notMem, Finset.card_pair hxy]
        · simp [hqx, hqy]
        · simp [hpq, hpx, hpy]
  6. A contradiction 4 ≤ 3 is obtained, concluding the proof.

    Since {p, q, x, y} is a subset of the neighborhood of v, the cardinality of {p, q, x, y} is at most the cardinality of the neighbor set (Finset.card_le_card). Substituting the calculated cardinality 4 and the degree 3 (using G.card_neighborFinset_eq_degree and the 3-regularity hypothesis) yields 4 ≤ 3, which is an arithmetic impossibility resolved by omega.

    lines 33–35

    uses Finset.card_le_card, G.card_neighborFinset_eq_degree

      have := Finset.card_le_card hsub
      rw [hcard, G.card_neighborFinset_eq_degree, hdegree] at this
      omega
G.card_neighborFinset_eq_degree
The number of vertices in 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 belongs to the neighbor finset of v if and only if it is adjacent to v.
is_claw_free_triple_neighbors
In a claw-free graph, among any three distinct neighbors of a vertex, at least two must be adjacent to each other.
Finset.mem_insert
An element belongs to insert b s if and only if it equals b or belongs to s.
Finset.mem_singleton
An element belongs to the singleton {a} if and only if it equals a.
Finset.card_insert_of_notMem
Inserting an element not already in a finite set increases its cardinality by 1.
Finset.card_pair
A pair of distinct elements forms a finset of cardinality 2.
Finset.card_le_card
If one finite set is a subset of another, its cardinality is at most that of the 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_at_most_one_triangle_free_edge    {V : Type*} [Fintype V] [DecidableEq V]    (G : SimpleGraph V) [DecidableRel G.Adj] (hclaw : IsClawFree G)    (hdegree : ∀ v, G.degree v = 3) (v x y : V)    (hx : G.Adj v x) (hy : G.Adj v y) (hxy : x ≠ y)    (hxT : ∀ w, ¬ (G.Adj v w ∧ G.Adj x w)) (hyT : ∀ w, ¬ (G.Adj v w ∧ G.Adj y w)) :    False := by  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)  have tri : ∃ p q, p ≠ q ∧ G.Adj v p ∧ G.Adj v q ∧ G.Adj p q := by    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⟩  obtain ⟨p, q, hpq, hp, hq, hpq'⟩ := tri  have hpx : p ≠ x := by rintro rfl; exact hxT q ⟨hq, hpq'⟩  have hpy : p ≠ y := by rintro rfl; exact hyT q ⟨hq, hpq'⟩  have hqx : q ≠ x := by rintro rfl; exact hxT p ⟨hp, hpq'.symm⟩  have hqy : q ≠ y := by rintro rfl; exact hyT p ⟨hp, hpq'.symm⟩  have hsub : ({p, q, x, y} : Finset V) ⊆ G.neighborFinset v := by    intro t ht    simp only [Finset.mem_insert, Finset.mem_singleton] at ht    rw [G.mem_neighborFinset]    rcases ht with rfl | rfl | rfl | rfl <;> assumption  have hcard : ({p, q, x, y} : Finset V).card = 4 := by    rw [Finset.card_insert_of_notMem, Finset.card_insert_of_notMem, Finset.card_pair hxy]    · simp [hqx, hqy]    · simp [hpq, hpx, hpy]  have := Finset.card_le_card hsub  rw [hcard, G.card_neighborFinset_eq_degree, hdegree] at this  omega
See it in the graphDiscuss this resultChallenge it