Deterministic Boolean-oracle Turing machines -- definitions #
This module adds a dedicated query tape and a one-step Boolean-oracle query mechanism to the library's deterministic Turing-machine model. Local steps retain the named read-only input, read-write work, and output tapes. A query state instead reads the binary prefix currently delimited by the query-tape head, leaves every tape unchanged, and branches to one of two states according to the oracle answer.
The query cost convention is explicit: one oracle lookup is one machine step,
while writing and positioning the query takes ordinary local steps. Query
strings use cells 1, ..., head - 1; 1 is true and every other tape symbol is
false. Constructions that need a canonical binary query should establish that
those cells contain only 0 or 1.
A Boolean oracle answers one bit for every finite binary query string.
Equations
Instances For
An oracle decides a language when its answer bit is its exact characteristic function on every finite query string.
Instances For
Query string delimited by the query-tape head. Cells strictly between the
left marker and the head are read in increasing order. The convention is total:
only 1 maps to true; 0, blank, and the left marker map to false.
Equations
Instances For
One ordinary, non-query transition of an oracle TM.
- nextState : Q
Next finite-control state.
- queryWrite : Γw
Symbol written on the query tape.
Symbols written on the ordinary work tapes.
- outputWrite : Γw
Symbol written on the output tape.
- inputDir : Dir3
Input-head movement.
- queryDir : Dir3
Query-head movement.
Ordinary work-head movements.
- outputDir : Dir3
Output-head movement.
Instances For
A deterministic oracle TM with one dedicated query tape.
If queryTransition q = some (yesState, noState), state q performs an
oracle lookup rather than applying localTransition; a true answer enters
yesState and a false answer enters noState.
- Q : Type
Finite type of machine states.
- decEq : DecidableEq self.Q
- qstart : self.Q
Designated start state.
- qhalt : self.Q
Designated halt state.
States that perform an oracle query and their true/false successors.
Transition used at every non-query, non-halted state.
- localTransition_right_of_start (q : self.Q) (inputHead queryHead : Γ) (workHeads : Fin n → Γ) (outputHead : Γ) : let transition := self.localTransition q inputHead queryHead workHeads outputHead; (inputHead = Γ.start → transition.inputDir = Dir3.right) ∧ (queryHead = Γ.start → transition.queryDir = Dir3.right) ∧ (∀ (index : Fin n), workHeads index = Γ.start → transition.workDirs index = Dir3.right) ∧ (outputHead = Γ.start → transition.outputDir = Dir3.right)
A local transition reading a left marker moves that head right.
Instances For
Execute one oracle-machine step. A query lookup costs exactly one step and changes only the finite-control state.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Exact-time deterministic oracle execution.
- zero {n : ℕ} {machine : OracleTM n} {oracle : BooleanOracle} {cfg : OracleCfg n machine.Q} : machine.reachesIn oracle 0 cfg cfg
- step {n : ℕ} {machine : OracleTM n} {oracle : BooleanOracle} {cfg middle : OracleCfg n machine.Q} {time : ℕ} {result : OracleCfg n machine.Q} : machine.step oracle cfg = some middle → machine.reachesIn oracle time middle result → machine.reachesIn oracle (time + 1) cfg result
Instances For
Oracle-machine acceptance.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Oracle-machine acceptance within a time budget.
Equations
- One or more equations did not get rendered due to their size.
Instances For
An oracle TM decides a language within a length-dependent time bound.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Regard an ordinary TM as an oracle TM whose query-state map is everywhere
none. The extra query tape is operationally inert and never affects the
ordinary tapes.
Equations
- One or more equations did not get rendered due to their size.