DLBA Languages ⊆ Turing Machine Languages #
We show that every language recognized by a linearly bounded automaton (DLBA) is also recognized by a Turing machine, connecting the DLBA framework to Mathlib's Turing machine definitions.
Strategy #
Part 1: Turing.eval characterization #
We show that DLBA.Accepts is equivalent to Mathlib's Turing.eval halting in an
accepting state. Since Turing.eval is the common foundation underlying all Mathlib TM
models (TM0, TM1, TM2), this connects the DLBA framework directly to Mathlib's
notion of Turing computation.
Part 2: Concrete TM0 simulation #
We construct a Turing.TM0.Machine that simulates a given DLBA. The construction has
two phases:
- Reading phase: The TM0 reads the input from the tape symbol by symbol, accumulating the symbols in its state space.
- Simulation phase: Once the input is fully read, the TM0 simulates the DLBA step-by-step entirely within its state space (no further tape access needed).
The TM0 halts if and only if the DLBA accepts the input.
Main Results #
DLBA.iterateStep_reaches—iterateStepimpliesTuring.ReachesDLBA.reaches_iterateStep—Turing.ReachesimpliesiterateStepDLBA.accepts_iff_eval— DLBA acceptance ↔Turing.evalhalts with accepting stateDLBA.lba_language_subset_tm0_language— Every word accepted by the DLBA is accepted by the simulating TM0 machine
Part 1: Connecting DLBA to Turing.eval #
If iterateStep M cfg k = some cfg', then Turing.Reaches (step M) cfg cfg'.
If Turing.Reaches (step M) cfg cfg', then there exists k such that
iterateStep M cfg k = some cfg'.
DLBA acceptance is equivalent to Turing.eval halting in an accepting state.
This connects the DLBA directly to Mathlib's Turing.eval framework, which underlies
all TM models (TM0, TM1, TM2).
Part 2: Concrete TM0 Simulation #
Equations
- DLBA.SimState.instInhabited = { default := DLBA.SimState.reading [] }
The TM0 machine that simulates a given DLBA.
Equations
- One or more equations did not get rendered due to their size.
- DLBA.toTM0 M n (DLBA.SimState.reading acc) (some a) = some (DLBA.SimState.reading (acc ++ [a]), Turing.TM0.Stmt.move Turing.Dir.right)
- DLBA.toTM0 M n DLBA.SimState.loop sym = some (DLBA.SimState.loop, Turing.TM0.Stmt.write sym)
Instances For
The TM0 step function for the DLBA simulation machine.
Equations
- DLBA.tm0Step M n = Turing.TM0.step (DLBA.toTM0 M n)
Instances For
Abbreviation for TM0 configurations in the simulation.
Equations
- DLBA.SimCfg Γ Λ n = Turing.TM0.Cfg (Option Γ) (DLBA.SimState Γ Λ n)
Instances For
The initial TM0 configuration for a given encoded input.
Equations
- DLBA.tm0Init _M w = Turing.TM0.init (DLBA.encodeInput w)
Instances For
Tape Helper Lemmas #
Reading Phase #
A single reading step: if the head symbol is some a, the machine appends a
to the accumulator and moves right.
When the head is none and the accumulator has length n + 1, the reading phase
transitions to the simulation phase.
Simulation Phase Correctness #
In the simulation phase, if the DLBA takes a step, the TM0 also takes a step maintaining the simulation invariant.
In the simulation phase, if the DLBA halts in an accepting state, the TM0 halts.
Main Theorem #
Main theorem: Every word accepted by the DLBA is also accepted by the simulating TM0 machine. This establishes that DLBA languages are a subset of TM0-recognizable languages.