Shared machines for reading framed words #
These original finite-state machines and run laws preserve all-word behavior, including empty and incomplete frames. Their source is moved unchanged from Encodings.Basic.
The states of a transducer reading a framed word: expecting a marker, expecting a symbol, or past the frame.
- marker : FrameState
- bit : FrameState
- done : FrameState
Instances For
Emits the word framed at the start of its input (keep = true), or what follows the frame
(keep = false).
Instances For
@[simp]
@[simp]
theorem Turing.MultiTapeTM.Internal.FrameMachines.readFrameT_final (keep : Bool) (x✝ : FrameState) :
@[simp]
theorem Turing.MultiTapeTM.Internal.FrameMachines.readFrameT_step (keep : Bool) (x✝ : FrameState) (x✝¹ : Bool) :
(readFrameT keep).step x✝ x✝¹ = match x✝, x✝¹ with
| FrameState.marker, true => (FrameState.bit, [])
| FrameState.marker, false => (FrameState.done, [])
| FrameState.bit, b => (FrameState.marker, if keep = true then [b] else [])
| FrameState.done, b => (FrameState.done, if keep = true then [] else [b])