Composition with retained inputs #
A form of the composition rule complexity_comp_le for circuits that keep their inputs: computing
f and then a function g of both the inputs and the values of f costs at most the sum of their
complexities (Cslib.Circuits.complexity_comp_append_le). The inputs reach g by wiring, which
costs nothing, alongside a circuit for f.
Main results #
Cslib.Circuits.complexity_comp_append_le: a function of the inputs and of the values offcosts at most the complexity offplus its own complexity.
theorem Cslib.Circuits.complexity_comp_append_le {σ : Signature} {U : Type u_1} {I : Interpretation σ U} [I.IsComplete] {n m p : ℕ} (f : (Fin n → U) → Fin m → U) (g : (Fin (n + m) → U) → Fin p → U) :
Computing f and then a function g of the inputs and of the values of f costs at most the
sum of their complexities: the inputs reach g by wiring.