Documentation

CslibFrontier.Computability.Complexity.Classes.Oracle.CanonicalReplay

FP^A outputs as canonical oracle replays #

A function computable in polynomial time relative to an oracle language A is realized by one finite oracle machine under one polynomial clock. Its encoded output is the replayed output of that machine along the canonical instruction-indexed transcript of A's replies (Turing.MultiTapePTM.oracleReplies). Simulations of FP^A by guessed reply transcripts, such as the lowness proofs for NP ∩ coNP, UP ∩ coUP and #P and the P^NP ⊆ Σ₂ bound, start from this fact.

Main results #

theorem Cslib.Complexity.ComputableInPolyTimeWithOracle.exists_replayOutput {α β : Type} {A : Set (List Bool)} {enc : α ↪ List Bool} {output : β ↪ List Bool} {f : α → β} (hf : ComputableInPolyTimeWithOracle A f enc output) :
∃ (k : ℕ) (m : ℕ) (machine : Turing.MultiTapePTM k Bool (Fin m) Unit) (p : Polynomial ℕ), ∀ (a : α), machine.replayOutput (enc a) (machine.oracleReplies (fun (q : List Bool) => decide (q ∈ A)) (Polynomial.eval (enc a).length p) (enc a)) = output (f a)

An FP^A output is a canonical oracle replay. A function computable in polynomial time relative to A has a finite oracle machine and a polynomial clock p such that, on every instance, the encoded output is the replayed output of the machine along the canonical transcript of A's replies of length p (|enc a|).