Documentation

CslibFrontier.Computability.Circuit.Arithmetic.Separation.Dealing.Choices

The choices of the dealing program #

The dealing program of [Ant26] begins with four phases of picks. It guesses the states between the blocks, the first one i and the last one e (Codes.stateSteps); the row data of every party on every tape (Codes.rowDataSteps); the number of units of every string between two base parties (Codes.countSteps); and the outcome of every channel (Codes.outcomeSteps). With each choice it writes what the scripts of the groups will read: the flags of the rows, the keys of the units, the comparisons of the units from a base party to itself and the keys of the new units, and the numbers and outcomes as digits for the straight-line program. The sum over the states after these phases is the sum over all choices (sum_execAll_choiceSteps), at the state Codes.chosenState.

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: it guesses q, ρ, the numbers of packets and the outcomes). Ported from the source module Nc.Dl.Run (its phases of picks) and Nc.Dl.Total.

def Cslib.Circuits.Arithmetic.Separation.Dealing.initialState {F : Type} [CommSemiring F] {K A' E U0 U1 pS : ℕ} {M : Cut.Moves F (K + K + A') E} {S : Type} (pt : Fin K → Interpreter.Tree) :
PlanName S M U0 U1 pS → Interpreter.Tree

The state at the beginning: the parts pt of the input, and empty values.

noncomputable def Cslib.Circuits.Arithmetic.Separation.Dealing.stateOptions {K : ℕ} {Q : Type} [Fintype Q] (i e : Q) (a : Fin (K + 1)) :

The options of the state a between the blocks: i first, e last, and any state between.

noncomputable def Cslib.Circuits.Arithmetic.Separation.Dealing.Codes.stateSteps {F : Type} [CommSemiring F] {K A' E U0 U1 D pS : ℕ} {M : Cut.Moves F (K + K + A') E} {S Q : Type} [Fintype Q] (C : Codes S M U0 U1 D pS) (qn : Q → ℕ) (i e : Q) :

Phase 1: pick the states between the blocks, and write their numbers qn.

noncomputable def Cslib.Circuits.Arithmetic.Separation.Dealing.Codes.rowDataSteps {F : Type} [CommSemiring F] {K A' E U0 U1 D pS : ℕ} {M : Cut.Moves F (K + K + A') E} {S : Type} [Fintype S] (C : Codes S M U0 U1 D pS) :

Phase 2: pick the row data of every party on every tape, and write their flags and codes.

def Cslib.Circuits.Arithmetic.Separation.Dealing.Codes.countOption {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) (hU0 : U0 < D) (a : Fin (K + K) × Fin (K + K)) (n : Fin (U0 + 1)) :

The assignments of phase 3 for n units of the string from a.1 to a.2: the keys of their copies at both ends, the number as a digit, and for a.1 = a.2 the comparisons of the two copies.

noncomputable def Cslib.Circuits.Arithmetic.Separation.Dealing.Codes.countSteps {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) (hU0 : U0 < D) :

Phase 3: pick the number of units of the string between every two base parties.

noncomputable def Cslib.Circuits.Arithmetic.Separation.Dealing.Codes.outcomeSteps {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) (hU1 : U1 ≤ D) :

Phase 4: pick the outcome of every channel, and write it as a digit and the keys of the new units at both ends.

noncomputable def Cslib.Circuits.Arithmetic.Separation.Dealing.Codes.choiceSteps {F : Type} [CommSemiring F] {K A' E U0 U1 D pS : ℕ} {M : Cut.Moves F (K + K + A') E} {S Q : Type} [Fintype S] [Fintype Q] (C : Codes S M U0 U1 D pS) (qn : Q → ℕ) (i e : Q) (hU0 : U0 < D) (hU1 : U1 ≤ D) :

The phases of picks.

def Cslib.Circuits.Arithmetic.Separation.Dealing.Codes.chosenState {F : Type} [CommSemiring F] {K A' E U0 U1 D pS : ℕ} {M : Cut.Moves F (K + K + A') E} {S Q : Type} (C : Codes S M U0 U1 D pS) (pt : Fin K → Interpreter.Tree) (qn : Q → ℕ) (hU0 : U0 < D) (hU1 : U1 ≤ D) (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) :
PlanName S M U0 U1 pS → Interpreter.Tree

The state after the picks of the states q between the blocks, the row data ρ, the numbers of units n and the outcomes o, from the parts pt of the input.

The four phases #

theorem Cslib.Circuits.Arithmetic.Separation.Dealing.sum_execAll_choiceSteps {F : Type} [CommSemiring F] {K A' E U0 U1 D pS : ℕ} {M : Cut.Moves F (K + K + A') E} {S Q : Type} [Fintype S] [DecidableEq S] [Fintype Q] [DecidableEq Q] (C : Codes S M U0 U1 D pS) {m : ℕ} {B : Type} [CommRing B] (hK : 0 < K) (pt : Fin K → Interpreter.Tree) (qn : Q → ℕ) (i e : Q) (hU0 : U0 < D) (hU1 : U1 ≤ D) (Φ : (List Bool → Interpreter.Tree) → B) :
(List.map Φ (Interpreter.execAll m (C.choiceSteps qn i e hU0 hU1) (Function.extend C.name (initialState pt) fun (x : List Bool) => Interpreter.Tree.nil))).sum = ∑ q : Fin (K + 1) → Q, if q 0 = i ∧ q (Fin.last K) = e then ∑ ρ : Option S → Fin (K + K) → Cut.RowData (K + K), ∑ n : Fin (K + K) → Fin (K + K) → Fin (U0 + 1), ∑ o : M.Channel → Fin U1, Φ (Function.extend C.name (C.chosenState pt qn hU0 hU1 q ρ n o) fun (x : List Bool) => Interpreter.Tree.nil) else 0

The choices. The sum over the states after the phases of picks, from the parts pt of the input, is the sum over the states q between the blocks from i to e, the row data ρ, the numbers of units n and the outcomes o, at the states Codes.chosenState.