[Haskell-cafe] found monad in a comic

Leif Frenzel himself at leiffrenzel.de
Thu Jun 14 05:02:35 EDT 2007


Dan Piponi wrote:
> Marc asked:
> 
>> <http://xkcd.com/c248.html>
>> ( join /= coreturn )
>>
>> IMHO this could be a beautiful and easy way to explain monads.
>> comments?
> 
> I'll eat my hat if there isn't a formal way of looking at this. I'm
> not qualified to put it together coherently but it goes something like
> this: modal logic has Kripke semantics based on the notion of many
> worlds. For the right modal logic, the many worlds idea captures the
> notion of counterfactual worlds. We can also extend the Curry-Howard
> isomorphism to include modal logic. Some of the laws of modal logic
> (or their duals) correspond to monad (or comonad) laws (see laws 4 and
> t here: http://en.wikipedia.org/wiki/Kripke_semantics). These laws
> translate into rules about what worlds 'accessible' from what other
> worlds. So that cartoon may have a formal interpretation in terms of
> monads...
Unfortunately that interpretation would have to rely on an equivocation 
of 'accessible'. In modal logic (and in the transition from the first to 
the second situation in the comic), it's a logical relationship; in the 
transition from the second to the third situation it's meant to ground 
the possibility of physical interaction, which normally is not thought 
to be possible between possible worlds. You'd probably have to ship a 
lot of extra physics (and metaphysics) to have an intelligible 
interpretation that connects both senses :-)

Ciao,
Leif

> -- 
> Dan
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
> 



More information about the Haskell-Cafe mailing list