duaLab Contribute

Variety (Formal language theory)

Project: Topoi of automata

Contents

A variety of languages is a class of regular languages with good closure properties. Eilenberg's variety theorem matches these classes with classes of finite monoids. Its local version fixes the alphabet $\Sigma$, and the classes of this local version are exactly the hyperconnected quotients of one topos, the topos of orbit-finite $\Sigma$-sets.

1. Idea

There are two levels: varieties of languages over all finite alphabets, and local varieties over one alphabet $\Sigma$. The local varieties have one more description, by the hyperconnected quotients of the topos $\mathcal E_{\mathrm{of}}$ of orbit-finite $\Sigma$-sets.

$$\begin{array}{l|l|l} & \text{variety of languages} & \text{local variety}\\ \hline \text{alphabets} & \text{all finite alphabets} & \text{one alphabet }\Sigma\\ \text{Boolean operations, quotients} & \text{closed} & \text{closed}\\ \text{inverse images} & \text{closed} & \text{not required}\\ \text{monoids} & \text{variety of finite monoids} & \text{local pseudovariety}\\ \text{topos} & & \text{quotient of }\mathcal E_{\mathrm{of}} \end{array}$$

2. Definition

For a language $L\subseteq\Sigma^*$ and a word $w\in\Sigma^*$, the left and the right quotient of $L$ by $w$ are

$$w^{-1}L=\{v\in\Sigma^*\mid wv\in L\},\qquad Lw^{-1}=\{v\in\Sigma^*\mid vw\in L\}.$$

They are also called derivatives.

Definition 2.1 (Variety of languages)

A variety of languages $\mathcal V$ assigns to every finite alphabet $\Sigma$ a set $\mathcal V(\Sigma)$ of regular languages over $\Sigma$, such that for all finite alphabets $\Sigma$ and $\Gamma$:

  • the set $\mathcal V(\Sigma)$ is closed under finite unions, finite intersections and complements;
  • if $L\in\mathcal V(\Sigma)$ and $w\in\Sigma^*$, then $w^{-1}L$ and $Lw^{-1}$ belong to $\mathcal V(\Sigma)$;
  • if $L\in\mathcal V(\Sigma)$ and $\varphi:\Gamma^*\to\Sigma^*$ is a monoid homomorphism, then $\varphi^{-1}(L)$ belongs to $\mathcal V(\Gamma)$.

See Eilenberg, Automata, Languages, and Machines, Vol. B, and Pin, Varieties of Formal Languages.

Fact 2.2 (Variety theorem [Eil76])

A variety of finite monoids is a class of finite monoids closed under submonoids, quotients and finite products. For such a class $\mathbf V$, let $\mathcal V(\Sigma)$ be the set of the languages over $\Sigma$ whose syntactic monoid belongs to $\mathbf V$. Then $\mathbf V\mapsto\mathcal V$ is a bijection from the varieties of finite monoids to the varieties of languages.

See Eilenberg, Automata, Languages, and Machines, Vol. B, and Pin, Varieties of Formal Languages.

3. Local variety theorem

The local version of the variety theorem fixes the alphabet. So it drops the closure under inverse images of homomorphisms, the only condition that relates different alphabets.

Definition 3.1 (Local variety)

Fix a finite alphabet $\Sigma$. A local variety over $\Sigma$ is a set of regular languages over $\Sigma$ closed under finite unions, finite intersections, complements, and the quotients $w^{-1}L$ and $Lw^{-1}$ for $w\in\Sigma^*$.

Fact 3.2 (Local Eilenberg theorem)

Fix a finite alphabet $\Sigma$. The following complete lattices are isomorphic:

  • local varieties over $\Sigma$;
  • local pseudovarieties: sets of $\Sigma$-generated finite monoids, that is, of finite quotient monoids of $\Sigma^*$, closed under quotients and subdirect products;
  • profinite quotients of the free profinite monoid $\widehat{\Sigma^*}$;
  • semi-Galois subcategories of the semi-Galois category of finite $\Sigma$-sets.

See Gehrke, Grigorieff and Pin, §1 of Adámek, Milius, Myers and Urbat and §5.2 of Uramoto.

4. Topos-theoretic reformulation

In algebraic language theory, a language is recognized by a surjective monoid homomorphism $\Sigma^*\to M$. Such a homomorphism defines a hyperconnected quotient of the topos of $\Sigma$-sets (lemma), and recognition extends to all hyperconnected quotients; see Syntactic topos. We replace the monoids of the local Eilenberg theorem by hyperconnected quotients: the local varieties over $\Sigma$ are the hyperconnected quotients of the topos $\mathcal E_{\mathrm{of}}$ of orbit-finite $\Sigma$-sets.

Definition 4.1 (Recognition)

Fix a finite alphabet $\Sigma$, and let $(\mathcal E_{\mathrm{of}},\mathcal R)$ be the Boolean-ringed topos of regular languages. A hyperconnected quotient of $\mathcal E_{\mathrm{of}}$ recognizes a regular language $L$ when the Nerode congruence $\sim_L$ of $L$ lies in the internal filter of the local state classifier that classifies the quotient.

Lemma 4.2 (Filters of right congruences)☆

Let $\Xi$ be the local state classifier of $\Sigma$-sets, the set of the right congruences on $\Sigma^*$ with the action $\rho\cdot w$ of words. The complete lattice of hyperconnected quotients of $\mathcal E_{\mathrm{of}}$ is isomorphic to the lattice of the internal filters $F$ of $\Xi$ all of whose members have finitely many classes. The quotient that corresponds to $F$ recognizes a language $L$ if and only if ${\sim_L}\in F$.

See Theorem 4.1, Proposition 2.8 and Example 2.9 and the classifier of a hyperconnected quotient.

Lemma 4.3 (Recognized classes)☆

Let $F$ be an internal filter as in the lemma on filters, and let $V_F$ be the set of the languages $L$ with ${\sim_L}\in F$. Then $V_F$ is a local variety. Moreover, a right congruence $\rho$ with finitely many classes belongs to $F$ if and only if every class of $\rho$ belongs to $V_F$.

Proof

The members of $V_F$ are regular by the Myhill–Nerode theorem. The set $V_F$ is closed under Boolean operations and quotients, because $F$ is an internal filter and

$$\begin{gathered}{\sim_{\Sigma^*\setminus L}}={\sim_L},\qquad{\sim_{L\cap K}}\supseteq{\sim_L}\cap{\sim_K},\\ {\sim_{w^{-1}L}}={\sim_L}\cdot w,\qquad{\sim_{Lw^{-1}}}\supseteq{\sim_L}.\end{gathered}$$

For the second claim, let $C_1,\dots,C_k$ be the classes of $\rho$. Then $\rho={\sim_{C_1}}\cap\dots\cap{\sim_{C_k}}$: a right congruence is contained in $\sim_C$ for each of its classes $C$, and two words that are $\sim_{C_i}$-equivalent for all $i$ lie in the same class.

Lemma 4.4 (Classes of an intersection)☆

Let $V$ be a local variety and $L_1,\dots,L_n\in V$. Then every class of the right congruence ${\sim_{L_1}}\cap\dots\cap{\sim_{L_n}}$ belongs to $V$.

Proof

The class of a word $u$ consists of the words $u'$ such that $u'x\in L_i$ if and only if $ux\in L_i$, for all $i$ and all words $x$. So it is the intersection of the right quotients $L_ix^{-1}$ with $ux\in L_i$ and of the complements of the right quotients $L_ix^{-1}$ with $ux\notin L_i$. A regular language has only finitely many right quotients, so this is a finite Boolean combination of members of $V$.

Lemma 4.5 (Generated filter)☆

Let $V$ be a local variety, and let $F$ be the smallest internal filter of $\Xi$ that contains $\sim_L$ for every $L\in V$. Then the members of $F$ have finitely many classes, and $V_F=V$.

Proof

The right congruences with finitely many classes form an internal filter, which contains $\sim_L$ for every $L\in V$ and hence contains $F$. We have $V\subseteq V_F$ by definition. Conversely, let $K\in V_F$. Since ${\sim_L}\cdot w={\sim_{w^{-1}L}}$ and $V$ is closed under left quotients, $\sim_K$ contains ${\sim_{L_1}}\cap\dots\cap{\sim_{L_n}}$ for some $L_1,\dots,L_n\in V$. So $K$ is a finite union of classes of this intersection, and $K\in V$ by the lemma on classes.

Proposition 4.6 (Hyperconnected quotients)☆

The complete lattice of hyperconnected quotients of $\mathcal E_{\mathrm{of}}$ is isomorphic to the four lattices of the local Eilenberg theorem. The isomorphism sends a quotient to the local variety of regular languages it recognizes.

Compare p. 44 of the slides Local state classifier for algebraic language theory and p. 60 of the slides Topoi of automata.

Proof

By the lemma on filters, it suffices to show that $F\mapsto V_F$ is an isomorphism from the lattice of the filters $F$ of that lemma to the lattice of local varieties. By the lemma on recognized classes, $V_F$ is a local variety, and $F\subseteq F'$ if and only if $V_F\subseteq V_{F'}$. By the lemma on generated filters, every local variety is of the form $V_F$.

Remark 4.7 (One-sided closure)

An internal Boolean subalgebra of $\mathcal R$ is a Boolean subalgebra closed under the left quotients $L\mapsto a^{-1}L$ only. Such a subalgebra need not be a local variety. For $\Sigma=\{a,b\}$, the subalgebra $\{\varnothing,\Sigma^*,a\Sigma^*,\{\varepsilon\}\cup b\Sigma^*\}$ does not contain $(a\Sigma^*)a^{-1}=\{\varepsilon\}\cup a\Sigma^*$. The quotient it generates recognizes exactly the local variety it generates.

6. References

Last edited