Extending a machine with additional work tapes #
extendTapes tm e, for an embedding e : Fin k ↪ Fin k', runs tm inside a machine with more
work tapes. The tapes selected by e are used by tm: target tape e j plays the role of source
tape j. The remaining tapes are left unchanged.
The configuration map embed e cfg extraTapes extraPos places cfg on the selected tapes and
initialises the remaining tapes from extraTapes and extraPos.
The configuration map is a homomorphism of step relations (embedHom), so each run path of tm
maps to a run path of the larger machine.
Main definitions #
Turing.MultiTapeTM.partialInv: the partial inverse of the tape embedding.Turing.MultiTapeTM.extendTapes: the machine with reindexed work tapes.Turing.MultiTapeTM.embed: the corresponding configuration map.Turing.MultiTapeTM.embedHom: the configuration map as a step-preserving map, which maps run paths.Turing.MultiTapeTM.tapeEmb: the embedding placing the only tape of a one-tape machine on tapei, andTuring.MultiTapeTM.noTapes: the embedding of a machine without work tapes.
Main results #
Turing.MultiTapeTM.space_map_embedHom_le: the space bound for a mapped path.Turing.MultiTapeTM.oneTapeCfg: the one-tape view of a configuration.Turing.MultiTapeTM.runFrom_tapeEmb: the run of a one-tape machine placed on work tapei.Turing.MultiTapeTM.TransformsTapes.tapeEmb: a one-tape specification, read on tapei.Turing.MultiTapeTM.runFrom_noTapes: the run of a machine without work tapes, placed in a machine withkof them.
The computable analogue of Function.partialInv for an embedding e: partialInv e l = some j
when e j = l (such j is unique by injectivity), and none when l lies outside the range of
e.
Equations
- Turing.MultiTapeTM.partialInv e l = if h : l ∈ Set.range ⇑e then some (e.invOfMemRange ⟨l, h⟩) else none
Instances For
partialInv e is a partial inverse of e.
tm run on the tapes selected by the embedding e, leaving other tapes untouched: work tape
e j plays the role of tm's tape j, and any tape outside range e is never written and never
moves.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A configuration of tm, embedded: tape j goes to tape e j, the tapes outside range e
carry the given extraTapes contents and extraPos head positions.
Equations
- One or more equations did not get rendered due to their size.
Instances For
embed as a homomorphism of step relations: each step c → c' of tm becomes the step
embed c → embed c' of the reindexed machine, so a run path of tm maps to a run path of the
reindexed machine, with the extra tapes held fixed. Follows.stepHom builds it, since embed
agrees with the adapter defining extendTapes.
Equations
- tm.embedHom e extraTapes extraPos = ⋯.stepHom (fun (x : Turing.Cfg k Symbol State input) => Turing.MultiTapeTM.embed e x extraTapes extraPos) ⋯ ⋯ ⋯
Instances For
Space bound for a reindexed path. The embedded tapes visit what the original path visits,
while each of the remaining k' - k tapes never moves and contributes one cell.
Placing a one-tape machine on a single work tape #
A one-tape configuration placed on tape i leaves every other tape as it was.
The one-tape view of a configuration of a machine with k work tapes: the tape and head of
tape i, with everything else as it is.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Running a one-tape machine on work tape i. The run is the run on the one-tape view of the
configuration, placed back on tape i; every other tape and head keeps its starting value. Combine
with embed_tapeEmb to read off the resulting configuration.
A one-tape specification on tape i. A one-tape machine placed on tape i transforms the
word on that tape as it did on its own tape and leaves every other word alone; each remaining tape
costs one cell.
No tape is in the range of noTapes.
The view of a configuration as a configuration of a machine without work tapes.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A configuration without work tapes, placed in a machine with k of them, only contributes its
state, its input head and its output.
Running a machine without work tapes inside a machine with k of them. Only the state, the
input head and the output change; every work tape and work head keeps its starting value.