Lax132576.StringHomomorphisms
String homomorphisms
concepts/Lax132576/StringHomomorphisms.lean · lax-132576
No public endorsements yet.
Loading review…
Sign in with ORCIDConcept map
Definition
A string homomorphism is a function that applies a fixed map to every letter of the input and concatenates the results; a letter may be erased or replaced by a longer string. It is a homomorphism of the free monoids, . Homomorphisms are among the prime rational functions (Theorem B.2.6), and the complement of the graph of a homomorphism is a rational relation (Claim B.1.7), which is the observation behind the undecidability of equivalence of rational relations.
Lean source view on GitHub
| 1 | import Mathlib.Data.List.Basic |
| 2 | |
| 3 | /-! |
| 4 | --- |
| 5 | title: String homomorphisms |
| 6 | type: definition |
| 7 | --- |
| 8 | A *string homomorphism* is a function that applies a fixed map |
| 9 | to every letter of the input and concatenates the results; a letter |
| 10 | may be erased or replaced by a longer string. It is a homomorphism of the free |
| 11 | monoids, . Homomorphisms are among the prime rational |
| 12 | functions (Theorem B.2.6), and the complement of the graph of a homomorphism is |
| 13 | a rational relation (Claim B.1.7), which is the observation behind the |
| 14 | undecidability of equivalence of rational relations. |
| 15 | |
| 16 | # Formalization notes |
| 17 | |
| 18 | `homOf φ` is the homomorphism determined by `φ : A → List B`. |
| 19 | -/ |
| 20 | |
| 21 | namespace Lax132576.StringHomomorphisms |
| 22 | |
| 23 | /-- The string homomorphism that applies `φ` to every letter and concatenates the |
| 24 | results. -/ |
| 25 | def homOf {A B : Type} (φ : A → List B) : List A → List B := fun w => (w.map φ).flatten |
| 26 | |
| 27 | end Lax132576.StringHomomorphisms |
| 28 |
Formalization notes
is the homomorphism determined by .
Builds on
none
From Mathlib
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