Lax765601.MealyContinuity
Mealy machines are continuous
concepts/Lax765601/MealyContinuity.lean · lax-765601
No public endorsements yet.
Loading review…
Sign in with ORCIDConcept map
In the paper
- page 16 of the paper of lax-157538, Transducers
Theorem
Every function computed by a Mealy machine is continuous: the inverse image of a regular language under it is regular (Theorem A.1.4 of Transducers). The book derives this from closure under composition through the letter-to-letter lifting of a language, which labels every position of a string by whether the prefix ending there belongs to the language; a direct product construction works just as well, and is the one formalised.
Lean source view on GitHub
| 1 | import Lax765601.Continuity |
| 2 | import Lax765601.MealyMachine |
| 3 | |
| 4 | /-! |
| 5 | --- |
| 6 | title: Mealy machines are continuous |
| 7 | type: theorem |
| 8 | --- |
| 9 | Every function computed by a Mealy machine is continuous: the inverse image of a |
| 10 | regular language under it is regular (Theorem A.1.4 of *Transducers*). The book |
| 11 | derives this from closure under composition through the letter-to-letter lifting |
| 12 | of a language, which labels every position of a string by whether the prefix |
| 13 | ending there belongs to the language; a direct product construction works just |
| 14 | as well, and is the one formalised. |
| 15 | |
| 16 | # Formalization notes |
| 17 | |
| 18 | Finiteness of the two alphabets is assumed, as everywhere in the book; the |
| 19 | product of the machine with a deterministic automaton for the output language |
| 20 | recognises the inverse image. |
| 21 | -/ |
| 22 | |
| 23 | namespace Lax765601.MealyContinuity |
| 24 | |
| 25 | open Lax765601.Continuity Lax765601.MealyMachine |
| 26 | |
| 27 | /-- A function computed by a Mealy machine is continuous. -/ |
| 28 | axiom continuous_of_isMealy {A B : Type} [Finite A] [Finite B] {f : List A → List B} |
| 29 | (hf : IsMealy f) : Continuous f |
| 30 | |
| 31 | end Lax765601.MealyContinuity |
| 32 |
Formalization notes
Finiteness of the two alphabets is assumed, as everywhere in the book; the product of the machine with a deterministic automaton for the output language recognises the inverse image.
Community review
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above; your ORCID profile must share a public name.
0 comments