Hi Co,
(This email in a gist in case the ASCII art below gets lost in
translation
https://gist.github.com/Lysxia/d81abf4e35e8094df0a92ec5ff1467da)
Categorically, we prefer looking at a monoid (Z, 1, (*)) as a pair of morphisms (functions in Set) (const 1 : () -> Z) and (uncurry (*) : Z x Z -> Z).
A monoid homomorphism is_odd : Z -> B is a morphism which makes the following diagrams commute:
const 1
() ------------> Z
| |
id | | is_odd
| |
v v
() ------------> B
const True
(*)
Z x Z ---------> Z
| |
is_odd *** is_odd | | is_odd
| |
v v
B x B ---------> B
(&&)
Cheers,
Li-yao
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.