Oracle substitution for polynomial-time oracle classes #
If an oracle language O₁ belongs to P^{O₂}, a polynomial-time computation relative to O₁
becomes one relative to O₂: each query to O₁ is answered by running the polynomial-time
O₂-oracle program deciding O₁. The simulation runs a finite oracle machine for the outer
computation and replaces each of its oracle steps by a call to the inner program; the outer clock
bounds both the number and the length of the queries, so the composite stays polynomial.
The special case where O₁ many-one reduces to O₂ is
Cslib.Complexity.PolyTimeReducible.PWithOracle_subset in
CslibFrontier.Computability.Complexity.Classes.Oracle.Monotone, which also covers non-Boolean
outputs.
Main results #
Cslib.Complexity.ComputableInPolyTimeWithOracle.of_mem_PWithOracle: a Boolean function computable in polynomial time relative toO₁ ∈ P^{O₂}is computable in polynomial time relative toO₂.Cslib.Complexity.PWithOracle_subset_of_mem_PWithOracle,Cslib.Complexity.NPWithOracle_subset_of_mem_PWithOracle: ifO₁ ∈ P^{O₂}, thenP^{O₁} ⊆ P^{O₂}andNP^{O₁} ⊆ NP^{O₂}.
Oracle substitution for polynomial-time Boolean computations: if an oracle language O₁
belongs to P^{O₂} and f : α → Bool is computable in polynomial time relative to O₁, then
f is computable in polynomial time relative to O₂.
A polynomial-time Boolean oracle computation extends to all raw inputs by running its machine under the same clock and reading the first output bit.
If O₁ ∈ P^{O₂}, then P^{O₁} ⊆ P^{O₂}.
If O₁ ∈ P^{O₂}, then NP^{O₁} ⊆ NP^{O₂}.