Configurations and state restriction for Turing.TM0 machines #
This module provides basic configuration constructors, step evaluation lemmas, and state-set
restriction for Mathlib's Post–Turing machine model _root_.Turing.TM0.
A configuration c : TM0.Cfg Γ Λ can be viewed as having state q, scanned symbol a, left
tape L (nearest first) and right tape R (TM0.cfgOf q a L R). Transition steps (TM0.step)
evaluate on cfgOf according to whether the machine writes, moves, or halts (TM0.step_of_eq_*).
Halting on an input is defined by TM0.Halts M l and characterized by (TM0.eval M l).Dom
(TM0.eval_dom_iff).
When a subset S ⊆ Λ supports M (TM0.Supports M S, meaning S contains default and is
closed under transitions of M), TM0.restrict M hS is the restricted machine with state type S.
Its execution preserves evaluation domains (TM0.eval_restrict_dom), turning an infinite-state
machine supported on a finite subset into a finite-state machine.
Main definitions #
Turing.TM0.cfgOf: constructor forTM0.Cfg Γ Λwith explicit state, head, and tape lists.Turing.TM0.Halts: halting of aTM0machine on an input.Turing.TM0.restrict: restriction of aTM0machine to a supporting subset of states.Turing.TM0.liftCfg: underlying configuration of the unconstrained machine.
Main results #
Turing.TM0.exists_cfgOf: every configuration decomposes ascfgOf q a L R.Turing.TM0.eval_dom_iff: halting coincides with(TM0.eval M l).Dom.Turing.TM0.step_of_eq_none,step_of_eq_write,step_of_eq_right,step_of_eq_left: step transitions oncfgOf.Turing.TM0.eval_restrict_dom: restriction to a supporting set preserves halting.