Example. Inverse elements in semigroups [01KD]

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 u

By 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.