TITLE: Splitting the same idempotent map
QUESTION [5 upvotes]: Just for context

DEFINTION: If $B \stackrel{e}{\rightarrow} B$ is an idempotent map, a splitting of $e$ consists of an object $A$ together with two maps $A \stackrel{s}{\rightarrow} B \stackrel{r}{\rightarrow} A$ with $rs = 1_A$ and $sr =e$

Now, this is the problem I have

Suppose that both $A \stackrel{s}{\rightarrow} B \stackrel{r}{\rightarrow} A$ and $A'\stackrel{s'}{\rightarrow} B \stackrel{r'}{\rightarrow} A'$ split the same idempotent $B \stackrel{e}{\rightarrow} B$. Use these maps to construct an isomorphism $A \stackrel{f}{\rightarrow} A'$

My solution is to define $f=r's$, and its "inverse" $g = rs'$. The problem is that
$$
fg = (r's)(rs') = r(sr)s' = r e s'
$$
so $g$ is not the actual inverse of $f$, and I don't see any other way of defining $f$. Any suggestions?

REPLY [5 votes]: Your solution works (it is, as you observe, practically the only map you can write down given what you have), you just need to keep going (also you dropped a $'$). We have
$$fg = (r's)(rs') = r' e s' = r' (s' r') s' = (r's') (r' s') = \text{id}_{A'}$$
and similarly
$$gf = (rs')(r's) = res = r (sr) s = (rs)(rs) = \text{id}_A.$$
It is maybe worth knowing for context that $A$ is both the equalizer $\text{eq}(e, \text{id}_B)$ and the coequalizer $\text{coeq}(e, \text{id}_B)$ (and in particular splittings exist whenever the ambient category has either finite limits or finite colimits) so uniqueness up to unique isomorphism must be true for abstract reasons.