Polynomial-time evaluation of circuit codes over finite signatures and carriers #
For any Signature with finitely many operation symbols [Finite σ.Op] and any finite carrier
[Finite U], the total gate-list evaluator Cslib.Circuits.evalCode runs in polynomial time on
framed input lists (encList eU) and binary-indexed gate lists (encList (Circuit.encGate eOp)).
Each step dispatches on the finite operation tag (ComputableInPolyTime.finite_cases), reads its
arguments by capped binary lookup (listGetD_binary), applies the finite gate table, and appends
one carrier value whose encoded length is bounded by a constant depending only on (U, eU).
Both CslibFrontier.Computability.Circuit.Boolean.EvaluationTime and
CslibFrontier.Computability.Circuit.Arithmetic.EvaluationTime specialize these certificates.
Main definitions #
Cslib.Circuits.evalOutputs: evaluate all output wire numbers listed in a raw circuit code.
Main results #
Cslib.Circuits.Circuit.evalOutputs_code:evalOutputson a typed circuit's code producesList.ofFn (c.eval I x).Cslib.Circuits.computableInPolyTime_evalCode: polynomial-time evaluation of gate lists over a finite operation set and finite carrier.Cslib.Circuits.computableInPolyTime_evalOutput,Cslib.Circuits.computableInPolyTime_evalOutputs: polynomial-time evaluation of one or all designated binary output wire numbers.
On the code of a typed circuit, evalOutputs computes the list of output values.
Polynomial-time evaluation of gate lists over a finite operation set and finite carrier, charging the framed input list and binary-indexed gate list.
Read a binary-indexed output wire from the computed gate trace in polynomial time.
Evaluate every output wire listed by a runtime circuit code in polynomial time.