Documentation

CslibFrontier.Computability.Circuit.Arithmetic.Separation.Dealing.Cut

One cut by the dealing program #

The dealing program of [Ant26] (Codes.dealProgram) writes the word of the letters of its argument z (the bits tbits z, as the letters bt), cuts it into parts (partTree), runs its steps, and fills one template for every group (Codes.pieceTm): the instance of the program GROUP at the script of the group. Every state after its steps has the values of the end (mem_execAll_allSteps), so the filled templates are the instances of GROUP at the scripts of the groups. If the value of a universal automaton on the word is the plain sum of z, the formula of the pieces gives that value as a sum over the choices, and the instances of GROUP are small, plain and have the values of the groups, then the dealing program cuts plain sums into pieces (isCut_dealProgram).

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.Cut and the states after the steps of Nc.Dl.Bd2.

def Cslib.Circuits.Arithmetic.Separation.Dealing.partTree {Γ : Type} {K c : ℕ} (cb : Option Γ → Fin c → Bool) (x : Fin K → List Γ) (κ : Fin K) :

The part κ of the input x, as the list of the codes of its letters, last letter first.

The states after the steps #

theorem Cslib.Circuits.Arithmetic.Separation.Dealing.mem_execAll_allSteps {F : Type} [CommSemiring F] {S Q : Type} [Fintype S] [Fintype Q] {K A' E U0 U1 D nI pS mm ub : ℕ} {M : Cut.Moves F (K + K + A') E} {P : Cut.Plan M U0 U1} {grp : PlanInput M U0 U1 → Fin (K + K + A') → Fin mm} (C : Codes S M U0 U1 D pS) (tab : SlpTab P grp D nI pS) (hK : 0 < K) {pt : Fin K → Interpreter.Tree} {qn : Q → ℕ} {i e : Q} {hU0 : U0 < D} {hU1 : U1 ≤ D} {σ : List Bool → Interpreter.Tree} (hσ : σ ∈ Interpreter.execAll ub (C.dealSteps tab qn i e hU0 hU1 ++ C.contentSteps) (Function.extend C.name (initialState pt) fun (x : List Bool) => Interpreter.Tree.nil)) :
∃ (q : Fin (K + 1) → Q) (ρ : Option S → Fin (K + K) → Cut.RowData (K + K)) (n : Fin (K + K) → Fin (K + K) → Fin (U0 + 1)) (o : M.Channel → Fin U1) (b : Cut.UnitId (K + K) U0 M.Channel U1 → Cut.UnitContent ub) (st : PlanName S M U0 U1 pS → Interpreter.Tree), (q 0 = i ∧ q (Fin.last K) = e) ∧ Cut.ValidRows ρ ∧ tab.Valid n ∧ (∀ (x : Fin E), P.Good n o x) ∧ (∀ (u : Cut.UnitId (K + K) U0 M.Channel U1), b u ≠ none ↔ u ∈ Play.cutUnits (Cut.UnitId.holder M.channelParty) (grp { counts := n, outcomes := o }) (P.cur n o E)) ∧ Final C tab qn pt q ρ n o b st ∧ σ = Function.extend C.name st fun (x : List Bool) => Interpreter.Tree.nil

The states after all steps. Every state after all steps of the dealing program, from the parts pt of the input, has the values of the end (Final) for states q between the blocks from i to e, valid row data ρ, valid numbers of units n, good outcomes o and contents b that are present exactly for the cut units.

theorem Cslib.Circuits.Arithmetic.Separation.Dealing.mem_execAll_dealSteps {F : Type} [CommSemiring F] {S Q : Type} [Fintype S] [Fintype Q] {K A' E U0 U1 D nI pS mm : ℕ} {M : Cut.Moves F (K + K + A') E} {P : Cut.Plan M U0 U1} {grp : PlanInput M U0 U1 → Fin (K + K + A') → Fin mm} (C : Codes S M U0 U1 D pS) (tab : SlpTab P grp D nI pS) (hK : 0 < K) {pt : Fin K → Interpreter.Tree} {qn : Q → ℕ} {i e : Q} {m : ℕ} {hU0 : U0 < D} {hU1 : U1 ≤ D} {σ : List Bool → Interpreter.Tree} (hσ : σ ∈ Interpreter.execAll m (C.dealSteps tab qn i e hU0 hU1) (Function.extend C.name (initialState pt) fun (x : List Bool) => Interpreter.Tree.nil)) :
∃ (n : Fin (K + K) → Fin (K + K) → Fin (U0 + 1)) (o : M.Channel → Fin U1) (st : PlanName S M U0 U1 pS → Interpreter.Tree), tab.Valid n ∧ (∀ (x : Fin E), P.Good n o x) ∧ (∀ (u : Cut.UnitId (K + K) U0 M.Channel U1), st (Name.isCut u) = Interpreter.Tree.bit (decide (u ∈ Play.cutUnits (Cut.UnitId.holder M.channelParty) (grp { counts := n, outcomes := o }) (P.cur n o E)))) ∧ σ = Function.extend C.name st fun (x : List Bool) => Interpreter.Tree.nil

The states after the steps up to the checks. Every state after Codes.dealSteps, from the parts pt of the input, is a state by names st that has the bits that say which units are cut, for valid numbers of units n and good outcomes o.

The dealing program #

noncomputable def Cslib.Circuits.Arithmetic.Separation.Dealing.Codes.pieceTm {F : Type} [CommSemiring F] {S : Type} [Fintype S] {K A' E U0 U1 D nI pS mm : ℕ} {M : Cut.Moves F (K + K + A') E} {P : Cut.Plan M U0 U1} {grp : PlanInput M U0 U1 → Fin (K + K + A') → Fin mm} (C : Codes S M U0 U1 D pS) (tab : SlpTab P grp D nI pS) (tg : M.Role → ℕ) (bT bub : List Bool) (hD : 1 < D) (hmm : mm ≤ D) (gp : Interpreter.Tree) (g : Fin mm) :

The template of the instance of the program GROUP, of code gp, at the script of the group g (Codes.scriptTm).

noncomputable def Cslib.Circuits.Arithmetic.Separation.Dealing.Codes.dealProgram {F : Type} [CommSemiring F] {Γ S Q : Type} [Fintype S] [Fintype Q] {K A' E U0 U1 D nI pS mm c : ℕ} {M : Cut.Moves F (K + K + A') E} {P : Cut.Plan M U0 U1} {grp : PlanInput M U0 U1 → Fin (K + K + A') → Fin mm} (C : Codes S M U0 U1 D pS) (tab : SlpTab P grp D nI pS) (qn : Q → ℕ) (tg : M.Role → ℕ) (bT bub nl nub : List Bool) (hD : 1 < D) (hmm : mm ≤ D) (gp : Interpreter.Tree) (cb : Option Γ → Fin c → Bool) (bt : Bool → Γ) (i e : Q) (hU0 : U0 < D) (hU1 : U1 ≤ D) :

The dealing program. It writes the word of its argument with the codes of the letters bt false for a leaf and bt true for a node, cuts it into parts of lsbValue nl letters at the names of the parts, runs the steps up to the checks (Codes.dealSteps), guesses the contents of the cut units (Codes.contentSteps) with lsbValue nub bits each, and fills the template of the instance of GROUP, of code gp, for every group.

The parts at their names. Writing the parts of ℓ letters of the word of z at the names of the parts, into the empty trie, gives the state at the beginning (initialState) with the parts as lists of the codes of their letters (partTree).

One cut #

theorem Cslib.Circuits.Arithmetic.Separation.Dealing.isCut_dealProgram {F : Type} [CommRing F] {Γ S Q : Type} [Fintype Γ] [DecidableEq Γ] [Fintype S] [DecidableEq S] [Fintype Q] [DecidableEq Q] {K A' E U0 U1 D nI pS mm ub c : ℕ} {M : Cut.Moves F (K + K + A') E} {P : Cut.Plan M U0 U1} {grp : PlanInput M U0 U1 → Fin (K + K + A') → Fin mm} (C : Codes S M U0 U1 D pS) (tab : SlpTab P grp D nI pS) [DecidablePred tab.Valid] [(n : Fin (K + K) → Fin (K + K) → Fin (U0 + 1)) → (o : M.Channel → Fin U1) → (x : Fin E) → Decidable (P.Good n o x)] {θ : List Bool → F} {mu : Tape.Letter S Unit Γ → Matrix Q Q F} {qn : Q → ℕ} {tg : M.Role → ℕ} {bT bub nl nub : List Bool} {hD : 1 < D} {hmm : mm ≤ D} {gp : Interpreter.Tree} {cb : Option Γ → Fin c → Bool} {bt : Bool → Γ} {i e : Q} {hU0 : U0 < D} {hU1 : U1 ≤ D} {τ s τ' s' t T ℓ : ℕ} (hK : 0 < K) (hnl : BitString.lsbValue nl = ℓ) (hnub : BitString.lsbValue nub = ub) (hU : ∀ (z : Interpreter.Tree), z.size ≤ s → Interpreter.Plain θ τ z → (Tape.runVal mu i e (K * T) fun (x : Unit) => List.map bt (Interpreter.tbits z)) = Interpreter.pv θ z) (hval : ∀ (z : Interpreter.Tree), z.size ≤ s → (Tape.runVal mu i e (K * T) fun (x : Unit) => List.map bt (Interpreter.tbits z)) = ∑ q : Fin (K + 1) → Q, if q 0 = i ∧ q (Fin.last K) = e then ∑ ρ : Option S → Fin (K + K) → Cut.RowData (K + K), if Cut.ValidRows ρ then ∑ n : Fin (K + K) → Fin (K + K) → Fin (U0 + 1), if tab.Valid n then ∑ o : M.Channel → Fin U1, if ∀ (x : Fin E), P.Good n o x then ∑ b ∈ Play.common none (Play.cutUnits (Cut.UnitId.holder M.channelParty) (grp { counts := n, outcomes := o }) (P.cur n o E)), ∏ g : Fin mm, P.groupValue mu T cb q (Cut.parts ℓ (List.map bt (Interpreter.tbits z))) ρ n o (grp { counts := n, outcomes := o }) g b else 0 else 0 else 0 else 0) (hdoes : ∀ (z : Interpreter.Tree), z.size ≤ s → ∃ (Qs : List (F × Interpreter.Tree)), Interpreter.Does θ (C.dealProgram tab qn tg bT bub nl nub hD hmm gp cb bt i e hU0 hU1) z Qs t ∧ (∀ q ∈ Qs, ∃ σ ∈ Interpreter.execAll ub (C.dealSteps tab qn i e hU0 hU1 ++ C.contentSteps) (Function.extend C.name (initialState (partTree cb (Cut.parts ℓ (List.map bt (Interpreter.tbits z))))) fun (x : List Bool) => Interpreter.Tree.nil), q.2 = Interpreter.listT (List.map (fun (t : Interpreter.Tm) => Interpreter.Tm.expand σ t) (List.map (C.pieceTm tab tg bT bub hD hmm gp) (List.finRange mm)))) ∧ Interpreter.wsum Qs (Cut.pvProd θ) = (List.map (fun (σ : List Bool → Interpreter.Tree) => (List.map (fun (t : Interpreter.Tm) => Interpreter.pv θ (Interpreter.Tm.expand σ t)) (List.map (C.pieceTm tab tg bT bub hD hmm gp) (List.finRange mm))).prod) (Interpreter.execAll ub (C.dealSteps tab qn i e hU0 hU1 ++ C.contentSteps) (Function.extend C.name (initialState (partTree cb (Cut.parts ℓ (List.map bt (Interpreter.tbits z))))) fun (x : List Bool) => Interpreter.Tree.nil))).sum) (hpc : ∀ (z : Interpreter.Tree), z.size ≤ s → ∀ (q : Fin (K + 1) → Q) (ρ : Option S → Fin (K + K) → Cut.RowData (K + K)) (n : Fin (K + K) → Fin (K + K) → Fin (U0 + 1)) (o : M.Channel → Fin U1) (b : Cut.UnitId (K + K) U0 M.Channel U1 → Cut.UnitContent ub) (g : Fin mm), Cut.ValidRows ρ → tab.Valid n → (∀ (x : Fin E), P.Good n o x) → (∀ (u : Cut.UnitId (K + K) U0 M.Channel U1), b u ≠ none ↔ u ∈ Play.cutUnits (Cut.UnitId.holder M.channelParty) (grp { counts := n, outcomes := o }) (P.cur n o E)) → have y := gp.cons (GroupProgram.scriptEnc bT bub (GroupProgram.groupScript qn cb P q (Cut.parts ℓ (List.map bt (Interpreter.tbits z))) ρ n o (grp { counts := n, outcomes := o }) g C.key C.dkey tg b)); y.size ≤ s' ∧ Interpreter.Plain θ τ' y ∧ Interpreter.pv θ y = P.groupValue mu T cb q (Cut.parts ℓ (List.map bt (Interpreter.tbits z))) ρ n o (grp { counts := n, outcomes := o }) g b) :
Cut.IsCut θ τ s τ' s' mm t (C.dealProgram tab qn tg bT bub nl nub hD hmm gp cb bt i e hU0 hU1).code

One cut. Suppose that, for every argument z of size at most s, with the parts x of ℓ = BitString.lsbValue nl letters of its word:

  • the automaton mu has, on the word, the value pv θ z if z is τ-plain (hU);
  • that value is the sum, over the states q from i to e, the valid row data ρ, the valid numbers of units n, the good outcomes o and the contents b of the cut units that are empty off them, of the products of the values of the groups (hval);
  • the dealing program has the weighted list of the filled templates along its runs, in time t (hdoes);
  • for every choice that passes the checks, the instance of GROUP at the script of every group has size at most s', is τ'-plain and has the value of the group (hpc).

Then the dealing program cuts (τ, s) into (τ', s') with at most mm pieces in t steps.