The wipe loop #
TM.forRegTM drives a body an exact number of times off a dedicated unary fuel
register. Running TM.wipeStepTM through it, fueled by a register holding v
marks unrelated to any targeted tape's content, blanks the leading v cells of
every target whatever was there.
Main results #
TM.wipedTape— the closed form ofvwipe steps applied to a tapeTM.wipeLoop_hoareTime— the loop's contract
Wipe-step applied i times to t, in closed form.
Equations
- Complexity.TM.wipedTape t i = (fun (s : Complexity.Tape) => s.writeAndMove Complexity.Γw.blank.toΓ Complexity.Dir3.right)^[i] t
Instances For
Wiping really blanks the tape. A tape parked at cell 1 whose content
is confined to cells 1 … H becomes literally the blank tape (head at H + 1)
after H wipe steps — this is where the content-agnostic wipe pays off: no
assumption is made about where inside 1 … H the nonblank cells sit.
A fresh output tape ((Tape.init []).move Dir3.right) is Parked.
A fresh output tape satisfies the empty output accumulator.
The wipe loop. Fueled by a register at r holding v marks (r
disjoint from targets), forRegTM (wipeStepTM targets) r blanks the leading
v cells of every tape in targets, leaving every other tape — including the
fuel register itself — exactly as it was.