Documentation

CslibFrontier.Computability.Circuit.Arithmetic.Separation.GroupProgram.Bases

The program of a base party #

A base party of the evaluator of [Ant26] is a block of the automaton or a part of the input. A block simulates T steps of the automaton between two given states: the automaton is read as a transducer (simTable) that guesses a letter and a next state in every step and pushes the code of the letter on the output list of the side of its channel (simSem). An input part puts the codes of its letters on the side false of the input (inputOutputs). Then the letters of every tape are cut into segments for the partners, and the strings that the partners get are written into the trie as units; the same is done with the letters of the other sides for the strings that the party reads (packSem).

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); this file formalizes programs of that evaluator, not the theorem. Ported from the source modules Nc.Grp.Base, Nc.Grp.BaseProg and Nc.Grp.Pack.

The tape of a channel and its side; the input channel is the side true of none.

The code of a letter.

The separator: the code of none.

The tapes, none being the input, in a fixed order.

@[reducible, inline]

The number of tapes, with the input.

@[reducible, inline]

Output lists of a simulation: one for every side of every tape, the sides false first.

The tape and the side of an output list.

The tapes to cut for the strings that a base party writes: for every tape, the last first, the flags of its row and the letters on its side false.

The tapes to cut for the strings that a base party reads: for every tape, the last first, the flag 2 for each of m partners and the letters on its side true.

Cut the letters of the tapes items for m partners, each starting from the closing bit 1, and write the strings that the partners get, in their order, at the lists of keys kss.

What a base party with the output lists o does with a trie: it writes the units of the strings to its partners, then those of the strings from its partners.

theorem Cslib.Circuits.Arithmetic.Separation.GroupProgram.StoreBound.of_mem_packSem {A : Type} [CommRing A] {S : Type} [Fintype S] {sep : List Bool} {ub : ℕ} {B : Body} {o : Outputs S} {t : Interpreter.Tree} {q : A × Interpreter.Tree} (h : StoreBound ub t) (hq : q ∈ packSem A sep ub B o t) :
StoreBound ub q.2

The output lists of an input part with the codes part of its letters: they are on the side false of the input.

noncomputable def Cslib.Circuits.Arithmetic.Separation.GroupProgram.letterPush {Γ S : Type} [Fintype S] [DecidableEq S] {c : ℕ} (cb : Option Γ → Fin c → Bool) :

What a letter of the automaton pushes on an output list: its code, if the output list is the side of its channel, and nothing otherwise or for the idle letter.

noncomputable def Cslib.Circuits.Arithmetic.Separation.GroupProgram.simTable {A : Type} [CommRing A] (θ : List Bool → A) {Γ S Q : Type} [Fintype Γ] [Fintype S] [DecidableEq S] [Fintype Q] {c : ℕ} (mu : Tape.Letter S Unit Γ → Matrix Q Q A) (cb : Option Γ → Fin c → Bool) (q : Fin (Fintype.card Q)) :

The automaton mu as a transducer whose controls are the numbers of the states: a choice is a letter and a next state, whose weight is a term (termOf) for the entry of the matrix of the letter, and which pushes what the letter pushes.

noncomputable def Cslib.Circuits.Arithmetic.Separation.GroupProgram.simSem {A : Type} [CommRing A] (θ : List Bool → A) {Γ S Q : Type} [Fintype Γ] [Fintype S] [DecidableEq S] [Fintype Q] {c : ℕ} (mu : Tape.Letter S Unit Γ → Matrix Q Q A) (cb : Option Γ → Fin c → Bool) (T : ℕ) (q q' : Fin (Fintype.card Q)) :

The simulation of T steps of the automaton from the state with number q, ending in the state with number q': the weighted list of the output lists.

The programs #

Blocks and input parts #

theorem Cslib.Circuits.Arithmetic.Separation.GroupProgram.exists_formula_block {A : Type} [CommRing A] {θ : List Bool → A} {Γ S Q : Type} [Fintype Γ] [Fintype S] [DecidableEq S] [Fintype Q] {c : ℕ} (mu : Tape.Letter S Unit Γ → Matrix Q Q A) (cb : Option Γ → Fin c → Bool) :
∃ (F : Interpreter.Fm) (κ : ℕ), ∀ (T ub q q' : ℕ) (hq : q < Fintype.card Q) (hq' : q' < Fintype.card Q) (B : Body) (t : Interpreter.Tree), Interpreter.Does θ F (((Interpreter.Tree.num T).cons ((Interpreter.Tree.num q).cons (Interpreter.Tree.num q'))).cons ((Interpreter.Tree.num ub).cons (t.cons B.enc))) ((simSem θ mu cb T ⟨q, hq⟩ ⟨q', hq'⟩).weightedBind fun (o : Outputs S) => packSem A (separator cb) ub B o t) (κ * (T + Body.cost ub B))

One formula makes a block. Its argument is ((num T, (num q, num q')), (num ub, (trie, body))); the block simulates T steps of the automaton from the state with number q to the state with number q', and writes the units of the letters.

theorem Cslib.Circuits.Arithmetic.Separation.GroupProgram.exists_formula_input {A : Type} [CommRing A] {θ : List Bool → A} {Γ S : Type} [Fintype S] [DecidableEq S] {c : ℕ} (cb : Option Γ → Fin c → Bool) :
∃ (F : Interpreter.Fm) (κ : ℕ), ∀ (ub : ℕ) (part : List (List Bool)) (B : Body) (t : Interpreter.Tree), (∀ a ∈ part, a.length ≤ c) → Interpreter.Does θ F ((wordsEnc part).cons ((Interpreter.Tree.num ub).cons (t.cons B.enc))) (packSem A (separator cb) ub B (inputOutputs part) t) (κ * (part.length + Body.cost ub B))

One formula makes an input part. Its argument is (codes of the letters, (num ub, (trie, body))).