Generalized Monads and Comonads (Applications to Semirings and Semicorings) 2 1 0 2 Jawad Abuhlail∗ p Department of Mathematics and Statistics e S Box 5046, KFUPM, 31261 Dhahran, KSA 8 1 [email protected] ] T September 20, 2012 C . h t a Abstract m [ The category S of bisemimodules over a semialgebra A, with the so called A A 1 Takahashi’s tensor product −⊠A −, is semimonoidal but not monoidal. Although v not a unit in S , the base semialgebra A has properties of a semi-unit (in a sense A A 4 which we clarify in this note). Motivated by this interesting example, we introduce 1 1 a notion of a semi-unit I in an arbitrary semimonoidal category (V,•) and call a 4 category with such a distinguished object generalized monoidal. The advantage of . 9 this is that it provides us with a framework for studying notions like generalized 0 monoids (generalized comonoids) as well as generalized monads (generalized comon- 2 1 ads) w.r.t. the endo-functor J := I • − ≃ − • I : V −→ V. Applications to the : generalized monoidal variety ( S ,⊠ ,A) provide us with examples of generalized v A A A i A-semiringsandgeneralized semimodules(generalized A-semicorings andgeneralized X semicomodules) which extend the classical notions of rings and modules (corings and r a comodules). 1 Introduction A semiring is, roughly speaking, a ring not necessarily with subtraction. The first naturalexampleofasemiringisthesetN ofnon-negativeintegers. Otherexamplesinclude 0 the set Ideal(R) of (two-sided) ideals of any associative ring R and distributive bounded lattices. A semimodule is, roughly speaking, a module not necessarily with subtraction. The category or Abelian groups is nothing but the category of modules over Z. Similarly, the category of commutative monoids is nothing but the category of semimodules over N . 0 ∗ The author would like to acknowledge the support provided by the Deanship of Scientific Research (DSR) atKingFahdUniversityofPetroleum&Minerals(KFUPM)forfunding this workthroughproject No. IN100008. 1 Semirings were studied by many algebraists beginning with Dedekind [Ded1894] and were popularized by H. S. Vandiver (e.g. [Van1934]). Since the sixties of the last century, they were shown to have significant applications in several areas as Automata Theory, Op- timization Theory, Tropical Geometry and Idempotent Analysis (for more, see the mono- graphs [Gol1999a], [Gol1999b], [Gol2003], [HW1998], [KS1986], [LMS1999]). Recently, Durov [Dur2007] demonstrated that semirings are in one-to-one correspondence with the so-called algebraic additive monads on the category Set of sets. Moreover, a connection between semirings and the so-called F-rings, where F is the field with one element, was pointed out in [PL2011, 1.3 – 1.4]. The theory of semimodules over semirings was devel- oped among others by many authors including Takahashi (e.g. [Tak1981], [Tak1982a]), Patchkoria (e.g. [Pat2006], [Pat2009]) and Katsov (e.g. [Kat2004], [KN2011]). A strong connection between corings over an associative ring A (coalgebras in the monoidal category Mod of bimodules over A) and their comodules on one side and A A comonads induced by the tensor product −⊗ − and their comodules on the other side has A been realized by several authors (e.g. [CMZ2002], [BW2003], [G-T2006]). Moreover, the theory of monads and comonads in (autonomous) monoidal categories received increasing attention in the last decade (e.g. [Moe2002], [BV2007], [Mes2008]). Extensions to arbi- trary categories were carried out in several recent papers (e.g. [Wis2008-b], [BBW2009], [MW2010]). Using the so called Takahashi’s tensor product − ⊠ − of semimodules over an as- A sociative semiring A [Tak1982a], notions of semicorings and semicomodules over A were introduced by the author in a talk [Abu2008]. However, such semicorings could not be realized as comonoids (coalgebras) in the category S of (A,A)-bisemimodules since this A A category ( S ,⊠ ,A) is not monoidal1. Motivated by the desire to establish a connection A A A between semicomodules for semicorings and comodules for comonads induced by −⊠ −, A we introduce a notion of generalized monads (comonads) and apply them to S . More- A A over, we introduce notions of generalized monoidal categories with prototype ( S ,⊠,A). A A In such categories, we introduce and investigate generalized monoids (comonoids) and their categories of generalized modules (comodules). In particular, we realize generalized A-semirings (generalized A-semicorings) as generalized monoids (comonoids) in S . Our A A results extend corresponding ones in some of the above mentioned references to the gen- eralized monoidal categories. Generalized bimonads and generalized Hopf monads, which extend bimonads and Hopf monads (e.g. [BV2007], [CLS2010], [MW2010]), as well as generalized bimonoids (generalized bialgebras) and generalized Hopf monads (generalized Hopf algebras) in generalized monoidal categories are the subject of a forthcoming paper which is currently under preparation. 1An alternative tensor product −⊗A − was recalled by Katsov in [Kat2004] so that (ASA,⊗A,A) is monoidal. 2 2 Generalized (Co)Monads RecallfirstthesocalledGodement product (e.g. [God1958])ofnaturaltransformations between functors: 2.1. ([BS2000]) Let A,B,C be any categories. Any natural transformations ψ : F −→ G and φ : F′ −→ G′ of functors A −F→,G B F−′→,G′ C can be multiplied using the Godement product to yield a natural transformation φψ : F′F −→ G′G, where φ ◦F′(ψ ) = (φψ) = G′(ψ )◦φ for every X ∈ A. (1) G(X) X X X F(X) Moreover, if A −H→ B −H→′ C are functors and δ : G −→ H, θ : G′ −→ H′ are natural transformations, then the following interchange law holds (δ ◦ψ)(θ◦φ) = (θδ)◦(φψ). (2) 2.2. Let A and B be categories, L : A −→ B, R : B −→ A be functors and J : A −→ A, K : B −→ B be endo-functors such that RK ≃ JR and LJ ≃ KL. We say that (L,R) is a (J,K)-adjoint pair iff we have natural isomorphisms in X ∈ A and Y ∈ B: Mor (LJ(X),K(Y)) ≃ Mor (J(X),RK(Y)). B A For the special case J = I = K, we recover the classical notion of adjoint pairs. A Remark 2.3. Let (L,R) be a (J,K)-adjoint pair and consider L := L and R := R . |J(A) |K(B) Then (L,R) is an adjoint pair with unit and counit of adjunctieon given by e e e η : J −→ RLJ and ε : LRK −→ K. Moreover, one checks easily that M := RKL is a J-monad and C := LJR is a K-comonad. Generalized (Co)Monadic Categories Throughout this section, A is an arbitrary category. 2.4. LetT : A −→ Abeanendo-functor. Anobject X ∈ Obj(A) issaidto havea T-action or to be a T-act iff there is a morphism ̺ : T(X) −→ X in A. For two objects X,X′ X with T-actions, we say that a morphism ϕ : X −→ X′ in A is a morphism of T-acts iff the following diagram is commutative T(X) ̺X //X T(ϕ) ϕ (cid:15)(cid:15) (cid:15)(cid:15) T(X′) //X′ ̺X′ The category of T-acts is denoted by ActT. 3 2.5. Let T : A −→ A be an endo-functors. An object X ∈ Obj(A) is said to have a T-coaction or to be a T-coact iff there is a morphism ̺X : X −→ T(X) in A. For two objects X,X′ with T-coactions, we say that a morphism ϕ : X −→ X′ in A is a morphism of T-coacts iff the following diagram is commutative ̺X X //T(X) ϕ T(ϕ) (cid:15)(cid:15) (cid:15)(cid:15) X′ //T(X′) ′ ̺X T The category of T-coacts is denoted by Coact . Example 2.6. The objects of CoactF, where F : Set −→ Set is any endo-functor, play an important role in logic and theoretical computer science. They are called F-systems2 (e.g. [Rut2000]). For an F-system, the set A is called the carrier (or set of states) of F and A the map F : A −→ A is called the transition structure (or dynamics) of the system. A Generalized Monads 2.7. Let J : A −→ A be an endo-functor. With a J-monad on A we mean a datum (M,µ,ω,ν;J) consisting of an endo-functor M : A −→ A associated with natural transfor- mations µ : MM −→ M, ω : I −→ J and ν : J −→ M such that the following diagrams are commutative Mµ µ µ MMM // MM MM //IM MM //MI OO OO µM µ νM ωM Mν Mω (cid:15)(cid:15) (cid:15)(cid:15) (cid:15)(cid:15) (cid:15)(cid:15) MM //// M JM JM MJ MJ µµ i.e. for every X ∈ A we have µ ◦M(µ ) = µ ◦µ , ν ◦ω ◦µ = I and M(ν )◦M(ω )◦µ = I . X X X M(X) M(X) M(X) X MM(X) X X X MM(X) Definition 2.8. We say that an endo-functor M : A −→ A is a generalized monad iff there exists an endo-functor J : A −→ A such that M is a J-monad. 2Some references call these F-coalgebras (e.g. [AP2001], [Gum1999], [GS2001]). For us, coalgebrasare always coassociative and counital. 4 2.9. A morphism of generalized monads (ϕ;ξ) : (M,µ,ω,ν;J) −→ (M′,µ′,ω′,ν′;J′) on A consists of natural transformations ϕ : M −→ M′ and ξ : J −→ J′ such that the following diagrams are commutative MM µ // M J ν // M ϕϕ ϕ ξ ϕ (cid:15)(cid:15) (cid:15)(cid:15) (cid:15)(cid:15) (cid:15)(cid:15) M′M′ //M′ J′ // M′ µ′ ν′ i.e. for every X ∈ A we have ϕX ◦µX = µ′X ◦ϕM′(X) ◦M(ϕX) and ϕX ◦νX = νX′ ◦ξX. The category of generalized monads on A is denoted by GMonad . For each endo-functor A J : A −→ A, we denote by J-Monad the subcategory of J-monads on A with ξ the A identity natural transformation. In the special case J = I and ω is the identity natural A transformation, we drop the prefix and recover the notion of monads3 on A. 2.10. Let (M,µ,ω,ν;J) be a J-monad on A. An (M;J)-module is an object X ∈ Obj(A) with a morphism ̺ : M(X) −→ X such that the following diagrams are commutative X MM(X) M(̺X) //M(X) M(X) ̺X // X OO µX ̺X νX ωX (cid:15)(cid:15) (cid:15)(cid:15) (cid:15)(cid:15) M(X) //X J(X) J(X) ̺X Thecategoryof(M;J)-modulesandmorphismsthoseofM-actsisdenotedbyA .Incase (M;J) J = I and ξ is the identity natural transformation, we have the category of M-modules4. A 2.11. Let (M,µ,ω,ν;J) be a generalized monad on A. For every X ∈ Obj(A), M(X) is an (M;J)-module through ̺ : M(M(X)) −µ→X M(X). M(X) Such modules are called free (M;J)-modules and we have the so called free functor F : A −→ A , X 7→ M(X). (M;J) (M;J) The full subcategory of free (M;J)-modules is called the Kleisli category and is denoted by A . (M;J) e 3Monads were studied in classical category theory under various names (e.g. triples, triads, standard constructions and fundamental constructions [BW2003]). 4Some references call these M-algebras (e.g. [Bec2003]). 5 Example 2.12. Let (M,µ,ω,ν;J) be a generalized monad on A with MJ ≃ JM. If X is an (M;J)-module, then J(X) is also an (M;J)-module through ̺ : MJ(X) ≃ JM(X) J−(̺→X) J(X). J(X) Moreover, if Y = M(X) is a free (M;J)-module, then J(Y) = JM(X) ≃ MJ(X) is also a free (M;J)-module. 2.13. Let (M,µ,ω,ν;J) be a generalized monad. If MJ ≃ JM, then we have a natural isomorphism for every X ∈ A and Y ∈ A : (M;J) Mor (F (X),J(Y)) ≃ Mor (X,J(Y)), f 7→ f ◦(ν ◦ω) A(M;J) (M;J) A X with inverse g 7−→ ̺ ◦F (g). In particular, we have a natural isomorphism J(Y) (M;J) Mor (F (J(X)),J(Y)) ≃ Mor (J(X),J(Y)); A(M;J) (M;J) A i.e. (F (−),I) is a (J,J)-adjoint pair. Consequently, J(A ) ֒→ A and J(A ) ֒→ (M;J) (M;J) (M;J) J(A) are reflective subcategories. Generalized Comonads 2.14. LetJbeanendo-functoronA.WithaJ-comonad onAwemeanadatum(C,∆,ω,θ) consisting of an endo-functor C : A −→ A associated with natural transformations ∆ : C −→ CC, ω : I −→ J and θ : C −→ J such that the following diagrams are commutative ∆ ∆ ∆ C //CC IC //CC CI // CC ∆ ∆C ωC θC Cω Cθ (cid:15)(cid:15) (cid:15)(cid:15) (cid:15)(cid:15) (cid:15)(cid:15) (cid:15)(cid:15) (cid:15)(cid:15) CC // CCC JC JC CJ CJ C∆ i.e. for every X ∈ A we have ∆ ◦∆ = C(∆ )◦∆ , θ ◦∆ = ω and C(θ )◦∆ = C(ω ). C(X) X X X C(X) X C(X) X X X Definition 2.15. We say that an endo-functor C : A −→ A is a generalized comonad iff there exists an endo-functor J : A −→ A such that C is a J-comonad. 6 2.16. A morphism of generalized comonads (ψ;ξ) : (C,∆,ω,θ;J) −→ (C′,∆′,ω′,θ′;J′) on A consists of natural transformations ψ : C −→ C′ and ξ : J −→ J′ such that the following diagrams are commutative C ∆ // CC C θ //J ψ ψψ ψ ξ (cid:15)(cid:15) (cid:15)(cid:15) (cid:15)(cid:15) (cid:15)(cid:15) C′ // C′C′ C′ // J′ ∆′ θ′ i.e. for every X ∈ A we have ψC′(X) ◦C(ψX)◦∆X = ∆′X ◦ψX and ξX ◦θX = θX′ ◦ψX. The category of generalized comonads on A is denoted by GComonad . We denote by A J-Comonad the subcategory of J-comonads for which ω is the identity transformation. A When we drop the prefix, we have the special case J = I and ω is the identity natural A transformation and recover the notion of comonads5 on A. 2.17. Let (C,∆,ω,θ;J) be a generalized comonad on A. A (C;J)-comodule is an object X ∈ Obj(A) along with a morphism ̺X : X −→ C(X) in A such that the following diagrams are commutative ̺X ̺X X //C(X) X //C(X) ̺X C(̺X) ωX θX (cid:15)(cid:15) (cid:15)(cid:15) (cid:15)(cid:15) (cid:15)(cid:15) C(X) //CC(X) J(X) J(X) ∆ X The category of (C;J)-comodules and morphisms those of C-coacts is denoted by A(C;J). In case J = I and ξ is the identity natural transformation, we have the category of A C-comodules6. 2.18. Let (C,∆,ε;J) be a generalized comonad on A. For every X ∈ Obj(A), C(X) has a canonical structure of a (C;J)-comodule through ∆ ̺C(X) : C(X) −→X CC(X). Such comodules are called cofree (C;J)-comodules and we have the so called cofree functor FC : A −→ A(C;J), X 7→ C(X). The full subcategory of cofree (C;J)-comodules is called the Kleisli category of C and is denoted by A(C;J). e 5Comonads were called cotriples in some classical works of category theory (e.g. [BW2005]). 6Some references call these C-coalgebras (e.g. [Bec2003]). 7 Example 2.19. Let (C,∆,ω,θ;J) be a generalized comonad on A with JC ≃ CJ. If X is a (C;J)-comodule, then J(X) is also a (C;J)-comodule through ̺J(X) : J(X) J−(̺→X) JC(X) ≃ C(J(X)). If Y = C(X) is a cofree (C,J)-comodule, then J(Y) = JC(X) ≃ CJ(X) is also a cofree (C,J)-comodule. 2.20. Let (C,∆,ω,θ;J) be a generalized comonad on A with J idempotent and JC ≃ CJ. Then we have a natural isomorphism for X ∈ A and Y ∈ A(C;J) : Mor (J(Y),FC(J(X))) ≃ Mor (J(Y),J(X)), f 7→ θ ◦f A(C;J) A J(X) with inverse g 7−→ FC(g)◦̺J(Y); i.e. (I,F(C;J)(−)) is a (J,J)-adjoint pair. Consequently, J(A(C;J)) ֒→ J(A) is a coreflective subcategory. Proposition 2.21. Let A and B be categories, L : A −→ B, R : B −→ A be functors and J : A −→ A, K : B −→ B endo-functors such that LJ ≃ KL, JR ≃ RK and (L,R) is a (J,K)-adjoint pair. L R 1. (L,R) is an adjoint pair where L : J(A) −→ K(B) and R : K(B) −→ J(A) with unit and counit of adjunction given by η : J −→ RLJ and ε : LRK −→ K. 2. RL is a monad on J(A) with RεL µRL : (RL)(RL)J≃ R(LRK)L −→ RKL ≃ (RL)J and ηRL := η. 3. LR is a comonad on K(B) with LηR ∆LR : (LR)K ≃ LJR −→ L(RLJ)R ≃ (LR)(LR)K and εLR := ε. 4. L is a monad on J(A) if and only if R is a comonad on K(B). In this case, J(A)L ≃ K(B)R. L 5. L is a comonad on J(A) if and only if R is a monad on K(B). In this case, J(A) ≃ K^(B) . g R Proof. By assumption LJ ≃ KL whence L(J(A)) := LJ(A) = KL(A) ⊆ K(B) and JR ≃ RK whence R(K(B)) := R(K(B)) = JR(B) ⊆ J(A). The assumptions imply that (L,R) is an adjoint pair. The result follows then from the classical result on right adjoint pairs (e.g. [EM1965, Proposition 3.1], [BBW2009, 2.5, 2.6]).(cid:4) 8 3 Generalized Monoidal Categories In this section, we introduce a notion of generalized monoidal categories and general- ized (op-)monoidal functors. Semimonoidal Categories 3.1. Recall that a category V is said to be semimonoidal iff there exists a bifunctor −•− : V ×V −→ V, (X,Y) 7→ X •Y γX,Y,Z along with natural isomorphisms (X • Y) • Z ≃ X • (Y • Z) such that the following pentagon is commutative for any W,X,Y,Z ∈ V (W •X)•(Y •Z) rrrrγrWrr•rXr,rYr,rZrrrrrrrrrr88 ▲▲▲▲▲▲▲▲▲▲γ▲W▲▲,X▲▲,Y▲▲•▲Z▲▲▲▲&& ((W •X)•Y)•Z W •(X •(Y •Z)) OO γW,X,Y•Z W•γX,Y,Z (cid:15)(cid:15) (W •(X •Y))•Z // W •((X •Y)•Z) γW,X•Y,Z 3.2. Let (V,•) and (W,⊗) be semimonoidal categories. A functor F : V −→ W is said to be semimonoidal iff there exist coherence maps given by a natural transformation φ : F(−)⊗F(−) −→ F(−•−) such that the following diagram is commutative γ F(X),F(Y),F(Z) (F(X)⊗F(Y))⊗F(Z) //F(X)⊗(F(Y)⊗F(Z)) φX,Y⊗F(Z) F(X)⊗φY,Z (cid:15)(cid:15) (cid:15)(cid:15) F(X •Y)⊗F(Z) F(X)⊗F(Y •Z) φX•Y,Z φX,Y•Z (cid:15)(cid:15) (cid:15)(cid:15) F((X •Y)•Z) // F(X •(Y •Z)) F(γX,Y,Z) Moreover, we say that F is a strong (strict) semimonoidal functor iff φ is an iso- X,Y morphism (identity) for each pair of objects X,Y ∈ V. For two semimonoidal functors F,F′ : V −→ W, we say that a natural transformation ξ : F −→ F′ is semimonoidal iff 9 the following diagram is commutative F(X)⊗F(Y) ξX⊗ξY //F′(X)⊗F′(Y) φX,Y φ′X,Y (cid:15)(cid:15) (cid:15)(cid:15) F(X •Y) //F′(X •Y) ξX•Y 3.3. Let (V,•) and (W,⊗) be semimonoidal categories. A functor F : V −→ W is said to be op-semimonoidal iff there exist coherence maps given by a natural transformation δ : F(−•−) −→ F(−)⊗F(−) such that the following diagram is commutative F((X •Y)•Z) F(γX,Y,Z) // F(X •(Y •Z)) δX•Y,Z δX,Y•Z (cid:15)(cid:15) (cid:15)(cid:15) F(X •Y)⊗F(Z) F(X)⊗F(Y •Z) δX,Y⊗F(Z) F(X)⊗δY,Z (cid:15)(cid:15) (cid:15)(cid:15) (F(X)⊗F(Y))⊗F(Z) //F(X)⊗(F(Y)⊗F(Z)) γ F(X),F(Y),F(Z) Moreover, we say that F is a strong (strict) op-semimonoidal functor iff δ is an iso- X,Y morphism (identity) for every pair of objects X,Y ∈ V. For two semimonoidal functors F,F′ : V −→ W, we say that a natural transformation ξ : F −→ F′ is op-semimonoidal iff the following diagram is commutative F(X •Y) ξX•Y //F′(X •Y) δX,Y δX′ ,Y (cid:15)(cid:15) (cid:15)(cid:15) F(X)⊗F(Y) //F′(X)⊗F′(Y) ξX⊗ξY 3.4. Let (V,•) be a semimonoidal category. A braiding on V is given by a natural isomor- ζX,Y phism X •Y ≃ Y •X for every pair of objects X,Y ∈ V making the following triangles commutative Y •X •Z X •Z •Y ❉ ❉ ③ ❉ ③ ❉ ③ ❉ ③ ❉ ③ ❉ ③ ❉ ③ ❉ ③ ❉ ③ ❉ ③ ❉ ③ ❉ ③ ❉ ζY,X•Z③③③ ❉❉Y❉•ζX,Z X•ζZ,Y③③③ ❉❉ζ❉X,Z•Y ③ ❉ ③ ❉ ③ ❉ ③ ❉ ③ ❉ ③ ❉ ③ ❉ ③ ❉ ③ ❉ ③ ❉ ③ ❉ ③ ❉ ③ ❉ ③ ❉ ||③ "" ||③ "" X •Y •Z //Y •Z •X X •Y •Z // Z •X •Y ζX,Y•Z ζX•Y,Z If ζ2 = id, then we say that V is ζ-symmetric. 10