Polynomial-time counting Turing reductions #
Polynomial-time Turing reductions between counting functions (f ≤_T^#P g), defined using
Cslib.Complexity.PolyTimeOracleProgram against the bit-graph oracle predicate AnswersBits
(Valiant 1979, Arora and Barak).
A counting oracle g : β → ℕ exposes its bits (b, i) ↦ (g b).testBit i through
AnswersBits encB g A. Any batch of oracle calls with a polynomial-time unary bit-length bound
is assembled via queryWords (batchNatOracleProgram / PolyTimeOracleProgram.of_batchNatBits),
and any problem in #P whose counting Turing reduction target lies in FP (with a polynomial-time
total decoder for its input encoding) drops to FP.
Main definitions #
Cslib.Complexity.CountingTuringReducible: polynomial-time counting Turing reduction.Cslib.Complexity.CountingTuringHard,Cslib.Complexity.CountingTuringComplete: hardness and completeness for#Punder counting Turing reductions.Cslib.Complexity.queryNatBits,Cslib.Complexity.batchNatOracleProgram: bit-oracle query programs reading bounded-width binary answers viaqueryWords.
Main results #
Cslib.Complexity.ParsimoniousReducible.comp_countingTuringReducible,Cslib.Complexity.SharpPHard.trans_countingTuring: transferring#P-hardness from parsimonious hardness across a counting Turing reduction.Cslib.Complexity.PolyTimeOracleProgram.of_batchNatBits: batch builder for counting Turing reductions without direct oracle-monad plumbing.Cslib.Complexity.CountingTuringReducible.computableInPolyTime_of_decoder: collapsing a counting Turing reduction to polynomial time when the oracle function is inFP.
References #
Polynomial-time counting Turing reduction (f ≤_T^#P g): f is computed by a polynomial-time
oracle program with access to any bit-graph oracle satisfying AnswersBits encB g.
Precomposing a counting Turing reduction with a parsimonious reduction yields a counting Turing reduction.
Every parsimoniously #P-hard function remains #P-hard under counting Turing reductions once
composed with a counting Turing reduction.
Interpreting queryNatBits encB b K against any oracle satisfying AnswersBits encB g
recovers g b provided (g b).size ≤ K.
Single-query bit-oracle lookup is strict oracle PPT in (b, K) (with K in unary).
Batch constructor for CountingTuringReducible: any polynomial-time list of queries queries
with a polynomial-time unary bit-length bound bound and polynomial-time combination combine
witnesses CountingTuringReducible encA encB f g.
If f ≤_T^#P g and the bit graph of g is in P, then f is computable in polynomial
time (FP).
If f ≤_T^#P g, g is computable in polynomial time, and encB has a polynomial-time
total decoder, then f is computable in polynomial time (FP).