}
\fi
-% The identity operator/arrow on its argument.
+% The identity function/arrow on its argument.
\newcommand*{\identity}[1]{ \operatorname{id}_{{#1}} }
+\ifdefined\newglossaryentry
+ \newglossaryentry{identity}{
+ name={\ensuremath{\identity{X}}},
+ description={the identity function or arrow on $X$},
+ sort=i
+ }
+\fi
+
% The composition of two arrows/functions. For example, the
% composition of g with f is \compose{g}{f}\of{x} === g\of{f\of{x}}.
\newcommand*{\compose}[2]{ {#1}\circ{#2} }