Example. Semigroups [01KA]
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}}.