factorcritical_twins_forced_edge_is_bridge
In a finite 1-factor-critical graph, if two distinct vertices have identical neighborhoods outside the pair, any forced matching edge incident to one is a bridge after deleting the other. The twins may be adjacent or nonadjacent.
Statement
theorem factorcritical_twins_forced_edge_is_bridge {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (hcrit : is_k_factor_critical G 1) (x y z : V) (hxy : x ≠ y) (htwin : ∀ a, a ≠ x → a ≠ y → (G.Adj x a ↔ G.Adj y a)) (hyz : z ≠ y) (hxz : G.Adj x z) (hforced : ¬ ∃ P : ((G.induce {a | a ≠ y}).deleteEdges {s(⟨x,hxy⟩,⟨z,hyz⟩)}).Subgraph, P.IsPerfectMatching) : ¬ ((G.induce {a | a ≠ y}).deleteEdges {s(⟨x,hxy⟩,⟨z,hyz⟩)}).Reachable ⟨x,hxy⟩ ⟨z,hyz⟩
- Source
- OP-1957; common generalization of the proved false-twin forced-edge bridge lemma and the adjacent-twin switch, supported by experiment 37003.
- Verified
- 22 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 5
- is_k_factor_criticalA simple graph G on a finite vertex type V is k-factor-critical if for every subset S of V with cardinality k, the induced subgraph on Sᶜ…
- nontrivial_factorcritical_graph_connectedA factor-critical graph with at least two vertices is connected.
- connected_deletion_matches_if_all_other_deletions_matchIf deleting u from a finite graph leaves a connected graph, and deleting any vertex other than u leaves a graph with a perfect matching,…
- perfect_matching_twins_switch_partnerAny matching edge incident to one of two distinct vertices with identical neighbors outside the pair can be avoided by another perfect…
- connected_graph_delete_twin_with_common_neighbor_connectedIf two distinct vertices have identical neighbors outside the pair and a common neighbor, deleting either one preserves connectedness of a…
- Used by 1
- factorcritical_twins_forced_residual_edge_is_bridgeIn a 2k-factor-critical graph, a forced residual matching edge incident to one of two vertices with identical neighborhoods outside the…
The proof, explained
The proof argues by contradiction: suppose the edge xz is not a bridge in G - y, which implies that (G - y) ∖ {xz} is connected. Deleting the edge xz from G produces a graph F in which F - y = (G - y) ∖ {xz} is connected, and for every other vertex b ≠ y, F - b has a perfect matching (using a partner-switching lemma for twins when b ≠ x, z). A general parity theorem on single-vertex deletions then implies that F - y must also have a perfect matching, contradicting the assumption that xz was a forced edge in G - y.
Assume for contradiction that x and z are reachable in (G - y) ∖ {xz}.
We enter the classical logic setting and assume the negation of the conclusion: that x and z remain connected by a path in (G - y) ∖ {xz}, which means that the edge xz is not a bridge in G - y.
classical intro hreachThe graph (G - y) ∖ {xz} is connected.
Let F = G ∖ {xz}. Since G is 1-factor-critical and has at least two vertices (x ≠ y), G is connected by nontrivial_factorcritical_graph_connected. Because x and y are twins outside {x, y} and z is a neighbor of x distinct from y, z is also a neighbor of y. Deleting a twin vertex that shares a common neighbor preserves connectivity by connected_graph_delete_twin_with_common_neighbor_connected, so G - y is connected. By SimpleGraph.isBridge_iff and not_not.mpr, reachability of x and z in (G - y) ∖ {xz} means xz is not a bridge in G - y; removing a non-bridge edge from a connected graph leaves it connected.
uses
nontrivial_factorcritical_graph_connected,connected_graph_delete_twin_with_common_neighbor_connected,SimpleGraph.isBridge_iff,not_not.mprlet F := G.deleteEdges {s(x,z)} have hzy : z ≠ y := hyz have hzx : z ≠ x := hxz.ne.symm have hyzG : G.Adj y z := (htwin z hzx hzy).mp hxz have hconn : (G.induce {a | a ≠ y}).Connected := connected_graph_delete_twin_with_common_neighbor_connected G (nontrivial_factorcritical_graph_connected G hcrit x y hxy) x y z hxy hxz hyzG htwin have hconn' := hconn.connected_delete_edge_of_not_isBridge (x := ⟨x,hxy⟩) (y := ⟨z,hyz⟩) (by rw [SimpleGraph.isBridge_iff]; exact not_not.mpr hreach)
The graph F - y is identical to (G - y) ∖ {xz}, and hence F - y is connected.
Deleting the edge xz and then deleting the vertex y yields the exact same graph as deleting y first and then removing the edge xz. Checking adjacency on both sides using SimpleGraph.induce_adj, SimpleGraph.deleteEdges_adj, Set.mem_singleton_iff, Sym2.eq_iff, and Subtype.ext_iff proves F - y = (G - y) ∖ {xz}. Rewriting with this equality shows F - y is connected.
uses
SimpleGraph.induce_adj,SimpleGraph.deleteEdges_adj,Set.mem_singleton_iff,Sym2.eq_iff,Subtype.ext_iffhave heq : (F.induce {a | a ≠ y}) = ((G.induce {a | a ≠ y}).deleteEdges {s(⟨x,hxy⟩,⟨z,hyz⟩)}) := by ext a b simp only [F, SimpleGraph.induce_adj, SimpleGraph.deleteEdges_adj, Set.mem_singleton_iff, Sym2.eq_iff, Subtype.ext_iff] have hFconn : (F.induce {a | a ≠ y}).Connected := by rw [heq]; exact hconn'
For any vertex b ≠ y, the graph G - b has a perfect matching P.
Because G is 1-factor-critical, deleting any single vertex b leaves an induced subgraph G - b that admits a perfect matching P.
have hother : ∀ b : V, b ≠ y → ∃ P : (F.induce {v | v ≠ b}).Subgraph, P.IsPerfectMatching := by intro b hby have hm := hcrit {b} (by simp) have hs : (↑({b} : Finset V) : Set V)ᶜ = {v | v ≠ b} := by ext v simp have hm' : ∃ P : (G.induce {v | v ≠ b}).Subgraph, P.IsPerfectMatching := by rw [← hs] exact hm obtain ⟨P, hP⟩ := hm'
If b = x or b = z, the matching P in G - b already avoids the edge xz.
We seek a perfect matching Q in G - b containing no edge with endpoints {x, z}. If b = x, the vertex x is not in G - b, so no edge of P can have endpoints {x, z} (analyzed via Sym2.eq_iff.mp). Similarly, if b = z, vertex z is absent from G - b, so P cannot contain the edge xz either.
uses
Sym2.eq_iff.mphave hQ : ∃ Q : (G.induce {v | v ≠ b}).Subgraph, Q.IsPerfectMatching ∧ ∀ a c, Q.Adj a c → s(a.val,c.val) ≠ s(x,z) := by by_cases hbx : b = x · subst b refine ⟨P, hP, ?_⟩ intro a c hac he rcases Sym2.eq_iff.mp he with ⟨ha,hc⟩ | ⟨ha,hc⟩ · exact a.property ha · exact c.property hc · by_cases hbz : b = z · subst b refine ⟨P, hP, ?_⟩ intro a c hac he rcases Sym2.eq_iff.mp he with ⟨ha,hc⟩ | ⟨ha,hc⟩ · exact c.property hc · exact a.property ha
If b ≠ x and b ≠ z, there is a perfect matching Q in G - b avoiding the edge xz.
When b ≠ x, z, both x and z are present in G - b, and so is y since b ≠ y. The twin relationship between x and y is preserved in G - b using Subtype.ext and congrArg. If P does not contain the edge xz, we keep Q = P. If P contains the edge between x and z, perfect_matching_twins_switch_partner allows us to switch partners with the twin y, yielding a perfect matching Q in G - b that avoids the edge xz (with edge equality checked via Sym2.eq_iff.mp and Subtype.ext).
uses
congrArg,Subtype.ext,perfect_matching_twins_switch_partner,Sym2.eq_iff.mp· have hxb : x ≠ b := fun h => hbx h.symm have hyb : y ≠ b := hby.symm have hzb : z ≠ b := fun h => hbz h.symm have hxy' : (⟨x,hxb⟩ : {v : V // v ≠ b}) ≠ ⟨y,hyb⟩ := by intro h exact hxy (congrArg Subtype.val h) have htwin' : ∀ a : {v : V // v ≠ b}, a ≠ ⟨x,hxb⟩ → a ≠ ⟨y,hyb⟩ → ((G.induce {v | v ≠ b}).Adj ⟨x,hxb⟩ a ↔ (G.induce {v | v ≠ b}).Adj ⟨y,hyb⟩ a) := by intro a hax hay change G.Adj x a.val ↔ G.Adj y a.val apply htwin a.val · intro he; apply hax; exact Subtype.ext he · intro he; apply hay; exact Subtype.ext he have hzy' : (⟨z,hzb⟩ : {v : V // v ≠ b}) ≠ ⟨y,hyb⟩ := by intro he; exact hyz (congrArg Subtype.val he) have hQ' : ∃ Q : (G.induce {v | v ≠ b}).Subgraph, Q.IsPerfectMatching ∧ ¬ Q.Adj ⟨x,hxb⟩ ⟨z,hzb⟩ := by by_cases hp : P.Adj ⟨x,hxb⟩ ⟨z,hzb⟩ · exact perfect_matching_twins_switch_partner _ P hP _ _ _ hxy' hzy' htwin' hp · exact ⟨P, hP, hp⟩ obtain ⟨Q, hmatch, hno⟩ := hQ' refine ⟨Q, hmatch, ?_⟩ intro a c hac he rcases Sym2.eq_iff.mp he with ⟨ha,hc⟩ | ⟨ha,hc⟩ · have ha' : a = ⟨x,hxb⟩ := Subtype.ext ha have hc' : c = ⟨z,hzb⟩ := Subtype.ext hc exact hno (ha' ▸ hc' ▸ hac) · have ha' : a = ⟨z,hzb⟩ := Subtype.ext ha have hc' : c = ⟨x,hxb⟩ := Subtype.ext hc exact hno (hc' ▸ ha' ▸ hac.symm) obtain ⟨Q, hmatch, havoid⟩ := hQ
The matching Q is a perfect matching in F - b.
Because Q avoids the edge xz, all edges of Q belong to F = G ∖ {xz} by SimpleGraph.deleteEdges_adj.mpr. Thus Q embeds into F - b via SimpleGraph.toSubgraph, and by SimpleGraph.Subgraph.IsPerfectMatching.toSubgraph_iff, it is a perfect matching of F - b.
uses
SimpleGraph.deleteEdges_adj.mpr,SimpleGraph.toSubgraph,SimpleGraph.Subgraph.IsPerfectMatching.toSubgraph_iffhave hle : Q.spanningCoe ≤ F.induce {v | v ≠ b} := by intro a c hac change F.Adj a.val c.val exact SimpleGraph.deleteEdges_adj.mpr ⟨Q.adj_sub hac, by simpa using havoid a c hac⟩ exact ⟨SimpleGraph.toSubgraph (G := F.induce {v | v ≠ b}) Q.spanningCoe hle, (SimpleGraph.Subgraph.IsPerfectMatching.toSubgraph_iff hle).mpr hmatch⟩
A contradiction is reached, so xz must be a bridge in G - y.
By connected_deletion_matches_if_all_other_deletions_match applied to F and y, since F - y is connected and every other single-vertex deletion F - b admits a perfect matching, F - y must itself have a perfect matching. Since F - y = (G - y) ∖ {xz}, this gives a perfect matching of (G - y) ∖ {xz}, directly contradicting the hypothesis that the edge xz is forced in G - y.
uses
connected_deletion_matches_if_all_other_deletions_matchhave hmatch := connected_deletion_matches_if_all_other_deletions_match F y hFconn hother rw [heq] at hmatch exact hforced hmatch
connected_deletion_matches_if_all_other_deletions_match- In a graph where G - u is connected, if every other single-vertex deletion G - b (for b ≠ u) admits a perfect matching, then G - u also admits a perfect matching.
connected_graph_delete_twin_with_common_neighbor_connected- If a connected graph has two distinct twin vertices sharing a common neighbor, deleting one twin leaves the remaining graph connected.
congrArg- Applying a function to equal arguments produces equal values.
nontrivial_factorcritical_graph_connected- A 1-factor-critical graph with at least two vertices is connected.
not_not.mpr- Double negation introduction: if P holds, then ¬¬P holds.
perfect_matching_twins_switch_partner- In a graph with twin vertices, any perfect matching containing an edge incident to one twin can be transformed into a perfect matching that avoids that edge by switching partners with the other twin.
Set.mem_singleton_iff- An element belongs to a singleton set {b} if and only if it equals b.
SimpleGraph.deleteEdges_adj- Two vertices are adjacent in an edge-deleted graph if and only if they were adjacent originally and the edge between them was not deleted.
SimpleGraph.deleteEdges_adj.mpr- If an edge is present in a graph and not in the deletion set, it is present in the edge-deleted graph.
SimpleGraph.induce_adj- Two vertices in an induced subgraph are adjacent if and only if they are adjacent in the ambient graph.
SimpleGraph.isBridge_iff- An edge is a bridge if and only if its endpoints are not reachable from each other after deleting that edge.
SimpleGraph.Subgraph.IsPerfectMatching.toSubgraph_iff- A spanning subgraph viewed as a subgraph of an ambient graph is a perfect matching if and only if the original subgraph was a perfect matching.
SimpleGraph.toSubgraph- Constructs a subgraph from a spanning subgraph and a containment proof.
Subtype.ext- Two subtype elements are equal if their underlying values are equal.
Subtype.ext_iff- Two subtype elements are equal if and only if their underlying values are equal.
Sym2.eq_iff- Two unordered pairs s(a, b) and s(c, d) are equal if and only if (a = c ∧ b = d) or (a = d ∧ b = c).
Sym2.eq_iff.mp- If two unordered pairs s(a, b) and s(c, d) are equal, then either a = c and b = d, or a = d and b = c.
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 factorcritical_twins_forced_edge_is_bridge {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (hcrit : is_k_factor_critical G 1) (x y z : V) (hxy : x ≠ y) (htwin : ∀ a, a ≠ x → a ≠ y → (G.Adj x a ↔ G.Adj y a)) (hyz : z ≠ y) (hxz : G.Adj x z) (hforced : ¬ ∃ P : ((G.induce {a | a ≠ y}).deleteEdges {s(⟨x,hxy⟩,⟨z,hyz⟩)}).Subgraph, P.IsPerfectMatching) : ¬ ((G.induce {a | a ≠ y}).deleteEdges {s(⟨x,hxy⟩,⟨z,hyz⟩)}).Reachable ⟨x,hxy⟩ ⟨z,hyz⟩ := by classical intro hreach let F := G.deleteEdges {s(x,z)} have hzy : z ≠ y := hyz have hzx : z ≠ x := hxz.ne.symm have hyzG : G.Adj y z := (htwin z hzx hzy).mp hxz have hconn : (G.induce {a | a ≠ y}).Connected := connected_graph_delete_twin_with_common_neighbor_connected G (nontrivial_factorcritical_graph_connected G hcrit x y hxy) x y z hxy hxz hyzG htwin have hconn' := hconn.connected_delete_edge_of_not_isBridge (x := ⟨x,hxy⟩) (y := ⟨z,hyz⟩) (by rw [SimpleGraph.isBridge_iff]; exact not_not.mpr hreach) have heq : (F.induce {a | a ≠ y}) = ((G.induce {a | a ≠ y}).deleteEdges {s(⟨x,hxy⟩,⟨z,hyz⟩)}) := by ext a b simp only [F, SimpleGraph.induce_adj, SimpleGraph.deleteEdges_adj, Set.mem_singleton_iff, Sym2.eq_iff, Subtype.ext_iff] have hFconn : (F.induce {a | a ≠ y}).Connected := by rw [heq]; exact hconn' have hother : ∀ b : V, b ≠ y → ∃ P : (F.induce {v | v ≠ b}).Subgraph, P.IsPerfectMatching := by intro b hby have hm := hcrit {b} (by simp) have hs : (↑({b} : Finset V) : Set V)ᶜ = {v | v ≠ b} := by ext v simp have hm' : ∃ P : (G.induce {v | v ≠ b}).Subgraph, P.IsPerfectMatching := by rw [← hs] exact hm obtain ⟨P, hP⟩ := hm' have hQ : ∃ Q : (G.induce {v | v ≠ b}).Subgraph, Q.IsPerfectMatching ∧ ∀ a c, Q.Adj a c → s(a.val,c.val) ≠ s(x,z) := by by_cases hbx : b = x · subst b refine ⟨P, hP, ?_⟩ intro a c hac he rcases Sym2.eq_iff.mp he with ⟨ha,hc⟩ | ⟨ha,hc⟩ · exact a.property ha · exact c.property hc · by_cases hbz : b = z · subst b refine ⟨P, hP, ?_⟩ intro a c hac he rcases Sym2.eq_iff.mp he with ⟨ha,hc⟩ | ⟨ha,hc⟩ · exact c.property hc · exact a.property ha · have hxb : x ≠ b := fun h => hbx h.symm have hyb : y ≠ b := hby.symm have hzb : z ≠ b := fun h => hbz h.symm have hxy' : (⟨x,hxb⟩ : {v : V // v ≠ b}) ≠ ⟨y,hyb⟩ := by intro h exact hxy (congrArg Subtype.val h) have htwin' : ∀ a : {v : V // v ≠ b}, a ≠ ⟨x,hxb⟩ → a ≠ ⟨y,hyb⟩ → ((G.induce {v | v ≠ b}).Adj ⟨x,hxb⟩ a ↔ (G.induce {v | v ≠ b}).Adj ⟨y,hyb⟩ a) := by intro a hax hay change G.Adj x a.val ↔ G.Adj y a.val apply htwin a.val · intro he; apply hax; exact Subtype.ext he · intro he; apply hay; exact Subtype.ext he have hzy' : (⟨z,hzb⟩ : {v : V // v ≠ b}) ≠ ⟨y,hyb⟩ := by intro he; exact hyz (congrArg Subtype.val he) have hQ' : ∃ Q : (G.induce {v | v ≠ b}).Subgraph, Q.IsPerfectMatching ∧ ¬ Q.Adj ⟨x,hxb⟩ ⟨z,hzb⟩ := by by_cases hp : P.Adj ⟨x,hxb⟩ ⟨z,hzb⟩ · exact perfect_matching_twins_switch_partner _ P hP _ _ _ hxy' hzy' htwin' hp · exact ⟨P, hP, hp⟩ obtain ⟨Q, hmatch, hno⟩ := hQ' refine ⟨Q, hmatch, ?_⟩ intro a c hac he rcases Sym2.eq_iff.mp he with ⟨ha,hc⟩ | ⟨ha,hc⟩ · have ha' : a = ⟨x,hxb⟩ := Subtype.ext ha have hc' : c = ⟨z,hzb⟩ := Subtype.ext hc exact hno (ha' ▸ hc' ▸ hac) · have ha' : a = ⟨z,hzb⟩ := Subtype.ext ha have hc' : c = ⟨x,hxb⟩ := Subtype.ext hc exact hno (hc' ▸ ha' ▸ hac.symm) obtain ⟨Q, hmatch, havoid⟩ := hQ have hle : Q.spanningCoe ≤ F.induce {v | v ≠ b} := by intro a c hac change F.Adj a.val c.val exact SimpleGraph.deleteEdges_adj.mpr ⟨Q.adj_sub hac, by simpa using havoid a c hac⟩ exact ⟨SimpleGraph.toSubgraph (G := F.induce {v | v ≠ b}) Q.spanningCoe hle, (SimpleGraph.Subgraph.IsPerfectMatching.toSubgraph_iff hle).mpr hmatch⟩ have hmatch := connected_deletion_matches_if_all_other_deletions_match F y hFconn hother rw [heq] at hmatch exact hforced hmatch