Documentation

CslibFrontier.Computability.Circuit.Arithmetic.Separation.GroupProgram.Group

The program GROUP #

The program GROUP of the evaluator of [Ant26] reads a script (scriptEnc): the number T of steps of the automaton and the number ub of bits of a unit in binary, and a list of instructions, which it executes one after the other on a trie, starting from the empty trie (scriptSem). For a fixed automaton, a fixed code of the letters and a fixed list of roles of laws, one formula of the tree machine is GROUP: at every script whose instructions are valid, its weighted list of values is the semantics of the script, every trie held in the state groupState, and its cost is linear in the costs of the instructions (exists_formula_scriptSem).

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.GroupProg and Nc.Grp.Script.

noncomputable def Cslib.Circuits.Arithmetic.Separation.GroupProgram.instructionSem {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) (kinds : List ((L : Cut.Law A) × L.Role)) (T ub : ℕ) :

What an instruction does with a trie, for T steps of the automaton mu, the code cb of the letters, the list kinds of roles of laws and units of ub bits. A comparison keeps the trie, with the weight 1, if the contents agree and rejects otherwise; a block with state numbers that are not below the number of states, and a role with a number that is not below the length of kinds, reject.

noncomputable def Cslib.Circuits.Arithmetic.Separation.GroupProgram.scriptSem {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) (kinds : List ((L : Cut.Law A) × L.Role)) (T ub : ℕ) (l : List Instruction) (t : Interpreter.Tree) :

What a script does with a trie: its instructions one after the other.

@[simp]
theorem Cslib.Circuits.Arithmetic.Separation.GroupProgram.scriptSem_nil {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) (kinds : List ((L : Cut.Law A) × L.Role)) (T ub : ℕ) (t : Interpreter.Tree) :
scriptSem θ mu cb kinds T ub [] t = [(1, t)]
@[simp]
theorem Cslib.Circuits.Arithmetic.Separation.GroupProgram.scriptSem_cons {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) (kinds : List ((L : Cut.Law A) × L.Role)) (T ub : ℕ) (i : Instruction) (l : List Instruction) (t : Interpreter.Tree) :
scriptSem θ mu cb kinds T ub (i :: l) t = (instructionSem θ mu cb kinds T ub i t).weightedBind (scriptSem θ mu cb kinds T ub l)

The conditions on an instruction under which GROUP computes its semantics: the state numbers of a block are below the number of states, the codes of the letters of an input part have at most c bits, and the number of a role is that of a role in kinds with as many slots as are given.

The state of GROUP: the numbers T and ub and the trie.

The program #

theorem Cslib.Circuits.Arithmetic.Separation.GroupProgram.exists_formula_scriptSem {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) (kinds : List ((L : Cut.Law A) × L.Role)) :

The program GROUP. For an automaton mu, a code cb of the letters and a list kinds of roles of laws, one formula computes, at every script whose instructions are valid, the semantics of the script from the empty trie, at a cost linear in the costs of the instructions and in the binary numbers T and ub times their lengths.