Documentation

CslibFrontier.Computability.Circuit.Frontier.Layouts.Switched.Pathwidth

Interval bags, ranks, and cubic pathwidth to cutwidth #

This file collects the basic interval-bag and label-rank utilities for the switched Gaussian sweep, and provides the median edge-index bridge (exists_width_le_of_intervals) that turns any finite interval decomposition of a cubic multigraph G with maximum bag size w into a vertex layout of cutwidth at most w + 1 (i.e., cw(G) ≤ pw(G) + 2).

Proof of the bridge. Suppose every vertex v is assigned a closed interval [s v, e v] in {0, …, T} and every edge a lies inside some bag intervalBag s e (t a). Assign every edge a distinct integer score score a = t a * (|E| + 1) + idx a, where idx : E ≃ Fin |E|. Order the vertices by their median edge score (Multigraph.exists_isMedian). For any threshold m splitting a prefix P from Pᶜ, write i = m / (|E| + 1):

Therefore |edgeCut P| ≤ |intervalBag s e i| + 1. This recovers the cw ≤ pw + 2 bound for cubic multigraphs (even with parallel edges) in direct elementary fashion.

The rank lemmas are adapted from the MIT-licensed Lean 4 companion of [Gas26] (doi:10.5281/zenodo.23883489, module CubicPathwidth.C3.Intervals).

Main definitions #

Main results #

References #

def Cslib.Circuits.Frontier.Switched.intervalBag {V : Type u_1} [Fintype V] (s e : V → ℕ) (t : ℕ) :

The bag of vertices whose interval [s v, e v] contains t.

@[simp]
theorem Cslib.Circuits.Frontier.Switched.mem_intervalBag {V : Type u_1} [Fintype V] {s e : V → ℕ} {t : ℕ} {v : V} :
v ∈ intervalBag s e t ↔ s v ≤ t ∧ t ≤ e v

A vertex belongs to intervalBag s e t iff s v ≤ t ≤ e v.

Ranks of injective real labelings #

noncomputable def Cslib.Circuits.Frontier.Switched.rank {n : ℕ} (y : Fin n → ℝ) (v : Fin n) :

The number of vertices with label strictly below y v.

theorem Cslib.Circuits.Frontier.Switched.rank_lt_rank {n : ℕ} {y : Fin n → ℝ} {u v : Fin n} (h : y u < y v) :
rank y u < rank y v

Strictly smaller label implies strictly smaller rank.

theorem Cslib.Circuits.Frontier.Switched.rank_lt_iff {n : ℕ} {y : Fin n → ℝ} (hy : Function.Injective y) {u v : Fin n} :
rank y u < rank y v ↔ y u < y v

For injective y, rank order equals label order.

theorem Cslib.Circuits.Frontier.Switched.rank_le_iff {n : ℕ} {y : Fin n → ℝ} (hy : Function.Injective y) {u v : Fin n} :
rank y u ≤ rank y v ↔ y u ≤ y v

For injective y, weak rank order equals weak label order.

For injective y, rank y is injective.

theorem Cslib.Circuits.Frontier.Switched.rank_lt_n {n : ℕ} (y : Fin n → ℝ) (v : Fin n) :
rank y v < n

Every rank is strictly below n.

theorem Cslib.Circuits.Frontier.Switched.exists_rank_eq {n : ℕ} {y : Fin n → ℝ} (hy : Function.Injective y) {i : ℕ} (hi : i < n) :
∃ (v : Fin n), rank y v = i

Every index below n is realized as the rank of some vertex.

theorem Cslib.Circuits.Frontier.Switched.card_rank_eq_le {n : ℕ} {y : Fin n → ℝ} (hy : Function.Injective y) (i : ℕ) :
{v : Fin n | rank y v = i}.card ≤ 1

At most one vertex has a given rank when y is injective.

theorem Cslib.Circuits.Frontier.Switched.rank_lt_lowerCount_iff {n : ℕ} (y : Fin n → ℝ) (v : Fin n) :
rank y v < {u : Fin n | y u ≤ 0}.card ↔ y v ≤ 0

The vertices with rank below #{u | y u ≤ 0} are precisely those with y v ≤ 0.

Cubic pathwidth-to-cutwidth bridge #

theorem Cslib.Circuits.Frontier.Switched.exists_width_le_of_intervals {V : Type u_1} {E : Type u_2} [Fintype V] [Finite E] (G : Multigraph V E) (h3 : ∀ (v : V), (G.incidenceSet v).ncard = 3) (T : ℕ) (s e : V → ℕ) (hse : ∀ (v : V), s v ≤ e v) (heT : ∀ (v : V), e v ≤ T) (hedge : ∀ (a : E), ∃ t ≤ T, s (G.src a) ≤ t ∧ t ≤ e (G.src a) ∧ s (G.tgt a) ≤ t ∧ t ≤ e (G.tgt a)) {w : ℕ} (hw : ∀ t ≤ T, (intervalBag s e t).card ≤ w) :
∃ (π : Layout V), G.width π ≤ w + 1

From vertex intervals (pathwidth) to a vertex layout (cutwidth) on cubic multigraphs. If every vertex v carries a nonempty interval [s v, e v] ⊆ [0, T] such that every edge joins two vertices whose intervals overlap inside {0, …, T}, and every intervalBag s e t (t ≤ T) has cardinality at most w, then the cubic multigraph admits a layout of width at most w + 1.