Compiling unbounded formula trees to circuit DAGs #
Pack child circuits in parallel and add one connective gate. Parallel packing retains a common depth bound and sums sizes exactly; serial composition adds the single parent gate. Constants and literals supply the base cases.
theorem
Complexity.AC0Formula.constantCircuit_eval
{N : ℕ}
[NeZero N]
(value : Bool)
(input : BitString N)
:
theorem
Complexity.AC0Formula.literalCircuit_eval
{N : ℕ}
[NeZero N]
(literal : Literal N)
(input : BitString N)
:
theorem
Complexity.AC0Formula.connectiveCircuit_eval
{N : ℕ}
[NeZero N]
(op : AndOrOp)
(input : BitString N)
:
theorem
Complexity.AC0Formula.size_le_forestSize_of_mem
{N : ℕ}
(f : AC0Formula N)
(fs : AC0Forest N)
(h : f ∈ fs.toList)
: