The syntactic semigroup of a language #
The syntactic semigroup of a language L is the quotient of the free semigroup, whose elements
are the nonempty words, by the syntactic congruence of L restricted to those words. It embeds in
the syntactic monoid, which adds to it at most the class of the empty word.
The definite, reverse definite and locally trivial pseudovarieties consist of semigroups, and
their languages are read off the syntactic semigroup. A monoid satisfying the defining condition
of any of the three is trivial, because the condition applies to the idempotent 1.
Main definitions #
Language.syntacticSemigroupCon: the syntactic congruence onFreeSemigroup α.Language.SyntacticSemigroup: the quotient semigroup.Language.toSyntacticSemigroup: the projection, as aMulHom.Language.RecognizesSemigroup: recognition of a language by a homomorphism to a semigroup.
Main results #
Language.syntacticSemigroupToMonoid_injective: the syntactic semigroup embeds in the syntactic monoid.Language.isRegular_iff_finite_syntacticSemigroup: a language is regular exactly when its syntactic semigroup is finite.Language.recognizesSemigroup_iff_ker_le: a homomorphism recognizesLexactly when its kernel refines the syntactic congruence.Language.syntacticSemigroupCon_insert_nil: adjoining the empty word leaves the syntactic semigroup unchanged.
Implementation notes #
A homomorphism η out of the free semigroup recognizes L when its extension
FreeMonoid.mapWithOne η to the free monoid does, so that the kernel characterization follows
from the one for monoids. Language.recognizesSemigroup_iff restates the condition on nonempty
words.
References #
The syntactic congruence and semigroup #
The syntactic congruence of L identifies two nonempty words when no two-sided context
distinguishes them as L-members.
Equations
- L.syntacticSemigroupCon = Con.comap ⇑FreeSemigroup.toFreeMonoid ⋯ L.syntacticCon
Instances For
The syntactic semigroup of L is the quotient of FreeSemigroup α by the syntactic
congruence.
Equations
- L.SyntacticSemigroup = L.syntacticSemigroupCon.Quotient
Instances For
The syntactic morphism of L projects FreeSemigroup α onto the syntactic semigroup.
Equations
- L.toSyntacticSemigroup = L.syntacticSemigroupCon.mkMulHom
Instances For
Relation to the syntactic monoid #
The embedding of the syntactic semigroup into the syntactic monoid sends the class of a nonempty word to its class in the monoid.
Equations
- L.syntacticSemigroupToMonoid = L.syntacticSemigroupCon.liftMulHom ((↑L.toSyntacticMonoid).comp FreeSemigroup.toFreeMonoid) ⋯
Instances For
Every element of the syntactic monoid is the class of the empty word or the image of an element of the syntactic semigroup.
Myhill–Nerode #
A language is regular exactly when its syntactic semigroup is finite.
Boolean combinations #
Quotients #
The syntactic congruence on nonempty words depends on L only through its nonempty words.
Adjoining the empty word leaves the syntactic congruence unchanged, since the congruence quantifies only over nonempty words.
Recognition by a semigroup #
η recognizes L when its unitization FreeMonoid.mapWithOne η recognizes L.
Equivalently, membership of a nonempty word in L is decided by its η-image
(recognizesSemigroup_iff).
Equations
Instances For
If η recognizes L, then η.comp ψ recognizes the inverse image of L under ψ.