A polynomial-time controller with oracle calls is an oracle machine with steps
ProvedIntConeFPT.oracle_loopThis lemma turns an algorithm that alternates polynomial-time computation with oracle calls into an oracle Turing machine of the mission's model.
Words are over the alphabet ; writes every letter as two bits (high bit, then low bit), and is the word in which every letter of is preceded by , followed by a and then . Let be computable in polynomial time on a multi-tape Turing machine (the controller). A run of the controller with an oracle on an input is a sequence of words with such that
- for the controller asks a query and keeps a state: , and the next word is ;
- in round the controller stops: .
Then there are a constant and an oracle machine, depending only on , such that for every oracle , every predicate on queries, and every such run with for all and for all , the machine with oracle on input halts with output within
steps (an oracle call counts as one step), and every query it asks satisfies .
The lemma separates the machine engineering from the algorithm: an oracle algorithm of the paper (column generation with a pricing oracle, binary search with a feasibility oracle) only has to be given as a polynomial-time controller on bit strings.
Formalization Note The conclusion is IntConeFPT.ORunsWithin; the hypothesis on step is Turing.MultiTapeTM.ComputableInPolyTime with the identity embedding of List Bool. The sequences , , are functions on of which only the indices up to are used. The run is a hypothesis, so the lemma also applies when the controller behaves well only for the oracles and inputs of interest.
import Mathlib import Definitions.Def_OnlineCRS_Combine_Sym import Definitions.Def_IntConeFPT_Machine import Definitions.Def_IntConeFPT_OracleMachine import Definitions.Def_Complexitylib_0ebd467_Computability_Machines_Turing_MultiTape_PolyTime open OnlineCRS.Combine IntConeFPT
theorem IntConeFPT.oracle_loop (step : List Bool → List Bool)
(hstep : Turing.MultiTapeTM.ComputableInPolyTime step
(Function.Embedding.refl (List Bool)) (Function.Embedding.refl (List Bool))) :
let bits := fun w : List Sym => w.flatMap fun s => [decide (2 ≤ s.1), decide (s.1 % 2 = 1)]
let frame := fun (x y : List Sym) => x.flatMap (fun s => [(0 : Sym), s]) ++ 1 :: y
∃ c : ℕ, ∃ OM : OracleMachine,
∀ (O : List Sym → List Sym) (G : List Sym → Prop) (inp out : List Sym) (R S : ℕ)
(σ q st : ℕ → List Sym),
σ 0 = 1 :: inp →
(∀ i < R, step (bits (σ i)) = bits (frame (q i) (st i)) ∧ G (q i) ∧
σ (i + 1) = frame (st i) (O (q i))) →
step (bits (σ R)) = bits (3 :: out) →
(∀ i ≤ R, (σ i).length ≤ S) →
ORunsWithin OM O G inp out ((R + 1) * (S + 2) ^ c) := by sorry