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 main lemmas show that one step and an entire run path of the larger machine mirror the
corresponding step and run path of tm.
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.step_embed: the one-step mirroring lemma.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.
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.
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.
Instances For
Reindexing is a step-semiconjugation: the reindexed machine acts on the embedded tapes exactly
as tm does, and never touches the extra tapes.
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. stepHom builds it from step_embed, which
says that embed commutes with the step functions.
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.
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.
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.