Circuits on truth tables #
An interpretation I of a signature over a carrier U lifts pointwise to the functions X → U
(Cslib.Circuits.Interpretation.pointwise): an operation applied to functions is applied value by
value. Evaluation at a point x : X is a homomorphism from the lifted interpretation to I
(Cslib.Circuits.Interpretation.evalAt), so the value of every wire of a circuit under the lifted
interpretation is, at each point, the value of that wire under I
(Cslib.Circuits.Program.trace_pointwise_apply, Cslib.Circuits.Circuit.eval_pointwise_apply).
Take X = Fin n → U and start from the coordinate projections. Then every wire carries its truth
table, the function it computes (Cslib.Circuits.Program.trace_pointwise_proj), so the values of
the wires are exactly the functions available in the program
(Cslib.Circuits.available_eq_range_trace_pointwise), and the outputs of a circuit are the
functions it computes (Cslib.Circuits.Circuit.eval_pointwise_proj). A circuit computes f
exactly when its lifted evaluation at the projections is the truth table of f
(Cslib.Circuits.Circuit.computes_iff_eval_pointwise_proj). This is the description of a circuit
as a sequence of functions, each obtained by applying a basis operation to earlier ones
[Juk12], and it makes truth tables ordinary semantic values: geometric statements about
functions, such as Hamming distances between wires, are statements about values of the lifted
interpretation.
Main definitions #
Cslib.Circuits.Interpretation.pointwise: the pointwise lift of an interpretation.Cslib.Circuits.Interpretation.evalAt: evaluation at a point, as a homomorphism.
Main results #
Cslib.Circuits.Program.trace_pointwise_apply,Cslib.Circuits.Circuit.eval_pointwise_apply: lifted evaluation is evaluation at every point.Cslib.Circuits.Program.trace_pointwise_proj,Cslib.Circuits.available_eq_range_trace_pointwise: wires carry truth tables.Cslib.Circuits.Circuit.eval_pointwise_proj,Cslib.Circuits.Circuit.computes_iff_eval_pointwise_proj: outputs are truth tables.
References #
The pointwise lift #
The pointwise lift of I to functions X → U: an operation is applied value by value.
Instances For
Evaluation at a point is a homomorphism from the pointwise lift.
Instances For
Evaluation is pointwise #
Every wire of a program, under the pointwise lift, takes at each point the value of that wire
under I.
Every output of a circuit, under the pointwise lift, takes at each point the value of that
output under I.
Truth tables #
Wires carry truth tables. Under the pointwise lift, started at the coordinate projections, every wire of a program carries the function it computes.
The functions available in a program are the values of its wires under the pointwise lift, started at the coordinate projections.
Outputs are truth tables. Under the pointwise lift, started at the coordinate projections, every output of a circuit is the function that output computes.
A circuit computes f exactly when its lifted evaluation at the coordinate projections is
the truth table of f.