Critical paths, dead-gate elimination, and the 2n - 2m structure theorem #
Signature-generic wire out-degrees, syntactic dead-gate elimination, isolated variables, critical paths, and two-variable intersection bottlenecks for bounded-fan-in circuits, following Section 7.1 of Fan, Li, and Yang [FLY22].
For each input wire x of a circuit C, the critical path C.criticalPath x walks forward
along unique outgoing gate slots until reaching a wire C.criticalEndpoint x whose out-degree in
C is not 1 (Definition 7.1). A circuit has no dead gates (C.NoDeadGates, called
normalized in [FLY22]) when every internal gate of out-degree 0 is a designated output
wire; syntactic dead-gate elimination (C.exists_noDeadGates) removes unused internal gates without
increasing gate count or fan-in. An isolated variable (C.HasIsolatedVar) is an input wire of
out-degree 0 that is not a designated output wire.
When a fan-in-2 circuit has no dead gates, no isolated variables, and pairwise disjoint critical
paths, counting outgoing gate slots against critical endpoints gives 2 * n - 2 * m ≤ C.size
(Lemma 7.4). Conversely, if two distinct inputs x ≠ y of a single-output fan-in-2 circuit with
no dead gates have intersecting critical paths, every 2-variable restriction to (x, y) factors
through a single binary gate operation opG via unary pre- and post-processing
(C.exists_bottleneck_of_not_disjoint_criticalPath).
Main definitions #
Cslib.Circuits.Circuit.outDeg: out-degree of a wire in a circuit.Cslib.Circuits.Circuit.NoDeadGates: circuits with no unused non-output internal gates (normalized in [FLY22], Definition 7.1).Cslib.Circuits.Circuit.HasIsolatedVar: circuits with an unused non-output input wire.Cslib.Circuits.Circuit.criticalPath,Cslib.Circuits.Circuit.criticalEndpoint: the critical path and its terminal wire starting from each input coordinate.
Main results #
Cslib.Circuits.Circuit.exists_noDeadGates: syntactic dead-gate elimination preserving evaluation, size upper bounds, and fan-in bounds.Cslib.Circuits.Circuit.eval_update_of_outDeg_input_eq_zero: updating an isolated input wire does not change circuit evaluation.Cslib.Circuits.Circuit.two_mul_sub_two_mul_le_size: Lemma 7.4 of [FLY22].Cslib.Circuits.Circuit.exists_bottleneck_of_not_disjoint_criticalPath: two-variable restriction bottleneck at the first intersection of two critical paths.
References #
Wire ranks and gate input slots #
Topological rank of a wire: 0 for original inputs and k + 1 for internal gate k.
Membership in C.slotReaders v characterizes slots reading v.
C.slotReaders v contains no duplicate slots.
Output wires, dead-gate freedom, and isolated variables #
A circuit has no dead gates if every internal gate of out-degree 0 is a designated output
wire (called normalized in Fan–Li–Yang [FLY22], Definition 7.1; named NoDeadGates here
to distinguish syntactic dead-gate freedom from semantic duplicate-gate merging in
Cslib.Circuits.Circuit.Irredundant).
Instances For
Dead-gate elimination: every circuit has an equivalent circuit with NoDeadGates
(normalized in [FLY22], Definition 7.1), no more gates, and the same fan-in bounds.
An input wire of out-degree 0 that is not a designated output wire has no effect on circuit
evaluation under any interpretation.
Critical paths and Lemma 7.4 #
C.criticalPathAux is never empty.
The first wire of C.criticalPathAux fuel v is v.
Every wire in the tail of C.criticalPathAux fuel v has strictly larger rank than v.
Every wire in the tail of C.criticalPathAux fuel v is an internal gate wire.
Along C.criticalPathAux fuel v, topological ranks strictly increase with list index.
C.criticalPathAux fuel v contains no duplicate wires.
Every consecutive pair (p[i], p[i + 1]) in C.criticalPathAux fuel v witnesses a unique
outgoing slot reading p[i] at gate p[i + 1].
When C.size ≤ fuel + v.rank, the last wire of C.criticalPathAux fuel v does not have
out-degree 1.
Every critical path is nonempty.
The terminal wire of every critical path has out-degree different from 1.
Fan–Li–Yang Lemma 7.4: every circuit of fan-in at most 2 with n inputs, m outputs,
no dead gates (normalized in [FLY22]), no isolated variable, and pairwise disjoint
critical paths has at least 2 * n - 2 * m gates.
Two-variable bottleneck at intersecting critical paths #
In a single-output circuit with NoDeadGates, the designated output wire has out-degree 0.
An input wire lies on the critical path from input y only if it is y itself: every later
wire of the path is a gate.
Critical-path bottleneck lemma: if two distinct input variables x ≠ y of a single-output
fan-in-2 circuit C with NoDeadGates have intersecting critical paths, then there exists a
single binary operation opG : U → U → U (determined by the first shared gate G and independent
of the restriction ρ) such that for every assignment ρ : Fin n → U there exist unary functions
f₁, f₂, f₃ : U → U satisfying
C.eval I (Function.update (Function.update ρ x bx) y by_) 0 = f₁ (opG (f₂ bx) (f₃ by_))
for all bx, by_ : U.