Documentation

CslibFrontier.Computability.Circuit.Boolean.PolynomialTime

P ⊆ P/poly and BPP ⊆ P/poly #

A problem decided in polynomial time has circuits of polynomial size Arora and Barak, Theorem 6.6: the machine deciding it writes [true] within polynomially many steps exactly on the encoded members, and the inputs on which a machine does so form a language in P/poly (MachineSimulation.acceptedWithin_mem_PPoly). With Adleman's theorem (PPoly.of_boundedError), the same holds for problems decided with bounded error Arora and Barak, Theorem 7.14: the verifier's circuits read frame x ++ r, whose bits are bits of x, bits of r or constants (frameWiring), so they are circuits for a function of x ++ r of the same size up to two gates.

Main definitions #

Main results #

References #

theorem Cslib.Circuits.Boolean.exists_complexity_slice_le_of_computableInTime {α : Type u_1} {enc : α ↪ List Bool} {f : α → Bool} {t s : ℕ → ℕ} (hf : Turing.MultiTapeTM.ComputableInTimeAndSpaceOfLength f enc Turing.MultiTapeTM.encBool t s) :
∃ (L : Language Bool) (C : ℕ), (∀ (a : α), f a = true ↔ enc a ∈ L) ∧ ∀ (n : ℕ), complexity interpretation (single (L.slice n)) ≤ C * (n + t n + 1) ^ 2

Time t gives circuits with O((n + t n) ^ 2) gates. The instances on which a Boolean function computable within time t n is true, on instances whose encoding has length n, are the preimage under the encoding of a language whose slice at length n has circuit complexity at most C (n + t n + 1) ^ 2, for a constant C (Cslib.Circuits.Boolean.MachineSimulation.complexity_slice_acceptedWithin_le).

theorem Cslib.Circuits.Boolean.PPoly.exists_of_polyTime {α : Type u_1} {enc : α ↪ List Bool} {f : α → Bool} (hf : Turing.MultiTapeTM.ComputableInPolyTime f enc Turing.MultiTapeTM.encBool) :
∃ L ∈ PPoly, ∀ (a : α), f a = true ↔ enc a ∈ L

The instances on which a Boolean function computable in polynomial time is true are the preimage, under the encoding, of a language in P/poly.

theorem Cslib.Circuits.Boolean.P_subset_PPolyOn {α : Type u_1} {enc : α ↪ List Bool} :
Complexity.P enc ⊆ PPolyOn enc

P ⊆ P/poly. A problem in P, with any encoding enc of its instances, is the preimage under enc of a language in P/poly.

Randomised classes #

def Cslib.Circuits.Boolean.frameWiring (n P : ℕ) (j : Fin (2 * n + 1 + P)) :
Fin (n + P) ⊕ Bool

The substitution feeding a function of 2 n + 1 + P variables with frame x ++ r, from the variables x ++ r.

Substituting Fin.append x r along frameWiring n P produces the word frame (List.ofFn x) ++ List.ofFn r.

noncomputable def Cslib.Circuits.Boolean.framedSlice (L : Language Bool) (n P : ℕ) :

The function of x ++ r that tests frame x ++ r ∈ L.

theorem Cslib.Circuits.Boolean.verifier_eq_true_iff {α : Type} {enc : α ↪ List Bool} {V : α × List Bool → Bool} {L : Language Bool} (hVL : ∀ (y : α × List Bool), V y = true ↔ (Turing.MultiTapeTM.encPair enc Turing.MultiTapeTM.encBits) y ∈ L) {n : ℕ} {x : Fin n → Bool} {a : α} (ha : enc a = List.ofFn x) (r : List Bool) {P : ℕ} (r' : Fin P → Bool) (hr : r = List.ofFn r') :
V (a, r) = true ↔ framedSlice L n P (Fin.append x r') = true

The verifier on an encoded instance, as the framed slice of the language deciding it.

BPP ⊆ P/poly. A problem in BPP, with any encoding enc of its instances, is the preimage under enc of a language in P/poly.

RP ⊆ P/poly. A problem in RP, with any encoding enc of its instances, is the preimage under enc of a language in P/poly.

coRP ⊆ P/poly. A problem in coRP, with any encoding enc of its instances, is the preimage under enc of a language in P/poly.