The Eilenberg correspondence as a Galois connection #
The Eilenberg variety theorem ([Eil76], [Alm95]) sets up an order isomorphism
between pseudovarieties of finite monoids and varieties of recognizable languages. This file
formalizes the easy, formal half of that correspondence: the two maps varietyToLang and
langToVariety form a Galois connection between the two preorders. The hard, content-bearing
half — that the connection is in fact an order isomorphism — is the pair of converse inequalities
left as the two staged sorrys below.
Main definitions #
Monoid.Pseudovarietyis given aPreorderby class inclusion.Monoid.Pseudovariety.generated— the smallest pseudovariety containing a class of finite monoids.Monoid.LanguageVariety— a (boolean + inverse-homomorphism) variety of recognizable languages.Monoid.varietyToLang— the language-side mapV ↦ V.langs.Monoid.langToVariety— the algebra-side map𝒱 ↦ generated by the syntactic monoids in 𝒱.
Main results #
Monoid.varietyToLang_monotone/Monoid.langToVariety_monotone— the maps are functors of the thin (preorder) categories; bundled asMonoid.varietyToLangHom/Monoid.langToVarietyHom.Monoid.eilenberg_galoisConnection— the adjunctionlangToVariety ⊣ varietyToLang.Monoid.mem_langToVariety_varietyToLang/Monoid.mem_langToVariety_varietyToLang_iff— the monoid-side round-trip (langToVariety ∘ varietyToLang = idon finite monoids), proven.Monoid.varietyToLang_langToVariety_le— the language-side round-trip, the deep half of Eilenberg's theorem, currentlysorry(see implementation notes).
Implementation notes #
LanguageVariety here is the boolean + inverse-homomorphism fragment of an Eilenberg
+variety: closure under ⊤, complement, intersection, and inverse homomorphism. The genuine
Eilenberg +variety additionally requires closure under left and right residuals u⁻¹L and Lu⁻¹;
that axiom is omitted pending a syntacticMonoid_leftQuotient division lemma (TODO). The fragment is
already enough to state and prove the Galois connection.
The two preorders are thin categories (CategoryTheory.Preorder.smallCategory); the monotone maps
above are the corresponding functors and the Galois connection is their adjunction. The monoid-side
round-trip is proven (mem_langToVariety_varietyToLang_iff); refining the Preorders to
PartialOrders and discharging the language-side round-trip (varietyToLang_langToVariety_le) would
upgrade the adjunction to the Eilenberg order isomorphism (OrderIso). A literal
CategoryTheory.Adjunction is obtainable from eilenberg_galoisConnection via mathlib's
GaloisConnection.adjunction, kept out of this order-algebra file by design.
Everything lives in a single fixed universe u: alphabets and monoids are all Type u, matching the
universe-monomorphic Pseudovariety of Linglib.Core.Algebra.Group.Pseudovariety.
Pseudovarieties are preordered by class inclusion of their (total) membership predicates.
Equations
- One or more equations did not get rendered due to their size.
The pseudovariety generated by a class S of finite monoids: the intersection of all
pseudovarieties whose finite members include everything in S. Closure under submonoid, quotient,
and product is inherited pointwise from the pseudovarieties being intersected.
Equations
- One or more equations did not get rendered due to their size.
Instances For
generated S is the least pseudovariety whose finite members include S.
A variety of recognizable languages (boolean + inverse-homomorphism fragment of an Eilenberg
+variety): a family of regular languages, over every alphabet α : Type u, closed under the full
language, complement, binary intersection, and inverse homomorphism. The residual-closure axiom of a
genuine +variety is omitted here (see the module docstring).
The languages belonging to the variety, over each alphabet.
Every member is regular.
Closed under the full language.
Closed under complement.
Closed under binary intersection.
- comap_mem {α β : Type u} {Lb : Language β} (φ : FreeMonoid α →* FreeMonoid β) : self.lang Lb → self.lang {w : List α | φ (FreeMonoid.ofList w) ∈ Lb}
Closed under inverse homomorphism.
Instances For
Language varieties are preordered by family inclusion.
Equations
- One or more equations did not get rendered due to their size.
The language-side map: a pseudovariety V goes to the variety of languages whose syntactic
monoid lies in V. Well-definedness is exactly the keystone closure theorems of Pseudovariety.langs.
Equations
- Monoid.varietyToLang V = { lang := fun {α : Type ?u.1} (L : Language α) => V.langs L, regular := ⋯, univ_mem := ⋯, compl_mem := ⋯, inf_mem := ⋯, comap_mem := ⋯ }
Instances For
The algebra-side map: a language variety 𝒱 goes to the pseudovariety generated by the
syntactic monoids of the languages in 𝒱.
Equations
- Monoid.langToVariety 𝒱 = Monoid.Pseudovariety.generated fun (M : Type ?u.1) (x : Monoid M) => ∃ (α : Type ?u.1) (L : Language α), 𝒱.lang L ∧ Nonempty (M ≃* L.syntacticMonoid)
Instances For
The Eilenberg Galois connection. langToVariety is left adjoint to varietyToLang:
langToVariety 𝒱 ≤ V ↔ 𝒱 ≤ varietyToLang V. This is the formal half of the variety theorem; the
content-bearing half is the pair of converse inequalities below.
One free composite from the Galois connection: langToVariety (varietyToLang V) ≤ V.
The other free composite: 𝒱 ≤ varietyToLang (langToVariety 𝒱).
Functoriality #
A preorder is a thin category (CategoryTheory.Preorder.smallCategory) and a functor between thin
categories is exactly a monotone map, so the two maps are functors and the Galois connection is
the adjunction langToVariety ⊣ varietyToLang. We record functoriality as Monotone and bundle
the functors as OrderHoms; both monotonicities are immediate from the Galois connection.
langToVariety is a functor of the thin category of pseudovarieties (the left adjoint).
varietyToLang is a functor of the thin category of language varieties (the right adjoint).
langToVariety bundled as an OrderHom (a functor of thin categories).
Equations
- Monoid.langToVarietyHom = { toFun := Monoid.langToVariety, monotone' := Monoid.langToVariety_monotone }
Instances For
varietyToLang bundled as an OrderHom (a functor of thin categories).
Equations
- Monoid.varietyToLangHom = { toFun := Monoid.varietyToLang, monotone' := Monoid.varietyToLang_monotone }
Instances For
Monoid-side round-trip — the "syntactic monoids generate" half of Eilenberg's variety theorem,
for finite monoids: every finite M in V lies in langToVariety (varietyToLang V). The
finiteness hypothesis is essential — V.mem is a total predicate, so V can hold of infinite
monoids that the generated variety excludes (e.g. an infinite semilattice for aperiodicVariety),
making the unrestricted V ≤ … false. Each fibre language L_m = φ⁻¹{m} of the surjection
φ : FreeMonoid M ↠ M has syntactic monoid a quotient of M (a generator), and
⨅_m syntacticCon (L_m) = ker φ, so M embeds into the finite product of those syntactic monoids.
The monoid-side round-trip as an equivalence on finite monoids: langToVariety (varietyToLang V) and V agree on finite monoids.
Language-side round-trip — the deep half of Eilenberg's variety theorem. TODO: requires
(a) the residual closure axiom omitted from LanguageVariety and (b) recognition-by-products /
projection-cylinder-language theory (absent from mathlib): every language in
varietyToLang (langToVariety 𝒱) is rebuilt from the generators of langToVariety 𝒱 using the
closure operations available in 𝒱.