Documentation

CslibFrontier.Computability.Complexity.Classes.SharpP.Oracle.Closure

Uniform counting closure relative to a language oracle #

A single fixed oracle verifier can count outputs of deterministic polynomial-time oracle functions and aggregate a uniform counting family over all words of a polynomial unary length. The same padding and witness-splitting identities used by ordinary #P apply without changing counts. The ordinary counting rules specialize these constructions to the empty oracle, retaining the original proofs by Samuel Schlesinger. No characterization by nondeterministic oracle machines is asserted.

Main results #

Binary natural outputs of polynomial-time oracle computations are relativized #P functions. The verifier compares the guessed binary value with the computed output; the output-length bound supplies a polynomial witness width.

Binary integer outputs of polynomial-time oracle computations are relativized GapP functions. Positive and negative parts are computed by the same fixed oracle.

A polynomial-time unary witness length can be padded without changing the relativized count. The evaluator is uniform in the instance and the witness.

theorem Cslib.Complexity.SharpPWithOracle.comp_mem {α : Type} {enc : α ↪ List Bool} {A : Set (List Bool)} {β : Type} {encB : β ↪ List Bool} {f : β → ℕ} {g : α → β} (hf : f ∈ SharpPWithOracle A encB) (hg : Turing.MultiTapeTM.ComputableInPolyTime g enc encB) :

Ordinary polynomial-time preprocessing preserves the exact relativized count.

theorem Cslib.Complexity.GapPWithOracle.comp_mem {α : Type} {enc : α ↪ List Bool} {A : Set (List Bool)} {β : Type} {encB : β ↪ List Bool} {f : β → ℤ} {g : α → β} (hf : f ∈ GapPWithOracle A encB) (hg : Turing.MultiTapeTM.ComputableInPolyTime g enc encB) :

Ordinary polynomial-time preprocessing preserves relativized GapP.

theorem Cslib.Complexity.SharpPWithOracle.exists_le_two_pow {α : Type} {enc : α ↪ List Bool} {A : Set (List Bool)} {f : α → ℕ} (hf : f ∈ SharpPWithOracle A enc) :
∃ (p : Polynomial ℕ), ∀ (a : α), f a ≤ 2 ^ Polynomial.eval (enc a).length p

A relativized count has at most an exponential number of accepting witnesses.

Summing one uniform relativized #P family over all words of a polynomial-time unary length preserves relativized #P. The index and the verifier certificate share one guessed word.

A uniform relativized GapP family may be summed over exponentially many short indices.