Lax916827.ConfigurationGraphOutput
Checking the output of a configuration graph against a regular language
concepts/Lax916827/ConfigurationGraphOutput.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
For a regular language over the output alphabet, the set of strings over that represent a reachable configuration graph whose output string belongs to is a regular language (Lemma C.2.4 of Transducers). An automaton checks that the string is a representation and guesses a labelling of the edges of the represented path by transitions of an automaton for .
Lean source view on GitHub
| 1 | import Mathlib.Computability.DFA |
| 2 | import Lax916827.ConfigurationGraphs |
| 3 | |
| 4 | /-! |
| 5 | --- |
| 6 | title: Checking the output of a configuration graph against a regular language |
| 7 | type: theorem |
| 8 | --- |
| 9 | For a regular language over the output alphabet, the set of strings over |
| 10 | that represent a reachable configuration graph whose output string belongs |
| 11 | to is a regular language (Lemma C.2.4 of *Transducers*). An automaton |
| 12 | checks that the string is a representation and guesses a labelling of the edges |
| 13 | of the represented path by transitions of an automaton for . |
| 14 | |
| 15 | # Formalization notes |
| 16 | |
| 17 | The output string of a representation is the string printed by the transducer |
| 18 | `pathTrans M` walking along the represented path; on the representation of the |
| 19 | graph of `M` on `w` it is the output of `M` on `w`. As in the book, the |
| 20 | transducer is assumed to compute a total function `f`, so that every |
| 21 | representation has an output. |
| 22 | -/ |
| 23 | |
| 24 | namespace Lax916827.ConfigurationGraphOutput |
| 25 | |
| 26 | open Lax916827.TwoWayTransducers Lax916827.ConfigurationGraphs |
| 27 | |
| 28 | /-- The representations of reachable configuration graphs whose output lies in a |
| 29 | regular language form a regular language. -/ |
| 30 | axiom isRegular_encOutputLang {A B Q : Type} [Finite A] [Finite Q] (M : TwoWay A B Q) |
| 31 | {f : List A → List B} (hM : ∀ w, M.Computes w (f w)) {L : Language B} (hL : L.IsRegular) : |
| 32 | Language.IsRegular {u : List (CLet Q (TwoWay.Lab M)) | |
| 33 | (∃ w, u = TwoWay.enc M w) ∧ ∃ v, (TwoWay.pathTrans M).Computes u v ∧ v ∈ L} |
| 34 | |
| 35 | end Lax916827.ConfigurationGraphOutput |
| 36 |
Formalization notes
The output string of a representation is the string printed by the transducer walking along the represented path; on the representation of the graph of on it is the output of on . As in the book, the transducer is assumed to compute a total function , so that every representation has an output.
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