Documentation

CslibFrontier.Computability.Circuit.Arithmetic.Separation.Interpreter.EvalThm

The interpreter is right #

Interpreter.interp: if all runs of the formula coded by f at x stop with the list l, then for every budget t of height at most H the interpreter IF at env f x t stops with a list l' that matches the simulated runs simS t l run by run (Interpreter.RelJ, with step counts scaled by MM H). From VP ≠ VNP over every field [Ant26], module NS1.EvalThm.

Main results #

What the interpreter does in one run: q is a run of the formula and the budgets that are left.

theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.IF_case {A : Type} [CommRing A] {θ : List Bool → A} {f x : Tree} {t : Bt} {c : Fm} (hc : caseL[f.hd.len]? = some c) {M : ℕ} {Q : List (SimRun A)} (h : ∃ (l : List (Run A)), Ev θ c (env f x t) l ∧ List.Forall₂ (RelJ M 300) l Q) :
∃ (l' : List (Run A)), Ev θ IF (env f x t) l' ∧ List.Forall₂ (RelJ M 0) l' Q
theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.call0 {A : Type} [CommRing A] {θ : List Bool → A} {f x : Tree} {t : Bt} {M : ℕ} {l : List (Run A)} (h : ∃ (l' : List (Run A)), Ev θ IF (env f.tl x t) l' ∧ List.Forall₂ (RelJ M 0) l' (simS t l)) {body : Fm} {Q2 : SimRun A → List (SimRun A)} (hb : ∀ q ∈ simS t l, ∃ (l2 : List (Run A)), Ev θ body (q.run.out.cons q.left.enc) l2 ∧ List.Forall₂ (fun (s : Run A) (p : SimRun A) => s.bill = [] ∧ q.run.th * s.th = p.run.th ∧ s.out = p.run.out.cons p.left.enc ∧ M * q.run.cost + s.cost + 400 ≤ M * p.run.cost) l2 (Q2 q)) :
∃ (l' : List (Run A)), Ev θ (lett (rec' Fm.id (fA Fm.id) (fX Fm.id) (fS Fm.id)) body) (env f x t) l' ∧ List.Forall₂ (RelJ M 300) l' (List.flatMap Q2 (simS t l))

A call for a single value: let r = IF(args).

theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.call1_rel {A : Type} [CommRing A] {θ : List Bool → A} {f x : Tree} {t : Bt} {M : ℕ} {l : List (Run A)} (h : ∃ (l' : List (Run A)), Ev θ IF (env f.tl.hd x t) l' ∧ List.Forall₂ (RelJ M 0) l' (simS t l)) :
∃ (l' : List (Run A)), Ev θ call1 (env f x t) l' ∧ List.Forall₂ (fun (s : Run A) (q : SimRun A) => s.th = q.run.th ∧ s.bill = [] ∧ s.out = (env f x t).cons (q.run.out.cons q.left.enc) ∧ s.cost ≤ M * q.run.cost + 30) l' (simS t l)
theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.call2_rel {A : Type} [CommRing A] {θ : List Bool → A} {f x o : Tree} {t t1 : Bt} {M : ℕ} {l : List (Run A)} (h : ∃ (l' : List (Run A)), Ev θ IF (env f.tl.tl x t1) l' ∧ List.Forall₂ (RelJ M 0) l' (simS t1 l)) :
∃ (l' : List (Run A)), Ev θ call2 ((env f x t).cons (o.cons t1.enc)) l' ∧ List.Forall₂ (fun (s : Run A) (q : SimRun A) => s.th = q.run.th ∧ s.bill = [] ∧ s.out = ((env f x t).cons (o.cons t1.enc)).cons (q.run.out.cons q.left.enc) ∧ s.cost ≤ M * q.run.cost + 30) l' (simS t1 l)
theorem Cslib.Circuits.Arithmetic.Separation.Interpreter.interp {A : Type} [CommRing A] {θ : List Bool → A} {H : ℕ} {F : Fm} {x : Tree} {l : List (Run A)} (h : Ev θ F x l) (f : Tree) :
Fm.ofTree f = F → ∀ (t : Bt), t.ht ≤ H → ∃ (l' : List (Run A)), Ev θ IF (env f x t) l' ∧ List.Forall₂ (RelJ (MM H) 0) l' (simS t l)

The interpreter is right.