Circuit depth bounds #
This file proves bounds for Program.depth, defined in Cslib.Computability.Circuit.Program,
and Circuit.depth, defined in Cslib.Computability.Circuit.Basic. Program depth is the maximum
depth of its gates; circuit depth is the maximum depth of its designated outputs.
Program.depth_le_iff and Circuit.depth_le_iff express bounds in terms of the individual
gates and outputs. These characterizations give
Circuit.depth_le_program_depth and Circuit.depth_le_size without assumptions on the
signature's fan-in or its interpretation.
Constructor simplification lemmas preserve the depth of earlier wires when a gate is added. Every gate, including a constant gate, contributes one level; selecting outputs contributes none. A circuit with no outputs has depth zero, even when its program contains gates.
Every input or gate wire has depth at most the depth of the program.
Every designated output has depth at most the circuit depth.