Lax916827.TwoWayComposition
Two-way transducers are closed under composition
concepts/Lax916827/TwoWayComposition.lean · lax-916827
No public endorsements yet.
Loading review…
Sign in with ORCIDConcept map
In the paper
- page 95 of the paper of lax-157538, Transducers
Theorem
Functions computed by two-way transducers are closed under composition (Theorem C.2.5 of Transducers, Chytil and Jákl). The composed transducer computes the reachable configuration graph of the first transducer by a rational function (Lemma C.2.3), which two-way transducers can be pre-composed with (Corollary C.2.7), and then simulates the second transducer on the represented path, walking backwards along the path — which is possible because the run of a deterministic transducer never revisits a configuration — when the second transducer moves left.
Lean source view on GitHub
| 1 | import Lax916827.TwoWayTransducers |
| 2 | |
| 3 | /-! |
| 4 | --- |
| 5 | title: Two-way transducers are closed under composition |
| 6 | type: theorem |
| 7 | --- |
| 8 | Functions computed by two-way transducers are closed under composition |
| 9 | (Theorem C.2.5 of *Transducers*, Chytil and Jákl). The composed transducer |
| 10 | computes the reachable configuration graph of the first transducer by a |
| 11 | rational function (Lemma C.2.3), which two-way transducers can be pre-composed |
| 12 | with (Corollary C.2.7), and then simulates the second transducer on the |
| 13 | represented path, walking backwards along the path — which is possible because |
| 14 | the run of a deterministic transducer never revisits a configuration — when the |
| 15 | second transducer moves left. |
| 16 | |
| 17 | # Formalization notes |
| 18 | |
| 19 | All three alphabets are assumed finite, as in the book. |
| 20 | -/ |
| 21 | |
| 22 | namespace Lax916827.TwoWayComposition |
| 23 | |
| 24 | open Lax916827.TwoWayTransducers |
| 25 | |
| 26 | /-- The composition of two functions computed by two-way transducers is computed by |
| 27 | a two-way transducer. -/ |
| 28 | axiom isTwoWay_comp {A B C : Type} [Finite A] [Finite B] [Finite C] |
| 29 | {f : List A → List B} {g : List B → List C} (hf : IsTwoWay f) (hg : IsTwoWay g) : |
| 30 | IsTwoWay (g ∘ f) |
| 31 | |
| 32 | end Lax916827.TwoWayComposition |
| 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