Proofs and CSLib compilation for alternating layers #
Parallel subcircuits retain their depths. The combining gate consumes signed outputs directly, so primary-input negations require no separate gate layer.
theorem
Complexity.Shallow.Layer.exists_signed_circuit
{n d : ℕ}
(f : Layer n d)
(op : AndOrOp)
:
∃ (c : Cslib.Circuits.Circuit Basis.unboundedAndOr.signature n 1) (b : Bool),
c.size = f.size ∧ c.depth ≤ d ∧ (∀ (x : Fin n → Bool), (b ^^ c.eval Basis.unboundedAndOr.interpretation x 0) = eval op f x) ∧ (0 < d → b = false) ∧ InputNegationsOnly c