Documentation

CslibFrontier.Computability.Circuit.Frontier.Layouts.WeightedMatching

Weighted pair-node layouts and effective-cut bounds on cubic multigraphs #

Extends CslibFrontier.Computability.Circuit.Frontier.Layouts.Matching to fractional (1, 1) straddle weights λ ∈ [0, 1] on a clean sub-matching M_clean ⊆ M of a loopless cubic multigraph:

The fractional prefix-slack reduction (ncard_edgeCut_add_inactive_le_matchingCost) and equal-key PairNode layout (exists_u2_pairNode_layout) are original to this library.

Main definitions #

Main results #

theorem Cslib.Circuits.Frontier.Multigraph.ncard_matchedVertices_eq_two_mul {V : Type u_1} {E : Type u_2} (G : Multigraph V E) (hloop : G.Loopless) {M : Set E} (hM : G.IsMatching M) :

A matching M in a loopless multigraph covers 2 * M.ncard vertices.

theorem Cslib.Circuits.Frontier.Multigraph.exists_isMatching_seven_eighths {V : Type u_1} {E : Type u_2} (G : Multigraph V E) [Finite V] (hloop : G.Loopless) (hinj : Function.Injective G.ends) (h3 : ∀ (v : V), (G.incidenceSet v).ncard = 3) :
∃ (M : Set E), G.IsMatching M ∧ 7 * Nat.card V ≤ 8 * (G.matchedVertices M).ncard ∧ 7 * Nat.card V ≤ 16 * M.ncard

The 7 / 8 matching bound for simple cubic multigraphs. Every finite loopless multigraph without parallel edges in which every vertex has degree three has a matching M covering at least 7 / 8 of the vertices (7 * Nat.card V ≤ 8 * (G.matchedVertices M).ncard, equivalently 7 * Nat.card V ≤ 16 * M.ncard).

Weighted matching cost and prefix slack on (1, 1) matched pairs #

noncomputable def Cslib.Circuits.Frontier.Multigraph.outerLow {V : Type u_1} {E : Type u_2} (G : Multigraph V E) (score : E → ℝ) (v : V) (e : E) :
E

Lower-scoring outer edge at v excluding e (falling back to e outside degree 3).

noncomputable def Cslib.Circuits.Frontier.Multigraph.outerHigh {V : Type u_1} {E : Type u_2} (G : Multigraph V E) (score : E → ℝ) (v : V) (e : E) :
E

Higher-scoring outer edge at v excluding e (falling back to e outside degree 3).

def Cslib.Circuits.Frontier.Multigraph.activeCleanPairs {V : Type u_1} {E : Type u_2} (G : Multigraph V E) (M M_clean : Set E) (score : E → ℝ) (P : Set V) :
Set E

Clean matched edges e ∈ M_clean whose endpoints share their matchingKey, both lie in P, and whose two high-score outer edges both cross G.edgeCut P.

noncomputable def Cslib.Circuits.Frontier.Multigraph.weightedMatchingCost {V : Type u_1} {E : Type u_2} (G : Multigraph V E) (M M_clean : Set E) (lam : ℝ) (score : E → ℝ) (t : ℝ) :

Weighted matching cost at threshold t: unpaired straddling vertices pay 1, matched edges satisfying PairStraddlesAny pay 1, dirty matched edges (M \ M_clean) satisfying PairStraddlesBoth pay 1, and clean matched edges (M_clean) satisfying PairStraddlesBoth pay lam.

theorem Cslib.Circuits.Frontier.Multigraph.outerLow_outerHigh_spec {V : Type u_1} {E : Type u_2} [Finite E] {G : Multigraph V E} (h3 : ∀ (v : V), (G.incidenceSet v).ncard = 3) (score : E → ℝ) {v : V} {e : E} (hev : e ∈ G.incidenceSet v) :
G.outerLow score v e ≠ G.outerHigh score v e ∧ G.incidenceSet v \ {e} = {G.outerLow score v e, G.outerHigh score v e} ∧ score (G.outerLow score v e) ≤ score (G.outerHigh score v e)

The two non-e incident edges at a degree-3 vertex v are {outerLow, outerHigh} in nondecreasing score order.

theorem Cslib.Circuits.Frontier.Multigraph.outerHigh_src_ne_tgt {V : Type u_1} {E : Type u_2} [Finite E] {G : Multigraph V E} (hloop : G.Loopless) (hinj : Function.Injective G.ends) (h3 : ∀ (v : V), (G.incidenceSet v).ncard = 3) (score : E → ℝ) (e : E) :
G.outerHigh score (G.src e) e ≠ G.outerHigh score (G.tgt e) e

High-score outer edge pairs {b_e, d_e} of activeCleanPairs have 2 distinct edges each.

theorem Cslib.Circuits.Frontier.Multigraph.pairwiseDisjoint_activeCleanPairs {V : Type u_1} {E : Type u_2} [Finite E] {G : Multigraph V E} {M M_clean : Set E} (hM : G.IsMatching M) (hclean : M_clean ⊆ M) (h3 : ∀ (v : V), (G.incidenceSet v).ncard = 3) (score : E → ℝ) (P : Set V) :
(G.activeCleanPairs M M_clean score P).PairwiseDisjoint fun (e : E) => {G.outerHigh score (G.src e) e, G.outerHigh score (G.tgt e) e}

High-score outer edge pairs {b_e, d_e} of activeCleanPairs are pairwise disjoint across distinct active pairs.

theorem Cslib.Circuits.Frontier.Multigraph.ncard_edgeCut_add_inactive_le_matchingCost {V : Type u_1} {E : Type u_2} [Finite V] [Finite E] {G : Multigraph V E} (hloop : G.Loopless) (h3 : ∀ (v : V), (G.incidenceSet v).ncard = 3) {M M_clean : Set E} (hM : G.IsMatching M) (hclean : M_clean ⊆ M) (score : E → ℝ) (t : ℝ) {P : Set V} (hP₀ : {v : V | G.matchingKey M score v < t} ⊆ P) :
have P₀ := {v : V | G.matchingKey M score v < t}; (G.edgeCut P).ncard + {e : E | e ∈ M_clean ∧ G.PairStraddlesBoth score t e ∧ ¬(G.outerHigh score (G.src e) e ∈ G.edgeCut P ∧ G.outerHigh score (G.tgt e) e ∈ G.edgeCut P)}.ncard ≤ G.matchingCost M score t + 3 * (P \ P₀).ncard

Exact natural-number prefix slack. For P₀ = {v | matchingKey v < t} ⊆ P, every clean (1, 1) pair e ∈ M_clean whose two high-score outer edges do not both lie in G.edgeCut P contributes at least 1 unit of slack below G.matchingCost M score t + 3 * (P \ P₀).ncard.

theorem Cslib.Circuits.Frontier.Multigraph.ncard_edgeCut_sub_active_le_weightedMatchingCost {V : Type u_1} {E : Type u_2} [Finite V] [Finite E] {G : Multigraph V E} (hloop : G.Loopless) (h3 : ∀ (v : V), (G.incidenceSet v).ncard = 3) {M M_clean : Set E} (hM : G.IsMatching M) (hclean : M_clean ⊆ M) {lam : ℝ} (hlam0 : 0 ≤ lam) (hlam1 : lam ≤ 1) (score : E → ℝ) (t : ℝ) {P : Set V} (hP₀ : {v : V | G.matchingKey M score v < t} ⊆ P) :
have P₀ := {v : V | G.matchingKey M score v < t}; ↑(G.edgeCut P).ncard - (1 - lam) * ↑(G.activeCleanPairs M M_clean score P).ncard ≤ G.weightedMatchingCost M M_clean lam score t + 3 * ↑(P \ P₀).ncard

Effective real cut bound. For 0 ≤ lam ≤ 1 and P₀ = {v | matchingKey v < t} ⊆ P, |edgeCut P| - (1 - lam) |activeCleanPairs P| ≤ weightedMatchingCost + 3 |P \ P₀|.

def Cslib.Circuits.Frontier.Multigraph.equalKeyPairs {V : Type u_1} {E : Type u_2} (G : Multigraph V E) (M M_clean : Set E) (score : E → ℝ) :
Set E

Clean matched edges whose endpoints share the same matchingKey.

@[reducible, inline]
abbrev Cslib.Circuits.Frontier.Multigraph.PairNode {V : Type u_1} {E : Type u_2} (G : Multigraph V E) (M M_clean : Set E) (score : E → ℝ) :
Type (max u_2 u_1)

Super-nodes contracting each equal-key clean matched edge into one node while keeping all remaining vertices individual.

noncomputable def Cslib.Circuits.Frontier.Multigraph.pairNodeKey {V : Type u_1} {E : Type u_2} (G : Multigraph V E) (M M_clean : Set E) (score : E → ℝ) :
G.PairNode M M_clean score → ℝ

Key assigned to each PairNode: matchingKey on individual vertices and the shared endpoint matchingKey on equal-key clean pairs.

def Cslib.Circuits.Frontier.Multigraph.pairNodeVerts {V : Type u_1} {E : Type u_2} (G : Multigraph V E) (M M_clean : Set E) (score : E → ℝ) (S : Set (G.PairNode M M_clean score)) :
Set V

Vertex subset of V expanded from a set of PairNodes.

theorem Cslib.Circuits.Frontier.Multigraph.mem_pairNodeVerts_of_notMem {V : Type u_1} {E : Type u_2} {G : Multigraph V E} {M M_clean : Set E} {score : E → ℝ} {S : Set (G.PairNode M M_clean score)} {v : V} (hv : v ∉ G.matchedVertices (G.equalKeyPairs M M_clean score)) :
v ∈ G.pairNodeVerts M M_clean score S ↔ Sum.inl ⟨v, hv⟩ ∈ S
theorem Cslib.Circuits.Frontier.Multigraph.mem_pairNodeVerts_of_mem {V : Type u_1} {E : Type u_2} {G : Multigraph V E} {M M_clean : Set E} (hM : G.IsMatching M) (hclean : M_clean ⊆ M) {score : E → ℝ} {S : Set (G.PairNode M M_clean score)} (e : ↑(G.equalKeyPairs M M_clean score)) {v : V} (hev : G.src ↑e = v ∨ G.tgt ↑e = v) :
v ∈ G.pairNodeVerts M M_clean score S ↔ Sum.inr e ∈ S
theorem Cslib.Circuits.Frontier.Multigraph.exists_u2_pairNode_layout {V : Type u_1} {E : Type u_2} [Finite V] [Finite E] {G : Multigraph V E} (hloop : G.Loopless) (h3 : ∀ (v : V), (G.incidenceSet v).ncard = 3) {M M_clean : Set E} (hM : G.IsMatching M) (hclean : M_clean ⊆ M) {lam : ℝ} (hlam0 : 0 ≤ lam) (hlam1 : lam ≤ 1) (score : E → ℝ) {a δ : ℝ} (hδ : 0 < δ) (K : ℕ) {B : ℝ} (low : 12 * ↑{e : E | score e < a}.ncard ≤ B) (high : 12 * ↑{e : E | a + ↑K * δ ≤ score e}.ncard ≤ B) (mid : ∀ i < K, G.weightedMatchingCost M M_clean lam score (a + ↑i * δ) + 12 * ↑{e : E | a + ↑i * δ ≤ score e ∧ score e < a + (↑i + 1) * δ}.ncard ≤ B) :
∃ (σ : Layout (G.PairNode M M_clean score)), ∀ (s : ℕ), have P := G.pairNodeVerts M M_clean score (σ.initial s); ↑(G.edgeCut P).ncard - (1 - lam) * ↑(G.activeCleanPairs M M_clean score P).ncard ≤ B

Grid bound on PairNode prefixes. Sorting PairNode G M M_clean score by pairNodeKey yields a layout σ whose every expanded prefix P = pairNodeVerts (σ.initial s) satisfies |edgeCut P| - (1 - lam) |activeCleanPairs P| ≤ B over any grid a, a + δ, ..., a + K δ.

U₂ cubic pair-node layout hypothesis with unmatched per-vertex cost p and per-matched clean-pair cost B_pair at weight λ = log₂ 3 - 1 (1 - λ = 2 - log₂ 3).