Streaming controller for the CNF-to-3CNF reduction machine #
validEmitterTM is the concrete valid-input controller for the buffer and
emission layer. It reads the already-validated input in two-bit
tokens, keeps literal signs and the number of pending literals in finite
control, and stores all unbounded variable indices in unary work registers.
The controller invokes three families of child machines:
incRegTM currentRegfor every unary body bit;commitLiteralTM pendingat a literal separator;closeClauseTM pendingat a clause separator.
The latter two child-state types depend on pending, so the controller state
uses sigma types. Each child is run to its halt state before the controller
resumes reading at the next input token. reductionTM installs this controller
in the validation-first total assembly from Machine.Defs.
This file defines the machine. Its simulation invariant and polynomial-time
accounting live in proof-only internal modules and are exposed publicly by
Complexitylib.SAT.Tseitin.Machine.
Controller state #
Parser mode after tokenization. A literal sign is retained in finite
control while its unary variable body accumulates in currentReg.
- boundary (pending : PendingSigns) : StreamMode
- literal (pending : PendingSigns) (sign : Bool) : StreamMode
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The controller alternates between the first and second bit of each token.
- first (mode : StreamMode) : ReadPhase
- second (mode : StreamMode) (firstBit : Bool) : ReadPhase
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Instances For
State of an in-progress unary-register increment, paired with the parser mode to restore when the child machine halts.
Equations
Instances For
State of an in-progress literal commit. The child state type depends on the pending-sign shape selected at the call site.
Equations
Instances For
Equality decision for the pending-dependent commit child state.
Equations
Instances For
State of an in-progress clause close.
Equations
Instances For
Equality decision for the pending-dependent clause-close child state.
Equations
Instances For
Finite controller states: reading, one of three dependent child calls, or the unique halt state.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Inject a read phase into the controller state.
Equations
- Complexity.SAT.ThreeSAT.Machine.controllerRead phase = Sum.inl phase
Instances For
Inject an increment child state into the controller state.
Instances For
Inject a pending-dependent commit child state into the controller state.
Equations
Instances For
Inject a pending-dependent clause-close child state.
Equations
Instances For
The unique controller halt state.
Instances For
Schedule the operation denoted by a complete token. Invalid cases halt; they are unreachable after the preceding successful validation pass.
Equations
- One or more equations did not get rendered due to their size.
- Complexity.SAT.ThreeSAT.Machine.scheduleToken (Complexity.SAT.ThreeSAT.Machine.StreamMode.boundary pending) Complexity.SAT.EncToken.litSep = Complexity.SAT.ThreeSAT.Machine.controllerDone
Instances For
Concrete controller #
Stream over a validated concrete CNF encoding and emit its exact-3 Tseitin
transformation. The input must begin at cell one, freshReg must hold the
first fresh variable, all literal buffers must be zero registers, and the
output must be an empty append-only accumulator.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Final concrete machine for the total encoded reduction. It initializes the
fresh counter, validates before emission, clears the validator verdict on the
selected branch, runs validEmitterTM on valid inputs, and emits the fixed
fallback on malformed inputs.