Proof (homotopy is equivalence relation)

  1. $f\simeq_H f \rel A$ via the homotopy $H: X\times [0,1] \to X: (x,t)\mapsto f(x)$, which is continuous: it is a composition of projection onto the first component and then $f$.

  2. If $f\simeq_H g\rel A$, then $\tilde H: X \times [0,1] \to Y: (x,t) \mapsto H(x, 1-t)$ is a homotopy from $g$ to $f$ relative to $A$. It is continuous as $I\to I: t\mapsto 1-t$ is a continuous.

  3. If $f\simeq_H g\rel A$ and $g\simeq_{H'} h\rel A$, then $$ \begin{align*} \tilde H: X \times [0,1] &\to Y \\ (x, t) &\mapsto \begin{cases} H(x, 2t), & 0\leq t\leq \frac12, \\ H'(x, 2t-1), & \frac12\leq t\leq 1 \end{cases} \end{align*} $$ is well-defined as $H(x,1) = g(x) = H'(x,0)$ at $t=\frac12$. It is also continuous by the gluing lemma, since its restrictions on $X\times [0,\frac12]$ and $X\times [\frac12, 1]$ are both continuous.