The native counting-machine characterization of #P #
Every verifier-defined #P function is the accepting count of one fixed finite-control native
List-choice machine, with a polynomial all-branches clock in the encoded instance length.
The converse uses the certified binary replay checker. The reverse construction also preserves
the rejecting count: each unsuccessful witness contributes exactly one rejecting branch.
The machine, number of tapes, finite state type and clock are fixed before the input. For an
arbitrary instance encoding the halting contract is on its image; specializing to encBits
covers every binary input. Classes.SharpP.GapMachine uses balanced verdict routing to realize
arbitrary #P differences and prove the signed GapP characterization.
Main results #
Turing.MultiTapeCTM.exists_verifier_counting_machine: exact accepting and rejecting counts.Cslib.Complexity.mem_SharpP_iff_exists_machine: the bidirectional #P characterization.
References #
- L. Valiant, The complexity of computing the permanent
- S. Arora, B. Barak, Computational Complexity: A Modern Approach
The native construction and earlier formalization credits are in MultiTape.Counting.Verifier;
the forward certified checker and its source credit are in Classes.SharpP.Machine.
Actual native guess-and-verify has one branch per witness, with both verdict counts exact. Preparation, framing, buffers and tidy restoration are included in the polynomial clock.
The verifier definition of #P is exactly polynomial-time native accepting-path counting. All machine parameters are fixed before the encoded instance; every branch halts without getting stuck. The constructed machines have globally nonblocking transition tables.