Lax916827.TwoWayMealyPrecomposition
Two-way transducers are closed under pre-composition with Mealy machines
concepts/Lax916827/TwoWayMealyPrecomposition.lean · lax-916827
No public endorsements yet.
Loading review…
Sign in with ORCIDConcept map
In the paper
- page 96 of the paper of lax-157538, Transducers
Theorem
Functions computed by two-way transducers are closed under pre-composition with Mealy machines (Lemma C.2.6 of Transducers). By the Krohn–Rhodes theorem it suffices to pre-compose with a reversible and with a flip-flop machine: a reversible machine can be run backwards, so its state at the head can be maintained when the head moves left; a flip-flop machine's state at a position is determined by the last resetting letter before it, which the two-way transducer finds by a detour to the left.
Lean source view on GitHub
| 1 | import Lax765601.MealyMachine |
| 2 | import Lax916827.TwoWayTransducers |
| 3 | |
| 4 | /-! |
| 5 | --- |
| 6 | title: Two-way transducers are closed under pre-composition with Mealy machines |
| 7 | type: theorem |
| 8 | --- |
| 9 | Functions computed by two-way transducers are closed under pre-composition with |
| 10 | Mealy machines (Lemma C.2.6 of *Transducers*). By the Krohn–Rhodes theorem it |
| 11 | suffices to pre-compose with a reversible and with a flip-flop machine: a |
| 12 | reversible machine can be run backwards, so its state at the head can be |
| 13 | maintained when the head moves left; a flip-flop machine's state at a position |
| 14 | is determined by the last resetting letter before it, which the two-way |
| 15 | transducer finds by a detour to the left. |
| 16 | |
| 17 | # Formalization notes |
| 18 | |
| 19 | All three alphabets are assumed finite, as in the book. |
| 20 | -/ |
| 21 | |
| 22 | namespace Lax916827.TwoWayMealyPrecomposition |
| 23 | |
| 24 | open Lax765601.MealyMachine Lax916827.TwoWayTransducers |
| 25 | |
| 26 | /-- Pre-composing a two-way transducer with a Mealy machine gives a two-way |
| 27 | transducer. -/ |
| 28 | axiom isTwoWay_comp_isMealy {A B C : Type} [Finite A] [Finite B] [Finite C] |
| 29 | {f : List A → List B} {g : List B → List C} (hf : IsMealy f) (hg : IsTwoWay g) : |
| 30 | IsTwoWay (g ∘ f) |
| 31 | |
| 32 | end Lax916827.TwoWayMealyPrecomposition |
| 33 |
Formalization notes
All three alphabets are assumed finite, as in the book.
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