op874_saturated_same_bit_cover_forces_exact
If the same-bit edge set of a finite simple graph has as many edges as vertices and every vertex selects one incident edge while every same-bit edge is selected at an endpoint, every vertex selects a same-bit edge and every same-bit edge is selected at exactly one endpoint.
Statement
theorem op874_saturated_same_bit_cover_forces_exact {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (b : V → Bool) (S : Finset (Sym2 V)) (p : V → V) (hsub : S ⊆ G.edgeFinset) (hreq : ∀ u v, G.Adj u v → (s(u,v) ∈ S ↔ b u = b v)) (hcard : S.card = Fintype.card V) (hadj : ∀ v, G.Adj v (p v)) (hcover : ∀ u v, G.Adj u v → b u = b v → p u = v ∨ p v = u) : (∀ v, b v = b (p v)) ∧ (∀ u v, G.Adj u v → b u = b v → (p u = v ↔ p v ≠ u))
- Source
- Low-port counting reduction for OP-874, https://arxiv.org/abs/2610.41950, Section 2.
- Verified
- 27 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext
The proof, explained
The proof considers the edge-selection map $f(v) = \{v, p(v)\}$ sending each vertex to its chosen edge. By the covering hypothesis, every same-bit edge in $S$ is selected by at least one of its endpoints, so $S \subseteq f(V)$. Because $|S| = |V|$, cardinality comparison forces $S = f(V)$ and implies that $f$ is injective. Consequently, every chosen edge $f(v)$ belongs to $S$ (so $b(v) = b(p(v))$), and no same-bit edge can be selected by both endpoints (as $f(u) = f(v)$ would imply $u = v$, contradicting adjacency in a simple graph).
Every edge in $S$ is selected by at least one of its endpoints, so $S \subseteq f(V)$ where $f(v) = \{v, p(v)\}$.
Define the assignment map $f(v) = \{v, p(v)\}$, which associates to each vertex the edge connecting it to its chosen neighbor. Any edge $e \in S$ can be written as an unordered pair $\{u, v\}$. Since $S \subseteq G.\mathrm{edgeFinset}$, $u$ and $v$ are adjacent in $G$, and by definition of $S$, they share the same bit: $b(u) = b(v)$. The covering hypothesis ensures that at least one endpoint selects the edge: either $p(u) = v$ (so $f(u) = \{u, v\}$) or $p(v) = u$ (so $f(v) = \{v, u\} = \{u, v\}$). In either case, $e$ is in the image of $f$.
uses
Sym2.inductionOn,SimpleGraph.mem_edgeFinset,SimpleGraph.mem_edgeSet,Finset.mem_image,Finset.mem_univ,Sym2.eq_swapclassical let f : V → Sym2 V := fun v => s(v, p v) have hS_sub : S ⊆ Finset.univ.image f := by intro e he induction e using Sym2.inductionOn with | hf u v => have he_edge : s(u, v) ∈ G.edgeFinset := hsub he rw [SimpleGraph.mem_edgeFinset, SimpleGraph.mem_edgeSet] at he_edge have hbuv : b u = b v := (hreq u v he_edge).mp he rcases hcover u v he_edge hbuv with hpu | hpv · rw [Finset.mem_image] exact ⟨u, Finset.mem_univ u, by dsimp [f]; rw [hpu]⟩ · rw [Finset.mem_image] exact ⟨v, Finset.mem_univ v, by dsimp [f]; rw [hpv, Sym2.eq_swap]⟩
$S$ is exactly the image of $f$, that is, $S = f(V)$.
The image of $f$ on the universal set $V$ has cardinality at most $|V|$, which by assumption equals $|S|$. Since $S \subseteq f(V)$ and $|f(V)| \le |S|$, the subset inclusion cannot be strict, so $S = f(V)$.
uses
Finset.card_image_le,Finset.card_univ,Finset.eq_of_subset_of_card_lehave hcard_le : (Finset.univ.image f).card ≤ S.card := by rw [hcard] calc (Finset.univ.image f).card ≤ Finset.univ.card := Finset.card_image_le _ = Fintype.card V := Finset.card_univ have hS_eq : S = Finset.univ.image f := Finset.eq_of_subset_of_card_le hS_sub hcard_le
The map $f$ is injective.
Because the domain $V$ is finite and the image $f(V)$ has cardinality equal to $|V|$ (since $|f(V)| = |S| = |V|$), the map $f$ must be injective by the pigeonhole principle.
uses
Finset.injOn_of_card_image_eq,Finset.card_univ,Finset.mem_univhave hf_inj : Function.Injective f := by have h_inj : Set.InjOn f (Finset.univ : Finset V) := by apply Finset.injOn_of_card_image_eq rw [Finset.card_univ, ← hcard, ← hS_eq] intro x y hxy exact h_inj (Finset.mem_univ x) (Finset.mem_univ y) hxy
Every vertex selects a neighbor with the same bit, i.e., $b(v) = b(p(v))$ for all $v$.
For any vertex $v$, the chosen edge $f(v) = \{v, p(v)\}$ belongs to the image $f(V) = S$. Since $v$ and $p(v)$ are adjacent in $G$ and their edge lies in $S$, the characterization of $S$ implies $b(v) = b(p(v))$.
uses
Finset.mem_image.mpr,Finset.mem_univhave h1 : ∀ v, b v = b (p v) := by intro v have hfv : f v ∈ Finset.univ.image f := Finset.mem_image.mpr ⟨v, Finset.mem_univ v, rfl⟩ rw [← hS_eq] at hfv exact (hreq v (p v) (hadj v)).mp hfv
For every same-bit edge $\{u, v\}$, exactly one endpoint selects the other: $p(u) = v \iff p(v) \ne u$.
Let $u$ and $v$ be adjacent with $b(u) = b(v)$. The covering hypothesis guarantees that $p(u) = v$ or $p(v) = u$. If both held simultaneously, then $f(u) = \{u, v\} = f(v)$, which by injectivity of $f$ would force $u = v$. But $u$ and $v$ are adjacent in a simple graph, so $u \ne v$, a contradiction. Thus at most one endpoint can select the other; combined with the fact that at least one selects the other, $p(u) = v$ is equivalent to $p(v) \ne u$.
uses
Sym2.eq_swap,False.elimhave h2 : ∀ u v, G.Adj u v → b u = b v → (p u = v ↔ p v ≠ u) := by intro u v hadj_uv hbuv have hcov := hcover u v hadj_uv hbuv have hnot_both : ¬ (p u = v ∧ p v = u) := by rintro ⟨hpu, hpv⟩ have hfeq : f u = f v := by dsimp [f] rw [hpu, hpv, Sym2.eq_swap] have heq := hf_inj hfeq exact hadj_uv.ne heq constructor · intro hpu hpv exact hnot_both ⟨hpu, hpv⟩ · intro hpv_ne cases hcov with | inl hpu => exact hpu | inr hpv => exact False.elim (hpv_ne hpv)
Both conclusions of the theorem hold.
Combining the two established results yields the conjunction: every vertex selects a same-bit neighbor, and every same-bit edge is selected by exactly one of its endpoints.
exact ⟨h1, h2⟩
Sym2.inductionOn- Every element of the symmetric square $\mathrm{Sym}^2(V)$ is an unordered pair $\{x, y\}$ for some $x, y \in V$.
SimpleGraph.mem_edgeFinset- An edge belongs to the finite set of edges of a graph if and only if it belongs to its edge set.
SimpleGraph.mem_edgeSet- The unordered pair $\{u, v\}$ belongs to the edge set of a simple graph if and only if $u$ and $v$ are adjacent.
Finset.mem_image- An element belongs to the image of a finite set under $f$ if and only if it is the image of some element in the set.
Finset.mem_univ- Every element of a finite type belongs to its universal finite set.
Sym2.eq_swap- Unordered pairs are symmetric: $\{a, b\} = \{b, a\}$.
Finset.card_image_le- The cardinality of the image of a finite set is at most the cardinality of the set itself.
Finset.card_univ- The cardinality of the universal finite set of a finite type equals the cardinality of the type.
Finset.eq_of_subset_of_card_le- If $s \subseteq t$ for finite sets and $|t| \le |s|$, then $s = t$.
Finset.injOn_of_card_image_eq- If the image of a finite set under $f$ has the same size as the set, then $f$ is injective on that set.
Finset.mem_image.mpr- If an element is the image of some member of a finite set, then it belongs to the image of that set.
False.elim- From a contradiction ($\mathrm{False}$), any statement follows.
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 op874_saturated_same_bit_cover_forces_exact {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (b : V → Bool) (S : Finset (Sym2 V)) (p : V → V) (hsub : S ⊆ G.edgeFinset) (hreq : ∀ u v, G.Adj u v → (s(u,v) ∈ S ↔ b u = b v)) (hcard : S.card = Fintype.card V) (hadj : ∀ v, G.Adj v (p v)) (hcover : ∀ u v, G.Adj u v → b u = b v → p u = v ∨ p v = u) : (∀ v, b v = b (p v)) ∧ (∀ u v, G.Adj u v → b u = b v → (p u = v ↔ p v ≠ u)) := by classical let f : V → Sym2 V := fun v => s(v, p v) have hS_sub : S ⊆ Finset.univ.image f := by intro e he induction e using Sym2.inductionOn with | hf u v => have he_edge : s(u, v) ∈ G.edgeFinset := hsub he rw [SimpleGraph.mem_edgeFinset, SimpleGraph.mem_edgeSet] at he_edge have hbuv : b u = b v := (hreq u v he_edge).mp he rcases hcover u v he_edge hbuv with hpu | hpv · rw [Finset.mem_image] exact ⟨u, Finset.mem_univ u, by dsimp [f]; rw [hpu]⟩ · rw [Finset.mem_image] exact ⟨v, Finset.mem_univ v, by dsimp [f]; rw [hpv, Sym2.eq_swap]⟩ have hcard_le : (Finset.univ.image f).card ≤ S.card := by rw [hcard] calc (Finset.univ.image f).card ≤ Finset.univ.card := Finset.card_image_le _ = Fintype.card V := Finset.card_univ have hS_eq : S = Finset.univ.image f := Finset.eq_of_subset_of_card_le hS_sub hcard_le have hf_inj : Function.Injective f := by have h_inj : Set.InjOn f (Finset.univ : Finset V) := by apply Finset.injOn_of_card_image_eq rw [Finset.card_univ, ← hcard, ← hS_eq] intro x y hxy exact h_inj (Finset.mem_univ x) (Finset.mem_univ y) hxy have h1 : ∀ v, b v = b (p v) := by intro v have hfv : f v ∈ Finset.univ.image f := Finset.mem_image.mpr ⟨v, Finset.mem_univ v, rfl⟩ rw [← hS_eq] at hfv exact (hreq v (p v) (hadj v)).mp hfv have h2 : ∀ u v, G.Adj u v → b u = b v → (p u = v ↔ p v ≠ u) := by intro u v hadj_uv hbuv have hcov := hcover u v hadj_uv hbuv have hnot_both : ¬ (p u = v ∧ p v = u) := by rintro ⟨hpu, hpv⟩ have hfeq : f u = f v := by dsimp [f] rw [hpu, hpv, Sym2.eq_swap] have heq := hf_inj hfeq exact hadj_uv.ne heq constructor · intro hpu hpv exact hnot_both ⟨hpu, hpv⟩ · intro hpv_ne cases hcov with | inl hpu => exact hpu | inr hpv => exact False.elim (hpv_ne hpv) exact ⟨h1, h2⟩