TITLE: Does homotopy equivalence of pairs $f:(X,A)\to(Y,B)$ induce the homotopy equivalence of pairs $f:(X,\bar A)\to(Y,\bar B)$?
QUESTION [6 upvotes]: When we have a homotopy equivalence through a pair 
$f:(X,A)\to (Y, B) $, it is said that we can induce a homotopy equivalence through  a pair $f:(X,\bar A)\to (Y,\bar B) $, where $\bar A$ stands for the closure of A.
Do you know how we can prove this?

REPLY [2 votes]: As the previous posted solution by Marcus M only holds if $X$ and $Y$ are metric spaces, I will provide a more general answer.

Assume $f:(X,A) \to (Y,B)$ is a homotopy equivalence of pairs.
Show that $f:(X,\overline  A) \to (Y,\overline B)$ is a
  homotopy equivalence of pairs, i.e. there exists a $g:(Y,\overline B)
 \to (X,\overline A)$ such that $g \circ f \simeq I_X$ and $f \circ g
 \simeq I_Y$ are homotopies of pairs.

First, we show that $f:(X,\overline  A) \to (Y,\overline B)$ is well defined map of pairs, i.e. $f(\overline A) \subseteq \overline B$. 
As $f$ is continuous, we know that $f(\overline A) \subseteq \overline{f(A)}$. (A proof for this will be provided in the end.) As also per assumption $f(A) \subseteq B$, so $\overline {f(A)}\subseteq \overline B$. Hence in summary $f(\overline A) \subseteq \overline B$.
Now we show that $f:(X,\overline  A) \to (Y,\overline B)$ is a homotopy equivalence pairs.
Per assumption, we know that there is a continuous map $H: X \times I \to X$ such that $H(0,\cdot)=g\circ f$, $H(1,\cdot)=I_X$ and $H(A\times I)\subseteq A$. This homotopy is also homotopy of the same maps, but defined for the pair $(X,\overline A)$, i.e.  $H(\overline A \times I)\subseteq \overline A$ (which we need to check).
But this is exactly the same situation as in the proof of $f(\overline A) \subseteq \overline B$ if we replace $f$ with $H$, $A$ with $A \times I$ and $B$ with $A$.
The proof for the second homotopy of pairs follow analogously.


Lemma: Let $f:X\to Y$ be continuous.
  Then for any subset $S\subseteq X$, it holds that $f(\overline S)\subseteq \overline{f(S)}$.

For contradiction, assume $f(\overline S)\not \subseteq \overline{f(S)}$, i.e. there exists $x \in \overline S$ such that $f(x) \in Y\setminus \overline{f(S)}$, which is open. Hence there exists an open neighborhood $U\subseteq Y\setminus \overline{f(S)}$ of $f(x)$. As $f$ is continuous this implies that $f^{-1}(U)\subseteq X\setminus \overline  S$ is an open neighborhood of $x$. Further, for any $z \in f^{-1}(U)$, $f(z)\in U\subseteq Y\setminus \overline{f(S)}\subseteq Y\setminus f(S)$, thus $z \not \in S$. Therefore, $f^{-1}(U)$ is an open neighborhood of $x$ which does not intersect $S$. But then $x$ cannot be in the closusre of $S$.