Padding layered Boolean circuits with copies #
An identity layer copies every wire in order. Appending such layers extends a schedule to a chosen layer count without changing its value or output width. Schedules already longer than the target are unchanged. The construction also covers zero-width rows and empty schedules.
Main definitions #
Cslib.Circuits.Boolean.Layered.identityLayer: one copy node per input wire.Cslib.Circuits.Boolean.Layered.padTo: append copies up to a target layer count.
Main results #
Cslib.Circuits.Boolean.Layered.eval_padTo: padding preserves evaluation on actual inputs.Cslib.Circuits.Boolean.Layered.outputWidth_padTo: padding preserves the final width.Cslib.Circuits.Boolean.Layered.WellFormed.padTo: padding preserves valid references.Cslib.Circuits.Boolean.Layered.length_padTo: the resulting length is the larger of the original length and the target.
References #
Copy gates between consecutive layers are used in Gentry, Section 2.
Copy every wire in order, including the empty row when width = 0.
Instances For
An identity layer of width width has width nodes.
Evaluating an identity layer of matching width returns the input row unchanged.
Evaluating any number of replicated identity layers returns the input row unchanged.
Replicated identity layers of width width have output width width.
Padding preserves the output width of a layered schedule.
Padding a well-formed layered schedule preserves WellFormed.