Documentation

Complexitylib.Classes.Containments.Internal.PHAssembleWindow

The whole enumerator, in space #

⚠️ Unreviewed by Bolton

Five of the machine's six phases are short, and their windows come from their running times; the sixth is the counting loop, whose window is one iteration wide. Composing them is what TM.seqTM_keepsWindowOn is for.

Main results #

theorem Complexity.PolyExists.afterCopyX_heads (k : ) (x : List Bool) (inp : Tape) (work : Fin (enumTapes k)Tape) (out : Tape) (h : afterCopyX k x inp work out) (i : Fin (enumTapes k)) :
(work i).head x.length + 1

The copy phase leaves every head inside the input's width.

The parking phase's window.

The input copy's window.

theorem Complexity.PolyExists.rewindX_keepsWindowOn (k : ) (x : List Bool) (B W : ) (hB : x.length + 1 B) (hW : x.length + 1 + (1 + 1 + (2 * (max (B + 2) (1 * (B + 3) + 1) + 1) + 1)) W) :

The rewind's window.

The prologue's window.

theorem Complexity.PolyExists.epilogue_keepsWindowOn (k : ) (x : List Bool) (N H A R : ) (I : Tape) (hI : TM.Parked I) (hIsi : I.StartInvariant) (hIhead : I.head = 1) (W : ) (hW : 1 + epilogueTime A W) :

The epilogue's window.

theorem Complexity.PolyExists.enumTM_keepsWindowOn {k : } (M : TM k) {L' : Language} (p q : Polynomial ) (x : List Bool) (N H A R W : ) (hloopW : ((bodyTM M).loopTM (TM.tallyTestTM (cIdx k) (nIdx k) (resIdx k))).KeepsWindowOn (fun (c : Cfg (enumTapes k) ((bodyTM M).loopTM (TM.tallyTestTM (cIdx k) (nIdx k) (resIdx k))).Q) => c.state = ((bodyTM M).loopTM (TM.tallyTestTM (cIdx k) (nIdx k) (resIdx k))).qstart NTM.tallyPre (cIdx k) (aIdx k) (rIdx k) (strTape x) (enumRest k x N H 1) (enumP L' x) 0 c.input c.work c.output) x.length W) {bnd : } (hloopC : ((bodyTM M).loopTM (TM.tallyTestTM (cIdx k) (nIdx k) (resIdx k))).HoareTime (NTM.tallyPre (cIdx k) (aIdx k) (rIdx k) (strTape x) (enumRest k x N H 1) (enumP L' x) 0) (fun (inp : Tape) (work : Fin (enumTapes k)Tape) (out : Tape) => inp = strTape x work = enumBank k x N H N A R out = NTM.outSlot Γw.one) bnd) (hprologuePost : (prologueTM k p q).HoareTime (fun (inp : Tape) (work : Fin (enumTapes k)Tape) (out : Tape) => inp = strTape x work = copiedBank k x out = TM.blankTape) (fun (inp : Tape) (work : Fin (enumTapes k)Tape) (out : Tape) => inp = strTape x work = enumBank k x N H 0 0 0 out = TM.blankTape) (prologueTime p q x.length)) (B : ) (hBx : x.length + 1 B) (hWpark : 1 W) (hWcopy : 1 + (x.length + 1) W) (hWrewind : x.length + 1 + (1 + 1 + (2 * (max (B + 2) (1 * (B + 3) + 1) + 1) + 1)) W) (hWprol : 1 + prologueTime p q x.length W) (hWepi : 1 + epilogueTime A W) (c : Cfg (enumTapes k) (enumTM M p q).Q) :
(enumTM M p q).reaches ((enumTM M p q).initCfg x) cc.WithinDecisionSpace x.length W

The whole machine keeps a window. Five short phases, whose windows come from their running times, and one long loop, whose window is one iteration wide.