Documentation

CslibFrontier.Computability.Complexity.Classes.Oracle.PolyTime

Polynomial time relative to an oracle in polynomial time #

An oracle language decided in polynomial time adds nothing to polynomial time: P^A = P and NP^A = NP for A ∈ P Arora and Barak, Section 3.4.

A computation in polynomial time relative to A is the clocked run, with every coin fixed to false, of a finite oracle machine (Cslib.Probability.IsOraclePPTOn.exists_fin_run_pure_false). That run iterates one instruction on finite storage (Turing.MultiTapePTM.answerStep), which answers a query with the decider of A on the pending request. Against an oracle computed in polynomial time the instruction is polynomial-time (Turing.MultiTapePTM.computableInPolyTime_answerStep), the storage grows by a bounded amount per instruction, and the clock is polynomial, so the run is polynomial-time (Turing.MultiTapePTM.computableInPolyTime_run, Cslib.Complexity.ComputableInPolyTimeWithOracle.computableInPolyTime).

Main results #

References #

Polynomial time relative to an oracle in P is polynomial time. Relative to an oracle language decided in polynomial time, a function computable in polynomial time relative to it is computable in polynomial time: every query is answered by running the decider.

P relative to an oracle in P is P.

NP relative to an oracle in P is NP.