Feedback around a straight-line circuit program #
A native program may read external inputs and proposed state values. Connecting the latter to selected internal gates produces a cyclic circuit without adding or duplicating operations. The selected gates are its outputs; they may be shared and other gates may be unused.
For monotone interpretations, the cyclic output is the least state satisfying the program's feedback equations. Thus clients can build one ordinary straight-line update program, prove its functional behavior, and close the loop using the existing least-fixed-point semantics. This construction does not assert a finite iteration bound.
Main definitions #
Cslib.Circuits.Program.feedback: connect state inputs to selected internal gates.Cslib.Circuits.Circuit.feedback: close a native circuit whose outputs are internal gates.
Main results #
Cslib.Circuits.Program.cost_feedback: feedback preserves every operation weight.Cslib.Circuits.Program.eval_feedback_fixed: the outputs satisfy the update equations.Cslib.Circuits.Program.eval_feedback_le: leastness among pre-fixed states.Cslib.Circuits.Circuit.eval_feedback_eq_lfp: a functional update determines the least output.
References #
The construction uses CSLib's native wire mapping and program evaluation and Mathlib's Knaster–Tarski fixed-point API.
Reading a feedback wire is reading the original wire with the selected gate values as state.
Close the last inputs of a program through selected gates, retaining all operation costs.
Instances For
The solved internal gates are the ordinary evaluation at the solved feedback inputs.
Feedback outputs satisfy the program's state-update equations.
Every pre-fixed state bounds the solved feedback outputs.
A proved functional update identifies the feedback output with its least fixed point.
Feed the outputs of a native circuit back into its final input block. Outputs must be internal gates; this excludes direct aliases between state inputs without an operation.
Instances For
The feedback outputs satisfy the ordinary circuit's update equations.
Every pre-fixed state bounds the circuit's feedback outputs.
A functional description of the circuit update identifies its least feedback solution.