AFTD Auto-Formalizing Theoretical Domains

simple_graph_opposite_pair_stable_external_k4_attachment

theoremverified

Let P be a maximum edge-disjoint triangle packing containing abc, and let x outside its vertex support complete abc to a four-clique. If deleting the opposite edges ab and cx preserves the packing number, then another triangle of P contains a or b and a vertex y outside abc that is adjacent to x.

Statement

theorem simple_graph_opposite_pair_stable_external_k4_attachment (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (a b c x : Fin n) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hmax : P.card = simple_graph_triangle_packing_number G) (hp : ({a,b,c} : Finset (Fin n)) ∈ P) (hx : x ∉ P.biUnion id) (hk4 : G.IsNClique 4 ({a,b,c,x} : Finset (Fin n))) (hstable : simple_graph_triangle_packing_number (G.deleteEdges {s(a,b), s(c,x)}) = simple_graph_triangle_packing_number G) : ∃ t ∈ P, t ≠ ({a,b,c} : Finset (Fin n)) ∧ (a ∈ t ∨ b ∈ t) ∧ ∃ y ∈ t, y ∉ ({a,b,c} : Finset (Fin n)) ∧ G.Adj x y
Source
Structural reduction of the pair-stable forced-K4 branch of simple_graph_triangle_cover_number_le_two_mul_packing_number.
Verified
25 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 3

The proof, explained

Because x lies outside the vertex support of the triangle packing P, it belongs to no triangle of P. Consequently, no triangle in P contains both x and a, or both x and b, which satisfies the spoke condition required by simple_graph_opposite_pair_stable_k4_attachment. Applying this lemma yields a distinct triangle t ∈ P and a vertex y ∈ t outside {a, b, c, x} satisfying one of two attachment configurations. The case where x ∈ t is impossible because x belongs to no triangle in P, leaving the configuration where t contains a or b and y is adjacent to x, with y outside {a, b, c}.

  1. The vertex x does not belong to any triangle in the packing P.

    If x belonged to some triangle t ∈ P, then x would belong to the union of all triangles in P (by Finset.mem_biUnion.mpr), contradicting the assumption that x ∉ ⋃ P.

    lines 4–7

    uses Finset.mem_biUnion.mpr

      have hxnot : ∀ t ∈ P, x ∉ t := by
        intro t ht hxt
        apply hx
        exact Finset.mem_biUnion.mpr ⟨t, ht, hxt⟩
  2. No triangle in P contains both x and a, nor does any triangle in P contain both x and b.

    If a triangle t ∈ P contained both x and a (or both x and b), then in particular x ∈ t, which directly contradicts the fact just proved that x belongs to no triangle in P.

    lines 8–10

      have hspokes : ∀ t ∈ P, ¬ (x ∈ t ∧ a ∈ t) ∧ ¬ (x ∈ t ∧ b ∈ t) := by
        intro t ht
        constructor <;> intro h <;> exact hxnot t ht h.1
  3. There exists a triangle t ∈ P distinct from {a, b, c} and a vertex y ∈ t outside {a, b, c, x} such that either (a ∈ t ∨ b ∈ t) with x adjacent to y, or x ∈ t with y adjacent to a or b.

    This is an application of the lemma simple_graph_opposite_pair_stable_k4_attachment, whose spoke hypothesis was verified in the previous step.

    lines 11–12

    uses simple_graph_opposite_pair_stable_k4_attachment

      obtain ⟨t, ht, htne, y, hyt, hyout, hatt⟩ :=
        simple_graph_opposite_pair_stable_k4_attachment n G P a b c x htri hdisj hmax hp hk4 hspokes hstable
  4. The triangle t and vertex y satisfy all required conditions, concluding the proof.

    We perform a case split on the attachment disjunction. The alternative where x ∈ t is ruled out immediately by False.elim, since x belongs to no triangle in P. In the remaining alternative, t contains a or b, and x is adjacent to y. To show y ∉ {a, b, c}, we observe that if y were in {a, b, c}, then y = a, b, or c (by Finset.mem_insert and Finset.mem_singleton), which would place y in {a, b, c, x} (via Or.inl and Or.inr), contradicting y ∉ {a, b, c, x}.

    lines 13–22

    uses Finset.mem_insert, Finset.mem_singleton, Or.inl, Or.inr, False.elim

      rcases hatt with ⟨hab, hxy⟩ | ⟨hxt, -⟩
      · refine ⟨t, ht, htne, hab, y, hyt, ?_, hxy⟩
        intro hy
        apply hyout
        simp only [Finset.mem_insert, Finset.mem_singleton] at hy ⊢
        rcases hy with rfl | rfl | rfl
        · exact Or.inl rfl
        · exact Or.inr (Or.inl rfl)
        · exact Or.inr (Or.inr (Or.inl rfl))
      · exact False.elim (hxnot t ht hxt)
False.elim
From a contradiction (False), any conclusion follows.
Finset.mem_biUnion.mpr
An element belongs to the union ⋃ (a ∈ s), f a if it belongs to f a for some a ∈ s.
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.
Or.inl
From a proof of P, infers P ∨ Q (left disjunction introduction).
Or.inr
From a proof of Q, infers P ∨ Q (right disjunction introduction).
simple_graph_opposite_pair_stable_k4_attachment
If P is a maximum triangle packing containing abc, abcx is a 4-clique, deleting opposite edges ab and cx preserves the packing number, and no triangle of P contains {x, a} or {x, b}, then some triangle t ∈ P distinct from abc contains a vertex y ∉ {a, b, c, x} such that either (a ∈ t ∨ b ∈ t) with x adjacent to y, or x ∈ t with y adjacent to a or b.

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

open scoped Sym2theorem simple_graph_opposite_pair_stable_external_k4_attachment (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (P : Finset (Finset (Fin n))) (a b c x : Fin n) (htri : ∀ t ∈ P, G.IsNClique 3 t) (hdisj : (P : Set (Finset (Fin n))).Pairwise (fun t u => (t ∩ u).card ≤ 1)) (hmax : P.card = simple_graph_triangle_packing_number G) (hp : ({a,b,c} : Finset (Fin n)) ∈ P) (hx : x ∉ P.biUnion id) (hk4 : G.IsNClique 4 ({a,b,c,x} : Finset (Fin n))) (hstable : simple_graph_triangle_packing_number (G.deleteEdges {s(a,b), s(c,x)}) = simple_graph_triangle_packing_number G) : ∃ t ∈ P, t ≠ ({a,b,c} : Finset (Fin n)) ∧ (a ∈ t ∨ b ∈ t) ∧ ∃ y ∈ t, y ∉ ({a,b,c} : Finset (Fin n)) ∧ G.Adj x y := by  have hxnot : ∀ t ∈ P, x ∉ t := by    intro t ht hxt    apply hx    exact Finset.mem_biUnion.mpr ⟨t, ht, hxt⟩  have hspokes : ∀ t ∈ P, ¬ (x ∈ t ∧ a ∈ t) ∧ ¬ (x ∈ t ∧ b ∈ t) := by    intro t ht    constructor <;> intro h <;> exact hxnot t ht h.1  obtain ⟨t, ht, htne, y, hyt, hyout, hatt⟩ :=    simple_graph_opposite_pair_stable_k4_attachment n G P a b c x htri hdisj hmax hp hk4 hspokes hstable  rcases hatt with ⟨hab, hxy⟩ | ⟨hxt, -⟩  · refine ⟨t, ht, htne, hab, y, hyt, ?_, hxy⟩    intro hy    apply hyout    simp only [Finset.mem_insert, Finset.mem_singleton] at hy ⊢    rcases hy with rfl | rfl | rfl    · exact Or.inl rfl    · exact Or.inr (Or.inl rfl)    · exact Or.inr (Or.inr (Or.inl rfl))  · exact False.elim (hxnot t ht hxt)
See it in the graphDiscuss this resultChallenge it