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?


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).

  • $\begingroup$ Aren't "Free Monads" that preserve the append operation capable of satisfying the inverse axiom? I watched youtube.com/watch?v=U0lK0hnbc4U and it seems to indicate that by keeping Monads free of interpretation, it is possible to satisfy the duplicators you speak of. Or am I misunderstanding you? $\endgroup$ – Dmitry Dec 26 '16 at 18:03
  • 2
    $\begingroup$ What is the append operation? What does "free of interpretation" mean? $\endgroup$ – Kevin Carlson Dec 26 '16 at 21:08
  • 1
    $\begingroup$ @Dmitry duplicators are not something to satisfy, they are not properties, they are part of a structure your category needs in order to define group objects. About the free monads: what do you mean by Free Monads preserve append operations? $\endgroup$ – Giorgio Mossa Dec 27 '16 at 21:55
  • $\begingroup$ @GiorgioMossa can you please expand on ` 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`? Is it a matter of pragmatically defining it, or is it a problematic construct in theory as well? $\endgroup$ – Dmitry Dec 27 '16 at 23:23
  • $\begingroup$ @Dmitry having a duplicator in the category of endofunctors would require to have a natural transformation $F \to F^2$ for each endofunctor $F$. Such requirement by itself is very unlikely to be meet for every category $\mathbf C$. $\endgroup$ – Giorgio Mossa Dec 28 '16 at 19:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.