Example. Monoid homomorphisms [01KV]

A homomorphism of monoids is given by a semigroup homomorphism that preserves identity elements.

\hom _{\mathsf {Monoid}}(A,B) :\equiv {\mathop {\mathchoice {\textstyle \sum }{\textstyle \sum }{\scriptstyle \sum }{\scriptscriptstyle \sum } }_{(f:\hom _{\mathsf {Semigroup}}(A,B))}} {\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x:A)}} \mathsf {isIdentity}_A(x) \to \mathsf {isIdentity}_B(fx)

Naturally, we have a univalent reflexive graph structure on monoid homomorphisms:

\underline {\hom }_{\mathsf {Monoid}}(A,B) :\equiv \bigl \lbrace f:\underline {\hom }_{\mathsf {Semigroup}}(A,B) \mathrel {\bigm \vert } {\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x:A)}} \mathsf {isIdentity}_A(x) \to \mathsf {isIdentity}_B(fx) \bigr \rbrace