Expanding a binary gate frontier bounds the number of determining vertices
ProvedPvsNP.binary_reverse_frontier_boundcomplexity-theoryformal-verification
Start a frontier at the output vertex. At each step replace a designated gate by its operands if it belongs to the frontier. The resulting frontier has at most one more vertex than the number of steps, and agreement of two evaluations on it implies agreement on the output.
Preamble
import Mathlib.Data.Finset.Card import Lean.Elab.Tactic.Omega set_option autoImplicit false
Formal statement
theorem PvsNP.binary_reverse_frontier_bound {Vertex Input : Type} [DecidableEq Vertex]
(frontier : ℕ → Finset Vertex) (out : Vertex) (steps : ℕ)
(gate left right : ℕ → Vertex) (op : ℕ → Bool → Bool → Bool)
(eval : Input → Vertex → Bool)
(initial : frontier 0 = {out})
(update : ∀ i < steps, frontier (i + 1) =
if gate i ∈ frontier i then insert (left i) (insert (right i) ((frontier i).erase (gate i)))
else frontier i)
(computes : ∀ i < steps, ∀ x,
eval x (gate i) = op i (eval x (left i)) (eval x (right i))) :
(frontier steps).card ≤ steps + 1 ∧
∀ x y, (∀ v ∈ frontier steps, eval x v = eval y v) → eval x out = eval y out := by sorrySource
Finite support accounting for succinct history updates.