Relative pseudomonads, Kleisli bicategories, and substitution monoidal structures

We introduce the notion of a relative pseudomonad, which generalises the notion of a pseudomonad, and define the Kleisli bicategory associated to a relative pseudomonad. We then present an efficient method to define pseudomonas on the Kleisli bicategory of a relative pseudomonad. The results are applied to define several pseudomonads on the bicategory of profunctors in an homogeneous way, thus providing a uniform approach to the definition of bicategories that are of interest in operad theory, mathematical logic, and theoretical computer science.


Introduction
Just as classical monad theory provides a general approach to study algebraic structures on objects of a category (see [5] for example), 2-dimensional monad theory o↵ers an elegant way to investigate algebraic structures on objects of a 2-category [10,30,34,37,54,56]. Even if the strict notion of a 2-monad is su cient to develop large parts of the theory, the strictness requirements that are part of its definition are too restrictive for some applications and it is necessary to work with the notion of a pseudomonad [12], in which the diagrams expressing the associativity and unit axioms for a 2-monad commute up to specified invertible modifications, rather than strictly. In recent years, pseudomonads have been studied extensively [14,39,49,50,52,53,62].
Our general aim here is to develop further the theory of pseudomonads. In particular, we introduce relative pseudomonads, which generalize pseudomonads, define the associated Kleisli bicategory of a relative pseudomonad, and describe a method to extend a 2-monad on a 2-category to a pseudomonad on the Kleisli bicategory of a relative pseudomonad. We use this method to show how several 2-monads on the 2-category Cat of small categories and functors can be extended to pseudomonads on the bicategory Prof of small categories and profunctors (also known as bimodules or distributors) [8,45,60]. This result has applications in the theory of variable binding [22,24,55,61], concurrency [13], species of structures [23], models of the di↵erential -calculus [21], and operads and multicategories [15,16,17,25,27].
For these applications, one would like to regard the bicategory of profunctors as a Kleisli bicategory and then use the theory of pseudo-distributive laws [34,49,50], i.e. the 2-dimensional counterpart of Beck's fundamental work on distributive laws [6] (see [58] for an abstract treatment). In order to carry out this idea, one is naturally led to try to consider the presheaf construction, which sends a small category X to its category of presheaves P (X) = def [X op , Set], as a pseudomonad. Indeed, a profunctor F : X ! Y, i.e. a functor F : Y op ⇥ X ! Set, can be identified with a functor F : X ! P (Y). However, the presheaf construction fails to be a pseudomonad for size reasons, since it sends small categories to locally small ones, making it impossible to define a multiplication. Although some aspects of the theory can be developed restricting the attention to small presheaves [19], which support the structure of a pseudomonad, some of our applications naturally involve general presheaves and thus require us to deal not only with coherence but also size issues.
In order to do so, we introduce the notion of a relative pseudomonad (Definition 3.1), which is based on the notions of a relative monad [1, Definition 2.1] and of a no-iteration pseudomonad [53,Definition 2.1]. These notions are, in turn, inspired by Manes' notion of a Kleisli triple [47], which is equivalent to that of a monad, but better suited to define Kleisli categories (see also [51,64]). For a pseudofunctor between bicategories J : C ! D (which in our main example is the inclusion J : Cat ! CAT of the 2-category of small categories into the 2-category of locally small categories), the core of the data for a relative pseudomonad T over J consists of an object T X 2 D for every X 2 C, a morphism i X : JX ! T X for every X 2 C, and a morphism f ⇤ : T X ! T Y for every f : JX ! T Y in D. This is as in a relative monad, but the equations for a relative monad are replaced in a relative pseudomonad by families of invertible 2-cells satisfying appropriate coherence conditions, as in a no-iteration pseudomonad. As we will see in Theorem 4.1, these conditions imply that every relative pseudomonad T over J : C ! D has an associated Kleisli bicategory Kl(T ), defined analogously to the one-dimensional case. In our main example, the presheaf construction gives rise to a relative pseudomonad over the inclusion J : Cat ! CAT in a natural way and it is then immediate to identify its Kleisli bicategory with the bicategory of profunctors. It should be noted here that the presheaf construction is neither a no-iteration pseudomonad (because of size issues) nor a relative monad (because of strictness issues).
As part of our development of the theory of relative pseudomonads, we show how relative pseudomonads generalize no-iteration pseudomonads (Proposition 3.3) and hence (by the results in [53]) also pseudomonads. We then introduce relative pseudoadjunctions, which are related to relative pseudomonads just as adjunctions are connected to monads. In particular, we show that every relative pseudoadjunction gives rise to a relative pseudomonad (Theorem 3.8) and that the Kleisli bicategory associated to a relative pseudomonad fits in a relative pseudoadjunction (Theorem 4.4).
Furthermore, we introduce and study the notion of a lax idempotent relative pseudomonad, which appears to be the appropriate counterpart in our setting of the notion of a lax idempotent 2-monad (often called Kock-Zöberlein doctrines) [37,38,65] and pseudomonad [48,52,60]. In Theorem 5.3 we will give several equivalent characterizations of lax idempotent relative pseudomonad and combine this result with the analogous one in [52] to show that a pseudomonad is lax idempotent as a pseudomonad in the usual sense only if it is lax idempotent as a relative pseudomonad in our sense. This notion is of interest since it allows us to exhibit examples of relative pseudomonads by reducing the verification of the coherence axioms for a relative pseudomonad to the verification of certain universal properties. In particular, the relative pseudomonad of presheaves can be constructed in this way.
We then consider the question of when a 2-monad on the 2-category Cat of small categories can be extended to a pseudomonad on the bicategory Prof of profunctors. Rather than adapting the theory of distributive laws to relative pseudomonads along the lines of what has been done for no-iteration monads [51], which would involve complex calculations with coherence conditions, we establish directly that, for a pseudofunctor J : C ! D of 2-categories, a 2-monad S : D ! D restricting to C along J in a suitable way, and a relative pseudomonad T over J, if T admits a lifting to 2-categories of strict algebras or pseudoalgebras for S, then S admits an extension to the Kleisli bicategory of T (Theorem 6.3). We do so bypassing the notion of a pseudodistributive law in a counterpart of Beck's result.
This result is well-suited to our applications, where the structure that manifests itself most naturally is that of a lift of the relative pseudomonad of presheaves to various 2-categories of categories equipped with algebraic structure, often via forms of Day's convolution monoidal structure [18,31]. In particular, our results will imply that the 2-monads for several important notions (categories with terminal object, categories with finite products, categories with finite limits, monoidal categories, symmetric monoidal categories, unbiased monoidal categories, unbiased symmetric monoidal categories, strict monoidal categories, and symmetric strict monoidal categories) can be extended to pseudomonads on the bicategory of profunctors. A reason for interest in this result is that the compositions in the Kleisli bicategories of these pseudomonads can be understood as variants of the substitution monoidal structure that can be used to characterize notions of operad [36,57].
As an illustration of the applications of our theory, we discuss our results in the special case of the 2-monad S for symmetric strict monoidal categories, showing how it can be extended to a pseudomonad on the bicategory of profunctors. This result is the cornerstone of the understanding of the bicategory of generalized species of structures defined in [23] as a 'categorified' version of the relational model of linear logic [29,28] and leads to showing that the substitution monoidal structure that gives rise to the notion of a coloured operad [4] is a special case of the composition in the Kleisli bicategory. The results presented here are intended to make these ideas precise by dealing with both size and coherence issues in a conceptually clear way.
Organization of the paper. Section 2 reviews some background material on 2-monads, pseudomonads and their algebras. Our development starts in Section 3, where we introduce relative pseudomonads, relate them to no-iteration pseudomonads and ordinary pseudomonads, introduce relative pseudoadjunctions and establish a connection between relative pseudoadjunctions and relative pseudomonads. Section 4 defines the Kleisli bicategory associated to a relative pseudomonad and discusses some of its basic properties. In Section 5 we introduce and study lax idempotent relative pseudomonads. Section 6 shows that an extension of a relative pseudomonad T to 2-categories of strict algebras or pseudoalgebras for a 2-monad S induces an extension of S to the Kleisli bicategory of T , as well as a composite relative pseudomonad T S. We conclude the paper in Section 7 by discussing applications of our theory and showing how several 2-monads on Cat can be extended to pseudomonads on Prof . Acknowledgements. Nicola Gambino acknowledges gratefully the support of EPSRC, under grant EP/M01729X/1, and of the US Air Force Research Laboratory, under agreement number FA8655-13-1-3038. We are grateful to the anonymous referee for insightful comments, which led in particular to a simplification of the material in Section 5.

Background
2-categories and 2-monads. We assume that readers are familiar with the fundamental aspects of the theory of 2-categories and of bicategories (as presented, for example, in [7,11,40]) and confine ourselves to review some facts that will be used in the following and to fix notation and conventions.
For a 2-category C and a pair of objects X, Y 2 C, we write C[X, Y ] for the hom-category of morphisms f : X ! Y and 2-cells between them, which we denote with lower-case Greek letters, : f ! f 0 . Two parallel morphisms f , f 0 : X ! Y are said to be isomorphic if they are isomorphic as objects of C[X, Y ], and we write f ⇠ = f 0 in this case. We write CAT for the 2category of locally small categories, functors, and natural transformations. Its full sub-2-category spanned by small categories will be written Cat. We then have an inclusion J : Cat ! CAT. We use the terms pseudofunctor, pseudonatural transformation, and pseudoadjunction rather than homomorphism, strong natural transformation, and biadjunction, respectively.
Let us now review some aspects of 2-dimensional monad theory [10]. By a 2-monad on a 2category C we mean a 2-functor S : C ! C equipped with 2-natural transformations m : S 2 ! S and e : 1 C ! S, called the multiplication and unit of the 2-monad, respectively, satisfying the usual axioms for a monad in a strict sense. As usual, we often refer to a 2-monad by mentioning only its underlying 2-functor, leaving implicit the rest of its data. Similar conventions will be used for other kinds of structures considered in the rest of the paper.
For a 2-category C and 2-monad S : C ! C, we write Ps-S-Alg C (or Ps-S-Alg if no confusion arises) for the 2-category of pseudoalgebras, pseudomorphisms and algebra 2-cells, and S-Alg C (or S-Alg) for the locally full sub-2-category of Ps-S-Alg C spanned by strict algebras. Here, by a pseudoalgebra we mean an object A 2 C, called the underlying object of the algebra, equipped with a morphism a : SA ! A, called the structure map of the algebra, and invertible 2-cells called the associativity and unit 2-cells of the algebra, subject to two coherence axioms [59].
We have a strict algebra when the associativity and unit 2-cells are identities, in which case (as in analogous cases below) the coherence conditions are satisfied trivially. For pseudoalgebras A and B (and in particular for strict algebras), a pseudomorphism from A to B consists of a morphism f : A ! B and an invertible 2-cell required to satisfy two coherence axioms [10,59]. For pseudomorphisms f, g : A ! B, an algebra 2-cell between them is a 2-cell ↵ : f ! g that satisfies one coherence axiom [10]. We have a forgetful 2-functor U : Ps-S-Alg ! C with a left pseudoadjoint F : C ! Ps-S-Alg, defined by mapping an object X 2 C to the free algebra on X, which is the strict algebra having SX as its underlying object and m X : S 2 X ! SX as its structure map. The components of the unit of the pseudoadjunction are the components of the unit of the 2-monad.
In our applications, we will consider several 2-monads on CAT (restricting to Cat in an evident way), for which we invite the readers to consult [10,44,46]. Among them, the 2-monads for (strict) monoidal categories, symmetric (strict) monoidal categories, categories with finite limits, categories with finite products, and categories with a terminal object. Bicategories and pseudomonads. For a bicategory C, we write the associativity and unit isomorphisms as natural families of invertible 2-cells which we leave unnamed. By the coherence theorem for bicategories [43] (which also follows from the bicategorical Yoneda lemma [60], see [26]), every bicategory is biequivalent to a 2-category.
In virtue of this, we shall often treat bicategories as if they were 2-categories. Example 2.1. Fundamental to our applications is the bicategory Prof of profunctors [8,45,60].
Its objects are small categories; and for small categories X and Y, the hom-category The composite of profunctors F : X ! Y and G : Y ! Z is given by the profunctor G F : X ! Z defined by the coend formula For a small category X, the identity profunctor Id X : X ! X is defined by letting It remains to prove that these definitions give rise to a bicategory. In the literature, it is often suggested that this can be proved by direct calculations, left to the readers. In Section 3, instead, we will give a more conceptual proof by describing Prof as the Kleisli bicategory associated to the relative pseudomonad of presheaves.
A pseudomonad on a bicategory C is given by a pseudofunctor T : C ! C, pseudonatural transformations n : T 2 ! T and i : 1 C ! T , called the multiplication and unit of the pseudomonad, respectively, and invertible modifications ↵, ⇢, and , called the associativity, right unit, and left unit, respectively, of T , fitting in the diagrams and subject to two coherence conditions [39]. The notions of a strict algebra and pseudoalgebra, of strict morphism and pseudomorphism, and of algebra 2-cell make sense also for pseudomonads, giving rise to bicategories Ps-S-Alg and S-Alg. When C is a 2-category, these are again 2categories. Every pseudomonad has also an associated Kleisli bicategory [14], which can be defined in complete analogy with the one-dimensional case; but we do not spell this out since we will give an alternative account of the Kleisli construction in Section 3. Importantly, in constrast with the situation for algebras discussed above, the Kleisli construction for a pseudomonad T : C ! C produces only a bicategory even when C is a 2-category, with the associativity and unit isomorphisms of T used to give the associativity and unit isomorphisms of the Kleisli bicategory (see also Theorem 4.1 below).

Relative pseudomonads
In ordinary category theory, the notion of a monad has an equivalent alternative presentation, via the notion of a Kleisli triple [47], which is particularly convenient to define Kleisli categories. The notion of a Kleisli triple admits a natural generalization, given by the notion of a relative monad [1], which is obtained by allowing the underlying mapping on objects of the Kleisli triple to be defined relative to a fixed functor (see [1] for details). Similarly, in 2-dimensional category theory, the notion of a pseudomonad can be rephrased equivalently as the notion of a no-iteration pseudomonad [53], which is the 2-dimensional analogue of the notion of a Kleisli triple. Here, we introduce relative pseudomonads, which generalize no-iteration pseudomonads in the same way as relative monads generalize Kleisli triples, i.e. by allowing the mapping on objects that is part of a no-iteration pseudomonad to be defined relatively to a fixed pseudofunctor between bicategories. From now until the end of this section, we consider a fixed pseudofunctor between bicategories J : C ! D. Definition 3.1. A relative pseudomonad T over J : C ! D consists of • an object T X 2 D, for every X 2 C, such that the following conditions hold: • for every f : commutes.
We introduce some terminology. For a relative pseudomonad T over J : C ! D as in Definition 3.1, we refer to the family of morphisms i X : JX ! T X, for X 2 C, as the unit of T , and to the family of 2-cells µ, ⌘, and ✓ as the associativity, right unit, and left unit of T , respectively. Finally, we refer to the axioms in (3.1) and (3.2) as the associativity and unit axioms for T , respectively. Note that in order to simplify the notation we have omitted the subscripts on the functors ( ) ⇤ X,Y and we will henceforth continue to do so. We furthermore adopt the convention of writing X rather than i X in a subscript of µ and ✓. So, for example, we have We also omit the detailed definition of some 2-cells in diagrams, labelling arrows only with the main 2-cell involved in its definition, and omitting subscripts. In all such cases, the precise definition of the 2-cell can be easily deduced from its domain and codomain. We wish to make precise in what sense relative pseudomonads are a generalization of noiteration pseudomonads [53, Definition 2.1]. This will be useful in order to relate relative pseudomonads and ordinary pseudomonads. Lemma 3.2. Let T be a relative pseudomonad over J : C ! D.
(i) For every f : JX ! T Y and g : JY ! T Z, the diagram Proof. The proof is a modified version of the proof of the redundancy of three axioms in the original definition of a monoidal category [33] (see also [32]), which has a version also for pseudomonads [48,Proposition 8.1]. ⇤ Proposition 3.3. A no-iteration pseudomonad is the same thing as a relative pseudomonad over the identity.
Proof. The two notions involve exactly the same data, except for the direction of the invertible 2cells. Then, using the numbering of axioms for a no-iteration pseudomonad in [53, Definition 2.1], the equivalence between axioms for a relative pseudomonad and those for a no-iteration pseudomonad are given as follows: Relative pseudomonads No-iteration pseudomonads Naturality of µ , Axioms 6 and 7 Naturality of ⌘ , Axiom 4 Associativity axiom , Note that it follows that Axioms 1, 3 and 5 for a no-iteration pseudomonad in [53, Definition 2.1] are redundant, in that they can be derived from the others. ⇤ The next remarks use Proposition 3.3 and the analysis of the relationship between ordinary pseudomonads and no-iteration pseudomonads in [53] to show how a pseudomonad can be regarded as a relative pseudomonad over the identity 1 C : C ! C and, conversely, how every relative pseudomonad over the identity determines a pseudomonad.
Remark 3.4 (From pseudomonads to relative pseudomonads). The combination of [53, Theorem 6.1] and Proposition 3.3 shows that every pseudomonad T : C ! C with data as in Section 2 induces a relative pseudomonad over the identity 1 C : C ! C. Explicitly, for X 2 C, we already have T X 2 C and a morphism i X : X ! T X as part of the pseudomonad structure. For a morphism f : The three families of invertible 2-cells µ, ⌘, ✓ for a pseudomonad are then obtained in an evident way. For example, where the unnnamed isomorphism 2-cell is a pseudonaturality of i.
Remark 3.5 (From relative pseudomonad over the identity to pseudomonads). The combination of Proposition 3.3 and [53, Theorem 3.6] shows that every relative pseudomonad over an identity pseudofunctor induces a pseudomonad. The explicit definitions are a bit involved, and therefore checking the coherence diagrams directly is not straightforward, but we shall outline a more conceptual account of the construction of a pseudomonad from a relative pseudomonad in Remark 4.5.
We introduce a generalization of the notion of pseudoadjunction between bicategories [12,60], extending to the 2-categorical setting the notion of a relative adjunction considered in [63] and [1,

consists of
• an object F X 2 E, for every object X 2 C; • a family of morphisms i X : JX ! GF X, for X 2 C; • a family of adjoint equivalences For a relative pseudoadjunction as in Definition 3.6, the components of the unit and counit of the adjoint equivalences in (3.3) will be written respectively, where f : JX ! GA and u : F X ! A. Note that a relative pseudoadjunction over the identity 1 C : C ! C is equivalent to a pseudoadjunction in the usual sense [35,60]. We now establish a relative variant of a standard fact that a pseudoadjunction of bicategories gives rise to a pseudomonad [35,60], namely that a relative pseudoadjunction determines a relative pseudomonad. The next lemma will be useful.
D be a relative pseudoadjunction. Then there is an essentially unique way of extending the function mapping X 2 C to F X 2 E to a pseudofunctor F : C ! E so that the maps i X : JX ! GF X, for X 2 C, become the 1-cell components of a pseudonatural transformation i : . The unit of the adjoint equivalence in (3.3) gives us invertible 2-cells .
So we can define g,f using the composite where the unnamed isomorphism is given by the pseudofunctoriality of G. For X 2 C, we need an invertible 2-cell , and so we define With these definitions, the pseudonaturality 2-cells for i : J ) GF are the 2-cells in (3.4). The proof of the coherence conditions is routine (cf. [35,60]). ⇤ be a relative pseudoadjunction. Then the function sending X 2 C to GF (X) 2 D admits the structure of a relative pseudomonad over J.
Proof. For X 2 C, define T X = def GF X. The relative pseudoadjunction gives morphisms i X : X ! T X, for X 2 C, and adjoint equivalences . It now remains to define the families of invertible 2-cells µ, ⌘ and ✓. For µ g,f : and so we define µ g,f to be the composite .
given by the units of the adjunction (3.5), which satisfy the required naturality condition. For ✓ ), and so we define ✓ X to be the composite 2-cell It remains to establish the coherence conditions. While it is possible to show this directly, it is more illuminating to argue in terms of universal properties. Simply restating the adjunction in (3.5), we observe that, given f : commutes. Accordingly, we can characterize µ g,f and ✓ X as follows. There are 2-cells commute. The 2-cells µ g,f and ✓ X then arise by composing these 2-cells with pseudofunctoriality 2-cells of G. The coherence diagrams follow readily, and we give details in the 2-categorical case, where the characterizing diagrams for µ g,f and ✓ X reduce to the diagrams For the associativity condition in (3.1), we have commuting diagrams Note that the triangles in these diagrams commute by part (i) of Lemma 3.2. Since both of the composites on the right-hand side of the diagrams lie in the image of G, we deduce by universality that they are equal, as required. For the unit condition in (3.2) we have a commuting diagram Here, the triangles commute by part (i) and (iii) of Lemma 3.2. Again, since the composite ) lies in the image of G we deduce by universality that it equals the identity, as required. ⇤ Using Theorem 3.8, we can introduce our fundamental example of a relative pseudomonad, given by the presheaf construction. 1 Example 3.9. There is a relative pseudoadjunction of the form where COC is the 2-category of locally small cocomplete categories, cocontinuous functors, and natural transformations, and U : COC ! CAT is the evident forgetful functor. The category P (X) = def [X op , Set] of presheaves over a small category X is the colimit completion of X in the sense that, for every locally small cocomplete A, composition with the Yoneda embedding y X : X ! P (X) induces an equivalence of categories Thus P provides a relative left pseudoadjoint to U . By Theorem 3.8 we obtain a relative pseudomonad over the inclusion J : Cat ! CAT. For a functor F : is the left Kan extension of F along the Yoneda embedding, defined by the coend formula The 2-cells µ F,G and ✓ X are uniquely determined by the universal property of left Kan extensions. There is an analogous relative pseudomonad arising from the relative pseudoadjunction FIL where FIL is the 2-category of locally small categories with filtered colimits, functors preserving such colimits, and all natural transformations [2]. Here, for X 2 Cat, we define D(X) 2 CAT to be the full subcategory of P (X) spanned by small filtered colimits of representables.

Kleisli bicategories
We introduce the Kleisli bicategory of a relative pseudomonad, extending to the 2-dimensional setting the definition of the Kleisli category of a relative monad [1, Section 2.3]. Theorem 4.1. Let T be a relative pseudomonad over J : C ! D. Then there is a bicategory Kl(T ), called the Kleisli bicategory of T , having the objects of C as objects, and homcategories given by Proof. We begin by defining composition in Kl(T ). Let f : JX ! T Y and g : This obviously extends to 2-cells, so as to obtain the required composition functors. For X 2 C, the identity morphism on X in Kl(T ) is i X : JX ! T X. For the associativity isomorphisms, let For the right and left unit, let f : We now need to show that these natural isomorphisms satisfy the required coherence conditions. We give the proof making explicit the bicategorical structure of C and D. We only need to show that the associativity, left unit, and right unit isomorphisms satisfy the coherence conditions for a bicategory. The coherence axiom for associativity is obtained via the following diagram: where, starting from the rhombus on the right-hand side and proceeding clockwise, we use naturality of the associativity in D, coherence of associativity in D, naturality of the associativity in D again, and finally the associativity coherence axiom for a relative pseudomonad in (3.1). The coherence axiom for the units is obtained via the following diagram: .
where, starting from the triangle on the top left-hand side, we use the coherence axiom for units of the relative pseudomonad in (3.2), naturality of the associativity in D, and the coherence axiom for units of D. ⇤ Note that, as mentioned in Section 2 for ordinary pseudomonads, Kl(T ) is only a bicategory even if C and D are 2-categories.

Example 4.2.
It is straightforward to identify the bicategory of profunctors of Example 2.1 with the Kleisli bicategory associated to the relative pseudomonad of presheaves P of Example 3.9. First of all, both bicategories have small categories as objects. Secondly, for small categories X and Y we have Thus, we have a canonical isomorphism of hom-categories given by exponential adjoint transposition. Furthermore, these isomorphisms are compatible with composition and identities. For composition, it su ces to observe that, for profunctors F : X ! Y and G : Y ! Z, there is a canonical natural isomorphism where the composition on the left-hand side is that of Prof , as defined in (2.3), while the composition on the right is the one of Kl(P ), which is given by the functorial composite of ⌧ (F ) : X ! P (Y) and (⌧ G) ⇤ : P (Y) ! P (Z), the latter being defined by the formula for left Kan extensions in (3.6). For identities, simply note that, for a small category X, the adjoint transpose of the identity profunctor on X, as defined in (2.4), is exactly the Yoneda embedding, which is the identity on X in Kl(P ).
In one-dimensional category theory, every monad determines two universal adjunctions relating the base category with the category of Eilenberg-Moore algebras and the Kleisli category for the monad. For pseudomonads, the construction of the bicategory of pseudoalgebras is wellknown and it has been considered for no-iteration pseudomonads in [53, Section 4], but we do not need its counterpart for relative pseudomonads here. We focus instead on the counterpart of the Kleisli adjunction, which has not been considered for no-iteration pseudomonads. The first step is the following lemma. Proof. For X, Y 2 Kl(T ), we define the functor G T X,Y : By inspection of the definitions, we can define the pseudofunctoriality 2-cells of G T to be exactly some of the 2-cells that are part of the data of a relative pseudomonad, namely In order to have a pseudofunctor, we need to verify that the following three coherence diagrams commute: The first and second diagrams follow at once from the coherence conditions in (3.1) and (3.2) that are part of the definition of a relative pseudomonad. The third is part (ii) of Lemma 3.

⇤
By analogy with the one-dimensional case, we expect that the pseudofunctor G T : Kl(T ) ! D has some form of left pseudoadjoint. The next result makes this precise.
Proof. For X 2 C, we define F T X = def X. Then we have G T F T X = T X, so the relative pseudomonad provides a morphism i X : JX ! G T F T X. For these to act like the components of the unit of a relative pseudoadjunction one needs to show that the functor is an adjoint equivalence. Indeed, and the functor G T ( ) i X is naturally isomorphic to the identity. This is because, for f : Remark 4.5. Theorem 4.4 allows us to give a more conceptual account of the construction of the pseudomonad associated to a relative pseudomonad over the identity 1 C : C ! C in Remark 3.5. Given a relative pseudomonad T over 1 C : C ! C, we can construct a pseudoadjunction between C and Kl(T ) as in Theorem 4.4. Then, the pseudomonad associated to this pseudoadjunction is exactly the pseudomonad described in Remark 3.5. So we have established again the coherence conditions for a pseudomonad, in a clean (albeit indirect) way.
Let us also note that if we start with a relative pseudomonad T over J : C ! D, form the associated Kleisli relative pseudoadjunction (as in Theorem 4.4), and take the induced relative pseudomonad (as in Theorem 3.8), we then retrieve the original relative pseudomonad. The only issues arise at the 2-cell level and we leave the verifications to the interested readers. In the other direction, suppose that we start with a relative pseudoadjunction form the induced relative pseudomonad T = GF over J : C ! D (as in Theorem 3.8), and then take the induced relative pseudoadjunction as in Theorem 4.4. We expect a comparison and indeed we have a pseudofunctor C : Kl(T ) ! E defined on objects by letting C(X) = def F X, for X 2 C. On hom-categories, for X, , where we used that T Y = GF (Y ).
One can compose adjunctions between categories and, similarly, pseudoadjunctions between bicategories. It does not make sense to compose relative pseudoadjunctions, but one can form the composite of a relative pseudoadjunction and a pseudoadjunction. Proposition 4.6. Let be a relative pseudoadjunction and a pseudoadjunction, respectively. Then there is a relative pseudoadjunction of the form E 0 Proof. The construction is evident and thus omitted. ⇤ We conclude this section by extending some results on no-iteration pseudomonads to relative pseudomonads. In the next proposition, part (i) generalizes [53, Proposition 3.1], part (ii) generalizes [53, Proposition 3.2], while part (iii) does not seem to have been made explicit yet for no-iteration pseudomonads.  Proof. Parts (i) and (ii) follow from Lemma 3.7 and Theorem 4.4 via Remark 4.5, but we also give explicit proofs. We begin from part (i). For f : X ! Y , we define T (f ) : T X ! T Y by letting T f = def (i Y J(f )) ⇤ . We then define the pseudofunctoriality 2-cells. First, we need invertible 2-cells ⌧ g,f : T (g f) ! T (g) T (f ), for f : X ! Y and g : Y ! Z. By definition, we have We then define ⌧ g,f as the composite 2-cell We should check two coherence conditions for pseudonatural transformations. The composition condition involves a pasting of a naturality of ⌘ to a diagram coming from part (i) of Lemma 3.2. The identity condition is just part (iii) of Lemma 3.2 . Finally, for part (iii), to see the pseudonaturality in X, take u : There are coherence conditions to check, but they are straightforward. ⇤

Lax idempotent relative pseudomonads
We isolate a special class of relative pseudomonads, which appears to be the appropriate generalization to our setting of the notion of a lax idempotent 2-monad, or Kock-Zöberlein 2-monad, or KZ-doctrine [38,65]. An extensive analysis of these 2-monads, with useful equivalent formulations, was given in the course of a study of general property-like 2-monads in [37]. For pseudomonads, the more general notion of lax idempotent pseudomonad on a bicategory was introduced in [60], with yet another characterisation of the notion, and studied further in [48,52].
In order to state the definition of a lax idempotent relative pseudomonad, it is convenient to use the notion of a left extension in a bicategory [40, §2.2.], which we now recall. We consider a fixed morphism i : X ! X 0 in a bicategory C. By definition, a left extension of a morphism f : X ! Y along i consists of a morphism f 0 : X 0 ! Y and a 2-cell ⌘ : f ! f 0 i such that composition with ⌘ induces a bijection between 2-cells f ! gi and 2-cells f 0 ! g for every morphism g : X 0 ! Y . In this case, one says that ⌘ exhibits f 0 as the left extension of f along i. Let us fix again a pseudofunctor between bicategories J : C ! D. Definition 5.1. A lax idempotent relative pseudomonad over J is a relative pseudomonad T over J : C ! D such that the following conditions hold: • for all f : Our next goal is to give alternative characterizations of lax idempotent relative pseudomonads, which we will use to discuss further the relative pseudomonad of presheaves. For this, we formulate the relative version of the notion of a left Kan pseudomonad introduced in [52, Definition 3.1]. Definition 5.2. A relative left Kan pseudomonad over J : C ! D consists of: • an object T X 2 D, for every X 2 C, • a morphism i X : JX ! T X in D, for every X 2 C, X which exhibits f ⇤ as the left extension of f along i X , for every f : JX ! T Y , such that the following conditions hold: Let us now assume we have an object T X 2 D for every X 2 C, a morphism i as the left extension of f along i X for every f : JX ! T Y . Note that this gives us all the data for a relative left Kan pseudomonad, but does not require all its axioms. Below, we refer to this data simply as T : C ! D. It is evident that, for all X, Y 2 C we have an adjunction whose unit has components the invertible 2-cells ⌘ f : f ! f ⇤ i X , for f : JX ! T Y , and whose counit has components 2-cells that will be written " u : (u i X ) ⇤ ! u, for u : T X ! T Y . We can then state our characterizations of lax idempotent relative pseudomonads as follows. Theorem 5.3. The following conditions are equivalent: (i) T : C ! D admits the structure of a lax idempotent relative pseudomonad over J : (iii) The bicategory E with objects of the form T X, for X 2 C, and hom-categories given by defining E[T X, T Y ] to be the full subcategory of D[T X, T Y ] spanned by the morphisms Proof. To prove that (i) implies (ii), observe that the axioms for a lax idempotent relative pseudomonad imply that the following diagram commutes: By one of the triangular laws for the adjunction in (5.1), " and it is therefore invertible. For (ii) implies (iii), the given isomorphisms show that E as defined is closed under composition and contains identities. The implication from (iii) to (iv) is immediate. For the implication from (iv) to (v), observe that the following diagram commutes: . .
which implies that the identity 1 : i X ! i X exhibits 1 T X as a left extension of i X along i X . Finally, we show that (v) implies (i). We begin by defining the remaining parts of the data for a relative pseudomonad, namely the families of invertible 2-cells µ f,g : Using the universal property of ⌘ g ⇤ f , we define µ f,g to be the unique 2-cell such that Similarly, using the universal property of ⌘ i X , we define ✓ X to be the unique 2-cell such that It then remains only to check the coherence conditions of Definition 3.1. There are two ways of doing this. The first is by a diagram-chasing arguments using the universal properties defining µ f,g and ✓ X . The second is to express µ f,g and ✓ X in terms of the unit and counit of the adjunction. Taking that approach, first observe that the diagram commutes by a triangle identity and the naturality of ". The associativity coherence condition is then given by the diagram where, starting from the top in a clockwise direction, we use interchange, two naturalities of ", the diagram in (5.2), a naturality of ", a naturality of ⌘, and finally an interchange again. Finally, the unit condition is given by the following diagram: where we have two uses of the triangle identities and a naturality ⇤ Example 5.4. We can apply Theorem 5.3 to show that the relative pseudomonad of presheaves of Example 3.9 is lax idempotent. For this, observe that for X, Y 2 Cat, there is an adjunction of the form in which the components of the unit are natural isomorphisms. The left adjoints in (5.3) factor through COC, the sub-2-category of cocomplete locally small categories and cocontinuous functors, and if U : P (X) ! P (Y) is cocontinuous, then " U is an isomorphism. Part (iii) of Theorem 5.3 then applies. A similar example arises by considering the Ind-completion, which is also lax idempotent. This is because the corresponding left adjoint factors through FIL the sub-2-category of Ind-complete categories and functors preserving filtered colimits; and if U : D(X) ! D(Y) preserves filtered colimits then " U is an isomorphism.
Remark 5.5. Theorem 5.3 and [52, Theorems 4.1 and 4.2] imply that a pseudomonad T on a bicategory C is lax idempotent in the usual sense if and only if it is lax idempotent as a relative pseudomonad over the identity 1 C : C ! C in the sense of Definition 5.1.

Liftings, extensions, and compositions
We now discuss a general method to extend a 2-monad to the Kleisli bicategory of a relative pseudomonad, which we will apply in Section 7 to extend several 2-monads from the 2-category Cat of small categories and functors to the bicategory Prof of small categories and profunctors. Let us begin by introducing the setting in which we will be working. We fix a pseudofunctor between 2-categories J : C ! D, a relative pseudomonad T over J with data as in Definition 3.1 and a 2-monad S : D ! D with data as in Section 2. We assume that the 2-monad S restricts along J. Explicitly, this means that we have a dotted functor and that, for X 2 C, the components of the multiplication and the unit, written m X : S 2 X ! SX and e X : X ! SX, respectively, are in C. This implies that the pseudofunctor J : C ! D can be lifted to pseudofunctors J : Ps-S-Alg C ! Ps-S-Alg D and J : S-Alg C ! S-Alg D (the definition of these 2-categories is recalled in Section 2), making the following diagram commute: where the vertical arrows in the top square are inclusions and those in the bottom square are forgetful 2-functors. We shall deal with two types of liftings, one involving only strict algebras (Definition 6.1) and another one involving both strict algebras and pseudoalgebras (Definition 6.2). We begin by defining the simpler type of lifting, involving only strict algebras. Definition 6.1. A lifting of T to strict algebras for S, denoted

consists of
• a strict algebra structure on T A, for every A 2 S-Alg C ; • a pseudomorphism structure on f ⇤ : T A ! T B, for every pseudomorphism f : JA ! T B; • a pseudomorphism structure on i A : JA ! T A, for every A 2 S-Alg C ; such that is an algebra 2-cell for every pair of pseudomorphisms f : JA ! T B and g : JB ! T C; Note that a lifting of T to strict algebras gives immediately a relative pseudomonadT over the pseudofunctor J : S-Alg C ! S-Alg D such that applying the forgetful 2-functors to the data of T returns the corresponding data of T . We shall give several examples of liftings of the relative monad of presheaves to strict algebras for some 2-monads in Section 7. However, it is not useful to work with liftings to categories of strict algebras for other 2-monads, since typically for a strict algebra A there is no evident structure of strict algebra structure on T A. In order to address this situation, we introduce the following definition. Definition 6.2. A lifting of T to pseudoalgebras for S, denoted consists of the following data: • a pseudoalgebra structure on T A, for every A 2 S-Alg C ; • a pseudomorphism structure on f ⇤ : is an algebra 2-cell for every pair of pseudomorphisms f : JA ! T B and g : JB ! T C; Similarly to what happened for liftings to strict algebras, a lifting of T to pseudoalgebras gives a relative pseudomonadT , but now over the pseudofunctor J : S-Alg C ! Ps-S-Alg D , again suitably related toT via the appropriate forgetful 2-functors. Note here that for the inclusion J : Cat ! CAT, the corresponding inclusion J : S-Alg Cat ! Ps-S-Alg CAT is not merely about size distinction, but involves both strict algebras and pseudoalgebras. Indeed, the notion of a relative pseudomonad was designed to encompass these situations as well.
Our next goal is to show how a lifting of a relative pseudomonad T gives rise to a pseudomonad on the Kleisli bicategory of T . In the one-dimensional situation, such a step commonly involves passing via a distributive law [6]. In our setting, where we are dealing with both coherence and size issues, such an approach would be rather complicated, as one would have to adapt the theory of pseudo-distributive laws [34,49,50] to relative pseudomonads. However, it is possible to take a more direct approach. Theorem 6.3. Assume that T has a lifting to either strict algebras or pseudoalgebras for S.
Then S has an extension to a pseudomonadS : Kl(T ) ! Kl(T ) on the Kleisli bicategory of T .
Proof. We only deal with the case of a lifting to pseudoalgebras, since the case of lifting to strict algebras is completely analogous. First, we consider the relative pseudomonadT over J : S-Alg C ! Ps-S-Alg D and its Kleisli bicategory Kl(T ). The objects of Kl(T ) are strict algebras with underlying object in C, and its hom-categories are given by Secondly, we observe that there is a forgetful pseudofunctor U : Kl(T ) ! Kl(T ), defined on objects by sending a strict algebra to its underlying object. To define the action on homcategories, let A, B 2 S-Alg C . Then, the required functor is determined by the diagram Ps-S-Alg[JA, T B] We claim that U has a left pseudoadjoint. The action of the left pseudoadjoint on objects is defined by sending X to SX, the free pseudoalgebra on X (which is in fact a strict algebra since S is a 2-monad). Next, for X 2 C, we define morphismsẽ X : X ! SX in Kl(T ) as the composite We wish to show that these are suitably universal. For this, let us observe that the diagram commutes up to natural isomorphism, since if f : SJX ! T A is a pseudomorphism, then Since the horizontal arrow at the bottom of (6.2) is an equivalence, we have the desired universality of the morphismẽ X . Now that we have a pseudoadjunction we obtain the desired extensionS as the pseudomonad associated to this pseudoadjunction. ⇤ We conclude this section by showing how to compose a relative pseudomonad and a 2-monad. Theorem 6.4. Assume that T admits a lifting to pseudoalgebras of S. Then the function sending X 2 C to T S(X) 2 D admits the structure of a relative pseudomonad over J : C ! D.
Proof. First, recall that, by Theorem 4.4, we have a relative pseudoadjunction By Theorem 3.8 we then obtain a relative pseudomonad over J : C ! D. Unfolding the definitions, one readily checks that the underlying function of this relative pseudomonad sends X 2 C to T S(X) 2 D, as required. ⇤

Substitution monoidal structures
We apply our results to obtain a homogeneous method for extending several 2-monads from the 2-category Cat of small categories and functors to the bicategory Prof of small categories and profunctors, encompassing all the examples considered in the theory of variable binding [24,55,61], concurrency [13], species of structures [23], models of the di↵erential -calculus [21], and operads [25].
The simplest examples of liftings for the relative pseudomonad for presheaves are with respect to 2-monads on CAT whose strict algebras are locally small categories equipped with suitable classes of limits. These 2-monads are co-lax, as discussed in [37]. The specific examples of 2-monads that we consider here are those for categories with terminal object, categories with chosen finite products (by which we mean categories with chosen terminal object and binary products) and categories with chosen finite limits (by which we mean categories with chosen terminal object and pullbacks). Each of these 2-monads is flexible in the sense of [9,10] and restricts along the inclusion J : Cat ! CAT to a 2-monad on the 2-category Cat of small categories, so as to determine a situation as in (6.1). We speak of small (or locally small) strict algebras to indicate small (or locally small) categories equipped with a strict algebra structure.
We make some preliminary observations about the pseudomorphisms (cf. (2.1)) in the cases under consideration. Since limits are determined up to a unique isomorphism, the pseudomorphisms are exactly the functors that preserve the specified limits in the usual up to isomorphism sense: the coherence conditions for a pseudomorphism are automatic [37]. Similarly, one sees directly that any 2-cell between functors preserving the relevant limits is an algebra 2-cell. In the terminology of [37], these 2-monads S are fully property-like. It follows in particular that S-Alg CAT [A, B] can be regarded as a full subcategory of CAT[A, B]. All this is in fact an abstract consequence of the fact that the 2-monads in question are all co-lax. That fact is evident and the general theory appears in [37]. Theorem 7.1. Let S : CAT ! CAT be the 2-monad for categories with terminal object, or categories with finite products, or categories with finite limits. Then the relative pseudomonad of presheaves P : Cat ! CAT has a lifting to strict S-algebras, P : S-Alg(Cat) ! S-Alg(CAT) .
Proof. Let us begin by observing that we have a choice of limits in Set, so for any X 2 Cat, P (X) has chosen limits defined pointwise. Thus, there is a strict S-algebra structure on P (X). Furthermore, the Yoneda embedding y X : X ! P (X) preserves those limits. Hence, if A 2 S-Alg Cat is a small strict algebra, then y A : A ! P (A) is a pseudomorphism of S-algebras in an evident fashion. Composition with y A thus gives us a functor Now, suppose that F : A ! P (B) is a pseudomorphism, that is to say, F preserves the relevant limits. Then the left Kan extension F ⇤ : P (A) ! P (B) also preserves these limits. This is critical, and for the separate classes of limits needs to be proved on a case by case basis. The case when S is the 2-monad for a terminal object is simple. If F preserves the terminal, then so does F ⇤ y A (being naturally isomorphic to F ). But the Yoneda y A : A ! P (A) preserves the terminal object, and hence so does F ⇤ . The case when S is the 2-monad for finite products can be seen as a corollary of the results in [31] (see also Theorem 7.3), but we provide a direct argument. Suppose that F and hence F ⇤ y A preserves finite products. As the Yoneda y A : A ! P (A) preserves finite products, F ⇤ preserves finite products of representables. But the objects of P (A) are colimits of representables. Since F ⇤ and products with objects (are left adjoints and so) preserve colimits, it follows that F ⇤ preserves finite products. Finally, the case when S is the monad for finite limits is similar, though in this case the result is standard. If A has finite limits and F : A ! P (B) preserves finite limits, then F is flat [42, §VII.10, Corollary 3] and hence F ⇤ preserves finite limits.
Thus, in each case, F ⇤ is a pseudomorphism of strict S-algebras; and, as we observed above, any 2-cell between pseudomorphisms will be an algebra 2-cell. Hence, the left Kan extension gives us a functor • Consider the 2-monad for a category with zero object (i.e. an object which is both terminal and initial). No category of presheaves of sets over a non-empty category has a zero object. So the 2-monad cannot lift. The same applies to the monad for direct sums or biproducts (in the terminology of [41]).
• Consider the 2-monad for a category with initial object. Given a category A with initial object, while the presheaf category P (A) does indeed have an initial object, the Yoneda embedding does not preserve it. Hence the 2-monad cannot lift. • Consider the 2-monad for a category with equalisers. Given a category A with equalisers, the presheaf category P (A) also has equalisers, and the Yoneda embedding y A : A ! P (A) preserves them. But now suppose that A has equalisers and that F : A ! Set preserves them. It does not follow that F ⇤ : P (A) ! Set preserves equalisers. For a counterexample one can obviously just take A to be the fork (i.e. the generic equaliser). Then for example take F : A ! Set mapping the parallel pair to the identity and twist on 2 with equaliser 0. Because of this failure it follows that the 2-monad cannot lift.
Next, we consider 2-monads associated with various notions of monoidal category. To start with, we consider 2-monads which are flexible in the sense of [9,10] and we have again a situation as in (6.1). Theorem 7.3. Let S : CAT ! CAT be the 2-monad for monoidal categories, or symmetric monoidal categories, or monoidal categories in which the unit is a terminal object, or symmetric monoidal categories in which the unit is a terminal object. The relative pseudomonad of presheaves P : Cat ! CAT has a lifting to strict S-algebras, Proof. The base case is that of a monoidal category. We discuss that case and derive the others. We use the analysis in [31] of the univeral property of Day's convolution tensor product [18]. We write Mon (respectively, MON) for the 2-category of small (respectively, locally small) monoidal categories, strong monoidal functors and monoidal natural transformations. For cocomplete categories A, B, a functor F : A ⇥ B ! C is separately cocontinuous if for every a 2 A, b 2 B both F (a, ) : B ! C and F ( , b) : A ! C are cocontinous. We write COC[A, B; C] for the category of such functors and natural transformations between them. A cocomplete category A equipped with a monoidal structure is monoidally cocomplete if the tensor product is separately cocontinuous. We then have a straightforward 2-category MONCOC of monoidally cocomplete locally small categories, strong monoidal cocontinuous functors, and monoidal transformations.
In [18] Day showed how for any small monoidal category A, the category P (A) of presheaves on A can be equipped with a monoidal structure, called the convolution tensor product, which makes P (A) into a biclosed monoidally cocomplete category, defined by letting for F 1 , F 2 2 P (A) and a 2 A. Furthermore, the Yoneda embedding y A : A ! P (A) has then the structure of a strong monoidal functor. For A 2 Mon and B 2 MONCOC, we have the adjoint equivalence obtained in [31]  In our terminology, the adjoint equivalences in (7.2) amount to saying that we have a relative pseudoadjunction MONCOC

MON[A, B]
This provides exactly a lifting of the relative pseudomonad P : Cat ! CAT to a relative pseu-domonadP : S-Alg Cat ! S-Alg CAT . All these considerations extend to symmetric monoidal categories, again by the results in [18,31]. For the 2-monads for monoidal categories with the condition that the unit is terminal, the lift follows from the above, observing that the unit of the convolution monoidal structure is the Yoneda embedding of the unit on the base category and so it remains a terminal object. ⇤ Our final group of examples of a lifting involve 2-monads on CAT which are not flexible. In this case, we have a lifting to pseudoalgebras in the sense of Definition 6.2. Theorem 7.4. Let S : Cat ! Cat be the 2-monad for either strict monoidal categories, or symmetric strict monoidal categories, or strict monoidal category in which the unit is terminal, or symmetric strict monoidal categories in which the unit is terminal. Then the relative pseudomonad P : Cat ! CAT has a lifting to pseudo-S-algebras, P : S-Alg Cat ! Ps-S-Alg CAT .
Proof. There is a direct and an indirect approach to this. Directly, one follows through the arguments of the previous section making the necessary adjustments. Indirectly, observe that in each case S 0 , the flexible 2-monad associated to S, is the 2-monad whose strict algebras are categories with unbiased structure (in the sense of [46]) as in the list in Theorem 7.3. Now S-Alg is a full sub-2-category of S 0 -Alg ⇠ = Ps-S-Alg. So the lifting of the relative pseudomonad of presheaves P : Cat ! CAT toP : For each of the monads S : Cat ! Cat above, one can consider the Kleisli bicategory associated to the pseudomonadS : Prof ! Prof determined by Corollary 7.5. The composition functors of these Kleisli bicategories can be understood as generalizations of various kinds of substitution monoidal structures [22,23,24,25,27,36,57], among those giving rise to the notions of a many-sorted Lawvere theory and of a coloured operad. We conclude the paper by illustrating this idea in the case of coloured operads. Example 7.6. As an illustration of the theory developed here, we revisit the construction of the bicategory of generalized species of structures of [23] and relate more precisely its composition with the substitution monoidal structure for coloured operads [4] (see also [20]). For this, let us begin by recalling the definition of the 2-monad S : Cat ! Cat for symmetric strict monoidal categories. Let X 2 Cat. For n 2 N, define S n (X) to be the category having as objects n-tuples x = (x 1 , . . . , x n ) of objects x i 2 X and as morphisms ( ,f ) : x !x 0 given by pairs consisting of a permutation 2 ⌃ n and an n-tuple of morphisms f i : x i ! x 0 (i) . We then let The category S(X) is equipped with a strict symmetric monoidal structure: the tensor product, writtenx x 0 , is given by concatenation of sequences, and the unit is given by the empty sequence; the symmetry is given by a permutation of identity maps. This definition can be extended easily to obtain a 2-functor S : Cat ! Cat. The multiplication of the monad is given by taking a sequence of sequences and forgetting the bracketing, while the unit has components e X : X ! S(X) mapping x 2 X to the singleton sequence (x) 2 S(X). By the theory developed above, and Corollary 7.5 in particular, we obtain a pseudomonad S : Prof ! Prof . For our purposes, it is convenient to describe explicitly the relative pseudomonad associated toS. Its action on objects is the function mapping X 2 Cat to S(X) 2 Cat. The component of the unit for X 2 Cat is the profunctorẽ X : X ! S(X) corresponding to the functor where X, Y are small categories. For a functor F : X ! P S(Y), we can define the functor F ] : S(X) ! P S(Y) recalling that, since S(Y) has a symmetric strict monoidal structure, P S(Y) has an unbiased (in the sense of [46]) symmetric monoidal structure. Hence, by the universal property of S(X), we have an essentially unique F ] fitting into a diagram of the following form: For brevity, we omit the description of the invertible natural transformations The Kleisli bicategory ofS is the bicategory S-Prof of S-profunctors defined in [25], which has small categories as objects and hom-categories defined by Indeed, one can readily check that composition and identity morphisms of S-Prof , as defined in [25], coincide with those given by instantiating the general definition of a Kleisli bicategory. Following [25], we write CatSym for the bicategory of categorical symmetric sequences, which is defined as the opposite of S-Prof . Thus, the objects of CatSym are small categories and its hom-categories are given by We write F [x; y] for the result of applying F : S(X) op ⇥ Y ! Set to (x, y) 2 S(X) op ⇥ Y. Given categorical symmetric sequences F : X ! Y and G : Y ! Z, i.e. functors F : S(X) op ⇥ Y ! Set and G : S(Y) op ⇥ Z ! Set, their composite G F : X ! Z in CatSym is given by considering F and G as S-profunctors in the opposite direction, taking their composition in S-Prof using the definition of composition in a Kleisli bicategory, and then regarding the result as a categorical symmetric sequence from X to Z. Explicitly, one obtains that Happily, this formula yields the definition of the substitution monoidal structure for coloured operads given in [3] by considering the special case where X and Y are discrete and coincide with a fixed set of colours of the coloured operads under consideration. The bicategory CatSym can be seen to be equivalent to the bicategory of generalized species of structures Esp previously introduced in [23]. To see this, let us recall the definition of Esp. For this, observe that the duality pseudofunctor ( ) ?
: Prof ! Prof defined by X ? = def X op allows us to turn this pseudomonad in (7.3) into a pseudocomonad. The bicategory Esp is then defined as the co-Kleisli bicategory of this pseudocomonad. More explicitly, its objects are small categories and its hom-categories are given by The bicategory Esp is then equivalent to CatSym, via the pseudofunctor that sends X to X op . Indeed, Furthermore, the composition operation of categorical symmetric sequences defined in (7.4) corresponds exactly to composition of generalized species of structures defined via co-Kleisli composition given in [23].