Lax765601.KrohnRhodes
The Krohn–Rhodes decomposition theorem
concepts/Lax765601/KrohnRhodes.lean · lax-765601
No public endorsements yet.
Loading review…
Sign in with ORCIDConcept map
In the paper
- page 20 of the paper of lax-157538, Transducers
Theorem
Every Mealy machine admits a decomposition
in which each Mealy machine is either reversible or flip-flop (Theorem A.2.2 of Transducers, the Krohn–Rhodes theorem). No uniqueness is claimed. Since Mealy machines are closed under composition, the class of functions computed by Mealy machines is exactly the closure under composition of the prime Mealy machines,
The proof of the book has two steps: map lifting is compatible with decompositions into primes (Lemma A.2.4), and the state transformation transducer of every pre-automaton is a composition of primes (Lemma A.2.5), by an induction on the number of states and the number of letters whose state transformation is not a permutation; the output of the machine is then recovered from the state transformations of the prefixes by a delay machine and a letter-to-letter homomorphism.
Lean source view on GitHub
| 1 | import Lax765601.PrimeMealyMachines |
| 2 | |
| 3 | /-! |
| 4 | --- |
| 5 | title: The Krohn–Rhodes decomposition theorem |
| 6 | type: theorem |
| 7 | --- |
| 8 | Every Mealy machine admits a decomposition |
| 9 | |
| 10 | in which each Mealy machine is either reversible or flip-flop |
| 11 | (Theorem A.2.2 of *Transducers*, the Krohn–Rhodes theorem). No uniqueness is |
| 12 | claimed. Since Mealy machines are closed under composition, the class of |
| 13 | functions computed by Mealy machines is exactly the closure under composition of |
| 14 | the prime Mealy machines, |
| 15 | |
| 16 | |
| 17 | The proof of the book has two steps: map lifting is compatible with |
| 18 | decompositions into primes (Lemma A.2.4), and the state transformation |
| 19 | transducer of every pre-automaton is a composition of primes (Lemma A.2.5), by an |
| 20 | induction on the number of states and the number of letters whose state |
| 21 | transformation is not a permutation; the output of the machine is then recovered |
| 22 | from the state transformations of the prefixes by a delay machine and a |
| 23 | letter-to-letter homomorphism. |
| 24 | |
| 25 | # Formalization notes |
| 26 | |
| 27 | The conclusion is membership in the composition closure of the family of prime |
| 28 | Mealy machines, `CompClosure PrimeMealyFam`, with finite intermediate alphabets |
| 29 | built into the closure. Both alphabets are assumed finite, as in the book, where |
| 30 | finiteness of the input alphabet is what the induction on the number of letters |
| 31 | uses. The converse inclusion, that a composition of primes is computed by a |
| 32 | Mealy machine, is closure under composition (Theorem A.1.3) and is not part of |
| 33 | this statement. |
| 34 | -/ |
| 35 | |
| 36 | namespace Lax765601.KrohnRhodes |
| 37 | |
| 38 | open Lax765601.MealyMachine Lax765601.CompositionClosure Lax765601.PrimeMealyMachines |
| 39 | |
| 40 | /-- Every function computed by a Mealy machine is a composition of reversible and |
| 41 | flip-flop Mealy machines. -/ |
| 42 | axiom compClosure_primeMealy_of_isMealy {A B : Type} [Finite A] [Finite B] |
| 43 | {f : List A → List B} (hf : IsMealy f) : CompClosure PrimeMealyFam A B f |
| 44 | |
| 45 | end Lax765601.KrohnRhodes |
| 46 |
Formalization notes
The conclusion is membership in the composition closure of the family of prime Mealy machines, , with finite intermediate alphabets built into the closure. Both alphabets are assumed finite, as in the book, where finiteness of the input alphabet is what the induction on the number of letters uses. The converse inclusion, that a composition of primes is computed by a Mealy machine, is closure under composition (Theorem A.1.3) and is not part of this statement.
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