Documentation

Complexitylib.Models.TuringMachine.UTM.Internal.Extract

UTM extraction phase: extractTM #

The final phase of the universal machine copies the simulated output — stored on work tape 2 (vOut) under the +1 shift, i.e. starting at cell 2 — onto the real output tape starting at cell 1, up to and including the first .

Behavior #

From qstart:

All tapes other than work tape 2 and the output are exactly unchanged (readBackWrite writes and idleDir moves); work tape 2's cells are unchanged (only its head moves).

Main definitions #

Main results #

Control states of extractTM.

Instances For
    @[implicit_reducible]
    Equations
    @[implicit_reducible]
    Equations
    • One or more equations did not get rendered due to their size.

    Copy work tape 2 (vOut) cells 2, 3, … verbatim to output cells 1, 2, …, up to and including the first . Work tape 2 is first rewound to cell 2; its cells are preserved (write-back), and all tapes other than work-2 and output are exactly unchanged.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      theorem Complexity.TM.extractTM_hoareTime (m B : ) (inp₀ : Tape) (work₀ : Fin 6Tape) (out₀ : Tape) (hblank : (work₀ 2).cells (m + 2) = Γ.blank) (hnb : j < m, (work₀ 2).cells (j + 2) Γ.blank) (hwf2 : (work₀ 2).StartInvariant) (hhead2 : (work₀ 2).head B) (hhead2' : 1 (work₀ 2).head) (hout0 : out₀.cells 0 = Γ.start) (houtns : ∀ (j : ), 1 jout₀.cells j Γ.start) (houth : out₀.head = 1) (hinp : inp₀.read Γ.start) (hothers : ∀ (i : Fin 6), i 2(work₀ i).read Γ.start) :
      extractTM.HoareTime (fun (inp : Tape) (work : Fin 6Tape) (out : Tape) => inp = inp₀ work = work₀ out = out₀) (fun (inp : Tape) (work : Fin 6Tape) (out : Tape) => inp = inp₀ (∀ (i : Fin 6), i 2work i = work₀ i) (work 2).cells = (work₀ 2).cells jm, out.cells (j + 1) = (work₀ 2).cells (j + 2)) (B + m + 8)

      extractTM specification. Let m be the number of non-blank cells starting at work-2 cell 2 (cell m + 2 is the first blank). Then extractTM copies work-2 cells 2 .. m+2 onto output cells 1 .. m+1 (the last one the terminating ), preserving the input tape, all work tapes other than 2 exactly, and work-2's cells, within B + m + 8 steps where B bounds the initial work-2 head position.