Equational Axiomatization of Algebras with Structure

This paper proposes a new category theoretic account of equationally axiomatizable classes of algebras. Our approach is well-suited for the treatment of algebras equipped with additional computationally relevant structure, such as ordered algebras, continuous algebras, quantitative algebras, nominal algebras, or profinite algebras. Our main contributions are a generic HSP theorem and a sound and complete equational logic, which are shown to encompass numerous flavors of equational axiomizations studied in the literature.


Introduction
A key tool in the algebraic theory of data structures is their specification by operations (constructors) and equations that they ought to satisfy. Hence, the study of models of equational specifications has been of long standing interest both in mathematics and computer science. The seminal result in this field is Birkhoff's celebrated HSP theorem [ ]. It states that a class of algebras over a signature Σ is a variety (i.e. closed under homomorphic images, subalgebras, and products) iff it is axiomatizable by equations s = t between Σ-terms. Birkhoff also introduced a complete deduction system for reasoning about equations.
In algebraic approaches to the semantics of programming languages and computational effects, it is often natural to study algebras whose underlying sets are equipped with additional computationally relevant structure and whose operations preserve that structure. An important line of research thus concerns extensions of Birkhoff's theory of equational axiomatization beyond ordinary Σalgebras. On the syntactic level, this requires to enrich Birkhoff's notion of an equation in ways that reflect the extra structure. Let us mention a few examples: ( ) Ordered algebras (given by a poset and monotone operations) and continuous algebras (given by a complete partial order and continuous operations) were identified by the ADJ group [ ] as an important tool in denotational semantics. Subsequently, Bloom [ ] and Adámek, Nelson, and Reiterman [ , ] established ordered versions of the HSP theorem along with complete deduction systems. Here, the role of equations s = t is taken over by inequations s ≤ t.
( ) Quantitative algebras (given by an extended metric space and nonexpansive operations) naturally arise as semantic domains in the theory of probabilistic computation. In recent work, Mardare, Panangaden, and Plotkin [ , ] presented an HSP theorem for quantitative algebras and a complete deduction system.
In the quantitative setting, equations s = ε t are equipped with a non-negative real number ε, interpreted as "s and t have distance at most ε".
( ) Nominal algebras (given by a nominal set and equivariant operations) are used in the theory of name binding [ ] and have proven useful for characterizing logics for data languages [ , ]. Varieties of nominal algebras were studied by Gabbay [ ] and Kurz and Petrişan [ ]. Here, the appropriate syntactic concept involves equations s = t with constraints on the support of their variables.
( ) Profinite algebras (given by a profinite topological space and continuous operations) play a central role in the algebraic theory of formal languages [ ]. They serve as a technical tool in the investigation of pseudovarieties (i.e. classes of finite algebras closed under homomorphic images, subalgebras, and finite products). As shown by Reiterman [ ] and Eilenberg and Schützenberger [ ], pseudovarieties can be axiomatized by profinite equations (formed over free profinite algebras) or, equivalently, by sequences of ordinary equations (s i = t i ) i<ω , interpreted as "all but finitely many of the equations s i = t i hold".
The present paper proposes a general category theoretic framework that allows to study classes of algebras with extra structure in a systematic way. Our overall goal is to isolate the domain-specific part of any theory of equational axiomatization from its generic core. Our framework is parametric in the following data: -a category A with a factorization system (E, M); -a full subcategory A 0 ⊆ A ; -a class Λ of cardinal numbers; -a class X ⊆ A of objects.
Here, A is the category of algebras under consideration (e.g. ordered algebras, quantitative algebras, nominal algebras). Varieties are formed within A 0 , and the cardinal numbers in Λ determine the arities of products under which the varieties are closed. Thus, the choice A 0 = finite algebras and Λ = finite cardinals corresponds to pseudovarieties, and A 0 = A and Λ = all cardinals to varieties. The crucial ingredient of our setting is the parameter X , which is the class of objects over which equations are formed; thus, typically, X is chosen to be some class of freely generated algebras in A . Equations are modeled as E-quotients e : X ։ E (more generally, filters of such quotients) with domain X ∈ X .
The choice of X reflects the desired expressivity of equations in a given setting. Furthermore, it determines the type of quotients under which equationally axiomatizable classes are closed. More precisely, in our general framework a variety is defined to be a subclass of A 0 closed under E X -quotients, M-subobjects, and Λ-products, where E X is a subclass of E derived from X . Due to its parametric nature, this concept of a variety is widely applicable and turns out to specialize to many interesting cases. The main result of our paper is the

General HSP Theorem. A subclass of A 0 forms a variety if and only if it is axiomatizable by equations.
In addition, we introduce a generic deduction system for equations, based on two simple proof rules (see Section ), and establish a General Completeness Theorem. The generic deduction system for equations is sound and complete.
The above two theorems can be seen as the generic building blocks of the model theory of algebras with structure. They form the common core of numerous Birkhoff-type results and give rise to a systematic recipe for deriving concrete HSP and completeness theorems in settings such as ( )-( ). In fact, all that needs to be done is to translate our abstract notion of equation and equational deduction, which involves (filters of) quotients, into an appropriate syntactic concept. This is the domain-specific task to fulfill, and usually amounts to identifying an "exactness" property for the category A . Subsequently, one can apply our general results to obtain HSP and completeness theorems for the type of algebras under consideration. Several instances of this approach are shown in Section . Proofs of all results and details for the examples can be found in the Appendix.
Related work. Generic approaches to universal algebra have a long tradition in category theory. They aim to replace syntactic notions like terms and equations by suitable categorical abstractions, most prominently Lawvere theories and monads [ , ]. Our present work draws much of its inspiration from the classical paper of Banaschewski and Herrlich [ ] on HSP classes in (E, M)-structured categories. These authors were the first to model equations as quotients e : X ։ E. However, their approach does not feature the parameter X and assumes that equations are formed over E-projective objects X. This limits the scope of their results to categories with enough projectives, a property that frequently fails in categories of algebras with structure (including continuous, quantitative or nominal algebras). The introduction of the parameter X in our paper, along with the identification of the derived parameter E X as a key concept, is therefore a crucial step in order to gain a categorical understanding of such structures.
Equational logics on the level of abstraction of Banaschewski and Herrlich's work were studied by Roşu [ , ] and Adámek, Hébert, and Sousa [ ]. These authors work under assumptions on the category A different from our framework, e.g. they require existence of pushouts. Hence, the proof rules and completeness results in loc. cit. are not directly comparable to our approach in Section .
In the present paper, we opted to model equations as filters of quotients rather than single quotients, which allows us to encompass several HSP theorems for finite algebras [ , , ]. The first categorical generalization of such results was given by Adámek, Chen, Milius, and Urbat [ , ] who considered algebras for a monad T on an algebraic category and modeled equations as filters of finite quotients of free T-algebras (equivalently, as profinite quotients of free profinite T-algebras). This idea was further generalized by Salamánca [ ] to monads on concrete categories. However, again, this work only applies to categories with enough projectives, which excludes most of our present applications.

Preliminaries
We start by recalling some notions from category theory. A factorization system (E, M) in a category A consists of two classes E, M of morphisms in A such that ( ) both E and M contain all isomorphisms and are closed under composition, ( ) every morphism f has a factorization f = m · e with e ∈ E and m ∈ M, and ( ) the diagonal fill-in property holds: for every commutative square g · e = m · f with e ∈ E and m ∈ M, there exists a unique d with m · d = g and d · e = f . The morphisms m and e in ( ) are unique up to isomorphism and are called the image and coimage of f , resp. The factorization system is proper if all morphisms in E are epic and all morphisms in M are monic. From now on, we will assume that A is a category equipped with a proper factorization system (E, M). Quotients and subobjects in A are taken with respect to E and M. That is, a quotient of an object X is represented by a morphism e : X ։ E in E and a subobject by a morphism m : M X in M. The quotients of X are ordered by e ≤ e ′ iff e ′ factorizes through e, i.e. there exists a morphism h with e ′ = h · e. Identifying quotients e and e ′ which are isomorphic (i.e. e ≤ e ′ and e ′ ≤ e), this makes the quotients of X a partially ordered class. Given a full subcategory A 0 ⊆ A we denote by X և A 0 the class of all quotients of X represented by E-morphisms with codomain in A 0 . The category A is E-co-wellpowered if for every object X ∈ A there is only a set of quotients with domain X. In particular, X և A 0 is then a poset. Finally, an object X ∈ A is called projective w.r.t. a morphism e : A → B if for every h : X → B, there exists a morphism g : X → A with h = e · g.

The Generalized Variety Theorem
In this section, we introduce our categorical notions of equation and variety, and derive the HSP theorem. For the rest of the paper, we fix the data mentioned in the introduction: a category A with a proper factorization system (E, M), a full subcategory A 0 ⊆ A , a class Λ of cardinal numbers, and a class X ⊆ A of objects. An object of A is called X -generated if it is a quotient of some object in X . A key role in the following development will be played by the subclass E X ⊆ E defined by E X = { e ∈ E : every X ∈ X is projective w.r.t. e }.
Note that X ⊆ X ′ implies E X ′ ⊆ E X . The choice of X is a trade-off between "having enough equations" (that is, X needs to be rich enough to make equations sufficiently expressive) and "having enough projectives" (that is, E X needs to generate A 0 , as stated in ( ) below).
Assumptions . . Our data is required to satisfy the following properties: ( ) A has Λ-products, i.e. for every λ ∈ Λ and every family (A i ) i<λ of objects in A , the product i<λ A i exists. ( ) A 0 is closed under isomorphisms, Λ-products and X -generated subobjects. The last statement means that for every subobject m : A B in M where B ∈ A 0 and A is X -generated, one has A ∈ A 0 .
( ) Every object of A 0 is an E X -quotient of some object of X , that is, for every object A ∈ A 0 there exists some e : X ։ A in E X with domain X ∈ X .
Examples . . Throughout this section, we will use the following three running examples to illustrate our concepts. For further applications, see Section .
( ) Classical Σ-algebras. The setting of Birkhoff's seminal work [ ] in general algebra is that of algebras for a signature. Recall that a (finitary) signature is a set Σ of operation symbols each with a prescribed finite arity, and a Σalgebra is a set A equipped with operations σ : A n → A for each n-ary σ ∈ Σ. A morphism of Σ-algebras (or a Σ-homomorphism) is a map preserving all Σoperations. The forgetful functor from the category Alg(Σ) of Σ-algebras and Σ-homomorphisms to Set has a left adjoint assigning to each set X the free Σ-algebra T Σ X, carried by the set of all Σ-terms in variables from X. To treat Birkhoff's results in our categorical setting, we choose the following parameters: One easily verifies that E X consists of all surjective morphisms, that is, E X = E.
( ) Finite Σ-algebras. Eilenberg and Schützenberger [ ] considered classes of finite Σ-algebras, where Σ is assumed to be a signature with only finitely many operation symbols. In our framework, this amounts to choosing -A = Alg(Σ) and A 0 = Alg f (Σ), the full subcategory of finite Σ-algebras; -(E, M) = (surjective morphisms, injective morphisms); -Λ = all finite cardinal numbers; -X = all free Σ-algebras T Σ X with X ∈ Set f . As in ( ), the class E X consists of all surjective morphisms. ( ) Quantitative Σ-algebras. In recent work, Mardare, Panangaden, and Plotkin [ , ] extended Birkhoff's theory to algebras endowed with a metric. Recall that an extended metric space is a set A with a map d A : A × A → [0, ∞] (assigning to any two points a possibly infinite distance), subject to the axioms Let Met ∞ denote the category of extended metric spaces and nonexpansive maps. Fix a, not necessarily finitary, signature Σ, that is, the arity of an operation symbol σ ∈ Σ is any cardinal number. A quantitative Σ-algebra is a Σ-algebra A endowed with an extended metric d A such that all Σ-operations σ : A n → A are nonexpansive. Here, the product A n is equipped with the sup-metric The forgetful functor from the category QAlg(Σ) of quantitative Σ-algebras and nonexpansive Σ-homomorphisms to Met ∞ has a left adjoint assigning to each space X the free quantitative Σ-algebra T Σ X. The latter is carried by the set of all Σ-terms (equivalently, well-founded Σ-trees) over X, with metric inherited from X as follows: if s and t are Σ-terms of the same shape, i.e. they differ only in the variables, their distance is the supremum of the distances of the variables in corresponding positions of s and t; otherwise, it is ∞.
We aim to derive the HSP theorem for quantitative algebras proved by Mardare et al. as an instance of our general results. The theorem is parametric in a regular cardinal number c > 1. In the following, an extended metric space is called c-clustered if it is a coproduct of spaces of size < c. Note that coproducts in Met ∞ are formed on the level of underlying sets. Choose the parameters -(E, M) given by morphisms carried by surjections and subspaces, resp.; -Λ = all cardinal numbers; One can verify that a quotient e : A ։ B belongs to E X if and only if for . Following the terminology of Mardare et al., such a quotient is called c-reflexive. Note that for c = 2 every quotient is c-reflexive, so An object A ∈ A satisfies the equation T X if every morphism h : X → A factorizes through some e ∈ T X . In this case, we write Remark . . In many of our applications, one can simplify the above definition and replace classes of quotients by single quotients. Specifically, if A is E-cowellpowered (so that every equation is a set, not a class) and Λ = all cardinal numbers, then every equation T X ⊆ X և A 0 contains a least element e X : X ։ E X , viz. the lower bound of all elements in T X . Then an object A satisfies T X iff it satisfies e X , in the sense that every morphism h : X → A factorizes through e X . Therefore, in this case, one may equivalently define an equation to be a morphism e X : X ։ E X with X ∈ X . This is the concept of equation investigated by Banaschewski and Herrlich [ ].
Examples . . In our running examples, we obtain the following concepts: ( ) Classical Σ-algebras. By Remark . , an equation corresponds to a quotient e X : T Σ X ։ E X in Alg(Σ), where X is a set of variables.
( ) Finite Σ-algebras. An equation T X over a finite set X is precisely a filter (i.e. a codirected and upwards closed subset) in the poset T Σ X և Alg f (Σ).
( ) Quantitative Σ-algebras. By Remark . , an equation can be presented as a quotient e X : T Σ X ։ E X in QAlg(Σ), where X is a c-clustered space.
We shall demonstrate in Section how to interpret the above abstract notions of equations, i.e. (filters of) quotients of free algebras, in terms of concrete syntax.
Definition . . A variety is a full subcategory V ⊆ A 0 closed under E Xquotients, subobjects, and Λ-products. More precisely, Examples . . In our examples, we obtain the following notions of varieties: Construction . . Given a class E of equations, put We aim to show that varieties coincide with the equationally presentable classes (see Theorem . below). The "easy" part of the correspondence is established by the following lemma, which is proved by a straightforward verification.

Lemma . . For every class E of equations, V(E) is a variety.
As a technical tool for establishing the general HSP theorem and the corresponding sound and complete equational logic, we introduce the following concept: Definition . . An equational theory is a family of equations with the following two properties (illustrated by the diagrams below): ( ) E X -completeness. For every Y ∈ X and every quotient e : Y ։ E Y in T Y , there exists an X ∈ X and a quotient e X : Remark . . In many settings, the slightly technical concept of an equational theory can be simplified. First, note that E X -completeness is trivially satisfied whenever E X = E. If, additionally, every equation contains a least element (e.g. in the setting of Remark . ), an equational theory corresponds exactly to a family of quotients (e X : X ։ E X ) X∈X such that E X ∈ A 0 for all X ∈ X , and for every h : X → Y with X, Y ∈ X the morphism e Y · h factorizes through e X . Σ-algebras). Recall that a congruence on a Σalgebra A is an equivalence relation ≡ ⊆ A × A that forms a subalgebra of A × A. It is well-known that there is an isomorphism of complete lattices quotient algebras of A ∼ = congruences on A ( . ) assigning to a quotient e : A ։ B its kernel, given by a ≡ e a ′ iff e(a) = e(a ′ ). Consequently, in the setting of Example . ( ), an equational theory -presented as a family of single quotients as in Remark . -corresponds precisely to a family of congruences (≡ X ⊆ T Σ X × T Σ X) X∈Set closed under substitution, that is, for every s, t ∈ T Σ X and every morphism h :

Example . (Classical
We saw in Lemma . that every class of equations, so in particular every equational theory T , yields a variety V(T ) consisting of all objects of A 0 that satisfy every equation in T . Conversely, to every variety one can associate an equational theory as follows: Construction . . Given a variety V, form the family of equations where T X consists of all quotients e X : X ։ E X with codomain E X ∈ V.
Lemma . . For every variety V, the family T (V) is an equational theory.
We are ready to state the first main result of our paper, the HSP Theorem. Given two equations T X and T ′ X over X ∈ X , we put T X ≤ T ′ X if every quotient in T ′ X factorizes through some quotient in T X . Theories form a poset with respect to the order T ≤ T ′ iff T X ≤ T ′ X for all X ∈ X . Similarly, varieties form a poset (in fact, a complete lattice) ordered by inclusion.

Theorem .
(HSP Theorem). The complete lattices of equational theories and varieties are dually isomorphic. The isomorphism is given by One can recast the HSP Theorem into a more familiar form, using equations in lieu of equational theories: Theorem .
(HSP Theorem, equational version). A class V ⊆ A 0 is equationally presentable if and only if it forms a variety.
Proof. By Lemma . , every equationally presentable class V(E) is a variety. Conversely, for every variety V one has V = V(T (V)) by Theorem . , so V is presented by the equations E = { T X : X ∈ X } where T = T (V).

Equational Logic
The correspondence between theories and varieties gives rise to the second main result of our paper, a generic sound and complete deduction system for reasoning about equations. The corresponding semantic concept is the following: The key to our proof system is a categorical formulation of term substitution: The substitution closure of an equation can be computed as follows: ).
The deduction system for semantic entailment consists of two proof rules: Y arises from T X by a finite sequence of applications of the above rules.

Applications
In this section, we present some of the applications of our categorical results (see Appendix B for full details). Transferring the general HSP theorem of Section into a concrete setting requires to perform the following four-step procedure: Step . Instantiate the parameters A , (E, M), A 0 , Λ and X of our categorical framework, and characterize the quotients in E X .
Step . Establish an exactness property for the category A , i.e. a correspondence between quotients e : A ։ B in A and suitable relations between elements of A.
Step . Infer a suitable syntactic notion of equation, and prove it to be expressively equivalent to the categorical notion of equation given by Definition . .
Step . Invoke Theorem . to deduce an HSP theorem.
The details of Steps and are application-specific, but typically straightforward. In each case, the bulk of the usual work required for establishing the HSP theorem is moved to our general categorical results and thus comes for free. Similarly, to obtain a complete deduction system in a concrete application, it suffices to phrase the two proof rules of our generic equational logic in syntactic terms, using the correspondence of quotients and relations from Step ; then Theorem . gives the completeness result. .

Classical Σ-Algebras
The classical Birkhoff theorem emerges from our general results as follows.
Step . Choose the parameters of Example . ( ), and recall that E X = E.
Step . The exactness property of Alg(Σ) is given by the correspondence ( . ).
Step . Recall from Example . ( ) that equations can be presented as single quotients e : T Σ X ։ E X . The exactness property ( . ) leads to the following classical syntactic concept: a term equation over a set X of variables is a pair Here, h ♯ : T Σ X → A denotes the unique extension of h to a Σ-homomorphism. Equations and term equations are expressively equivalent in the following sense: ( ) For every equation e : T Σ X ։ E X , the kernel ≡ e ⊆ T Σ X × T Σ X is a set of term equations equivalent to e, that is, a Σ-algebra satisfies the equation e iff it satisfies all term equations in ≡ e . This follows immediately from ( . ).
( ) Conversely, given a term equation (s, t) ∈ T Σ X × T Σ X, form the smallest congruence ≡ on T Σ X with s ≡ t (viz. the intersection of all such congruences) and let e : T Σ X ։ E X be the corresponding quotient. Then a Σ-algebra satisfies s = t iff it satisfies e. Again, this is a consequence of ( . ).
Step . From Theorem . and Example . ( ), we deduce the classical

Theorem . (Birkhoff [ ]). A class of Σ-algebras is a variety (i.e. closed under quotients, subalgebras, products) iff it is axiomatizable by term equations.
Similarly, one can obtain Birkhoff's complete deduction system for term equations as an instance of Theorem . ; see Appendix B. for details.

. Finite Σ-Algebras
Next, we derive Eilenberg and Schützenberger's equational characterization of pseudovarieties of algebras over a finite signature Σ using our four-step plan: Step . Choose the parameters of Example . ( ), and recall that E X = E.
Step . By Example . ( ), an equational theory is given by a family of filters T n ⊆ T Σ n և Alg f (Σ) (n < ω). The corresponding syntactic concept involves sequences (s i = t i ) i<ω of term equations. We say that a finite Σ-algebra A eventually satisfies such a sequence if there exists i 0 < ω such that A satisfies all equations s i = t i with i ≥ i 0 . Equational theories and sequences of term equations are expressively equivalent: ( ) Let T = (T n ) n<ω be a theory. Since Σ is a finite signature, for each finite quotient e : T Σ n ։ E the kernel ≡ e is a finitely generated congruence [ , Prop. ]. Consequently, for each n < ω the algebra T Σ n has only countably many finite quotients. In particular, the codirected poset T n is countable, so it contains an ω op -chain e n 0 ≥ e n 1 ≥ e n 2 ≥ · · · that is cofinal, i.e., each e ∈ T n is above some e n i . The e n i can be chosen in such a way that, for each m > n and q : m → n, the morphism e n i · T Σ q factorizes through e m i . For each n < ω, choose a finite subset W n ⊆ T Σ n × T Σ n generating the kernel of e n n . Let (s i = t i ) i<ω be a sequence of term equations where (s i , t i ) ranges over n<ω W n . One can verify that a finite Σ-algebra lies in V(T ) iff it eventually satisfies (s i = t i ) i<ω .
( ) Conversely, given a sequence of term equations (s where T n consists of all finite quotients e : T Σ n ։ E with the following property: Then a finite Σ-algebra eventually satisfies (s i = t i ) i<ω iff it lies in V(T ).
Step . The theory version of our HSP theorem (Theorem . ) now implies:

Theorem . (Eilenberg-Schützenberger [ ]).
A class of finite Σ-algebras is a pseudovariety (i.e. closed under quotients, subalgebras, and finite products) iff it is axiomatizable by a sequence of term equations.
In an alternative characterization of pseudovarieties due to Reiterman [ ], where the restriction to finite signatures Σ can be dropped, sequences of term equations are replaced by the topological concept of a profinite equation. This result can also be derived from our general HSP theorem, see Appendix B. .

Quantitative Algebras
In this section, we derive an HSP theorem for quantitative algebras.
Step . Choose the parameters of Example . ( ). Recall that we work with fixed regular cardinal c > 1 and that E X consists of all c-reflexive quotients.
Step . To state the exactness property of QAlg(Σ), recall that an (extended) pseudometric on a set A is a map p : A × A → [0, ∞] satisfying all axioms of an extended metric except possibly the implication p(a, b There is a dual isomorphism of complete lattices quotient algebras of A ∼ = congruences on A ( . ) mapping e : A ։ B to the congruence p e on A given by p e (a, b) = d B (e(a), e(b)).
Step . By Example . ( ), equations can be presented as single quotients e : T Σ X ։ E, where X is a c-clustered space. The exactness property ( . ) suggests to replace equations by the following syntactic concept. A c-clustered equation over the set X of variables is an expression where (i) I is a set, (ii) x i , y i ∈ X for all i ∈ I, (iii) s and t are Σ-terms over X, (iv) ε i , ε ∈ [0, ∞], and (v) the equivalence relation on X generated by the pairs (x i , y i ) (i ∈ I) has all equivalence classes of cardinality < c. In other words, the set of variables can be partitioned into subsets of size < c such that only relations between variables in the same subset appear on the left-hand side of ( . ). A quantitative Σ-algebra A satisfies ( . ) if for every map h : Equations and c-clustered equations are expressively equivalent: ( ) Let X be a c-clustered space, i.e. X = j∈J X j with |X j | < c. Every equation e : T Σ X ։ E induces a set of c-clustered equations over X given by with ε x,y = d X (x, y) and ε s,t = d E (e(s), e(t)). It is not difficult to show that e and ( . ) are equivalent: an algebra satisfies e iff it satisfies all equations ( . ).
( ) Conversely, to every c-clustered equation ( . ) over a set X of variables, we associate an equation in two steps: is, the pointwise supremum of all such congruences). Form the corresponding quotient e q : T Σ (X p ) ։ E q .
A routine verification shows that ( . ) and e q are expressively equivalent, i.e. satisfied by the same quantitative Σ-algebras.
Step . From Theorem . and Example . ( ), we deduce the following

Theorem . (Quantitative HSP Theorem). A class of quantitative Σalgebras is a c-variety (i.e. closed under c-reflexive quotients, subalgebras, and products) iff it is axiomatizable by c-clustered equations.
The above theorem generalizes a recent result of Mardare, Panangaden, and Plotkin [ ] who considered only signatures Σ with operations of finite or countably infinite arity and cardinal numbers c ≤ ℵ 1 . Theorem . holds without any restrictions on Σ and c. In addition to the quantitative HSP theorem, one can also derive the completeness of quantitative equational logic [ ] from our general completeness theorem, see Appendix B. .

. Nominal Algebras
In this section, we derive an HSP theorem for algebras in the category Nom of nominal sets and equivariant maps; see Pitts [ ] for the required terminology. We denote by A the countably infinite set of atoms, by Perm(A) the group of finite permutations of A, and by supp X (x) the least support of an element x of a nominal set X. Recall that X is strong if, for all x ∈ X and π ∈ Perm(A), Here is a useful characterization of strong nominal sets. A supported set is a set X equipped with a map supp X : Lemma . . The forgetful functor from Nom to SuppSet has a left adjoint F : SuppSet → Nom. The nominal sets of the form F Y (Y ∈ SuppSet) are up to isomorphism exactly the strong nominal sets.
Fix a finitary signature Σ. A nominal Σ-algebra is a Σ-algebra A carrying the structure of a nominal set such that all Σ-operations σ : A n → A are equivariant. The forgetful functor from the category NomAlg(Σ) of nominal Σ-algebras and equivariant Σ-homomorphisms to Nom has a left adjoint assigning to each nominal set X the free nominal Σ-algebra T Σ X, carried by the set of Σ-terms and with group action inherited from X. To derive a nominal HSP theorem from our general categorical results, we proceed as follows.
Step . Choose the parameters of our setting as follows: One can show that a quotient e : A ։ B belongs to E X iff it is support-reflecting: Step . A nominal congruence on a nominal Σ-algebra A is a Σ-algebra congruence ≡ ⊆ A × A that forms an equivariant subset of A × A. In analogy to ( . ), there is an isomorphim of complete lattices quotient algebras of A ∼ = nominal congruences on A.
( . ) Step . By Remark . , an equation can be presented as a single quotient e : T Σ X ։ E, where X is a strong nominal set. Equations can be described by syntactic means as follows. A nominal Σ-term over a set Y of variables is an where id ♯ is the unique Σ-homomorphism extending the identity map id : where supp Y : Y → P f (A) is a function and s and t are nominal Σ-terms over Equations and nominal equations are expressively equivalent: ). Form the nominal equations over Y given by It is not difficult to see that a nominal Σ-algebra satisfies e iff it satisfies ( . ). ( ) Conversely, given a nominal equation ( . ) over the set Y , let X = F Y and form the nominal congruence on T Σ X generated by the pair (T Σ m(s), T Σ m(t)), with m defined as above. Let e : T Σ X ։ E be the corresponding quotient, see ( . ). One can show that a nominal Σ-algebra satisfies e iff it satisfies ( . ).
Step . We thus deduce the following result as an instance of Theorem . :

Theorem . (Kurz and Petrişan [ ]). A class of nominal Σ-algebras is a variety (i.e. closed under support-reflecting quotients, subalgebras, and products) iff it is axiomatizable by nominal equations.
For brevity and simplicity, in this section we restricted ourselves to algebras for a signature. Kurz and Petrişan proved a more general HSP theorem for algebras over an endofunctor on Nom with a suitable finitary presentation. This extra generality allows to incorporate, for instance, algebras for binding signatures. .

Further Applications
Let us briefly mention some additional instances of our framework, all of which are given a detailed treatment in the Appendix.

Ordered algebras.
Bloom [ ] proved an HSP theorem for Σ-algebras in the category of posets: a class of such algebras is closed under homomorphic images, subalgebras, and products, iff it is axiomatizable by inequations s ≤ t between Σ-terms. This result can be derived much like the unordered case in Section . .

Continuous algebras.
A more intricate ordered version of Birkhoff's theorem concerns continuous algebras, i.e. Σ-algebras with an ω-cpo structure on their underlying set and continuous Σ-operations. Adámek, Nelson, and Reiterman [ ] proved that a class of continuous algebras is closed under homomorphic images, subalgebras, and products, iff it axiomatizable by inequations between terms with formal suprema (e.g. σ(x) ≤ ∨ i<ω c i ). This result again emerges as an instance of our general HSP theorem. A somewhat curious feature of this application is that the appropriate factorization system (E, M) takes as E the class of dense morphisms, i.e. morphisms of E are not necessarily surjective. However, one has E X = surjections, so homomorphic images are formed in the usual sense.

Conclusions and Future Work
We have presented a categorical approach to the model theory of algebras with additional structure. Our framework applies to a broad range of different settings and greatly simplifies the derivation of HSP-type theorems and completeness results for equational deduction systems, as the generic part of such derivations now comes for free using our Theorems . , . and . . There remain a number of interesting directions and open questions for future work. As shown in Section , the key to arrive at a syntactic notion of equation lies in identifying a correspondence between quotients and suitable relations, which we informally coined "exactness". The similarity of these correspondences in our applications suggests that there should be a (possibly enriched) notion of exact category that covers our examples; cf. Kurz and Velebil's [ ] 2-categorical view of ordered algebras. This would allow to move more work to the generic theory.
Theorem . can be used to recover several known sound and complete equational logics, but it also applies to settings where no such logic is known, for instance, a logic of profinite equations (however, cf. recent work of Almeida and Klíma [ ]). In each case, the challenge is to translate our two abstract proof rules into concrete syntax, which requires the identification of a syntactic equivalent of the two properties of an equational theory. While substitution invariance always translates into a syntactic substitution rule in a straightforward manner, E Xcompleteness does not appear to have an obvious syntactic counterpart. In most of the cases where a concrete equational logic is known, this issue is obfuscated by the fact that one has E X = E, so E X -completeness becomes a trivial property. Finding a syntactic account of E X -completeness remains an open problem. One notable case where E X = E is the one of nominal algebras. Gabbay's work [ ] does provide an HSP theorem and a sound and complete equational logic in a setting slightly different from Section . , and it should be interesting to see whether this can be obtained as an instance of our framework.
Finally, in previous work [ ] we have introduced the notion of a profinite theory (a special case of the equational theories in the present paper) and shown how the dual concept can be used to derive Eilenberg-type correspondences between varieties of languages and pseudovarieties of finite algebras. Our present results pave the way to an extension of this method to new settings, such as nominal sets. Indeed, a simple modification of the parameters in Section . yields a new HSP theorem for orbit-finite nominal Σ-algebras. We expect that a dualization of this result in the spirit of loc. cit. leads to a correspondence between varieties of data languages and varieties of orbit-finite nominal monoids, an important step towards an algebraic theory of data languages.

Appendix
This appendix contains all omitted proofs, as well as a detailed treatment of the examples mentioned in the paper.

A Proofs
We first note some useful properties of the class E X . Recall the following general properties of categories A with a factorization system (E, M) [ , Prop. . / . ]: ( ) The intersection E ∩ M consists precisely of the isomorphisms in A .
( ) The cancellation law holds: if p and q are composable morphisms with p ∈ E and q · p ∈ E, then q ∈ E. Lemma A. . ( ) The class E X contains all isomorphisms and is closed under composition.
Proof. ( ) The first statement holds because E contains all isomorphisms and, clearly, every object X is projective w.r.t. every isomorphism. For the second statement, let p : A ։ B and q : B ։ C be morphisms in E X . Since E is closed under composition, we have q · p ∈ E. Given X ∈ X , we need to show that X is projective w.r.t. q · p. This follows easily from the corresponding properties of p and q: for any morphism h : X → C, we obtain h ′ : X → B with q · h ′ = h because q ∈ E X , and then we obtain h ′′ : ( ) Note first that q ∈ E by the cancellation law. Let X ∈ X and h : X → C.
, the morphism h ′ factorizes through some e ∈ T X . Thus also h factorizes through e, see the commutative diagram below: Then m · h factorizes through some e ∈ T X since B |= T X . This implies that h factorizes through e using diagonal fill-in: By substitution invariance, the coimage e X of e Y · g lies in T X . Then h factorizes through e X , as shown by the commutative diagram below.
For the "only if" direction, let A ∈ V(T ). By Assumption . ( ), we can express A as an E X -quotient e : A lies in A 0 and, since V is closed under subobjects and Λ-products, one has A ∈ V. Thus e ∈ T X and e is an upper bound of the e i 's. In order to prove substitution invariance for T (V), suppose that e Y ∈ T Y and h : X → Y are given, and take the To prove ⊆, let A ∈ V. By Assumption . ( ), there exists a quotient e : X ։ A with X ∈ X . Thus e ∈ T X by the definition of T X , and therefore A ∈ V(T (V)) by Lemma A. .
For ⊇, let A ∈ V(T (V)). By Lemma A. , for some X ∈ X , T X contains a quotient e : X ։ A with codomain A. Thus A ∈ V by definition of T X .
⊓ ⊔ Lemma A. . For every equational theory T , we have T = T (V(T )).
Let e X and h be the E/M-factorization of e Y · h. By substitution invariance, e X lies in T X : Since e = h · e X , the cancellation law implies that h lies in E. Since it also lies in M, we have that h is an isomorphism. Thus e X and e represent the same quotient of X, which implies e ∈ T X . ⊓ ⊔

Proof of Theorem .
By Lemma A. and Lemma A. , the two maps V → T (V) and T → V(T ) are mutually inverse bijections. It only remains to show that they are antitone. ( ) Suppose that T ≤ T ′ are theories, and let A ′ ∈ V(T ′ ). Then, by Lemma A. , there exists X ∈ X and a quotient e ′ : X ։ A ′ in T ′ X with codomain A ′ . By E X -completeness of T ′ X , we may assume that e ′ ∈ E X . Since T ≤ T ′ , the quotient e ′ factorizes through some quotient e : X ։ A in T X , i.e. e ′ = q · e for some q : A ։ A ′ . Since e ′ ∈ E X we have q ∈ E X by Lemma A. ( ). Moreover, A ∈ V(T ) by Lemma A. , and thus A ′ ∈ V(T ) because V(T ) is closed under E X -quotients. This shows V(T ′ ) ⊆ V(T ).

Proof of Lemma .
Let S = T (V(T X )). ( ) One has T X ≤ S X . Indeed, suppose that e : X ։ E is a quotient in S X . Then, by definition of T (−), one has E ∈ V(T X ), i.e. E |= T X . Thus e : X ։ E factorizes through some e ′ ∈ T X , which proves T X ≤ S X .
( ) Now suppose that S ′ is any theory with T X ≤ S ′ X . We need to show S ≤ S ′ . Since S = T (V(T X )), this is equivalent to showing that V(S ′ ) ⊆ V(T X ) by Theorem . . Thus let A ∈ V(S ′ ), and let h : X → A. Since A |= S ′ X , the morphism h factorizes through some e ′ ∈ S ′ X . Since T X ≤ S ′ X , the quotient e ′ factorizes through some e ∈ T X . Thus h factorizes through e, which shows that A |= T X , i.e. A ∈ V(T X ).

Proof of Theorem .
Soundness. The soundness of (Weakening) easily follows from the definitions of semantic entailment and satisfaction of equations. For the soundness of (Substitution), let T X ⊆ X և A 0 be an equation and T its substitution closure. We need to prove that T X |= T Y for all Y ∈ X , equivalently, V(T X ) ⊆ V(T ). In fact, this holds even with equality: by Theorem .

Completeness.
Suppose that T X and T ′ Y are equations over X and Y , respectively, and denote by T and T ′ their substitution closures. Suppose that In the penultimate step, we use that V(T X ) ⊆ V(T ′ Y ) by assumption and that the map T (−) is antitone. Thus we obtain the proof where step first step uses (Substitution) and the second one uses (Weakening).

B Details for the Examples of Section
In this section, we provide full details for all the applications mentioned in the paper. Let us start with two general remarks: Remark B. . To characterize E X in a category A of algebras with structure, it suffices to look at the category of underlying structures. Indeed, suppose that ( ) the category A is part of an adjoint situation F ⊣ U : A → B; In the situation of Remark . , our equational logic can be stated in terms of single quotients e X : X ։ E X in lieu of sets T X of them. More precisely, given a quotient e : X ։ E with X ∈ X and E ∈ A 0 , its substitution closure is the smallest substitution invariant family (ē X : X ։ E X ) X∈X with e ≤ē X , where families are ordered componentwise by the order of quotients in X և A 0 . Then the two rules of our deduction system are given by Weakening: e X ⊢ e ′ X for all e ′ X ≤ e X in X և A 0 . Substitution: e X ⊢ē Y for every componentē Y of the substitution closure of e.

B. Birkhoff's Equational Logic
In Section . we derived Birkhoff's HSP theorem from our general HSP theorem.
In this section, we demonstrate that the completeness of Birkhoff's equational deduction system follows from our general completeness result (Theorem . ). A set Γ of term equations semantically entails the term equation s = t (notation: Γ |= s = t) if every Σ-algebra that satisfies all equations in Γ also satisfies s = t. Birkhoff's proof system consists of the following rules, where s, t, u, s i , t i are Σ-terms over an arbitrary set X of variables, σ ∈ Σ is an n-ary operation symbol, and h : We write Γ ⊢ s = t if there exists a proof of s = t from the axioms in Γ using the above rules. Observe that
Proof. We derive this statement from Theorem . . Choose a set X of variables such that Γ ⊆ T Σ X×T Σ X and (s, t) ∈ T Σ X×T Σ X, and suppose that Γ |= s = t.
Let e : T Σ X ։ E X and e ′ : T Σ X ։ E ′ X be the quotients corresponding to the congruences generated by Γ and (s, t), respectively. Then e |= e ′ , so by Theorem . (cf. also Remark B. ), there exists a proof e = e 0 ⊢ e 1 ⊢ · · · ⊢ e n = e ′ in our abstract calculus for some e i : T Σ X i ։ E i . Denote by Γ i the kernel of e i . We show that for every i = 0, . . . , n and (s ′ , t ′ ) ∈ Γ i one has Γ ⊢ s ′ = t ′ ; this then implies Γ ⊢ s = t by putting i = n and (s ′ , t ′ ) = (s, t). The proof is by induction on i.
For i = 0, we have that Γ 0 is the congruence on T Σ X generated by Γ , so Γ 0 is the closure of Γ under the rules (Refl), (Sym), (Trans), (Cong). Thus, every pair (s ′ , t ′ ) ∈ Γ 0 can be proved from Γ using these four rules. Now suppose that 0 < i < n. If the step e i ⊢ e i+1 is an application of the weakening rule, the statement follows trivially by induction because then Γ i+1 ⊆ Γ i . Thus suppose that e i ⊢ e i+1 uses the substitution rule. Identifying equational theories with families of congruences, see Example . , the substitution closure of e i is the family obtained by closing Γ i under the rules (Refl), (Sym), (Trans), (Cong), (Subst). Thus Γ i+1 is equal to ≡ Xi+1 . Therefore, every pair (s ′ , t ′ ) ∈ Γ i+1 can be proved from Γ i using (Refl), (Sym), (Trans), (Cong), (Subst). By induction, it follows that Γ ⊢ s ′ = t ′ .

B. Ordered Algebras
In this section, we show that Bloom's variety theorem for ordered algebras [ ] emerges as a special case of our general HSP theorem. Given a finitary signature Σ, an ordered Σ-algebra is a Σ-algebra A in the category of posets; that is, A endowed with a partial order on its underlying set such that all Σ-operations σ : A n → A are monotone. The category Alg ≤ (Σ) of ordered Σ-algebras and monotone Σ-homomorphisms has a factorization system given by surjective morphism and order-embeddings, respectively. Here, a morphism h : A → B is called an order-embedding if a ≤ a ′ ⇔ h(a) ≤ h(a ′ ) for all a, a ′ ∈ A. The forgetful functor from Alg ≤ (Σ) to Set has a left adjoint mapping to each set X the term algebra T Σ X, discretely ordered.
Step . To treat ordered algebras in our setting, we choose T Σ X ∈ X and e ♯ ∈ E X .
Step . Given an ordered algebra A, a preorder on A is called stable if it refines the order of A (i.e. a ≤ A a ′ implies a a ′ )) and every Σ-operation σ : A n → A (σ ∈ Σ) is monotone with respect to . It is well-known and easy to prove that there is an isomorphism of complete lattices quotients algebras of A ∼ = stable preorders on A (B. ) assigning to e : A ։ B the stable preorder given by a e a ′ iff e(a) ≤ B e(a ′ ).
Step . The exactness property (B. ) suggests that one may replace equations e : T Σ X ։ E by the following syntactic concept: a term inequation over the set X of variables is a pair (s, t) ∈ T Σ X ×T Σ X, denoted as s ≤ t. It is satisfied by an algebra A ∈ Alg ≤ (Σ) if for every morphism h : Equations e : T Σ X ։ E and term inequations are expressively equivalent in the following sense: ( ) For every equation e : T Σ X ։ E, the corresponding preorder e ⊆ T Σ X × T Σ X is a set of term inequations equivalent to e, that is, an algebra A ∈ Alg ≤ (Σ) satisfies e iff it satisfies all term inequations given by the pairs in e . This follows immediately from (B. ). ( ) Conversely, given a term inequation (s, t) ∈ T Σ X × T Σ X, form the smallest stable preorder on T Σ X with s t (viz. the intersection of all such preorders) and let e : T Σ X ։ E be the corresponding quotient. Then, by (B. ) again, an algebra A ∈ Alg ≤ (Σ) satisfies s ≤ t iff it satisfies e.
Step . We therefore deduce from Theorem . :

B. Eilenberg-Schützenberger Theorem
In this section, we derive Eilenberg and Schützenberger's HSP theorem [ ] for finite algebras. Fix a finitary signature Σ containing only finitely many operation symbols.
As in Section . , we have E X = E = surjective morphisms because surjections in Set split. Clearly, all our Assumptions . are satisfied.
Step . The exactness property of Alg(Σ) has already been stated in ( . ).
Step . In the present setting, an equational theory is given by a family T = (T n ) n<ω , where each T n ⊆ T Σ n և Alg f (Σ) is a filter (i.e. a codirected and upwards closed set) in the poset of finite quotient algebras of T Σ n. Remark B. . Note that since E X = E, substitution invariance (see Definition . ) has the following equivalent statement: for every e : T Σ n ։ E in T n and every Σ-homomorphism h : T Σ m → T Σ n, h · e factorizes through some e ′ : T Σ m ։ E ′ in T m . This is easy to see using the upwards closedness of T m .
The syntactic concept corresponding to equational theories involves sequences Equational theories and sequences of term equations are expressively equivalent in the following sense:

term equations, there exists an equational theory T such that, for all finite Σ-algebras A, (B. ) holds.
The proof rests on an observation on congruences (see lemma below) that crucially relies on the finiteness of the signature Σ. In the following, a congruence ≡ ⊆ ×A × A on a Σ-algebra A is called finite if the corresponding quotient algebra A/≡, see ( . ), is finite. It is called finitely generated if there exists a finite subset W ⊆ ≡ such that ≡ is the least congruence on A containing W .

Lemma B. ([ ], Proposition ). Let Σ be a finite signature and n < ω.
Then every finite congruence on T Σ n is finitely generated.
Proof (Lemma B. ). ( ) Let T be an equational theory. Since Σ is finite, T Σ n is countable for each n < ω. Hence, there are only countably many finitely generated congruences on T Σ n, whence only countably many finite quotients, by Lemma B. . In particular, T n is a countable co-directed poset and thus contains an ω op -chain e n 0 ≥ e n 1 ≥ e n 2 ≥ · · · that is cofinal, which means that for every element e ∈ T n there exists i < ω with e ≥ e n i . The e n i can be chosen in a way that, for each i, n < ω and each map q : n + 1 → n, the morphism e n i · T Σ q factorizes through e n+1 i : To see this, suppose inductively that this property already holds for all i < ω and n ′ < n. Since T is a theory, each e n i · T Σ q factorizes through some e ∈ T n+1 .
Since there are only finitely many maps q : n + 1 → n and T n+1 is codirected, we may choose e independently of q. The quotient e lies above some element of the cofinal chain e n+1 0 ≥ e n+1 1 ≥ e n+1 2 ≥ · · · . Replacing this chain by a suitable subchain, we can ensure that e ≥ e n+1 i . Then (B. ) holds.
Iterating (B. ) shows that for all i, m, n < ω with n < m and all q : m → n, the morphism e n i · T Σ q factorizes through e m i , see the diagram below: For each n < ω, the kernel of e n n has a finite set W n of generators by Lemma B. . Let (s i = t i ) i<ω be a sequence of terms equations where (s i , t i ) ranges over all elements in the countable set n<ω W n . We claim that, for each finite Σ-algebra A, the equivalence (B. ) holds.
(⇒) Suppose that A ∈ V(T ). Choose a surjective map h : n ։ A with n < ω. Then h ♯ : T Σ n ։ A factorizes through some e n i , and by (B. ) (replacing n by a larger number if necessary), we may assume that h ♯ factorizes through e n n . We claim that A satisfies all equations s i = t i with (s i , t i ) ∈ m>n W m . To see this, suppose that (s i , t i ) ∈ W m for some m > n, and let k : m → A. By projectivity of m in Set, we may choose q : m → n with h · q = k, which implies h ♯ · T Σ q = k ♯ . Moreover, we have that e n n · T Σ q factorizes through e m n by (B. ), thus also through e m m because e m m ≤ e m n . In other words, we obtain the following commutative diagram, which shows that k ♯ factorizes through e m m .
Suppose that A eventually satisfies the term equations (s i = t i ) i<ω . Then, for some n < ω, the algebra A satisfies all equations s i = t i with (s i , t i ) ∈ m>n W m . To show that A ∈ V(T ), let m < ω and h : m → A. We need to prove that h ♯ factorizes through some e ∈ T m . (c) It remains to consider the case where m ≤ n and T Σ m = 0. Then there exist morphisms q : T Σ (n + 1) ։ T Σ m and j : T Σ m T Σ (n + 1) with q · j = id. Indeed: (i) if m = 0, then T Σ m is the initial algebra. Choose j to be unique initial morphism, and q to be an arbitrary morphism, which exists because T Σ m = 0. Then q · j = id by initiality; (ii) If m > 0, choose q ′ : n + 1 ։ m and j ′ : m n + 1 with q ′ · j ′ = id. Then j = T Σ j ′ and q = T Σ q ′ satisfy q · j = id.
Since T is a theory, we know that e n+1 n+1 · j factorizes through some e ∈ T m , say e n+1 n+1 · j = k · e. Moreover, by (a) above, the morphism h # · q factorizes as h ♯ · q = g · e n+1 n+1 for some g.
so h ♯ factorizes through e ∈ T m , as required.
( ) Let (s i = t i ) i<ω be a sequence of term equations, where (s i , t i ) ⊆ T Σ m i × T Σ m i . For each n < ω, form the set T n ⊆ Alg(Σ) և Alg f (Σ) of all finite quotients e : T Σ n ։ E with the following property: We first show that T = (T n ) n<ω is an equational theory. To see this, note first that T n is a filter: upward closure is obvious, and for codirectedness observe that given e : T Σ n ։ E and e ′ : T Σ n ։ E ′ in T n , the subdirect product (i.e. the coimage of the map e, e ′ : T Σ n → E × E ′ ) clearly lies in T n . To show that T is substitution-invariant, let e ∈ T n and h : T Σ m → T Σ n. Factorize e · h = m · e with e surjective and m injective. Since e ∈ T n , there exists i 0 < ω as in (B. ). Then, for every i ≥ i 0 and g : This implies m · e · g(s i ) = m · e · g(t i ), so e · g(s i ) = e · g(t i ) because m is injective. This shows that e ∈ T m , i.e. T is substitution-invariant. E X -completeness is trivial because E X = E (see Remark . ). We claim that a finite Σ-algebra A lies in V(T ) iff it eventually satisfies (s i = t i ) i<ω .
(⇒) Let A ∈ V(T ). Choose a surjective morphism e : T Σ n ։ A for some n < ω. Then e factorizes through some element of T n , which implies e ∈ T n because this set is upwards closed. Thus, there exists i 0 < ω as in (B. ). We claim that A satisfies all the equations s i = t i with i ≥ i 0 . Indeed, let h : T Σ m i → A. By projectivity of T Σ m i , there exists g : T Σ m i → T Σ n with h = e · g. By (B. ) we have e · g(s i ) = e · g(t i ) and thus h(s i ) = h(t i ). Thus A satisfies s i = t i for i ≥ i 0 .
(⇐) Suppose that A eventually satisfies (s i = t i ) i<ω ; say, it satisfies s i = t i for all i ≥ i 0 . To show that A ∈ V(T ), let n < ω and h : T Σ n → A. For all i ≥ i 0 and g : Letting e denote the coimage of h, this implies e · g(s i ) = e · g(t i ) for all i ≥ i 0 , and thus e ∈ T n by definition of T n . We have thus shown that h factorizes through e ∈ T n , which proves that A ∈ V(T ).

⊓ ⊔
Step . From the theory version of our HSP theorem (Theorem . ) and the previous lemma, we conclude:

Theorem B. (Eilenberg-Schützenberger [ ]). A class of finite Σ-algebras is closed under finite products, subalgebras and quotients if and only if it is axiomatizable by a sequence of term equations.
Our above derivation of this theorem is overall not shorter than the original proof of Eilenberg and Schützenberger, and also rests on their Lemma B. . However, the present approach has the advantage of explicitly relating the syntactic concept of a sequence of term equations to the order-theoretic concept of an equational theory, which is missing in the original paper.

B. Reiterman's Theorem and Pin & Weil's Theorem
Reiterman [ ] proved another HSP theorem for finite Σ-algebras, in which one uses profinite equations rather than sequences of equations as in Eilenberg and Schützenberger's result (see Section B. ). In contrast to the latter, Reiterman's theorem applies to algebras over arbitrary finitary signatures Σ, not only signatures with finitely many operations. In this section, we show how to derive this theorem from our general results. We omit some of the details because Reiterman's theorem has already been treated categorically in previous work [ ].
A topological Σ-algebras is a Σ-algebras A with a topology on its underlying set such that all Σ-operations σ : A n → A are continuous. A profinite Σ-algebra is a topological Σ-algebra that can be expressed as a limit of finite algebras with discrete topology. We write ProAlg(Σ) for the category of profinite Σ-algebras and continuous Σ-homomorphisms. The category Alg f (Σ) of finite Σ-algebras forms a full subcategory of ProAlg(Σ) by identifying finite Σ-algebras with profinite Σ-algebras with discrete topology. The forgetful functor from ProAlg(Σ) to Set has a left adjoint assigning to each set X the free profinite Σ-algebra T Σ X. The latter can be computed as the limit of all finite quotient algebras of T Σ X, i.e. the limit of the diagram To deduce Reiterman's theorem from our HSP theorem, we proceed as follows.
The class E X = E consists of all surjective morphisms. This follows from Remark B. applied to ProAlg(Σ) / / ⊤ Set o o , X ′ = Set f and E ′ = surjections. Our Assumptions . are satisfied: for ( ), note that finite products of finite (and thus discrete) profinite Σ-algebras are computed in Set. ( ) is clear. For ( ), let A be a finite Σ-algebra and choose a surjective map e : X ։ A for some finite set X. Then the unique extension e : T Σ X ։ A is surjective, i.e. T Σ X ∈ X and e ∈ E X .
Step . Given a profinite Σ-algebra A, a profinite congruence on A is a Σalgebra congruence ≡ ⊆ A × A such that the quotient algebra A/≡, equipped with the quotient topology, is profinite. In analogy to ( . ), there is an isomorphism of complete lattices profinite quotient algebras of A ∼ = profinite congruences on A (B. ) mapping a profinite quotient e : A ։ B to its kernel ≡ e ⊆ A × A. To see this, one just needs to show that given profinite congruences ≡ ⊆ ≡ ′ on A, one has e ≤ e ′ for the corresponding quotients e : A ։ A/≡ and e ′ : A ։ A/≡ ′ , i.e. e ′ factorizes through e in ProAlg(Σ). But this follows immediately from the fact that the codomain A/≡ of e carries the quotient topology, i.e., every function h with e ′ = h · e is continuous.
Step . In the present setting, an equation over a finite set X of variables is given by a filter T X ⊆ T Σ X և Alg f (Σ) in the poset of finite quotient algebras of T Σ X. One can view T X as a diagram of finite algebras in ProAlg(Σ) and take its limit cone π q : P X ։ A (where q : T Σ X ։ A ranges over T X ). Its universal property gives a unique morphism e X : T Σ X ։ P X with π q · e = q for all q ∈ T X . By standard properties of inverse limits of topological spaces, the map e is surjective [ , Corollary . . ]. Then a finite Σ-algebra A satisfies the equation T X iff every h : T Σ X → A factorizes through e X . We have thus shown that every equation T X can be presented as a single quotient e X .
A profinite equation over a finite set X of variables is a pair (s, t) ∈ T Σ X × T Σ X, denoted as s = t. It is satisfied by a finite Σ-algebra A if for every map h : X → A we have h ♯ (s) = h ♯ (t). Here, h ♯ : T Σ X → A denotes the unique extension of h to a morphism in ProAlg(Σ), using the universal property of the free profinite algebra T Σ X.
Equations are expressively equivalent to profinite equations: ( ) For every equation expressed as a profinite quotient e : T Σ X ։ E, the corresponding profinite congruence ≡ e ⊆ T Σ X × T Σ X is a set of profinite equations equivalent to e, that is, a Σ-algebra A satisfies e iff it satisfies all term inequations in ≡ e . This follows immediately from the exactness property (B. ).
( ) Conversely, given a profinite equation (s, t) ∈ T Σ X × T Σ X, form the smallest profinite congruence ≡ on T Σ X with s ≡ t (viz. the intersection of all such congruences) and let e : T Σ X ։ E be the corresponding quotient. Then a profinite Σ-algebra A satisfies s = t iff it satisfies e. This is once again a consequence of the exactness property (B. ).

Theorem B. (Reiterman [ ]). A class of finite Σ-algebras is a pseudovariety (i.e. closed under under quotients, subalgebras and finite products) iff it is axiomatizable by profinite equations.
As for Birkhoff's classical HSP theorem, there is an ordered version of this result. An ordered profinite Σ-algebra is a profinite Σ-algebra carrying an additional partial order such that all operations are continuous and monotone. Morphisms are monotone continuous Σ-homomorphisms. Accordingly, take the parameters -(E, M) = (surjective morphisms, order-embeddings); -X = all finitely generated free ordered profinite algebras T Σ X (X ∈ Set f ); -Λ = all finite cardinals.
In analogy to the above unordered case, replacing profinite equations s = t by profinite inequations s ≤ t, we obtain

B. Quantitative Algebras
In this section, we derive an HSP theorem for quantitative algebras as an instance of our general results. Recall that an extended metric space is a set A with a map d A : A × A → [0, ∞] (assigning to any two points a possibly infinite distance), subject to the axioms Let Met ∞ denote the category of extended metric spaces and nonexpansive maps. Note that products i∈I A i in Met ∞ are given by cartesian products with the sup metric d((a i ) i∈I , (b i ) i∈I ) = sup i∈I d Ai (a i , b i ), and coproducts i∈I A i by disjoint unions, where points in distinct components have distance ∞. Fix a, not necessarily finitary, signature Σ, that is, the arity of an operation symbol σ ∈ Σ is any cardinal number. A quantitative Σ-algebra is a Σ-algebra A endowed with an extended metric d A such that all Σ-operations σ : A n → A are nonexpansive. The forgetful functor from the category QAlg(Σ) of quantitative Σ-algebras and nonexpansive Σ-homomorphisms to Met ∞ has a left adjoint assigning to each space X the free quantitative Σ-algebra T Σ X. The latter is carried by the set of all Σ-terms (equivalently, well-founded Σ-trees) over X, with metric inherited from X as follows: if s and t are Σ-terms of the same shape, i.e. they differ only in the variables, their distance is the supremum of the distances of the variables in corresponding positions of s and t; otherwise, it is ∞.
The HSP theorem for quantitative algebras is parametric in a regular cardinal number c > 1. In the following, an extended metric space is called c-clustered if it is a coproduct of spaces of cardinality < c.
Step . Choose the parameters of our setting as with X ′ = c-clustered spaces and E ′ = surjective nonexpansive maps, the statement of the lemma can be reduced to the case where the signature Σ is empty, that is, we can assume that A = Met ∞ and X = c-clustered spaces.
Note that X is the closure of the class X c = {X ∈ Met ∞ : |X| < c } under coproducts. Since a coproduct is projective w.r.t. some morphism e iff all of the coproduct components are, one has E X = E Xc . Therefore, it suffices to show that, for every e : For the "⇒" direction, suppose that e ∈ E Xc , and let m : B 0 B be a subspace of size < c. Then B 0 ∈ X c and thus there exists g : ]. It follows that e[A 0 ] = B 0 , and for every pair of elements i.e. e : A 0 → B 0 is isometric. Thus e is c-reflexive.
For the "⇐" direction, suppose that e is c-reflexive and let h : X → B be a nonexpansive map with X ∈ X c , i.e. |X| < c.  (g(x)). This defines a function g : X → A with e · g = h. Moreover, g is nonexpansive: for all x, y ∈ X we have This proves e ∈ E Xc .
Remark B. . It follows that our Assumptions . are satisfied. For ( ), just observe that products in QAlg(Σ) are formed on the level of underlying metric spaces. ( ) is trivial. For ( ), we need to show that every algebra A ∈ QAlg(Σ) is a c-reflexive quotient of some algebra in X . To this end, consider the family m i : which proves ( ).
Step . Next, we establish the required exactness property for quantitative algebras. Recall that an (extended) pseudometric on a set A is a map p : A × A → [0, ∞] satisfying all axioms of a metric except possibly the implication p(a, b) ⇒ a = b; that is, two distinct points may have distance 0 with respect to p. Given a quantitative Σ-algebra A, a pseudometric p on A is a congruence if is nonexpansive with respect to p, that is, for each n-ary operation symbol σ ∈ Σ and a i , b i ∈ A one has Congruences are ordered by p ≤ q iff p(a, a ′ ) ≤ q(a, a ′ ) for all a, a ′ ∈ A.

Lemma B. . For each quantitative Σ-algebra A, there is a dual isomorphism of complete lattices quotients of A ∼ = congruences on A.
Proof. Every quotient e : A ։ B in QAlg(Σ) defines a congruence p e on A given by p e (a, a ′ ) = d B (e(a), e(a ′ )) for a, a ′ ∈ A. Conversely, let p be a congruence on A. Then the equivalence relation ≡ p on A given by a ≡ p a ′ iff p(a, a ′ ) = 0 is a Σ-algebra congruence. This yields the quotient e p : The two maps e → p e and p → e p are clearly antitone and mutually inverse. ⊓ ⊔

Remark B. . ( ) Given
A ∈ QAlg(Σ) and a family of triples (a j , b j , ε j ) (j ∈ J) with a j , b j ∈ A and ε j ∈ [0, ∞], there is a largest congruence p on A with p(a j , b j ) ≤ ε j for all j, viz. the pointwise supremum of all such congruences. We call p the congruence generated by the relations a j = εj b j . If A is just a set (viewed as a discrete algebra over the empty signature) we call p the pseudometric generated by the relations a j = εj b j .
( ) As an immediate consequence of the above lemma, we obtain the homomorphism theorem for quantitative algebras: given any two morphisms e : A ։ B and f : A → C in QAlg(Σ) with e surjective, then f factorizes through e if and only if p f ≤ p e , that is, d C (f (a), f (a ′ )) ≤ d B (e(a), e(a ′ )) for all a, a ′ ∈ A. Note that if the congruence p e is generated by the relations a j = εj b j (j ∈ J) then it suffices to verify that d C (f (a j ), f (b j )) ≤ ε j for all j.
Step . By Remark . , in the current setting an equation can be presented as a single quotient e X : T Σ X ։ E with X a c-clustered space. The corresponding syntactic concept is given by Definition B. . ( ) A c-clustered equation over the set X of variables is an expression of the form is c-clustered so that for each i ∈ I, x i , y i lie in the same coproduct component of X. In other words, X can be expressed as a disjoint union X = j∈J X j of subsets of size < c such that only relations between elements in the same X j are mentioned on the left-hand side of (B. ) Here we denote by h ♯ : T Σ X → A the unique Σ-algebra morphism extending h. ). Moreover, since s and t contain < κ variables, and every cluster of X has size < c, it follows that less than c · κ = c conditions remain, i.e. we obtain a c-basic conditional equation.

Lemma B. . Equations and c-clustered equations are expressively equivalent.
Proof. ( ) Given any equation e : T Σ X ։ E, where X = j∈J X j with |X j | < c, form the c-clustered equations over X given by ) with ε x,y = d X (x, y) and ε s,t = d E (e(s), e(t)). Note that (B. ) is c-clustered because c is regular. Then an algebra A ∈ QAlg(Σ) satisfies the equation e iff it satisfies all the c-clustered equations (B. ). Indeed, we have In the penultimate step, we use that for x ∈ X j and y ∈ X k with j = k, the inequality d A (h(x), h(y)) ≤ d X (x, y) holds trivially because d X (x, y) = ∞.
( ) Conversely, to every c-clustered equation (B. ) over a set X of variables, we associate an equation in two steps: -Take the pseudometric p on X generated by the relations and let e p : X ։ X p denote the corresponding quotient. -Take the congruence q on T Σ (X p ) generated by the single relation T Σ e p (s) = ε T Σ e p (t), and let e q : T Σ (X p ) ։ E q be the corresponding quotient.
We claim that (a) X p is c-clustered (and thus e q is an equation), and (b) e q and (B. ) are equivalent, i.e. satisfied by the same algebras. For (a), note that since (B. ) is a c-clustered equation, X can be decomposed as a coproduct X = X j of subsets of size < c such that for all i ∈ I one has x i , y i ∈ X j for some (unique) j. Let p j be pseudometric on X j generated by the relations x i = εi y i with i ∈ I and x i , y i ∈ X j . Then we have X p = j (X j ) pj , so X p is a coproduct of spaces of size < c, i.e. a c-clustered space.
In order to prove (b), let r denote the congruence on T Σ X generated by the relations x i = εi y i (i ∈ I) and s = ε t, with corresponding quotient e r : T Σ X ։ E r . We claim that the quotients e q · T Σ e p and e r are isomorphic. To prove this, we use the homomorphism theorem. We have for each i ∈ I and, moreover, d Eq (e q · T Σ e p (s), e q · T Σ e p (t)) = q(T Σ e p (s), T Σ e p (t)) ≤ ε.
Thus e q · T Σ e p factorizes through e r , i.e. k · e r = e q · T Σ e p for some k : E r ։ E q .
For the converse, note first that e r factorizes through T Σ e p because r ≤ p. Thus e r = f ·T Σ e p for some f : T Σ X p ։ E r . The morphism f factorizes through e q because d Er (f · T Σ e p (s), f · T Σ e p (t)) = d Er (e r (s), e r (t)) = r(s, t) ≤ ε.
Thus f = l · e q for some l : E q ։ E p . This yields the commutative diagram below, which proves that k and l are mutually inverse since e r an e q · T Σ e p are epimorphisms: Consequently, for every A ∈ QAlg(Σ), The third step might not be immediately clear, and so we now provide further details. First a general fact about free algebras: let Y be any set, and denote by η Y : For the "⇒" direction of the third equivalence, suppose that g ♯ = k · T Σ e p for some k : T Σ X p → A. Let h = k · η Xp so that g ♯ = h ♯ · T Σ e p , which factorizes through e r by assumption.
For the converse "⇐", let h : Then g ♯ factorizes through T Σ e p and therefore through e r , i.e. h ♯ · T Σ e p factorizes through e r as desired.

⊓ ⊔
Step . From Lemma B. and Theorem . , we conclude: Given a set Γ of unconditional equations and an unconditional equation s = ε t, we write Γ ⊢ s = ε t if s = ε t can be proved from the axioms in Γ using the above rules. Note that due to the infinitary rule (Arch), a proof can be transfinite. We write Γ |= s = ε t if every quantitative Σ-algebra that satisfies all equations in Γ also satisfies s = ε t. In the following, we demonstrate how to obtain the completeness of this calculus from our general completeness result (Theorem . ). As in our treatment of Birkhoff's equational logic in Section B. , the key lies in the observation that the above rules amount to computing the congruence (or the equational theory, resp.) generated by given a set of equations.
Remark B. . Since 2-clustered spaces are precisely the discrete spaces (i.e. d(x, y) = ∞ for x = y), the class X consists of all free algebras T Σ X with X ∈ Set. Moreover, we have E X = E. Thus, by Remark . , in the current setting an equational theory is presented by a family of quotients (e X : T Σ X ։ E X ) X∈Set which is substitution invariant in the sense that for every Σ-homomorphism h : For any equation e : T Σ X ։ E we denote by Γ e = { s = ε t : s, t ∈ T Σ X and d E (e(s), e(t)) ≤ ε } the set of unconditional equations associated to e. More generally, for a family (e X : T Σ X ։ E X ) X∈Set of equations we get an associated family (Γ eX ) X∈Set of sets of unconditional equations.

( ) A family (Γ X ) X∈Set of sets of unconditional equations is associated to some equational theory iff it is closed under (Refl), (Sym), (Triang), (Max), (Arch), (Cong), (Subst).
Proof. ( ) For the "only if" direction let e : T Σ X ։ E be an equation and let p(s, t) := d E (e(s), e(t)) be the congruence on T Σ X associated to e. That Γ e is closed under the required rules now follows easily from the congruence properties of p. Indeed, Γ e is closed under (Refl), (Sym), and (Triang) because p is a pseudometric. For instance, closure under (Triang) is equivalent to the implication p(s, t) ≤ ε and p(t, u) ≤ δ =⇒ p(s, u) ≤ ε + δ, (B. ) which in turn is equivalent to p(s, t) + p(t, u) ≥ p (s, u). That operations are nonexpansive w.r.t. p is equivalent to the statement that, for all σ ∈ Σ n , p(s i , t i ) ≤ ε for i = 1, . . . , n =⇒ p(σ(s 1 , . . . , s n ), σ(t 1 , . . . , t n )) ≤ ε, which means precisely that Γ e is closed under (Cong).
For the "if" direction, suppose that Γ is a set of unconditional equations that has the required closure properties. Define p : It is straightforward to verify that p is a congruence on T Σ X. To see this note that T Σ X is a discrete space since so is (the set) X. Hence, p(s, t) ≤ d TΣ X (s, t) is clear. That p is a pseudometric follow from closure of Γ under (Refl), (Sym), and (Triang). E.g., the triangle inequality is equivalent to the statement that (B. ) holds, and to this end observe that p(s, t) ≤ ε is equivalent to (s = ε+ε ′ t) ∈ Γ for all ε ′ > 0, and similarly p(t, u) ≤ δ is equivalent to (t = δ+δ ′ u) ∈ Γ for all δ ′ > 0. Thus, (s = ε+δ+ε ′ +δ ′ u) ∈ Γ for all ε ′ , δ ′ > 0, and this is equivalent to the right-hand side of the implication in (B. ). That the operations on T Σ X are nonexpansive w.r.t. p follows in a similar way from closure of Γ under (Cong). Furthermore, we have Γ = Γ e for the quotient e : T Σ X ։ E corresponding to p. Indeed, we have d E (e(s), e(t)) = p(s, t) by Lemma B. . Thus Γ ⊆ Γ e is clear. For Γ e ⊆ Γ suppose that (s = ε t) ∈ Γ e , i.e. p(s, t) ≤ ε. By the definition of p we thus have (s = ε ′ t) ∈ Γ for all ε ′ > p (s, t), whence by the closure of Γ under (Arch), (s = p(s,t) t) ∈ Γ . From the closure of Γ under (Max), we conclude that (s = ε t) ∈ Γ (if ε > p(s, t) and for ε = p(s, t) we were done before).
( ) For the "only if" direction, suppose that (Γ X ) X∈Set is associated to some theory (e X : T Σ X ։ E X ) X∈Set , so Γ X = Γ eX for all X. By part ( ), each Γ X is closed under (Refl), (Sym), (Triang), (Max), (Arch), (Cong). To show closure under (Subst), let h : T Σ X → T Σ Y be a homomorphism. By substitution closure of the theory (e X ) X , the morphism e Y · h factorizes through e X , which implies by the homomorphism theorem. But this inequality states precisely that for (s = ε t) ∈ Γ X one has h(s) = ε h(t) ∈ Γ Y , i.e. closure under (Subst). For the "if" direction, part ( ) implies that each Γ X is associated to some e X : T Σ X ։ E X . Moreover, closure under (Subst) states precisely that, for each homomorphism h : T Σ X → T Σ Y one has (B. ), which by the homomorphism theorem implies that e Y · h factorizes through e X . Thus, (e X ) X∈Set is a theory.
The completeness proof is now analogous to the proof of Theorem B. : Proof. We derive this statement from Theorem . . Choose a set X of variables such that all equations in Γ and the equation s = ε t are formed over X, and suppose that Γ |= s = ε t. Let e : T Σ X ։ E X and e ′ : T Σ X ։ E ′ X be the quotients corresponding to the congruences generated by the relations in Γ and by s = ε t, respectively. Then e |= e ′ by the homomorphism theorem, so by Theorem . (cf. also Remark B. ), there exists a proof e = e 0 ⊢ e 1 ⊢ · · · ⊢ e n = e ′ in our abstract calculus, where e i : T Σ X i ։ E i . We show that for every i = 0, . . . , n and (s ′ = ε ′ t ′ ) ∈ Γ ei one has Γ ⊢ s ′ = ε ′ t ′ ; this then implies Γ ⊢ s = ε t by putting i = n and (s ′ = ε ′ t ′ ) = (s = ε t). The proof is by induction on i. For i = 0, we have that the set Γ e0 = Γ e corresponds to the congruence generated by Γ , so it is the closure of Γ under the rules (Refl), (Sym), (Triang), (Max), (Arch), (Cong) by Lemma B. ( ). Thus, every equation s ′ = ε ′ t ′ in Γ e0 can be proved from Γ using these rules. Now suppose that 0 < i < n. If the step e i ⊢ e i+1 is an application of the weakening rule, the statement follows trivially by induction because then Γ ei+1 ⊆ Γ ei . Thus suppose that e i ⊢ e i+1 uses the substitution rule. By Lemma B. ( ), the substitution closure of e i is given by the family of sets of equations (Γ Y ) Y ∈Set obtained by closing Γ ei under all the rules (Refl), (Sym), (Triang), (Max), (Arch), (Cong), (Subst).

B. Nominal Algebras
In this section, we derive an HSP theorem for algebras in the category of nominal sets. We first recall some terminology; see Pitts [ ] for details. Fix a countably infinite set A of atoms and denote by Perm(A) the group of all permutations π : A → A moving only finitely many elements of A. A nominal set is a set X equipped with a group action Perm(A) × X → X, (π, x) → π · x, such that every element of X has a finite support; that is, for every x ∈ X there exists a finite set S ⊆ A such that for every π ∈ Perm(A) one has [ ∀a ∈ S : π(a) = a ] ⇒ π · x = x.
This implies that x has a least support supp X (x) ⊆ A, viz. the intersection of all supports of x. Every nominal set X can be partitioned into the subsets of the form {π · x : π ∈ Perm(A)} (x ∈ X), called the orbits of X. An equivariant map between nominal sets X and Y is a function f : X → Y such that f (π · x) = π · f (x) for all x ∈ X and π ∈ Perm(A). Equivariance implies that supp Y (f (x)) ⊆ supp X (x) for all x ∈ X. We denote by Nom the category of nominal sets and equivariant maps. Nom has the factorization system of epimorphisms and monomorphisms (= surjective and injective equivariant maps). The product of a family of nominal sets X i (i ∈ I) is given by where |X i | denotes the underlying set of X i and the group action is given pointwise. The coproduct i∈I X i is formed on the level of underlying sets. A nominal set X is called strong if for every element x ∈ X and π ∈ Perm(A) one has For any finite set I let A I = i∈I A denote the I-fold power of A. Then is a strong nominal set with group action (π · a)(i) := π(a(i)) for π ∈ Perm(A).

Definition B. .
A supported set is a set X together with a map supp X : X → P f (A). A morphism between supported sets X and Y is a function f : Every nominal set X is a supported set w.r.t. its least-support function supp X .

Lemma B. . The forgetful functor from Nom to SuppSet has a left adjoint.
Remark B. . The left adjoint F : SuppSet → Nom sends a supported set X to the nominal set F X = x∈X A #supp X (x) , and the universal map η X : X → F X maps an element x ∈ X to the inclusion map supp X (x) A in A #supp X (x) .
Proof. Let X be a supported set and let Y be a nominal set. We need to show that every morphism h : X → Y in SuppSet uniquely extends to an equivariant map h : F X → Y with h · η X = h. Note that every element of F X is of the form π · η X (x) for a (unique) x ∈ X and some π ∈ Perm(A). Thus the formula h(π · η X (x)) := π · h(x) (π ∈ Perm(A)) gives a total function h : F X → Y , provided that we can prove it to be welldefined. To this end, suppose that π · η X (x) = σ · η X (x) for x ∈ X and π, σ ∈ Perm(A). Since F X is strong, π and σ agree on supp F X (η X (x)) = supp X (x).
In particular, they agree on supp Y (h(x)) ⊆ supp X (x), which implies π · h(x) = σ · h(x). Thus h is a well-defined map. From its definition it is immediately clear that h is equivariant and satisfies h · η X (x) = h(x) for all x ∈ X. Moreover, since the elements η X (x) (x ∈ X) meet every orbit of F X, the map h is unique with this property. Proof. ( ) Choose a subset Y ⊆ Z containing exactly one element of every orbit of Z. Then Y is a supported set, with supp Y being the restriction of supp Z . By Lemma B. , the inclusion map Y Z uniquely extends to an equivariant map e : F Y ։ Z. The map e is surjective because its image meets every orbit of Z. Moreover, it preserves least supports: for all y ∈ Y and π ∈ Perm(A), one has where the middle equation in the first line follows since e · η Y is the inclusion map Y ֒→ Z.
( ) Suppose that Z is a strong nominal set. We show that the map e : F Y ։ Z constructed in part ( ) of the proof is injective, and thus an isomorphism. By the choice of Y ⊆ Z, the map e sends elements of distinct orbits of F Y to distinct orbits of Z. It therefore suffices to verify that e does not merge any two elements of F Y that belong to the same orbit. Thus let y ∈ Y and π, σ ∈ Perm(A) with e(π · η Y (y)) = e(σ · η Y (y)), i.e. π · y = σ · y. Since Z is strong, π and σ agree on supp Z (y) = supp F Y (η Y (y)). Thus π · η Y (y) = σ · η Y (y), which proves that e is injective. ⊓ ⊔ Fix a finitary signature Σ. A nominal Σ-algebra is a nominal set A with a Σalgebra structure such that all operations σ : A n → A (σ ∈ Σ) are equivariant. Morphisms of nominal Σ-algebras are equivariant Σ-homomorphisms. The forgetful functor from the category NomAlg(Σ) of nominal Σ-algebras to Nom has a left adjoint associating to each X ∈ Nom the term algebra T Σ X, with group action inherited from the one of X. To get an HSP theorem for nominal Σ-algebras, we follow the four steps indicated at the beginning of Section .
Step . We choose the parameters of our setting as follows: -A = A 0 = NomAlg(Σ); -(E, M) = (surjective morphisms, injective morphisms); -Λ = all cardinal numbers; Step . The exactness property of NomAlg(Σ) is a straightforward generalization of the one of Alg(Σ), see ( . ). An equivariant congruence relation on a nominal Σ-algebra A is a congruence relation ≡ ⊆ A × A that forms an equivariant subset of A × A, i.e., a ≡ a ′ implies π · a ≡ π · a ′ for all π ∈ Perm(A). Proof. This follows immediately from the corresponding statement for ordinary Σ-algebras, together with the observation that an equivalence relation ≡ ⊆ A×A on a nominal set A is equivariant iff the corresponding surjection e : A ։ A/≡ is equivariant. ⊓ ⊔ Step . By Remark . , in our current setting an equation can be presented as a single quotient e : T Σ X ։ E X in NomAlg(Σ). The corresponding syntactic concept is the following: where id # the unique extension of the identity map id : A → A.
( ) A nominal equation over Y is an expression of the form where the map m : Perm(A) × Y → X is given by (π, y) → π · y. It follows from the definition of F in Remark B. that the map m is surjective, thus so is e · T Σ m. We claim that, for every nominal Σ-algebra A, A satisfies e ⇐⇒ A satisfies (B. ).
To prove (⇐), suppose that A satisfies the nominal equations (B. ), and let h : X → A be an equivariant map. Then the restriction g : Y → A of h satisfies supp A (g(y)) ⊆ supp Y (y) for all y ∈ Y , that is, it is a map of supported sets. Thus, since A satisfies (B. ), the kernel of e · T Σ m is contained in the kernel of g. It follows that there exists k : E → A with k · e · T Σ m =ĝ, i.e., the outside of the diagram below commutes: The upper triangle also commutes because, for all (π, y) ∈ Perm(A) × Y , and both h # · T Σ m andĝ are Σ-algebra homomorphisms. Since T Σ m is an epimorphism, it follows that the lower triangle commutes, i.e., h # factors through e. Thus A satisfies e. For the proof of (⇒), suppose that A satisfies e, and let g : Y → A be a map of supported sets. By Lemma B. , g extends uniquely to an equivariant map h : X → A. Since A satisfies e, we have h # = k · e for some k : E → A. Then the diagram (B. ) commutes: the lower triangle commutes by definition, and the upper one by (B. ). Therefore, for all s, t ∈ T Σ (Perm(A) × Y ) with e · T Σ m(s) = e · T Σ m(t) one haŝ i.e. A satisfies (B. ).
( ) To every nominal equation supp Y ⊢ s = t over the set Y we associate an equation as follows. Put X = F Y ; as before, we view Y as a subset of X. Form the nominal congruence generated by the pair (T Σ m(s), T Σ m(t)) (viz. the intersection of all nominal congruences containing this pair), and let e : T Σ X ։ E be the corresponding quotient. Then for every nominal Σ-algebra A one has To prove (⇒), note that supp Y ⊢ s = t is one of the nominal equations (B. ) associated to e, and we have already shown in part ( ) that every algebra that satisfies e also satisfies its associated nominal equations.
For (⇐), suppose that A satisfies supp Y ⊢ s = t, and let h : X → A be an equivariant map. Then its restriction g : Y → A is a map of supported sets, and h # · T Σ m =ĝ by (B. ). Then which implies that the kernel of e (being generated by (T Σ m(s), T Σ m(t))) is contained in the kernel of h # . It follows that h # factorizes through e. Thus A satisfies e. ⊓ ⊔ Step . From the previous lemma and Theorem . , we deduce: -A i = { n<ω a n : (a n ) n<ω ω-chain in A i−1 } if i is an successor ordinal; A continuous Σ-algebra is a Σ-algebra with an ω-cpo structure on its underlying set and continuous operations. Note that the operations are not required to be strict. We denote by ωAlg(Σ) the category of continuous Σ-algebras and strict continuous Σ-homomorphisms.

Lemma B. . The factorization system of ωCPO lifts to ωAlg(Σ).
Proof. ( ) For each cpo B and each Σ-subalgebra A ⊆ B, the closure A ⊆ B forms a Σ-subalgebra. To see this, it suffices to show that each of the sets A i defined above is a subalgebra. For i = 0, this holds by assumption since A 0 = A. If i is a limit ordinal, the claim is clear by induction because directed unions of subalgebras are subalgebras. Thus suppose that i is a successor ordinal, let σ ∈ Σ be an n-ary operation symbol and a 1 , . . . , a n ∈ A i . Thus, for each j = 1, . . . , n one has a j = k<ω a j k for some chain (a j k ) k<ω in A i−1 . Since σ : B n → B is continuous, we have that σ(a 1 , . . . , a n ) = k<ω σ(a 1 k , . . . , a n k ) is an element on A i , using that σ(a 1 k , . . . , a n k ) ∈ A i−1 for all k < ω by induction. ( ) Now let h : A → B be a morphism of continuous Σ-algebras. Its canonical is a Σ-subalgebra of B by part ( ). Moreover, given a commutative square h·e = m·g in ωAlg(Σ) with e dense and m a closed embedding, the unique diagonal fill-in d in ωCPO with d · e = g and m · d = h is also a Σ-homomorphism because m and h are Σ-homomorphisms and m is injective.

⊓ ⊔
The forgetful functor from the category ωAlg(Σ) to Set has a left adjoint mapping to each set X the free continuous Σ-algebra T Σ (X ⊥ ). The latter is carried by the set of all finite or infinite Σ-trees with leaves labelled in X ∪ {⊥} [ ]. To establish the continuous HSP theorem, we follow our four-step procedure: Step . Choose the following parameters: -A = A 0 = ωAlg(Σ); -Λ = all cardinal numbers; -(E, M) = (dense morphisms, closed order-embeddings); -X = all free algebras T Σ (X ⊥ ) with X ∈ Set; Note that, in contrast to all applications discussed in the previous sections, the morphisms in E are not necessarily surjective. However, we have Lemma B. . E X consists precisely of the surjective morphisms.
Proof. As usual (cf. the proofs of Lemma B. and Lemma B. ), it suffices to consider the case of an empty signature, i.e. where A = ωCPO. To this end, just observe that for every set X and every ω-cpo A there is a bijective correspondence between maps X → A and strict continuous maps X ⊥ → A. Thus, the statement of the lemma follows from the fact that in Set, a map e is surjective iff every set X is projective w.r.t. e. ⊓ ⊔ We conclude that our Assumptions . are satisfied by our data. For ( ), use that products ωAlg(Σ) are formed on the level of underlying sets, with Σ-algebra structure and partial order computed pointwise. Condition ( ) is trivial. For ( ), let A ∈ ωAlg(Σ), and choose a surjective map e : X ։ A for some set X. Then the unique extension e ♯ : T Σ (X ⊥ ) ։ A to a nonexpansive map is also surjective. Moreover, e ♯ ∈ E X by the above lemma and T Σ (X ⊥ ) ∈ X by definition of X .
Step / . By Remark . , in our current setting an equation can be presented as a single quotient e : T Σ X ⊥ → E in ωAlg(Σ). The corresponding syntactic concept involves terms endowed with formal join operations. Given a set X of variables, put S Σ (X) = i S Σ,i (X) where i ranges over all ordinal numbers and S Σ,i (X) is defined by transfinite induction as follows: -S Σ,0 (X) = set of all Σ-terms in the variables X ⊥ = X ∪ {⊥}; -S Σ,i (X) = j<i S Σ,j (X) for i a limit ordinal.
Note that S Σ,i (X) = S Σ,ω1 (X) for all i ≥ ω 1 , so S Σ (X) is a set. Every map h : X → A into a continuous Σ-algebra A extends to a partial map h : S Σ (X) → A, defined by structural induction as follows: -For t ∈ S Σ,0 (X), let h(t) be the evaluation of the term t in A; -If t = k<ω t k , all the values h(t k ) are defined, and ( h(t k )) k<ω forms a ω-chain in A, put ( ) For every map h : X → A one has e · h = e · h. More precisely, for all t ∈ S Σ (X) such that h(t) is defined, the value e · h(t) is defined and e· h(t) = e · h(t).
If moreover e is an order-embedding, then h(t) is defined iff e · h(t) is defined.
( ( ) There exists a morphism g : B → C with g · e = h. ( ) For every pair of terms t, t ′ ∈ S Σ (A), if both e(t) and e(t ′ ) are defined and e(t) ≤ A e(t ′ ), then also h(t) and h(t ′ ) are defined and h(t) ≤ B h(t ′ ).
Proof. ( ) ⇒ ( ) follows immediately from the first part of the previous lemma. For the converse, assume that ( ) holds and let b ∈ B. Since e is dense, we have e[A] = B, so by the previous lemma, there exists t ∈ S Σ (A) with e(t) = b. Put g(b) := h(t). By ( ), this gives a well-defined monotone map g : B → C with g · e = h. To see that g preserves ω-suprema, let (b k ) k<ω be an ω-chain in B, and choose t k ∈ S Σ (A) with e(t k ) = b k for all k < ω. Then the value e( k<ω t k ) is defined, so by ( ) the value h( k<ω t k ) is also defined. This implies To see that g is a Σ-homomorphism, let σ ∈ Σ be n-ary and b 1 , . . . , b n ∈ B. Choose t i ∈ S Σ (A) with e(t i ) = b i . Let j be the least ordinal number such that t i ∈ S Σ,j (A) for all i = 1, . . . , n. If j = 0, then all t i lie in S Σ,0 (A) ⊆ T Σ (A ⊥ ). Let q : T Σ (A ⊥ ) → A be the extension to a continuous Σ-homomorphism of the identity map on A. Let a i = q(t i ). Then we clearly have b i = e(t i ) = e · q(t i ) = e(a i ).
⊓ ⊔ Proof. In the following, for any equation e : T Σ (X ⊥ ) → E we denote by e 0 : X → E its restriction to the generators.

Remark B. . If
( ) Given an equation e : T Σ (X ⊥ ) ։ E, define Γ e to be the set of continuous inequalities s ≤ t over X such that both e 0 (s) and e 0 (t) are defined and e 0 (s) ≤ e 0 (t). Then a continuous Σ-algebra A satisfies the equation e iff it satisfies all the continuous inequalities in Γ e : (⇒) Suppose that A satisfies e, let s ≤ t be a continuous inequality in Γ e , and let h : X → A. By the universal property of T Σ (X ⊥ ), the map h extends uniquely to a continuous Σ-homomorphism h : T Σ (X ⊥ ) → A. Since A satisfies e, there exists a continuous Σ-homomorphism k : E → A with k · e = h, which implies that h = k · e 0 . Now suppose that e 0 (s) and e 0 (t) are defined and e 0 (s) ≤ e 0 (t). By Lemma B. , it follows that h(s) and h(t) are defined and h(s) = k · e 0 (s) ≤ k · e 0 (t) = h(t).
Thus, A satisfies s ≤ t.
(⇐) Suppose that A satisfies every inequality in Γ e , and let h : T Σ (X ⊥ ) → A be a continuous Σ-homomorphism and h 0 : X → A its restriction to X. To show that h factorizes through e, we apply the homomorphism theorem (Lemma B. ). Since the continuous Σ-algebra T Σ (X ⊥ ) is generated by the subset X, it suffices to verify condition ( ) of the theorem for all terms t, t ′ ∈ S Σ (X) (see Remark B. ). Thus suppose that e(t) and e(t ′ ) are defined and e(t) ≤ e(t ′ ). This means that t ≤ t ′ lies in Γ e . Since A satisfies all inequalities in Γ e , it follows that h 0 (t) and h 0 (t ′ ) are defined and h 0 (t) ≤ h 0 (t ′ ). The homomorphism theorem yields the desired factorization of h through e. Thus A satisfies e. ( ) Given a continuous inequality s ≤ t over the set X, let e i : T Σ (X ⊥ ) ։ E i (i ∈ I) be the family of all quotients of T Σ (X ⊥ ) such that e i,0 (s) and e i,0 (t) are defined and e i,0 (s) ≤ e i,0 (t), where e i,0 : X → E i denotes the restriction of e i to X. Form the subdirect product e : T Σ (X ⊥ ) ։ E of the e i 's, obtained by factorizing the continuous Σ-homomorphism e i : T Σ (X ⊥ ) → i E i into a dense morphism e : T Σ (X ⊥ ) ։ E followed by an order-embedding m : E → i E i . By Lemma B. ( ) and since m is an order-embedding, it follows that e 0 (s) and e 0 (t) are defined and e 0 (s) ≤ e 0 (t), where e 0 : X → E is the restriction of e to X. In other words, e is the least quotient among the e i 's. We claim that a continuous Σ-algebra A satisfies s ≤ t iff it satisfies e.
(⇒) Suppose that A satisfies s ≤ t and let h : T Σ (X ⊥ ) → A. To show that h factorizes through e, we may assume wlog. that h is dense, i.e. a quotient. By assumption, we have that h(s) and h(t) are defined and h(s) ≤ h(t). Thus h = e i for some i ∈ I, and since e is the subdirect product of all e i 's, we have that e i factorizes through e. This shows that A satisfies e.
(⇐) Suppose that A satisfies e, and let h 0 : X → A. Extend h 0 to a continuous Σ-homomorphism h : T Σ (X ⊥ ) → A. By assumption, there exists g : E → A with h = g · e. This implies h 0 = g · e 0 . Since e 0 (s) and e 0 (t) are defined and e 0 (s) ≤ e 0 (t), Lemma B. ( ) shows that h 0 (s) = g · e 0 (s) ≤ g · e 0 (t) = h 0 (t). Thus, A satisfies s ≤ t. ⊓ ⊔ Step . From the above lemma and Theorem . , we obtain the following result of Adámek, Nelson, and Reiterman:

B. Algebras for a Monad
In this section, we show how to recover Manes's HSP theorem [ ] for algebras for an arbitrary monad T = (T, µ, η) on Set. Choose the parameters -A = A 0 = Set T , the category of T-algebras and T-homomorphisms; -(E, M) = (surjective T-homomorphisms, injective T-homomorphisms); -Λ = all cardinal numbers; -X = all free T-algebras T X = (T X, µ X ) with X ∈ Set.
Since all sets are projective, we get E X = E (again by Remark B. ). Thus our Assumptions . are satisfied: for ( ), use that products of T-algebras are formed on the level of sets. ( ) is trivially satisfied, and ( ) is obvious. Instantiating Definition . , a variety of T-algebras is a class of T-algebras closed under quotient algebras, subalgebras, and products. Quotient monads of T are represented by monad morphisms q : T ։ T ′ with surjective components. The following result is an easy consequence of our general correspondence between varieties and equational theories (see Theorem . ):

Theorem B. (Manes). Varieties of T-algebras correspond bijectively to quotient monads of T.
Remark B. . Recall from Remark . that in the current setting an equational theory is given by a family of single quotients (e X : T X ։ E X ) X∈Set which is substitution invariant in the sense that for every T-homomorphism h : T X → T Y there exists a T-homomorphismh : E X → E Y withh·e X = e Y ·h.