Documentation

Complexitylib.SAT.Tseitin.Machine.Internal.ControllerInvariant

Register invariant for the Tseitin streaming controller #

This file connects the pure token transducer in ThreeSAT.Streaming to the finite control and six unary registers of validEmitterTM. It deliberately contains no execution simulation. The definitions here only say how a pure streaming state is represented:

The projection and parked-tape lemmas are the glue needed to instantiate the register-level Hoare specifications in Machine.Internal.BufferSpecs.

Main definitions #

Finite-control representation #

Convert a pure parser scan to its finite controller mode under the signs of the current pending window.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    @[simp]
    theorem Complexity.SAT.ThreeSAT.Machine.StreamMode.ofState_mk (next : ) (pending : Streaming.Pending) (scan : Streaming.Scan) (emitted : List EncToken) :
    ofState { next := next, pending := pending, scan := scan, emitted := emitted } = ofStreaming pending scan

    Sign control after a pure literal push agrees with PendingSigns.push.

    @[simp]

    A pure literal push returns the parser to the corresponding boundary mode.

    @[simp]

    Closing a pure clause resets both pending signs and parser mode.

    Unary-register representation #

    Six unary-register values representing a pure streaming state.

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

      Every register tape in the representation of a pure state is parked.

      Complete tape predicate #

      Tape-level representation of a pure streaming state. The input tape is a fixed parked ghost for buffer operations; the work tapes are its six unary registers; and the output accumulator contains exactly the emitted tokens.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        theorem Complexity.SAT.ThreeSAT.Machine.StreamingStatePred.input_eq {inp actualInput out : Tape} {st : Streaming.State} {work : Fin workTapeCountTape} (h : StreamingStatePred inp st actualInput work out) :
        actualInput = inp

        Project the fixed input tape from the streaming-state predicate.

        theorem Complexity.SAT.ThreeSAT.Machine.StreamingStatePred.work_eq {inp actualInput out : Tape} {st : Streaming.State} {work : Fin workTapeCountTape} (h : StreamingStatePred inp st actualInput work out) :

        Project the six-register work-tape function.

        theorem Complexity.SAT.ThreeSAT.Machine.StreamingStatePred.outAcc {inp actualInput out : Tape} {st : Streaming.State} {work : Fin workTapeCountTape} (h : StreamingStatePred inp st actualInput work out) :

        Project the exact append-only encoded-token accumulator.

        theorem Complexity.SAT.ThreeSAT.Machine.StreamingStatePred.input_parked {inp actualInput out : Tape} {st : Streaming.State} {work : Fin workTapeCountTape} (h : StreamingStatePred inp st actualInput work out) (hinp : TM.Parked inp) :
        TM.Parked actualInput

        The represented input is parked whenever its fixed ghost is parked.

        theorem Complexity.SAT.ThreeSAT.Machine.StreamingStatePred.work_parked {inp actualInput out : Tape} {st : Streaming.State} {work : Fin workTapeCountTape} (h : StreamingStatePred inp st actualInput work out) (i : Fin workTapeCount) :
        TM.Parked (work i)

        Every represented work tape is parked.

        theorem Complexity.SAT.ThreeSAT.Machine.StreamingStatePred.output_parked {inp actualInput out : Tape} {st : Streaming.State} {work : Fin workTapeCountTape} (h : StreamingStatePred inp st actualInput work out) :

        The represented output accumulator is parked.

        theorem Complexity.SAT.ThreeSAT.Machine.StreamingStatePred.work_fresh {inp actualInput out : Tape} {st : Streaming.State} {work : Fin workTapeCountTape} (h : StreamingStatePred inp st actualInput work out) :

        Project the fresh-variable register.

        Project the current-literal register.

        theorem Complexity.SAT.ThreeSAT.Machine.StreamingStatePred.work_a {inp actualInput out : Tape} {st : Streaming.State} {work : Fin workTapeCountTape} (h : StreamingStatePred inp st actualInput work out) :

        Project the first pending-literal register.

        theorem Complexity.SAT.ThreeSAT.Machine.StreamingStatePred.work_b {inp actualInput out : Tape} {st : Streaming.State} {work : Fin workTapeCountTape} (h : StreamingStatePred inp st actualInput work out) :

        Project the second pending-literal register.

        theorem Complexity.SAT.ThreeSAT.Machine.StreamingStatePred.work_c {inp actualInput out : Tape} {st : Streaming.State} {work : Fin workTapeCountTape} (h : StreamingStatePred inp st actualInput work out) :

        Project the third pending-literal register.

        theorem Complexity.SAT.ThreeSAT.Machine.StreamingStatePred.work_scratch {inp actualInput out : Tape} {st : Streaming.State} {work : Fin workTapeCountTape} (h : StreamingStatePred inp st actualInput work out) :

        Project the zero scratch register.