Documentation

CslibFrontier.Computability.Circuit.Arithmetic.Separation.GroupProgram.Accept

The script of a group: its value, its validity, and accepting runs #

The program GROUP of the evaluator of [Ant26] computes the value of a group of parties after the moves of a plan at the script of the group (groupScript): from the empty trie, the weighted sum of 1 over the tries after the script is the value of the group (weightedSum_scriptSem_groupScript), since the instructions of every base party and of every role simulate its step (simulates_base, simulates_role) and the instructions of the end compare the copies of the current units. All instructions of the script are valid (valid_groupScript). If the script has an outcome at all, the numbers of units of the base parties of the group are bounded (count_le_of_accept) and the outcomes of its roles are possible (outcome_eq_of_accept).

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). Ported from the source modules Nc.Grp.Group and Nc.Grp.Facts.

The value of a group #

theorem Cslib.Circuits.Arithmetic.Separation.GroupProgram.weightedSum_scriptSem_groupScript {F : Type} [CommRing F] {θ : List Bool → F} {Γ S Q : Type} [Fintype Γ] [Fintype S] [DecidableEq S] [Fintype Q] {A' E K U0 U1 ub c T : ℕ} {G : Type} [DecidableEq G] {M : Cut.Moves F (K + K + A') E} (mu : Tape.Letter S Unit Γ → Matrix Q Q F) (cb : Option Γ → Fin c → Bool) (kinds : List ((L : Cut.Law F) × L.Role)) {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} {key : Cell M U0 U1 → List Bool} {dkey : Fin (K + K) × Fin U0 → List Bool} {tg : M.Role → ℕ} [DecidableEq Γ] [DecidableEq Q] {cap : ℕ} (hκ : Function.Injective (Sum.elim key dkey)) (hub : 0 < ub) (hP : P.Ok cap) (hmu : ∀ (z : Tape.Letter S Unit Γ) (q q' : Q), ∃ (e : Interpreter.WE), Interpreter.WE.val θ e = mu z q q') (hx : ∀ (κ : Fin K), (x κ).length ≤ T) (hρ : ∀ (s : Option S) (p : Fin (K + K)), (ρ s p).empty = false → (ρ s p).first ≤ (ρ s p).last) (hkind : ∀ (r : M.Role), kinds[tg r]? = some ⟨M.law r.fst, r.snd⟩) (htab : ∀ (r : M.Role) (i : (M.law r.fst).Index) (v : { e : (M.law r.fst).Slot // Play.Holds (M.law r.fst).slotEnd r.snd e } → Bool) (g' : (ν : { ν : (M.law r.fst).Channel // Play.Holds (M.law r.fst).channelEnd r.snd ν }) → BitString ((M.law r.fst).length i ↑ν)), ∃ (e : Interpreter.WE), Interpreter.WE.val θ e = (M.law r.fst).table r.snd i v g') (b : Cut.UnitId (K + K) U0 M.Channel U1 → Cut.UnitContent ub) :
((scriptSem θ mu cb kinds T ub (groupScript (fun (z : Q) => ↑((Fintype.equivFin Q) z)) cb P q x ρ n o grp g key dkey tg b) Interpreter.Tree.nil).weightedSum fun (x : Interpreter.Tree) => 1) = P.groupValue mu T cb q x ρ n o grp g b

The value of a group at its script. From the empty trie, the weighted sum of 1 over the tries after the script of the group g is the value of the group after the moves of the plan P, for the contents b of the units that it shares with other groups.

theorem Cslib.Circuits.Arithmetic.Separation.GroupProgram.valid_groupScript {F : Type} [CommRing F] {Γ S Q : Type} [Fintype S] [Fintype Q] {A' E K U0 U1 ub c : ℕ} {G : Type} [DecidableEq G] {M : Cut.Moves F (K + K + A') E} (cb : Option Γ → Fin c → Bool) (kinds : List ((L : Cut.Law F) × L.Role)) {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} {key : Cell M U0 U1 → List Bool} {dkey : Fin (K + K) × Fin U0 → List Bool} {tg : M.Role → ℕ} (hkind : ∀ (r : M.Role), kinds[tg r]? = some ⟨M.law r.fst, r.snd⟩) (b : Cut.UnitId (K + K) U0 M.Channel U1 → Cut.UnitContent ub) (i : Instruction) :
i ∈ groupScript (fun (z : Q) => ↑((Fintype.equivFin Q) z)) cb P q x ρ n o grp g key dkey tg b → Instruction.Valid Q c kinds i

The instructions of the script of a group are valid for GROUP, if the roles are numbered as in the list kinds.

Accepting runs #

theorem Cslib.Circuits.Arithmetic.Separation.GroupProgram.count_le_of_accept {F : Type} [CommRing F] {θ : List Bool → F} {Γ S Q : Type} [Fintype Γ] [Fintype S] [DecidableEq S] [Fintype Q] {A' E K U0 U1 ub c T : ℕ} {G : Type} [DecidableEq G] {M : Cut.Moves F (K + K + A') E} (mu : Tape.Letter S Unit Γ → Matrix Q Q F) (cb : Option Γ → Fin c → Bool) (kinds : List ((L : Cut.Law F) × L.Role)) (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) (key : Cell M U0 U1 → List Bool) (dkey : Fin (K + K) × Fin U0 → List Bool) (tg : M.Role → ℕ) (hub : 0 < ub) (hx : ∀ (κ : Fin K), (x κ).length ≤ T) (hρ : ∀ (s : Option S) (p : Fin (K + K)), (ρ s p).empty = false → (ρ s p).first ≤ (ρ s p).last) {b : Cut.UnitId (K + K) U0 M.Channel U1 → Cut.UnitContent ub} {t : Interpreter.Tree} (h : scriptSem θ mu cb kinds T ub (groupScript (fun (z : Q) => ↑((Fintype.equivFin Q) z)) cb P q x ρ n o grp g key dkey tg b) t ≠ []) {p : Fin (K + K)} (hp : grp (Fin.castAdd A' p) = g) :
∑ b : Fin (K + K), (↑(n p b) + ↑(n b p)) ≤ 2 * ((T + (K + K) * (Fintype.card S + 1)) * c / ub + (K + K))

An accepting run bounds the units of the base parties. If the script of a group has an outcome, every base party p of the group has at most twice the units that its letters allow.

theorem Cslib.Circuits.Arithmetic.Separation.GroupProgram.outcome_eq_of_accept {F : Type} [CommRing F] {θ : List Bool → F} {Γ S Q : Type} [Fintype Γ] [Fintype S] [DecidableEq S] [Fintype Q] {A' E K U0 U1 ub c T : ℕ} {G : Type} [DecidableEq G] {M : Cut.Moves F (K + K + A') E} (mu : Tape.Letter S Unit Γ → Matrix Q Q F) (cb : Option Γ → Fin c → Bool) (kinds : List ((L : Cut.Law F) × L.Role)) (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) (key : Cell M U0 U1 → List Bool) (dkey : Fin (K + K) × Fin U0 → List Bool) (tg : M.Role → ℕ) (hub : 0 < ub) (hkind : ∀ (r : M.Role), kinds[tg r]? = some ⟨M.law r.fst, r.snd⟩) {b : Cut.UnitId (K + K) U0 M.Channel U1 → Cut.UnitContent ub} {t : Interpreter.Tree} (h : scriptSem θ mu cb kinds T ub (groupScript (fun (z : Q) => ↑((Fintype.equivFin Q) z)) cb P q x ρ n o grp g key dkey tg b) t ≠ []) {r : M.Role} (hr : grp (M.roleParty r) = g) :
∃ (ι : Fin (P.count n o r.fst * ub) → (M.law r.fst).Index), ∀ (ν : (M.law r.fst).ChannelAt r.snd), ↑(o ⟨r.fst, ↑ν⟩) = (∑ k : Fin (P.count n o r.fst * ub), ((M.law r.fst).labelLength + (M.law r.fst).length (ι k) ↑ν)) / ub

An accepting run gives possible outcomes. If the script of a group has an outcome, the outcome of every role of the group is possible: there are indices of the law for the bits of the move whose strings on every channel of the role fill as many units as the outcome says.