Lax132576.LengthPreservingDecidable
Deciding length preservation of a rational function
concepts/Lax132576/LengthPreservingDecidable.lean · lax-132576
No public endorsements yet.
Loading review…
Sign in with ORCIDConcept map
In the paper
- page 66 of the paper of lax-157538, Transducers
Theorem
One can decide whether a given rational function is length preserving (Lemma B.4.3 of Transducers). The book's direct argument computes the unique candidate typing of the automaton — the difference between output and input length of the runs reaching each state — and checks that every transition respects it and that accepting states have type zero (Claim B.4.4).
Lean source view on GitHub
| 1 | import Lax132576.TransducerCodes |
| 2 | |
| 3 | /-! |
| 4 | --- |
| 5 | title: Deciding length preservation of a rational function |
| 6 | type: theorem |
| 7 | --- |
| 8 | One can decide whether a given rational function is length preserving (Lemma |
| 9 | B.4.3 of *Transducers*). The book's direct argument computes the unique |
| 10 | candidate typing of the automaton — the difference |
| 11 | between output and input length of the runs reaching each state — and checks |
| 12 | that every transition respects it and that accepting states have type zero |
| 13 | (Claim B.4.4). |
| 14 | |
| 15 | # Formalization notes |
| 16 | |
| 17 | The decided property, that every output of the coded relation has the length |
| 18 | of its input, is meaningful for every code, so the decision procedure is |
| 19 | correct for every code; the promise that the code is functional is kept for |
| 20 | uniformity with the other decidability statements. The procedure of the proof |
| 21 | enumerates the transition sequences of length at most three times the number of |
| 22 | states and checks the accepting ones, a pumping argument showing the bound |
| 23 | sufficient. |
| 24 | -/ |
| 25 | |
| 26 | namespace Lax132576.LengthPreservingDecidable |
| 27 | |
| 28 | open Lax132576.TransducerCodes |
| 29 | |
| 30 | /-- Length preservation of a coded rational function is decidable. -/ |
| 31 | axiom decidable_lengthPreserving : |
| 32 | DecidableUnderPromise CodeFunctional |
| 33 | (fun c => ∀ w v, codeRel c w v → v.length = w.length) |
| 34 | |
| 35 | end Lax132576.LengthPreservingDecidable |
| 36 |
Formalization notes
The decided property, that every output of the coded relation has the length of its input, is meaningful for every code, so the decision procedure is correct for every code; the promise that the code is functional is kept for uniformity with the other decidability statements. The procedure of the proof enumerates the transition sequences of length at most three times the number of states and checks the accepting ones, a pumping argument showing the bound sufficient.
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