Lax132576.WeightedEquivalenceDecidable
Decidable equivalence of weighted automata over the rationals
concepts/Lax132576/WeightedEquivalenceDecidable.lean · lax-132576
No public endorsements yet.
Loading review…
Sign in with ORCIDConcept map
In the paper
- page 61 of the paper of lax-157538, Transducers
Theorem
Given two weighted automata over the field of rationals, it is decidable whether they compute the same function (Theorem B.3.3 of Transducers, Schützenberger). The book proves it through linear representations: the difference of the two automata is a weighted automaton, and by Schützenberger's rank argument it is zero on all inputs as soon as it is zero on the inputs of length less than its dimension, a finite check. The same proof works for any field whose elements are finitely representable and whose operations are computable.
Lean source view on GitHub
| 1 | import Lax132576.TransducerCodes |
| 2 | import Lax132576.WeightedCodes |
| 3 | |
| 4 | /-! |
| 5 | --- |
| 6 | title: Decidable equivalence of weighted automata over the rationals |
| 7 | type: theorem |
| 8 | --- |
| 9 | Given two weighted automata over the field of rationals, it is decidable |
| 10 | whether they compute the same function (Theorem B.3.3 of *Transducers*, |
| 11 | Schützenberger). The book proves it through linear representations: the |
| 12 | difference of the two automata is a weighted automaton, and by Schützenberger's |
| 13 | rank argument it is zero on all inputs as soon as it is zero on the inputs of |
| 14 | length less than its dimension, a finite check. The same proof works for any |
| 15 | field whose elements are finitely representable and whose operations are |
| 16 | computable. |
| 17 | |
| 18 | # Formalization notes |
| 19 | |
| 20 | The automata are given by codes (`WeightedCodes`), the promise is that both |
| 21 | codes are valid, and the decided property is equality of the two computed |
| 22 | functions on all of `ℕ*`; decidability is `DecidableUnderPromise` of |
| 23 | `TransducerCodes`. The decision procedure combines the effective form of |
| 24 | Schützenberger's bound with a primitive recursive evaluation of a coded |
| 25 | automaton on a string, both developed in the proof package. |
| 26 | -/ |
| 27 | |
| 28 | namespace Lax132576.WeightedEquivalenceDecidable |
| 29 | |
| 30 | open Lax132576.TransducerCodes Lax132576.WeightedCodes |
| 31 | |
| 32 | /-- Equivalence of two valid coded weighted automata over `ℚ` is decidable. -/ |
| 33 | axiom decidable_wcodeEval_eq : |
| 34 | DecidableUnderPromise (fun p : WCode × WCode => WCodeValid p.1 ∧ WCodeValid p.2) |
| 35 | (fun p => wcodeEval p.1 = wcodeEval p.2) |
| 36 | |
| 37 | end Lax132576.WeightedEquivalenceDecidable |
| 38 |
Formalization notes
The automata are given by codes (), the promise is that both codes are valid, and the decided property is equality of the two computed functions on all of ; decidability is of . The decision procedure combines the effective form of Schützenberger's bound with a primitive recursive evaluation of a coded automaton on a string, both developed in the proof package.
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