Internal: Circuit Descriptors and Shannon Counting Bound #
This internal module defines the circuit descriptor model used for counting
arguments, and proves the Shannon lower bound for this model. The public
theorem shannon_lower_bound_circuit (which speaks in terms of Circuit)
is in Circ.Internal.Bridge.
Gate and Circuit Descriptors #
A gate in a fan-in-2 circuit over wires 0..W-1.
Encodes (isAnd, (wire1, wire2), (neg1, neg2)).
Semantics: if isAnd then (neg1 ⊕ v1) && (neg2 ⊕ v2)
else (neg1 ⊕ v1) || (neg2 ⊕ v2)
Instances For
A circuit descriptor with N primary inputs and s gates.
Wires 0..N-1 are primary inputs; wires N..N+s-1 are gate outputs.
Equations
- CircuitComplexity.CircDesc N s = (Fin s → CircuitComplexity.GateSlot (N + s))
Instances For
Wire and Circuit Evaluation #
Evaluate wire w in a circuit descriptor.
Primary input wires return the corresponding input bit.
Gate wires evaluate their gate, with forward references defaulting to false.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Evaluate a circuit descriptor: the output is the value of the last gate.
Equations
- CircuitComplexity.evalD hs d input = CircuitComplexity.wireValD d input ⟨N + s - 1, ⋯⟩
Instances For
Cardinality Lemmas #
Arithmetic Lemmas #
Key arithmetic bound: the number of circuit descriptors of size
s = 2^N/(5N) is strictly less than the number of Boolean functions on
N inputs. The proof chains:
N + s < 2^N8(N+s)² < 2^(2N+3)(2N+3)·s < 2^N(2^(2N+3))^s = 2^((2N+3)·s) < 2^(2^N)
Main Theorem #
Shannon counting lower bound: for N ≥ 6, there exists a Boolean
function on N inputs that cannot be computed by any fan-in-2 circuit
descriptor with at most 2^N / (5N) gates.
This is a formalization of Shannon's 1949 counting argument, which shows
that most Boolean functions require circuits of size at least 2^N / (5N).