Monads of Regular Theories

We characterize the categories of semi-analytic monads, regular Lawvere theories, and regular operads that are equivalent to the category of regular equational theories. We also show that the category of all finitary monads on Set is monadic over the category of semi-analytic functors.


Introduction
The category of algebras of a (finitary) equational theory can be equivalently described as a category of models of a Lawvere theory or as a category of algebras of a finitary monad on the category Set or a category of algebras of a (generalized) operad. In fact, the four categories of (finitary) equational theories, Lawvere theories, finitary monads on Set and (generalized) operads are equivalent. These equivalences induce a correspondence between various subcategories. In [14] we have given an intrinsic characterizations of equational theories and Lawvere theories that correspond to the analytic and polynomial monads on Set. This was achieved via correspondence with symmetric and rigid operads.
An equational theory is regular (cf. [12]) if it has a set of axioms where each equation contains the same variables on both sides. Thus the theories of monoids and join-semilattices are regular but the theory of groups is not. The main objective of this paper is to describe the categories of regular Lawvere theories RegLT, semi-analytic monads SanMnd, and regular operads RegOp that correspond to the category of regular equational theories with regular morphisms.
In [14] symmetric operads proved to be very useful in describing correspondences of this kind. Full and regular operads (cf. [6,13], Section 2) play the same role here. The category of full operads is the category of monoids in the monoidal category Set F , where F is the skeleton of the category of finite sets, with the substitution tensor. This monoidal category was first considered in [6] and already there it was noticed that the category of monoids in Set F is equivalent to the category of finitary monads on Set. The substitution tensor on Set F can be described as follows. We can think of a functor A : F → Set as of a signature on which we have an action of finite functions from F. A(n) is the set of n-ary function symbols. Then, if a ∈ A(n) and f : n → m, we can think of f · a = A( f )(a) ∈ A(m) as an m-ary operation obtained by substitution of variables along f so that the following equation holds. If we interpret objects A, B of Set F in this way, the tensor A ⊗ B is the signature that arises by plugging tuples operations, say a 1 , . . . , a n ∈ A, into single operations, say b ∈ B(n). Because of the Eq. 1 we need to identify some such composed terms. For example, if f : 2 → 2 and b ∈ B(2), a 1 , a 2 ∈ A, then we want to identify the terms and (a f (2) , a f (1) ; b ) in some way. Still, there is a certain ambiguity concerning the interpretation of the expression (a 1 , . . . , a n ; b ) The 'clonic' (universal algebraic) interpretation will insist that all the a i 's are members of a single set A(k) and the composed operation should be of arity k. In categorical notation, it would be a composed operation The 'operadic' (geometric) interpretation will take an arbitrary n-tuple of operations a i ∈ A(k i ) and the composed operation will have as arity the sum n i=1 k i . In categorical notation, it would be a composed operation In case when all functions from F act on operations, both compositions (when appropriate identifications are made) lead to equivalent descriptions of the substitution tensor on Set F . This was shown in [13]. The relation between these two compositions can be explained as follows. Let ⊗ temporarily denote the 'clonic' composition and ⊕, the 'operadic' composition. If a i ∈ A(k i ), b ∈ B(n), k = n i=1 and ι i : k i → k are the obvious inclusions, then (a 1 , . . . , a n ) ⊕ b = ((ι 1 · a 1 , . . . , ι n · a n ) ⊗ b On the other hand, if a i ∈ A(k) and π : k · n → k is the obvious projection, then (a 1 , . . . , a n ) ⊗ b = π · ((a 1 , . . . , a n ) ⊕ b ) Thus a monoid in Set F consists of a set of operations that are equipped with not only a multiplication operator but also an action of the whole category F. The left Kan extension Set F → End along the inclusion F → Set establishes the equivalence of those monoidal categories (End is the category of finitary endofunctors on Set) and induces the equivalence of the category of full operads FOp with the category Mnd of finitary monads on Set.
We shall describe this tensor in Set F in the 'operadic' style in Section 2. The correspondence between the category of full operads and the categories of equational theories, Lawvere theories, and finitary monads will be presented in Section 3.
Regular operads are monoids in the monoidal category Set S with substitution tensor, where S is the skeleton of the category of finite sets and surjections. Thus in regular operads only surjections act on operations.
We identify the essential image of the left Kan extension Set S → End along inclusion S → Set as the category of semi-analytic functors and semi-cartesian natural transformations San. We call these functors semi-analytic as they are similar to analytic ones. For example, semi-analytic functors also have presentations via series similar to the series that represent analytic functors; see Section 2. The category San is a monoidal subcategory of End and the monoids there form the category of semianalytic monads equivalent to the category of regular theories; see Section 5.
As we shall show in Section 2, a finitary endofunctor on Set is semi-analytic iff it preserves pullbacks along monomorphisms and a natural transformation is semi-cartesian iff the naturality squares for monomorphism are pullbacks. Thus the notion of a semi-analytic monad is equivalent to the notion of a collection monads introduced in [10] and to the notion of a finitary taut monad introduced in [11]. The category of semi-analytic functors with semi-cartesian natural transformations San was already considered in [11] as the category of finitary taut functors on Set. In [10] it was also shown that regular theories (called balanced in [10]) correspond to semi-analytic monads. This is the object part of the correspondence that we study in Section 6; cf. Theorem 6.2.
The category of regular Lawvere theories is defined very much in the spirit of the definition of the category of analytic Lawvere theories, cf. Section 2. A regular Lawvere theory is a Lawvere theory with nicely behaving isomorphisms and a factorization system consisting of the class of projections and the class of regular morphisms. Regular morphisms in a Lawvere theory are by definitions those morphisms that are right orthogonal to all projections. A regular interpretation of Lawvere theories is an interpretation of Lawvere theories that preserves regular morphisms. We show that the category of regular Lawvere theories is equivalent to the category of regular operads and hence also to the category of semi-analytic monads and to the category of regular equational theories; cf. Section 6.
The category of semi-analytic monads SanMnd contains subcategories of cartesian CartMnd and weakly cartesian wCartMnd monads (i.e. those that preserve and weakly preserve pullbacks, respectively). In Section 7 we characterize the subcategories of Set S that have as their essential images wCartMnd and CartMnd. As these characterizations are a bit technical, we do not try to rephrase those conditions in terms of either Lawvere theories or equational theories.
In this way we shall describe the second level (level r) of the following diagram The vertical lines denote adjoint equivalences. Thus up to equivalence there are only four categories in it, one on each level. One equivalent to the category of all finitary monads on Set, second equivalent to the category of all semi-analitic monads on Set, third equivalent to the category of all analytic monads on Set, and forth equivalent to the category of all polynomial monads on Set. These levels are denoted by letters f , r, a, and p, respectively. Thus all four columns of equational theories, Lawvere theories, monads and operads are equivalent. These columns are denoted by letters e, l, m and o, respectively. The vertical functors heading up, in all columns but the column of operads, are inclusions of subcategories. In the column of operads the functors heading up are more like free extensions of the actions. The lowest functors are full embeddings and the upper are embeddings that are full on isomorphisms. The vertical functors heading down, the right adjoints to those heading up, are monadic. All the squares in the diagram commute up to canonical isomorphism. The notation concerning categories involved is displayed in the above diagram.
The notation concerning functors is not displayed on the diagram but it is meant to be systematically referring to levels and columns they 'connect'. The horizontal functors are denoted using letters from both columns they connect; the codomain by the script letter, the domain by its subscript, and the level is denoted by superscript. Thus the functor AnMnd → AnLT will be denoted by L a m . We usually drop superscripts when it does not lead to confusion. Thus we can write, for example, The vertical functors heading up are denoted by the script letter P with superscript indicating the column and subscript indicating the level of the codomain. The vertical functors heading down are denoted by the script letter Q with subscript and superscript as with those heading up. Thus we have, for example, functors P = P o = P o a : RiOp → SOp and Q = Q a = Q m a : Mnd → AnMnd. We will also refer to various diagonal morphisms and then we need to extend the notation concerning vertical functors by specifying both the columns of the domain and the codomain. For example, we write P ol f : SOp → LT to denote one such functor and its right adjoint will be denoted by Q lo a : LT → SOp. In principle, this notation will leave the codomain not always uniquely specified but in practice it it sufficient and in fact usually much less is needed.
The paper is organized as follows. In Section 2 we introduce all the main categories that we shall study in the paper, i.e. the category of equational regular theories, full and regular operads, regular Lawvere theories, and semi-analytic functors and monads. We prove the equivalence of the three descriptions given. In Section 3 we briefly recall the equivalence between the category of full operads FOp and the three other descriptions of the category of equational theories: ET, LT, Mnd. In the following three Sections 4-6 we show that the category of regular operads RegOp is equivalent to the category of regular Lawvere theories RegLT, the category of semianalytic monads SanMnd, and the category of regular equational theories RegET, respectively. In Section 4 we also show that LT is monadic over RegLT. In Section 5 we additionally show that Mnd is monadic over San and to this end we explain the distributive law that comes from the monoidal monad W on San for finitary functors. In the final Section 7 we characterize the subcategories of Set S that have as their essential images in End the categories of functors (weakly) preserving pullbacks.

Notation
[n] = {0, . . . , n}, (n] = {1, . . . , n}, ω -denotes the set of natural numbers. The set X n is interpreted as X (n] when convenient. The skeletal category equivalent to the category of finite sets Set f in will be denoted by F. We assume that the objects of F are sets (n] for n ∈ ω. The subcategories of F with the same objects as F but having as morphisms bijections, surjections and injections will be denoted by B, S, I, respectively. S n is the group of permutations of (n]. When S n acts on a set A n on the right and on the set B n on the left, the set A ⊗ n B is the usual tensor product of S n -sets.

Equational Theories
By an equational theory we mean a pair of sets T = (L, A), L = n∈ω L n and L n is the set of n-ary operations of T. The sets of operations of different arities are disjoint. The set T r(L, x n ) of terms of L in context x n = x 1 , . . . , x n is the usual set of terms over L built with the help of variables from x n . We write t : x n for the term t in context x n . Thus all the variables occurring in t are among those in x n . The set A is a set of equations in context t = s : x n , i.e. both t : x n and s : x n are terms in context.
A morphism of equational theories, an interpretation, I : (L, A) → (L , A ) is given by a set of functions I n : L n → T r(L , x n ), for n ∈ ω. The I n s extend to functionsĪ n : T r(L, x n ) → T r(L , x n ) in an obvious way. We require that for any t = s : where A is the provability in the equational logic from axioms in the set A . We identify two such interpretations if they are provably equal. In this way we have defined the category of equational theories ET.
A term in context t : x n is regular if every variable in x n occurs in t at least once. A term in context t : x n is linear if every variable in x n occurs in t at most once. A term in context t : x n is linear-regular if it is both linear and regular. An equation s = t : x n is linear-regular iff both s : x n and t : x n are linear-regular terms in contexts.
A simple φ-substitution of a term in context t : x n along a function φ : (n] → (k] is a term in context denoted φ · t : x k such that every occurrence of the variable x i is replaced by the occurrence of x φ(i) . An α-conversion of a term in context t : x n is a simple φ-substitution of a term in context along a monomorphism φ : (n] → (k]. An equational theory T = (L, A) is a linear-regular theory iff every equation s = t : x n that is a consequence of the theory T is a consequence of the set of linear-regular consequences of T. An interpretation is regular (linear-regular) iff it interprets function symbols as regular (linear-regular) terms.
A theory T = (L, A) is a rigid theory iff it is linear-regular and for any linearregular term in context t : x n whenever A t = τ · t : x n , then τ is the identity permutation. τ · t is the simple τ -substitution of a term in context t : x n along a permutation τ ∈ S n .
We denote by LrET the subcategory of ET consisting of linear-regular theories and linear-regular interpretations. RiET denotes the full subcategory of LrET whose objects are rigid theories. RegET is a category of regular theories and regular interpretations. We have three inclusion functors with the first inclusion being full and the other two being full on isomorphisms (cf. [16]).

Operads
The symmetric operads provide another way of presenting models of an equational theory. This kind of presentation is usually very convenient, however the models defined by such operads are more specific than models of arbitrary equational theories. For example, if O is a symmetric operad, then the free algebra functor Set → Alg(O) preserves weak wide pullbacks. Below we extend the definition of an operad so that it captures all the equational theories but still keeps the operadic flavor. The main difference is that instead of having just symmetric groups acting on sets of operations we have actions of the morphisms of the whole skeleton of the category of finite sets F. Symmetric operads can be thought of as monoids for the substitution tensor on the category Set B . Similarly, F-operads can be thought of as monoids for the substitution tensor on the category Set F . By End we denote the category of finitary endofunctors of Set. It is a strict monoidal category with the tensor being composition. The substitution tensor on Set F makes the equivalence of categories Set F → End given by the left Kan extension, a strong monoidal equivalence. This immediately shows that the category of F-operads is equivalent to the category of finitary monads on Set. The definition below was first explicitly spelled out in [13].
A full operad (or F-operad) O consists of a family of sets O n , for n ∈ ω, a unit element ι ∈ O 1 , for any k, n, n 1 , . . . , n k ∈ ω with n = k i=1 n i , a multiplication operation * : for n, m ∈ ω. The multiplication is associative with unit ι and compatible with the category action, i.e. for a ∈ O n a * ι = a = ι, . . . , ι * a; 1 n · a = a is a function such that j-th summand of the domain (k φ( j) ] is sent to the φ( j)-th summand (l φ( j) ] of the codomain by the function ψ φ( j) , i.e.
for j ∈ (n] and r ∈ (k φ ( j) ]. This definition refers to the obvious lexicographic order on both It is an extension of the multiplication operation in the operad of symmetries.
Remark The operation is defined on a family of functions indexed by k, l ∈ ω between sets: A morphism of full operads f : O → O is a function that respects arities of operations, unit, compositions, and the actions of functions from F.
The operation , when applied to morphisms in S, returns a morphism in S. Therefore these definitions make sense if we restrict morphisms to surjections, i.e. morphisms in S. 1 In this way, we obtain the notion of a regular operad, a morphism of regular operads, and the whole category of regular operads denoted RegOp.
We have functors 'restricting actions' along the inclusions B → S → F. They have left adjoints: We sketch the definitions of those functors below.
The action of the category S in P o r (O) where φ : The rest of the definition of P o f (O) is similar to the remaining part of the definition of P o r (O) given above.

Lawvere Theories
The category of Lawvere theories will be denoted by LT, see [7,8,14] for details. F op is the initial Lawvere theory with the obvious projections. Let T be any Lawvere theory. By π : F op → T we denote the unique morphism from F op to T. The class of projections in T is the closure under isomorphisms of the image of the injections in F. A morphism r in T is regular iff r is right orthogonal to all projection morphisms in T. By a factorization system we mean a factorization system in the sense of [4], see [3] sec 2.8. Aut(n) is the set of automorphisms of n in T. Recall from [14] that a Lawvere theory has simple automorphisms if the canonical function A Lawvere theory T is a regular Lawvere theory iff the projection morphisms and the regular morphisms form a factorization system and T has simple automorphisms. A regular interpretation of Lawvere theories is a morphism of Lawvere theories that preserves regular morphisms. Thus we have a non-full subcategory of LT of regular Lawvere theories with regular interpretations RegLT. The theory F op is regular.
We have inclusion functors

Monads
We introduce here a notion of a semi-analytic monad that is broader than that of an analytic monad but it still retains some combinatorial flavor.
Recall that an analytic (endo)functor on Set can be defined by any of the following conditions 1. finitary functor preserving weak wide pullbacks; 2. Kan extension of a functor from B to Set along the inclusion functor B → Set; 3. functor (isomorphic to one) having an analytic presentation n∈ω X n ⊗ n A n , where the n-coefficient A n is a (left) S n -set for n ∈ ω.
Similarly, we shall define a semi-analytic (endo)functor on Set as a functor satisfying any of three equivalent conditions (see Proposition 2.1, Theorem 2.2) 1. finitary functor preserving pullbacks along monomorphisms; 2. Kan extension of a functor from S to Set along the inclusion functor i S : S → Set; 3. functor (isomorphic to one) having a semi-analytic presentation n∈ω X n ⊗ n A n , where the category S acts on coefficients A n on the left (see below).
The meaning of the first two characterizations of the semi-analytic functors is clear. We shall describe the third one and show that it is equivalent to the other two.
For the time being, the first definition of a semi-analytic functor is the official one. A natural transformation φ : F → G is semi-cartesian iff the naturality squares for monomorphisms are pullbacks. The category of semi-analytic functors with the semicartesian natural transformations will be denoted by San.

Examples
1. The functor P ≤n : Set −→ Set associating to a set X the set of subsets of X with at most n-elements is not analytic if n > 2, as it can be easily seen that it does not preserve weak pullbacks. However, it preserves pullbacks along monos and hence it is semi-analytic. 2. If U is a set, n ∈ ω, then the functor (−) U ≤n : Set → Set, associating to a set X the set of functions from U to X with an at most n-element image, is not analytic, if |U| > n > 2. Again, it can be easily seen that it does not preserve weak pullbacks. However, it is semi-analytic. 3. We will see later that the functor part of any monad on Set that comes from a regular equational theory is semi-analytic.
For a set X and n ∈ ω the set X n denotes the set of monomorphisms from (n] to X. If X has less than n elements, this set is empty and if X is a finite set, then it has |X| n · n! elements. The notation is in analogy with the notation X n denoting the set of n-element subsets of X.
Clearly, X n is not functorial in X on its own but if we build a series with such sets and coefficients that are related by surjections, we do get a functor. To see this let A : S → Set be a functor or, equivalently, a sequence of coefficient sets {A n } n∈ω on which the category S acts on the left. As S n acts on X n on the right, by composition it makes sense to form a set X n ⊗ n A n and a whole coproductÂ The above formula is functorial in X, i.e.Â can be defined on morphisms as follows.
Let f : X → Y be a function and [ x, a] an element of X n ⊗ n A n . We take the epi- and we putÂ As the factorization is unique up Proof It is well known (see [9]) that Kan extensions can be calculated using coends. Thus, for a functor A : S → Set and a function f : where x, a is the equivalence class of the equivalence relation ≈ on n∈ω X n × A n generated by the relation ∼ such that for y : (m] → X, φ : (n] → (m] ∈ S and a ∈ A n . Let us call a representant x, a of a class x, a minimal iff x is injective. Any element x, a is ∼-related to one of form y, f · a where f , y is the surjective-injective factorization of x, i.e. any element is ∼-related to a minimal one. It is easy to see that any two minimal representatives of ≈-equivalence class are ∼-related.
We define an isomorphism where x : (n] → X and a ∈ A n . Taking the minimal elements in the equivalence class defines the inverse function. Thus (κ A ) X is a bijection. It is easy to see that κ A defined this way is natural in X, i.e. it is a natural isomorphism. The theorem will be proved via a series of lemmas.

Lemma 2.3
The essential image of the functor(−) : Set S −→ End is contained in the category San.
Proof First, we check that for A ∈ Set S ,Â preserves pullbacks along monos. Let be a pullback in Set with β mono. We need to show that the square is also a pullback in Set.
Let α : (m] → (n ] and z : (n ] → X be a surjection-injection factorization of the function f • z : (m] → X. From the above equation follows that n = n and there is a σ ∈ S n such that We have Hence there is a function p : (m] → P as in the following diagram such that The function p is an injection since z is.
We haveÂ Moreover, on representatives we have and henceÂ AsÂ preserves monos, such an element [ p, b ] is unique and henceÂ preserves pullbacks along monos. Now let τ : A → B be a morphism in Set S . We shall show thatτ :Â →B is semicartesian. Let f : X → Y be an injection in Set. We need to show that the square where a ∈ A n . Note that as f is an injection, so is f • x and hence f • x, b represents an element inB(Y). The above equality means that b ∈ B n and there is a σ ∈ S n such that On representatives we have and hence we haveτ as well. This means thatτ is semi-cartesian indeed. To show that(−) is full, let us fix two functors A, B ∈ Set S and a semi-cartesian natural transformation ψ :Â →B. Let m ∈ ω and a ∈ A m . We shall define τ m (a). We have ψ (m] ([1 (m] , a]) = [ f, b ] ∈B(m] for some injection f : (k] → (m] and b ∈ B k . We claim that k = m and f is a bijection. Suppose to the contrary that k < m.
We have thatB( f )( [1 (k] Since f is an injection and ψ is semi-cartesian, the square is a pullback and hence there is an element [g, c] ∈Â(k] such that The first equality implies that the proper mono f • g is epi (as its codomain is (m] and its mono part is 1 (m] ). This is a contradiction. Hence f is a bijection and we can apply the functor B to it. We put To show that τ is natural, let us fix a surjection β : (m] → (n] and a ∈ A m . Then using the definitions ofÂ,B and the naturality of ψ we have But this means that Since a and f were arbitrary, τ is natural. Finally, we show thatτ = ψ. Let us fix a set X and [ x, a] ∈Â(X), where x : Using the naturality of ψ andτ on x and the definition of τ we have Since X and [ x, a] were arbitrary,τ = ψ.

Lemma 2.5 Each semi-cartesian functor is in the essential image of(−) : Set S −→ End.
Proof Let us fix a semi-cartesian functor F. We will define a functor A : S → Set and a natural isomorphism τ :Â → F. Put Note that the sum over the empty index set is empty.
We form a pullback of a surjection α and a proper mono f Thus f is again a proper mono. F preserves this pullback, i.e. the square is again a pullback. Thus there is an element c ∈ F( p] such that The latter equality means that a ∈ A(n] contrary to the supposition. Thus A:S→ Set is a well defined functor. For a set X we define the function by where n ∈ ω, x : (n] → X is an injection and a ∈ A(n].
First, we show that the transformation τ :Â → F is natural. Let f : X → Y be a function. Then we have an epi/mono factorization of f , y of the function f • x Thus we have i.e. τ is natural.
It remains to show that τ is an isomorphism. Fix a set X. Let x ∈ F(X). As F is finitary, there is an n ∈ ω, f : (n] → X and y ∈ F(n] such that F( f )(y) = x. Let α, g be an epi/mono factorization of f Thus τ X is onto.
We form a pullback of monos that F preserves, i.e. we have a pullback Since As a ∈ A(n] and b ∈ B(m], we must have that n = k = m and both f and g are bijections.
Put σ = f • g −1 . Then Thus τ X is an injection, as required.
A monad (M, η, μ) on Set is a semi-analytic monad iff M is a semi-analytic functor and both η and μ are semi-cartesian natural transformations. The category of semianalytic monads with the semi-cartesian morphisms will be denoted by SanMnd.
We have inclusion functors

Full Operads
In this section we describe the equivalence of the category of full operads FOp to categories of equational theories ET, Lawvere theories LT and monads Mnd. As we said, the categories FOp and Mnd are categories of monoids of two equivalent monoidal categories, thus they are obviously equivalent. Therefore, we will just define the equivalences of categories with the domain FOp and their essential inverses leaving all the verifications to the reader. In [13] it was shown that the category of full operads is equivalent to the category of abstract clones. The latter category in known to be equivalent to ET. Let us fix a morphism h : O → O of F-operads. We denote by κ n i : (1] → (n] the function that sends 1 to i, where n ∈ ω and we denote π n i the action of κ n i on the unit ι ∈ O 1 , i.e. π n i = κ n i · ι.

Regular Lawvere Theories vs Regular Operads
In this section we study the relations between Lawvere theories and regular operads. We shall describe the adjunction Q lo r P lo f and the properties of the embedding P lo f .

The Functor
In particular, | f −1 (i)| = r i = | f −1 (i)|, for i ∈ (m]. By i σ i : r → r we mean the permutation that is formed by placing permutations σ i 'one after another'. Thus, it respects the fibers of f , i.e. f • i σ i = f . A morphism in the category P f (O) is a class of spans modulo the above equivalence relation.
We could represent morphisms in P f (O) as spans without the requirement that φ and f are jointly mono. But then the relation identifying the spans would be more complicated. Instead of permutations σ i we would need to consider surjections. But this relation is not an equivalence relation and we would need to work with the equivalence relation generated by such a relation. However, it might happen, as with the compositions defined below, that an operation on spans naturally leads to a span whose amalgamation φ is not injective on fibers of f . In such a case we can regularize the span as follows. Let φ, f, g i i∈m be a span as above but with φ not necessarily injective on the fibers of f . Let φ i be the restriction of φ to the fiber f −1 (i) for i ∈ (m]. Let φ i = φ i • ψ i be an epi-mono factorization of φ i and g i = ψ i · g i , for i ∈ (m]. Then the regularization of the span φ, f, g i i∈m is the span The composition of morphisms φ, f, g i i∈(m] : n → m and φ , f , g j j∈ (k] : m → k to φ , f , g j i∈(k] : n → k is defined in two steps as follows. In the diagram (2) the square is a pullback of f along φ . The functionf is so chosen that it is monotone. We define a span by f = f •f , φ = φ •φ, and g j = g j * g φ (l) l∈ f −1 ( j) . Finally, we take a regularization of this span to get a regular span that represents the composition. We leave for the reader the verification that the composition is a congruence with respect to the equivalence relation on spans.
The identity on n is the span The i-projection π n i : n → 1 on i-th coordinate is the span where i ∈ (n] andĩ(1) = i. For a morphism of regular operads h : O → O , we define a functor . This ends the definition of the functor P f .

The Functor Q r = Q lo r : LT −→ RegOp
Let T be a Lawvere theory. Recall that π : F op → T is the morphism from the initial Lawvere theory. The operad Q r (T) consists of the operations of T, i.e. morphisms to 1. In detail, it can be described as follows. The set of n-ary operations Q r (T) n is the set of n-ary operations T(n, 1) of T, for n ∈ ω. The action is given, for f ∈ T(n, 1) and φ ∈ S(n, m), by is given, for f ∈ Q r (T) k and f i ∈ Q r (T) ni , where i ∈ (k], n = i∈k n i , by where f 1 × . . . , × f k is defined using the chosen projections in T and • is the composition in T.
If F : T → T is a morphism of Lawvere theories, then the map of regular operads is defined, for f ∈ Q r (T) n , by This ends the definition of the functor Q r .

The Adjunction P f Q r and the Properties of the Functor P f
We note for the record We have an easy

Lemma 4.2 Let O be a regular operad and n ∈ ω. An isomorphism on n in P r (O) has a representation by a span of the following form
where φ : (n] → (n] is a bijection, a i ∈ O 1 is an invertible operation, i.e. there is b i ∈ O 1 such that a i * b i = ι = b i * a i for i ∈ (n]. It is the unique span in its equivalence class.
Proof Suppose that we have two spans representing two morphisms that compose to identity 1 n both ways. Then, since the displayed composition is 1 n , the functions φ, f are surjections. Hence the functions φ , f are surjections, as well. Having this, it is easy to notice that φ sends elements in different fibers of f to different elements. Thus φ (and φ ) must be in fact a bijection. If we take a composition g i i∈ f −1 ( j) * h j and regularize it multiplying by a surjection, we will get ι. This implies that h j cannot be a nullary operation and that the arity of g i 's is at most one. Now, as the above spans represent morphisms that compose both ways to identity, it is easy to see that we get the required description.

Proposition 4.3
We have an adjunction P f Q r . The functor P f is faithful.
Proof We shall show that P f Q r . For a regular operad O the unit is We verify the triangular equalities. For g ∈ Q r (T) n = T(n, 1) we have As the unit η O is mono, P f is faithful. is defined as the functor Q r = Q lo r except the action involved is the action of the whole category F rather than its subcategory S. As the functor Q o r forgets this additional part of the action, the above diagram clearly commutes.

Proposition 4.5
The functor P f : RegOp → LT is full on isomorphisms and its essential image is RegLT. In particular, RegOp is equivalent to RegLT.
Proof Recall that we have a unique morphism of Lawvere theories from the initial theory π : F op → P f (O). For a function φ : m → n, π φ the morphism π φ is represented by the span of form We have chosen the right bottom to be 1 to simplify notation but the general case is similar. The commutativity means that, with ψ = ψ • ψ being an epi/mono factorization of ψ, there is a σ ∈ S r such that Note that as φ • φ is mono, the representation of the composition φ • φ , a φ (1) , . . . , a φ (r) * g is regular whereas the representation ψ, h 1 , . . . , h m * g is not in general. This is why we need to apply ψ to regularize it. Putting into the square a diagonal morphism φ • σ • ψ , f,h i i∈ (m] whereh we see that the permutations 1 r and σ show that both triangles commute. An easy but tedious argument shows that such a diagonal morphism is in fact unique. It is enough to consider the left triangle only and use the fact that a j s are invertible and φ is mono. Thus regular morphisms are indeed right orthogonal to the projections and P f (O) is a regular Lawvere theory. From the description of the functor P f (h) : P f (O) → P f (O ) and the description of the structure of P f (O) it is clear that P f (h) sends the regular (projection) morphisms to the regular (projection) morphisms. Thus P f (h) is a regular morphism of Lawvere theories. Now let T be any Lawvere theory. The class of regular morphisms in T is right orthogonal to a class of morphisms and hence it is closed under composition, finite products and isomorphisms. Moreover, for any surjection in ψ : (n] → (m] in F the image π ψ : m → n in T is regular as it is orthogonal to all projection morphisms in T. Thus surjections in S act on all regular morphisms f : n → 1 in T on the left Hence the regular operations of any Lawvere theory T form a regular operad. The unit is the identity morphism on 1. The action of S is defined as above. Let us denote this operad by T r . We have an inclusion morphism of regular operads T r → Q r (T). By adjunction we get a morphism of Lawvere theories Clearly, ξ T is bijective on objects. If T is regular, then ξ T is full (faithful) since the projection-regular factorization exists (is unique and π : F op → T is faithful).
If I : T → T is a regular interpretation between any Lawvere theories, then the diagram commutes, where I r is the obvious restriction of I to T r . Thus the essential image of P f is indeed the category of regular Lawvere theories and regular interpretations. An isomorphic interpretation of Lawvere theories is always regular. Therefore P f is full on isomorphisms.
We have Proposition 4. 6 The functor Q r : LT → RegOp is monadic.
Proof We shall verify the assumption of the Beck monadicity theorem. By Proposition 4.3 Q r has a left adjoint. It is easy to see that Q r reflects isomorphisms. We shall verify that LT has and Q r preserves Q r -contractible coequalizers.
Let I, I : T → T be a pair of interpretations between Lawvere theories so that is a split coequalizer in RegOp. We define a Lawvere theory T O so that a morphism from n to m in T O is an m-tuple g 1 , . . . , g m with g i ∈ O n , for i = 1, . . . , m. The compositions and the identities in T O are defined in the obvious way from the compositions and the unit in O. The projectionsπ n i in T O are the images of the projections π n i in T, i.e.π n i = q(π n i ).
First, we verify that T O has finite products. For this, it is enough to verify that f 1 , . . . , f n * π n i = f i , where * is the multiplication in the operad O. The uniqueness of the morphism into the product is obvious from the construction. We have routine calculations It is obvious thatq is a morphism of Lawvere theories and that Q r (q) = q. It remains to verify thatq is a coequalizer in LT. Let p : T → S be a morphism in LT coequalizing I and I .
The morphism Q r ( p) coequalizes Q r (I) and Q r (I ) in RegOp. Thus there is a unique morphism k in RegOp making the triangle on the right commute. We define the functork so that for any morphism f 1 , . . . , f n in T O . The verification thatk is the required unique functor is left for the reader.

Semi-analytic Monads vs Regular Operads
The main objective of this section is to show that the square In particular, for a set X we have In the set X n ⊗ n O n we identify x • σ, a with x, σ · a for a ∈ O n , x : (n] → X and σ ∈ S n . Let γ : S → F be the inclusion functor. It induces the following diagram of categories and functors that we describe below (5) γ * is the functor of 'composing with γ '. It has a left adjoint Lan γ , the left Kan extension along γ . For C ∈ Set S it is given by the coend formula The functor i sa : San → End is just an inclusion. The equivalence i S : Set S −→ San is defined by left Kan extension that may be given by both the coend and coproduct formulas where C ∈ Set S . Similarly, the equivalence is defined by left Kan extension that is given by the coend formula where B ∈ Set F . The following calculation shows that the left hand square in the above diagram commutes: The functor (−) sa , right adjoint to i sa , is given by the formula for F ∈ End. (−) sa associates to functors and natural transformations their 'semianalytic parts'. Note that both San and End are strict monoidal categories with tensor given by composition, and i sa is a strict monoidal functor. Thus its right adjoint (−) sa has a unique lax monoidal structure making the adjunction i sa (−) sa a monoidal adjunction. This in turn gives us a monoidal monad (W, η, μ) on San.
We have a 2-natural transformation U where MonCat is the 2-category of monoidal categories, lax monoidal functors, and monoidal transformations, mon is the 2-functor associating the objects of monoids to monoidal categories, | − | is the forgetful functor forgetting the monoidal structure, and U is a 2-natural transformation whose component at a monoidal category M is the forgetful functor from monoids in M to the underlying category of M: U M : mon(M) → |M| (cf. [15,17]). Applying U to the monoidal adjunction i sa (−) sa and monoidal monad W we get an adjunction between categories of monoids and a monad on mon(San). The unnamed arrow in the above diagram is mon((−) sa ). But the monoids in End and San are exactly monads and hence we get the right most adjunction P m f Q m r together with the monad (W,η,μ) on the category of semi-analytic monads.
On the other hand, on the categories Set F and Set S there are substitution tensors making i F and i S monoidal equivalences and Lan γ γ * a monoidal adjunction. Thus we can apply the 2-functor mon to this adjunction and obtain an adjunction mon(Lan γ ) mon(γ * ) as in the diagram (6) The unnamed functor is mon(Lan γ ). But monoids in Set F and Set S are (equivalent to) the categories of full and regular operads, respectively. The verification that the left most square commutes serially is left for the reader. We obtain There are free monads on finitary functors (cf. [1]) and free semi-analytic monads on semi-analytic functors. The adjunctions F U and F U induce monads R and R, respectively. R is the finitary version of what is called 'the monad for all monads' in [1]. Putting this additional data to the above diagram and simplifying it at the same time, we get a diagram In the above diagram the square of left adjoints commutes. Thus, the square of right adjoints commutes as well. This shows in particular that the free monad on a semianalytic functor is semi-analytic.
The monadW is a lift of a monad W to the category of R-algebras SanMnd and, by [2] we obtain Remark We arrived at the above theorem with essentially no calculations. In [14], where we studied analytic functors, we have given explicit formulas for a similar distributive law. In the semi-analytic case such formulas would be much more involved and will not be given here.

Equational Theories vs Regular Operads
In this section we study the relations between regular equational theories and regular operads. We shall show that the square (7) commutes up to isomorphism, with P e f being an inclusion and both horizontal functors being equivalences of categories.
For a ∈ O n we put is a regular interpretation.

Proposition 6.1
The square (7) commutes up to a natural isomorphism.
Proof Let O be a regular operad. We define an interpretation of equational theories The calculations for the composition axioms are similar. The naturality of I O is left for the reader. We shall show that I O is an isomorphism of theories. To this end, we define an inverse interpretation given by Again, we need to verify that J O preserves the axioms and again we shall verify the action axiom only. To see that E r o is essentially surjective, let us fix a regular theory T = (L, A). Then the regular terms in T form a regular operad called T ro . The unit is the term x 1 : x 1 . The composition is defined by the substitution (making sure that we make the variables disjoint in different substituted terms, via α-conversion). The action of a surjection φ : (n] → (m] on a regular term t(x 1 , . . . , x n ) : x n is again a regular term t (x φ(1) , . . . , x φ(n) ) : x n . Again, it is a matter of a routine verification to show that E r o (T ro ) ∼ = T.

Examples
1. The terminal equational theory 1 has one constant symbol, say e, and can be axiomatized by a single axiom: v 1 = e : v 1 . As a Lawvere theory it is the category that has exactly one morphism between any two objects. 2. The embedding of the regular theories into all equational theories P e f : RegET → ET has a right adjoint Q e r : ET → RegET that we denote here (−) r . For an equational theory T = (L, A) the theory T r = (L r , A r ) can be described as follows. The n-ary function symbols of L r are all (not only regular) terms in context t : v n over the language L. The equations in A r are all the regular equations over L r such that when interpreted as terms over L are consequences of the set of axioms A. 3. The value 1 r of the functor (−) r on the terminal equational theory 1 is the terminal regular theory. It is the theory of join-semilattices SL: that 'reinterprets' sup-semilattices as algebras of any regular theory in the way described above. This functor has a left adjoint providing a join-semilattice reflections of models of R. 6. The theory 1 has a unique proper subtheory 1 − . It has no function symbols and can be axiomatized by a single axiom: v 1 = v 2 : v 2 . The regular part of this theory (1 − ) r , denoted SL − , is the theory of join-semilattices without a bottom element ⊥. This theory is the terminal theory in the full subcategory of the regular theories without constant symbols. In particular, there is a unique regular interpretation ! : SG −→ SL − of the theory of semigroups SG in SL − . As before, it induces a functor between categories of algebras that has a left adjoint This functor is called 'greatest semilattice image functor'; cf. [5].

Cartesian and Weakly Cartesian Monads
In this section we shall investigate two (strict monoidal) subcategories of San and their categories of monoids. The category of (weakly) cartesian functors and (weakly) cartesian natural transformations will be denoted by Cart (wCart). The corresponding categories of monoids: the category of (weakly) cartesian monads will be denoted by CartMnd (wCartMnd). Thus we have embeddings full on isomorphisms which are strict monoidal and induce embeddings of categories of monoids The characterizations of the subcategories of equational theories ET and Lawvere theories LT corresponding to CartMnd and wCartMnd are a bit technical and we are not going to describe them in detail here. Clearly, the objects are some regular theories satisfying additional conditions and similarly for morphisms. We shall content ourselves with a description of subcategories of Set S whose essential images are wCart and Cart, respectively. Note, however, that if (T, η, μ) is a semianalytic monad such that the functor part T is the left Kan extension of a functor R : S → Set, then R is the functor of all regular operations in the equational theory corresponding to the monad T. Thus our description will in fact provide a description of the equational theories corresponding to monads in wCart and Cart.
Recall the description of functor(−) : Set S −→ End from Section 2, the Kan extension along i S : S → Set. We begin with the following observation then there are m ∈ ω, surjections g : n → m, g : n → m, and an injection y : m → Y as in the diagram such that y • g = f • x, y • g = f • x , and A(g)(a) = A(g )(a ). In particular Proof Exercise.
The following two Propositions identify the subcategory of Set S whose essential image in End is wCart.
Proof ⇒ First we verify that the condition (WPB) is necessary. Let us fix the square and elements a and b as in the above condition. Then we have elements and [1 (n] , b ] ∈ (n] n ⊗ n A(n) ⊆Â(X) such thatÂ (m] , a]) =Â(g 1 )([1 (n] , b ]) As f 1 , g 1 are surjections, this means that i.e. in the diagram (9) we have i.e. there is a permutation σ ∈ S k such that Still, in the above diagram we can form a pullback in F and we have a morphism v : (q] → R into the pullback (8) such that such thatB To prove the converse, let us assume thatτ :Â →B is a weakly cartesian natural transformation and that f : (m] → (n] is a surjection in S. We need to show that the square is weakly cartesian. Fix a ∈ A(n] and b ∈ B(m] such that τ n (a) = B( f )(b Thus ( x, τ m (c)) ∼ (1 (m] , b ) and we have that k = m, x is a bijection, ( x, c) ∼ (1 (m] , A( x)(c)). Hence we also have τ m (A( x)(c)) = b . Moreover, as the square commutes, we have Thus A( x)(c) is the element sought for a and b and hence τ is weakly cartesian.
The final two Propositions identify the subcategory of Set S whose essential image in End is Cart.
Then q = q and there is σ ∈ S q such that This implies the equalities of images of functions All these sets are finite, say, having n, m, and k elements, respectively. To prove the converse, we assume now thatÂ preserves pullbacks and we fix a pullback in F of surjections. AsÂ weakly preserves pullbacks, the above pullback is sent byÂ to a weak pullback in Set. Then, using Lemma 7.1 it is easy to see that the condition (PB) expresses the uniqueness part of the fact thatÂ sends the above square to a pullback in Set.
The first equality means that [ x, τ n (a)] = [ x , τ n (a )]. Hence n = n and there is a σ ∈ S n such that x • σ = x, and τ n (a ) = B(σ )(τ n (a)) = τ n (A(σ )(a)) By Lemma 7.1 and the second equality in Eq. 10 there are surjections g and g and an injection y as in the diagram such that

and A(g )(a ) = A(g)(a)
Then we have As y is mono g = g • σ . Thus

A(g )(a ) = A(g)(a) = A(g )(A(σ )(a))
As τ is a cartesian natural transformation, we get, from the fact that the naturality square for g' is a pullback, that a = A(σ )(a). But this means that To show the converse, assume thatτ is a cartesian natural transformation and f : (n] → (m] is a surjection. We need to show that the weak pullback satisfies the uniqueness condition, as well. Fix a, a ∈ A(n] such that A( f )(a) = A( f )(a ), and τ n (a) = τ n (a ) By assumption the square is a pullback. We have elements [1 (n] , a], [1 (n] , a ] ∈Â(n] such that