Documentation

CslibFrontier.Computability.Circuit.Frontier.MultiPass

Multi-pass sweeps and slice-restriction bounds #

This module extends the dynamic charging lemma Cslib.Circuits.Frontier.Sweep.ncard_le from read-once branching programs (Cslib.Circuits.Frontier.ReadOnceNBP) to oblivious multi-pass branching programs and partial-overlap coordinate restrictions:

  1. Exact slice invariance (RectangleFree.restrictSlice, RectangleBias.restrictSlice): fixing any subset of coordinates O ⊆ ι to any assignment a : O → U preserves both RectangleFree · K and RectangleBias · K b on restrictSlice S O a with the exact same threshold K (and bias b). By pigeonhole (exists_le_mul_ncard_restrictSlice), some slice satisfies |S| ≤ |U| ^ |O| · |restrictSlice S O a|.
  2. Alternating (boustrophedon) k-pass branching programs (AlternatingPassNBP): even passes scan 0, ..., T - 1 forward while odd passes scan T - 1, ..., 0 backward. At every cut 0 < τ < T, all k - 1 pass-turnaround states lie strictly on one side of revealed τ | (revealed τ)ᶜ, so the dynamic sweep message AlternatingPassNBP.sweep holds only the k active pass states (M ^ k). Consequently, a k-pass program with per-label fiber capacity C (C = |M| when deterministic) satisfies |accepted| ≤ (K - 1) ^ 2 · (∑_{t < T} |U| ^ |newly t|) · C ^ k, yielding state-width lower bound k · log_q |M| ≥ log_q |S| - 2 log_q K - log_q T - 1 (w ≥ n / k - o(n)), avoiding the factor-of-two loss of static single-cut reductions [Juk12].
  3. Same-order k-pass branching programs (SameOrderPassNBP): when all k passes scan 0, ..., T - 1 in the same order, k - 1 inter-pass turnaround states also cross every interior cut 0 < τ < T without changing between consecutive sweep steps, giving |accepted| ≤ (K - 1) ^ 2 · (∑_{t < T} |U| ^ |newly t|) · |M| ^ (k - 1) · C ^ k ((2 k - 1) · log_q |M| ≥ log_q |S| - 2 log_q K - log_q T - 1, i.e. w ≥ n / (2 k - 1) - o(n) when deterministic).

Main definitions #

Main results #

References #

Coordinate slices and exact restriction invariance #

noncomputable def Cslib.Circuits.Frontier.extendAssign {ι : Type u_1} {U : Type u_2} (O : Set ι) (a : ↑O → U) (y : ↑Oᶜ → U) :
ι → U

Combine an assignment a : O → U on O and y : ↥Oᶜ → U outside O into ι → U.

noncomputable def Cslib.Circuits.Frontier.restrictSlice {ι : Type u_1} {U : Type u_2} (S : Set (ι → U)) (O : Set ι) (a : ↑O → U) :
Set (↑Oᶜ → U)

The slice {y : ↥Oᶜ → U | extendAssign O a y ∈ S} of S fixing O to a.

@[simp]
theorem Cslib.Circuits.Frontier.extendAssign_mem {ι : Type u_1} {U : Type u_2} {O : Set ι} {a : ↑O → U} {y : ↑Oᶜ → U} {i : ι} (hi : i ∈ O) :
extendAssign O a y i = a ⟨i, hi⟩
@[simp]
theorem Cslib.Circuits.Frontier.extendAssign_notMem {ι : Type u_1} {U : Type u_2} {O : Set ι} {a : ↑O → U} {y : ↑Oᶜ → U} {i : ι} (hi : i ∉ O) :
extendAssign O a y i = y ⟨i, hi⟩
@[simp]
theorem Cslib.Circuits.Frontier.domRestrict_extendAssign_left {ι : Type u_1} {U : Type u_2} (O : Set ι) (a : ↑O → U) (y : ↑Oᶜ → U) :
@[simp]
theorem Cslib.Circuits.Frontier.domRestrict_extendAssign_right {ι : Type u_1} {U : Type u_2} (O : Set ι) (a : ↑O → U) (y : ↑Oᶜ → U) :
@[simp]
theorem Cslib.Circuits.Frontier.extendAssign_domRestrict {ι : Type u_1} {U : Type u_2} (O : Set ι) (x : ι → U) :
theorem Cslib.Circuits.Frontier.extendAssign_injective {ι : Type u_1} {U : Type u_2} (O : Set ι) (a : ↑O → U) :

Extending with a fixed a : O → U is injective on ↥Oᶜ → U.

theorem Cslib.Circuits.Frontier.RectangleFree.restrictSlice {ι : Type u_1} {U : Type u_2} {S : Set (ι → U)} {K : ℕ} (hS : RectangleFree S K) (O : Set ι) (a : ↑O → U) :

Exact restriction invariance of RectangleFree. Fixing any coordinate subset O to any assignment a : O → U preserves K-rectangle-freeness with the exact same threshold K.

theorem Cslib.Circuits.Frontier.RectangleBias.restrictSlice {ι : Type u_1} {U : Type u_2} {S : Set (ι → U)} {K : ℕ} {b : ℝ} (hS : RectangleBias S K b) (O : Set ι) (a : ↑O → U) :

Exact restriction invariance of RectangleBias. Fixing any coordinate subset O to any assignment a : O → U preserves (K, b)-rectangle-bias on restrictSlice S O a.

theorem Cslib.Circuits.Frontier.exists_le_mul_ncard_restrictSlice {ι : Type u_1} {U : Type u_2} [Finite ι] [Finite U] [Nonempty U] (S : Set (ι → U)) (O : Set ι) :
∃ (a : ↑O → U), S.ncard ≤ Nat.card U ^ O.ncard * (restrictSlice S O a).ncard

Pigeonhole dense slice. Over finite coordinates and a nonempty finite alphabet, some assignment a : O → U gives |S| ≤ |U| ^ |O| · |restrictSlice S O a|.

Shared sweep transition-capacity and logarithmic width helpers #

theorem Cslib.Circuits.Frontier.Sweep.ncard_le_of_ncard_transition_le {ι : Type u_1} {U : Type u_2} {M : Type u_3} [Finite ι] [Finite U] {S : Set (ι → U)} (W : Sweep S M) (hL : 0 < W.length) {F K : ℕ} (htrans : ∀ t < W.length, (W.transition t '' S).ncard ≤ Nat.card U ^ (W.newly t).ncard * F) (hS : RectangleFree S K) :
S.ncard ≤ ((K - 1) ^ 2 * ∑ t ∈ Finset.range W.length, Nat.card U ^ (W.newly t).ncard) * F

Sweep bound from per-step state-fiber capacity. If W : Sweep S M has 0 < W.length and at most |U| ^ |W.newly t| · F transitions at each step t < W.length, then for any K-rectangle-free S, |S| ≤ (K - 1) ^ 2 · (∑_{t < W.length} |U| ^ |W.newly t|) · F.

Alternating (boustrophedon) k-pass branching programs #

Base coordinate index read at local step s of pass p in an alternating k-pass schedule of length T: s when p is even, and T - 1 - s when p is odd.

Layer of pass p separating revealed τ from (revealed τ)ᶜ in an alternating schedule.

structure Cslib.Circuits.Frontier.AlternatingPassNBP (ι : Type u_1) (U : Type u_2) (M : Type u_3) :
Type (max (max u_1 u_2) u_3)

A layered alternating k-pass nondeterministic branching program (boustrophedon schedule) over inputs ι → U with state space M. Even passes scan 0, ..., length - 1 forward; odd passes scan length - 1, ..., 0 backward; consecutive passes share their turnaround state.

@[reducible, inline]
abbrev Cslib.Circuits.Frontier.AlternatingPassNBP.newly {ι : Type u_1} {U : Type u_2} {M : Type u_3} (P : AlternatingPassNBP ι U M) (t : ℕ) :
Set ι

Coordinates in block t: revealed (t + 1) \ revealed t.

@[reducible, inline]
abbrev Cslib.Circuits.Frontier.AlternatingPassNBP.stepCoords {ι : Type u_1} {U : Type u_2} {M : Type u_3} (P : AlternatingPassNBP ι U M) (p s : ℕ) :
Set ι

Coordinates read at local step s of pass p.

structure Cslib.Circuits.Frontier.AlternatingPassNBP.IsAcceptingPath {ι : Type u_1} {U : Type u_2} {M : Type u_3} (P : AlternatingPassNBP ι U M) (x : ι → U) (γ : ℕ → ℕ → M) :

γ is an accepting k-pass trajectory for input x.

def Cslib.Circuits.Frontier.AlternatingPassNBP.accepted {ι : Type u_1} {U : Type u_2} {M : Type u_3} (P : AlternatingPassNBP ι U M) :
Set (ι → U)

The inputs accepted by P.

Per-label state-transition capacity bound C at every pass and step.

P is deterministic when every (p, s, m, a) has at most one successor state m'.

A deterministic alternating k-pass program over a finite state space M has fiber bound Nat.card M.

theorem Cslib.Circuits.Frontier.AlternatingPassNBP.IsAcceptingPath.splice {ι : Type u_1} {U : Type u_2} {M : Type u_3} {P : AlternatingPassNBP ι U M} {x y z : ι → U} {γ δ : ℕ → ℕ → M} (hγ : P.IsAcceptingPath x γ) (hδ : P.IsAcceptingPath y δ) {τ : ℕ} (hτ0 : 0 < τ) (hτT : τ < P.length) (hagree : ∀ p < P.passes, γ p (passBoundary P.length p τ) = δ p (passBoundary P.length p τ)) (hzx : Set.EqOn z x (P.revealed τ)) (hzy : Set.EqOn z y (P.revealed τ)ᶜ) :
P.IsAcceptingPath z fun (p s : ℕ) => if p % 2 = 0 then if s ≤ τ then γ p s else δ p s else if s ≤ P.length - τ then δ p s else γ p s

Boustrophedon splicing. Two accepting trajectories agreeing at the k moving boundary states passBoundary P.length p τ (0 < τ < P.length) splice across the cut P.revealed τ with no extra turnaround state.

noncomputable def Cslib.Circuits.Frontier.AlternatingPassNBP.sweep {ι : Type u_1} {U : Type u_2} {M : Type u_3} (P : AlternatingPassNBP ι U M) :

Dynamic sweep of an alternating k-pass branching program. At interior times 0 < t < P.length, the message records only the k active pass boundary states; at t = 0 and t ≥ P.length, the message is none.

theorem Cslib.Circuits.Frontier.AlternatingPassNBP.ncard_transition_sweep_le {ι : Type u_1} {U : Type u_2} {M : Type u_3} (P : AlternatingPassNBP ι U M) [Finite ι] [Finite U] [Finite M] {C : ℕ} (hC : P.HasFiberBound C) {t : ℕ} (ht : t < P.length) :

At step t < P.length, the number of sweep transitions is at most |U| ^ |newly t| · C ^ passes under P.HasFiberBound C.

theorem Cslib.Circuits.Frontier.AlternatingPassNBP.ncard_accepted_le_of_hasFiberBound {ι : Type u_1} {U : Type u_2} {M : Type u_3} (P : AlternatingPassNBP ι U M) [Finite ι] [Finite U] [Finite M] (hL : 0 < P.length) {C K : ℕ} (hC : P.HasFiberBound C) (hS : RectangleFree P.accepted K) :
P.accepted.ncard ≤ ((K - 1) ^ 2 * ∑ t ∈ Finset.range P.length, Nat.card U ^ (P.newly t).ncard) * C ^ P.passes

Alternating k-pass rectangle bound. If P.accepted is K-rectangle-free and P has per-label fiber bound C, then |accepted| ≤ (K - 1) ^ 2 · (∑_{t < length} |U| ^ |newly t|) · C ^ passes.

theorem Cslib.Circuits.Frontier.AlternatingPassNBP.ncard_accepted_le_deterministic {ι : Type u_1} {U : Type u_2} {M : Type u_3} (P : AlternatingPassNBP ι U M) [Finite ι] [Finite U] [Nonempty U] [Finite M] (hdet : P.Deterministic) (hL : 0 < P.length) (hunit : ∀ t < P.length, (P.newly t).ncard ≤ 1) {K : ℕ} (hS : RectangleFree P.accepted K) :

Deterministic alternating k-pass rectangle bound (unit coordinate steps). When each block newly t reads at most one coordinate and P is deterministic, |accepted| ≤ (K - 1) ^ 2 · length · |U| · |M| ^ passes.

theorem Cslib.Circuits.Frontier.AlternatingPassNBP.le_passes_mul_logb_card {ι : Type u_1} {U : Type u_2} {M : Type u_3} (P : AlternatingPassNBP ι U M) [Finite ι] [Finite U] [Nontrivial U] [Finite M] (hdet : P.Deterministic) (hL : 0 < P.length) (hunit : ∀ t < P.length, (P.newly t).ncard ≤ 1) {K : ℕ} (hS : RectangleFree P.accepted K) (hne : P.accepted.Nonempty) :
Real.logb ↑(Nat.card U) ↑P.accepted.ncard - 2 * Real.logb ↑(Nat.card U) ↑K - Real.logb ↑(Nat.card U) ↑P.length - 1 ≤ ↑P.passes * Real.logb ↑(Nat.card U) ↑(Nat.card M)

Alternating k-pass logarithmic state-width lower bound (w ≥ n / k - o(n)). Over a finite alphabet U with q = |U| ≥ 2, a deterministic alternating k-pass program reading at most one coordinate per step on a nonempty K-rectangle-free set satisfies log_q |accepted| - 2 log_q K - log_q length - 1 ≤ passes · log_q |M|.

Same-order k-pass branching programs #

structure Cslib.Circuits.Frontier.SameOrderPassNBP (ι : Type u_1) (U : Type u_2) (M : Type u_3) :
Type (max (max u_1 u_2) u_3)

A layered same-order k-pass nondeterministic branching program over inputs ι → U with state space M. Every pass 0 ≤ p < passes scans 0, ..., length - 1 in the same forward order, with turnaround identification γ (p + 1) 0 = γ p length.

  • passes : ℕ

    Number of passes k ≥ 1.

  • passes_pos : 0 < self.passes

    At least one pass is performed.

  • length : ℕ

    Number of coordinate blocks per pass.

  • revealed : ℕ → Set ι

    Monotone coordinate filtration ∅ = revealed 0 ⊆ ... ⊆ revealed length = univ.

  • revealed_zero : self.revealed 0 = ∅

    Nothing is revealed before block 0.

  • revealed_length : self.revealed self.length = Set.univ

    Everything is revealed by block length.

  • revealed_mono : Monotone self.revealed

    Revealed coordinates grow monotonically.

  • start : M

    Initial state at the start of pass 0.

  • accept : M

    Accepting state at the end of pass passes - 1.

  • Edge (p s : ℕ) : M → (↑(self.revealed (s + 1) \ self.revealed s) → U) → M → Prop

    Edge p s m a m' holds when pass p at step s transitions from m to m' upon reading a on revealed (s + 1) \ revealed s.

@[reducible, inline]
abbrev Cslib.Circuits.Frontier.SameOrderPassNBP.newly {ι : Type u_1} {U : Type u_2} {M : Type u_3} (P : SameOrderPassNBP ι U M) (t : ℕ) :
Set ι

Coordinates read at step t: revealed (t + 1) \ revealed t.

structure Cslib.Circuits.Frontier.SameOrderPassNBP.IsAcceptingPath {ι : Type u_1} {U : Type u_2} {M : Type u_3} (P : SameOrderPassNBP ι U M) (x : ι → U) (γ : ℕ → ℕ → M) :

γ is an accepting same-order k-pass trajectory for input x.

def Cslib.Circuits.Frontier.SameOrderPassNBP.accepted {ι : Type u_1} {U : Type u_2} {M : Type u_3} (P : SameOrderPassNBP ι U M) :
Set (ι → U)

The inputs accepted by P.

def Cslib.Circuits.Frontier.SameOrderPassNBP.HasFiberBound {ι : Type u_1} {U : Type u_2} {M : Type u_3} (P : SameOrderPassNBP ι U M) (C : ℕ) :

Per-label state-transition capacity bound C at every pass and step.

P is deterministic when every (p, s, m, a) has at most one successor state m'.

A deterministic same-order k-pass program over a finite state space M has fiber bound Nat.card M.

theorem Cslib.Circuits.Frontier.SameOrderPassNBP.IsAcceptingPath.splice {ι : Type u_1} {U : Type u_2} {M : Type u_3} {P : SameOrderPassNBP ι U M} {x y z : ι → U} {γ δ : ℕ → ℕ → M} (hγ : P.IsAcceptingPath x γ) (hδ : P.IsAcceptingPath y δ) {τ : ℕ} (hτT : τ < P.length) (hmove : ∀ p < P.passes, γ p τ = δ p τ) (hturn : ∀ (p : ℕ), p + 1 < P.passes → γ p P.length = δ p P.length) (hzx : Set.EqOn z x (P.revealed τ)) (hzy : Set.EqOn z y (P.revealed τ)ᶜ) :
P.IsAcceptingPath z fun (p s : ℕ) => if s ≤ τ then γ p s else δ p s

Same-order k-pass splicing. Two trajectories agreeing on both the k moving layer-τ states and the k - 1 inter-pass turnaround states splice across P.revealed τ (0 < τ < length).

noncomputable def Cslib.Circuits.Frontier.SameOrderPassNBP.sweep {ι : Type u_1} {U : Type u_2} {M : Type u_3} (P : SameOrderPassNBP ι U M) :
Sweep P.accepted (Option ((Fin P.passes → M) × (Fin (P.passes - 1) → M)))

Dynamic sweep of a same-order k-pass branching program. At interior times 0 < t < P.length, the message records the k moving layer-t states together with the k - 1 turnaround states (path x p length)_{p < k - 1}.

theorem Cslib.Circuits.Frontier.SameOrderPassNBP.ncard_transition_sweep_le {ι : Type u_1} {U : Type u_2} {M : Type u_3} (P : SameOrderPassNBP ι U M) [Finite ι] [Finite U] [Finite M] {C : ℕ} (hC : P.HasFiberBound C) {t : ℕ} (ht : t < P.length) :

At step t < P.length, the number of sweep transitions of a same-order k-pass program is at most |U| ^ |newly t| · |M| ^ (passes - 1) · C ^ passes under P.HasFiberBound C: the k - 1 turnaround states stay fixed across step t, so they are counted once rather than twice.

theorem Cslib.Circuits.Frontier.SameOrderPassNBP.ncard_accepted_le_of_hasFiberBound {ι : Type u_1} {U : Type u_2} {M : Type u_3} (P : SameOrderPassNBP ι U M) [Finite ι] [Finite U] [Finite M] (hL : 0 < P.length) {C K : ℕ} (hC : P.HasFiberBound C) (hS : RectangleFree P.accepted K) :
P.accepted.ncard ≤ ((K - 1) ^ 2 * ∑ t ∈ Finset.range P.length, Nat.card U ^ (P.newly t).ncard) * Nat.card M ^ (P.passes - 1) * C ^ P.passes

Same-order k-pass rectangle bound. If P.accepted is K-rectangle-free and P has per-label fiber bound C, then |accepted| ≤ (K - 1) ^ 2 · (∑_{t < length} |U| ^ |newly t|) · |M| ^ (passes - 1) · C ^ passes.

theorem Cslib.Circuits.Frontier.SameOrderPassNBP.ncard_accepted_le_deterministic {ι : Type u_1} {U : Type u_2} {M : Type u_3} (P : SameOrderPassNBP ι U M) [Finite ι] [Finite U] [Nonempty U] [Finite M] (hdet : P.Deterministic) (hL : 0 < P.length) (hunit : ∀ t < P.length, (P.newly t).ncard ≤ 1) {K : ℕ} (hS : RectangleFree P.accepted K) :
P.accepted.ncard ≤ (K - 1) ^ 2 * P.length * Nat.card U * Nat.card M ^ (2 * P.passes - 1)

Deterministic same-order k-pass rectangle bound (unit coordinate steps). When each block reads at most one coordinate and P is deterministic, |accepted| ≤ (K - 1) ^ 2 · length · |U| · |M| ^ (2 · passes - 1).

theorem Cslib.Circuits.Frontier.SameOrderPassNBP.le_two_mul_passes_sub_one_mul_logb_card {ι : Type u_1} {U : Type u_2} {M : Type u_3} (P : SameOrderPassNBP ι U M) [Finite ι] [Finite U] [Nontrivial U] [Finite M] (hdet : P.Deterministic) (hL : 0 < P.length) (hunit : ∀ t < P.length, (P.newly t).ncard ≤ 1) {K : ℕ} (hS : RectangleFree P.accepted K) (hne : P.accepted.Nonempty) :
Real.logb ↑(Nat.card U) ↑P.accepted.ncard - 2 * Real.logb ↑(Nat.card U) ↑K - Real.logb ↑(Nat.card U) ↑P.length - 1 ≤ ↑(2 * P.passes - 1) * Real.logb ↑(Nat.card U) ↑(Nat.card M)

Same-order k-pass logarithmic state-width lower bound (w ≥ n / (2 k - 1) - o(n)). Over a finite alphabet U with q = |U| ≥ 2, a deterministic same-order k-pass program reading at most one coordinate per step on a nonempty K-rectangle-free set satisfies log_q |accepted| - 2 log_q K - log_q length - 1 ≤ (2 · passes - 1) · log_q |M|.

Embedding ReadOnceNBP into AlternatingPassNBP and partial-overlap slice bounds #

def Cslib.Circuits.Frontier.ReadOnceNBP.Deterministic {ι : Type u_1} {U : Type u_2} {M : Type u_3} (P : ReadOnceNBP ι U M) :

P is deterministic when every (t, m, a) has at most one successor state m'.

Embed a ReadOnceNBP as a 1-pass AlternatingPassNBP with the same filtration and accepted set.

@[simp]

P.toAlternatingPassNBP accepts the exact same inputs as P.

theorem Cslib.Circuits.Frontier.le_passes_mul_logb_card_of_slice {ι : Type u_1} {U : Type u_2} {M : Type u_3} [Finite ι] [Finite U] [Nontrivial U] [Finite M] {S : Set (ι → U)} {K k T' : ℕ} (hS : RectangleFree S K) (hne : S.Nonempty) (hT' : 0 < T') (O : Set ι) (hslice : ∀ (a : ↑O → U), ∃ (P : AlternatingPassNBP (↑Oᶜ) U M), P.passes = k ∧ P.length = T' ∧ P.Deterministic ∧ (∀ t < P.length, (P.newly t).ncard ≤ 1) ∧ P.accepted = restrictSlice S O a) :
Real.logb ↑(Nat.card U) ↑S.ncard - ↑O.ncard - 2 * Real.logb ↑(Nat.card U) ↑K - Real.logb ↑(Nat.card U) ↑T' - 1 ≤ ↑k * Real.logb ↑(Nat.card U) ↑(Nat.card M)

Slice-induced k-pass lower bound (w ≥ ((1 - α) / k) n - o(n)). Suppose S ⊆ U^ι is nonempty and K-rectangle-free, O ⊆ ι is the subset of multi-read coordinates, and for every fixing a : O → U there is a deterministic k-pass alternating program on ↥Oᶜ with state space M of length T' > 0 (at most one coordinate per step) accepting restrictSlice S O a. Then log_q |S| - |O| - 2 log_q K - log_q T' - 1 ≤ k · log_q |M|.

theorem Cslib.Circuits.Frontier.le_logb_card_of_slice_readOnce {ι : Type u_1} {U : Type u_2} {M : Type u_3} [Finite ι] [Finite U] [Nontrivial U] [Finite M] {S : Set (ι → U)} {K T' : ℕ} (hS : RectangleFree S K) (hne : S.Nonempty) (hT' : 0 < T') (O : Set ι) (hslice : ∀ (a : ↑O → U), ∃ (P : ReadOnceNBP (↑Oᶜ) U M), P.length = T' ∧ P.Deterministic ∧ (∀ t < P.length, (P.newly t).ncard ≤ 1) ∧ P.accepted = restrictSlice S O a) :
Real.logb ↑(Nat.card U) ↑S.ncard - ↑O.ncard - 2 * Real.logb ↑(Nat.card U) ↑K - Real.logb ↑(Nat.card U) ↑T' - 1 ≤ Real.logb ↑(Nat.card U) ↑(Nat.card M)

Slice-induced read-once lower bound (w ≥ (1 - α) n - o(n)). Suppose S ⊆ U^ι is nonempty and K-rectangle-free, O ⊆ ι is the subset of multi-read coordinates, and for every fixing a : O → U there is a deterministic ReadOnceNBP on ↥Oᶜ with state space M of length T' > 0 (at most one coordinate per step) accepting restrictSlice S O a. Then log_q |S| - |O| - 2 log_q K - log_q T' - 1 ≤ log_q |M|.