A Boolean TM2 compiler for adaptive oracle dialogues with explicit costs
ProvedBinaryTM2.compile_adaptive_oracle_dialoguebin-packingcomputational-complexityfixed-parameter-tractabilityinteger-programming
A single ordinary Boolean stack machine that writes either a query and saved state or a final answer can be used as the local controller of a true oracle TM2. If a dialogue makes R calls, the ordinary controller takes at most T steps per round, query length is at most Q, and saved states and oracle replies are at most S bits, the compiled machine takes at most (R+1)(T+3Q+4S+12)+1 steps. It works for arbitrary oracles and counts framing, query-stack movement, and cleanup.
Preamble
import Mathlib import Definitions.Def_HMBinPacking_OracleMachine import Definitions.Def_HMBinPacking_OutputsWithin
Formal statement
namespace BinaryTM2
theorem compile_adaptive_oracle_dialogue (M : Turing.TM2ComputableAux Bool Bool) :
let frame := fun (x y : List Bool) => x.flatMap (fun b => [true,b]) ++ false::y
∃ OM : HMBinPacking.OracleMachine,
∀ (O : List Bool → List Bool) (inp out : List Bool) (R T Q S : ℕ)
(σ q st : ℕ → List Bool), σ 0 = false::inp →
(∀ i < R, HMBinPacking.OutputsWithin M (σ i) (false::frame (q i) (st i)) T ∧
(q i).length ≤ Q ∧ (st i).length ≤ S ∧ (O (q i)).length ≤ S ∧
σ (i+1) = frame (st i) (O (q i))) →
HMBinPacking.OutputsWithin M (σ R) (true::out) T →
HMBinPacking.ORunsWithin OM O inp out ((R+1)*(T+3*Q+4*S+12)+1) Q := by sorry
end BinaryTM2Source
Reusable oracle execution for HMBinPacking Lemmas 5, 6, and 8. Boolean specialization and extension of IntConeFPT.oracle_loop.