Draft — mutable and not usable as a dependency; its citation marks the draft state.

Lax132576.StringHomomorphisms

String homomorphisms

concepts/Lax132576/StringHomomorphisms.lean · lax-132576

definition

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Concept map

    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A

    Definition

    A string homomorphism h:ABh : A^* \to B^* is a function that applies a fixed map ABA \to B^* 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, h(uv)=h(u)h(v)h(uv) = h(u)h(v). 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

    1import Mathlib.Data.List.Basic
    2
    3/-!
    4---
    5title: String homomorphisms
    6type: definition
    7---
    8A *string homomorphism* h:ABh : A^* \to B^* is a function that applies a fixed map
    9ABA \to B^* to every letter of the input and concatenates the results; a letter
    10may be erased or replaced by a longer string. It is a homomorphism of the free
    11monoids, h(uv)=h(u)h(v)h(uv) = h(u)h(v). Homomorphisms are among the prime rational
    12functions (Theorem B.2.6), and the complement of the graph of a homomorphism is
    13a rational relation (Claim B.1.7), which is the observation behind the
    14undecidability of equivalence of rational relations.
    15
    16# Formalization notes
    17
    18`homOf φ` is the homomorphism determined by `φ : A → List B`.
    19-/
    20
    21namespace Lax132576.StringHomomorphisms
    22
    23/-- The string homomorphism that applies `φ` to every letter and concatenates the
    24results. -/
    25def homOf {A B : Type} (φ : A → List B) : List A → List B := fun w => (w.map φ).flatten
    26
    27end Lax132576.StringHomomorphisms
    28

    Formalization notes

    homOfφhomOf φ is the homomorphism determined by φ:AListBφ : A → List B.

    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

    Loading discussion…