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 verdict