Documentation

Complexitylib.Models.TuringMachine.Repetition

Fixed-time probabilistic-machine repetition #

This public surface records the exact arithmetic schedule of NTM.repeatAtTime and connects its simulated-step positions to the generic compact-seed projection from Complexitylib.Classes.FiniteCounting.

It deliberately makes no trace or acceptance claim: those require the simulation invariants proved in the internal correctness layer.

Main results #

Exact schedule arithmetic #

@[simp]

With zero simulated steps, a stride consists only of rewind and finish.

Increasing the simulated time by one adds one simulation transition and one rewind transition to every stride.

@[simp]

Zero repetitions use exactly the two leading administrative transitions.

@[simp]

At zero simulated time, every repetition contributes its two administrative transitions.

Adding one repetition appends exactly one stride.

Compact-seed alignment #

@[simp]
theorem Complexity.NTM.repeatRandomSeed_apply_repeatChoiceIdx (k T : ) (choices : Fin (repeatAtTimeSteps k T)Bool) (j : Fin k) (t : Fin T) :
repeatRandomSeed k T choices (finProdFinEquiv (j, t)) = choices (repeatChoiceIdx T j t)

The generic compact repetition seed selects exactly the global choice position used by repeatAtTime for simulated step t of repetition j.