Deterministic finite automata with output #
A deterministic automaton with output (DFAO) with input alphabet α, states σ and output
alphabet Δ consists of a transition function step : σ → α → σ, an initial state start and
an output function output : σ → Δ. Where Mathlib's DFA only accepts or rejects a word, a
DFAO attaches an arbitrary output to the state it reaches. These automata are the machines that
compute automatic sequences, the objects of the theorems of Christol and Cobham.
As for Mathlib's DFA, words are read from the head of the list, and the structure does not
require finitely many states; finiteness is imposed where it is used.
Main definitions and results #
TauCeti.DFAO: a deterministic automaton with output.TauCeti.DFAO.evalFrom,TauCeti.DFAO.eval: the state reached on a word, from a given state or from the initial state.TauCeti.DFAO.evalFrom_append: running onx ++ yruns onxand then ony.TauCeti.DFAO.toDFA: the MathlibDFAaccepting the words whose output lies in a setS;TauCeti.DFAO.mem_accepts_toDFAdescribes its language.TauCeti.DFAO.mapOutput,TauCeti.DFAO.prod: post-composition of the output, and the product automaton running two automata in parallel.TauCeti.DFAO.reindex: relabelling the states along an equivalence, as Mathlib'sDFA.reindex.TauCeti.DFAO.comap: changing the input alphabet along a map.TauCeti.DFAO.reverse: a finite-state reversal construction, with arbitrary input and output alphabets;TauCeti.DFAO.output_eval_reversespecifies its output on every word.
References #
- Andrew Bridy, Automatic sequences and curves over finite fields, Algebra & Number Theory 11 (2017), Section 2.1.
- G. Christol, T. Kamae, M. Mendès France, G. Rauzy, Suites algébriques, automates et substitutions, Bull. Soc. Math. France 108 (1980), Section 4.
- Thijmen J. P. Krebs, A more reasonable proof of Cobham's theorem, 2018, arXiv:1801.06704, Definition 2 and Lemma 5.
A deterministic automaton with output (DFAO) with input alphabet α, states σ and
output alphabet Δ: a transition function, an initial state and an output function. No
finiteness is assumed.
- step : σ → α → σ
The transition from a state on one input letter.
- start : σ
The initial state.
- output : σ → Δ
The output attached to a state.
Instances For
The acceptor of a set of outputs #
The Mathlib DFA with the transitions of M whose accepting states are those with output in
S. It accepts exactly the words on which M outputs an element of S
(TauCeti.DFAO.mem_accepts_toDFA).
Instances For
Changing the output and running two automata in parallel #
Changing the output does not change the state reached; with
TauCeti.DFAO.mapOutput_output, the output on a word is f applied to the original output.
Changing the input alphabet #
Reversing the reading order #
An automaton computing the output of M on the reversed word. Its states are functions
from the original states to the image of the output map. Thus finite original states suffice
for finite reversed states, even when the input or output alphabet is infinite.
Instances For
Running the reversed automaton from f precomposes f with the original run on the
reversed word. This describes every state, not only the output at the initial state.
Relabelling the states #
The relabelled automaton reaches the relabelled state, so it has the same output on every
word (TauCeti.DFAO.output_eval_reindex).