Acceptance circuits for bounded Turing-machine traces #
This module appends the actual acceptance bit to a bounded trace: one final AND
gate tests that the machine is halted and that output cell one contains 1.
The raw circuit is topologically well formed, has cubic size, and reconstructs
to a typed fan-in-two circuit whose output is exactly the predicate counted by
NTM.acceptCount.
The canonical constructor places choice bits before input-data bits. Its input arity must be positive; circuit families continue to handle the unique zero-length case separately.
Main results #
acceptanceRawCircuit_wellFormed: the raw circuit is valid.eval?_acceptanceRawCircuit: raw evaluation returns the acceptance bit.acceptanceCircuit_eval: typed evaluation has the same semantics.canonicalAcceptanceCircuit_eval: canonical choices-first semantics.canonicalAcceptanceCircuit_size_le: canonical cubic size bound.card_acceptingChoices_eq_acceptCount: circuit acceptance counts machine accepting paths exactly.
Appending the final acceptance test adds exactly one gate.
The raw acceptance circuit is topologically ordered after any nonempty primary-input prefix.
The raw acceptance circuit is nonempty and topologically well formed.
The raw acceptance circuit retains the trace compiler's cubic size bound.
Evaluating the raw acceptance circuit appends the final acceptance bit to the successfully evaluated trace array.
Raw single-output evaluation returns exactly the bounded-trace acceptance predicate.
Reconstruct the valid raw acceptance code as a typed fan-in-two circuit. The final raw gate becomes the sole typed output gate.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Typed reconstruction preserves the exact raw gate count.
The typed acceptance circuit has the same machine-dependent cubic size bound as its raw representation.
The typed acceptance circuit computes the exact halt-and-output predicate of the bounded machine trace represented by its primary inputs.
Canonical choices-first, data-second acceptance circuit.
Equations
Instances For
The number of canonical choice strings accepted by the circuit is exactly the machine's bounded accepting-path count.