Depth of parallel CSLib circuits #
Continuing a program preserves the depths of its existing wires. If the continuation reads only primary inputs, its wires also retain their original depths. Consequently, parallel composition takes the maximum output depth.
@[simp]
theorem
Cslib.Circuits.Program.wireDepths_gate_last
{σ : Signature}
{n g : ℕ}
(p : Program σ n g)
(l : Line σ n g)
:
theorem
Cslib.Circuits.Program.wireDepths_append_input
{σ : Signature}
{n k g h : ℕ}
(p : Program σ n g)
(select : Fin k → Fin n)
(q : Program σ k h)
(w : Wire k h)
:
(p.append (Wire.input ∘ select) q).wireDepths (appendedWire (Wire.input ∘ select) w) = q.wireDepths w
A continuation fed by primary inputs retains its own wire depths.