From a polynomial-time decision function to membership in P #
A language whose verdict is computed by a polynomial-time function is in
P. This is the bridge that lets a development establish membership in P
by exhibiting a function — in particular by building one in Cobham's algebra,
where Complexitylib.Classes.P.Cobham supplies CobhamFP_eq_FP — instead of
constructing a decider machine by hand.
The proof reads the verdict off the output through the polynomial-time
language Language.containsOne: a verdict string is accepted exactly when it
contains a 1, and P is closed under polynomial-time preimages.
Main results #
mem_P_of_decisionFn— a verdict function inFPputs its language inPmem_P_of_decisionFn_bool— the same with aBool-valued verdictFPPred.mem_P— a language whose membership test isFPPredis inPmem_P_of_bounded_key— a test of a bounded polynomial-time key decides a language inP
A polynomial-time membership test decides a language in P. The form of
mem_P_of_decisionFn_bool for the tests of Complexitylib.Classes.P.Unary.
A bounded-key predicate is in P. If key is polynomial-time and its
outputs have length at most L, then {z | Q (key z)} is in P for every Q;
the predicate itself need not be computable.