Oracle substitution — replacing the oracle of an oracle machine by a machine that answers its queries
ProvedIntConeFPT.oracle_substitutionLet be an oracle machine and a machine (both over the alphabet ). There is a machine with the following property. Suppose that, with oracle , the oracle machine maps to within steps, counting each call as one step, and that every query it asks satisfies a predicate . Suppose further that every query with has length at most , and that maps it to an answer of length at most within steps. Then maps to within
steps.
The machine simulates step by step and runs on its own stacks at every call. It moves the query to the input stack of and the answer back to the query stack. This gives the familiar fact that an oracle algorithm with polynomially many polynomial-length queries, run with a polynomial-time oracle, is polynomial. The bound is explicit and does not depend on or , so it can be combined with time bounds that depend on parameters such as .
Formalization Note. The machine model is the mission's Machine/RunsWithin, and the oracle model is IntConeFPT_OracleMachine (ORunsWithin). The answer length is a separate hypothesis, so moving the answer back does not depend on how many symbols pushes per step.
import Mathlib import Definitions.Def_OnlineCRS_Combine_Sym import Definitions.Def_OnlineCRS_Combine_encNat import Definitions.Def_OnlineCRS_Combine_encInt import Definitions.Def_OnlineCRS_Combine_encRat import Definitions.Def_OnlineCRS_Combine_encVec import Definitions.Def_IntConeFPT_Machine import Definitions.Def_IntConeFPT_OracleMachine open OnlineCRS.Combine
namespace IntConeFPT
theorem oracle_substitution (OM : OracleMachine) (P : Machine) :
∃ W : Machine, ∀ (O : List Sym → List Sym) (G : List Sym → Prop) (x y : List Sym)
(t Q R : ℕ) (Tq : ℝ), 0 ≤ Tq →
ORunsWithin OM O G x y t →
(∀ q, G q → q.length ≤ Q ∧ (O q).length ≤ R ∧ RunsWithin P q (O q) Tq) →
RunsWithin W x y (4 * ((t : ℝ) + 1) * (Tq + Q + R + 4)) := by sorry
end IntConeFPT