On a weaker version of homotopy equivalence between topological spaces Consider two topological spaces $X$ and $Y$. 
The notion of homotopy equivalence between $X$ and $Y$ is defined as a pair of continuous maps $f:X\to Y$ and $g:Y\to X$ such that $f\circ g$ and $g\circ f$ are homotopic to the identities. 
But what if we weaken the definition a little bit, by considering the following "weaker" homotopy equivalence between $X$ and $Y$ :  it is defined as a pair of pairs of continuous maps, $(f,g)$ and $(f',g')$, where $f,f':X\to Y$, and $g,g':Y\to X$ such that $g\circ f$ is homotopic to $Id_X$ and $f'\circ g'$ is homotopic to $Id_Y$. 
I'm asking this question because I don't see why intuitively we would require $f'$ and $g'$ to be actually equal to $f$ and $g$.
Would this definition give an interesting notion of homotopy equivalence, or would this just coincide with the usual definition ? Or would this be simply too weak to do anything with it ?
 A: Saying that there are maps $f \colon X \to Y$ and $g \colon Y \to X$ such that $g f$ is homotopic to $\mathrm{id}_X$ means that $X$ is a homotopy retract of $Y$. (By the way, we say that maps are homotopic not homotopy equivalent.) In your situation you have two spaces that are homotopy retracts of each other and it turns out that they need not be homotopy equivalent.
Let $T^k$ be the $k$-torus (the product of $k$ copies of $S^1$). Set $X = \bigsqcup_{k \ge 0} T^k$ and $Y = \bigsqcup_{k \ge 1} T^k$. Let $f \colon X \to Y$ map each $T^k$ onto $T^k \times \{ 1 \} \subset T^{k + 1}$, this has a (strict) retraction that is given by projections $T^{k + 1} \to T^k$ (on the first $k$ coordinates). Let $g' \colon Y \to X$ map each $T^k$ identically onto $T^k$, it also has a (strict) retraction that just maps $T^0$ anywhere. However, $X$ and $Y$ are not homotopy equivalent since $X$ has a contractible component, but $Y$ does not.
A: In any category, we can say that a biretraction between objects $X$ and $Y$ is a system of maps $(f,g,f',g')$ with $gf=1_X$ and $f'g'=1_Y$, and we can say that two objects are biretractible if there is a biretraction between them.  Biretractions can be composed and reversed in an obvious way, so biretractibility is an equivalence relation.   
We say that a biretraction "is an isomorphism" if $f$, $g$, $f'$ and $g'$ are isomorphisms, or equivalently $fg=1_Y$ and $g'f'=1_X$.  
In any category with good finiteness properties, it will work out that every biretraction is an isomorphism.  For example, in the category of finite-dimensional vector spaces over a field this follows easily from consideration of dimensions, and a slightly harder argument gives the same conclusion for finitely generated modules over a Noetherian ring.  (A standard lemma shows that any surjective endomorphism of such a module is an isomorphism.) Now consider the homotopy category of those simply connected CW complexes $X$ for which all homology groups $H_k(X)$ are finitely generated.  Any biretraction in this category will give a biretraction of homology groups, which will necessarily be an isomorphism, so the original biretraction is an isomorphism by Whitehead's theorem.  Thus, biretractibility is the same as homotopy equivalence in this context, and many similar contexts.
Of course, Karol's example has no good finiteness properties and so is not covered by this analysis.
For a slightly different example, in the category of (possibly infinite) sets, a biretraction need not be an isomorphism, but nonetheless biretractible objects are isomorphic, by the Schröder–Bernstein theorem.
