Programs from closed-form gate values #
A construction often describes its gates by a closed formula for each gate value, because that is
how locality and counting arguments read them. Program.exists_eval_eq_of_lines turns such a
description into a program: if line j is a line whose gate wires point before gate j, and
h x j is what line j computes from the input x and the values h x, then some program with
those operations has gate values h x.
Main results #
Cslib.Circuits.Program.exists_eval_eq_of_lines: a program with prescribed gate values and operations, given lines that read only earlier gates.Cslib.Circuits.Program.exists_eval_eq_of_prefixLines: the same for lines over the gates before each one, with gate values indexed by any type through an input map.
Programs from lines over the gates before each one. Let line j be a line over the gates
before j, and let h x j be its value on the inputs input x and the values h x of the earlier
gates, for x in any type X. Then some program has gate values h x on the inputs input x,
and its gate j performs the operation of line j.
Programs from closed-form gate values. Let line j be a line over all G gates whose
gate wires point to gates before j, and let h x j be the value of line j on the input x
and the gate values h x. Then some program on n inputs with G gates has gate values h x,
and its gate j performs the operation of line j.