Documentation

CslibFrontier.Computability.Complexity.Classes.SBP

Small bounded-error polynomial time #

SBP was introduced by Böhler, Glaßer and Meister. We use Watson, Definition 2: a #P count is at least a binary FP threshold on members and strictly less than half the threshold on nonmembers. The threshold may be zero; mem_SBP_iff_exists_pos_threshold shows that requiring positivity is equivalent. These are verifier counts, without a proved nondeterministic counting-machine equivalence. The containments and union closure below are elementary counting-algebra consequences; MA ⊆ SBP (Cslib.Complexity.MA_subset_SBP) and SBP ⊆ AM (Cslib.Complexity.SBP_subset_AM) are proved in CslibFrontier.Computability.Complexity.Classes.ArthurMerlin.Amplification and CslibFrontier.Computability.Complexity.Classes.ArthurMerlin.SetLowerBound.

Main definitions #

Main results #

References #

def Cslib.Complexity.SBP {α : Type} (enc : α ↪ List Bool) :
Set (Set α)

A #P count at least an FP threshold on members and strictly below half on nonmembers Böhler, Glaßer and Meister, Watson, Definition 2. The threshold is encoded in binary and may be exponentially large.

theorem Cslib.Complexity.mem_SBP {α : Type} {enc : α ↪ List Bool} {A : Set α} :
A ∈ SBP enc ↔ ∃ f ∈ SharpP enc, ∃ (k : α → ℕ), Turing.MultiTapeTM.ComputableInPolyTime k enc Turing.MultiTapeTM.encNat ∧ ∀ (a : α), (a ∈ A → k a ≤ f a) ∧ (a ∉ A → 2 * f a < k a)
theorem Cslib.Complexity.mem_SBP_iff_exists_pos_threshold {α : Type} {enc : α ↪ List Bool} {A : Set α} :
A ∈ SBP enc ↔ ∃ f ∈ SharpP enc, ∃ (k : α → ℕ), Turing.MultiTapeTM.ComputableInPolyTime k enc Turing.MultiTapeTM.encNat ∧ (∀ (a : α), 0 < k a) ∧ ∀ (a : α), (a ∈ A → k a ≤ f a) ∧ (a ∉ A → 2 * f a < k a)

Replacing (f, k) by (2f + 1, 2k + 1) makes the threshold positive.

theorem Cslib.Complexity.NP_subset_SBP {α : Type} {enc : α ↪ List Bool} :
NP enc ⊆ SBP enc

Threshold one recognizes precisely the positive #P counts.

theorem Cslib.Complexity.BPP_subset_SBP {α : Type} {enc : α ↪ List Bool} :
BPP enc ⊆ SBP enc

Amplifying BPP to error at most one quarter leaves a strict factor-two count gap.

theorem Cslib.Complexity.SBP_subset_PP {α : Type} {enc : α ↪ List Bool} :
SBP enc ⊆ PP enc

The integer gap 2f - k + 1 is positive exactly on members, including zero thresholds.

theorem Cslib.Complexity.PolyTimeReducible.mem_SBP {α β : Type} {enc : α ↪ List Bool} {A : Set α} {encB : β ↪ List Bool} {B : Set β} (h : PolyTimeReducible enc encB A B) (hB : B ∈ SBP encB) :
A ∈ SBP enc

Precomposition preserves both the count and the binary FP threshold.

theorem Cslib.Complexity.union_mem_SBP {α : Type} {enc : α ↪ List Bool} {A B : Set α} (hA : A ∈ SBP enc) (hB : B ∈ SBP enc) :
A ∪ B ∈ SBP enc

Normalize two positive thresholds by cross multiplication, then square and add the counts.

theorem Cslib.Complexity.exists_SBP_gap_pow {α : Type} {enc : α ↪ List Bool} {A : Set α} (hA : A ∈ SBP enc) {m : ℕ} (hm : 0 < m) :
∃ f ∈ SharpP enc, ∃ (k : α → ℕ), Turing.MultiTapeTM.ComputableInPolyTime k enc Turing.MultiTapeTM.encNat ∧ (∀ (a : α), 0 < k a) ∧ ∀ (a : α), (a ∈ A → k a ≤ f a) ∧ (a ∉ A → 2 ^ m * f a < k a)

Every fixed positive repetition count strengthens the SBP multiplicative gap. The integer m is fixed independently of the input; this does not assert uniform closure under input-dependent powers; see CslibFrontier/Computability/Complexity/Classes/SBP/Amplification.lean for the uniform theorem. See Watson, Section 1.1.

theorem Cslib.Complexity.inter_mem_SBP_of_mem_BPP {α : Type} {enc : α ↪ List Bool} {A B : Set α} (hA : A ∈ SBP enc) (hB : B ∈ BPP enc) :
A ∩ B ∈ SBP enc

Intersecting an SBP language with a BPP language preserves SBP. Square the SBP gap, amplify BPP beyond the exponential bound on that count, and multiply counts. This is an elementary consequence of counting closure and Arora–Barak's BPP amplification.