Work-tape placement #
This file defines a layout combinator that places the work tapes of a machine inside a larger, contiguous middle block. The surrounding physical tapes are idled, so later phases can reserve disjoint tape regions without changing the source machine.
Main definitions #
TM.placeWorkIdx— physical index of a source work tapeTM.placeWorkCoord— source coordinate of a physical middle-block tapeTM.placeWorkTM— place a machine betweenpreprefix andpostsuffix tapesTM.placeWorkCfg— embed a configuration with an arbitrary extra-tape frameTM.placeWorkFrameStep— one idle action on every physical frame tapeTM.placeWorkParkedCfg— the canonical embedding with parked blank extras
Equations
Source coordinate corresponding to a physical tape in the middle block.
Equations
- Complexity.TM.placeWorkCoord pre n i h = ⟨↑i - pre, ⋯⟩
Instances For
Place tm after pre reserved work tapes and before post reserved work
tapes. Physical tapes in the middle block simulate tm; every other work tape
writes back the symbol it reads and idles. Input and output actions are unchanged.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Embed c into the placed layout. The supplied physical extras frame is
used outside the middle block and ignored inside it.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Apply the placement machine's idle work-tape action to an extra-tape frame.
Only values outside the middle block are observable through placeWorkCfg.
Equations
- Complexity.TM.placeWorkFrameStep extras i = (extras i).writeAndMove (Complexity.TM.readBackWrite (extras i).read).toΓ (Complexity.TM.idleDir (extras i).read)
Instances For
Canonical embedding whose prefix and suffix tapes are parked and blank.
Equations
- tm.placeWorkParkedCfg pre post c = tm.placeWorkCfg pre post (fun (x : Fin (pre + n + post)) => (Complexity.Tape.init []).move Complexity.Dir3.right) c