Documentation

CslibFrontier.Computability.Circuit.Arithmetic.Separation.Interpreter.Guess

Guessing the budgets and multiplying by the powers of the constants #

The formula Interpreter.gt guesses budgets for all names of the constants, bit by bit. For every bit 1 at position b it multiplies by the named power c ^ 2 ^ b of the constant c (KT.expand, KT.comb). So the guessed budget t comes with the weight that KT.budg gives t. Interpreter.RelG describes one such run. The sizes of these formulas are bounded (Interpreter.size_gt).

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

Main definitions #

Main results #

The constants c, c², c⁴, … (n of them); the names are 0, 10, 110, ….

The powers c ^ (2 ^ b), b < B, of all constants.

The power of c that has a given name.

The constant with a given name: l ++ 1^b ++ 0 names the power 2 ^ b of the constant with the name l.

Names of powers 2 ^ b, b < B, of the constants.

theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.KT.Leaf.inB {R : Type} {K : KT R} {p : List Bool} (h : K.Leaf p) {b B : ℕ} (hb : b < B) :
InB B K (p ++ pw b)
theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.KT.Leaf.lk {R : Type} [CommRing R] {K : KT R} {p : List Bool} (h : K.Leaf p) :
∃ (c : R), ∀ (i : ℕ), K.lk (p ++ pw i) = c ^ 2 ^ i
theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.KT.InB.mono {R : Type} {B B' : ℕ} (hB : B ≤ B') {K : KT R} {p : List Bool} (h : InB B K p) :
InB B' K p
theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.KT.ht_budg {R : Type} [CommRing R] {J : ℕ} {K : KT R} {q : Bt × R} (h : q ∈ budg J K) :
q.1.ht ≤ K.ht + J + 1
theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.KT.nds_budg {R : Type} [CommRing R] {J : ℕ} {K : KT R} {q : Bt × R} (h : q ∈ budg J K) :
q.1.nds ≤ K.nds * (J + 1)

Guess a bit; if it is 1, multiply by the constant with the name p.

theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.gbit_ev {A : Type} [CommRing A] {θ : List Bool → A} (p : List Bool) (x : Tree) :
Ev θ (gbit p) x [{ cost := 3, th := 1, bill := [], out := Tree.nil }, { cost := 6, th := 1, bill := [p], out := Tree.one }]

Guess the digits of a number; multiply by the powers of a constant. ν i is the exponent in the name that is used for the power 2 ^ i.

The budgets of the powers of a constant.

The budgets of all powers 2 ^ b, b < B, of all constants.

structure Cslib.Circuits.Arithmetic.Separation.Interpreter.RelG {A : Type} [CommRing A] {R : Type} [CommRing R] (κ : List Bool → R) (P : List Bool → Prop) (c : ℕ) (r : Run A) (q : Bt × R) :

A run that guesses a budget and multiplies by the powers of the constants.

theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.gw_ev {A : Type} [CommRing A] {θ : List Bool → A} {R : Type} [CommRing R] {κ : List Bool → R} {P : List Bool → Prop} {ν : ℕ → ℕ} {pre : List Bool} {b : ℕ} {c : R} (x : Tree) {n j : ℕ} (h : ∀ i < j + n, κ (pre ++ KT.pw (ν (b + i))) = c ^ 2 ^ (b + i) ∧ P (pre ++ KT.pw (ν (b + i)))) :
∃ (l : List (Run A)), Ev θ (gw ν pre b j n) x l ∧ List.Forall₂ (fun (r : Run A) (w : List Bool) => r.th = 1 ∧ r.out = Tree.ofBits w ∧ (List.map κ r.bill).prod = (c ^ 2 ^ (b + j)) ^ BitString.lsbValue w ∧ (∀ p ∈ r.bill, P p) ∧ r.cost ≤ 8 * n + 1) l (KT.words n)
theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.node_rel {A : Type} [CommRing A] {θ : List Bool → A} {R : Type} [CommRing R] {κ : List Bool → R} {P : List Bool → Prop} {f g : Fm} {x : Tree} {lf lg : List (Run A)} {Qf Qg : List (Bt × R)} {cf cg : ℕ} (hf : Ev θ f x lf) (hg : Ev θ g x lg) (rf : List.Forall₂ (RelG κ P cf) lf Qf) (rg : List.Forall₂ (RelG κ P cg) lg Qg) :
∃ (l : List (Run A)), Ev θ ((f.cons g).cons (Fm.quote Tree.nil)) x l ∧ List.Forall₂ (RelG κ P (cf + cg + 3)) l (List.flatMap (fun (p : Bt × R) => List.map (fun (q : Bt × R) => (p.1.node q.1, p.2 * q.2)) Qg) Qf)
theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.gcomb_ev {A : Type} [CommRing A] {θ : List Bool → A} {R : Type} [CommRing R] {κ : List Bool → R} {P : List Bool → Prop} {ν : ℕ → ℕ} {J : ℕ} {pre : List Bool} {c : R} (x : Tree) {n b : ℕ} (h : ∀ i < b + n + J, κ (pre ++ KT.pw (ν i)) = c ^ 2 ^ i ∧ P (pre ++ KT.pw (ν i))) :
∃ (l : List (Run A)), Ev θ (gcomb ν J pre b n) x l ∧ List.Forall₂ (RelG κ P ((8 * J + 10) * n + 1)) l (KT.budg J (KT.comb (c ^ 2 ^ b) n))
theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.gt_ev {A : Type} [CommRing A] {θ : List Bool → A} {R : Type} [CommRing R] {κ : List Bool → R} {P : List Bool → Prop} {ν : ℕ → ℕ} {J B : ℕ} (x : Tree) (K : KT R) (pre : List Bool) (h : ∀ (p : List Bool), K.Leaf p → ∀ i < B + J, κ (pre ++ (p ++ KT.pw (ν i))) = K.lk (p ++ KT.pw i) ∧ P (pre ++ (p ++ KT.pw (ν i)))) :
∃ (l : List (Run A)), Ev θ (gt ν J B K pre) x l ∧ List.Forall₂ (RelG κ P ((8 * J + 10) * (KT.expand B K).nds)) l (KT.budg J (KT.expand B K))

Runs of gt = budgets. The hypothesis: the names that are used name the right powers.

theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.size_gw (ν : ℕ → ℕ) (pre : List Bool) (b N n j : ℕ) (h : ∀ i < j + n, ν (b + i) ≤ N) :
(gw ν pre b j n).code.size ≤ n * (4 * (pre.length + N) + 100) + 4
theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.size_gcomb (ν : ℕ → ℕ) (J : ℕ) (pre : List Bool) (N n b : ℕ) (h : ∀ i < b + n + J, ν i ≤ N) :
(gcomb ν J pre b n).code.size ≤ n * ((J + 1) * (4 * (pre.length + N) + 100)) + 4
theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.size_gt {R : Type} [CommRing R] (ν : ℕ → ℕ) (J B : ℕ) (K : KT R) (pre : List Bool) (N : ℕ) (h : ∀ i < B + J, ν i ≤ N) :
(gt ν J B K pre).code.size ≤ (KT.expand B K).nds * ((J + 1) * (4 * (pre.length + K.ht + N) + 100))