[Haskell-cafe] Re: monads and groups -- instead of loops
Arie Peterson
ariep at xs4all.nl
Wed Aug 1 21:06:51 EDT 2007
Math alert: mild category theory.
Greg Meredith wrote:
> But, along these lines i have been wondering for a while... the monad laws
> present an alternative categorification of monoid. At least it's
> alternative to monoidoid.
I wouldn't call monads categorifications of monoids, strictly speaking.
A monad is a monoid object in a category of endofunctors (which is a
monoidal category under composition).
What do you mean by a 'monoidoid'? I only know it as a perverse synonym of
'category' :-).
> In the spirit of this thought, does anyone know of an
> expansion of the monad axioms to include an inverse action? Here, i am
> following an analogy
>
> monoidoid : monad :: groupoid : ???
First of all, I don't actually know the answer.
The canonical option would be a group object in the endofunctor category
(let's call the latter C). This does not make sense, however: in order to
formulate the axiom for the inverse, we would need the monoidal structure
of C (composition of functors) to behave more like a categorical product
(to wit, it should have diagonal morphisms diag :: m a -> m (m a) ).
Maybe there is a way to get it to work, though. After all, what we (in FP)
call a commutative monad, is not commutative in the usual mathematical
sense (again, C does not have enough structure to even talk about
commutativity).
> My intuition tells me this could be quite generally useful to computing in
> situation where boxing and updating have natural (or yet to be discovered)
> candidates for undo operations. i'm given to understand reversible
> computing
> might be a good thing to be thinking about if QC ever gets real... ;-)
If this structure is to be grouplike, the inverse of an action should be
not only a post-inverse, but also a pre-inverse. Is that would you have in
mind?
(If I'm not making sense, please shout (or ignore ;-) ).)
Greetings,
Arie
More information about the Haskell-Cafe
mailing list