Documentation

CslibFrontier.Computability.Circuit.Arithmetic.Separation.Interpreter.Interp

Formulas for counting the names of constants #

Building blocks of the interpreter Interpreter.IF: formulas that walk a budget along a word (Interpreter.DW), compare (Interpreter.DC), and check that budgets are used up (Interpreter.AW, Interpreter.AZ), with their evaluation lemmas. These formulas are plain: they use no named constants.

From VP ≠ VNP over every field [Ant26], module NS1.Interp.

Main results #

theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.Dt.ite_true {A : Type} [CommRing A] {θ : List Bool → A} {a b c : Fm} {x o p : Tree} {k j : ℕ} (ha : Dt θ a x o k) (ho : o ≠ Tree.nil) (hb : Dt θ b x p j) :
Dt θ (a.ite b c) x p (k + 1 + j)
theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.Dt.ite_false {A : Type} [CommRing A] {θ : List Bool → A} {a b c : Fm} {x p : Tree} {k j : ℕ} (ha : Dt θ a x Tree.nil k) (hc : Dt θ c x p j) :
Dt θ (a.ite b c) x p (k + 1 + j)
theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.Dt.run {A : Type} [CommRing A] {θ : List Bool → A} {a b : Fm} {x p d o : Tree} {k j i : ℕ} (ha : Dt θ a x p k) (hb : Dt θ b x d j) (h : Dt θ (Fm.ofTree p) d o i) :
Dt θ (a.run b) x o (k + j + 1 + i)
theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.Ev.ite_true_nil {A : Type} [CommRing A] {θ : List Bool → A} {a b c : Fm} {x o : Tree} {k : ℕ} (ha : Dt θ a x o k) (ho : o ≠ Tree.nil) (hb : Ev θ b x []) :
Ev θ (a.ite b c) x []
theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.Ev.ite_false_nil {A : Type} [CommRing A] {θ : List Bool → A} {a b c : Fm} {x : Tree} {k : ℕ} (ha : Dt θ a x Tree.nil k) (hc : Ev θ c x []) :
Ev θ (a.ite b c) x []
theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.Ev.run_nil {A : Type} [CommRing A] {θ : List Bool → A} {a b : Fm} {x p d : Tree} {k j : ℕ} (ha : Dt θ a x p k) (hb : Dt θ b x d j) (h : Ev θ (Fm.ofTree p) d []) :
Ev θ (a.run b) x []
theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.Ev.cons_nil_left {A : Type} [CommRing A] {θ : List Bool → A} {a b : Fm} {x : Tree} {l : List (Run A)} (ha : Ev θ a x []) (hb : Ev θ b x l) :
Ev θ (a.cons b) x []
theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.Ev.cons_nil_right {A : Type} [CommRing A] {θ : List Bool → A} {a b : Fm} {x : Tree} {l : List (Run A)} (ha : Ev θ a x l) (hb : Ev θ b x []) :
Ev θ (a.cons b) x []

Subtract 1 from a number; the argument is (this program, the number).

theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.DW_some {A : Type} [CommRing A] {θ : List Bool → A} {w w' : List Bool} (h : decw w = some w') :
∃ k ≤ 20 * w.length, Dt θ DW (DW.code.cons (Tree.ofBits w)) (Tree.ofBits w') k

Subtract 1 in a budget; the argument is (this program, (the name, the budget)).

theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.DC_some {A : Type} [CommRing A] {θ : List Bool → A} {t t' : Bt} {x : Tree} (h : Bt.dec x.path t = some t') :
∃ k ≤ 60 * t.ht, Dt θ DC (DC.code.cons (x.cons t.enc)) t'.enc k
theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.AW_ev {A : Type} [CommRing A] {θ : List Bool → A} (w : List Bool) :
∃ k ≤ 20 * w.length + 5, ∃ (o : Tree), Ev θ AW (AW.code.cons (Tree.ofBits w)) (if (w.all fun (x : Bool) => !x) = true then [Run.det k o] else [])

Check that all numbers of a budget are 0.

theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.AZ_ev {A : Type} [CommRing A] {θ : List Bool → A} (t : Bt) :
∃ k ≤ 40 * t.nds, ∃ (o : Tree), Ev θ AZ (AZ.code.cons t.enc) (if t.zero = true then [Run.det k o] else [])