Sequential composition after function computation #
This file fixes the tape layout and executable phase pipeline used to feed one deterministic function computation into a second machine. Proofs of correctness and time bounds live in the internal and public theorem layers.
For a function-computing tmF : TM nf and a second machine tmG : TM ng, the
composite has
nf + 1 + (ng + 1) work tapes:
0 .. nf - 1: work tapes oftmFnf: raw redirected output oftmFnf + 1 .. nf + ng: work tapes oftmGnf + ng + 1: canonical virtual input oftmG
The raw output is rewound and copied to the fresh virtual-input tape before
tmG resumes after its compulsory first transition off the left-end markers.
Work-tape count of the sequential composition machine.
Instances For
Physical work tape holding the raw redirected output of the first machine.
Equations
- Complexity.TM.compositionRawOutputIdx nf ng = ⟨nf, ⋯⟩
Instances For
Physical work tape holding the canonical virtual input of the second machine.
Instances For
The two pipeline tapes occupy distinct physical coordinates.
The raw-output coordinate is the placed last work tape of
tmF.retargetOutput.
The virtual-input coordinate is the placed last work tape of
retargetInputStarted tmG.
Physical coordinate of work tape i of the first computation.
Equations
- Complexity.TM.compositionPrefixIdx nf ng i = ⟨↑i, ⋯⟩
Instances For
Physical coordinate of source work tape j of the second computation.
Equations
- Complexity.TM.compositionSecondWorkIdx nf ng j = Complexity.TM.placeWorkIdx (0 + (nf + 1)) 0 j.castSucc
Instances For
The first phase redirects tmF's output into the raw-output tape and parks
the work-tape suffix reserved for the second computation.
Equations
- tmF.compositionFirstTM ng = Complexity.TM.placeWorkTM 0 (ng + 1) tmF.retargetOutput
Instances For
The last phase places the already-started virtual-input wrapper for tmG
after the first computation's work and raw-output tapes.
Equations
- Complexity.TM.compositionSecondTM nf tmG = Complexity.TM.placeWorkTM (0 + (nf + 1)) 0 tmG.retargetInputStarted
Instances For
Pipeline after the first computation: rewind its raw output, copy it onto a clean virtual-input tape, rewind that tape, and run the second computation.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Executable sequential composition of a function computation with a second deterministic machine.
Equations
- tmF.compositionTM tmG = (tmF.compositionFirstTM ng).seqTM (Complexity.TM.compositionTailTM nf ng tmG)