$S$ is closed under left and right derivatives. That is, for every $L\in S$
and $x\in X$, ${}_{x}L,L_{x}\in S$.

  2. ii)

$S$ is closed under morphic preimages. That is, for every homomorphism of
monoids $h:X^{*}\to X^{*}$ and $L\in S$, we have that $L\circ h\in S$.∎

###  4.2. Eilenberg–type correspondences for local pseudovarieties of
$\mathsf{T}$–algebras

In this subsection, we provide an abstract Eilenberg–type correspondence for
local pseudovarieties of $\mathsf{T}$–algebras. In order to do this, we first
provide a local version of Birkhoff’s theorem for finite
$\mathsf{T}$–algebras.

We fix a complete concrete category $\mathcal{D}$ such that its forgetful
functor preserves epis, monos and products, a monad $\mathsf{T}=(T,\eta,\mu)$
on $\mathcal{D}$, $X\in\mathcal{D}$ and a factorization system
$\mathscr{E}/\mathscr{M}$ on $\mathcal{D}$. We will need the following
assumptions:

  1. (bf1)

The factorization system $\mathscr{E}/\mathscr{M}$ is proper.

  2. (bf2)

The free $\mathsf{T}$–algebra $\mathbf{TX}=(TX,\mu_{X})$ is projective with
respect to $\mathscr{E}$ in $\operatorname{Alg}(\mathsf{T})$.

  3. (bf3)

$T$ preserves morphisms in $\mathscr{E}$.

Let $\mathcal{D}$ be a concrete category such that its forgetful functor
preserves epis and monos, $\mathsf{T}$ a monad on $\mathcal{D}$,
$X\in\mathcal{D}$ and $\mathscr{E}/\mathscr{M}$ a factorization system on
$\mathcal{D}$. Assume (bf1) and (bf3). A local pseudoequational
$\mathsf{T}$–theory on $X$ is a nonempty collection $\mathtt{P}_{X}$ of
$\mathsf{T}$–algebra morphisms in $\mathscr{E}$ with domain $\mathbf{TX}$ and
finite codomain such that:

  1. i)

For every finite set $I$ and $f_{i}\in\mathtt{P}_{X}$, $i\in I$, there exists
$f\in\mathtt{P}_{X}$ such that $f_{i}$ factors through $f$, $i\in I$.

  2. ii)

For every $e\in\mathtt{P}_{X}$ with codomain $\mathbf{A}$ and every
$\mathsf{T}$–algebra morphism $e^{\prime}\in\mathscr{E}$ with domain
$\mathbf{A}$ we have that $e^{\prime}\circ e\in\mathtt{P}_{X}$.

  3. iii)

For every $f\in\mathtt{P}_{X}$ and
$h\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{TX})$ we have that
$e_{f\circ h}\in\mathtt{P}_{X}$ where $f\circ h=m_{f\circ h}\circ e_{f\circ
h}$ is the factorization of $f\circ h$.

Given an $X$–generated algebra
$\mathbf{A}\in\operatorname{Alg}_{f}(\mathsf{T})$, we say that $\mathbf{A}$
satisfies $\mathtt{P}_{X}$, denoted as $\mathbf{A}\models\mathtt{P}_{X}$, if
every $f\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{A})$ factors
through some morphism in $\mathtt{P}_{X}$. We denote by
$\operatorname{Mod}_{f}(\mathtt{P}_{X})$ the finite $X$–generated models of
$\mathtt{P}_{X}$, that is:

$\operatorname{Mod}_{f}(\mathtt{P}_{X}):=\\{\mathbf{A}\in\operatorname{Alg}_{f}(\mathsf{T})\mid\text{$\mathbf{A}$
is $X$--generated and }\mathbf{A}\models\mathtt{P}_{X}\\}.$

A class $K$ of finite $X$–generated $\mathsf{T}$–algebras is defined by
$\mathtt{P}_{X}$ if $K=\operatorname{Mod}_{f}(\mathtt{P}_{X})$.

Let $\mathcal{D}$ be a complete concrete category, $\mathsf{T}$ a monad on
$\mathcal{D}$, $\mathscr{E}/\mathscr{M}$ a factorization system on
$\mathcal{D}$ and $X\in\mathcal{D}$ a finite object. A class $K$ of finite
$X$–generated algebras in $\operatorname{Alg}(\mathsf{T})$ is called a local
pseudovariety of $X$–generated $\mathsf{T}$–algebras  if it is closed under
$\mathscr{E}$–quotients, $X$–generated $\mathscr{M}$–subalgebras and finite
subdirect products.

######  Theorem 7 (Local Birkhoff’s Theorem for finite $\mathsf{T}$–algebras).

Let $\mathcal{D}$ be a concrete complete category such that its forgetful
functor preserves epis, monos and products, $\mathsf{T}$ a monad on
$\mathcal{D}$, $X\in\mathcal{D}$ and $\mathscr{E}/\mathscr{M}$ a factorization
system on $\mathcal{D}$. Assume (bf1) to (bf3). Then a class $K$ of finite
$X$–generated $\mathsf{T}$–algebras is a local pseudovariety of $X$–generated
$\mathsf{T}$–algebras if and only if is defined by a local pseudoequational
$\mathsf{T}$–theory on $X$. Additionally, local pseudovarieties of
$X$–generated $\mathsf{T}$–algebras are in one–to–one correspondence with
local pseudoequational $\mathsf{T}$–theories on $X$.∎

Let $\mathcal{C}$ be a concrete category such that its forgetful functor
preserves monos, $\mathsf{B}$ a comonad on $\mathcal{C}$, $Y\in\mathcal{C}$
and $\mathscr{E}/\mathscr{M}$ a factorization system on $\mathcal{C}$. Assume
(bf1) and that $B$ preserves the morphisms in $\mathscr{M}$. A local
pseudocoequational $\mathsf{B}$–theory on $Y$ is a nonempty collection
$\mathtt{R}_{Y}$ of $\mathsf{B}$–coalgebra morphisms in $\mathscr{M}$ with
codomain $\mathbf{BY}$ and finite codomain such that:

  1. i)

For every finite set $I$ and $f_{i}\in\mathtt{R}_{Y}$, $i\in I$, there exists
$f\in\mathtt{R}_{Y}$ such that $f_{i}$ factors through $f$, $i\in I$.

  2. ii)

For every $m\in\mathtt{R}_{Y}$ with domain $\mathbf{A}$ and every
$\mathsf{B}$–coalgebra morphism $m^{\prime}\in\mathscr{M}$ with codomain
$\mathbf{A}$ we have that $m\circ m^{\prime}\in\mathtt{R}_{Y}$.

  3. iii)

For every $f\in\mathtt{R}_{Y}$ and
$h\in\operatorname{Coalg}(\mathsf{T})(\mathbf{BY},\mathbf{BY})$ we have that
$m_{h\circ f}\in\mathtt{R}_{Y}$ where $h\circ f=m_{h\circ f}\circ e_{h\circ
f}$ is the factorization of $h\circ f$.

With the previous definition, Theorem 7 and duality, we have the following.

######  Proposition 8 (Abstract Eilenberg–type correspondence for
pseudovarieties of $X$–generated $\mathsf{T}$–algebras).

Let $\mathcal{D}$ be a complete category, $\mathsf{T}$ a monad on
$\mathcal{D}$, $\mathscr{E}/\mathscr{M}$ a factorization system on
$\mathcal{D}$ and $X\in\mathcal{D}$. Assume (bf1) to (bf3). Let $\mathcal{C}$
be a category that is dual to $\mathcal{D}$, $Y$ the corresponding dual object
of $X$ and let $\mathsf{B}$ be the comonad on $\mathcal{C}$ that is dual to
$\mathsf{T}$ which is defined as in Proposition 1. Then there is a one–to–one
correspondence between local varieties of $X$–generated $\mathsf{T}$–algebras
and local coequational $\mathsf{B}$–theories on $Y$.

######  Example 4.2.

By fixing an object $X\in\mathcal{D}_{0}$, we can get corresponding local
versions of the Eilenberg–type correspondences showed in subsection 3.2 for
pseudovarieties of $X$–generated $\mathsf{T}$–algebras. For example, the local
version of (1) in Example 3.8 reads as follows: There is a one–to–one
correspondence between pseudovarieties of $X$–generated monoids and Boolean
algebras $\mathbf{S}$ that are subalgebras of the complete atomic Boolean
algebra $\operatorname{\mathtt{Set}}(X^{*},2)$ such that:

  1. i)

Every element in $S$ is a recognizable language on $X$.

  2. ii)

$S$ is closed under left and right derivatives. That is, for every $L\in S$
and $x\in X$, ${}_{x}L,L_{x}\in S$.

  3. iii)

$S$ is closed under morphic preimages. That is, for every homomorphism of
monoids $h:X^{*}\to X^{*}$ and $L\in S$, we have that $L\circ h\in S$.∎

##  5\. Conclusions

We proved that Eilenberg–type correspondences = Birkhoff’s theorem for
(finite) algebras + duality. The main contribution of the present paper was to
realize that the concept of a “variety of languages” that is used in
Eilenberg–type correspondences corresponds to the dual of the
(pseudo)equational theory that defines the (pseudo)variety of algebras, which
was conjectured by the author in [33]. This not only allows us to understand
where “varieties of languages” come from but also to get an abstract and
general result that encompasses both existing and new Eilenberg–type
correspondences.

Our algebras of interest are $\mathsf{T}$–algebras, where $\mathsf{T}$ is a
monad on a category $\mathcal{D}$. We stated and proved, under mild
assumptions, categorical versions of Birkhoff’s theorem for
$\mathsf{T}$–algebras and Birkhoff’s theorem for finite $\mathsf{T}$–algebras,
the latter also known as Reiterman’s theorem for $\mathsf{T}$–algebras. In
order to get Eilenberg–type correspondences we stated Birkhoff’s theorem for
(finite) $\mathsf{T}$–algebras as a one–to–one correspondence between
(pseudo)varieties of $\mathsf{T}$–algebras and (pseudo)equational
$\mathsf{T}$–theories. The previous observation led us to define the notion of
a (pseudo)equational $\mathsf{T}$–theory, i.e., collections of
“(pseudo)equations” that are deductively closed. The proof of Birkhoff’s
theorem for $\mathsf{T}$–algebras is obtained from [9]. On the other hand, the
proof of Birkhoff’s theorem for finite $\mathsf{T}$–algebras follows the
general idea used by the author in [33] to prove a general Eilenberg–type
correspondence and the idea that pseudovarieties of algebras are exactly
directed unions of equational classes of finite algebras [8, Proposition 4].
It is worth mentioning that the proof of Birkhoff’s theorem for finite
algebras in the present paper has the advantage of avoiding topological and
profinite techniques, which are usually used to prove this theorem. This help
us to understand the proof of Birkhoff’s theorem for finite algebras in a more
basic setting.

Once we stated our categorical versions of Birkhoff’s theorem and Birkhoff’s
theorem for finite algebras, with the use of duality, we stated our abstract
Eilenberg–type correspondence theorems for varieties and pseudovarieties of
$\mathsf{T}$–algebras. Then, in a similar way, in Section 4, we derived
corresponding local versions of Birkhoff’s theorem for (finite) $X$–generated
$\mathsf{T}$–algebras and their corresponding Eilenberg–type correspondences.
These local versions can be seen as particular instances of the previous work
in which the category $\mathcal{D}_{0}$ has only one object, say $X$. Proofs
are made in a similar way by restricting the kind of algebras to $X$–generated
$\mathsf{T}$–algebras. Thus the closure properties for local (pseudo)varieties
are closure under $\mathscr{E}$–quotients, $X$–generated
$\mathscr{M}$–subalgebras and (finite) subdirect products.

From our abstract Eilenberg–type correspondence theorems we derived both
existing and new Eilenberg–type correspondences, including the ones in the
following table:

Eilenberg–type correspondence for… |  Pseudovariety version |  Local pseudovariety version |  Variety version |  Local variety version
---|---|---|---|---
Semigroups |  [18, Thm. 34s] (Ex. 3.8 (2)) |  [22] (Ex. 4.2) |  Ex. 2.6 (1) |  Ex. 4.1
Ordered semigroups |  [28] (Ex. 3.10) |  [22] (Ex. 4.2) |  Ex. 2.8 |  Ex. 4.1
Monoids |  [18, Thm. 34] (Ex. 3.8 (1)) |  [22] (Ex. 4.2) |  [7, Thm. 39] (Ex. 2.4) |  Ex. 4.1
Ordered monoids |  [28] (Ex. 3.10) |  [22] (Ex. 4.2) |  Ex. 2.8 |  Ex. 4.1
Groups |  Ex. 3.8 (3) |  Ex. 4.2 |  Ex. 2.6 (2) |  Ex. 4.1
Ordered groups |  Ex. 3.10 |  Ex. 4.2 |  Ex. 2.8 |  Ex. 4.1
Monoid actions (dynamical systems) |  Ex. 3.8 (4) |  Ex. 4.2 |  Ex. 2.6 (3) |  Ex. 4.1
Semigroups with infinite exponentiation |  cf. [37] (Ex. 3.8 (5)) |  cf. [36, Thm. 6.3] (Ex. 4.2) |  Ex. 2.6 (4) |  Ex. 4.1
$\mathbb{K}$–algebras for a finite field $\mathbb{K}$ |  [31] (Ex. 3.11) |  [3] for $\mathbb{K}=\mathbb{Z}_{2}$ (Ex. 4.2) |  Ex. 2.9 |  Ex. 4.1
Idempotent semirings |  [29] (Ex. 3.12) |  [3] (Ex. 4.2) |  Ex. 2.10 |  Ex. 4.1
Algebras of type $\operatorname{\tau}$ in a variety |  Ex. 3.6 |  Ex. 4.2 |  Ex. 2.5 |  Ex. 4.1
Ordered algebras of type $\operatorname{\tau}$ in a variety |  Ex. 3.9 |  Ex. 4.2 |  Ex. 2.7 |  Ex. 4.1

###  5.1. Related work:

We will discuss some of the related work of this paper.

Birkhoff’s theorem: We discuss categorical approaches for Birkhoff’s theorem
such as [5, 9, 10]. The main purpose of the present paper was to prove
abstract Eilenberg–type correspondences which, in the case of varieties of
$\mathsf{T}$–algebras, led us to state a Birkhoff’s theorem for
$\mathsf{T}$–algebras in which every variety is defined by a unique collection
of equations and vice versa. This version is obtained from [9] after defining
the right notion of an equational $\mathsf{T}$–theory. In [5], the defining
properties for a variety are taken with respect to the factorization system
$\mathscr{E}/\mathscr{M}$ where $\mathscr{E}=$ regular epi and $\mathscr{M}=$
mono, [5, Definition 2.1 and 2.2]. In approaches such as [5, 9] the morphisms
that represent equations are epimorphisms with projective domain, which is
stated in condition (B2), and there is also the requirement of having enough
projectives, which is implied by conditions (B2) and (B3). In [10], they work
also with $\mathsf{T}$–algebras and a factorization system
$\mathscr{E}/\mathscr{M}$ on $\operatorname{Alg}(\mathsf{T})$. In the present
paper, the factorization system $\mathscr{E}/\mathscr{M}$ is on $\mathcal{D}$
which, under conditions (B1) and (B4), is lifted to
$\operatorname{Alg}(\mathsf{T})$, but not every factorization system on
$\operatorname{Alg}(\mathsf{T})$ is induced by one on the base category
$\mathcal{D}$ (e.g., on $\operatorname{\mathtt{Set}}$ there is no
factorization system that corresponds in any way to epimorphisms in the
categories of monoids or of rings). In [10], the defining properties of a
variety are closure under $U$–split quotients, $\mathscr{M}$–subalgebras and
products, where $U:\operatorname{Alg}(\mathsf{T})\to\mathcal{D}$ is the
forgetful functor.

Birkhoff’s theorem for finite algebras: Birkhoff’s theorem for finite
algebras, which is also known as Reiterman’s theorem [30], has been
generalized in [8, 17]. The approach in [30] was to consider implicit
operations. Implicit operations generalize the notion of terms. Equations
given by implicit operations are the kind of equations that define
pseudovarieties. The proof given in [30] involves the use of topology in which
the set of $n$–ary implicit operations is the completion of the set of $n$–ary
terms. In [8], a topological approach is also considered by using
uniformities, and it is also shown that pseudovarieties are exactly directed
unions of equational classes of finite algebras [8, Proposition 4]. In [17], a
categorical approach is considered to prove a Reiterman’s theorem for
$\mathsf{T}$–algebras, this is done by using profinite techniques to define
the notion of profinite equation which are the kind of equations that allow to
define and characterize pseudovarieties. In [17], for a given monad
$\mathsf{T}$ on $\mathcal{D}$ they define the profinite monad
$\widehat{\mathsf{T}}$ on the profinite completion $\widehat{\mathcal{D}}$ of
the category $\mathcal{D}_{f}$ which is done by using limits (in fact, right
Kan extensions). The approach in the present paper do not use topological nor
profinite techniques, and it is based in the fact that pseudovarieties are
exactly directed unions of equational classes of finite algebras, see [8,
Proposition 4] and [6, 19]. Nevertheless, profinite and topological techniques
can be easily brought to the scene in the present paper if we identify the
family of morphisms $\operatorname{\mathtt{P}}(X)$ by its limit, where
$\operatorname{\mathtt{P}}$ is a pseudoequational $\mathsf{T}$–theory. This
would have led us to deal with profinite completions and topological spaces,
in particular, profinite monoids, Stone spaces and Stone duality. We prefer to
avoid this approach for the following reasons:

  1. a)

Make the present work more accessible to some readers.

  2. b)

To present a different approach without using topology and profinite
techniques.

  3. c)

Eilenberg–type correspondences deal with pseudocoequational theories rather
than its dual, i.e., pseudoequational theories.

Categorical Eilenberg–type correspondences: There are some categorical
approaches for Eilenberg–type correspondences in the literature such as [2,
14, 33, 36]. In [2, 14, 36] only pseudovarieties are considered, i.e., all the
algebras are finite, while in [33] as well as in the present paper we can also
consider varieties of algebras. In this respect, Eilenberg–type
correspondences such as [7, Theorem 39] or the ones derived in examples of
subsection 2.2 cannot be derived from [2, 14, 36]. The work in [36] subsumes
the work made in [2, 14]. The main setting in [2, 36] is to consider predual
categories, i.e., categories that are dual on finite objects. The main purpose
of this preduality is to define pseudovarieties of algebras on one category
and varieties of languages on the other one. In [14], no duality is involved.
The definition of varieties of languages given in [14] is restricted in the
sense that it is always a Boolean algebra, which in our present paper reduces
to consider $\mathcal{D}=\operatorname{\mathtt{Set}}$,
$\mathcal{D}_{0}=\operatorname{\mathtt{Set}}_{f}^{S}$,
$\mathcal{C}=\operatorname{\mathtt{CABA}}$ and
$\mathcal{C}_{0}=\operatorname{\mathtt{CABA}}_{f}^{S}$, where $S$ is a fixed
set. Eilenbeg–type correspondences such as [28, 31] cannot be derived from
[14]. In [2], all the algebras considered have a monoid structure which
restricts the kind of algebras one can consider, e.g., a semigroup version of
Eilenberg’s theorem [18, Theorem 34s] cannot be derived from [2]. Those
previous two limitations in the kind of varieties of languages and the kind of
algebras one can consider are overcome in [33, 36] as well as in the present
paper by considering algebras for a monad $\mathsf{T}$, which is the main idea
in [14]. In [36], the preduality considered as its main setting is lifted,
under mild assumptions, to a full duality between one of the categories and
the profinite completion of the other one. From this profinite completion, the
concept of profinite equations is defined which are the kind of equations that
define pseudovarieties of algebras. On the other hand, the definition of
“varieties of languages” given in [36] depends on finding a “unary
representation” which is a set of unary operations on a free algebra
satisfying certain properties [36, Definition 37] and requires non–trivial
work. From this unary representation they construct syntactic algebras and
define the kind of derivatives that define a variety of languages. In [33] as
well as in the present paper, the use of derivatives is not explicitely made
which is captured in a more transparent and categorical way by using
coalgebras, from this, the righ notion of derivatives easily follows by using
duality and the defining properties of a $\mathsf{T}$–algebra (epi)morphism
(see, e.g., Example 2.4). The coalgebraic approach used in the present paper
gave us the advantage to obtain what we called an abstract Eilenberg–type
correspondence in which the concept of “variety of languages” is the one of
being a (pseudo)coequational $\mathsf{B}$–theory, whose definition does not
depend on finding the right notion of derivatives, contrary to [2, 14, 36],
and does not depend on the existence of syntactic algebras, contrary to [14,
36]. Also, requirements considered in [36] such as existence of “unary
representations” or the fact that $\mathcal{D}$ and $\mathcal{C}$ are dual on
finite objects are not needed to state our abstract Eilenberg–type
correspondences. Nevertheless, in specific applications such as, e.g., Example
3.6, the fact that the functor $\operatorname{\mathtt{Set}}(\underline{\ \
},2)$, which is part of the duality between $\operatorname{\mathtt{Set}}$ and
$\operatorname{\mathtt{CABA}}$, preserves finite objects allowed us to
identify the dual of the family $\operatorname{\mathtt{P}}(X)$ with the
Boolean algebra
$\operatorname{\mathscr{L}}_{\operatorname{\mathtt{P}}}(X):=\bigcup_{e\in\operatorname{\mathtt{P}}(X)}\operatorname{Im}(\operatorname{\mathtt{Set}}(e,2))$.
But again, the fact that $\mathcal{C}$ and $\mathcal{D}$ are dual on finite
objects does not play any role in our abstract Eilenberg–type correspondence.

The work in the present paper subsumes the work made by the author in [33]
from which most of the ideas presented in this paper were obtained. The main
idea of considering “varieties of languages” as coequations was initially made
in [33, Proposition 12] which was the starting point to suspect that
“varieties of languages” are exactly duals of equational theories. With this
in mind, the main work was focused on finding a proper definition of a
(pseudo)equational theory and state categorical versions of Birkhoff’s theorem
and Birkhoff’s theorem for finite $\mathsf{T}$–algebras to get one–to–one
correspondences between (pseudo)varieties of $\mathsf{T}$–algebras and
(pseudo)equational $\mathsf{T}$–theories. As a consequence, we now clearly
understand where “varieties of languages” come from and how to derive and find
their defining properties in each particular case, e.g., derivatives come from
the properties that characterize a $\mathsf{T}$–algebra (epi)morphism and
closure under morphic preimages, which is a property that it is always
present, comes from the substitution property in a (pseudo)equational theory.

The use of duality: Related work such as [21, 22, 23] have influenced and
motivated the use of duality in language theory to characterize recognizable
languages and to derive local versions of Eilenberg–type correspondences. In
fact, in this paper we show that duality is an ingredient to obtain (abstract)
Eilenberg–type correspondences. The most important aspect of this is in each
concrete case of an Eilenberg–type correspondence, in which, by using the
interaction between algebra and coalgebra and equations and coequations, one
can easily find the right notion of derivatives as shown in the examples.
Previous categorical approaches for Eilenberg–type correspondences such as [2,
14, 33, 36] have used duality, either explicitely or implicitely, but the fact
that the dual of a pseudovariety of languages is exactly the pseudoequational
theory that defines the given pseudovariety of algebras has not been brought
to light to derive and understand Eilenberg–type correspondences. For
instance:

  1. i)

None of the other categorical approaches to derive Eilenberg–type
correspondences relates the dual of a (pseudo)variety of languages with a
(pseudo)equational theory or equations to obtain the defining properties of a
(pseudo)variety of languages.

  2. ii)

Derivatives are not directly obtained via duality in [2, 14, 36], no
interaction between algebra and coalgebra or equations and coequations.

  3. iii)

Approaches such as [2, 36] require that the categories $\mathcal{C}_{f}$ and
$\mathcal{D}_{f}$ are dual in order to obtain an Eilenberg–type
correspondence, which in our abstract Eilenberg–type correspondence theorem is
not necessary.

It’s is worth mentioning that some of the aspects of this paper have been
previously studied, either implicitely or explicitely, in relation with
Eilenberg–type correspondences. In fact:

  1. i)

In [20, Section 4], it is mentioned, for the concrete case of monoids, that
the dual of a “local variety of languages” will induce a set of (in)equations.
In the present paper, this is seen in Example 4.2 for the free (ordered)
monoid monad on $\operatorname{\mathtt{Set}}$
($\operatorname{\mathtt{Poset}}$).

  2. ii)

In [21], recognizable subsets of an algebra with a single binary operation are
studied, which in the present paper is the case of the local version of
Example 3.6 for the type of algebras $\operatorname{\tau}^{\prime}$ which
consists of a single binary operation. In fact, “closure under residuals
w.r.t. singleton denominators” in [21] is the same as closure under
derivatives with respect to $\operatorname{\tau}^{\prime}$ in the sense of
Example 3.6.

  3. iii)

The duality between equations and coequations in the context of an
Eilenberg–type correspondence is studied for the first time in [7]. There, the
“varieties of languages” considered have a closure property which is defined
in terms of coequations [7, Definition 40].

  4. iv)

The treatment of “varieties of languages” as sets of coequations was
considered in [33, Proposition 2]. There, in the conclusions, was also
conjectured that “varieties of languages” are exactly (pseudo)coequational
theories and their dual are the defining (pseudo)equational theories for the
(pseudo)varieties of algebras.

Syntactic algebras: Another important observation and conclusion of the
present paper is about the use of syntactic algebras. In Eilenberg’s original
proof [18, Theorem 34] the use of syntactic monoids (semigroups) [18, VII.1]
helped to prove his theorem. As in Eilenberg’s proof, the use of syntactic
algebras was also used in [14, 28, 29, 31, 36, 33] for establishing
Eilenberg–type correspondences. Categorical approaches such as [14, 33, 36]
generalized the concept of syntactic algebra. In [14, 36] syntactic algebras
are obtained, under mild assumptions, by means of a congruence, while in [33]
are obtained by using generalized pushouts, under the condition that $T$
preserves weak generalized pushouts. As we saw in the present paper, the use
of syntactic algebras is not needed in order to establish abstract
Eilenberg–type correspondences. Nonetheless, the study of syntactic algebras
has their own importance in language theory and categorical generalizations of
them such as [14, 33, 36] might deserve a further study.

###  5.2. Future work:

Some of the future work that can be done based on the work presented in this
paper include the following:

  1. i)

The relation of equational $\mathsf{T}$–theories with monad morphisms
$\alpha:\mathsf{T}\to\mathsf{S}$ as in [10].

  2. ii)

To find new Eilenberg–type correspondences as an application of our abstract
(local) Eilenberg–type theorem for (pseudo)varieties of $\mathsf{T}$–algebras.

  3. iii)

To study Eilenberg–type correspondences for other classes of algebras, e.g.,
Eilenberg–type correspondences for quasivarieties. Which can be made by
modifying the notion of an equational theory given in the present paper by
allowing $\mathsf{T}$–algebra morphisms with arbitrary domain (not necessarily
a free one) see, e.g., [9].

  4. iv)

To find applications of the Eilenberg–type correspondences we can derive from
the present paper. One example of this could be to characterize the
(pseudo)equational $\mathsf{B}$–theory that defines a particular
(pseudo)variety of $\mathsf{T}$–algebras. This kind of problem has been
studied before in which the pseudovariety of aperiodic monoids is defined by
the variety of languages in which every language is star–free [35].

  5. v)

The study and applications of the dual theorems in this paper. That is,
coBirkhoff’s theorem [5, 25, 26], coReiterman’s theorem and a new subject that
we can call coEilenberg–type correspondences which are naturally defined as
one–to–one correspondences between (pseudo)covarieties of
$\mathsf{B}$–coalgebras and (pseudo)equational $\mathsf{T}$–theories.

  6. vi)

To develop and study a general theory for syntactic algebras. As we mentioned,
syntactic algebras are not used in the present paper to establish abstract
Eilenberg–type correspondences. In a previous research made by the author in
[33], to prove a general Eilenberg–type theorem, syntactic algebras were also
considered and constructed abstractly as a generalized pushout [33,
Proposition 10]. General syntactic algebras were also considered and
constructed in [14, 36].

## Acknowledgements

I would like to thank Marcello Bonsangue, Jan Rutten and Alexander Kurz for
their support, comments, and suggestions during the writing of this paper. I
thank Henning Urbat, Jiří Adámek, Liang–Ting Chen and Stefan Milius for
earlier discussions we had on this subject. I also thank anonymous referees
for their valuable comments and suggestions on an earlier version of this
paper.

## References

  * [1] Adámek, J., H. Herrlich, and G.E. Strecker,  “Abstract and concrete categories,”  Wiley–Interscience, 1990.
  * [2] Adámek, J., S. Milius, R. Myers, and H. Urbat,  _Varieties of Languages in a Category,_ Logic in Computer Science, LICS 2015.
  * [3] Adámek, J., S. Milius, R. Myers, and H. Urbat,  _Generalized Eilenberg Theorem I: Local Varieties of Lamguages,_ Foundations of Software Science and Computation Structures: 17th International Conference, FOSSACS 2014, 366–380.
  * [4] Awodey., S.,  “Category theory,”  Oxford University Press, 2006.
  * [5] Awodey., S., and J. Hughes,  _The coalgebraic dual of Birkhoff’s variety theorem,_ Carnegie Mellon Technical Report No. CMU-PHIL-109, 2000.
  * [6] Baldwin, J., and J. Berman,  _Varieties and finite closure conditions,_ Colloq. Math. 35 (1976), 15–20.
  * [7] Ballester-Bolinches, A., E. Cosme-Llópez, and J.J.M.M. Rutten,  _The dual equivalence of equations and coequations for automata,_ Information and Computation 244 (2015), 49–75.
  * [8] Banaschewski, B.  _The Birkhoff Theorem for varieties of finite algebras,_ Algebra Universalis, 10, (1983), 360–368.
  * [9] Banaschewski, B., and H. Herrlich,  _Subcategories defined by implications,_ Houston Journal of Mathematics, 2, No. 2, (1976), 149–171.
  * [10] Barr, M.,  _HSP Subcategories of Eilenberg–Moore Algebras,_ Theory and Applications of Categories, 10, No. 18, (2002), 461–468.
  * [11] Birkhoff, G.,  _On the structure of abstract algebras,_ Proc. Cambridge Phil. Soc. 31 (1935), 433–454.
  * [12] Bloom, S.,  _Varieties of ordered algebras,_ Journal of Computer and System Sciences 13 (1976), 200–212.
  * [13] Bloom, S., and J. Wright,  _P–varieties – A signature independent characterization of varieties of ordered algebras,_ Journal of Pure and Applied Algebra 29 (1983), 13–58.
  * [14] Bojańczyk., M.,  _Recognisable Languages over Monads,_ Lecture Notes in Computer Science 9168 (2015), 1–13. arXiv:1502.04898 [cs.LO] (2015).
  * [15] Bruns, G., and H. Lakser,  _Injective Hulls of Semilattices,_ Can. Math. Bull, 13 (1970), 115–118.
  * [16] Burris, S., and H. P. Sankappanavar,  “A Course in Universal Algebra,”  Springer–Verlag, 2012.
  * [17] Chen, L-T., J. Adámek, S. Milius, and H. Urbat,  _Profinite Monads, Profinite Equations, and Reiterman’s Theorem,_ Lecture Notes in Computer Science 9634, FoSSaCS (2016), 531–547.
  * [18] Eilenberg, S.,  “Automata, Languages, and Machines, Volume B.,”  Pure and Applied Mathematics. Academic Press, 1976.
  * [19] Eilenberg, S., and M. Schützenberger,  _On pseudovarieties,_ Advances in Math. 19 (1976), 413–418.
  * [20] Gehrke, M.,  _Duality and recognition,_ Lecture Notes in Computer Science 6907 (2011), 3–18.
  * [21] Gehrke, M.,  _Stone duality and the recognisable languages over an algebra,_ Lecture Notes in Computer Science 5728 (2009), 236–250.
  * [22] Gehrke, M., S. Grigorieff, and J.E. Pin,  _Duality and equational theory of regular languages,_ Lecture Notes in Computer Science 5126 (2008), 246–257.
  * [23] Gehrke, M., S. Grigorieff, and J.E. Pin,  _A topological approach to recognition,_ Lecture Notes in Computer Science 6199 (2010), 151–162.
  * [24] Herrlich, H.,  _Topological functors,_ Gen. Top. Appl., 4 (1974), 125–142.
  * [25] Kurz, A.,  _Logics for coalgebras and applications to computer science,_ Doctoral Thesis, Ludwigs-Maximilians-Universität München, 2000.
  * [26] Kurz, A., and J. Rosický,  _Operations and equations for coalgebras,_ Mathematical Structures in Computer Science 15(1): 149–166, 2005.
  * [27] Mac Lane, S.,  “Categories for the working mathematician”,  Springer–Verlag, 2nd ed. 1998.
  * [28] Pin, J.E.,  _A variety theorem without complementation,_ Russian Mathematics (Izvestija vuzov.Matematika) 39 (1995), 80–90.
  * [29] Polák, L.,  _Syntactic Semiring of a Language,_ Lecture Notes in Compututer Science 2136 (2001), 611–620.
  * [30] Reiterman, J.,  _The Birkhoff theorem for finite algebras,_ Algebra Universales 14 (1982), 1–10.
  * [31] Reutenauer, C.,  _Séries formelles et algèbres syntactiques,_ Journal of Algebra 66 (1980), 448–483.
  * [32] Rutten, J.,  _Universal coalgebra: a theory of systems,_ Theoretical Computer Science 249 (1) (2000), 3–80.
  * [33] Salamanca, J.,  _An Eilenberg–like theorem for algebras on a monad,_ CWI Technical Report FM–1602 (2016).
  * [34] Salamanca, J., M. Bonsangue, and J. Rot,  _Duality of Equations and Coequations via Contravariant Adjunctions,_ Lecture Notes in Computer Science 9608 (2016), 73–93.
  * [35] Schützenberger, M.,  _on finite monoids having only trivial subgroups,_ Information and Control 8 (1965), 190–194.
  * [36] H. Urbat, J. Adámek, L-T. Chen, and S. Milius,  _One Eilenberg Theorem to Rule Them All._ arXiv:1602.05831v1 [cs.FL] , 2016.
  * [37] T. Wilke,  _An Eilenberg Theorem for $\infty$–Languages,_ Lecture Notes in Compututer Science 510 (1991), 588–599.

## Appendix A

###  A.1. Details for Section 1

####  A.1.1. Proof of Lemma 1

Lemma 1. Let $\mathcal{D}$ be a category and $\mathscr{E}/\mathscr{M}$ be a
factorization system on $\mathcal{D}$ such that every morphism in
$\mathscr{M}$ is mono. Then $f\circ g\in\mathscr{E}$ implies
$f\in\mathscr{E}$.

######  Proof A.1.

Put $f=m\circ e$ with $e\in\mathscr{E}$ and $m\in\mathscr{M}$. Then $m\circ
e\circ g=f\circ g\in\mathscr{E}$. From the diagram

$\cdot$$\cdot$$\cdot$$\cdot$$m$$m\circ e\circ g$$e\circ g$$id$

using the diagonal fill–in we get a morphism $d$ such that $m\circ d=id$. Now,
from $m\circ d\circ m=m$, by using the fact that $m$ is mono, we have $d\circ
m=id$, i.e., $m$ is iso. Therefore $f=m\circ e\in\mathscr{E}$ since
$e\in\mathscr{E}$ and $m$ is iso.

####  A.1.2. Proof of Lemma 1

Lemma 1. Let $\mathcal{D}$ be a category, $\mathsf{T}=(T,\eta,\mu)$ a monad on
$\mathcal{D}$, and $\mathscr{E}/\mathscr{M}$ a proper factorization system on
$\mathcal{D}$. If $T$ preserves the morphisms in $\mathscr{E}$ then
$\operatorname{Alg}(\mathsf{T})$ inherits the same $\mathscr{E}/\mathscr{M}$
factorization system. That is:

  1. A)

Given $\mathbf{A}=(A,\alpha)$ and $\mathbf{B}=(B,\beta)$ such that
$\mathbf{A},\mathbf{B}\in\operatorname{Alg}(\mathsf{T})$, if
$f\in\operatorname{Alg}(\mathsf{T})(\mathbf{A},\mathbf{B})$ is factored as
$f=m\circ e$ in $\mathcal{D}$ where $e\in\mathscr{E}$, $m\in\mathscr{M}$ and
$C\in\mathcal{D}$ is the domain of $m$, then there exists a unique
$\gamma\in\mathcal{D}(TC,C)$ such that
$\mathbf{C}=(C,\gamma)\in\operatorname{Alg}(\mathsf{T})$ and $m$ and $e$ are
$\mathsf{T}$–algebra morphisms.

  2. B)

Given any commutative diagram

$C$$D$$A$$B$$m$$e$$f$$g$

in $\operatorname{Alg}(\mathsf{T})$ with $e\in\mathscr{E}$ and
$m\in\mathscr{M}$, the unique diagonal fill–in morphism $d$ such that the
diagram

$C$$D$$A$$B$$m$$e$$f$$d$$g$

commutes is a morphism in $\operatorname{Alg}(\mathsf{T})$.

######  Proof A.2.

  1. A)

As $f\in\operatorname{Alg}(\mathsf{T})(A,B)$ and $f=m\circ e$, we get the
following commutative diagram:

$A$$C$$B$$TA$$TC$$TB$$e$$Te$$m$$\alpha$$Tm$$\beta$$\gamma$$f$$Tf$

where $\gamma\in\mathcal{D}(TC,C)$ is obtained by the diagonal fill–in
property since $Te\in\mathscr{E}$. Now, we prove that
$C=(C,\gamma)\in\operatorname{Alg}(\mathsf{T})$. In fact,

    1. i)

We prove that $\gamma\circ\eta_{C}=id_{C}$. In fact, we have the following
commutative diagram:

$A$$C$$B$$TA$$TC$$TB$$A$$C$$C$$e$$Te$$e$$m$$m$$\alpha$$Tm$$\beta$$\gamma$$f$$Tf$$\eta_{A}$$\eta_{C}$

from this, starting from $A$ at the top left corner and finishing at $B$ we
have that $m\circ\gamma\circ\eta_{C}\circ e=m\circ e\circ\alpha\circ\eta_{A}$.
From that equation, using the fact that $\alpha\circ\eta_{A}=id_{A}$, since
$A\in\operatorname{Alg}(\mathsf{T})$, and the fact that $m$ is mono and $e$ is
epi, we have that $\gamma\circ\eta_{C}=id_{C}$.

    2. ii)

We prove that $\gamma\circ\mu_{C}=\gamma\circ T\gamma$. In fact, we have the
following commutative diagram:

$TC$$C$$B$$TB$$TTC$$TA$$TB$$C$$TTB$$TA$$TTA$$TTC$$TC$$Te$$TTe$$TTe$$Te$$m$$m$$\gamma$$Tm$$\beta$$Tm$$\gamma$$\beta$$\mu_{C}$$\mu_{A}$$T\alpha$$TTf$$T\gamma$$\
Tf$$T\beta$$\mu_{B}$$Tf$

Then by following the external arrows we get that
$m\circ\gamma\circ\mu_{C}\circ TTe=m\circ\gamma\circ T\gamma\circ TTe$. Then,
from that equation, since $m$ is mono and $TTe$ is epi, we have that
$\gamma\circ\mu_{C}=\gamma\circ T\gamma$.

  2. B)

Put $\mathbf{B}=(B,\beta)$ and $\mathbf{C}=(C,\gamma)$. Then we have that
$m\circ\gamma\circ Td\circ Te=m\circ d\circ\beta\circ Te$. From that equality,
since $m$ is mono and $Te$ is epi, we get $\gamma\circ Td=d\circ\beta$, i.e.,
$d\in\operatorname{Alg}(\mathsf{T})(\mathbf{B},\mathbf{C})$.

###  A.2. Details for Section 2

####  A.2.1. Proof of Birkhoff’s Theorem for $\mathsf{T}$–algebras

The proof for Birkhoff’s theorem for $\mathsf{T}$–algebras can be made by
following the same ideas for standard proofs of Birkhoff’s theorem, see, e.g.,
[16]. In our case we deal with equational $\mathsf{T}$–theories and we have a
fixed the subcategory $\mathcal{D}_{0}$ of “variables”, which is the main
difference with respect to some other versions such as [5, 9, 10]. We will
derive Theorem 1 from the following basic facts and some facts from [1, 9].

######  Lemma A.3.

Let $\mathcal{D}$ be a category, $\mathscr{E}/\mathscr{M}$ a factorization
system on $\mathcal{D}$, $\mathsf{T}=(T,\eta,\mu)$ a monad on $\mathcal{D}$
and $\mathcal{D}_{0}$ a full subcategory of $\mathcal{D}$. Assume (B2). Let
$\operatorname{\mathtt{E}}=\\{TX\overset{e_{X}}{\operatorname{\longrightarrow\mkern-15.0mu\rightarrow}}Q_{X}\\}_{X\in\mathcal{D}_{0}}$
be an equational $\mathsf{T}$–theory on $\mathcal{D}_{0}$. Then
$\mathbf{Q_{X}}\in\operatorname{Mod}(\operatorname{\mathtt{E}})$ for every
$X\in\mathcal{D}_{0}$.

######  Proof A.4.

Let $Y\in\mathcal{D}_{0}$ and let
$f\in\operatorname{Alg}(\mathsf{T})(\mathbf{TY},\mathbf{Q_{X}})$. Then we have
the following commutative diagram:

$Q_{X}$$TY$$Q_{Y}$$TX$$e_{Y}$$e_{X}$$g^{\prime}$$f$$g$

where $g\in\operatorname{Alg}(\mathsf{T})(\mathbf{TY},\mathbf{TX})$ is
obtained from $f$ and $e_{X}$ using assumption (B2) and $g^{\prime}$ is
obtained from the fact that $\operatorname{\mathtt{E}}$ is an equational
$\mathsf{T}$–theory. Therefore, $f$ factors through $e_{Y}$ and hence
$\mathbf{Q_{X}}\in\operatorname{Mod}(\operatorname{\mathtt{E}})$.

######  Proposition A.5.

Let $\mathcal{D}$ be a category, $\mathscr{E}/\mathscr{M}$ a factorization
system on $\mathcal{D}$, $\mathsf{T}=(T,\eta,\mu)$ a monad on $\mathcal{D}$
and $\mathcal{D}_{0}$ a full subcategory of $\mathcal{D}$. Assume (B1) and
(B2). For $i=1,2$, let
$\operatorname{\mathtt{E}}_{i}=\\{TX\overset{(e_{i})_{X}}{\operatorname{\longrightarrow\mkern-15.0mu\rightarrow}}(Q_{i})_{X}\\}_{X\in\mathcal{D}_{0}}$
be an equational $\mathsf{T}$–theory on $\mathcal{D}_{0}$. If
$\operatorname{\mathtt{E}}_{1}\neq\operatorname{\mathtt{E}}_{2}$ then
$\operatorname{Mod}(\operatorname{\mathtt{E}}_{1})\neq\operatorname{Mod}(\operatorname{\mathtt{E}}_{2})$.

######  Proof A.6.

As $\operatorname{\mathtt{E}}_{1}\neq\operatorname{\mathtt{E}}_{2}$, there
exists $X\in\mathcal{D}_{0}$ such that $(e_{1})_{X}\neq(e_{2})_{X}$, i.e.,
there is no isomorphism
$\phi\in\operatorname{Alg}(\mathsf{T})(\mathbf{(Q_{1})_{X}},\mathbf{(Q_{2})_{X}})$
such that $\phi\circ(e_{1})_{X}=(e_{2})_{X}$. We have that
$\mathbf{(Q_{1})_{X}}\notin\operatorname{Mod}(\operatorname{\mathtt{E}}_{2})$
or
$\mathbf{(Q_{2})_{X}}\notin\operatorname{Mod}(\operatorname{\mathtt{E}}_{1})$.
In fact, if we assume by contradiction that
$\mathbf{(Q_{1})_{X}}\in\operatorname{Mod}(\operatorname{\mathtt{E}}_{2})$ and
$\mathbf{(Q_{2})_{X}}\in\operatorname{Mod}(\operatorname{\mathtt{E}}_{1})$
then, from the fact that
$\mathbf{(Q_{1})_{X}}\in\operatorname{Mod}(\operatorname{\mathtt{E}}_{2})$, we
get the commutative diagram:

$(Q_{1})_{X}$$TX$$(Q_{2})_{X}$$(e_{2})_{X}$$g_{21}$$(e_{1})_{X}$

i.e., there exists
$g_{21}\in\operatorname{Alg}(\mathsf{T})(\mathbf{(Q_{2})_{X}},\mathbf{(Q_{1})_{X}})$
such that $g_{21}\circ(e_{2})_{X}=(e_{1})_{X}$. Similarly, from the fact that
$\mathbf{(Q_{2})_{X}}\in\operatorname{Mod}(\operatorname{\mathtt{E}}_{1})$, we
get that there exists
$g_{12}\in\operatorname{Alg}(\mathsf{T})(\mathbf{(Q_{1})_{X}},\mathbf{(Q_{2})_{X}})$
such that $g_{12}\circ(e_{1})_{X}=(e_{2})_{X}$. Hence we have that:

$(e_{2})_{X}=g_{12}\circ(e_{1})_{X}=g_{12}\circ g_{21}\circ(e_{2})_{X}$

which implies that $g_{12}\circ g_{21}=id_{(Q_{2})_{X}}$ since $(e_{2})_{X}$
is epi by (B1). Similarly, $g_{21}\circ g_{12}=id_{(Q_{1})_{X}}$, which
implies that $g_{12}$ is an isomorphism such that
$g_{12}\circ(e_{1})_{X}=(e_{2})_{X}$ which is a contradiction. Hence
$\mathbf{(Q_{1})_{X}}\notin\operatorname{Mod}(\operatorname{\mathtt{E}}_{2})$
or
$\mathbf{(Q_{2})_{X}}\notin\operatorname{Mod}(\operatorname{\mathtt{E}}_{1})$
and, by the previous lemma,
$\mathbf{(Q_{i})_{X}}\in\operatorname{Mod}(\operatorname{\mathtt{E}}_{i})$,
which implies that
$\operatorname{Mod}(\operatorname{\mathtt{E}}_{1})\neq\operatorname{Mod}(\operatorname{\mathtt{E}}_{2})$.

The next proposition shows that, under conditions (B1), (B2) and (B4), every
class defined by an equational $\mathsf{T}$–theory is a variety of
$\mathsf{T}$–algebras.

######  Proposition A.7.

Let $\mathcal{D}$ be a complete category, $\mathsf{T}=(T,\eta,\mu)$ a monad on
$\mathcal{D}$, $\mathscr{E}/\mathscr{M}$ a factorization system on
$\mathcal{D}$ and $\mathcal{D}_{0}$ a full subcategory of $\mathcal{D}$.
Assume (B1), (B2) and (B4). Let $\operatorname{\mathtt{E}}$ be an equational
$\mathsf{T}$–theory on $\mathcal{D}_{0}$. Then
$\operatorname{Mod}(\operatorname{\mathtt{E}})$ is a variety of
$\mathsf{T}$–algebras.

######  Proof A.8.

$\operatorname{Mod}(\operatorname{\mathtt{E}})$ is nonempty by Lemma A.3. Put
$\operatorname{\mathtt{E}}=\\{TX\overset{e_{X}}{\operatorname{\longrightarrow\mkern-15.0mu\rightarrow}}Q_{X}\\}_{X\in\mathcal{D}_{0}}$,
then:

  1. i)

$\operatorname{Mod}(\operatorname{\mathtt{E}})$ is closed under
$\mathscr{E}$–quotients: Let
$\mathbf{A},\mathbf{B}\in\operatorname{Alg}(\mathsf{T})$ with
$\mathbf{A}\in\operatorname{Mod}(\operatorname{\mathtt{E}})$ and let
$e\in\operatorname{Alg}(\mathsf{T})(\mathbf{A},\mathbf{B})\cap\mathscr{E}$.
Let $f\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{B})$ such that
$X\in\mathcal{D}_{0}$, then we have the following commutative diagram:

$A$$TX$$Q_{X}$$B$$e_{X}$$e$$g_{k}$$k$$f$

where $k\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{A})$ was
obtained from $f$ using (B2) and
$g_{k}\in\operatorname{Alg}(\mathsf{T})(\mathbf{Q_{X}},\mathbf{A})$ from the
fact that $\mathbf{A}\in\operatorname{Mod}(\operatorname{\mathtt{E}})$.
Therefore $f$ factors through $e_{X}$, i.e.,
$\mathbf{B}\in\operatorname{Mod}(\operatorname{\mathtt{E}})$.

  2. ii)

$\operatorname{Mod}(\operatorname{\mathtt{E}})$ is closed under
$\mathscr{M}$–subalgebras: Let
$\mathbf{A},\mathbf{B}\in\operatorname{Alg}(\mathsf{T})$ with
$\mathbf{A}\in\operatorname{Mod}(\operatorname{\mathtt{E}})$ and let
$m\in\operatorname{Alg}(\mathsf{T})(\mathbf{B},\mathbf{A})\cap\mathscr{M}$.
Let $f\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{B})$ such that
$X\in\mathcal{D}_{0}$, then we have the following commutative diagram:

$B$$TX$$Q_{X}$$A$$e_{X}$$m$$k$$f$$g_{m\circ f}$

where $g_{m\circ
f}\in\operatorname{Alg}(\mathsf{T})(\mathbf{Q_{X}},\mathbf{A})$ was obtained
from the fact that
$\mathbf{A}\in\operatorname{Mod}(\operatorname{\mathtt{E}})$, and
$k\in\operatorname{Alg}(\mathsf{T})(\mathbf{Q_{X}},\mathbf{B})$ was obtained
by the diagonal fill–in property of the factorization system
$\mathscr{E}/\mathscr{M}$. Since $m$ is mono, from $m\circ k\circ e_{X}=m\circ
f$, we get $k\circ e_{X}=f$ which implies that
$\mathbf{B}\in\operatorname{Mod}(\operatorname{\mathtt{E}})$.

  3. iii)

$\operatorname{Mod}(\operatorname{\mathtt{E}})$ is closed under products: Let
$\mathbf{A}_{i}\in\operatorname{Mod}(\operatorname{\mathtt{E}})$, $i\in I$,
and let $\mathbf{A}=\prod_{i\in I}\mathbf{A}_{i}$ be their product in
$\operatorname{Alg}(\mathsf{T})$ with projections $\pi_{i}:A\to A_{i}$. Let
$f\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{A})$ such that
$X\in\mathcal{D}_{0}$, then we have the following commutative diagram:

$A$$TX$$Q_{X}$$A_{i}$$e_{X}$$\pi_{i}$$g$$f$$g_{\pi_{i}\circ f}$

where $g_{\pi_{i}\circ
f}\in\operatorname{Alg}(\mathsf{T})(\mathbf{Q_{X}},\mathbf{A}_{i})$ was
obtained from the fact that
$\mathbf{A}_{i}\in\operatorname{Mod}(\operatorname{\mathtt{E}})$, and
$g\in\operatorname{Alg}(\mathsf{T})(\mathbf{Q_{X}},\mathbf{A})$ was obtained
by the universal property of the product. Finally, we have that $g\circ
e_{X}=f$ since $\pi_{i}\circ g\circ e_{X}=\pi_{i}\circ f$ for every $i\in I$.

Theorem 1 follows from [9] as follows. We have that the facts in [9] hold for
any $(E,M)$–category as it is mentioned before [9, Example 1] (see [24] for
basic facts and examples about $(E,M)$–categories). Now, by the assumptions of
Theorem 1 we have that the category $\operatorname{Alg}(\mathsf{T})$ is an
$(E,M)$–category, by [1, Corollary 15.21], and hence a class $K$ of
$\mathsf{T}$–algebras, viewed as a full subcategory of
$\operatorname{Alg}(\mathsf{T})$, is $E$–equational in
$\operatorname{Alg}(\mathsf{T})$ if and only if $K$ is a variety. In this
case, the inclusion functor $H:K\to\operatorname{Alg}(\mathsf{T})$ has a left
adjoint $F:\operatorname{Alg}(\mathsf{T})\to K$ such that its unit
$\eta:Id_{\operatorname{Alg}(\mathsf{T})}\Rightarrow HF$ is such that all its
componets are in $E=\mathscr{E}$ and, by the assumptions, the equational
$\mathsf{T}$–theory
$\operatorname{\mathtt{E}}=\\{TX\overset{\eta_{\mathbf{TX}}}{\operatorname{\longrightarrow\mkern-15.0mu\rightarrow}}FHTX\\}_{X\in\mathcal{D}_{0}}$
defines $K$ (see, e.g., [9, Proposition 3 and Remark 1]). The fact that
$\operatorname{\mathtt{E}}$ is an equational $\mathsf{T}$–theory follows from
naturality of $\eta$. Finally, by Proposition A.7 every equational
$\mathsf{T}$–theory defines a variety and the correspondence between
equational $\mathsf{T}$–theories and varieties is bijective by Proposition A.5
and uniqueness of left adjoint.

####  A.2.2. Details for Example 2.4

We prove that the notion of a coequational $\mathsf{B}$–theory coincides with
the notion of a “variety of languages” given in [7, Definition 35].

[[7, Definition 35]] A variety of languages is an operator $\mathcal{V}$ on
$\operatorname{\mathtt{Set}}$ such that for every
$X\in\operatorname{\mathtt{Set}}$,
$\mathcal{V}(X)\subseteq\operatorname{\mathtt{Set}}(X^{*},2)$ and it satisfies
the following:

  1. i)

for every $L\in\mathcal{V}(X)$ we have that
$\operatorname{coeq}(X^{*}/\operatorname{eq}\langle
L\rangle)\subseteq\mathcal{V}(X)$;

  2. ii)

if $\operatorname{coeq}(X^{*}/C_{i})\subseteq\mathcal{V}(X)$, where $C_{i}$ a
monoid congruence of $X^{*}$, $i\in I$, then we have that
$\operatorname{coeq}(X^{*}/\bigcap_{i\in I}C_{i})\subseteq\mathcal{V}(X)$;

  3. iii)

for every $Y\in\operatorname{\mathtt{Set}}$, if $L\in\mathcal{V}(Y)$ and
$\eta:Y^{*}\to Y^{*}/\operatorname{eq}\langle L\rangle$ denotes the quotient
morphism, then for each monoid morphism $\varphi:X^{*}\to Y^{*}$ we have
$\operatorname{coeq}(X^{*}/\ker(\eta\circ\varphi))\subseteq\mathcal{V}(X)$.

A coequational $\mathsf{B}$–theory is an operator $\mathcal{L}$ on
$\operatorname{\mathtt{Set}}$ such that for every
$X\in\operatorname{\mathtt{Set}}$ we have that:

  1. i)

$\mathcal{L}(X)\in\operatorname{\mathtt{CABA}}$ and it is a subalgebra of
$\operatorname{\mathtt{Set}}(A^{*},2)$.

  2. ii)

$\mathcal{L}(X)$ is closed under left and right derivatives. That is, if
$L\in\mathcal{L}(X)$ and $x\in X$ then ${}_{x}L,L_{x}\in\mathcal{L}(X)$, where
${}_{x}L(w)=L(wx)$ and $L_{x}(w)=L(xw)$, $w\in X^{*}$.

  3. iii)

$\mathcal{L}$ is closed under morphic preimages. That is, for every
$Y\in\operatorname{\mathtt{Set}}$, homomorphism of monoids $h:Y^{*}\to X^{*}$
and $L\in\mathcal{L}(X)$, we have that $L\circ h\in\mathcal{L}(Y)$.

The equivalence of a coequational $\mathsf{B}$–theory with the operator
$\operatorname{\mathscr{L}}$ defined above follows from Example 2.5 (see also
Example 2.6).

We show that the two notions above coincide. We prove that every $\mathcal{V}$
above satisfies the conditions of the $\mathcal{L}$ above and vice versa.

######  Lemma A.9.

For every $X\in\operatorname{\mathtt{Set}}$ and
$L\in\operatorname{\mathtt{Set}}(X^{*},2)$ we have that
$\operatorname{coeq}(X^{*}/\operatorname{eq}\langle
L\rangle)=\langle\mkern-3.0mu\langle L\rangle\mkern-3.0mu\rangle$ where
$\langle\mkern-3.0mu\langle L\rangle\mkern-3.0mu\rangle$ is the
$\mathsf{B}$–coalgebra generated by $L$.

######  Proof A.10.

By [7, Corollary 8] we have that the monoid $X^{*}/\operatorname{eq}\langle
L\rangle$ is the syntactic monoid of $L$. The universal property of the
syntactic monoid of $L$ is, by duality, the property that
$\operatorname{coeq}(X^{*}/\operatorname{eq}\langle
L\rangle)=\langle\mkern-3.0mu\langle L\rangle\mkern-3.0mu\rangle$. This
property of $\langle\mkern-3.0mu\langle L\rangle\mkern-3.0mu\rangle$ being the
dual of the syntactic monoid of $L$ was also mentioned in [21, Section 6].

######  Lemma A.11.

Let $\mathcal{V}$ be a variety of languages and
$X\in\operatorname{\mathtt{Set}}$, then

$\mathcal{V}(X)=\operatorname{coeq}\left(X^{*}/\bigcap_{L\in\mathcal{V}(X)}\operatorname{eq}\langle
L\rangle\right).$

######  Proof A.12.

($\supseteq$): Follows from properties i) and ii) of $\mathcal{V}$ being a
variety of languages.

($\subseteq$): Consider the canonical epimorphism of monoids
$e_{{}_{L^{\prime}}}:X^{*}/\bigcap_{L\in\mathcal{V}(X)}\operatorname{eq}\langle
L\rangle\to X^{*}/\operatorname{eq}\langle L^{\prime}\rangle$,
$L^{\prime}\in\mathcal{V}(X)$. Then, by duality, i.e., applying
$\operatorname{coeq}$, gives us the monomorphism
$m_{{}_{L^{\prime}}}:\langle\mkern-3.0mu\langle
L^{\prime}\rangle\mkern-3.0mu\rangle\to\operatorname{coeq}\left(X^{*}/\bigcap_{L\in\mathcal{V}(X)}\operatorname{eq}\langle
L\rangle\right)$ which implies that
$L^{\prime}\in\operatorname{coeq}\left(X^{*}/\bigcap_{L\in\mathcal{V}(X)}\operatorname{eq}\langle
L\rangle\right)$ since $L^{\prime}\in\langle\mkern-3.0mu\langle
L^{\prime}\rangle\mkern-3.0mu\rangle$.

######  Lemma A.13.

For every $X\in\operatorname{\mathtt{Set}}$ and every
$L\in\operatorname{\mathtt{Set}}(X^{*},2)$ we have that $L=\bigcup_{w\in
L}w/\operatorname{eq}\langle L\rangle$, where $w/\operatorname{eq}\langle
L\rangle$ denotes the equivalence class of $w$ in
$X^{*}/\operatorname{eq}\langle L\rangle$.

######  Proof A.14.

($\subseteq$): obvious.

($\supseteq$): Let $u\in\bigcup_{w\in L}w/\operatorname{eq}\langle L\rangle$,
then there exists $v\in L$ such that $(u,v)\in\operatorname{eq}\langle
L\rangle$. In particular, $L_{u}=L_{v}$. Now, using the fact that $v\in L$ we
get the following implications:

$v\in L\Rightarrow\epsilon\in L_{v}=L_{u}\Rightarrow\epsilon\in L_{u}$

i.e., $u\in L$.

The previous lemma basically says that the syntactic monoid of $L$ recognizes
$L$.

Lemma A.11 says that $\mathcal{V}(X)\in\operatorname{\mathtt{CABA}}$ for every
$X\in\operatorname{\mathtt{Set}}$, since
$\operatorname{coeq}(X^{*}/C)\cong\mathcal{P}(X^{*}/C)$ for every monoid
congruence $C$ of $X^{*}$ [7, Proposition 15]. Lemma A.9 together with
property i) of $\mathcal{V}$ being a variety of languages imply that
$\mathcal{V}(X)$ is closed under left and right derivatives. That is, every
variety of languages $\mathcal{V}$ satisfies properties i) and ii) of a
coequational $\mathsf{B}$–theory. Now we show that $\mathcal{V}$ also
satisfies property iii) of a coequational $\mathsf{B}$–theory.

######  Lemma A.15.

Let $\mathcal{V}$ be a variety of languages. Then for every
$X,Y\in\operatorname{\mathtt{Set}}$, homomorphism of monoids $h:X^{*}\to
Y^{*}$ and $L\in\mathcal{V}(Y)$ we have that $L\circ h\in\mathcal{V}(X)$.

######  Proof A.16.

By property iii) of $\mathcal{V}$ being a variety of languages we have that
$\operatorname{coeq}(X^{*}/\ker(\eta\circ h))\subseteq\mathcal{V}(X)$. We will
show that $L\circ h\in\operatorname{coeq}(X^{*}/\ker(\eta\circ
h))\subseteq\mathcal{V}(X)$. In fact,

Claim: $L\circ h=\bigcup\\{w/\ker(\eta\circ h)\mid w\in X^{*}\text{ s.t.
}h(w)\in L\\}$.

Let $v\in X^{*}$, then:

($\subseteq$): $v\in L\circ h\Rightarrow h(v)\in L\Rightarrow
v\in\bigcup\\{w/\ker(\eta\circ h)\mid w\in X^{*}\text{ s.t. }h(w)\in L\\}$.

($\supseteq$): Assume $v\in\bigcup\\{w/\ker(\eta\circ h)\mid w\in X^{*}\text{
s.t. }h(w)\in L\\}$, i.e., there exists $u\in X^{*}$ with $h(u)\in L$ such
that $(v,u)\in\ker(\eta\circ h)$. Now, we have

$(v,u)\in\ker(\eta\circ
h)\Rightarrow(h(v),h(u))\in\ker(\eta)=\operatorname{eq}\langle
L\rangle\Rightarrow h(v)\in L$

where the last implication follows from Lemma A.13 since $h(u)\in L$. Finally,
from $h(u)\in L$ we get $u\in L\circ h$. This finishes the proof of the claim.

From the claim we have that $L\circ
h\in\operatorname{coeq}(X^{*}/\ker(\eta\circ h))\subseteq\mathcal{V}(X)$.

Until now we proved the following.

######  Proposition 9.

Let $\mathcal{V}$ be a variety of languages. Then $\mathcal{V}$ is a
coequational $\mathsf{B}$–theory.

Now we prove.

######  Proposition 10.

Let $\mathcal{L}$ be a coequational $\mathsf{B}$–theory. Then $\mathcal{L}$ is
a variety of languages.

######  Proof A.17.

We have to prove that $\mathcal{L}$ satisfies properties i), ii) and iii) that
define a variety of languages. In fact, let $X\in\operatorname{\mathtt{Set}}$,
then:

  1. i)

Properties i) and ii) of $\mathcal{L}$ being a coequational
$\mathsf{B}$–theory say that $\mathcal{L}(X)$ is a $\mathsf{B}$–subcoalgebra
of $\operatorname{\mathtt{Set}}(X^{*},2)$. In particular, for every
$L\in\mathcal{L}(X)$ we have
$\operatorname{coeq}(X^{*}/\operatorname{eq}\langle
L\rangle)=\langle\mkern-3.0mu\langle
L\rangle\mkern-3.0mu\rangle\subseteq\mathcal{L}(X)$.

  2. ii)

To prove property ii) we show that for a monoid congruence $C_{i}$ of $X^{*}$,
$i\in I$, the $\mathsf{B}$–coalgebra $\operatorname{coeq}(X^{*}/\bigcap_{i\in
I}C_{i})$ is the $\mathsf{B}$–subcoalgebra of
$\operatorname{\mathtt{Set}}(X^{*},2)$ generated by the family
$\\{\operatorname{coeq}(X^{*}/C_{i})\\}_{i\in I}$. We show this by duality,
i.e., in the category of monoids. We have the following setting:

$X^{*}$$X^{*}/\bigcap_{i\in
I}C_{i}$$P$$X^{*}/C_{j}$$m_{\eta}$$\eta_{j}$$e_{\eta}$$\eta$$\pi_{j}$

where:

    1. -

$\eta_{j}:X^{*}\to X^{*}/C_{j}$ is the canonical homomorphism, $j\in I$,

    2. -

$P$ is the product $P=\prod_{i\in I}X^{*}/C_{i}$ with projections
$\pi_{j}:P\to X^{*}/C_{j}$, $j\in I$,

    3. -

$\eta$ is obtained from $\eta_{j}$, $j\in I$, by the universal property of
$P$, and

    4. -

$\eta=m_{\eta}\circ e_{\eta}$ is the factorization of $\eta$, i.e.,
$\ker(\eta)=\bigcap_{i\in I}C_{i}$.

Now we prove, by duality, that the $\mathsf{B}$–coalgebra
$\operatorname{coeq}(X^{*}/\bigcap_{i\in I}C_{i})$ is the least
$\mathsf{B}$–subcoalgebra of $\operatorname{\mathtt{Set}}(X^{*},2)$ containing
each of $\operatorname{coeq}(X^{*}/C_{i})$. Let $e:X^{*}\to X^{*}/C$ be an
epimorphism of monoids such that each $\eta_{j}$ factors through $e$, $j\in
I$. That is, there exists $g_{j}:X^{*}/C\to X^{*}/C_{j}$ such that
$\eta_{j}=g_{j}\circ e$, $j\in I$. Therefore, $C\subseteq C_{j}$, $j\in I$,
and hence $C\subseteq\bigcap_{i\in I}C_{i}$, which means that there exists
$g:X^{*}/C\to X^{*}/\bigcap_{i\in I}C_{i}$ such that $e_{\eta}=g\circ e$.

Now, $\mathcal{L}$ satisfying property ii) of a variety of languages follows
from the observation above. In fact, if $\mathcal{L}(X)$ contains
$\operatorname{coeq}(X^{*}/C_{i})$, $i\in I$, then, by using the fact that
$\mathcal{L}(X)$ is a $\mathsf{B}$–subcoalgebra of
$\operatorname{\mathtt{Set}}(X^{*},2)$, it contains the least
$\mathsf{B}$–subcoalgebra of $\operatorname{\mathtt{Set}}(X^{*},2)$ containing
each of $\operatorname{coeq}(X^{*}/C_{i})$, $i\in I$, which is
$\operatorname{coeq}(X^{*}/\bigcap_{i\in I}C_{i})$.

  3. iii)

Let $Y\in\operatorname{\mathtt{Set}}$, $L\in\mathcal{L}(Y)$ and $\eta:Y^{*}\to
Y^{*}/\operatorname{eq}\langle L\rangle$ be the quotient morphism. Let
$\varphi:X^{*}\to Y^{*}$ be a monoid morphism. We have to show that
$\operatorname{coeq}(X^{*}/\ker(\eta\circ\varphi))\subseteq\mathcal{L}(X)$. In
fact, let $L^{\prime}\in\operatorname{coeq}(X^{*}/\ker(\eta\circ\varphi))$,
i.e., $L^{\prime}$ is of the form $L^{\prime}=\bigcup_{w\in
W}w/\ker(\eta\circ\varphi)$ for some $W\subseteq X^{*}$. Define
$L^{\prime\prime}$ as $L^{\prime\prime}=\bigcup_{w\in
W}\varphi(w)/\ker(\eta)=\bigcup_{w\in W}\varphi(w)/\operatorname{eq}\langle
L\rangle$. Then we have that
$L^{\prime\prime}\in\operatorname{coeq}(Y^{*}/\operatorname{eq}\langle
L\rangle)$ which by i) implies that $L^{\prime\prime}\in\mathcal{L}(Y)$, since
$\operatorname{coeq}(Y^{*}/\operatorname{eq}\langle
L\rangle)\subseteq\mathcal{L}(Y)$. Since $\mathcal{L}$ is a coequational
$\mathsf{B}$–theory then $L^{\prime\prime}\circ\varphi\in\mathcal{L}(X)$. To
finish the proof we prove the following:

Claim: $L^{\prime}=L^{\prime\prime}\circ\varphi$.

Let $u\in X^{*}$, then:

($\subseteq$): Assume that $u\in L^{\prime}$. Then there exists $w\in W$ such
that $(u,w)\in\ker(\eta\circ\varphi)$. This implies that
$(\varphi(u),\varphi(w))\in\ker(\eta)=\operatorname{eq}\langle L\rangle$ with
$w\in W$, i.e., $\varphi(u)\in L^{\prime\prime}$ which means that $u\in
L^{\prime\prime}\circ\varphi$.

($\supseteq$): Assume that $u\in L^{\prime\prime}\circ\varphi$, i.e.,
$\varphi(u)\in L^{\prime\prime}$. Then there exists $w\in W$ such that
$(\varphi(u),\varphi(w))\in\ker(\eta)$. This implies that
$(u,w)\in\ker(\eta\circ\varphi)$ with $w\in W$, i.e., $u\in L^{\prime}$.

####  A.2.3. Details for Example 2.7

The duality between $\operatorname{\mathtt{Poset}}$ and
$\operatorname{\mathtt{AlgCDL}}$ is given by the hom-set functors
$\operatorname{\mathtt{Poset}}(\underline{\ \
},\mathbf{2}_{c}):\operatorname{\mathtt{Poset}}\to\operatorname{\mathtt{AlgCDL}}$
and $\operatorname{\mathtt{AlgCDL}}(\underline{\ \
},\mathbf{2}_{c}):\operatorname{\mathtt{AlgCDL}}\to\operatorname{\mathtt{Poset}}$,
where $\mathbf{2}_{c}$ is the two–element chain ‘schizophrenic’ object in
$\operatorname{\mathtt{Poset}}$ and in $\operatorname{\mathtt{AlgCDL}}$. Note
that for any $\mathbf{P}\in\operatorname{\mathtt{Poset}}$ the object
$\operatorname{\mathtt{Poset}}(\mathbf{P},\mathbf{2}_{c})$ is the set of
downsets of $\mathbf{P}$ with the inclusion order and for any
$\mathbf{A}\in\operatorname{\mathtt{AlgCDL}}$ the object
$\operatorname{\mathtt{AlgCDL}}(\mathbf{A},\mathbf{2}_{c})$ is the set of all
completely join–prime elements of $\mathbf{A}$ with the order inherited from
$\mathbf{A}$. Remember that an element $a$ of $\mathbf{A}$ is completely
join–prime if $a\leq\bigvee S$ implies $a\leq s$ for some $s\in S$.

A variety of ordered algebras in $K$ is defined by an equational
$\mathsf{T}_{K}$–theory
$\\{T_{K}X\overset{e_{X}}{\operatorname{\longrightarrow\mkern-15.0mu\rightarrow}}Q_{X}\\}_{X\in\operatorname{\mathtt{Set}}}$
which by duality gives us the coequational $\mathsf{B}$–theory
$\\{\operatorname{\mathtt{Poset}}(e_{X},\mathbf{2}_{c})\\}_{X\in\operatorname{\mathtt{Set}}}$
which is equivalently defined by the image of every embedding
$\operatorname{\mathtt{Poset}}(e_{X},\mathbf{2}_{c})$, i.e., we define
$\operatorname{\mathscr{L}}(X):=\operatorname{Im}(\operatorname{\mathtt{Poset}}(e_{X},\mathbf{2}_{c}))$.
Closure of $\operatorname{\mathscr{L}}(X)$ under derivatives with respect to
the type $\operatorname{\tau}$ follows from the fact that each morphism
$e_{X}$ in an equational $\mathsf{T}_{\operatorname{\tau}}$–theory is a
homomorphism of ordered algebras. In fact, similar to Example 2.5 b), we have
that for every for every $g\in\operatorname{\tau}$ of arity $n_{g}$, every
$1\leq i\leq n_{g}$, every $t_{j}\in T_{K}X$, $1\leq j<n_{g}$, $t\in T_{K}X$
and $f\in\operatorname{\mathtt{Poset}}(Q_{X},\mathbf{2}_{c})$ we have $(f\circ
e_{X})^{(i)}_{(g,t_{1},\ldots,t_{n_{g}-1})}=f^{(i)}_{(g,e_{X}(t_{1}),\ldots,e_{X}(t_{n_{g}-1}))}\circ
e_{X}$, where the function
$f^{(i)}_{(g,e_{X}(t_{1}),\ldots,e_{X}(t_{n_{g}-1}))}\in\operatorname{\mathtt{Set}}(Q_{X},2)$
is defined for every $q\in Q_{X}$ as
$f^{(i)}_{(g,e_{X}(t_{1}),\ldots,e_{X}(t_{n_{g}-1}))}(q)=f(g(e_{X}(t_{1}),\ldots,e_{X}(t_{i-1}),q,e_{X}(t_{i}),\ldots,e_{X}(t_{n_{g}-1})))$.
We only need to prove that
$f^{(i)}_{(g,e_{X}(t_{1}),\ldots,e_{X}(t_{n_{g}-1}))}\in\operatorname{\mathtt{Poset}}(Q_{X},\mathbf{2}_{c})$.
In fact, for any $p\leq q$ in $Q_{X}$ we have that
$g(e_{X}(t_{i}),\ldots,p,\ldots,e_{X}(t_{n_{g}-1}))\leq
g(e_{X}(t_{i}),\ldots,q,\ldots,e_{X}(t_{n_{g}-1}))$, where $u$ and $v$ are in
the $i$–th position, which implies that

$\displaystyle f^{(i)}_{(g,e_{X}(t_{1}),\ldots,e_{X}(t_{n_{g}-1}))}(p)$
$\displaystyle=f(g(e_{X}(t_{1}),\ldots,p,\ldots,e_{X}(t_{n_{g}-1})))$
$\displaystyle\leq f(g(e_{X}(t_{1}),\ldots,q,\ldots,e_{X}(t_{n_{g}-1})))$
$\displaystyle=f^{(i)}_{(g,e_{X}(t_{1}),\ldots,e_{X}(t_{n_{g}-1}))}(q).$

since $f\in\operatorname{\mathtt{Poset}}(Q_{X},\mathbf{2}_{c})$. Therefore,
$\operatorname{\mathscr{L}}(X)$ is closed under derivatives with respect to
the type $\operatorname{\tau}$.

Conversely, any $S\in\operatorname{\mathtt{AlgCDL}}$ closed under derivatives
with respect to the type $\operatorname{\tau}$ such that $S$ is a subalgebra
of
$\operatorname{\mathtt{Poset}}(T_{K}X,\mathbf{2}_{c})=\operatorname{\mathtt{Set}}(T_{K}X,2)\in\operatorname{\mathtt{AlgCDL}}$
will define, by duality, the surjective function
$e_{S}:T_{K}X\to\operatorname{\mathtt{AlgCDL}}(S,\mathbf{2}_{c})$ such that
$e_{S}(w)(L)=L(w)$, $w\in T_{K}X$ and $L\in S$, which is a morphism in
$\operatorname{\mathtt{Poset}}(T_{K}X,\operatorname{\mathtt{AlgCDL}}(S,\mathbf{2}_{c}))$.
We only need to show that for every $g\in\operatorname{\tau}$, $t_{j}\in
T_{K}X$, $1\leq j<n_{g}$ and $u,v\in T_{K}X$ the inequality $e_{S}(u)\leq
e_{S}(v)$ implies that $e_{S}(g(t_{1},\ldots,u,\ldots,t_{n_{g}-1}))\leq
e_{S}(g(t_{1},\ldots,v,\ldots,t_{n_{g}-1}))$ (see [12, 1.3. Proposition]). In
fact, assume that $e_{S}(u)\leq e_{S}(v)$, i.e., for every $L\in S$ we have
that $L(u)\leq L(v)$. Now, assume by contradiction that
$e_{S}(g(t_{1},\ldots,u,\ldots,t_{n_{g}-1}))\not\leq
e_{S}(g(t_{1},\ldots,v,\ldots,t_{n_{g}-1}))$, i.e., there exists
$L^{\prime}\in S$ such that
$L^{\prime}(g(t_{1},\ldots,u,\ldots,t_{n_{g}-1}))=1$ and
$L^{\prime}(g(t_{1},\ldots,v,\ldots,t_{n_{g}-1}))=0$, i.e.,
$L^{\prime(i)}_{(g,t_{1},\ldots,t_{n_{g}-1})}(u)=1$ and
$L^{\prime(i)}_{(g,t_{1},\ldots,t_{n_{g}-1})}(v)=0$ with
$L^{\prime(i)}_{(g,t_{1},\ldots,t_{n_{g}-1})}\in S$ by closure under
derivatives with respect to the type $\operatorname{\tau}$, which contradics
the fact that $e_{S}(u)\leq e_{S}(v)$. Therefore $e_{S}$ is a
$\mathsf{T}_{K}$–algebra morphism in $\mathscr{E}$.

####  A.2.4. Details for Example 2.9

The duality between $\operatorname{\mathtt{Vec}_{\mathbb{K}}}$ and
$\operatorname{\mathtt{StVec}_{\mathbb{K}}}$ is given by the hom-set functors
$\operatorname{\mathtt{Vec}_{\mathbb{K}}}(\underline{\ \
},\mathbb{K}):\operatorname{\mathtt{Vec}_{\mathbb{K}}}\to\operatorname{\mathtt{StVec}_{\mathbb{K}}}$
and $\operatorname{\mathtt{StVec}_{\mathbb{K}}}(\underline{\ \
},\mathbb{K}):\operatorname{\mathtt{StVec}_{\mathbb{K}}}\to\operatorname{\mathtt{Vec}_{\mathbb{K}}}$.

A variety of $\mathbb{K}$–algebras is defined by an equational
$\mathsf{T}$–theory
$\\{\mathsf{V}(X^{*})\overset{e_{X}}{\operatorname{\longrightarrow\mkern-15.0mu\rightarrow}}Q_{X}\\}_{X\in\mathcal{D}_{0}}$
which by duality gives us the coequational $\mathsf{B}$–theory
$\\{\operatorname{\mathtt{Vec}_{\mathbb{K}}}(e_{X},\mathbb{K})\\}_{X\in\mathcal{D}_{0}}$
which is equivalently defined by the image of every monomorphism
$\operatorname{\mathtt{Vec}_{\mathbb{K}}}(e_{X},\mathbb{K})$, i.e., we define
$\operatorname{\mathscr{L}}(X):=\operatorname{Im}(\operatorname{\mathtt{Vec}_{\mathbb{K}}}(e_{X},\mathbb{K}))$.
Closure of $\operatorname{\mathscr{L}}(X)$ under left and right derivatives
follows from the fact that each morphism $e_{X}$ in an equational
$\mathsf{T}$–theory is a homomorphism of $\mathbb{K}$–algebras. In fact, for
every $v,w\in\mathsf{V}(X^{*})$ and
$f\in\operatorname{\mathtt{Vec}_{\mathbb{K}}}(Q_{X},\mathbb{K})$ we have that

$(f\circ e_{X})_{v}(w)=(f\circ e_{X})(vw)=f(e_{X}(v)\cdot
e_{X}(w))=(f_{e_{X}(v)}\circ e_{X})(w)$

where the function
$f_{e_{X}(v)}\in\operatorname{\mathtt{Set}}(Q_{X},\mathbb{K})$ is defined as
$f_{e_{X}(v)}(q)=f(e_{X}(v)\cdot q)$, where $\cdot$ is the product operation
in $\mathbf{Q_{X}}$, $q\in Q_{X}$. Note that
$f_{e_{X}(v)}\in\operatorname{\mathtt{Vec}_{\mathbb{K}}}(Q_{X},\mathbb{K})$
since for any $k\in\mathbb{K}$ and $p,q\in Q_{X}$ we have that

$f_{e_{X}(v)}(kp+q)=f(e_{X}(v)\cdot(kp+q))=kf(e_{X}(v)\cdot p)+f(e_{X}(v)\cdot
q)=kf_{e_{X}(v)}(p)+f_{e_{X}(v)}(q)$

since $f\in\operatorname{\mathtt{Vec}_{\mathbb{K}}}(Q_{X},\mathbb{K})$.
Therefore, $(f\circ e_{X})_{x}=f_{x}\circ
e_{X}\in\operatorname{\mathscr{L}}(X)$, i.e., $\operatorname{\mathscr{L}}(X)$
is closed under right derivatives. Closure under left derivatives is proved in
a similar way.

Conversely, any $S\in\operatorname{\mathtt{StVec}_{\mathbb{K}}}$ closed under
left and right derivatives such that $S$ is a subspace of
$\operatorname{\mathtt{Vec}_{\mathbb{K}}}(\mathsf{V}(X^{*}),\mathbb{K})\in\operatorname{\mathtt{StVec}_{\mathbb{K}}}$
will define, by duality, the surjective function
$e_{S}:\mathsf{V}(X^{*})\to\operatorname{\mathtt{StVec}_{\mathbb{K}}}(S,\mathbb{K})$
such that $e_{S}(w)(L)=L(w)$, $w\in\mathsf{V}(X^{*})$ and $L\in S$, which is a
morphism in
$\operatorname{\mathtt{Vec}_{\mathbb{K}}}(\mathsf{V}(X^{*}),\operatorname{\mathtt{StVec}_{\mathbb{K}}}(S,\mathbb{K}))$.
We only need to show that for every $u,v,w\in\mathsf{V}(X^{*})$ the equality
$e_{S}(u)=e_{S}(v)$ implies that $e_{S}(wu)=e_{S}(wv)$ and
$e_{S}(uw)=e_{S}(vw)$. In fact, assume that $e_{S}(u)=e_{S}(v)$, i.e., for
every $L\in S$ we have that $L(u)=L(v)$. Now, assume by contradiction that
$e_{S}(wu)\neq e_{S}(wv)$, i.e., there exists $L^{\prime}\in S$ such that
$L^{\prime}(wu)\neq L^{\prime}(wv)$, i.e., $L^{\prime}_{w}(u)\neq
L^{\prime}_{w}(v)$ with $L^{\prime}_{w}\in S$ by closure under right
derivatives, which is a contradiction. The equality $e_{S}(uw)=e_{S}(vw)$ is
proved in a similar way by using closure under left derivatives. Therefore
$e_{S}$ is a $\mathsf{T}$–algebra morphism in $\mathscr{E}$.

####  A.2.5. Details for Example 2.10

Define the monad $\mathsf{T}=(T,\eta,\mu)$ on $\operatorname{\mathtt{JSL}}$ as
$T(X,\lor)=(\mathcal{P}_{f}(X^{*})/\theta,\cup_{\theta})$ where $\theta$ is
the least equivalence relation on $\mathcal{P}_{f}(X^{*})$ such that:

  1. i)

for every $x,y\in X$ $\\{x\lor y\\}\theta\\{x,y\\}$,

  2. ii)

for every $A,B,C,D\in\mathcal{P}_{f}(X^{*})$, $A\theta B$ and $C\theta D$
imply $AC\theta BD$, and

  3. iii)

for every $A,B,C,D\in\mathcal{P}_{f}(X^{*})$, $A\theta B$ and $C\theta D$
imply $A\cup C\theta B\cup D$.

and $\cup_{\theta}$ is defined as $A/\theta\cup_{\theta}B/\theta=(A\cup
B)/\theta$ which is well–defined by property iii). We should use a notation
like $\theta_{(X,\lor)}$ for the relation defined above, but we will denote it
by $\theta$ for simplicity. It will be clear from the context to which
$\theta$ we are refering to in each case. If
$h\in\operatorname{\mathtt{JSL}}((X,\lor),(Y,\lor))$ then $Th$ is defined as

$(Th)(\\{w_{1}.\ldots,w_{n}\\}/\theta)=\\{h^{*}(w_{1}),\ldots,h^{*}(w_{n})\\}/\theta.$

The unit of the monad is defined as $\eta_{(X,\lor)}(x)=\\{x\\}/\theta$ and
the multiplication as:

$\mu_{(X,\lor)}(\\{W_{1},\ldots
W_{n}\\}/\theta)=\left(\bigcup_{i=1}^{n}\left(\prod_{j=1}^{m_{i}}W_{j}^{(i)}\right)\right)\Big{/}\theta$

where each $W_{i}\in(\mathcal{P}_{f}(X^{*}))^{*}$ is such that
$W_{i}=W_{1}^{(i)}\cdots W_{m_{i}}^{(i)}$ and
$W_{j}^{(i)}\in\mathcal{P}_{f}(X^{*})$, $1\leq i\leq n$ and $1\leq j\leq
m_{i}$.

We have that $\operatorname{Alg}(\mathsf{T})$ is the category of idempotent
semirings.

######  Lemma A.18.

Consider the object $(\mathcal{P}_{f}(X),\cup)\in\operatorname{\mathtt{JSL}}$,
then $T(\mathcal{P}_{f}(X),\cup)$ is isomorphic to
$(\mathcal{P}_{f}(X^{*}),\cup)$ in $\operatorname{\mathtt{JSL}}$.

######  Proof A.19.

By definition we have that

$T(\mathcal{P}_{f}(X),\cup)=\left(\mathcal{P}_{f}\left(\mathcal{P}_{f}(X)^{*}\right)/\theta,\cup_{\theta}\right)$

Now, every element in $\mathcal{P}_{f}(X)$ is of the form
$\\{x_{1},\ldots,x_{n}\\}=\\{x_{1}\\}\cup\cdots\cup\\{x_{n}\\}$, which by
property i) and iii) of the definition of $\theta$ we have that:

$\\{\\{x_{1},\ldots,x_{n}\\}\\}\theta\\{\\{x_{1}\\},\ldots,\\{x_{n}\\}\\}$

Therefore, by using the defining properties of $\theta$ we have that every
element in $\mathcal{P}_{f}\left(\mathcal{P}_{f}(X)^{*}\right)$ is equivalent
to a unique element of the form:

$\left\\{\left\\{x_{1}^{(1)}\right\\}\cdots\left\\{x_{n_{1}}^{(1)}\right\\},\ldots,\left\\{x_{1}^{(m)}\right\\}\cdots\left\\{x_{n_{m}}^{(m)}\right\\}\right\\}$

where uniqueness follows since $(\mathcal{P}_{f}(X),\cup)$ is the free join
semilattice. Hence, the join semilattice homomorphism
$\varphi:(\mathcal{P}_{f}(X^{*}),\cup)\to T(\mathcal{P}_{f}(X),\cup)$ given
by:

$\varphi(\\{x_{1}^{(1)}\cdots x_{n_{1}}^{(1)},\ldots,x_{1}^{(m)}\cdots
x_{n_{m}}^{(m)}\\})=\left\\{\left\\{x_{1}^{(1)}\right\\}\cdots\left\\{x_{n_{1}}^{(1)}\right\\},\ldots,\left\\{x_{1}^{(m)}\right\\}\cdots\left\\{x_{n_{m}}^{(m)}\right\\}\right\\}\Big{/}\theta$

is an isomorphism in $\operatorname{\mathtt{JSL}}$.

We considered $\mathcal{D}_{0}=\\{(\mathcal{P}_{f}(X),\cup)\mid
X\in\operatorname{\mathtt{Set}}\\}$. As every semiring is an
$\mathscr{E}$–quotient of $(\mathcal{P}_{f}(X^{*}),\cup)$, by the previous
Lemma we have that condition (B3) is satisfied.

Now, in the definition of the operator $\operatorname{\mathscr{L}}$ we should
formally have that $\operatorname{\mathscr{L}}(X)$ is a subspace of
$\operatorname{\mathtt{JSL}}(\mathcal{P}_{f}(X^{*}),\mathbf{2})$ but for
simplicity we work with $\operatorname{\mathtt{Set}}(X^{*},2)$ which is
isomorphic to $\operatorname{\mathtt{JSL}}(\mathcal{P}_{f}(X^{*}),\mathbf{2})$
in $\operatorname{\mathtt{StJSL}}$ under the correspondence $f\mapsto
f\circ\eta_{X^{*}}$ and $L\mapsto L^{\sharp}$,
$f\in\operatorname{\mathtt{JSL}}(\mathcal{P}_{f}(X^{*}),\mathbf{2})$ and
$L\in\operatorname{\mathtt{Set}}(X^{*},2)$, where $\eta_{X^{*}}$ and
$L^{\sharp}$ are defined as $\eta_{X^{*}}(w)=\\{w\\}$ and
$L^{\sharp}(\\{w_{1},\ldots,w_{n}\\})=\bigvee_{i=1}^{n}L(w_{i})$.

The duality between $\operatorname{\mathtt{JSL}}$ and
$\operatorname{\mathtt{StJSL}}$ is given by the hom-set functors
$\operatorname{\mathtt{JSL}}(\underline{\ \
},\mathbf{2}):\operatorname{\mathtt{JSL}}\to\operatorname{\mathtt{StJSL}}$ and
$\operatorname{\mathtt{StJSL}}(\underline{\ \
},\mathbf{2}):\operatorname{\mathtt{StJSL}}\to\operatorname{\mathtt{JSL}}$,
where $\mathbf{2}$ is the two–element join semilattice.

A variety of idempotent semirings is defined by an equational
$\mathsf{T}$–theory
$\\{\mathcal{P}_{f}(X^{*})\overset{e_{X}}{\operatorname{\longrightarrow\mkern-15.0mu\rightarrow}}Q_{X}\\}_{X\in\mathcal{D}_{0}}$
which by duality gives us the coequational $\mathsf{B}$–theory
$\\{\operatorname{\mathtt{JSL}}(e_{X},\mathbf{2})\\}_{X\in\mathcal{D}_{0}}$
which is equivalently defined by the image of every monomorphism
$\operatorname{\mathtt{JSL}}(e_{X},\mathbf{2})$, i.e., we define
$\operatorname{\mathscr{L}}(X):=\operatorname{Im}(\operatorname{\mathtt{JSL}}(e_{X},\mathbf{2}))$.
Closure of $\operatorname{\mathscr{L}}(X)$ under left and right derivatives
follows from the fact that each morphism $e_{X}$ in an equational
$\mathsf{T}$–theory is a homomorphism of idempotent semirings. In fact, for
every $v,w\in X^{*}$ and $f\in\operatorname{\mathtt{JSL}}(Q_{X},\mathbf{2})$
we have that

$(f\circ e_{X}\circ\eta_{X^{*}})_{v}(w)=(f\circ
e_{X}\circ\eta_{X^{*}})(vw)=(f_{e_{X}(\\{v\\})}\circ
e_{X}\circ\eta_{X^{*}})(w)$

where the function $f_{e_{X}(\\{v\\})}\in\operatorname{\mathtt{Set}}(Q_{X},2)$
is defined as $f_{e_{X}(\\{v\\})}(q)=f(e_{X}(\\{v\\})\cdot q)$, where $\cdot$
is the product operation in $\mathbf{Q_{X}}$, $q\in Q_{X}$. Note that
$f_{e_{X}(\\{v\\})}\in\operatorname{\mathtt{JSL}}(Q_{X},\mathbf{2})$ since for
any $p,q\in Q_{X}$ we have that

$f_{e_{X}(\\{v\\})}(p\lor q)=f(e_{X}(\\{v\\})\cdot(p\lor
q))=f(e_{X}(\\{v\\})\cdot p)\lor f(e_{X}(\\{v\\})\cdot
q)=f_{e_{X}(\\{v\\})}(p)\lor f_{e_{X}(\\{v\\})}(q)$

since $f\in\operatorname{\mathtt{JSL}}(Q_{X},\mathbf{2})$. Therefore, $(f\circ
e_{X}\circ\eta_{X^{*}})_{x}=f_{x}\circ
e_{X}\circ\eta_{X^{*}}\in\operatorname{\mathscr{L}}(X)$, i.e.,
$\operatorname{\mathscr{L}}(X)$ is closed under right derivatives. Closure
under left derivatives is proved in a similar way.

Conversely, any $S\in\operatorname{\mathtt{StJSL}}$ closed under left and
right derivatives such that $S$ is a subspace of
$\operatorname{\mathtt{JSL}}(\mathcal{P}_{f}(X^{*}),\mathbf{2})\in\operatorname{\mathtt{StJSL}}$
will define, by duality, the surjective function
$e_{S}:\mathcal{P}_{f}(X^{*})\to\operatorname{\mathtt{StJSL}}(S,\mathbf{2})$
such that $e_{S}(\\{w\\})(L)=L(\\{w\\})$, $w\in X^{*}$ and $L\in S$, which is
a morphism in
$\operatorname{\mathtt{JSL}}(\mathcal{P}_{f}(X^{*}),\operatorname{\mathtt{StJSL}}(S,\mathbf{2}))$.
We only need to show that for every $w\in X^{*}$ and
$U,V\in\mathcal{P}_{f}(X^{*})$ the equality $e_{S}(U)=e_{S}(V)$ implies that
$e_{S}(\\{w\\}U)=e_{S}(\\{w\\}V)$ and $e_{S}(U\\{w\\})=e_{S}(V\\{w\\})$. In
fact, assume that $e_{S}(U)=e_{S}(V)$, i.e., for every $L\in S$ we have that
$L(U)=L(V)$. Now, assume by contradiction that $e_{S}(\\{w\\}U)\neq
e_{S}(\\{w\\}V)$, i.e., there exists $L^{\prime}\in S$ such that
$L^{\prime}(\\{w\\}U)\neq L^{\prime}(\\{w\\}V)$, i.e.,
$(L^{\prime}\circ\eta_{X^{*}})_{w}(u)\neq(L^{\prime}\circ\eta_{X^{*}})_{w}(v)$
with $(L^{\prime}\circ\eta_{X^{*}})_{w}\in S$ by closure under right
derivatives, which is a contradiction. The equality
$e_{S}(U\\{w\\})=e_{S}(V\\{w\\})$ is proved in a similar way by using closure
under left derivatives. Therefore $e_{S}$ is a $\mathsf{T}$ algebra morphism
in $\mathscr{E}$.

###  A.3. Details for Section 3

####  A.3.1. Proof of Birkhoff’s Theorem for finite $\mathsf{T}$–algebras

In this subsection, we provide a proof of Theorem 3. We start by proving that
models of pseudoequational $\mathsf{T}$–theories are pseudovarieties of
$\mathsf{T}$–algebras.

######  Proposition A.20.

Let $\mathcal{D}$ be a complete concrete category such that its forgetful
functor preserves epis, monos and products, $\mathsf{T}$ a monad on
$\mathcal{D}$, $\mathcal{D}_{0}$ a full subcategory of $\mathcal{D}_{0}$ and
$\mathscr{E}/\mathscr{M}$ a factorization system on $\mathcal{D}$. Assume
(Bf1), (Bf2) and (Bf4). Let $\operatorname{\mathtt{P}}$ be a pseudoequational
$\mathsf{T}$–theory on $\mathcal{D}_{0}$. Then
$\operatorname{Mod}_{f}(\operatorname{\mathtt{P}})$ is a pseudovariety of
$\mathsf{T}$–algebras.

######  Proof A.21.

Clearly $\operatorname{Mod}_{f}(\operatorname{\mathtt{P}})$ is non empty since
$1=(1,!_{T1}\colon T1\to
1)\in\operatorname{Mod}_{f}(\operatorname{\mathtt{P}})$, where $1$ is the
terminal object in $\mathcal{D}$, which is finite since the forgetful functor
from $\mathcal{D}$ to $\operatorname{\mathtt{Set}}$ preserves products. Now we
have:

  1. i)

$\operatorname{Mod}_{f}(\operatorname{\mathtt{P}})$ is closed under
$\mathscr{E}$–quotients: Let
$\mathbf{A},\mathbf{B}\in\operatorname{Alg}(\mathsf{T})$ with
$\mathbf{A}\in\operatorname{Mod}_{f}(\operatorname{\mathtt{P}})$ and let
$e\in\operatorname{Alg}(\mathsf{T})(\mathbf{A},\mathbf{B})\cap\mathscr{E}$. We
have that $B$ is finite since $e$ is epi and the forgetful functor from
$\mathcal{D}$ to $\operatorname{\mathtt{Set}}$ preserves epis. Let
$f\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{B})$,
$X\in\mathcal{D}_{0}$. Using (Bf2), there exists
$k\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{A})$ such that
$f=e\circ k$. As
$\mathbf{A}\in\operatorname{Mod}_{f}(\operatorname{\mathtt{P}})$ then $k$
factors through some $e^{\prime}\in\operatorname{\mathtt{P}}(X)$ as $k=g\circ
e^{\prime}$. Then $f=e\circ k=e\circ g\circ e^{\prime}$ with
$e^{\prime}\in\operatorname{\mathtt{P}}(X)$, i.e.,
$\mathbf{B}\in\operatorname{Mod}_{f}(\operatorname{\mathtt{P}})$.

  2. ii)

$\operatorname{Mod}_{f}(\operatorname{\mathtt{P}})$ is closed under
$\mathscr{M}$–subalgebras: Let
$\mathbf{A},\mathbf{B}\in\operatorname{Alg}(\mathsf{T})$ with
$\mathbf{A}\in\operatorname{Mod}_{f}(\operatorname{\mathtt{P}})$ and let
$m\in\operatorname{Alg}(\mathsf{T})(\mathbf{B},\mathbf{A})\cap\mathscr{M}$. We
have that $B$ is finite since $m$ is mono and the forgetful functor from
$\mathcal{D}$ to $\operatorname{\mathtt{Set}}$ preserves monos. Let
$f\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{B})$,
$X\in\mathcal{D}_{0}$. As
$\mathbf{A}\in\operatorname{Mod}_{f}(\operatorname{\mathtt{P}})$ then $m\circ
f$ factors through some $e\in\operatorname{\mathtt{P}}(X)$ as $m\circ f=g\circ
e$. Let $f=m_{f}\circ e_{f}$ and $g=m_{g}\circ e_{g}$ be the factorizations of
$f$ and $g$, respectively. We have that $(m\circ m_{f})\circ e_{f}=m\circ
f=g\circ e=m_{g}\circ(e_{g}\circ e)$ where $m\circ m_{f},m_{g}\in\mathscr{M}$
and $e_{f},e_{g}\circ e\in\mathscr{E}$. Then by uniqueness of the
factorization we have that there is an isomorphism $\phi$ such that $\phi\circ
e_{g}\circ e=e_{f}$. Therefore $f=m_{f}\circ e_{f}=m_{f}\circ\phi\circ
e_{g}\circ e$ with $e\in\operatorname{\mathtt{P}}(X)$, i.e.,
$\mathbf{B}\in\operatorname{Mod}_{f}(\operatorname{\mathtt{P}})$.

  3. iii)

$\operatorname{Mod}_{f}(\operatorname{\mathtt{P}})$ is closed under finite
products: Let
$\mathbf{A}_{i}\in\operatorname{Mod}_{f}(\operatorname{\mathtt{P}})$, $i\in I$
with $I$ finite, and let $\mathbf{A}=\prod_{i\in I}\mathbf{A}_{i}$ be their
product in $\operatorname{Alg}(\mathsf{T})$ with projections $\pi_{i}:A\to
A_{i}$. We have that $A$ is finite since the forgetful functor from
$\mathcal{D}$ to $\operatorname{\mathtt{Set}}$ preserves products, $I$ is
finite, and each $A_{i}$ is finite. Let
$f\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{A})$,
$X\in\mathcal{D}_{0}$. As
$\mathbf{A}_{i}\in\operatorname{Mod}_{f}(\operatorname{\mathtt{P}})$ then
$\pi_{i}\circ f$ factors through some $e_{i}\in\operatorname{\mathtt{P}}(X)$
as $\pi_{i}\circ f=g_{i}\circ e_{i}$. Since $\operatorname{\mathtt{P}}$ is a
pseudoequational $\mathsf{T}$–theory there exists
$e\in\operatorname{\mathtt{P}}(X)$ such that every $e_{i}$ factors through $e$
as $h_{i}\circ e=e_{i}$, $i\in I$. Let $\mathbf{Q}$ be the codomain of $e$.
Now, by definition of $\mathbf{A}$ there exists
$h\in\operatorname{Alg}(\mathsf{T})(\mathbf{Q},\mathbf{A})$ such that
$\pi_{i}\circ h=g_{i}\circ h_{i}$. As $\pi_{i}\circ f=\pi_{i}\circ h\circ e$
for every $i\in I$, then $f=h\circ e$, $e\in\operatorname{\mathtt{P}}(X)$,
which means that
$\mathbf{A}\in\operatorname{Mod}_{f}(\operatorname{\mathtt{P}})$.

Given a class $K$ of algebras in $\operatorname{Alg}_{f}(\mathsf{T})$ define
the operator $\operatorname{\mathtt{P}}_{K}$ on $\mathcal{D}_{0}$ as follows:

$\operatorname{\mathtt{P}}_{K}(X)=\text{$\mathsf{T}$--algebra morphisms in
$\mathscr{E}$ with domain $\mathbf{TX}$ and codomain in $K$.}$

######  Proposition A.22.

Let $\mathcal{D}$ be a complete concrete category such that its forgetful
functor preserves epis, monos and products $\mathsf{T}$ a monad on
$\mathcal{D}$, $\mathcal{D}_{0}$ a full subcategory of $\mathcal{D}_{0}$ and
$\mathscr{E}/\mathscr{M}$ a factorization system on $\mathcal{D}$. Assume
(Bf1) and (Bf4). Let $K$ be a pseudovariety of $\mathsf{T}$–algebras. Then
$\operatorname{\mathtt{P}}_{K}$ is a pseudoequational $\mathsf{T}$–theory on
$\mathcal{D}_{0}$.

######  Proof A.23.

We have to prove properties i), ii), and ii) of Definition 3.1. In fact:

  1. i)

Let $X\in\mathcal{D}_{0}$, $I$ a finite set and
$f_{i}\in\operatorname{\mathtt{P}}_{K}(X)$, $i\in I$. Let $\mathbf{A}_{i}\in
K$ be the codomain of $f_{i}$. Let $\mathbf{A}=\prod_{i\in I}\mathbf{A}_{i}$
with projections
$\pi_{i}\in\operatorname{Alg}(\mathsf{T})(\mathbf{A},\mathbf{A}_{i})$. We have
$\mathbf{A}\in K$. Now, by definition of $\mathbf{A}$, there exists
$f\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{A})$ such that
$\pi_{i}\circ f=f_{i}$. Let $f=m_{f}\circ e_{f}$ be the factorization of $f$
with
$e_{f}\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{Q})\cap\mathscr{E}$
and
$m_{f}\in\operatorname{Alg}(\mathsf{T})(\mathbf{Q},\mathbf{A})\cap\mathscr{M}$.
We have that $\mathbf{Q}\in K$. Then $e_{f}$ is a morphism in
$\operatorname{\mathtt{P}}_{K}(X)$ such that every $f_{i}$ factors through
$e_{f}$.

  2. ii)

Let $X\in\mathcal{D}_{0}$, $e\in\operatorname{\mathtt{P}}_{K}(X)$ with
codomain $\mathbf{A}\in K$, and
$e^{\prime}\in\operatorname{Alg}(\mathsf{T})(\mathbf{A},\mathbf{B})\cap\mathscr{E}$.
We have that $\mathbf{B}$ is finite and that $\mathbf{B}\in K$. Therefore
$e^{\prime}\circ e\in\operatorname{\mathtt{P}}_{K}(X)$.

  3. iii)

Let $X,Y\in\mathcal{D}_{0}$, $f\in\operatorname{\mathtt{P}}_{K}(X)$ with
codomain $\mathbf{A}\in K$, and
$h\in\operatorname{Alg}(\mathsf{T})(\mathbf{TY},\mathbf{TX})$. Let $f\circ
h=m_{f\circ h}\circ e_{f\circ h}$ be the factorization of $f\circ h$ such that
$e_{f\circ
h}\in\operatorname{Alg}(\mathsf{T})(\mathbf{TY},\mathbf{Q})\cap\mathscr{E}$
and $m_{f\circ
h}\in\operatorname{Alg}(\mathsf{T})(\mathbf{Q},\mathbf{A})\cap\mathscr{M}$.
Then $\mathbf{Q}\in K$, which implies $e_{f\circ
h}\in\operatorname{\mathtt{P}}_{K}(Y)$.

######  Lemma A.24.

Let $\mathcal{D}$ be a complete concrete category such that its forgetful
functor preserves epis,monos and products, $\mathsf{T}$ a monad on
$\mathcal{D}$, $\mathcal{D}_{0}$ a full subcategory of $\mathcal{D}_{0}$ and
$\mathscr{E}/\mathscr{M}$ a factorization system on $\mathcal{D}$. Assume
(Bf1), (Bf2) and (Bf4). Let $\operatorname{\mathtt{P}}$ be a pseudoequational
$\mathsf{T}$–theory on $\mathcal{D}_{0}$. Let $X\in\mathcal{D}_{0}$ and
$e\in\operatorname{\mathtt{P}}(X)$ with codomain
$\mathbf{A}\in\operatorname{Alg}_{f}(\mathsf{T})$, then
$\mathbf{A}\in\operatorname{Mod}_{f}(\operatorname{\mathtt{P}})$.

######  Proof A.25.

Let $Y\in\mathcal{D}_{0}$ and
$f\in\operatorname{Alg}(\mathsf{T})(\mathbf{TY},\mathbf{A})$. We have to show
that $f$ factors through some element in $\operatorname{\mathtt{P}}(Y)$. We
have the following commutative diagram:

$TX$$Q$$A$$TY$$e$$e_{e\circ k}\ \ $$m_{e\circ k}$$k$$f$

where:

  1. -

the morphism $k$ is obtained from $f$ and $e$ by using (Bf2),

  2. -

$e\circ k=m_{e\circ k}\circ e_{e\circ k}$ is the factorization of $e\circ k$.

From the previous diagram we have that $e_{e\circ
k}\in\operatorname{\mathtt{P}}(Y)$, since $e\in\operatorname{\mathtt{P}}(X)$
and $\operatorname{\mathtt{P}}$ is a pseudoequational $\mathsf{T}$–theory.
Therefore $f$ factors through $e_{e\circ k}\in\operatorname{\mathtt{P}}(Y)$,
which implies that
$\mathbf{A}\in\operatorname{Mod}_{f}(\operatorname{\mathtt{P}})$.

To finish the proof of Theorem 3 we establish the following one–to–one
correspondence between pseudoequational $\mathsf{T}$–theories and
pseudovarieties of $\mathsf{T}$–algebras.

######  Proposition A.26.

Let $\mathcal{D}$ be a complete concrete category such that its forgetful
functor preserves epis, monos and products, $\mathsf{T}$ a monad on
$\mathcal{D}$, $\mathcal{D}_{0}$ a full subcategory of $\mathcal{D}_{0}$ and
$\mathscr{E}/\mathscr{M}$ a factorization system on $\mathcal{D}$. Assume
(Bf1), (Bf2) and (Bf4). Let $\operatorname{\mathtt{P}}$ be a pseudoequational
$\mathsf{T}$–theory on $\mathcal{D}_{0}$ and let $K$ be a pseudovariety of
$\mathsf{T}$–algebras. Then:

  1. i)

$\operatorname{\mathtt{P}}_{\operatorname{Mod}_{f}(\operatorname{\mathtt{P}})}=\operatorname{\mathtt{P}}$.

  2. ii)

Assume (Bf3), then $\operatorname{Mod}_{f}(\operatorname{\mathtt{P}}_{K})=K$.

######  Proof A.27.

  1. i)

Let $X\in\mathcal{D}_{0}$, we have to prove that
$\operatorname{\mathtt{P}}_{\operatorname{Mod}_{f}(\operatorname{\mathtt{P}})}(X)=\operatorname{\mathtt{P}}(X)$.
($\subseteq$): Let
$e\in\operatorname{\mathtt{P}}_{\operatorname{Mod}_{f}(\operatorname{\mathtt{P}})}(X)$
with codomain
$\mathbf{A}\in\operatorname{Mod}_{f}(\operatorname{\mathtt{P}})$. As
$\mathbf{A}\in\operatorname{Mod}_{f}(\operatorname{\mathtt{P}})$, there exists
$e^{\prime}\in\operatorname{\mathtt{P}}(X)$ such that $e$ factors through
$e^{\prime}$ as $g\circ e^{\prime}=e$. By (Bf1) and (Bf4) we have that $g$ is
a $\mathsf{T}$–algebra morphism. As $g\circ e^{\prime}=e\in\mathscr{E}$, then
$g\in\mathscr{E}$, and, as $\operatorname{\mathtt{P}}$ is a pseudoequational
$\mathsf{T}$–theory, then $g\circ
e^{\prime}=e\in\operatorname{\mathtt{P}}(X)$.
($\supseteq$): Let $e\in\operatorname{\mathtt{P}}(X)$ with codomain
$\mathbf{A}$. By Lemma A.24,
$\mathbf{A}\in\operatorname{Mod}_{f}(\operatorname{\mathtt{P}})$, i.e.,
$e\in\operatorname{\mathtt{P}}_{\operatorname{Mod}_{f}(\operatorname{\mathtt{P}})}(X)$.

  2. ii)

Let $\mathbf{A}$ be an object in $\operatorname{Alg}_{f}(\mathsf{T})$.
($\supseteq$): Assume that $\mathbf{A}\in K$. We have to show that
$\mathbf{A}\in\operatorname{Mod}_{f}(\operatorname{\mathtt{P}}_{K})$. In fact,
let $X\in\mathcal{D}_{0}$ and
$f\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{A})$. Let
$f=m_{f}\circ e_{f}$ be the factorization of $f$ with
$e_{f}\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{Q})\cap\mathscr{E}$
and
$m_{f}\in\operatorname{Alg}(\mathsf{T})(\mathbf{Q},\mathbf{A})\cap\mathscr{M}$.
Then $\mathbf{Q}\in K$, which implies that
$e_{f}\in\operatorname{\mathtt{P}}_{K}(X)$, i.e.,
$\mathbf{A}\in\operatorname{Mod}_{f}(\operatorname{\mathtt{P}}_{K})$.
($\subseteq$): Assume that
$\mathbf{A}\in\operatorname{Mod}_{f}(\operatorname{\mathtt{P}}_{K})$. By (R3)
there exists an object $X_{A}\in\mathcal{D}_{0}$ and
$e\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX_{A}},\mathbf{A})\cap\mathscr{E}$.
As $\mathbf{A}\in\operatorname{Mod}_{f}(\operatorname{\mathtt{P}}_{K})$, $e$
factors through some $e^{\prime}\in\operatorname{\mathtt{P}}_{K}(X_{A})$ as
$e=g\circ e^{\prime}$. Let $\mathbf{Q}\in K$ be the codomain of $e^{\prime}$.
As $g\circ e^{\prime}=e\in\mathscr{E}$, then $g\in\mathscr{E}$ and
$g\in\operatorname{Alg}(\mathsf{T})(\mathbf{Q},\mathbf{A})$ which implies that
$\mathbf{A}\in K$ since $\mathbf{Q}\in K$.

####  A.3.2. Details for Example 3.9

Let $\operatorname{\mathtt{P}}$ be a pseudoequational $\mathsf{T}_{K}$–theory
on $\mathcal{D}_{0}$ and let $\operatorname{\mathscr{L}}$ be an operator on
$\mathcal{D}_{0}$ satisfying the properties i), ii) and iii). Then:

  1. a)

Define the operator $\operatorname{\mathscr{L}}_{\operatorname{\mathtt{P}}}$
on $\mathcal{D}_{0}$ as
$\operatorname{\mathscr{L}}_{\operatorname{\mathtt{P}}}(X):=\bigcup_{e\in\operatorname{\mathtt{P}}(X)}\operatorname{Im}(\operatorname{\mathtt{Poset}}(e,\mathbf{2}_{c}))$.
Then $\operatorname{\mathscr{L}}_{\operatorname{\mathtt{P}}}$ satisfies
properties i), ii) and iii). The proof is similar to 3.6 a). Note that the
directed union of finite objects in $\operatorname{\mathtt{AlgCDL}}$ that are
subobjects of
$\operatorname{\mathtt{Poset}}(T_{K}X,\mathbf{2}_{c})\cong\operatorname{\mathtt{Set}}(T_{K}X,2)$
is a distributive sublattice of
$\operatorname{\mathtt{Poset}}(T_{K}X,\mathbf{2}_{c})\cong\operatorname{\mathtt{Set}}(T_{K}X,2)$.

  2. b)

Define the operator $\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}}$
on $\mathcal{D}_{0}$ such that
$\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}}(X)$ is the collection
of all $\mathsf{T}_{K}$–algebra morphisms $e\in\mathscr{E}$ with domain
$\mathbf{T_{K}X}$ and finite codomain such that
$\operatorname{Im}(\operatorname{\mathtt{Poset}}(e,\mathbf{2}_{c}))\subseteq\operatorname{\mathscr{L}}(X)$.
We claim that $\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}}$ is a
pseudoequational $\mathsf{T}_{K}$–theory. Non–emptiness and properties ii) and
iii) from Definition 3.1 are proved in a similar way as in 3.6 b). Now, to
prove property i) in Definition 3.1, consider a family
$\\{T_{K}X\overset{e_{i}}{\operatorname{\longrightarrow\mkern-15.0mu\rightarrow}}A_{i}\\}_{i\in
I}$ in $\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}}(X)$ with $I$
finite such that
$\operatorname{Im}(\operatorname{\mathtt{Poset}}(e_{i},\mathbf{2}_{f}))\subseteq\operatorname{\mathscr{L}}(X)$,
we need to find a morphism
$e\in\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}}(X)$ such that
every $e_{i}$ factors through $e$. In fact, let $\mathbf{A}$ be the product of
$\prod_{i\in I}\mathbf{A_{i}}$ with projections $\pi_{i}:A\to A_{i}$, then, by
the universal property of $\mathbf{A}$ there exists a $\mathsf{T}_{K}$–algebra
morphism $f:T_{K}X\to A$ such that $\pi_{i}\circ f=e_{i}$, for every $i\in I$.
Let $f=m_{f}\circ e_{f}$ be the factorization of $f$ in
$\operatorname{Alg}(\mathsf{T}_{K})$. We claim that $e=e_{f}$ is a morphism in
$\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}}(X)$ such that every
$e_{i}$ factors through $e$. Clearly, from the construction above, each
$e_{i}$ factors through $e=e_{f}$. Now, let’s prove that
$\operatorname{Im}(\operatorname{\mathtt{Poset}}(e,\mathbf{2}_{c}))\subseteq\operatorname{\mathscr{L}}(X)$.
In fact, let $\mathbf{S}$ be the codomain of $e=e_{f}$ and let
$g\in\operatorname{\mathtt{Poset}}(S,\mathbf{2}_{c})$. We have to prove that
$g\circ e\in\operatorname{\mathscr{L}}(X)$ which follows from the following
identity:

$g\circ e=\bigcup_{s\in g}\left(\bigcap_{i\in I}h_{i,s}\circ e_{i}\right)$

where $h_{i,s}\in\operatorname{\mathtt{Poset}}(A_{i},\mathbf{2}_{c})$ is
defined as $h_{i,s}(x)=1$ iff $x\geq\pi_{i}(m_{f}(s))$. In fact, for any $w\in
T_{K}X$ we have that $(g\circ e)(w)=1$ implies $(h_{i,e(w)}\circ e_{i})(w)=1$
for every $i\in I$, on the other hand, if there is $s\in g$ such that
$(h_{i,s}\circ e_{i})(w)=1$ for every $i\in I$ then $e_{i}(w)\geq(\pi_{i}\circ
m_{f})(s)$, i.e., $(\pi_{i}\circ m_{f}\circ e)(w)\geq(\pi_{i}\circ m_{f})(s)$
for every $i\in I$ (since $e_{i}=\pi_{i}\circ m_{f}\circ e$), which implies
that $(m_{f}\circ e)(w)\geq m_{f}(s)$ (since the order in $\mathbf{A}$ is
componentwise) and the later implies that $e(w)\geq s$ (since $m_{f}$ is an
embedding). Therefore, $(g\circ e)(w)=1$ since $s\in g$ (i.e., $g(s)=1$).

Now, for every $s\in S$ and $i\in I$ the composition $h_{i,s}\circ e_{i}$
belongs to $\operatorname{\mathscr{L}}(X)$ since $h_{i,s}\circ
e_{i}\in\operatorname{Im}(\operatorname{\mathtt{Poset}}(e_{i},\mathbf{2}_{c}))\subseteq\operatorname{\mathscr{L}}(X)$.
As $S$ and $I$ are finite then $g\circ e\in\operatorname{\mathscr{L}}(X)$
because $\operatorname{\mathscr{L}}(X)$ is a distributive lattice.

  3. c)

We have that
$\operatorname{\mathtt{P}}=\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}_{\operatorname{\mathtt{P}}}}$.
In fact, for every $X\in\mathcal{D}_{0}$ the inclusion
$\operatorname{\mathtt{P}}(X)\subseteq\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}_{\operatorname{\mathtt{P}}}}(X)$
is obvious. Now, to prove that
$\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}_{\operatorname{\mathtt{P}}}}(X)\subseteq\operatorname{\mathtt{P}}(X)$,
let
$e^{\prime}\in\operatorname{Alg}(\mathsf{T}_{K})(\mathbf{T_{K}X},\mathbf{A})\cap\mathscr{E}$
with finite codomain such that
$e^{\prime}\in\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}_{\operatorname{\mathtt{P}}}}(X)$,
i.e.,
$\operatorname{Im}(\operatorname{\mathtt{Poset}}(e^{\prime}.\mathbf{2}_{f}))\subseteq\bigcup_{e\in\operatorname{\mathtt{P}}(X)}\operatorname{Im}(\operatorname{\mathtt{Poset}}(e,\mathbf{2}_{c}))$.
Then the previous inclusion means that for every
$f\in\operatorname{\mathtt{Poset}}(\mathbf{A},\mathbf{2}_{c})$ there exists
$e_{f}\in\operatorname{\mathtt{P}}(X)$ and $g_{f}$ such that $f\circ
e^{\prime}=g_{f}\circ e_{f}$. As $\\{e_{f}\mid
f\in\operatorname{\mathtt{Poset}}(\mathbf{A},\mathbf{2}_{c})\\}$ is finite,
then there exists $e\in\operatorname{\mathtt{P}}(X)$ such that each $e_{f}$
factors through $e$. We will prove that $e^{\prime}$ factors through
$e\in\operatorname{\mathtt{P}}(X)$ which will imply that
$e^{\prime}\in\operatorname{\mathtt{P}}(X)$, since $\operatorname{\mathtt{P}}$
is a pseudoequational $\mathsf{T}_{K}$–theory. It is enough to show that for
all $u,v\in T_{K}X$ $e(u)\leq e(v)$ implies $e^{\prime}(u)\leq e^{\prime}(v)$.
In fact, assume that $e(u)\leq e(v)$ and define
$f^{\prime}\in\operatorname{\mathtt{Poset}}(\mathbf{A},\mathbf{2}_{c})$ as
$f^{\prime}(x)=1$ iff $e^{\prime}(u)\leq x$. Then, as $e_{f^{\prime}}$ factors
through $e$ we have that $e_{f^{\prime}}(u)\leq e_{f^{\prime}}(v)$. By
applying $g_{f^{\prime}}$ to the last inequality, and using the fact that
$f^{\prime}\circ e^{\prime}=g_{f^{\prime}}\circ e_{f^{\prime}}$, we get
$1=f^{\prime}(e^{\prime}(u))\leq f^{\prime}(e^{\prime}(v))$ which implies that
$e^{\prime}(u)\leq e^{\prime}(v)$ by definition of $f^{\prime}$.

  4. d)

Similar to 3.6 d) by making the obvious changes.

####  A.3.3. Details for Example 3.11

Let $\operatorname{\mathtt{P}}$ be a pseudoequational $\mathsf{T}$–theory on
$\mathcal{D}_{0}$ and let $\operatorname{\mathscr{L}}$ be an operator on
$\mathcal{D}_{0}$ satisfying the properties i), ii) and iii). Then:

  1. a)

Define the operator $\operatorname{\mathscr{L}}_{\operatorname{\mathtt{P}}}$
on $\mathcal{D}_{0}$ as
$\operatorname{\mathscr{L}}_{\operatorname{\mathtt{P}}}(X):=\bigcup_{e\in\operatorname{\mathtt{P}}(X)}\operatorname{Im}(\operatorname{\mathtt{Vec}_{\mathbb{K}}}(e,\mathbb{K}))$.
We claim that $\operatorname{\mathscr{L}}_{\operatorname{\mathtt{P}}}$
satisfies properties i), ii) and iii). The proof is similar to 3.6 a). Note
that the directed union of finite objects in
$\operatorname{\mathtt{StVec}_{\mathbb{K}}}$ that are subobjects of
$\operatorname{\mathtt{Vec}_{\mathbb{K}}}(\mathsf{V}(X^{*}),\mathbb{K})$ is a
$\mathbb{K}$–vector space which is a subspace of
$\operatorname{\mathtt{Vec}_{\mathbb{K}}}(\mathsf{V}(X^{*}),\mathbb{K})$.

  2. b)

Define the operator $\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}}$
on $\mathcal{D}_{0}$ such that
$\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}}(X)$ is the collection
of all $\mathsf{T}$–algebra morphisms $e\in\mathscr{E}$ with domain
$\mathbf{TX}$ and finite codomain such that
$\operatorname{Im}(\operatorname{\mathtt{Vec}_{\mathbb{K}}}(e,\mathbb{K}))\subseteq\operatorname{\mathscr{L}}(X)$.
We claim that $\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}}$ is a
pseudoequational $\mathsf{T}$–theory. Non–emptiness and properties ii) and
iii) from Definition 3.1 are proved in a similar way as in 3.6 b). Now, to
prove property i) in Definition 3.1, consider a family
$\\{TX\overset{e_{i}}{\operatorname{\longrightarrow\mkern-15.0mu\rightarrow}}A_{i}\\}_{i\in
I}$ in $\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}}(X)$ with $I$
finite such that
$\operatorname{Im}(\operatorname{\mathtt{Vec}_{\mathbb{K}}}(e_{i},\mathbb{K}))\subseteq\operatorname{\mathscr{L}}(X)$,
we need to find a morphism
$e\in\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}}(X)$ such that
every $e_{i}$ factors through $e$. In fact, let $\mathbf{A}$ be the product of
$\prod_{i\in I}\mathbf{A_{i}}$ with projections $\pi_{i}:A\to A_{i}$, then, by
the universal property of $\mathbf{A}$ there exists a $\mathsf{T}$–algebra
morphism $f:TX\to A$ such that $\pi_{i}\circ f=e_{i}$, for every $i\in I$. Let
$f=m_{f}\circ e_{f}$ be the factorization of $f$ in
$\operatorname{Alg}(\mathsf{T})$. We claim that $e=e_{f}$ is a morphism in
$\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}}(X)$ such that every
$e_{i}$ factors through $e$. Clearly, from the construction above, each
$e_{i}$ factors through $e=e_{f}$. Now, let’s prove that
$\operatorname{Im}(\operatorname{\mathtt{Vec}_{\mathbb{K}}}(e,\mathbb{K}))\subseteq\operatorname{\mathscr{L}}(X)$.
In fact, let $\mathbf{S}$ be the codomain of $e=e_{f}$ and let
$g\in\operatorname{\mathtt{Vec}_{\mathbb{K}}}(\mathbf{S},\mathbb{K})$. Let
$\hat{g}\in\operatorname{\mathtt{Vec}_{\mathbb{K}}}(\mathbf{A},\mathbb{K})$
such that $\hat{g}\circ m_{f}=g$ (this can be done since $\mathbb{K}$ is
injective. In fact, define $\hat{g}$ as zero in
$A\smallsetminus\operatorname{Im}(m_{f})$) and let
$\iota_{i}\in\operatorname{\mathtt{Vec}_{\mathbb{K}}}(\mathbf{A}_{i},\mathbf{A})$
such that $\pi_{i}\circ\iota_{i}=id_{A_{i}}$ and
$(\pi_{i^{\prime}}\circ\iota_{i})(y)=0$ if $i^{\prime}\neq i$. Note that for
every $x\in A$ we have $x=\sum_{i\in I}(\iota_{i}\circ\pi_{i})(x)$. We have to
prove that $g\circ e\in\operatorname{\mathscr{L}}(X)$ which follows from the
following identity:

$g\circ e=\sum_{i\in I}\hat{g}\circ\iota_{i}\circ e_{i}$

In fact, for any $x\in\mathsf{V}(X^{*})$ we have:

$\displaystyle(g\circ e)(x)$ $\displaystyle=(\hat{g}\circ m_{f}\circ
e)(x)=\hat{g}(m_{f}(e(x)))=\hat{g}\left(\sum_{i\in
I}(\iota_{i}\circ\pi_{i})(m_{f}(e(x)))\right)$ $\displaystyle=\sum_{i\in
I}(\hat{g}\circ\iota_{i}\circ\pi_{i}\circ m_{f}\circ e)(x)=\sum_{i\in
I}(\hat{g}\circ\iota_{i}\circ e_{i})(x)$

From that we get that $g\circ e\in\operatorname{\mathscr{L}}(X)$ since each
$\hat{g}\circ\iota_{i}\circ e_{i}\in\operatorname{\mathscr{L}}(X)$ and
$\operatorname{\mathscr{L}}(X)$ is a subspace of
$\operatorname{\mathtt{Vec}_{\mathbb{K}}}(\mathsf{V}(X^{*}),\mathbb{K})$.

  3. c)

We have that
$\operatorname{\mathtt{P}}=\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}_{\operatorname{\mathtt{P}}}}$.
In fact, for every $X\in\mathcal{D}_{0}$ the inclusion
$\operatorname{\mathtt{P}}(X)\subseteq\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}_{\operatorname{\mathtt{P}}}}(X)$
is obvious. Now, to prove that
$\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}_{\operatorname{\mathtt{P}}}}(X)\subseteq\operatorname{\mathtt{P}}(X)$,
let
$e^{\prime}\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{A})\cap\mathscr{E}$
with finite codomain such that
$e^{\prime}\in\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}_{\operatorname{\mathtt{P}}}}(X)$,
i.e.,
$\operatorname{Im}(\operatorname{\mathtt{Vec}_{\mathbb{K}}}(e^{\prime}.\mathbb{K}))\subseteq\bigcup_{e\in\operatorname{\mathtt{P}}(X)}\operatorname{Im}(\operatorname{\mathtt{Vec}_{\mathbb{K}}}(e,\mathbb{K}))$.
Then the previous inclusion means that for every
$f\in\operatorname{\mathtt{Vec}_{\mathbb{K}}}(\mathbf{A},\mathbb{K})$ there
exists $e_{f}\in\operatorname{\mathtt{P}}(X)$ and $g_{f}$ such that $f\circ
e^{\prime}=g_{f}\circ e_{f}$. As $\\{e_{f}\mid
f\in\operatorname{\mathtt{Vec}_{\mathbb{K}}}(\mathbf{A},\mathbb{K})\\}$ is
finite, then there exists $e\in\operatorname{\mathtt{P}}(X)$ such that each
$e_{f}$ factors through $e$. We will prove that $e^{\prime}$ factors through
$e\in\operatorname{\mathtt{P}}(X)$ which will imply that
$e^{\prime}\in\operatorname{\mathtt{P}}(X)$, since $\operatorname{\mathtt{P}}$
is a pseudoequational $\mathsf{T}$–theory. It is enough to show that for all
$u,v\in X^{*}$ $e(u)=e(v)$ implies $e^{\prime}(u)=e^{\prime}(v)$. In fact,
assume that $e(u)=e(v)$ and suppose by contradiction that $e^{\prime}(u)\neq
e^{\prime}(v)$, then there exist
$f^{\prime}\in\operatorname{\mathtt{Vec}_{\mathbb{K}}}(\mathbf{A},\mathbb{K})$
such that $(f^{\prime}\circ e^{\prime})(u)\neq(f^{\prime}\circ
e^{\prime})(v)$, but then $e(u)=e(v)$ implies $(g_{f^{\prime}}\circ
e_{f^{\prime}})(u)=(g_{f^{\prime}}\circ e_{f^{\prime}})(v)$, since
$e_{f^{\prime}}$ factors through $e$, which is a contradiction since
$g_{f^{\prime}}\circ e_{f^{\prime}}=f^{\prime}\circ e^{\prime}$.

  4. d)

Similar to 3.6 d) by making the obvious changes.

####  A.3.4. Details for Example 3.12

Let $\operatorname{\mathtt{P}}$ be a pseudoequational $\mathsf{T}$–theory and
let $\operatorname{\mathscr{L}}$ be an operator on $\mathcal{D}_{0}$
satisfying the properties i), ii) and iii). Then:

  1. a)

Define the operator $\operatorname{\mathscr{L}}_{\operatorname{\mathtt{P}}}$
on $\mathcal{D}_{0}$ as
$\operatorname{\mathscr{L}}_{\operatorname{\mathtt{P}}}(X):=\bigcup_{e\in\operatorname{\mathtt{P}}(X)}\operatorname{Im}(\operatorname{\mathtt{JSL}}(e,\mathbf{2}))$.
We claim that $\operatorname{\mathscr{L}}_{\operatorname{\mathtt{P}}}$
satisfies properties i), ii) and iii). The proof is similar to 3.6 a). Note
that the directed union of finite objects in $\operatorname{\mathtt{StJSL}}$
that are subobjects of
$\operatorname{\mathtt{JSL}}(\mathcal{P}_{f}(X^{*}),\mathbf{2})\cong\operatorname{\mathtt{Set}}(X^{*},2)$
is a join subsemilattice of
$\operatorname{\mathtt{JSL}}(\mathcal{P}_{f}(X^{*}),\mathbf{2})\cong\operatorname{\mathtt{Set}}(X^{*},2)$.

  2. b)

Define the operator $\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}}$
on $\mathcal{D}_{0}$ such that
$\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}}(X)$ is the collection
of all $\mathsf{T}$–algebra morphisms $e\in\mathscr{E}$ with domain
$\mathbf{TX}$ and finite codomain such that
$\operatorname{Im}(\operatorname{\mathtt{JSL}}(e,\mathbf{2}_{c}))\subseteq\operatorname{\mathscr{L}}(X)$.
We claim that $\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}}$ is a
pseudoequational $\mathsf{T}$–theory. Non–emptiness and properties ii) and
iii) from Definition 3.1 are proved in a similar way as in 3.6 b). Now, to
prove property i) in Definition 3.1, consider a family
$\\{TX\overset{e_{i}}{\operatorname{\longrightarrow\mkern-15.0mu\rightarrow}}A_{i}\\}_{i\in
I}$ in $\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}}(X)$ with $I$
finite such that
$\operatorname{Im}(\operatorname{\mathtt{JSL}}(e_{i},\mathbf{2}))\subseteq\operatorname{\mathscr{L}}(X)$,
we need to find a morphism
$e\in\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}}(X)$ such that
every $e_{i}$ factors through $e$. In fact, let $\mathbf{A}$ be the product of
$\prod_{i\in I}\mathbf{A_{i}}$ with projections $\pi_{i}:A\to A_{i}$, then, by
the universal property of $\mathbf{A}$ there exists a $\mathsf{T}$–algebra
morphism $f:TX\to A$ such that $\pi_{i}\circ f=e_{i}$, for every $i\in I$. Let
$f=m_{f}\circ e_{f}$ be the factorization of $f$ in
$\operatorname{Alg}(\mathsf{T})$. We claim that $e=e_{f}$ is a morphism in
$\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}}(X)$ such that every
$e_{i}$ factors through $e$. Clearly, from the construction above, each
$e_{i}$ factors through $e=e_{f}$. Now, let’s prove that
$\operatorname{Im}(\operatorname{\mathtt{JSL}}(e,\mathbf{2}))\subseteq\operatorname{\mathscr{L}}(X)$.
In fact, let $\mathbf{S}$ be the codomain of $e=e_{f}$ and let
$g\in\operatorname{\mathtt{JSL}}(S,\mathbf{2})$. Let
$\hat{g}\in\operatorname{\mathtt{JSL}}(\mathbf{A},\mathbf{2})$ such that
$\hat{g}\circ m_{f}=g$ (this can be done since $\mathbf{2}$ is an injective
semilattice, see [15, Lemma 1]) and let
$\iota_{i}\in\operatorname{Alg}(\mathsf{T})(\mathbf{A}_{i},\mathbf{A})$ such
that $\pi_{i}\circ\iota_{i}=id_{A_{i}}$ and
$(\pi_{i^{\prime}}\circ\iota_{i})(y)=0$ if $i^{\prime}\neq i$. Note that for
every $x\in A$ we have $x=\bigvee_{i\in I}(\iota_{i}\circ\pi_{i})(x)$. We have
to prove that $g\circ e\in\operatorname{\mathscr{L}}(X)$ which follows from
the following identity:

$g\circ e=\bigvee_{i\in I}\hat{g}\circ\iota_{i}\circ e_{i}$

In fact, for any $W\in\mathcal{P}_{f}(X^{*})$ we have:

$\displaystyle(g\circ e)(W)$ $\displaystyle=(\hat{g}\circ m_{f}\circ
e)(W)=\hat{g}\left(\bigvee_{i\in I}(\iota_{i}\circ\pi_{i}\circ m_{f}\circ
e)(W)\right)$ $\displaystyle\bigvee_{i\in
I}(\hat{g}\circ\iota_{i}\circ\pi_{i}\circ m_{f}\circ e)(W)=\left(\bigvee_{i\in
I}\hat{g}\circ\iota_{i}\circ e_{i}\right)(W)$

From that we get that $g\circ e\in\operatorname{\mathscr{L}}(X)$ since each
$\hat{g}\circ\iota_{i}\circ e_{i}\in\operatorname{\mathscr{L}}(X)$ and
$\operatorname{\mathscr{L}}(X)$ is a join subsemilattice of
$\operatorname{\mathtt{JSL}}(\mathbf{TX},\mathbf{2})\cong\operatorname{\mathtt{Set}}(X^{*},2)$.

  3. c)

We have that
$\operatorname{\mathtt{P}}=\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}_{\operatorname{\mathtt{P}}}}$.
In fact, for every $X\in\mathcal{D}_{0}$ the inclusion
$\operatorname{\mathtt{P}}(X)\subseteq\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}_{\operatorname{\mathtt{P}}}}(X)$
is obvious. Now, to prove that
$\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}_{\operatorname{\mathtt{P}}}}(X)\subseteq\operatorname{\mathtt{P}}(X)$,
let
$e^{\prime}\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{A})\cap\mathscr{E}$
with finite codomain such that
$e^{\prime}\in\operatorname{\mathtt{P}}_{\operatorname{\mathscr{L}}_{\operatorname{\mathtt{P}}}}(X)$,
i.e.,
$\operatorname{Im}(\operatorname{\mathtt{JSL}}(e^{\prime}.\mathbf{2}))\subseteq\bigcup_{e\in\operatorname{\mathtt{P}}(X)}\operatorname{Im}(\operatorname{\mathtt{JSL}}(e,\mathbf{2}))$.
Then the previous inclusion means that for every
$f\in\operatorname{\mathtt{JSL}}(\mathbf{A},\mathbf{2})$ there exists
$e_{f}\in\operatorname{\mathtt{P}}(X)$ and $g_{f}$ such that $f\circ
e^{\prime}=g_{f}\circ e_{f}$. As $\\{e_{f}\mid
f\in\operatorname{\mathtt{JSL}}(\mathbf{A},\mathbf{2})\\}$ is finite, then
there exists $e\in\operatorname{\mathtt{P}}(X)$ such that each $e_{f}$ factors
through $e$. We will prove that $e^{\prime}$ factors through
$e\in\operatorname{\mathtt{P}}(X)$ which will imply that
$e^{\prime}\in\operatorname{\mathtt{P}}(X)$, since $\operatorname{\mathtt{P}}$
is a pseudoequational $\mathsf{T}$–theory. It is enough to show that for all
$u,v\in TX$ $e(u)=e(v)$ implies $e^{\prime}(u)=e^{\prime}(v)$. In fact, assume
that $e(u)=e(v)$ and suppose by contradiction that $e^{\prime}(u)\neq
e^{\prime}(v)$, then there exist
$f^{\prime}\in\operatorname{\mathtt{JSL}}(\mathbf{A},\mathbf{2})$ such that
$(f^{\prime}\circ e^{\prime})(u)\neq(f^{\prime}\circ e^{\prime})(v)$, but then
$e(u)=e(v)$ implies $(g_{f^{\prime}}\circ
e_{f^{\prime}})(u)=(g_{f^{\prime}}\circ e_{f^{\prime}})(v)$, since
$e_{f^{\prime}}$ factors through $e$, which is a contradiction since
$g_{f^{\prime}}\circ e_{f^{\prime}}=f^{\prime}\circ e^{\prime}$.

  4. d)

Similar to 3.6 d) by making the obvious changes.

###  A.4. Details for Section 4

####  A.4.1. Proof of local Birkhoff’s Theorem for $\mathsf{T}$–algebras

######  Lemma A.28.

Let $\mathcal{D}$ be a category, $\mathscr{E}/\mathscr{M}$ a factorization
system on $\mathcal{D}$, $\mathsf{T}=(T,\eta,\mu)$ a monad on $\mathcal{D}$
and $X\in\mathcal{D}$. Assume (b2). Let
$TX\overset{e_{X}}{\operatorname{\longrightarrow\mkern-15.0mu\rightarrow}}Q_{X}$
be a local equational $\mathsf{T}$–theory on $X$. Then
$\mathbf{Q_{X}}\in\operatorname{Mod}(e_{X})$.

######  Proof A.29.

Same as in Lemma A.3 by considering $\mathcal{D}_{0}=\\{X\\}$.

######  Proposition A.30.

Let $\mathcal{D}$ be a category, $\mathscr{E}/\mathscr{M}$ a factorization
system on $\mathcal{D}$, $\mathsf{T}=(T,\eta,\mu)$ a monad on $\mathcal{D}$
and $X\in\mathcal{D}$. Assume (b1) and (b2). Let
$TX\overset{(e_{i})_{X}}{\operatorname{\longrightarrow\mkern-15.0mu\rightarrow}}(Q_{i})_{X}$
be a local equational $\mathsf{T}$–theory on $X$, $i=1,2$. If
$(e_{1})_{X}\neq(e_{2})_{X}$ then
$\operatorname{Mod}((e_{1})_{X})\neq\operatorname{Mod}((e_{2})_{X})$.

######  Proof A.31.

Same as in Proposition A.5 by considering $\mathcal{D}_{0}=\\{X\\}$.

######  Proposition A.32.

Let $\mathcal{D}$ be a complete category, $\mathsf{T}=(T,\eta,\mu)$ a monad on
$\mathcal{D}$, $\mathscr{E}/\mathscr{M}$ a factorization system on
$\mathcal{D}$ and $X\in\mathcal{D}$. Assume (b1), (b2) and (b3). Let $e_{X}$
be a local equational $\mathsf{T}$–theory on $X$. Then
$\operatorname{Mod}(e_{X})$ is a local variety of $X$–generated
$\mathsf{T}$–algebras.

######  Proof A.33.

$\operatorname{Mod}(e_{X})$ is nonempty by Lemma A.28. Put
$TX\overset{e_{X}}{\operatorname{\longrightarrow\mkern-15.0mu\rightarrow}}Q_{X}$,
then:

  1. i)

$\operatorname{Mod}(e_{X})$ is closed under $\mathscr{E}$–quotients: similar
proof to that of Proposition A.7. Note that an $\mathscr{E}$–quotient of an
$X$–generated $\mathsf{T}$–algebra is $X$–generated.

  2. ii)

$\operatorname{Mod}(e_{X})$ is closed under $X$–generated
$\mathscr{M}$–subalgebras: similar proof to that of Proposition A.7.

  3. iii)

$\operatorname{Mod}(e_{X})$ is closed under subdirect products: Let
$\mathbf{A}_{i}\in\operatorname{Mod}(e_{X})$, $i\in I$, and let $\mathbf{S}$
be the subdirect product of the family $\\{(\mathbf{A}_{i},e_{i})\\}_{i\in
I}$, where
$e_{i}\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{A}_{i})\cap\mathscr{E}$,
$i\in I$. Let $f\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{S})$
then we have the following commutative diagram:

$TX$$S$$R$$Q_{X}$$P$$\prod_{i\in
I}A_{i}$$A_{j}$$TX$$e_{X}$$e_{f}$$e_{g}$$e_{e}$$e_{j}$$f$$e$$g$$g_{j}$$\pi_{j}$$m_{g}$$m_{f}$$m_{e}$

where:

    1. -

the two right triangles are obtained from the construction of $\mathbf{S}$,

    2. -

$f=m_{f}\circ e_{f}$ is the factorization of $f$,

    3. -

$g_{j}$ is obtained from the property that
$\mathbf{A}_{j}\in\operatorname{Mod}(e_{X})$, i.e., $\pi_{j}\circ m_{e}\circ
f=g_{j}\circ e_{X}$, $j\in I$,

    4. -

$g$ is obtained from the morphisms $g_{j}$ by using the universal property of
the product $\prod_{i\in I}\mathbf{A}_{i}$, and

    5. -

$g=m_{g}\circ e_{g}$ is the factorization of $g$.

Then, by the universal property of the product, we have that $m_{e}\circ
m_{f}\circ e_{f}=m_{g}\circ e_{g}\circ e_{X}$, where $e_{g}\circ
e_{X},e_{f}\in\mathscr{E}$ and $m_{g},m_{e}\circ m_{f}\in\mathscr{M}$. Hence,
by uniquenes of factorization we have that there is an isomorphism $\phi$ such
that $e_{f}=\phi\circ e_{g}\circ e_{X}$, which implies that $f=m_{f}\circ
e_{f}=m_{f}\circ\phi\circ e_{g}\circ e_{X}$, i.e.,
$\mathbf{S}\in\operatorname{Mod}(e_{X})$.

######  Proposition A.34.

Let $\mathcal{D}$ be a complete category, $\mathscr{E}/\mathscr{M}$ a
factorization system on $\mathcal{D}$, $\mathsf{T}=(T,\eta,\mu)$ a monad on
$\mathcal{D}$ and $X\in\mathcal{D}$. Assume (b1), (b3) and (b4). Let $V$ be a
local variety of $X$–generated $\mathsf{T}$–algebras. Then
$V=\operatorname{Mod}(e_{X})$ for some local equational $\mathsf{T}$–theory
$e_{X}$ on $X$.

Notice that, if we assume (b2), the local equational $\mathsf{T}$–theory
$e_{X}$ on $X$ is unique by Proposition A.30.

######  Proof A.35.

We prove the proposition in two steps: i) the construction of $e_{X}$, and ii)
to show that $V=\operatorname{Mod}(e_{X})$. In fact:

  1. i)

Let
$H=\\{TX\overset{e_{i}}{\operatorname{\longrightarrow\mkern-15.0mu\rightarrow}}P_{i}\\}_{i\in
I}$ be the collection of all $\mathsf{T}$–algebra morphisms, up to
isomorphism, in $\mathscr{E}$ with domain $TX$ and codomain in the variety
$V$. By (b4), $H$ is a set. Put $\mathbf{P}=\prod_{i\in I}\mathbf{P}_{i}$ and
let $\pi_{i}\in\operatorname{Alg}(\mathsf{T})(\mathbf{P},\mathbf{P}_{i})$ be
the $i$th–projection. Then we have the following commutative diagram in
$\operatorname{Alg}(\mathsf{T})$:

$Q_{X}$$P_{i}$$TX$$P$$\ \ m_{X}$$e_{X}$$k$$\pi_{i}$$e_{i}$

where $k\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{P})$ is obtained
from the universal property of the product $\mathbf{P}$ and $k=m_{X}\circ
e_{X}$ is the factorization of $k$, i.e., $m_{X}\in\mathscr{M}$ and
$e_{X}\in\mathscr{E}$. Observe that $\mathbf{Q_{X}}\in V$ since it is a
subdirect product of elements in $V$.

Claim:
$TX\overset{e_{X}}{\operatorname{\longrightarrow\mkern-15.0mu\rightarrow}}Q_{X}$
is a local equational $\mathsf{T}$–theory on $X$.

Let $g\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{TX})$. We have to
prove that there exists
$g^{\prime}\in\operatorname{Alg}(\mathsf{T})(\mathbf{Q_{X}},\mathbf{Q_{Y}})$
such that $g^{\prime}\circ e_{X}=e_{Y}\circ g$. In fact, we have the following
commutative diagram:

$P$$TX$$Q_{X}$$TX$$Q_{X}$$S=P_{j}$$m_{e_{X}\circ g}$$m_{X}$$e_{X}$$e_{X}$$\ \
e_{e_{X}\circ g}=e_{j}$$g$$\pi_{j}$

where $e_{X}\circ g=m_{e_{X}\circ g}\circ e_{e_{X}\circ g}$ is the
factorization of $e_{X}\circ g$ and $\mathbf{S}$ is the codomain of
$e_{e_{X}\circ g}$. From that we have then that $\mathbf{S}$ is an
$X$–generated $\mathscr{M}$–subalgebra of $\mathbf{Q_{X}}\in V$. Hence
$\mathbf{S}\in V$ and therefore $\mathbf{S}=\mathbf{P}_{j}$ and $e_{e_{X}\circ
g}=e_{j}$ for some $j\in I$. Finally, commutativity of the triangle follows
from the definition of $\mathbf{Q_{X}}$ above. Therefore, $e_{X}$ is a local
equational $\mathsf{T}$–theory on $X$.

  2. ii)

Let us prove that $V=\operatorname{Mod}(e_{X})$.
$(\supseteq)$: Let $\mathbf{A}\in\operatorname{Alg}(\mathsf{T})$ such that
$\mathbf{A}\in\operatorname{Mod}(e_{X})$. Since $\mathbf{A}$ is $X$–generated,
there exists
$s_{A}\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{A})\cap\mathscr{E}$.
As $\mathbf{A}\in\operatorname{Mod}(e_{X})$, the morphism $s_{A}$ factors
through $e_{X}$ as $s_{A}=g_{s_{A}}\circ e_{X}$. As we have that
$g_{s_{A}}\circ e_{X}=s_{A}\in\mathscr{E}$ then, by (b1) and Lemma 1, we have
that
$g_{s_{A}}\in\operatorname{Alg}(\mathsf{T})(\mathbf{Q_{X}},\mathbf{A})\cap\mathscr{E}$,
and hence $\mathbf{A}\in V$ since it is an $\mathscr{E}$–quotient of
$\mathbf{Q_{X}}\in V$.

$(\subseteq)$: Let $\mathbf{A}\in\operatorname{Alg}(\mathsf{T})$ such that
$\mathbf{A}\in V$. Let
$f\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{A})$, then we have the
following commutative diagram:

$TX$$Q_{X}$$P$$Z=P_{i}$$A$$e_{X}$$e_{f}=e_{i}$$f$$\pi_{i}$$m_{X}$$m_{f}$

where $f=m_{f}\circ e_{f}$ is the factorization of $f$ with
$m_{f}\in\mathscr{M}$ and $e_{f}\in\mathscr{E}$, which implies that
$\mathbf{Z}\in V$ since it is an $X$–generated $\mathscr{M}$–subalgebra of
$\mathbf{A}\in V$. Therefore, $\mathbf{Z}=\mathbf{P}_{i}$ and $e_{f}=e_{i}$
for some $i\in I$. Hence the factorization of $f$ through $e_{X}$ follows from
the definition of $e_{X}$ (see i) above) which implies that
$\mathbf{A}\in\operatorname{Mod}(e_{X})$.

####  A.4.2. Proof of local Birkhoff’s Theorem for finite
$\mathsf{T}$–algebras

######  Proposition A.36.

Let $\mathcal{D}$ be a concrete complete category such that its forgetful
functor preserves epis, monos and products, $\mathsf{T}$ a monad on
$\mathcal{D}$, $X\in\mathcal{D}$ and $\mathscr{E}/\mathscr{M}$ a factorization
system on $\mathcal{D}$. Assume (bf1) to (bf3). Let $\mathtt{P}_{X}$ be a
local pseudoequational $\mathsf{T}$–theory on $X$. Then
$\operatorname{Mod}_{f}(\mathtt{P}_{X})$ is a local pseudovariety of
$X$–generated $\mathsf{T}$–algebras.

######  Proof A.37.

$\operatorname{Mod}_{f}(\mathtt{P}_{X})$ is nonempty by Lemma A.24 with
$\mathcal{D}_{0}=\\{X\\}$. Now we have:

  1. i)

$\operatorname{Mod}_{f}(\mathtt{P}_{X})$ is closed under
$\mathscr{E}$–quotients: similar proof to that of Proposition A.20. Note that
an $\mathscr{E}$–quotiend of an $X$–generated algebra is also $X$–generated.

  2. ii)

$\operatorname{Mod}_{f}(\mathtt{P}_{X})$ is closed under $X$–generated
$\mathscr{M}$–subcoalgebras: similar proof to that of Proposition A.20.

  3. iii)

$\operatorname{Mod}_{f}(\mathtt{P}_{X})$ is closed under finite subdirect
products: Let $I$ be a finite set and let
$\mathbf{A}_{i}\in\operatorname{Mod}_{f}(\mathtt{P}_{X})$, $i\in I$. Let
$\mathbf{S}$ be the subdirect product of the family
$\\{(\mathbf{A}_{i},e_{i})\\}_{i\in I}$, where
$e_{i}\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{A}_{i})\cap\mathscr{E}$,
$i\in I$. Let $f\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{S})$
then we have the following commutative diagram:

$TX$$S$$R$$Q_{j}$$P$$\prod_{i\in
I}A_{i}$$A_{j}$$Q$$TX$$e_{j}$$h$$e_{f}$$e_{g}$$e_{e}$$e_{j}$$f$$g$$g_{j}$$\pi_{j}$$h_{j}$$e$$m_{g}$$m_{e}$$m_{f}$

where:

    1. -

the two right triangles are obtained from the construction of $\mathbf{S}$,

    2. -

$f=m_{f}\circ e_{f}$ is the factorization of $f$,

    3. -

$g_{j}$ is obtained from the property that
$\mathbf{A}_{j}\in\operatorname{Mod}_{f}(\mathtt{P}_{X})$, i.e., $\pi_{j}\circ
m_{e}\circ f=g_{j}\circ e_{j}$, $j\in I$ and $e_{j}\in\mathtt{P}_{X}$,

    4. -

$h\in\mathtt{P}_{X}$ is obtained from the morphisms $e_{j}\in\mathtt{P}_{X}$
by using the property that $\mathtt{P}$ is a local pseudoequational
$\mathsf{T}$–theory on $X$, i.e., $h_{j}\circ h=e_{j}$, $j\in I$,

    5. -

$g$ is obtained from the morphisms $g_{j}\circ h_{j}$ by using the universal
property of the product $\prod_{i\in I}\mathbf{A}_{i}$, and

    6. -

$g=m_{g}\circ e_{g}$ is the factorization of $g$.

Then, by the universal property of the product, we have that $m_{e}\circ
m_{f}\circ e_{f}=m_{g}\circ e_{g}\circ h$. Now, as $e_{g}\circ
h,e_{f}\in\mathscr{E}$ and $m_{g},m_{e}\circ m_{f}\in\mathscr{M}$, by
uniquenes of factorization we have that there is an isomorphism $\phi$ such
that $e_{f}=\phi\circ e_{g}\circ h$, which implies $f=m_{f}\circ
e_{f}=m_{f}\circ\phi\circ e_{g}\circ h$, i.e.,
$\mathbf{S}\in\operatorname{Mod}_{f}(\mathtt{P}_{X})$.

Given a class $K$ of $X$–generated algebras in
$\operatorname{Alg}_{f}(\mathsf{T})$ define the collection of morphisms
$\mathtt{P}_{X}(K)$ as follows:

$\mathtt{P}_{X}(K)=\text{$\mathsf{T}$--algebra morphisms in $\mathscr{E}$ with
domain $\mathbf{TX}$ and codomain in $K$.}$

######  Proposition A.38.

Let $\mathcal{D}$ be a concrete complete category such that its forgetful
functor preserves epis, monos and products, $\mathsf{T}$ a monad on
$\mathcal{D}$, $X\in\mathcal{D}$ and $\mathscr{E}/\mathscr{M}$ a factorization
system on $\mathcal{D}$. Assume (bf1) and (bf3). Let $K$ be a local
pseudovariety of $X$–generated $\mathsf{T}$–algebras. Then $\mathtt{P}_{X}(K)$
is a local pseudoequational $\mathsf{T}$–theory on $X$.

######  Proof A.39.

We have to prove properties i), ii), and ii) of Definition 4.2. In fact:

  1. i)

Let $I$ be a finite set and $f_{i}\in\mathtt{P}_{X}(K)$, $i\in I$. Let
$\mathbf{A}_{i}\in K$ be the codomain of $f_{i}$. Let $\mathbf{A}=\prod_{i\in
I}\mathbf{A}_{i}$ with projections
$\pi_{i}\in\operatorname{Alg}(\mathsf{T})(\mathbf{A},\mathbf{A}_{i})$. Now, by
definition of $\mathbf{A}$, there exists
$f\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{A})$ such that
$\pi_{i}\circ f=f_{i}$. Let $f=m_{f}\circ e_{f}$ be the factorization of $f$
with
$e_{f}\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{Q})\cap\mathscr{E}$
and
$m_{f}\in\operatorname{Alg}(\mathsf{T})(\mathbf{Q},\mathbf{A})\cap\mathscr{M}$.
We have that $\mathbf{Q}\in K$ since it is the subdirect product of
$\\{(\mathbf{A}_{i},f_{i})\\}_{i\in I}$. Hence, $e_{f}\in\mathtt{P}_{X}(K)$
and every $f_{i}$ factors through it.

  2. ii)

Follows from the property that $K$ is closed under $\mathscr{E}$–quotients.

  3. iii)

Let $f\in\mathtt{P}_{X}(K)$ with codomain $\mathbf{A}\in K$, and
$h\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{TX})$. Let $f\circ
h=m_{f\circ h}\circ e_{f\circ h}$ be the factorization of $f\circ h$ such that
$e_{f\circ
h}\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{Q})\cap\mathscr{E}$
and $m_{f\circ
h}\in\operatorname{Alg}(\mathsf{T})(\mathbf{Q},\mathbf{A})\cap\mathscr{M}$.
Then $\mathbf{Q}\in K$ since it is an $X$–generated $\mathscr{M}$–subcoalgebra
of $\mathbf{A}\in K$, which implies $e_{f\circ h}\in\mathtt{P}_{X}(K)$.

######  Proposition A.40.

Let $\mathcal{D}$ be a concrete complete category such that its forgetful
functor preserves epis, monos and products, $\mathsf{T}$ a monad on
$\mathcal{D}$, $X\in\mathcal{D}$ and $\mathscr{E}/\mathscr{M}$ a factorization
system on $\mathcal{D}$. Assume (bf1) to (bf3). Let $\mathtt{P}_{X}$ be a
local pseudoequational $\mathsf{T}$–theory on $X$ and let $K$ be a local
pseudovariety of $X$–generated $\mathsf{T}$–algebras. Then:

  1. i)

$\mathtt{P}_{X}({\operatorname{Mod}_{f}(\mathtt{P}_{X})})=\mathtt{P}_{X}$.

  2. ii)

$\operatorname{Mod}_{f}(\mathtt{P}_{X}(K))=K$.

######  Proof A.41.

  1. i)

($\subseteq$): Let
$e\in\mathtt{P}_{X}({\operatorname{Mod}_{f}(\mathtt{P}_{X})})$ with codomain
$\mathbf{A}\in\operatorname{Mod}_{f}(\mathtt{P}_{X})$. As
$\mathbf{A}\in\operatorname{Mod}_{f}(\mathtt{T})$, there exists
$e^{\prime}\in\mathtt{P}_{X}$ such that $e$ factors through $e^{\prime}$ as
$g\circ e^{\prime}=e$. By (bf2) and (bf4) we have that $g$ is a
$\mathsf{T}$–algebra morphism. As $g\circ e^{\prime}=e\in\mathscr{E}$, then
$g\in\mathscr{E}$, and, as $\mathtt{P}_{X}$ is a pseudoequational
$\mathsf{T}$–theory, then $g\circ e^{\prime}=e\in\mathtt{P}_{X}$.
($\supseteq$): Let $e\in\mathtt{P}_{X}$ with codomain $\mathbf{A}$. Using
Lemma A.24 with $\mathcal{D}_{0}=\\{X\\}$,
$\mathbf{A}\in\operatorname{Mod}_{f}(\mathtt{P}_{X})$, i.e.,
$e\in\mathtt{P}_{X}({\operatorname{Mod}_{f}(\mathtt{P}_{X})})$.

  2. ii)

Let $\mathbf{A}$ be an $X$–generated algebra in
$\operatorname{Alg}_{f}(\mathsf{T})$.
($\supseteq$): Assume that $\mathbf{A}\in K$. We have to show that
$\mathbf{A}\in\operatorname{Mod}_{f}(\mathtt{P}_{X}(K))$. In fact, let
$f\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{A})$ and $f=m_{f}\circ
e_{f}$ be the factorization of $f$ with
$e_{f}\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{Q})\cap\mathscr{E}$
and
$m_{f}\in\operatorname{Alg}(\mathsf{T})(\mathbf{Q},\mathbf{A})\cap\mathscr{M}$.
Then $\mathbf{Q}\in K$ since it is an $X$–generated $\mathscr{M}$–subcoalgebra
of $\mathbf{A}\in K$, which implies that $e_{f}\in\mathtt{P}_{X}(K)$, i.e.,
$\mathbf{A}\in\operatorname{Mod}_{f}(\mathtt{P}_{X}(K))$.
($\subseteq$): Assume that
$\mathbf{A}\in\operatorname{Mod}_{f}(\mathtt{P}_{X}(K))$. Since $\mathbf{A}$
is an $X$–generated $\mathsf{T}$–algebra, there exists
$e\in\operatorname{Alg}(\mathsf{T})(\mathbf{TX},\mathbf{A})\cap\mathscr{E}$.
As $\mathbf{A}\in\operatorname{Mod}_{f}(\mathtt{P}_{X}(K))$, $e$ factors
through some $e^{\prime}\in\mathtt{P}_{X}(K)$ as $e=g\circ e^{\prime}$. Let
$\mathbf{Q}\in K$ be the codomain of $e^{\prime}$. As $g\circ
e^{\prime}=e\in\mathscr{E}$, then $g\in\mathscr{E}$ and
$g\in\operatorname{Alg}(\mathsf{T})(\mathbf{Q},\mathbf{A})$ which implies that
$\mathbf{A}\in K$ since it is an $\mathscr{E}$–quotient of $\mathbf{Q}\in K$.