Transducers of the group program #
A transducer has a finite control, nI input lists of bits and nO output lists of letters. In
every step it reads the first bit of every input list (false at the end of a list) and removes
it, and its table gives, for the control and the bits read, a list of choices: a choice has a
weight, which is a term in the named constants of the ring, the next control, and a constant word
for every output list, which is pushed on it. The outcomes of a run are a weighted list of states
(List.weightedFoldl).
One formula of the tree machine runs a transducer for any number of steps, at constant cost a step. The loops of the evaluator of [Ant26] that guess letters or bits and multiply by entries of a matrix or of a node tensor are such runs.
This is a device of the interpreter and not a general notion of automata. A weighted automaton
(Cslib.Automata.Weighted.Rep, a linear representation with its series List Ω → F) has weights
in the ring and assigns a number to a word; here the weights are terms (Interpreter.WE), which a
formula can multiply by, the semantics is the weighted list of the states after a given number of
steps, as Interpreter.Does needs it, and the input lists are read together and padded by
false. The class Cslib.Automata.Transducer is a relation between words, without weights.
Main definitions #
Transducer.Choice: a choice, with itsweight, thenextcontrol and the words topush.Transducer.State: a state, with itscontrol,inputsandoutputs.Transducer.State.enc: a state as a tree.Transducer.Choice.apply: the state after a choice.Transducer.step,Transducer.run: the weighted lists of one step and ofksteps.
Main results #
Transducer.exists_formula_run: one formula runs a transducer, in time linear in the number of steps.Transducer.mem_run_induction: an invariant of the steps holds at every outcome of a run.Transducer.weightedSum_run_succ: one more step of a run, as a sum over the choices.Transducer.exists_length_le_of_mem_run: the output lists grow by a constant a step.
References #
From VP ≠ VNP over every field [Ant26], Appendix J.3 (the evaluator in the proof of
Theorem J.3); module Nc.Grp.Trans.
A choice of a transducer with nC controls and nO output lists of letters in Λ.
- weight : Interpreter.WE
The weight, a term in the named constants.
- next : Fin nC
The next control.
The words that are pushed on the output lists.
A state of a transducer with nC controls, nI input lists of bits and nO output lists of
letters in Λ.
- control : Fin nC
The control.
The input lists.
The output lists.
A state as a tree: the control as a number, the list of the input lists, and the list of the
output lists, whose letters are encoded by eL.
One step of the transducer with the table tab: the choices at the control and the first bits
of the input lists, with the values of their weights.
One more step of a run, from a state at which the table lists the choices ch z of a finite
type: the sum over these choices of their weight times the run after them.
An invariant of the steps, with a counter of the steps, holds at every outcome of a run.
One formula runs a transducer: at the pair of the number k of steps and a state, its
weighted list of values is the list of the encodings of the outcomes of the run of k steps, and
its cost is linear in k.
The output lists of a run from empty output lists grow by a constant a step.