Documentation

CslibFrontier.Computability.Circuit.Arithmetic.Separation.GroupProgram.Executions

The value of a group as a sum over executions #

The value of a group of parties after the moves of a plan (Cut.Plan.groupValue) is a sum, over the contents of the copies of units at the parties of the group, of the product of the tables of the parties. The evaluator of [Ant26] guesses these contents one step after the other: first every base party of the group writes its copies of the initial units (baseWriteStep), choosing what it writes and reads; then every role of the group, in the order of the moves, writes the copies of the new units of its channels (roleWriteStep), choosing an index and the strings for every bit. The factor of a step is the table of its party or role, every cell of the group is written once and a step reads only what the steps before it have written, so the value of the group is the sum over all executions of the steps (groupValue_eq_exec).

Main definitions #

Main results #

References #

From VP ≠ VNP over every field [Ant26], Appendix J.3: the evaluator described in the proof of Theorem J.3 (the theorem on p. 53, the evaluator on p. 54) guesses the contents of the inner packets and then compares them. Ported from the source modules Nc.Grp.GrpSteps and Nc.Grp.GrpVal.

def Cslib.Circuits.Arithmetic.Separation.GroupProgram.groupCells {F : Type u_1} [CommSemiring F] {A' E K U0 U1 : ℕ} {G : Type u_2} [DecidableEq G] {M : Cut.Moves F (K + K + A') E} (n : Fin (K + K) → Fin (K + K) → Fin (U0 + 1)) (o : M.Channel → Fin U1) (grp : Fin (K + K + A') → G) (g : G) :
Finset (Cell M U0 U1)

The cells of the group g: the copies, at the parties of the group, of the units seen in the end that they hold.

@[simp]
theorem Cslib.Circuits.Arithmetic.Separation.GroupProgram.mem_groupCells {F : Type u_1} [CommSemiring F] {A' E K U0 U1 : ℕ} {G : Type u_2} [DecidableEq G] {M : Cut.Moves F (K + K + A') E} {n : Fin (K + K) → Fin (K + K) → Fin (U0 + 1)} {o : M.Channel → Fin U1} {grp : Fin (K + K + A') → G} {g : G} {c : Cell M U0 U1} :
def Cslib.Circuits.Arithmetic.Separation.GroupProgram.baseCells {F : Type u_1} [CommSemiring F] {A' E K U0 U1 : ℕ} {G : Type u_2} [DecidableEq G] {M : Cut.Moves F (K + K + A') E} (n : Fin (K + K) → Fin (K + K) → Fin (U0 + 1)) (o : M.Channel → Fin U1) (grp : Fin (K + K + A') → G) (g : G) (p : Fin (K + K)) :
Finset (Cell M U0 U1)

The cells that the base party p writes: its copies of the initial units seen in the end, if it is in the group g.

def Cslib.Circuits.Arithmetic.Separation.GroupProgram.roleCells {F : Type u_1} [CommSemiring F] {A' E K U0 U1 : ℕ} {G : Type u_2} [DecidableEq G] {M : Cut.Moves F (K + K + A') E} (n : Fin (K + K) → Fin (K + K) → Fin (U0 + 1)) (o : M.Channel → Fin U1) (grp : Fin (K + K + A') → G) (g : G) (r : M.Role) :
Finset (Cell M U0 U1)

The cells that the role r writes: the copies at its party of the new units of its move seen in the end, if its party is in the group g.

theorem Cslib.Circuits.Arithmetic.Separation.GroupProgram.roleCells_subset_groupCells {F : Type u_1} [CommSemiring F] {A' E K U0 U1 : ℕ} {G : Type u_2} [DecidableEq G] {M : Cut.Moves F (K + K + A') E} {n : Fin (K + K) → Fin (K + K) → Fin (U0 + 1)} {o : M.Channel → Fin U1} {grp : Fin (K + K + A') → G} {g : G} (r : M.Role) :
roleCells n o grp g r ⊆ groupCells n o grp g
noncomputable def Cslib.Circuits.Arithmetic.Separation.GroupProgram.initialContents {Γ S : Type} [Fintype S] {K U0 U1 ub c : ℕ} {N : Type u_3} (cb : Option Γ → BitString c) (R C : Option S → Fin (K + K) → List Γ) (p : Fin (K + K)) :
Cut.UnitId (K + K) U0 N U1 → Cut.UnitContent ub

The contents that the base party p writes, for what it writes (R) and reads (C): unit k of the string from a to b is unit k of the bit string of the segments that p writes for b if a = p, and of the segments that p reads from a otherwise. New units are absent.

noncomputable def Cslib.Circuits.Arithmetic.Separation.GroupProgram.InitialFits {Γ S : Type} [Fintype S] {K c : ℕ} (ub U0 : ℕ) (cb : Option Γ → BitString c) (ρ : Option S → Cut.RowData (K + K)) (n : Fin (K + K) → Fin (K + K) → ℕ) (p : Fin (K + K)) (R C : Option S → Fin (K + K) → List Γ) :

The conditions on what the base party p writes (R) and reads (C), besides its weight: the row data ρ are those of R, the strings from p to every party b and from b to p have n p b and n b p units, and the string from p to itself has the same first U0 units as written and as read.

Instances For
    @[instance_reducible]
    noncomputable instance Cslib.Circuits.Arithmetic.Separation.GroupProgram.instDecidableInitialFits {Γ S : Type} [Fintype S] {K c : ℕ} (ub U0 : ℕ) (cb : Option Γ → BitString c) (ρ : Option S → Cut.RowData (K + K)) (n : Fin (K + K) → Fin (K + K) → ℕ) (p : Fin (K + K)) (R C : Option S → Fin (K + K) → List Γ) :
    Decidable (InitialFits ub U0 cb ρ n p R C)
    noncomputable def Cslib.Circuits.Arithmetic.Separation.GroupProgram.roleContents {F : Type u_1} [CommSemiring F] {A' E K U0 U1 ub : ℕ} {M : Cut.Moves F (K + K + A') E} (r : M.Role) {B : ℕ} (ig : (i : Fin B → (M.law r.fst).Index) × ((j : Fin B) → (ν : (M.law r.fst).ChannelAt r.snd) → BitString ((M.law r.fst).length (i j) ↑ν))) :
    Cut.UnitId (K + K) U0 M.Channel U1 → Cut.UnitContent ub

    The contents that the role r writes for the indices and strings ig of its blocks: unit k of a channel of the role is unit k of the string on the channel (Cut.sideString).

    theorem Cslib.Circuits.Arithmetic.Separation.GroupProgram.roleContents_new {F : Type u_1} [CommSemiring F] {A' E K U0 U1 ub : ℕ} {M : Cut.Moves F (K + K + A') E} (r : M.Role) {B : ℕ} (ig : (i : Fin B → (M.law r.fst).Index) × ((j : Fin B) → (ν : (M.law r.fst).ChannelAt r.snd) → BitString ((M.law r.fst).length (i j) ↑ν))) (ν : (M.law r.fst).ChannelAt r.snd) (k : Fin U1) :
    roleContents r ig (Cut.UnitId.new ⟨r.fst, ↑ν⟩ k) = Cut.unitsOf ub (Cut.sideString (M.law r.fst).label (fun (i : (M.law r.fst).Index) => (M.law r.fst).length i ↑ν) ig.fst fun (j : Fin B) => ig.snd j ν) ↑k
    noncomputable def Cslib.Circuits.Arithmetic.Separation.GroupProgram.baseWriteStep {F : Type u_1} {Γ S Q : Type} [CommSemiring F] [Fintype Γ] [DecidableEq Γ] [Fintype S] [DecidableEq S] [Fintype Q] [DecidableEq Q] {A' E K U0 U1 ub c : ℕ} {G : Type u_2} [DecidableEq G] {M : Cut.Moves F (K + K + A') E} (mu : Tape.Letter S Unit Γ → Matrix Q Q F) (T : ℕ) (cb : Option Γ → BitString c) (q : Fin (K + 1) → Q) (x : Fin K → List Γ) (ρ : Option S → Fin (K + K) → Cut.RowData (K + K)) (n : Fin (K + K) → Fin (K + K) → Fin (U0 + 1)) (o : M.Channel → Fin U1) (grp : Fin (K + K + A') → G) (g : G) (p : Fin (K + K)) :
    WriteStep F (Cell M U0 U1) (Cut.UnitContent ub)

    The step of the base party p of the group g: it chooses what p writes (R) and reads (C), at most T letters for every party on every tape, with the weight of p (Cut.partyWeight) under the conditions InitialFits, and writes the copies at p of the initial units of the group (initialContents). It reads no cell.

    noncomputable def Cslib.Circuits.Arithmetic.Separation.GroupProgram.roleWriteStep {F : Type u_1} [CommSemiring F] {A' E K U0 U1 ub : ℕ} {G : Type u_2} [DecidableEq G] {M : Cut.Moves F (K + K + A') E} (P : Cut.Plan M U0 U1) (n : Fin (K + K) → Fin (K + K) → Fin (U0 + 1)) (o : M.Channel → Fin U1) (grp : Fin (K + K + A') → G) (g : G) (r : M.Role) :
    WriteStep F (Cell M U0 U1) (Cut.UnitContent ub)

    The step of the role r of the group g: it chooses an index and the strings on the channels of the role for each of the count * ub bits of the move, with the product of the entries of the table of the role at the bits given at its slots, provided that these units are present and that the strings on the channels have as many units as the outcome says; and it writes the copies at the party of the role of the new units of the move (roleContents). It reads the copies at its party of the units given at its slots.

    noncomputable def Cslib.Circuits.Arithmetic.Separation.GroupProgram.groupSteps {F : Type u_1} {Γ S Q : Type} [CommSemiring F] [Fintype Γ] [DecidableEq Γ] [Fintype S] [DecidableEq S] [Fintype Q] [DecidableEq Q] {A' E K U0 U1 c : ℕ} {G : Type u_2} [DecidableEq G] {M : Cut.Moves F (K + K + A') E} (mu : Tape.Letter S Unit Γ → Matrix Q Q F) (T : ℕ) (cb : Option Γ → BitString c) (P : Cut.Plan M U0 U1) (q : Fin (K + 1) → Q) (x : Fin K → List Γ) (ρ : Option S → Fin (K + K) → Cut.RowData (K + K)) (n : Fin (K + K) → Fin (K + K) → Fin (U0 + 1)) (o : M.Channel → Fin U1) (grp : Fin (K + K + A') → G) (g : G) (ub : ℕ) :
    List (WriteStep F (Cell M U0 U1) (Cut.UnitContent ub))

    The steps of the group g: its base parties, then its roles in the order of the moves.

    theorem Cslib.Circuits.Arithmetic.Separation.GroupProgram.mem_baseCells {F : Type u_1} [CommSemiring F] {A' E K U0 U1 : ℕ} {G : Type u_2} [DecidableEq G] {M : Cut.Moves F (K + K + A') E} {n : Fin (K + K) → Fin (K + K) → Fin (U0 + 1)} {o : M.Channel → Fin U1} {grp : Fin (K + K + A') → G} {g : G} {p : Fin (K + K)} (hp : grp (Fin.castAdd A' p) = g) {c : Cell M U0 U1} :
    c ∈ baseCells n o grp g p ↔ ∃ (a : Fin (K + K)) (b : Fin (K + K)) (k : Fin U0), ↑k < ↑(n a b) ∧ (a = p ∨ b = p) ∧ c = { party := Fin.castAdd A' p, unit := Cut.UnitId.init a b k }

    The cells that a base party of the group writes are its copies of the initial units of the strings from and to it.

    theorem Cslib.Circuits.Arithmetic.Separation.GroupProgram.mem_roleCells {F : Type u_1} [CommSemiring F] {A' E K U0 U1 : ℕ} {G : Type u_2} [DecidableEq G] {M : Cut.Moves F (K + K + A') E} {n : Fin (K + K) → Fin (K + K) → Fin (U0 + 1)} {o : M.Channel → Fin U1} {grp : Fin (K + K + A') → G} {g : G} {r : M.Role} (hr : grp (M.roleParty r) = g) {c : Cell M U0 U1} :
    c ∈ roleCells n o grp g r ↔ ∃ (ν : (M.law r.fst).ChannelAt r.snd), ∃ k ≤ o ⟨r.fst, ↑ν⟩, c = { party := M.roleParty r, unit := Cut.UnitId.new ⟨r.fst, ↑ν⟩ k }

    The cells that a role of the group writes are the copies at its party of the new units of its channels.

    theorem Cslib.Circuits.Arithmetic.Separation.GroupProgram.groupValue_eq_exec {F : Type u_1} {Γ S Q : Type} [CommSemiring F] [Fintype Γ] [DecidableEq Γ] [Fintype S] [DecidableEq S] [Fintype Q] [DecidableEq Q] {A' E K U0 U1 ub c : ℕ} {G : Type u_2} [DecidableEq G] {M : Cut.Moves F (K + K + A') E} {mu : Tape.Letter S Unit Γ → Matrix Q Q F} {T : ℕ} {cb : Option Γ → BitString c} {P : Cut.Plan M U0 U1} {q : Fin (K + 1) → Q} {x : Fin K → List Γ} {ρ : Option S → Fin (K + K) → Cut.RowData (K + K)} {n : Fin (K + K) → Fin (K + K) → Fin (U0 + 1)} {o : M.Channel → Fin U1} {grp : Fin (K + K + A') → G} {g : G} {cap : ℕ} (hP : P.Ok cap) (b : Cut.UnitId (K + K) U0 M.Channel U1 → Cut.UnitContent ub) :
    P.groupValue mu T cb q x ρ n o grp g b = WriteStep.exec (groupSteps mu T cb P q x ρ n o grp g ub) (fun (y : Cell M U0 U1 → Cut.UnitContent ub) => if Play.GroupAgree (Cut.UnitId.holder M.channelParty) grp g (P.cur n o E) b fun (a : Fin (K + K + A')) (u : Cut.UnitId (K + K) U0 M.Channel U1) => y { party := a, unit := u } then 1 else 0) fun (x : Cell M U0 U1) => none

    The value of a group is the sum over the executions of its steps, from empty contents, of the condition that the copies of the current units agree within the group and are the contents b of the units shared with other groups.