Identifications of algebraic structures [01KF]
- November 16, 2025
- Jon Sterling
Using the technology of univalent reflexive graphs, we can rapidly characterise identifications of all kinds of algebraic structures. This provides new induction principles, like “To prove something about all groups equipped with a group isomorphism onto G, it suffices to consider just the identity isomorphism G\cong G.”
Example Semigroups [01KA]
- November 15, 2025
- Jon Sterling
A semigroup A is a set \left \lvert {A}\right \rvert together with an associative binary operation \bullet _A on \left \lvert {A}\right \rvert . We can internalise semigroups into a universe (\mathcal {U}, \mathcal {T}) like so:
\mathsf {Semigroup}_{\mathcal {U}} :\equiv {\mathop {\mathchoice {\textstyle \sum }{\textstyle \sum }{\scriptstyle \sum }{\scriptscriptstyle \sum } }_{(A:\mathsf {Set}_{\mathcal {U}})}} {\mathop {\mathchoice {\textstyle \sum }{\textstyle \sum }{\scriptstyle \sum }{\scriptscriptstyle \sum } }_{(\bullet :A\times A\to A)}} {\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x,y,z:A)}} (x \bullet y) \bullet z =_A x\bullet (y\bullet z)To characterise identifications of semigroups, we will construct an appropriate reflexive graph. First of all, consider the following forgetful reflexive graph obtained from the reflexive graph image of the universe:
\underline {\mathsf {Set}}_{\mathcal {U}} :\equiv \{ X:\mathcal {U} / \mathcal {T} \mid \mathsf {isSet}(X) \}Evidently we have \left \lvert {\underline {\mathsf {Set}}_{\mathcal {U}}}\right \rvert \equiv \mathsf {Set}_{\mathcal {U}}. When \mathcal {U} is univalent, then \underline {\mathsf {Set}}_{\mathcal {U}} is univalent too.
Next, we define a displayed reflexive graph over \underline {\mathsf {Set}}_{\mathcal {U}} to classify associative binary operations on a given set.
\begin {aligned} \left \lvert {\underline {\mathsf {AssocBinop}}_{\mathcal {U}}}\right \rvert [A] &:\equiv {\mathop {\mathchoice {\textstyle \sum }{\textstyle \sum }{\scriptstyle \sum }{\scriptscriptstyle \sum } }_{(\bullet :A\times A\to A)}} {\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x,y,z:A)}} (x \bullet y) \bullet z =_A x\bullet (y\bullet z) \\ \Bigl ( {\bullet } \approx ^{\underline {\mathsf {AssocBinop}}_{\mathcal {U}}}_{f:A\approx _{\underline {\mathsf {Set}}_{\mathcal {U}}} B} {\circ } \Bigr ) &:\equiv {\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x,y:A)}} f (x \bullet y) =_B fx \circ fy \\ \mathsf {rx}^{\underline {\mathsf {AssocBinop}}_{\mathcal {U}}}_{A} (\bullet ) &:\equiv \lambda x,y\mathpunct {.} \mathsf {refl}_{x\bullet y} \end {aligned}For a set A, the corresponding component of \underline {\mathsf {AssocBinop}}_{\mathcal {U}} is precisely the following forgetful reflexive graph:
\underline {\mathsf {AssocBinop}}_{\mathcal {U}}[A] \equiv \bigl \{ {\bullet } \colon {\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x,y:A)}} \Delta A \mathrel {\bigm \vert } {\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x,y,z:A)}} (x\bullet y)\bullet z =_A x\bullet (y\bullet z) \bigr \}Because A is assumed to be a set and propositions are closed under products, it follows that \underline {\mathsf {AssocBinop}}_{\mathcal {U}} is univalent.
Now, we define consider total reflexive graph:
\underline {\mathsf {Semigroup}}_{\mathcal {U}} :\equiv \underline {\mathsf {Set}}_{\mathcal {U}}.\underline {\mathsf {AssocBinop}}_{\mathcal {U}}We evidently have \left \lvert {\underline {\mathsf {Semigroup}}_{\mathcal {U}}}\right \rvert \equiv \mathsf {Semigroup}_{\mathcal {U}}. If \mathcal {U} is univalent, then so is \underline {\mathsf {Semigroup}}_{\mathcal {U}}.
Example Semigroup homomorphisms [01KU]
- November 20, 2025
- Jon Sterling
Let A and B be semigroups. A homomorphism of semigroups from A to B is just a function on the underlying sets that commutes with the binary operation.
\hom _{\mathsf {Semigroup}}(A,B) :\equiv {\mathop {\mathchoice {\textstyle \sum }{\textstyle \sum }{\scriptstyle \sum }{\scriptscriptstyle \sum } }_{(f:\left \lvert {A}\right \rvert \to \left \lvert {B}\right \rvert )}} {\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x,y:\left \lvert {A}\right \rvert )}} f(x\bullet _A y) =_{\left \lvert {B}\right \rvert } fx\bullet _A fyWe can exhibit a univalent reflexive graph structure on semigroup homomorphisms as follows:
\underline {\hom }_{\mathsf {Semigroup}}(A,B) :\equiv \bigl \lbrace f : {\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x:\left \lvert {A}\right \rvert )}}\Delta \left \lvert {B}\right \rvert \mathrel {\bigm \vert } {\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x,y:\left \lvert {A}\right \rvert )}} f(x\bullet _A y) =_{\left \lvert {B}\right \rvert } fx\bullet _A fy \bigr \rbraceExample Identity elements in semigroups [01KB]
- November 15, 2025
- Jon Sterling
Let A be a semigroup. An identity element for A is defined to be an element \epsilon :\left \lvert {A}\right \rvert satisfying the following condition:
\mathsf {isIdentity}_A(\epsilon ) :\equiv {\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x:\left \lvert {A}\right \rvert )}} (x\bullet _A \epsilon =_{\left \lvert {A}\right \rvert } x) \times (\epsilon \bullet _A x =_{\left \lvert {A}\right \rvert } x)Of course, because \left \lvert {A}\right \rvert is a set, \mathsf {isIdentity_A(\epsilon )} is also a proposition. We will however that not only is the condition of being an identity element a proposition, but in fact the type of identity elements \mathsf {IdentityElt}(A) :\equiv {\mathop {\mathchoice {\textstyle \sum }{\textstyle \sum }{\scriptstyle \sum }{\scriptscriptstyle \sum } }_{(\epsilon :\left \lvert {A}\right \rvert )}}\mathsf {isIdentity}_A(\epsilon ) overall is a proposition. Fixing \epsilon ,\epsilon ':A and h_\epsilon :\mathsf {isIdentity}_A(\epsilon ) and h_{\epsilon '}:\mathsf {isIdentity}_A(\epsilon ) we must identify \left \langle \epsilon ,h_\epsilon \right \rangle with \left \langle \epsilon ',h_{\epsilon '}\right \rangle . By the above, it suffices to verify \epsilon =_{\left \lvert {A}\right \rvert }\epsilon '. We note that by h_\epsilon and h_{\epsilon '} we have:
\epsilon =_{\left \lvert {A}\right \rvert } \epsilon \bullet _A \epsilon ' =_{\left \lvert {A}\right \rvert } \epsilon 'Hence, \mathsf {IdentityElt}(A) is a proposition for any semigroup A.
Example Monoids [01KC]
- November 15, 2025
- Jon Sterling
A semigroup is called a monoid when it has an identity element. The type of monoids in a given universe \mathcal {U} is therefore defined like so:
\mathsf {Monoid}_{\mathcal {U}} :\equiv {\mathop {\mathchoice {\textstyle \sum }{\textstyle \sum }{\scriptstyle \sum }{\scriptscriptstyle \sum } }_{(A:\mathsf {Semigroup}_{\mathcal {U}})}} \mathsf {IdentityElt}(A)The appropriate reflexive graph structure for monoids is, then, the forgetful one:
\underline {\mathsf {Monoid}}_{\mathcal {U}} :\equiv \bigl \{ A:\underline {\mathsf {Semigroup}}_{\mathcal {U}} \bigm \vert \mathsf {IdentityElt}(A) \bigr \}When \mathcal {U} is univalent, so is \underline {\mathsf {Monoid}}_{\mathcal {U}}.
Example Monoid homomorphisms [01KV]
- November 20, 2025
- Jon Sterling
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 \rbraceExample Inverse elements in semigroups [01KD]
- November 15, 2025
- Jon Sterling
Let A be a semigroup. An inverse to an element u:\left \lvert {A}\right \rvert is defined to be some element \bar {u}:\left \lvert {A}\right \rvert such that both u\bullet _A \bar {u} and \bar {u}\bullet _A u are identity elements.
(So, evidently, as soon as some element has an inverse, the A is a monoid).
Formally, we define the following, which is a family of proposition:
\mathsf {isInverse}_A(u,\bar {u}) :\equiv \mathsf {isIdentity}_A(u\bullet _A \bar {u}) \times \mathsf {isIdentity}_A(\bar {u}\bullet _A u)We can define the type of inverses of a specific element:
\mathsf {inverseOf}_A(u) :\equiv {\mathop {\mathchoice {\textstyle \sum }{\textstyle \sum }{\scriptstyle \sum }{\scriptscriptstyle \sum } }_{(\bar {u}:\left \lvert {A}\right \rvert )}} \mathsf {isInverse}_A(u,\bar {u})We will now show that \mathsf {inverseOf}_A(u) is a proposition. Fixing any two inverses \bar {u},\bar {u}' of u it suffices to check that \bar {u} =_{\left \lvert {A}\right \rvert } \bar {u}'. Because \bar {u}'\bullet _A u and \bar {u}\bullet _A u are both identity elements, they are equal:
\bar {u}'\bullet _A u =_{\left \lvert {A}\right \rvert } \bar {u}\bullet _A uBy the action on identifications, we may multiply either side with \bar {u}:
(\bar {u}'\bullet _A u)\bullet _A \bar {u} =_{\left \lvert {A}\right \rvert } (\bar {u}\bullet _A u)\bullet _A \bar {u}By associativity, we have:
\bar {u}'\bullet _A (u\bullet _A \bar {u}) =_{\left \lvert {A}\right \rvert } \bar {u}\bullet _A (u\bullet _A \bar {u})But u\bullet _A\bar {u} is an identity element so we have \bar {u}'=\bar {u}. Therefore, \mathsf {inverseOf}_A(u) is a proposition.
Example Groups [01KE]
- November 15, 2025
- Jon Sterling
A group is a monoid that has all inverses.
\mathsf {Group}_{\mathcal {U}} :\equiv {\mathop {\mathchoice {\textstyle \sum }{\textstyle \sum }{\scriptstyle \sum }{\scriptscriptstyle \sum } }_{(A:\mathsf {Monoid}_{\mathcal {U}})}} {\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x:\left \lvert {A}\right \rvert )}} \mathsf {inverseOf}_A(x)We consider the following forgetful reflexive graph structure for groups:
\underline {\mathsf {Group}}_{\mathcal {U}} :\equiv \bigl \{ A:\underline {\mathsf {Monoid}}_{\mathcal {U}} \mathrel {\bigm \vert } {\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(x:\left \lvert {A}\right \rvert )}} \mathsf {inverseOf}_A(x) \bigr \}When \mathcal {U} is univalent, then so is \underline {\mathsf {Group}}_{\mathcal {U}}.
Example Group homomorphisms [01KW]
- November 20, 2025
- Jon Sterling
Any semigroup homomorphism that preserves identity elements preserves any inverses that exist.
Proof.
- November 20, 2025
- Jon Sterling
Let X,Y be semigroups, and suppose that f:X\to Y is a semigroup homomorphism that moreover preserves identity elements. Now let u,\bar {u} be mutually inverse in X. We must check that fu and f\bar u are mutually inverse in Y. We have fu \bullet _Y f\bar {u} = f(u\bullet _X \bar {u}) and f\bar {u}\bullet _Y f u = f(\bar {u}\bullet _X u)\text {.}
By assumption, all of the above are identity elements in Y.
It follows, therefore, that the correct notion of homomorphism between groups is the monoid homomorphism without any additional conditions.
\begin {aligned} \hom _{\mathsf {Group}}(X,Y) &:\equiv \hom _{\mathsf {Monoid}}(X,Y) \\ \underline {\hom }_{\mathsf {Group}}(X,Y) &:\equiv \underline {\hom }_{\mathsf {Monoid}}(X,Y) \end {aligned}