Pair emission from the input and a work tape #
This file defines a small deterministic transducer that emits pair first second.
The first component is scanned on a designated work tape and doubled on the
output; the second component is then copied verbatim from the real input tape.
Both sources are consumed only through their first blank delimiter.
Main definitions #
TM.PairInputWorkPhase— the five control phases of the emitterTM.pairInputWorkTM— emit a pair from one work tape and the inputTM.pairInputWorkTime— the exact running time on canonical sources
Control phases for pairInputWorkTM. firstAgain bit remembers the first
component bit while emitting its second copy.
- first : PairInputWorkPhase
- firstAgain (bit : Bool) : PairInputWorkPhase
- separator : PairInputWorkPhase
- second : PairInputWorkPhase
- done : PairInputWorkPhase
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Complexity.TM.instDecidableEqPairInputWorkPhase.decEq Complexity.TM.PairInputWorkPhase.first Complexity.TM.PairInputWorkPhase.first = isTrue ⋯
- Complexity.TM.instDecidableEqPairInputWorkPhase.decEq Complexity.TM.PairInputWorkPhase.first (Complexity.TM.PairInputWorkPhase.firstAgain bit) = isFalse ⋯
- Complexity.TM.instDecidableEqPairInputWorkPhase.decEq (Complexity.TM.PairInputWorkPhase.firstAgain bit) Complexity.TM.PairInputWorkPhase.first = isFalse ⋯
- Complexity.TM.instDecidableEqPairInputWorkPhase.decEq (Complexity.TM.PairInputWorkPhase.firstAgain bit) Complexity.TM.PairInputWorkPhase.separator = isFalse ⋯
- Complexity.TM.instDecidableEqPairInputWorkPhase.decEq (Complexity.TM.PairInputWorkPhase.firstAgain bit) Complexity.TM.PairInputWorkPhase.second = isFalse ⋯
- Complexity.TM.instDecidableEqPairInputWorkPhase.decEq (Complexity.TM.PairInputWorkPhase.firstAgain bit) Complexity.TM.PairInputWorkPhase.done = isFalse ⋯
- Complexity.TM.instDecidableEqPairInputWorkPhase.decEq Complexity.TM.PairInputWorkPhase.separator (Complexity.TM.PairInputWorkPhase.firstAgain bit) = isFalse ⋯
- Complexity.TM.instDecidableEqPairInputWorkPhase.decEq Complexity.TM.PairInputWorkPhase.separator Complexity.TM.PairInputWorkPhase.separator = isTrue ⋯
- Complexity.TM.instDecidableEqPairInputWorkPhase.decEq Complexity.TM.PairInputWorkPhase.second (Complexity.TM.PairInputWorkPhase.firstAgain bit) = isFalse ⋯
- Complexity.TM.instDecidableEqPairInputWorkPhase.decEq Complexity.TM.PairInputWorkPhase.second Complexity.TM.PairInputWorkPhase.second = isTrue ⋯
- Complexity.TM.instDecidableEqPairInputWorkPhase.decEq Complexity.TM.PairInputWorkPhase.done (Complexity.TM.PairInputWorkPhase.firstAgain bit) = isFalse ⋯
- Complexity.TM.instDecidableEqPairInputWorkPhase.decEq Complexity.TM.PairInputWorkPhase.done Complexity.TM.PairInputWorkPhase.done = isTrue ⋯
Instances For
PairInputWorkPhase is finite, as required for a Turing-machine state
space.
Equations
- One or more equations did not get rendered due to their size.
Emit pair first second, reading first from work tape firstIdx and
second from the real input. Sources begin at cell one and advance to their
first blank delimiters. The output is the fresh empty tape parked at cell one
and is left immediately after the emitted pair, without a rewind.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Exact running time of pairInputWorkTM on components first and
second: two steps per first-component bit, two separator steps, one step per
second-component bit, and one final blank-detection step.