Documentation

CslibFrontier.Computability.Circuit.Arithmetic.Separation.GroupProgram.Segments

Cutting the letters of a tape into segments #

A base party of the evaluator of [Ant26] writes on every tape a list of letters, and the letters are cut into one segment for every partner. The letters come in reverse order, and the segments are made from the last partner to the first one: the letters of the partner at hand are taken one at a time, then its segment is closed and the next partner begins. Every segment is closed by a separator and stands in front of the string that the partner has from the later tapes. A flag of every partner says whether it gets nothing, something or anything (flagAllows).

One formula of the tree machine makes all cuts of the letters of a list of tapes, one tape after the other, as a weighted list in which every cut has the weight 1.

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.Seg and Nc.Grp.Base.

Whether a flag allows a segment: the flag 0 that nothing has been taken, the flag 1 that something has been taken, and every other flag anything.

@[irreducible]
def Cslib.Circuits.Arithmetic.Separation.GroupProgram.cuts (sep : List Bool) (f : ℕ) (tk : Bool) (cur : List Bool) (fs : List ℕ) (as rest out : List (List Bool)) :

All ways to cut the letters rest with the separator sep. The partner at hand has the flag f, tk says whether a letter has been taken for it, and cur is its string so far; fs and as are the flags and the strings from the later tapes of the partners before it, and out are the finished strings of the partners behind it.

The cuts after the segment of the partner at hand is closed.

The cuts after a letter is taken for the partner at hand.

theorem Cslib.Circuits.Arithmetic.Separation.GroupProgram.cuts_eq (sep : List Bool) (f : ℕ) (tk : Bool) (cur : List Bool) (fs : List ℕ) (as rest out : List (List Bool)) :
cuts sep f tk cur fs as rest out = (if flagAllows f tk = true then cutsClose sep cur fs as rest out else []) ++ cutsTake sep f cur fs as rest out

All ways to cut the letters l of a tape, for partners with the flags fl and the strings accs from the later tapes; none if there is no partner.

A tape to be cut.

  • flags : List ℕ

    The flags of the partners, the last partner first.

  • letters : List (List Bool)

    The letters, in reverse order.

The cuts of one tape as a weighted list with weights 1, the strings of the partners in the order of their flags.

The cuts of a list of tapes, the last tape first.

theorem Cslib.Circuits.Arithmetic.Separation.GroupProgram.length_le_of_mem_cutTapes {A : Type} [CommRing A] {sep : List Bool} {items : List CutItem} {accs : List (List Bool)} {N : ℕ} (h : ∀ it ∈ items, it.flags.length ≤ N) (ha : accs.length ≤ N) (r : A × List (List Bool)) :
r ∈ cutTapes A sep items accs → r.2.length ≤ N

Every outcome of the cuts of a list of tapes has at most N strings if every tape has at most N partners and there are at most N strings at the beginning.

The program #

theorem Cslib.Circuits.Arithmetic.Separation.GroupProgram.exists_formula_cutTapes {A : Type} [CommRing A] {θ : List Bool → A} (sep : List Bool) :
∃ (F : Interpreter.Fm), ∀ (c N : ℕ) (items : List CutItem) (accs : List (List Bool)), sep.length ≤ c → (∀ it ∈ items, it.flags.length + it.letters.length ≤ N ∧ ∀ a ∈ it.letters, a.length ≤ c) → Interpreter.Does θ F ((Interpreter.listT (List.map CutItem.enc items)).cons (wordsEnc accs)) (List.map (Prod.map id wordsEnc) (cutTapes A sep items accs)) ((62 * c + 800) * (items.length * (N + 1) + 1))

One formula makes the cuts of a list of tapes. Its argument is the pair of the list of the items of the tapes, the last tape first, and the strings of the partners from the later tapes.