Lax132576.RationalEquivalenceDecidable
Decidable equivalence of rational functions
concepts/Lax132576/RationalEquivalenceDecidable.lean · lax-132576
No public endorsements yet.
Loading review…
Sign in with ORCIDConcept map
In the paper
- page 62 of the paper of lax-157538, Transducers
Theorem
The equivalence problem is decidable for rational functions (Theorem B.3.4 of Transducers). The book reduces it to equivalence of weighted automata over the rationals (Theorem B.3.3): output strings are represented injectively by rational numbers through a weighted automaton , weighted automata are closed under pre-composition with rational functions (Lemma B.3.5), and exactly when .
Lean source view on GitHub
| 1 | import Lax132576.TransducerCodes |
| 2 | |
| 3 | /-! |
| 4 | --- |
| 5 | title: Decidable equivalence of rational functions |
| 6 | type: theorem |
| 7 | --- |
| 8 | The equivalence problem is decidable for rational functions (Theorem |
| 9 | B.3.4 of *Transducers*). The book reduces it to equivalence of weighted |
| 10 | automata over the rationals (Theorem B.3.3): output strings are represented |
| 11 | injectively by rational numbers through a weighted automaton , weighted |
| 12 | automata are closed under pre-composition with rational functions (Lemma |
| 13 | B.3.5), and exactly when . |
| 14 | |
| 15 | # Formalization notes |
| 16 | |
| 17 | The two functions are given by codes, under the promise that both codes are |
| 18 | functional (`TransducerCodes`); the decided property is equality of the coded |
| 19 | relations. The proof turns the two codes into codes of weighted automata whose |
| 20 | values are the numerical encodings of the outputs, multiplied by the numbers |
| 21 | of accepting runs, which are the same for both, and applies the decision |
| 22 | procedure of Theorem B.3.3. |
| 23 | -/ |
| 24 | |
| 25 | namespace Lax132576.RationalEquivalenceDecidable |
| 26 | |
| 27 | open Lax132576.TransducerCodes |
| 28 | |
| 29 | /-- Equivalence of two coded rational functions is decidable. -/ |
| 30 | axiom decidable_codeRel_eq : |
| 31 | DecidableUnderPromise (fun p : RelCode × RelCode => CodeFunctional p.1 ∧ CodeFunctional p.2) |
| 32 | (fun p => codeRel p.1 = codeRel p.2) |
| 33 | |
| 34 | end Lax132576.RationalEquivalenceDecidable |
| 35 |
Formalization notes
The two functions are given by codes, under the promise that both codes are functional (); the decided property is equality of the coded relations. The proof turns the two codes into codes of weighted automata whose values are the numerical encodings of the outputs, multiplied by the numbers of accepting runs, which are the same for both, and applies the decision procedure of Theorem B.3.3.
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