Documentation

Complexitylib.Models.TuringMachine.Subroutines.WipeRewind

Blanking a group of tapes and putting their heads back #

TM.resetTapes_hoareTime blanks its targets by walking a fixed height across them, which leaves every head parked at the far end of the walk. A loop that reuses those tapes needs them back at cell one, so the wipe is followed by one more rewind.

The wipe is content-agnostic: nothing is assumed about where inside the wiped region the non-blank cells sit, only that nothing lies beyond it. That is what makes it the right tool for cleaning up after a simulation, whose tapes can hold anything at all.

Main results #

The blank tape parked at cell one — what a wiped-and-rewound tape becomes.

Equations
Instances For
    def Complexity.TM.wipeRewindTM {n : } (targets : List (Fin n)) (r : Fin n) :
    TM n

    Blank the named tapes, then put their heads back at cell one.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      theorem Complexity.TM.wipeRewindTM_hoareTime {n : } (targets : List (Fin n)) (hnodup : targets.Nodup) (r : Fin n) (hr : rtargets) (H : ) (I₀ : Tape) (W₀ : Fin nTape) (O₀ : Tape) (hinpSI : I₀.StartInvariant) (hinpP : Parked I₀) (hout0 : O₀ = blankTape) (hworkSI : ∀ (j : Fin n), j r(W₀ j).StartInvariant) (htargetHead : jtargets, (W₀ j).head H) (htargetFar : jtargets, ∀ (i : ), H < i(W₀ j).cells i = Γ.blank) (hworkR : W₀ r = regTape H) (hother : ∀ (j : Fin n), j rjtargetsParked (W₀ j)) :
      (wipeRewindTM targets r).HoareTime (fun (inp : Tape) (work : Fin nTape) (out : Tape) => inp = I₀ work = W₀ out = O₀) (fun (inp : Tape) (work : Fin nTape) (out : Tape) => inp = I₀ (work = fun (j : Fin n) => if j targets then blankTape else W₀ j) out = O₀) (targets.length * (H + 4) + H * 4 + 8 + 1 + (targets.length * (H + 4) + 1))

      The wipe stage's contract. The targets come back blank and parked at cell one, the register that drove the walk is unchanged, and every other tape is untouched.