Documentation

CslibFrontier.Computability.Machines.Turing.MultiTape.Complexity.LogSpace.NondeterministicQueryMachine.Routines

Framed native routines for nondeterministic query machines #

The abstract state is framed on a work tape. The initializer writes the start state of the input, which may depend on the input. Each deterministic pass reads the input in place, performs one selected transition, and writes the continuation flag. Only the finalizer emits.

Main definitions #

Main results #

structure Turing.NondeterministicQueryMachine.Routines {α σ : Type} (M : NondeterministicQueryMachine σ) (start : α → σ) (enc : α ↪ List Bool) (S : α → ℕ) :

Concrete finite routines, sharing tape origins and a common linear space budget. On the input enc a the abstract run starts in start a; the passes and the finalizer do not depend on a.

Instances For
    theorem Turing.NondeterministicQueryMachine.exists_routines {α σ : Type} {enc : α ↪ List Bool} {encS : σ ↪ List Bool} (M : NondeterministicQueryMachine σ) (hquery : MultiTapeTM.ComputableInSpace M.query encS MultiTapeTM.encNat fun (s : σ) => (encS s).length) (hnext : MultiTapeTM.ComputableInSpace M.next (MultiTapeTM.encPair encS (MultiTapeTM.encPair (MultiTapeTM.encOption MultiTapeTM.encBool) MultiTapeTM.encBool)) encS fun (p : σ × Option Bool × Bool) => ((MultiTapeTM.encPair encS (MultiTapeTM.encPair (MultiTapeTM.encOption MultiTapeTM.encBool) MultiTapeTM.encBool)) p).length) (hhalted : MultiTapeTM.ComputableInSpace M.halted encS MultiTapeTM.encBool fun (s : σ) => (encS s).length) (haccept : MultiTapeTM.ComputableInSpace M.accept encS MultiTapeTM.encBool fun (s : σ) => (encS s).length) (start : α → σ) (S : α → ℕ) (hlog : ∀ (a : α), (enc a).length.log2 + 1 ≤ S a) (hstart : MultiTapeTM.ComputableInSpace start enc encS S) (hsize : ∃ (c : ℕ), ∀ (a : α) (choices : List Bool), (encS ((M.withInit (start a)).run (enc a) choices)).length ≤ c * S a) :
    Nonempty (M.Routines start enc S)

    Compile local query-machine callbacks and a start state computable in space O(S) into concrete finite native routines.