Computations with decreasing indices as straight-line programs #
A descending computation has a source at index 0 and, at each positive index i, a gate
gates i reading the values at the d strictly smaller indices child i 0, …, child i (d - 1).
Cslib.TreeEval.Ary.Descending unfolds such a computation into a tree. This file keeps the
sharing instead: indices 0, …, g become the single input and the g gates of a straight-line
program, so the computation DAG of the program is the dependency graph of the computation. The
register and pebbling results for straight-line programs (Cslib.Circuits.Program.dag,
Cslib.Circuits.Program.EvaluatesInRegisters) then apply to the computation directly.
Main definitions #
Cslib.Circuits.Descending.signature: one operation per positive index, each of arityd.Cslib.Circuits.Descending.node: the wire of an index; index0is the input.Cslib.Circuits.Descending.program: the computation on indices0, …, g.
Main results #
Cslib.Circuits.Descending.trace_node_zero,Cslib.Circuits.Descending.trace_node_succ: the trace satisfies the source and gate equations of the computation.Cslib.Circuits.Descending.trace_node_eq: every solution of those equations is the trace.Cslib.Circuits.Descending.dag_adj_node: the computation DAG has the dependency edges.Cslib.Circuits.Descending.fanInAtMost_program: every gate readsdwires.
One operation for each positive index i + 1, named by i; each reads d arguments.
The wire carrying index i among indices 0, …, g: index 0 is the input, index i + 1
the gate i. Indices beyond g are sent to the input; program only uses indices ≤ g.
The interpretation of signature d running gate gates (i + 1) at operation i.
Uniqueness. A function on indices that takes the source at 0 and satisfies the gate
equations at the indices 1, …, g agrees with the trace on indices 0, …, g.
Every gate of a descending computation reads d wires.