[Math] If Monad is just a Monoid Object in the Category of Endofunctors…

category-theory

If Monad is just a Monoid Object in the Category of Endofunctors; where a Monoid is just a construct(product/pair) of a Set and a binary operator, having identity, closure, and associativity;

and a Comonad is just a Comonoid Object in the Category of Endofunctors; eg a Monad with all arrows reversed.

According to this diagram,

enter image description here

Does this mean that there also exist Magmad, a Magma Object in the category of Endofunctors; a Semigroupad, a Semigroup Object in the category of Endofunctors; and a Groupad, a Group Object in the category of Endofunctors; a Comagmad, a Cosemigroupad, and a Cogroupad as well?

I'm curious because I tried googling these terms but the only instances of Groupad seem to be mispellings of Grouped, so I am curious if it actually makes sense or not, and I'm curious why all the hype about Monads in functional programming without any respect for Magmads, Semigroupads, and Groupads.

If there is a Monad which also has inverse, does it make it a Groupad? And would any data structure that has a binary operation that creates an element of the same data structure be reasonable to call a Magmad? And if it isn't quite a Monad since it lacks identity, would it be reasonable to call it a Semigroupad?

Best Answer

Be careful, when people say that a monad is just a monoid in the category of endofunctors over a given category they mean that a monad is a monoid object in the monoidal category of the endofunctors.

As you can see following the link above a monoid object is formed by an object $c$ of the monoidal category considered, with a binary operation (i.e. a morphism $c\otimes c \to c$) and a unit (i.e. a morphism $I \to c$, where $I$ is the unit of the monoidal structure over the category) satisfying the diagrammatic versions of the axioms of a monoid (associativity and unit axioms).

Following this idea you could easily generalize the construction for structures like magmas and semigroups: you could define a magma object in a monoidal category to be a pair formed by an object $c$ and morphism $c \otimes c \to c$, a semigroup object to be a magma object satisfying the diagrammatic version of the associativity. Applying this magma/semigroup object-construction to the monoidal category of endofunctor I believe you could get the construction you where looking for.

I honestly do not know if such concepts would be useful. Great of the interest in monads arise from the constructions like categories of algebras and the Kleisli category associated to a monad (for what I get this category is what really interest in computer science, because lots of computations can be modelled as morphisms in Kleisli categories for opportune monads defined over $\mathbf{Set}$). These constructions require the whole structure of the monad, so I doubt that you could get something so useful working with semigroupad or magmad (following your notation).

Hope this helps.

p.s. As an aside note I point out the fact that you cannot define a group object in any monoidal category: this is due to problem with the inverse-axiom which requires that your monoidal category has mappings of the form $c \to c \otimes c$, usually called duplicators. This in particular implies that you should not be able to define a groupad in any trivial sense (at least none that I can think of).

Related Question