odd_component_bound_after_even_deletions_general
The odd-component count is bounded by the number of uncovered cut vertices plus the number of exceptional components.
Statement
theorem odd_component_bound_after_even_deletions_general (k r : ℕ) (G : SimpleGraph (Fin (4*k))) [DecidableRel G.Adj] (C : Finset (Fin (4*k))) (P T : G.Subgraph) [DecidablePred (fun v => v ∈ T.verts)] (hP : P.IsPerfectMatching) (hT : T.IsMatching) (hTP : T ≤ P) (B : Finset (G.induce {v | v ∉ C}).ConnectedComponent) (hpar : ∀ i ∈ (G.induce {v | v ∉ C}).oddComponents.toFinset, i ∉ B → Even ((in1206_component_vertices G {v | v ∉ C} i) ∩ T.verts.toFinset).card) (hremain : ((C : Set (Fin (4*k))) \ T.verts).ncard = r) : (G.induce {v | v ∉ C}).oddComponents.ncard ≤ r+B.card
- Source
- Balanced-cut parity reduction for OP-1957; https://arxiv.org/abs/2611.22690.
- Verified
- 26 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 2
- odd_groups_budget_after_forced_matchingOdd anticomplete groups disjoint from a forced matching require distinct matching partners outside the groups and outside the forced…
- induced_component_ambient_vertex_propertiesComponents of an induced graph map injectively to disjoint, anticomplete ambient vertex sets with preserved cardinalities.
- Used by 1
- extendible_balanced_cut_odd_bound_of_even_cross_matchingThe opposite side has at most r odd components if the specified crossing matching meets every odd component in an even number of vertices.
The proof, explained
The theorem bounds the number of odd components of G \ C by r + |B|, where r is the number of cut vertices in C not covered by the matching T, and B is a designated set of exceptional components. The strategy is to restrict attention to the non-exceptional odd components J = O \ B, whose vertices have an even intersection with T by hypothesis. Removing V(T) from each component in J yields odd-sized, pairwise disjoint vertex sets avoiding T with no edges to the rest of the unmatched vertices; the budget lemma odd_groups_budget_after_forced_matching then bounds |J| by |C \ V(T)| = r, yielding the desired bound |O| ≤ r + |B|.
Define the remaining vertices R = V \ C, the induced subgraph H = G[R], its odd components O, the non-exceptional odd components J = O \ B, the T-uncovered component vertices F(i) = V(i) \ V(T), and the T-uncovered remaining vertices L = R \ V(T).
These definitions establish the notation used throughout the proof: H is the graph after deleting cut vertices C, J isolates the odd components not in the exceptional set B, and F and L isolate vertices not covered by the matching T.
set_option maxHeartbeats 4000000 in classical let R : Set (Fin (4*k)) := {v | v ∉ C} let H := G.induce R let O : Finset H.ConnectedComponent := H.oddComponents.toFinset let J : Finset H.ConnectedComponent := O \ B let F : H.ConnectedComponent → Finset (Fin (4*k)) := fun i => in1206_component_vertices G R i \ T.verts.toFinset let L : Finset (Fin (4*k)) := R.toFinset \ T.verts.toFinset
The number of odd components of H is at most |J| + |B|.
The odd components O of H partition into those not in B (which is J = O \ B) and those in B (namely O ∩ B). Since |O ∩ B| ≤ |B|, we have |O| = |O \ B| + |O ∩ B| ≤ |J| + |B|.
uses
Set.ncard_eq_toFinset_card',Finset.card_sdiff_add_card_inter,Finset.card_le_card,Finset.inter_subset_righthave hJcard : H.oddComponents.ncard ≤ J.card + B.card := by have hO : O.card = H.oddComponents.ncard := by dsimp [O] exact (Set.ncard_eq_toFinset_card' H.oddComponents).symm have hcount := Finset.card_sdiff_add_card_inter O B have hinter : (O ∩ B).card ≤ B.card := Finset.card_le_card Finset.inter_subset_right dsimp [J] omega
For every non-exceptional odd component i ∈ J, the set of uncovered vertices F(i) has odd cardinality.
For i ∈ J, component i is an odd component of H, so its total vertex set has odd size. Because i ∉ B, hypothesis hpar ensures that the number of vertices in i covered by T is even. Since the vertices of i partition into F(i) and the vertices covered by T, the cardinality |F(i)| is the difference of an odd number and an even number, which is odd.
uses
Finset.mem_sdiff.mp,induced_component_ambient_vertex_properties,Finset.card_sdiff_add_card_inter,Nat.odd_iff,Nat.even_iffhave hJodd : ∀ i ∈ J, Odd (F i).card := by intro i hi have hiO : i ∈ O := (Finset.mem_sdiff.mp hi).1 have hiB : i ∉ B := (Finset.mem_sdiff.mp hi).2 have hiOdd : i ∈ H.oddComponents := by simpa [O] using hiO have hc := (induced_component_ambient_vertex_properties G R i i).2.1 have horig : Odd (in1206_component_vertices G R i).card := by rw [hc] exact hiOdd have heven := hpar i hiO hiB change Even ((in1206_component_vertices G R i) ∩ T.verts.toFinset).card at heven have hcount := Finset.card_sdiff_add_card_inter (in1206_component_vertices G R i) T.verts.toFinset rw [Nat.odd_iff] at horig ⊢ rw [Nat.even_iff] at heven dsimp [F] omega
For each i ∈ J, F(i) is a subset of L.
Every vertex v ∈ F(i) is a vertex of component i (and thus belongs to R) and does not belong to V(T). By definition of L = R \ V(T), v ∈ L.
uses
Finset.mem_sdiff.mp,induced_component_ambient_vertex_properties,Finset.mem_sdiff.mprhave hJsub : ∀ i ∈ J, F i ⊆ L := by intro i hi v hv have hv' := Finset.mem_sdiff.mp hv have hh := (induced_component_ambient_vertex_properties G R i i).1 hv'.1 apply Finset.mem_sdiff.mpr exact ⟨by simpa using hh, hv'.2⟩
The sets F(i) and F(j) are disjoint for distinct components i ≠ j in J.
By induced_component_ambient_vertex_properties, distinct connected components of H have disjoint vertex sets in G. Since F(i) and F(j) are subsets of the respective component vertex sets, they are disjoint as well.
uses
induced_component_ambient_vertex_properties,Finset.sdiff_subsethave hJdis : ∀ i ∈ J, ∀ j ∈ J, i ≠ j → Disjoint (F i) (F j) := by intro i hi j hj hij exact ((induced_component_ambient_vertex_properties G R i j).2.2.1 hij).mono Finset.sdiff_subset Finset.sdiff_subset
There are no edges in G between F(i) and L \ F(i).
Let u ∈ F(i) and v ∈ L \ F(i). Since v ∈ L ⊆ R and v ∉ F(i) with v ∉ V(T), v does not belong to component i. By induced_component_ambient_vertex_properties, there are no edges in G between vertices in component i and any other vertex in R, so u and v cannot be adjacent.
uses
Finset.mem_sdiff.mp,Finset.mem_sdiff.mpr,induced_component_ambient_vertex_propertieshave hJanti : ∀ i ∈ J, ∀ u ∈ F i, ∀ v ∈ L, v ∉ F i → ¬ G.Adj u v := by intro i hi u hu v hv hvnot have hu' := Finset.mem_sdiff.mp hu have hv' := Finset.mem_sdiff.mp hv have hvR : v ∈ R := by simpa using hv'.1 have hvcomp : v ∉ in1206_component_vertices G R i := by intro hh exact hvnot (Finset.mem_sdiff.mpr ⟨hh,hv'.2⟩) exact (induced_component_ambient_vertex_properties G R i i).2.2.2 u hu'.1 v hvR hvcomp
No vertex in F(i) belongs to V(T).
By definition, F(i) removes all vertices in V(T), so every element u ∈ F(i) satisfies u ∉ V(T).
uses
Finset.mem_sdiff.mphave hJfree : ∀ i ∈ J, ∀ u ∈ F i, u ∉ T.verts := by intro i hi u hu simpa using (Finset.mem_sdiff.mp hu).2
The number of non-exceptional odd components |J| is bounded by the number of vertices outside L not covered by T.
Since P is a perfect matching containing T, and the family {F(i)}_{i ∈ J} satisfies all conditions (subsets of L, odd cardinality, pairwise disjoint, no edges to L \ F(i), and disjoint from V(T)), applying the budget lemma odd_groups_budget_after_forced_matching yields |J| ≤ |(V \ L) \ V(T)|.
uses
odd_groups_budget_after_forced_matchinghave hbudget := odd_groups_budget_after_forced_matching G P T hP hT hTP J F L hJsub hJodd hJdis hJanti hJfreeThe budget bound |(V \ L) \ V(T)| is equal to r.
For any vertex v ∉ V(T), v lies outside L = R \ V(T) if and only if v ∉ R = V \ C, which is equivalent to v ∈ C. Therefore, (V \ L) \ V(T) = C \ V(T), whose cardinality is given as r by hypothesis hremain.
uses
Set.ncard_coe_finsethave hcount : ((Finset.univ \ L).filter (fun v => v ∉ T.verts)).card = r := by have heq : (((Finset.univ \ L).filter (fun v => v ∉ T.verts)) : Set (Fin (4*k))) = (C : Set (Fin (4*k))) \ T.verts := by ext v by_cases ht : v ∈ T.verts · simp [ht] · simp [L,R,ht] rw [← Set.ncard_coe_finset,heq,hremain]
The number of odd components of G \ C is at most r + |B|.
Substituting the budget count r gives |J| ≤ r. Combining this with the initial bound |O| ≤ |J| + |B| completes the proof by linear arithmetic.
rw [hcount] at hbudget change H.oddComponents.ncard ≤ r+B.card omega
Set.ncard_eq_toFinset_card'- For any finite set s, its set cardinality ncard(s) equals the cardinality of its finset conversion s.toFinset.
Finset.card_sdiff_add_card_inter- For finsets s and t, the cardinality of s \ t plus the cardinality of s ∩ t equals the cardinality of s.
Finset.card_le_card- If finset s is a subset of finset t, then |s| ≤ |t|.
Finset.inter_subset_right- The intersection s₁ ∩ s₂ is a subset of s₂.
Finset.mem_sdiff.mp- If an element belongs to s \ t, then it belongs to s and does not belong to t.
Finset.mem_sdiff.mpr- If an element belongs to s and does not belong to t, then it belongs to s \ t.
induced_component_ambient_vertex_properties- For the induced subgraph G[R], each connected component's vertex set is a subset of R, has cardinality equal to the component's vertex count, is disjoint from other components' vertex sets, and has no edges in G to any other vertex in R.
Nat.odd_iff- A natural number n is odd if and only if n % 2 = 1.
Nat.even_iff- A natural number n is even if and only if n % 2 = 0.
Finset.sdiff_subset- The set difference s \ t is a subset of s.
odd_groups_budget_after_forced_matching- In a graph with a perfect matching P containing a matching T, any family of pairwise disjoint, odd-sized vertex sets in L that avoid V(T) and have no edges to L \ F(i) has cardinality bounded by the number of vertices outside L not covered by T.
Set.ncard_coe_finset- The set cardinality of a coerced finset ↑s equals its finset cardinality |s|.
- Line 11 raises Lean's heartbeat limit for elaboration. In lines 70–75, the set equality between the filtered universal finset and C \ V(T) is checked elementwise via by_cases on whether v ∈ V(T) and simplified automatically.
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
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
theorem odd_component_bound_after_even_deletions_general (k r : ℕ) (G : SimpleGraph (Fin (4*k))) [DecidableRel G.Adj] (C : Finset (Fin (4*k))) (P T : G.Subgraph) [DecidablePred (fun v => v ∈ T.verts)] (hP : P.IsPerfectMatching) (hT : T.IsMatching) (hTP : T ≤ P) (B : Finset (G.induce {v | v ∉ C}).ConnectedComponent) (hpar : ∀ i ∈ (G.induce {v | v ∉ C}).oddComponents.toFinset, i ∉ B → Even ((in1206_component_vertices G {v | v ∉ C} i) ∩ T.verts.toFinset).card) (hremain : ((C : Set (Fin (4*k))) \ T.verts).ncard = r) : (G.induce {v | v ∉ C}).oddComponents.ncard ≤ r+B.card := by set_option maxHeartbeats 4000000 in classical let R : Set (Fin (4*k)) := {v | v ∉ C} let H := G.induce R let O : Finset H.ConnectedComponent := H.oddComponents.toFinset let J : Finset H.ConnectedComponent := O \ B let F : H.ConnectedComponent → Finset (Fin (4*k)) := fun i => in1206_component_vertices G R i \ T.verts.toFinset let L : Finset (Fin (4*k)) := R.toFinset \ T.verts.toFinset have hJcard : H.oddComponents.ncard ≤ J.card + B.card := by have hO : O.card = H.oddComponents.ncard := by dsimp [O] exact (Set.ncard_eq_toFinset_card' H.oddComponents).symm have hcount := Finset.card_sdiff_add_card_inter O B have hinter : (O ∩ B).card ≤ B.card := Finset.card_le_card Finset.inter_subset_right dsimp [J] omega have hJodd : ∀ i ∈ J, Odd (F i).card := by intro i hi have hiO : i ∈ O := (Finset.mem_sdiff.mp hi).1 have hiB : i ∉ B := (Finset.mem_sdiff.mp hi).2 have hiOdd : i ∈ H.oddComponents := by simpa [O] using hiO have hc := (induced_component_ambient_vertex_properties G R i i).2.1 have horig : Odd (in1206_component_vertices G R i).card := by rw [hc] exact hiOdd have heven := hpar i hiO hiB change Even ((in1206_component_vertices G R i) ∩ T.verts.toFinset).card at heven have hcount := Finset.card_sdiff_add_card_inter (in1206_component_vertices G R i) T.verts.toFinset rw [Nat.odd_iff] at horig ⊢ rw [Nat.even_iff] at heven dsimp [F] omega have hJsub : ∀ i ∈ J, F i ⊆ L := by intro i hi v hv have hv' := Finset.mem_sdiff.mp hv have hh := (induced_component_ambient_vertex_properties G R i i).1 hv'.1 apply Finset.mem_sdiff.mpr exact ⟨by simpa using hh, hv'.2⟩ have hJdis : ∀ i ∈ J, ∀ j ∈ J, i ≠ j → Disjoint (F i) (F j) := by intro i hi j hj hij exact ((induced_component_ambient_vertex_properties G R i j).2.2.1 hij).mono Finset.sdiff_subset Finset.sdiff_subset have hJanti : ∀ i ∈ J, ∀ u ∈ F i, ∀ v ∈ L, v ∉ F i → ¬ G.Adj u v := by intro i hi u hu v hv hvnot have hu' := Finset.mem_sdiff.mp hu have hv' := Finset.mem_sdiff.mp hv have hvR : v ∈ R := by simpa using hv'.1 have hvcomp : v ∉ in1206_component_vertices G R i := by intro hh exact hvnot (Finset.mem_sdiff.mpr ⟨hh,hv'.2⟩) exact (induced_component_ambient_vertex_properties G R i i).2.2.2 u hu'.1 v hvR hvcomp have hJfree : ∀ i ∈ J, ∀ u ∈ F i, u ∉ T.verts := by intro i hi u hu simpa using (Finset.mem_sdiff.mp hu).2 have hbudget := odd_groups_budget_after_forced_matching G P T hP hT hTP J F L hJsub hJodd hJdis hJanti hJfree have hcount : ((Finset.univ \ L).filter (fun v => v ∉ T.verts)).card = r := by have heq : (((Finset.univ \ L).filter (fun v => v ∉ T.verts)) : Set (Fin (4*k))) = (C : Set (Fin (4*k))) \ T.verts := by ext v by_cases ht : v ∈ T.verts · simp [ht] · simp [L,R,ht] rw [← Set.ncard_coe_finset,heq,hremain] rw [hcount] at hbudget change H.oddComponents.ncard ≤ r+B.card omega