Under what conditions may the left inverse of a morphism (which is not the identity) be implied from the following relation? Suppose we are given a category C and objects $c_{0}, c_{1}$ and morphisms $f: c_{0} \rightarrow c_{1}$ and $g: c_{1} \rightarrow c_{0}.$ Assume that $g \circ f = id_{c_{0}}$ and we have the equation $$f\circ g \circ f = id_{c_{1}}f.$$ Can we infer that $f\circ g = id_{c_{1}}$ from this? Otherwise what conditions would give rise to such a statement? I am uncertain about what we can infer here.
 A: Well because $(g \circ f) = id_{c_0}$, we know that $g$ is a retraction and $f$ is a section. So then the question is what can we say in general about $f \circ g$ from this?
Well in that case we know that $f \circ g$ must be idempotent, because $(f \circ g) \circ ( f \circ g) = f \circ (g \circ f) \circ g = f \circ g$.
Likewise $f \circ g \circ f = f \circ (g \circ f) = f \circ id_{c_0} = id_{c_1} \circ f = f$. So the identity you claim is always true, but in general that is the most we can say, i.e. there may be other idempotent functions $c_1 \to c_1$ besides $id_{c_1}$, so knowing that $(f \circ g)$ is idempotent is not enough to say that it is the identity on $c_1$.
OK, so then the question reduces to when an idempotent morphism $p: c_1 \to c_1$ is actually the identity morphism? Well note that if $p$ is the identity morphism, then clearly $p \circ p = id_{c_1}$, i.e. $p^{-1}$ exists and $p=p^{-1}$, so that is necessary. At the same time, $p^{-1}$ exists and $p = p^{-1}$  is also sufficient, because then for any morphism $h: c_2 \to c_1$, we have $h = id_{c_1} \circ h = p^{-1} \circ p \circ h = p \circ p \circ h = p \circ h$. Likewise you can show that for any morphism $k: c1 \to c_3$ that $k = k \circ p$. So then $p$ must equal $id_{c_1}$.
Also note that when we have that $f \circ g = id_{c_1}$, then $f$ is a retraction and $g$ is a section, i.e. $f$ is both a retraction and a section (so an isomorphism) and $g$ is both a retraction and a section (so an isomorphism), i.e. $f$ and $g$ are both isomorphisms. So this would also be a necessary and sufficient characterization.
In any case I would really recommend reading Conceptual Mathematics by Lawvere and Schanuel (here is a link for free, or if you want to buy a copy of the book). That's where I learned all of this and it has a lot of really easy but still really helpful practice problems, plus clarifies the intuition really well. In particular check out section 5 of Part II.
