AFTD Auto-Formalizing Theoretical Domains

op1957_barrier_separator_at_most_c_minus_three

theoremverified

Barrier separator at most c minus three.

Statement

theorem op1957_barrier_separator_at_most_c_minus_three
    (k c : ℕ) (hc : 7 ≤ c) (hkc : c ≤ k)
    (G : SimpleGraph (Fin (4*k))) [DecidableRel G.Adj]
    (S U D : Finset (Fin (4*k))) (y : Fin (4*k))
    (hD : D.card=2*k-c) (hyD : y ∉ D) (hyU : y ∉ U) (hUD : Disjoint U D)
    (hnoD : ∀ d ∈ D, ¬ G.Adj y d) (hnoU : ∀ u ∈ U, ¬ G.Adj y u)
    (hdegree : 2*k+2 ≤ (G.neighborFinset y).card)
    (hSU : S.card ≤ U.card) :
    S.card+3 ≤ c
Source
OP-1957; positive-separator graph-to-count transfer.
Verified
26 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1

The proof, explained

The theorem establishes that |S| + 3 ≤ c for a separator candidate S. The proof applies an anticomplete defect bound lemma to show that the set of non-neighbors of y outside D ∪ {y} has cardinality at most c - 3. Since U is disjoint from D, excludes y, and has no edges to y, U embeds into this non-neighbor set, giving |U| ≤ c - 3; combining this with |S| ≤ |U| yields |S| + 3 ≤ c.

  1. The total number of vertices decomposes as |V| = |D| + (2*k + c - 1) + 1.

    Working classically, we simplify the cardinality of the vertex set Fin (4*k) to 4*k using Fintype.card_fin. Given |D| = 2*k - c, 7 ≤ c, and c ≤ k, the identity 4*k = (2*k - c) + (2*k + c - 1) + 1 holds by linear arithmetic.

    lines 12–15

    uses Fintype.card_fin

      classical
      have hsize : Fintype.card (Fin (4*k)) = D.card+(2*k+c-1)+1 := by
        simp only [Fintype.card_fin]
        omega
  2. The defect parameter satisfies 2*k + c - 1 ≤ deg(y) + (c - 3).

    From the hypothesis deg(y) ≥ 2*k + 2 and the condition c ≥ 7, linear arithmetic verifies that 2*k + c - 1 ≤ deg(y) + (c - 3).

    line 16

      have hd : 2*k+c-1 ≤ (G.neighborFinset y).card+(c-3) := by omega
  3. The number of vertices outside D ∪ {y} that are non-neighbors of y is at most c - 3.

    Applying the lemma anticomplete_neighbor_defect_bound with parameters d = 2*k + c - 1 and r = c - 3, using that y ∉ D, y has no edges to D, and the vertex count and degree bounds established above, we conclude that the set of non-neighbors of y outside D ∪ {y} has cardinality at most c - 3.

    line 17

    uses anticomplete_neighbor_defect_bound

      have hb := anticomplete_neighbor_defect_bound G D y hyD hnoD (2*k+c-1) (c-3) hsize hd
  4. U is a subset of the non-neighbors of y outside D ∪ {y}.

    Let u ∈ U. Since y ∉ U, we have u ≠ y. Since U and D are disjoint, u ∉ D. Moreover, by assumption no vertex in U is adjacent to y, so u ∉ N(y). Unfolding the definitions of set difference, set erasure, universal set, and graph neighborhood, u belongs to ((Finset.univ \ D).erase y) \ G.neighborFinset y.

    lines 18–24

    uses Finset.disjoint_left.mp, Finset.mem_sdiff, Finset.mem_erase, Finset.mem_univ, true_and, SimpleGraph.mem_neighborFinset

      have hsub : U ⊆ (((Finset.univ \ D).erase y) \ G.neighborFinset y) := by
        intro u hu
        have hune : u ≠ y := fun h => hyU (h ▸ hu)
        have huD : u ∉ D := fun h => Finset.disjoint_left.mp hUD hu h
        simp only [Finset.mem_sdiff,Finset.mem_erase,Finset.mem_univ,true_and,
          SimpleGraph.mem_neighborFinset]
        exact ⟨⟨hune,huD⟩,hnoU u hu⟩
  5. |U| ≤ c - 3.

    Because U is a subset of ((Finset.univ \ D).erase y) \ G.neighborFinset y, its cardinality is at most the cardinality of that set via Finset.card_le_card, which was shown in step 3 to be at most c - 3.

    line 25

    uses Finset.card_le_card

      have hU : U.card ≤ c-3 := (Finset.card_le_card hsub).trans hb
  6. |S| + 3 ≤ c.

    Combining |S| ≤ |U| from the hypothesis with |U| ≤ c - 3, linear arithmetic closes the goal.

    line 26

      omega
Fintype.card_fin
The number of elements in the finite type Fin n is n.
anticomplete_neighbor_defect_bound
If a vertex x has no neighbors in a set B, the total number of vertices is |B| + d + 1, and the degree of x is at least d - r, then the number of non-neighbors of x outside B ∪ {x} is at most r.
Finset.disjoint_left.mp
If two finite sets are disjoint, any element of the first set is not in the second.
Finset.mem_sdiff
An element belongs to the set difference s \ t if and only if it belongs to s and does not belong to t.
Finset.mem_erase
An element a belongs to s.erase b if and only if a ≠ b and a ∈ s.
Finset.mem_univ
Every element of a finite type belongs to the universal finite set Finset.univ.
true_and
The conjunction True ∧ p is equivalent to p.
SimpleGraph.mem_neighborFinset
A vertex w belongs to the neighbor finite set of v if and only if v and w are adjacent.
Finset.card_le_card
If s is a subset of t, then the cardinality of s is at most the cardinality of t.

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 op1957_barrier_separator_at_most_c_minus_three    (k c : ℕ) (hc : 7 ≤ c) (hkc : c ≤ k)    (G : SimpleGraph (Fin (4*k))) [DecidableRel G.Adj]    (S U D : Finset (Fin (4*k))) (y : Fin (4*k))    (hD : D.card=2*k-c) (hyD : y ∉ D) (hyU : y ∉ U) (hUD : Disjoint U D)    (hnoD : ∀ d ∈ D, ¬ G.Adj y d) (hnoU : ∀ u ∈ U, ¬ G.Adj y u)    (hdegree : 2*k+2 ≤ (G.neighborFinset y).card)    (hSU : S.card ≤ U.card) :    S.card+3 ≤ c := by  classical  have hsize : Fintype.card (Fin (4*k)) = D.card+(2*k+c-1)+1 := by    simp only [Fintype.card_fin]    omega  have hd : 2*k+c-1 ≤ (G.neighborFinset y).card+(c-3) := by omega  have hb := anticomplete_neighbor_defect_bound G D y hyD hnoD (2*k+c-1) (c-3) hsize hd  have hsub : U ⊆ (((Finset.univ \ D).erase y) \ G.neighborFinset y) := by    intro u hu    have hune : u ≠ y := fun h => hyU (h ▸ hu)    have huD : u ∉ D := fun h => Finset.disjoint_left.mp hUD hu h    simp only [Finset.mem_sdiff,Finset.mem_erase,Finset.mem_univ,true_and,      SimpleGraph.mem_neighborFinset]    exact ⟨⟨hune,huD⟩,hnoU u hu⟩  have hU : U.card ≤ c-3 := (Finset.card_le_card hsub).trans hb  omega
See it in the graphDiscuss this resultChallenge it