Example. A displayed reflexive graph for endofunctions [01IB]

We recall our definition of unary algebra in a universe \mathcal {U}, which we do not necessarily assume univalent here.

\mathsf {UnaryAlg}_{\mathcal {U}} :\equiv {\mathop {\mathchoice {\textstyle \sum }{\textstyle \sum }{\scriptstyle \sum }{\scriptscriptstyle \sum } }_{(A:\mathcal {U})}} A\to A

We will construct a displayed reflexive graph whose total reflexive graph \mathsf {Endofun}_{\mathcal {U}} will be exactly the desired notion of equivalence of unary algebras, i.e.:

\mathsf {UnaryAlgEquiv}(A,B) :\equiv {\mathop {\mathchoice {\textstyle \sum }{\textstyle \sum }{\scriptstyle \sum }{\scriptscriptstyle \sum } }_{(h:\mathsf {Equiv}(A,B))}} h\circ \mathsf {f}_{A}\sim \mathsf {f}_{B}\circ h

Because the first component above needs to be an equivalence of types, we know what the base reflexive graph needs to be: the reflexive graph image \mathcal {U} / \mathcal {T}! To construct the displayed reflexive graph \mathsf {Endofun}_{\mathcal {U}} over \mathcal {U} / \mathcal {T}, we proceed as follows:

\begin {aligned} &A:\mathcal {U} \\ &\vdash \left \lvert {\mathsf {Endofun}_{\mathcal {U}}}\right \rvert [A] :\equiv A\to A \\[12pt] & A,B:\mathcal {U}; e:\mathsf {Equiv}(A,B), f_A:A\to A, f_B:B\to B \\ &\vdash \left (f_A\approx ^{\mathsf {EndoFun}_{\mathcal {U}}}_{e} f_B\right ) :\equiv e\circ f_A \sim f_B\circ e \\[12pt] &A:\mathcal {U}, f_A:A\to A \\ &\vdash \mathsf {rx}^{\mathsf {EndoFun}_{\mathcal {U}}}_{A}{f_A} :\equiv \lambda x\mathpunct {.} \mathsf {refl}_{f_Ax} \end {aligned}