Documentation

CslibFrontier.Computability.Circuit.Arithmetic.Separation.Dealing.NamedStates

States with named values #

The dealing program of [Ant26] keeps its values in a state of the interpreter, a function from paths to trees. A value with the name x sits at the path nm x, for an injective code nm of the names, so a state by names st is the state Function.extend nm st fun _ => .nil, which is empty at the paths that code no name. The steps of the interpreter act on such states by names: an operation and a guess write one name (exec_op, exec_bits), and a pick writes the names of the option that it chooses (exec_pick). After a list of assignments in which every name gets one fixed value, the state is known (foldl_assignAll).

The operations of the dealing program look their results up in tries: trieOf code f has the value f a at the path code a (tget_trieOf).

Main definitions #

Main results #

References #

From VP ≠ VNP over every field [Ant26], Appendix J.3: the program G in the proof of Theorem J.3 (p. 54). Ported from the source module Nc.Dl.Names.

An option of a pick, the assignments o of values to names, as a tree: the list of the pairs of the code of a name and its value.

The state by names after the assignments o, in their order.

theorem Cslib.Circuits.Arithmetic.Separation.Dealing.assignAll_apply {ν : Type u_1} [DecidableEq ν] {w : ν → Interpreter.Tree} {o : List (ν × Interpreter.Tree)} (h : ∀ a ∈ o, a.2 = w a.1) (st : ν → Interpreter.Tree) (x : ν) :
assignAll st o x = if ∃ a ∈ o, a.1 = x then w x else st x

The assignments of a list in which every name gets the value w of it.

theorem Cslib.Circuits.Arithmetic.Separation.Dealing.foldl_assignAll {ν : Type u_1} [DecidableEq ν] {ι : Type u_2} [DecidableEq ι] {own : ν → Option ι} {o : ι → List (ν × Interpreter.Tree)} {w : ν → Interpreter.Tree} (ho : ∀ (i : ι), ∀ a ∈ o i, own a.1 = some i ∧ a.2 = w a.1) (hall : ∀ (i : ι) (x : ν), own x = some i → ∃ a ∈ o i, a.1 = x) (s : List ι) (st : ν → Interpreter.Tree) (x : ν) :
List.foldl (fun (st : ν → Interpreter.Tree) (i : ι) => assignAll st (o i)) st s x = if ∃ i ∈ s, own x = some i then w x else st x

Assignments of fixed values. Every assignment of the option o i is to a name x of i (own x = some i), of the value w x, and every name of i is assigned in o i. After the options of the indices of s, a name of an index of s has its value w x, and every other name its value in st.

theorem Cslib.Circuits.Arithmetic.Separation.Dealing.exec_pick {ν : Type u_1} [DecidableEq ν] {nm : ν → List Bool} (hnm : Function.Injective nm) {m : ℕ} {st : ν → Interpreter.Tree} {x : ν} {tab : Interpreter.Tree} {opts : List (List (ν × Interpreter.Tree))} (h : (Interpreter.tget (st x).path tab).toList = List.map (optionTree nm) opts) :

A pick at the name x, whose table lists the options opts at the value of x.

An operation writes the value of its table at the values of x and y to z.

A guess at y of the reversed bit lists of length m, if the value of x is not empty.

noncomputable def Cslib.Circuits.Arithmetic.Separation.Dealing.trieOf {α : Type u_1} [Fintype α] (code : α → List Bool) (f : α → Interpreter.Tree) :

The trie with the value f a at the path code a, for every a.

theorem Cslib.Circuits.Arithmetic.Separation.Dealing.tget_trieOf {α : Type u_1} [Fintype α] {code : α → List Bool} (hc : Function.Injective code) (f : α → Interpreter.Tree) (a : α) :
Interpreter.tget (code a) (trieOf code f) = f a
theorem Cslib.Circuits.Arithmetic.Separation.Dealing.size_trieOf_le {α : Type u_1} [Fintype α] {code : α → List Bool} {f : α → Interpreter.Tree} {L s : ℕ} (hL : ∀ (a : α), (code a).length ≤ L) (hs : ∀ (a : α), (f a).size ≤ s) :
(trieOf code f).size ≤ Fintype.card α * (s + 4 * L + 4) + 1

The size of the trie of a function with values of size at most s, for codes of length at most L.