Lines read earlier wires #
In the widened lines of a program (Program.lines), every gate wire that a line reads comes
before the line's own gate (Program.lt_of_lines_wires_eq_gate), so facts about wires can be
proved by induction along the program order (Program.wire_induction). Bounded fan-in is a
bound on the arity of every line (Program.fanInAtMost_iff).
The value of a gate is its operation applied to the values of the wires it reads
(Program.trace_gate, and Program.trace_gate_last for the last gate), and a valuation of the
wires that reads the inputs and satisfies the equation of every gate is the trace
(Program.eq_trace_of_forall_gate).
Main results #
Program.wire_induction: induction along the program order.Program.fanInAtMost_iff: bounded fan-in, gate by gate.Program.trace_gate,Program.trace_gate_last: the value of a gate.Program.trace_induction: propagate a semantic invariant from inputs through gates.Program.trace_rel,Program.eval_rel: lift a relation between two interpretations.Program.eq_trace_of_forall_gate: the trace is the unique solution of the gate equations.
Induction along the program order: a property of wires that holds for the inputs, and for a gate whenever it holds for the wires the gate reads, holds for every wire.
The value of a gate is its operation applied to the values of the wires it reads.
The value of the last gate of a program is its operation applied to the values of its arguments.
An invariant holding on the inputs and preserved by every evaluated gate holds on every wire. The preservation hypothesis is needed only for the arguments actually read by the gate.
A valuation of the wires is the trace of p when it reads the inputs and satisfies the
equation of every gate.
Two interpretations preserve a relation on every wire if the inputs are related and the operations occurring in the program preserve it. No condition is imposed on unused operations.
Related inputs and gate interpretations give related gate values.