Documentation

Complexitylib.Classes.Containments.Internal.CodeAccept

Deciding whether a record is accepting #

⚠️ Unreviewed by Bolton

A record is accepting when its state field is the halting state and its output tape holds 1 in cell 1. The state field is block 0 truncated to the state code's width, and the verdict cell is read after the rewind of Complexitylib.Classes.Containments.Internal.CodeRewind.

Main definitions #

Main results #

The verdict cell #

The symbol in cell 1 of a rewound output code.

Equations
Instances For
    theorem Complexity.verdictSym_rewound (W : ) (t : Tape) (hW : 1 W) :

    The verdict cell of a rewound output code is cell 1 of the tape.

    The test #

    def Complexity.acceptFlag (qcode R ruler u : List Bool) :

    Is the record an accepting halting configuration?

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      theorem Complexity.acceptFlag_flag (qcode R ruler u : List Bool) :
      acceptFlag qcode R ruler u = [true] acceptFlag qcode R ruler u = [false]
      theorem Complexity.acceptFlag_cfgCode {k : } (tm : NTM k) (W : ) (c : Cfg k tm.Q) (hq : Fintype.card tm.Q Cobham.blockWidth W) (hinv : CodeInv W c) (hW : 1 W) (ruler : List Bool) (hruler : W ruler.length) :

      The test decides acceptance.

      The test is polynomial-time #

      theorem Complexity.acceptFlagFn_mem_FP (qcode : List Bool) {Rf rulerf uf : List BoolList Bool} (hR : Rf FP) (hruler : rulerf FP) (hu : uf FP) :
      (fun (w : List Bool) => acceptFlag qcode (Rf w) (rulerf w) (uf w)) FP