Documentation

CslibFrontier.Computability.Complexity.Classes.SharpP.Oracle

Counting functions relative to a language oracle #

SharpPWithOracle A enc counts accepted Boolean witnesses of a fixed polynomial length using ComputableInPolyTimeWithOracle A. Its deterministic word-query program is fixed before the witness and oracle replies. The certificate realizes that program under one polynomial clock against every stateful word oracle, charging query construction and reply access. Correctness of the Boolean verifier is required against the fixed, stateless languageOracle A.

GapPWithOracle consists of differences of two such counts. These definitions reuse the ordinary verifier counting semantics; equivalence with nondeterministic oracle-machine counting is not claimed. Ignoring an oracle embeds the ordinary classes, and the existing certified simulation eliminates every polynomial-time decidable oracle. Oracle lowness for other classes is separate.

Main definitions #

Main results #

References #

def Cslib.Complexity.SharpPWithOracle {α : Type} (A : Set (List Bool)) (enc : α ↪ List Bool) :
Set (α → ℕ)

Count witnesses of exactly p(|enc a|) bits with a strict polynomial-time oracle verifier. The oracle is fixed for correctness; its resource certificate applies to arbitrary replies.

def Cslib.Complexity.GapPWithOracle {α : Type} (A : Set (List Bool)) (enc : α ↪ List Bool) :
Set (α → ℤ)

Integer differences of two counting functions relative to the same language oracle.

Ordinary counting verifiers can ignore every oracle.

theorem Cslib.Complexity.GapP_subset_GapPWithOracle {α : Type} (A : Set (List Bool)) (enc : α ↪ List Bool) :
GapP enc ⊆ GapPWithOracle A enc

Ordinary gap functions can ignore every oracle.

A polynomial-time oracle adds no counting functions.

A polynomial-time oracle adds no gap functions.

The first witness bit selects between two oracle verifier results. Both certified programs may be run sequentially, so the resource bound remains valid for arbitrary stateful replies.

The zero function is in SharpPWithOracle A enc.

theorem Cslib.Complexity.SharpPWithOracle.add_mem {α : Type} {enc : α ↪ List Bool} {A : Set (List Bool)} {f₁ f₂ : α → ℕ} (h₁ : f₁ ∈ SharpPWithOracle A enc) (h₂ : f₂ ∈ SharpPWithOracle A enc) :
f₁ + f₂ ∈ SharpPWithOracle A enc

SharpPWithOracle is closed under addition: the first bit of a certificate chooses the verifier, and the bits that the chosen verifier does not read must be false.

theorem Cslib.Complexity.SharpPWithOracle.mul_mem {α : Type} {enc : α ↪ List Bool} {A : Set (List Bool)} {f₁ f₂ : α → ℕ} (h₁ : f₁ ∈ SharpPWithOracle A enc) (h₂ : f₂ ∈ SharpPWithOracle A enc) :
f₁ * f₂ ∈ SharpPWithOracle A enc

SharpPWithOracle is closed under multiplication: the two verifiers read disjoint parts of the certificate.

theorem Cslib.Complexity.SharpPWithOracle.natCast_mem_GapPWithOracle {α : Type} {enc : α ↪ List Bool} {A : Set (List Bool)} {f : α → ℕ} (hf : f ∈ SharpPWithOracle A enc) :
(fun (a : α) => ↑(f a)) ∈ GapPWithOracle A enc

A function in SharpPWithOracle, cast to the integers, is in GapPWithOracle.