op874_bad_port_palette_gives_graph_bipartition
A graph covered by three neighbor maps is two-colorable if the original and selected maps cross the Boolean partition and the involutive unselected map satisfies the displayed all-bad palette and interface hypotheses.
Statement
theorem op874_bad_port_palette_gives_graph_bipartition {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (flag : V → Bool) (mate selected other : V → V) (t s x y : V → Fin 6) (hmate : ∀ v, mate (mate v) = v) (hflip : ∀ v, flag (mate v) = !flag v) (hselected : ∀ v, flag (selected v) = !flag v) (hother : ∀ v, other (other v) = v) (htsame : ∀ v, t (other v) = t v) (hlocal : ∀ v, flag v = false → 2 ≤ (t v).val ∧ (t v).val ≤ 3 ∧ 4 ≤ (s v).val ∧ 4 ≤ (x v).val ∧ 2 ≤ (y v).val ∧ s v ≠ x v ∧ y v ≠ s v ∧ y v ≠ x v ∧ y v ≠ t v) (hcross : ∀ v, flag v = false → flag (other v) = false → y v ≠ y (other v)) (hcover : ∀ u v, G.Adj u v → v = mate u ∨ v = selected u ∨ v = other u) : ∃ f : V → Bool, ∀ u v, G.Adj u v → f u ≠ f v
- Source
- Structural two-port reduction for OP-874; experiments 43048, 43073 and 43075 test the local-state implications.
- Verified
- 29 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 1
- op874_bad_ports_unselected_matching_crossesUnder the displayed local high-color palette and interface conditions, an involutive unselected-edge matching exchanges the two classes…
The proof, explained
We show that the Boolean labeling flag is a proper 2-coloring of G. An auxiliary theorem deduces from the palette and interface assumptions that the third neighbor map other flips flag on every vertex, matching the assumed behavior of mate and selected. Since every edge of G is covered by one of these three maps, any adjacent pair of vertices receives opposite Boolean colors.
The unselected involution reverses the Boolean flag: flag(other(v)) = ¬flag(v) for all v.
Applying the lemma op874_bad_ports_unselected_matching_crosses with the assumptions that mate and other are involutions, mate flips the flag, t is invariant under other, the port values satisfy the local palette bounds on the false partition, and y values cross on other, we establish that other also flips the flag on every vertex.
uses
op874_bad_ports_unselected_matching_crosseshave hthird := op874_bad_ports_unselected_matching_crosses flag mate other t s x y hmate hflip hother htsame hlocal hcrossIt suffices to show that flag assigns different values to adjacent vertices.
We provide flag as the 2-coloring witness. To prove it is proper, we consider arbitrary vertices u and v such that G.Adj u v and must show flag(u) ≠ flag(v).
refine ⟨flag, ?_⟩ intro u v huv
The neighbor v must be mate(u), selected(u), or other(u).
By the edge-covering hypothesis hcover, any edge between u and v means that v is the mate, the selected neighbor, or the other neighbor of u. We split the argument into these three cases.
rcases hcover u v huv with h | h | h
If v = mate(u), then flag(u) ≠ flag(v).
Substituting v = mate(u) and using the hypothesis hflip, flag(v) becomes ¬flag(u). The condition flag(u) ≠ ¬flag(u) holds whether flag(u) is true or false.
· rw [h, hflip] cases flag u <;> decide
If v = selected(u), then flag(u) ≠ flag(v).
Substituting v = selected(u) and using the hypothesis hselected, flag(v) becomes ¬flag(u). A case analysis on the Boolean value of flag(u) confirms flag(u) ≠ ¬flag(u).
· rw [h, hselected] cases flag u <;> decide
If v = other(u), then flag(u) ≠ flag(v).
Substituting v = other(u) and using the previously established fact hthird, flag(v) is ¬flag(u). Evaluating both possibilities for flag(u) confirms flag(u) ≠ ¬flag(u).
· rw [h, hthird] cases flag u <;> decide
op874_bad_ports_unselected_matching_crosses- Under the involution, port palette, and crossing hypotheses, the unselected involution flips the Boolean flag for every vertex: flag(other(v)) = ¬flag(v).
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_bad_port_palette_gives_graph_bipartition {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) (flag : V → Bool) (mate selected other : V → V) (t s x y : V → Fin 6) (hmate : ∀ v, mate (mate v) = v) (hflip : ∀ v, flag (mate v) = !flag v) (hselected : ∀ v, flag (selected v) = !flag v) (hother : ∀ v, other (other v) = v) (htsame : ∀ v, t (other v) = t v) (hlocal : ∀ v, flag v = false → 2 ≤ (t v).val ∧ (t v).val ≤ 3 ∧ 4 ≤ (s v).val ∧ 4 ≤ (x v).val ∧ 2 ≤ (y v).val ∧ s v ≠ x v ∧ y v ≠ s v ∧ y v ≠ x v ∧ y v ≠ t v) (hcross : ∀ v, flag v = false → flag (other v) = false → y v ≠ y (other v)) (hcover : ∀ u v, G.Adj u v → v = mate u ∨ v = selected u ∨ v = other u) : ∃ f : V → Bool, ∀ u v, G.Adj u v → f u ≠ f v := by have hthird := op874_bad_ports_unselected_matching_crosses flag mate other t s x y hmate hflip hother htsame hlocal hcross refine ⟨flag, ?_⟩ intro u v huv rcases hcover u v huv with h | h | h · rw [h, hflip] cases flag u <;> decide · rw [h, hselected] cases flag u <;> decide · rw [h, hthird] cases flag u <;> decide