Documentation

Complexity.Computability.Circuit.Boolean.PPoly

P/poly #

A language over Bool is in P/poly when it has circuits of polynomial size: for every input length n, a circuit over the De Morgan basis computing the slice of the language at n (Language.slice), with size bounded by a polynomially bounded function of n Arora and Barak, Definition 6.5. There is no requirement that the circuits for different lengths be related, so P/poly contains undecidable languages.

PPoly is defined through the minimal circuit size of each slice (Cslib.Circuits.complexity); mem_PPoly_iff_exists_circuits is the textbook formulation with an explicit family of circuits. Size counts gates, constants included, which changes sizes by at most a constant factor and so does not change the class. For decision problems over an arbitrary type α with encoding enc : α ↪ List Bool, PPolyOn enc is the class of problems whose image under enc agrees with a language in PPoly.

Main definitions #

Main results #

References #

The languages over Bool that have, for every input length n, a circuit of size at most s n Arora and Barak, Definition 6.2. Size counts gates (Cslib.Circuits.Circuit.size), while Arora and Barak count all vertices, inputs included, so SIZE s is their SIZE (s + n) up to the output vertex.

Instances For

    SIZE is monotone in the size bound.

    The languages over Bool whose slices have circuits of polynomial size.

    Instances For

      A language is in P/poly if and only if the circuit complexity of its slices is polynomially bounded.

      P/poly with circuit families. A language is in P/poly exactly when it has a family of circuits, one for each input length, whose sizes are polynomially bounded.

      theorem Cslib.Circuits.Boolean.mem_PPoly_iff_exists_mem_SIZE {L : Language Bool} :
      L ∈ PPoly ↔ ∃ (c : ℕ), L ∈ SIZE fun (n : ℕ) => c * (n + 1) ^ c

      P/poly is the union of the classes SIZE (c (n + 1) ^ c).

      theorem Cslib.Circuits.Boolean.PPoly.of_synthesis {L : Language Bool} {cost : ℕ → ℕ} (hcost : PolynomiallyBounded cost) (h : ∀ (n : ℕ), Synthesis interpretation (inputs n) {L.slice n} (cost n)) :

      A language whose slices are synthesised from the inputs within a polynomial budget is in P/poly.

      theorem Cslib.Circuits.Boolean.PPoly.of_slice_const {L : Language Bool} (b : ℕ → Bool) (h : ∀ (n : ℕ) (x : Fin n → Bool), L.slice n x = b n) :

      A language whose slices are constant is in P/poly.

      The empty language is in P/poly.

      The universal language is in P/poly.

      P/poly is closed under complement.

      theorem Cslib.Circuits.Boolean.PPoly.sup {L M : Language Bool} (hL : L ∈ PPoly) (hM : M ∈ PPoly) :
      L ⊔ M ∈ PPoly

      P/poly is closed under union.

      theorem Cslib.Circuits.Boolean.PPoly.inf {L M : Language Bool} (hL : L ∈ PPoly) (hM : M ∈ PPoly) :
      L ⊓ M ∈ PPoly

      P/poly is closed under intersection.

      def Cslib.Circuits.Boolean.PPolyOn {α : Type u_1} (enc : α ↪ List Bool) :
      Set (Set α)

      Problems with circuits of polynomial size. A decision problem A : Set α, with encoding enc : α ↪ List Bool of its instances, lies in PPolyOn enc when some language L ∈ PPoly agrees with A along enc.

      Instances For
        theorem Cslib.Circuits.Boolean.mem_PPolyOn {α : Type u_1} {enc : α ↪ List Bool} {A : Set α} :
        A ∈ PPolyOn enc ↔ ∃ L ∈ PPoly, ∀ (a : α), a ∈ A ↔ enc a ∈ L

        A problem is in PPolyOn enc if and only if some language in P/poly agrees with it along enc.

        @[simp]

        Over bitstrings (encBits), membership in PPolyOn encBits is membership in PPoly.

        theorem Cslib.Circuits.Boolean.PPolyOn.compl {α : Type u_1} {enc : α ↪ List Bool} {A : Set α} (hA : A ∈ PPolyOn enc) :

        PPolyOn is closed under complement.

        @[simp]
        theorem Cslib.Circuits.Boolean.compl_mem_PPolyOn_iff {α : Type u_1} {enc : α ↪ List Bool} {A : Set α} :

        A complement lies in PPolyOn enc if and only if the problem does.

        theorem Cslib.Circuits.Boolean.PPolyOn.sup {α : Type u_1} {enc : α ↪ List Bool} {A B : Set α} (hA : A ∈ PPolyOn enc) (hB : B ∈ PPolyOn enc) :
        A ∪ B ∈ PPolyOn enc

        PPolyOn is closed under union.

        theorem Cslib.Circuits.Boolean.PPolyOn.inf {α : Type u_1} {enc : α ↪ List Bool} {A B : Set α} (hA : A ∈ PPolyOn enc) (hB : B ∈ PPolyOn enc) :
        A ∩ B ∈ PPolyOn enc

        PPolyOn is closed under intersection.