op874_bad_port_exposed_palette_forces_factor_matching
Under the stated matching, ownership, four-high-color palette, and interface constraints, if every nonowner matching port exposes a high color outside the common pair, the owned factor edges form a perfect matching.
Statement
theorem op874_bad_port_exposed_palette_forces_factor_matching {V : Type*} [Fintype V] [DecidableEq V] (flag : V → Bool) (mate own : V → V) (step : V → Fin 2 → V) (col hidden : V → Fin 2 → Fin 6) (exposed : V → Fin 6) (hmate : ∀ v, mate (mate v) = v) (hflip : ∀ v, flag (mate v) = !flag v) (howner : ∀ v, own v = mate v ∨ ∃ i, own v = step v i) (hflag : ∀ v, flag v = true ↔ own v = mate v) (hsym : ∀ v i, ∃ j, step (step v i) j = v) (hdist : ∀ v, step v 0 ≠ step v 1) (hnomatch : ∀ v i, step v i ≠ mate v) (hselected : ∀ v i, 4 ≤ (col v i).val → own v = step v i ∨ own (step v i) = v) (hpalette : ∀ v, flag v = true → 2 ≤ (col v 0).val ∧ 2 ≤ (col v 1).val ∧ 2 ≤ (hidden v 0).val ∧ 2 ≤ (hidden v 1).val ∧ col v 0 ≠ col v 1 ∧ col v 0 ≠ hidden v 0 ∧ col v 0 ≠ hidden v 1 ∧ col v 1 ≠ hidden v 0 ∧ col v 1 ≠ hidden v 1 ∧ hidden v 0 ≠ hidden v 1) (hdisjoint : ∀ v, flag v = true → exposed (mate v) ≠ hidden v 0 ∧ exposed (mate v) ≠ hidden v 1) (hbad : ∀ v, flag v = true → 4 ≤ (exposed (mate v)).val) : ∀ v, ∃! i, own v = step v i ∨ own (step v i) = 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 2
- op874_bad_port_color_cover_forces_factor_matchingSuppose matching edges exchange two ownership classes, each vertex owns its matching edge or one of two symmetric distinct factor…
- op874_matching_port_high_is_factor_colorIf four distinct colors are drawn from the four high colors and a fifth high color differs from the last two, it equals one of the first…
The proof, explained
The proof applies op874_bad_port_color_cover_forces_factor_matching to reduce the theorem to showing that every matching owner vertex (flag v = true) has at least one incident factor step with a high color (val ≥ 4). For any such vertex v, the two factor colors and two hidden colors are four mutually distinct colors with values in {2, 3, 4, 5}, completely exhausting all colors with value at least 2 in Fin 6. Since the color exposed by the partner vertex mate v has value at least 4 and is disjoint from the two hidden colors, the pigeonhole lemma op874_matching_port_high_is_factor_color forces it to coincide with one of the two factor colors, certifying that this factor color has value at least 4.
It suffices to show that every matching owner vertex v (flag v = true) has at least one incident factor step colored with a high color (val ≥ 4).
Applying the theorem op874_bad_port_color_cover_forces_factor_matching with the given matching, ownership, involution, symmetry, and selection hypotheses reduces the goal—that the owned factor edges form a unique 1-factor—to showing that whenever flag v = true, there is some factor step index i ∈ {0, 1} with 4 ≤ (col v i).val.
uses
op874_bad_port_color_cover_forces_factor_matchingapply op874_bad_port_color_cover_forces_factor_matching flag mate own step col hmate hflip howner hflag hsym hdist hnomatch hselectedFor a fixed matching owner vertex v, unpack the palette bounds, distinctness relations, and disjointness of the partner's exposed color.
We fix a vertex v and assume flag v = true. Hypothesis hpalette yields that the two factor step colors col v 0, col v 1 and the two hidden colors hidden v 0, hidden v 1 are four pairwise distinct colors in Fin 6, each with numerical value at least 2. In addition, hypothesis hdisjoint guarantees that exposed (mate v) is distinct from both hidden v 0 and hidden v 1.
intro v hv obtain ⟨hc0,hc1,hh0,hh1,hnc,hc0h0,hc0h1,hc1h0,hc1h1,hnh⟩ := hpalette v hv obtain ⟨hd0,hd1⟩ := hdisjoint v hv
The color exposed by the partner vertex, exposed (mate v), must equal either col v 0 or col v 1.
Hypothesis hbad states that 4 ≤ (exposed (mate v)).val, which implies 2 ≤ (exposed (mate v)).val by simple integer arithmetic (closed by omega). Because Fin 6 contains exactly four elements with value ≥ 2 (namely 2, 3, 4, 5), the four distinct colors col v 0, col v 1, hidden v 0, hidden v 1 exhaust all of them. Lemma op874_matching_port_high_is_factor_color therefore concludes that exposed (mate v), being ≥ 2 and distinct from both hidden colors, must equal col v 0 or col v 1.
uses
op874_matching_port_high_is_factor_colorhave he := op874_matching_port_high_is_factor_color (col v 0) (col v 1) (hidden v 0) (hidden v 1) (exposed (mate v)) hc0 hc1 hh0 hh1 hnc hc0h0 hc0h1 hc1h0 hc1h1 hnh hd0 hd1 (by have := hbad v hv; omega)
At least one of the factor step colors incident to v has value at least 4, completing the proof.
We split on the disjunction from the previous step. If exposed (mate v) = col v 0, we select index i = 0; rewriting col v 0 to exposed (mate v) reduces the goal to 4 ≤ (exposed (mate v)).val, which is provided by hbad. If exposed (mate v) = col v 1, we select index i = 1 and the goal similarly reduces to 4 ≤ (exposed (mate v)).val, again concluding via hbad.
rcases he with he | he · refine ⟨0, ?_⟩ rw [←he] exact hbad v hv · refine ⟨1, ?_⟩ rw [←he] exact hbad v hv
op874_bad_port_color_cover_forces_factor_matching- Under the standard matching, ownership, and factor step conditions, if every matching owner vertex (with flag v = true) has at least one incident factor step with a high color (val ≥ 4), then the owned factor edges form a unique factor selection (a perfect matching).
op874_matching_port_high_is_factor_color- In Fin 6, if four distinct colors c₁, c₂, h₁, h₂ all have numerical value ≥ 2, then any color x with value ≥ 2 that is distinct from both h₁ and h₂ must equal either c₁ or c₂.
- Line 28 uses an inline `omega` call to deduce `2 ≤ (exposed (mate v)).val` from the hypothesis `4 ≤ (exposed (mate v)).val`.
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_exposed_palette_forces_factor_matching {V : Type*} [Fintype V] [DecidableEq V] (flag : V → Bool) (mate own : V → V) (step : V → Fin 2 → V) (col hidden : V → Fin 2 → Fin 6) (exposed : V → Fin 6) (hmate : ∀ v, mate (mate v) = v) (hflip : ∀ v, flag (mate v) = !flag v) (howner : ∀ v, own v = mate v ∨ ∃ i, own v = step v i) (hflag : ∀ v, flag v = true ↔ own v = mate v) (hsym : ∀ v i, ∃ j, step (step v i) j = v) (hdist : ∀ v, step v 0 ≠ step v 1) (hnomatch : ∀ v i, step v i ≠ mate v) (hselected : ∀ v i, 4 ≤ (col v i).val → own v = step v i ∨ own (step v i) = v) (hpalette : ∀ v, flag v = true → 2 ≤ (col v 0).val ∧ 2 ≤ (col v 1).val ∧ 2 ≤ (hidden v 0).val ∧ 2 ≤ (hidden v 1).val ∧ col v 0 ≠ col v 1 ∧ col v 0 ≠ hidden v 0 ∧ col v 0 ≠ hidden v 1 ∧ col v 1 ≠ hidden v 0 ∧ col v 1 ≠ hidden v 1 ∧ hidden v 0 ≠ hidden v 1) (hdisjoint : ∀ v, flag v = true → exposed (mate v) ≠ hidden v 0 ∧ exposed (mate v) ≠ hidden v 1) (hbad : ∀ v, flag v = true → 4 ≤ (exposed (mate v)).val) : ∀ v, ∃! i, own v = step v i ∨ own (step v i) = v := by apply op874_bad_port_color_cover_forces_factor_matching flag mate own step col hmate hflip howner hflag hsym hdist hnomatch hselected intro v hv obtain ⟨hc0,hc1,hh0,hh1,hnc,hc0h0,hc0h1,hc1h0,hc1h1,hnh⟩ := hpalette v hv obtain ⟨hd0,hd1⟩ := hdisjoint v hv have he := op874_matching_port_high_is_factor_color (col v 0) (col v 1) (hidden v 0) (hidden v 1) (exposed (mate v)) hc0 hc1 hh0 hh1 hnc hc0h0 hc0h1 hc1h0 hc1h1 hnh hd0 hd1 (by have := hbad v hv; omega) rcases he with he | he · refine ⟨0, ?_⟩ rw [←he] exact hbad v hv · refine ⟨1, ?_⟩ rw [←he] exact hbad v hv