AFTD Auto-Formalizing Theoretical Domains

group_vertex_degree_budget

theoremverified

A vertex whose neighbors lie in its group, separator or outside pool has the displayed degree budget.

Statement

theorem group_vertex_degree_budget
    {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (F S T : Finset V) (v : V) (hv : v ∈ F)
    (hcover : ∀ w, G.Adj v w → w ∈ F ∨ w ∈ S ∨ w ∈ T) :
    (G.neighborFinset v).card + 1 ≤ F.card + S.card + T.card
Source
OP-1957; graph-to-count transfer for the deleted-four-block matching obstruction.
Verified
26 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Used by 1

The proof, explained

We bound the degree of v plus one by showing that the neighborhood of v is contained in (F \ {v}) ∪ S ∪ T and applying union bounds. Every neighbor of v lies in F, S, or T by assumption; since simple graphs have no self-loops, any neighbor in F cannot be v itself, so it belongs to F \ {v}. The result then follows from the subadditivity of cardinality over unions together with the relation |F \ {v}| + 1 = |F| because v ∈ F.

  1. Every neighbor of v belongs to (F \ {v}) ∪ S ∪ T.

    Let w be a neighbor of v. By definition of neighborFinset in a simple graph, v is adjacent to w. By the covering hypothesis hcover, w must lie in F, S, or T. Because simple graphs have no self-loops (G.ne_of_adj), w cannot equal v. Thus, if w ∈ F, then w ∈ F \ {v}, placing it in (F \ {v}) ∪ S ∪ T. If instead w ∈ S or w ∈ T, it is likewise in the union. Therefore, the neighborhood of v is contained in (F \ {v}) ∪ S ∪ T.

    lines 9–17

    uses SimpleGraph.mem_neighborFinset, G.ne_of_adj, Finset.mem_erase.mpr, Finset.mem_union_left, Finset.mem_union_right

      classical
      have hsub : G.neighborFinset v ⊆ F.erase v ∪ S ∪ T := by
        intro w hw
        have hadj : G.Adj v w := by simpa only [SimpleGraph.mem_neighborFinset] using hw
        rcases hcover w hadj with hF | hS | hT
        · exact Finset.mem_union_left _ (Finset.mem_union_left _
            (Finset.mem_erase.mpr ⟨(G.ne_of_adj hadj).symm,hF⟩))
        · exact Finset.mem_union_left _ (Finset.mem_union_right _ hS)
        · exact Finset.mem_union_right _ hT
  2. The size of the neighborhood of v is at most |F \ {v}| + |S| + |T|, and |F \ {v}| + 1 = |F|.

    From the subset inclusion hsub, the cardinality of the neighborhood is bounded by |(F \ {v}) ∪ S ∪ T| (Finset.card_le_card). Applying subadditivity of cardinality under union twice (Finset.card_union_le) bounds |(F \ {v}) ∪ S ∪ T| by |F \ {v}| + |S| + |T|. Since v ∈ F, removing v reduces the size of F by exactly 1, so |F \ {v}| + 1 = |F| (Finset.card_erase_add_one).

    lines 18–21

    uses Finset.card_le_card, Finset.card_union_le, Finset.card_erase_add_one

      have hcard := Finset.card_le_card hsub
      have hu1 := Finset.card_union_le (F.erase v ∪ S) T
      have hu2 := Finset.card_union_le (F.erase v) S
      have he := Finset.card_erase_add_one hv
  3. (G.neighborFinset v).card + 1 ≤ F.card + S.card + T.card

    The inequality follows by Presburger linear arithmetic (omega) from the established bounds: |N(v)| ≤ |F \ {v}| + |S| + |T|, so adding 1 to both sides and substituting |F \ {v}| + 1 = |F| yields |N(v)| + 1 ≤ |F| + |S| + |T|.

    line 22

      omega
SimpleGraph.mem_neighborFinset
A vertex w is in the neighbor finset of v if and only if v and w are adjacent in G.
G.ne_of_adj
In a simple graph G, adjacent vertices are distinct (there are no self-loops).
Finset.mem_erase.mpr
If an element belongs to a finset and is not equal to a, it belongs to the finset with a erased.
Finset.mem_union_left
An element of a finset s is also an element of the union s ∪ t.
Finset.mem_union_right
An element of a finset t is also an element of the union s ∪ t.
Finset.card_le_card
If a finset s is a subset of a finset t, then |s| ≤ |t|.
Finset.card_union_le
The cardinality of the union of two finsets is at most the sum of their cardinalities: |s ∪ t| ≤ |s| + |t|.
Finset.card_erase_add_one
If an element a belongs to a finset s, then erasing a decreases the cardinality by 1: |s \ {a}| + 1 = |s|.

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

set_option maxHeartbeats 2000000theorem group_vertex_degree_budget    {V : Type*} [Fintype V] [DecidableEq V]    (G : SimpleGraph V) [DecidableRel G.Adj]    (F S T : Finset V) (v : V) (hv : v ∈ F)    (hcover : ∀ w, G.Adj v w → w ∈ F ∨ w ∈ S ∨ w ∈ T) :    (G.neighborFinset v).card + 1 ≤ F.card + S.card + T.card := by  classical  have hsub : G.neighborFinset v ⊆ F.erase v ∪ S ∪ T := by    intro w hw    have hadj : G.Adj v w := by simpa only [SimpleGraph.mem_neighborFinset] using hw    rcases hcover w hadj with hF | hS | hT    · exact Finset.mem_union_left _ (Finset.mem_union_left _        (Finset.mem_erase.mpr ⟨(G.ne_of_adj hadj).symm,hF⟩))    · exact Finset.mem_union_left _ (Finset.mem_union_right _ hS)    · exact Finset.mem_union_right _ hT  have hcard := Finset.card_le_card hsub  have hu1 := Finset.card_union_le (F.erase v ∪ S) T  have hu2 := Finset.card_union_le (F.erase v) S  have he := Finset.card_erase_add_one hv  omega
See it in the graphDiscuss this resultChallenge it