Documentation

CslibFrontier.Computability.Circuit.Arithmetic.Separation.GroupProgram.BaseSums

What a base party writes and reads #

A base party of the evaluator of [Ant26] cuts the letters of every tape into segments for its partners. The sum over all ways to cut the letters of a tape is the sum over the segments whose concatenation is the letters and that obey the flags of the partners, and so is the sum over the cuts of all tapes and over what a base party writes and reads (sum_map_packSem). In a block, the letters are those of a run of the automaton on the sides of the tapes (sideLetters), and the sum over a simulation of the block is the sum over these runs (weightedSum_simSem).

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). Ported from the source modules Nc.Grp.SegSum, Nc.Grp.SumSeg, Nc.Grp.SumSim and Nc.Grp.SumBase.

Cutting the letters of the tapes #

Simulating the automaton #

The letters that a run of the automaton writes on the side d of the tape s, in order. The input channel is the side true of the tape none, and the side false of none gets no letter.

The letters on the side of a channel are the letters that the run emits on the channel.

A run writes at most as many letters on a side of a tape as it has steps.

A run writes at most as many letters on the sides d of all tapes as it has steps.

theorem Cslib.Circuits.Arithmetic.Separation.GroupProgram.exists_of_mem_simSem {Γ S : Type} [DecidableEq S] [Fintype S] {F : Type} [CommRing F] {θ : List Bool → F} {Q : Type} [Fintype Γ] [Fintype Q] {c : ℕ} (mu : Tape.Letter S Unit Γ → Matrix Q Q F) (cb : Option Γ → Fin c → Bool) {T : ℕ} {qa qb : Fin (Fintype.card Q)} {r : F × Outputs S} (h : r ∈ simSem θ mu cb T qa qb) :
∃ (u : List (Tape.Letter S Unit Γ)), u.length = T ∧ r.2 = fun (j : Fin (tapeCount S + tapeCount S)) => (List.map (letterCode cb) (sideLetters u (outputSide j))).reverse

The output lists of a simulation are the codes of the letters of a run of T steps on the sides of the tapes, the last first.

theorem Cslib.Circuits.Arithmetic.Separation.GroupProgram.weightedSum_simSem {Γ S : Type} [DecidableEq S] [Fintype S] {F : Type} [CommRing F] {θ : List Bool → F} {Q : Type} [Fintype Γ] [Fintype Q] {c : ℕ} [DecidableEq Q] (mu : Tape.Letter S Unit Γ → Matrix Q Q F) (cb : Option Γ → Fin c → Bool) (hmu : ∀ (z : Tape.Letter S Unit Γ) (q q' : Q), ∃ (e : Interpreter.WE), Interpreter.WE.val θ e = mu z q q') (T : ℕ) (q q' : Q) (G : Outputs S → F) :
(simSem θ mu cb T ((Fintype.equivFin Q) q) ((Fintype.equivFin Q) q')).weightedSum G = ∑ u : Fin T → Tape.Letter S Unit Γ, (List.map mu (List.ofFn u)).prod q q' * G fun (j : Fin (tapeCount S + tapeCount S)) => (List.map (letterCode cb) (sideLetters (List.ofFn u) (outputSide j))).reverse

The sum over a simulation: the sum over the runs u of T steps of the weight of the run from q to q' times G at the codes of the letters of u on the sides of the tapes.

What a base party writes and reads #

theorem Cslib.Circuits.Arithmetic.Separation.GroupProgram.one_of_mem_packSem {F : Type} [CommRing F] {S : Type} [Fintype S] (sep : List Bool) (ub : ℕ) (B : Body) (o : Outputs S) (t : Interpreter.Tree) (q : F × Interpreter.Tree) :
q ∈ packSem F sep ub B o t → q.1 = 1

All weights of what a base party writes and reads are 1.

theorem Cslib.Circuits.Arithmetic.Separation.GroupProgram.sum_map_packSem {F : Type} [CommRing F] {Γ S : Type} [Finite Γ] [DecidableEq Γ] [Fintype S] [DecidableEq S] {c T : ℕ} {M' : Type u_1} [AddCommMonoid M'] {A' E K U0 U1 ub : ℕ} {M : Cut.Moves F (K + K + A') E} (cb : Option Γ → Fin c → Bool) (ρ : Option S → Fin (K + K) → Cut.RowData (K + K)) (n : Fin (K + K) → Fin (K + K) → Fin (U0 + 1)) (key : Cell M U0 U1 → List Bool) (dkey : Fin (K + K) × Fin U0 → List Bool) {p : Fin (K + K)} (hρ : ∀ (s : Option S), (ρ s p).empty = false → (ρ s p).first ≤ (ρ s p).last) {w : Option S × Bool → List Γ} (hw : ∀ (z : Option S × Bool), (w z).length ≤ T) {o : Outputs S} (ho : ∀ (j : Fin (tapeCount S + tapeCount S)), o j = (List.map (letterCode cb) (w (outputSide j))).reverse) (t : Interpreter.Tree) (G : Interpreter.Tree → M') :
(List.map G (List.map Prod.snd (packSem F (separator cb) ub (baseBody ρ n key dkey p) o t))).sum = ∑ R ∈ Fintype.piFinset fun (x : Option S) => Fintype.piFinset fun (x : Fin (K + K)) => List.wordsLe Γ T, if (∀ (s : Option S), List.StairRefinement.cat (R s) = w (s, false)) ∧ ∀ (s : Option S), (ρ s p).Ok (R s) then (List.map (fun (t₁ : Interpreter.Tree) => ∑ C ∈ Fintype.piFinset fun (x : Option S) => Fintype.piFinset fun (x : Fin (K + K)) => List.wordsLe Γ T, if ∀ (s : Option S), List.StairRefinement.cat (C s) = w (s, true) then (List.map G (putStrings ub (baseBody ρ n key dkey p).readKeys (List.ofFn fun (b : Fin (K + K)) => (Cut.segmentString cb fun (s : Option S) => C s b) ++ [true]) t₁)).sum else 0) (putStrings ub (baseBody ρ n key dkey p).writeKeys (List.ofFn fun (b : Fin (K + K)) => (Cut.segmentString cb fun (s : Option S) => R s b) ++ [true]) t)).sum else 0

What a base party writes and reads. If the base party p has the letters w (s, d) on the side d of every tape s, at most T on each, the sum of G over the tries after it has cut the letters and written the units of the strings that it writes and reads is the sum over the segments R that it writes, which fit its row data, and C that it reads, of the sum over writing the units of their strings.