Documentation

Complexitylib.Circuits.BarringtonConverse

The converse direction of Barrington's theorem #

Polynomial-length width-5 permutation branching programs are evaluated by balanced Boolean formulas of logarithmic depth. Together with the existing formula-to-program construction, this proves the full nonuniform Barrington equivalence under the library's total-assignment family convention.

Main results #

theorem Complexity.clog_le_of_polynomial_bound (C p n m : ) (h : m C * (n + 1) ^ p) :
Nat.clog 2 m Nat.clog 2 C + p * (Nat.log 2 n + 1)

Taking a binary ceiling logarithm of a polynomial bound yields an affine bound in log₂ n. This arithmetic bridge is shared by total-assignment and fixed-arity Barrington converses.

theorem Complexity.BP.eval_reachesFormula {w : } (α : Bool) (d : ) (p : BP w) (x y : Fin w) (h : List.length p 2 ^ d) :
BoolFormula.eval α (reachesFormula d p x y) = true (eval α p) x = y

The balanced state-to-state formula correctly evaluates every program of length at most 2 ^ d.

theorem Complexity.BP.depth_reachesFormula_le {w : } (d : ) (p : BP w) (x y : Fin w) :
(reachesFormula d p x y).depth (w + 1) * d + 1

Balanced state-to-state evaluation has depth at most (w + 1) * d + 1.

theorem Complexity.BP.eval_decisionFormula_eq_true {w : } (α : Bool) (p : BP w) (x : Fin w) :

The canonical decision formula is true exactly when the program moves its designated query point.

theorem Complexity.BP.depth_decisionFormula_le {w : } (p : BP w) (x : Fin w) :

The canonical decision formula has logarithmic depth in program length.

theorem Complexity.BP.vars_decisionFormula_lt {w n : } (p : BP w) (x : Fin w) (hvars : instructionp, instruction.var < n) (index : ) :
index (p.decisionFormula x).varsindex < n

The balanced decision formula introduces no new input variables.

The balanced formula family computes every function family decided by the source branching-program family.

A polynomial-length width-5 branching-program family becomes a logarithmic-depth Boolean-formula family.

Every logarithmic-depth total-assignment formula family has a polynomial-length width-5 permutation branching-program family.

Every polynomial-length width-5 total-assignment branching-program family has an equivalent logarithmic-depth formula family.

Barrington's theorem on total assignments. Logarithmic-depth Boolean formula families are exactly polynomial-length width-5 permutation branching-program families over assignments ℕ → Bool.

This theorem does not claim that the length-n objects only read the first n variables; the typed fixed-arity theorem is a separate statement.