Documentation

Cslib.Computability.Languages.SyntacticMonoid

Syntactic monoid #

This file has two main results: (1) We define the syntactic monoid of a language l and show that l is regular if and only if its syntactic monoid is finite. (2) Using (1), we show that a language is regular if and only if it is the preimage of a subset of a finite monoid M under a monoid homomorphism from the free monoid on its alphabet to M

References #

[Holcombe1982] Holcombe, W.M.L. (1982). Algebraic automata theory. Section 5.3

Converting a (two-sided) congruence c on finite words to a congruence relation on the (multiplicative) free monoid.

Equations
Instances For
    @[reducible, inline]
    abbrev Language.SyntacticMonoid {α : Type} (l : Language α) :

    The syntactic monoid of a language l is the quotient of the free monoid by the Myhill congruence of l.

    Equations
    Instances For
      @[reducible, inline]

      The natural homomorphism from FreeMonoid α to l.SyntacticMonoid induced by the Myhill congruence of l.

      Equations
      Instances For

        A language l is regular if and only if its syntactic monoid is finite.

        The congruence induced by homSyntacticMonoid is exactly the Myhill congruence.

        theorem Language.IsRegular.exists_finite_monoid {α : Type} {l : Language α} (h : l.IsRegular) :
        ∃ (M : Type) (x : Monoid M) (_ : Finite M) (f : FreeMonoid α →* M) (s : Set M), ⇑f ∘ ⇑FreeMonoid.ofList ⁻¹' s = l

        Any regular language is the preimage of a subset of a finite monoid M under a monoid homomorphism from the free monoid on its alphabet to M.

        @[implicit_reducible]
        def Language.inducedCongr {α : Type} {M : Type u_1} [Monoid M] (f : FreeMonoid α →* M) :

        Given a monoid homomorphism f from FreeMonoid α to another monoid M, inducedCongr f is the language congruence induced by f.

        Equations
        Instances For

          The preimage of a singleton in a finite monoid M under a monoid homomorphism from the free monoid to M is regular.

          theorem Language.IsRegular.of_finite_monoid {α : Type} {M : Type u_1} [Monoid M] (f : FreeMonoid α →* M) [Finite M] (s : Set M) :

          The preimage of a subset of a finite monoid M under a monoid homomorphism from the free monoid to M is regular.

          theorem Language.IsRegular.iff_finite_monoid {α : Type} {l : Language α} :
          l.IsRegular ↔ ∃ (M : Type) (x : Monoid M) (_ : Finite M) (f : FreeMonoid α →* M) (s : Set M), ⇑f ∘ ⇑FreeMonoid.ofList ⁻¹' s = l

          A language is regular if and only if it is the preimage of a subset of a finite monoid M under a monoid homomorphism from the free monoid on its alphabet to M.