Documentation

CslibFrontier.Computability.Circuit.Arithmetic.Separation.Dealing.Phases

The phases of the dealing program #

The dealing program of [Ant26] runs in phases of two kinds. In a phase of picks, the step of every index i picks an option from a fixed list and makes its assignments to the names of i (Codes.pickStep); the sum over the states after the phase is a sum over all choices (sum_execAll_pickSteps). In a deterministic phase, the step of every index writes one name (execAll_writeSteps).

Main definitions #

Main results #

References #

From VP ≠ VNP over every field [Ant26], Appendix J.3: the program G in the proof of Theorem J.3 (p. 54). Ported from the source module Nc.Dl.Phases.

def Cslib.Circuits.Arithmetic.Separation.Dealing.Codes.pickStep {F : Type} [CommSemiring F] {K A' E U0 U1 D pS : ℕ} {M : Cut.Moves F (K + K + A') E} {S : Type} (C : Codes S M U0 U1 D pS) {α : Type u_1} (opts : List α) (o : α → List (PlanName S M U0 U1 pS × Interpreter.Tree)) :

A step that picks one of the options o a, for a in opts, from a table that it reads at the empty name.

theorem Cslib.Circuits.Arithmetic.Separation.Dealing.Codes.exec_pickStep {F : Type} [CommSemiring F] {K A' E U0 U1 D pS : ℕ} {M : Cut.Moves F (K + K + A') E} {S : Type} [DecidableEq S] (C : Codes S M U0 U1 D pS) {m : ℕ} {α : Type u_1} {st : PlanName S M U0 U1 pS → Interpreter.Tree} (hz : st Name.empty = Interpreter.Tree.nil) (opts : List α) (o : α → List (PlanName S M U0 U1 pS × Interpreter.Tree)) :
Interpreter.DStep.exec m (C.pickStep opts o) (Function.extend C.name st fun (x : List Bool) => Interpreter.Tree.nil) = List.map (fun (a : α) => Function.extend C.name (assignAll st (o a)) fun (x : List Bool) => Interpreter.Tree.nil) opts

A pick from a state whose empty name is empty makes the assignments of every option.

The sum over the states after two lists of steps, as a sum over the states after the first.

theorem Cslib.Circuits.Arithmetic.Separation.Dealing.sum_execAll_pickSteps {F : Type} [CommSemiring F] {K A' E U0 U1 D pS : ℕ} {M : Cut.Moves F (K + K + A') E} {S : Type} (C : Codes S M U0 U1 D pS) {m : ℕ} {B : Type} [CommRing B] {ι α : Type} [Fintype ι] [DecidableEq ι] [Fintype α] [DecidableEq α] {st : PlanName S M U0 U1 pS → Interpreter.Tree} (hz : st Name.empty = Interpreter.Tree.nil) (opts : ι → List α) (hopts : ∀ (i : ι), (opts i).Nodup) (o : ι → α → List (PlanName S M U0 U1 pS × Interpreter.Tree)) (own : PlanName S M U0 U1 pS → Option ι) (w : (ι → α) → PlanName S M U0 U1 pS → Interpreter.Tree) (ho : ∀ (f : ι → α) (i : ι), ∀ a ∈ o i (f i), own a.1 = some i ∧ a.2 = w f a.1) (hall : ∀ (f : ι → α) (i : ι) (x : PlanName S M U0 U1 pS), own x = some i → ∃ a ∈ o i (f i), a.1 = x) (hz' : own Name.empty = none) (Φ : (List Bool → Interpreter.Tree) → B) :
(List.map Φ (Interpreter.execAll m (List.map (fun (i : ι) => C.pickStep (opts i) (o i)) Finset.univ.toList) (Function.extend C.name st fun (x : List Bool) => Interpreter.Tree.nil))).sum = ∑ f : ι → α, if ∀ (i : ι), f i ∈ opts i then Φ (Function.extend C.name (fun (x : PlanName S M U0 U1 pS) => if (own x).isSome = true then w f x else st x) fun (x : List Bool) => Interpreter.Tree.nil) else 0

A phase of picks. The step of the index i picks a from the list opts i and makes the assignments o i a. For the choices f, the assignments of o i (f i) are to names x of i (own x = some i), of the values w f x, and every name of i is assigned; the empty name belongs to no index. The sum over the states after all steps is the sum over the choices from the lists, at the states with the values w f x at the names of the indices.

theorem Cslib.Circuits.Arithmetic.Separation.Dealing.execAll_writeSteps {F : Type} [CommSemiring F] {K A' E U0 U1 D pS : ℕ} {M : Cut.Moves F (K + K + A') E} {S : Type} [DecidableEq S] (C : Codes S M U0 U1 D pS) {m : ℕ} {ι : Type} {s : List ι} (hs : ∀ (i : ι), i ∈ s) {step : ι → Interpreter.DStep} {g : ι → PlanName S M U0 U1 pS} (hg : Function.Injective g) {v : ι → Interpreter.Tree} (good : List ι → (PlanName S M U0 U1 pS → Interpreter.Tree) → Prop) {st : PlanName S M U0 U1 pS → Interpreter.Tree} (h0 : good s st) (hstep : ∀ (i : ι) (rest : List ι) (st : PlanName S M U0 U1 pS → Interpreter.Tree), good (i :: rest) st → Interpreter.DStep.exec m (step i) (Function.extend C.name st fun (x : List Bool) => Interpreter.Tree.nil) = [Function.extend C.name (Function.update st (g i) (v i)) fun (x : List Bool) => Interpreter.Tree.nil] ∧ good rest (Function.update st (g i) (v i))) :

A deterministic phase. The step of every index i writes the value v i to the name g i, as long as an invariant good of the steps still to come and of the state holds. After the steps of a list of all indices, the names g i have the values v i.