Native generation of word comparison #
A unary-width loop emits the existing linear-size word comparator, including all gates and output references. This construction is shared by threshold circuits and support sampling.
Main results #
Cslib.Circuits.Boolean.computableInPolyTime_leCircuit: native generation ofleCircuit.
This certificate was extracted unchanged from the threshold compiler; it concerns uniform construction, not the static description size or execution time of an offline compiler.
theorem Cslib.Circuits.Boolean.computableInPolyTime_leCircuit :
Turing.MultiTapeTM.ComputableInPolyTime (fun (w : ℕ) => (leCircuit w).code) Turing.MultiTapeTM.encUnary encCode
Generate the existing comparator's complete circuit code from unary word width.
theorem Cslib.Circuits.Boolean.computableCircuitCode_leCircuit {α : Type} {enc : α ↪ List Bool} {w : α → ℕ} (hw : Turing.MultiTapeTM.ComputableInPolyTime w enc Turing.MultiTapeTM.encUnary) :
@[fun_prop] rule for leCircuit in typed circuit compositions.