Skip to content

Instantly share code, notes, and snippets.

@Lysxia
Created September 22, 2022 10:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Lysxia/d81abf4e35e8094df0a92ec5ff1467da to your computer and use it in GitHub Desktop.
Save Lysxia/d81abf4e35e8094df0a92ec5ff1467da to your computer and use it in GitHub Desktop.
Monoid homomorphisms
monoid homomorphism is_odd : Z -> B
Categorically, a monoid (Z, 1, (*)) is described by a pair of morphisms (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
(&&)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment