Iterating until a test holds, within space #
Turing.MultiTapeTM.ComputableInSpace.iterate runs a step a computed number of times, and charges
the binary counter. A simulation whose running time is not computable needs a loop that stops when
a test on the state holds instead. Such a loop is computable within the space of the start, of the
rounds and of the states, whatever the number of rounds.
The loop runs on options: a round (Turing.MultiTapeTM.ComputableInSpace.untilStep) takes a step
unless the test holds, and then returns none, whose encoding is empty. The machine is
Turing.MultiTapeTM.iterateWhile, which repeats a round until the empty word.
Main results #
Turing.MultiTapeTM.ComputableInSpace.iterateWhileSome: iterating a round on options until it returnsnone.Turing.MultiTapeTM.ComputableInSpace.iterateUntil: iterating a step until a test holds, within the space of the start, of the rounds and of the states.
Iterating a round on options until it returns none, within the space of the start, of
the rounds and of the states. The number of rounds r x need not be computable.
Iterating a step until a test holds, within the space of the start, of the rounds and of
the states. The number of steps n x, the first at which the test holds, need not be
computable.