Deformation Retract of a Punctured Torus I'm learning about deformation retract and have this problem as an exercise.

My attempt to prove this at this point follows from the definitions: I want to find a retract $r: r\circ\hookrightarrow = id_Y$ such that $\hookrightarrow$$\circ$r $\simeq$ id$_X$. To satisfy the latter condition I will also have to find a function $h(x,t)$ such that $h(x,0) = \hookrightarrow$$\circ r$ and $h(x,1) = id_X$.
My definitions of $r$ and $h$ are as follow:
$\bullet$ Let $x \in X, x = ((a,b), (c,d)), -1\le a, b, c, d \le 1; a,c \neq -1; b,d \neq 0$.
Then $r$ could be taken to be $r(x) = x_Y$, where $x_Y$ is such that 
the distance function $d(x,x_Y) = min(d(x,((a,b),(0,1)), d(x,((1,0),(c,d))$ 
(i.e. for each point $x = ((a,b),(c,d))$, the retract maps it to either $((a,b),(0,1))$ or $((1,0),(c,d))$, depending on which one is closer to $x$).
$\bullet$ $h$ then could be taken to be: $h(x,t) = (1-t)r(x) + tx$
Is this an acceptable answer?
 A: Just for the sake of convenience, we denote $e^{\pi ix}$ to be $x$. W.l.o.g, we set $p=1\times 1$ and by symmetry, we get the result for random $p$. Let $S^1\lor S^1=(S^1\times \{0\})\cup (\{0\}\times S^1)$. Consider map $r: T^2\setminus\{1\times 1\}\to (S^1\times \{0\})\cup (\{0\}\times S^1)$ where $\{0\}\times S^1$ gets map to itself and $r(x\times y)=x\times 0$ for $x\ne 0$. Let $i$ be the inclusion map. It's not hard to see that $r\circ i=r|_{S^1\lor S^1}=$ id$_{S^1\lor S^1}$. $i\circ r=r=\begin{cases} 0\times s\to 0\times s\\ x\times y\to x\times 0\end{cases}$. Consider $H(x\times y, t)=x\times(yt)$ which is a homotopy from $r\circ i\to 1_{T^2\setminus\{p\}}$
A: Let me rephrase this question with the notation $S^1=\{z\in\mathbb{C}\mid |z|=1\}$.

Let $ X = S^1\times S^1 \setminus \{ (-1,-1) \} $ be a punctured torus. Show that $Y = (S^1\times\{i\}) \cup (\{1\}\times S^1)$ is a deformation retract of $X$.

OP suggested the following retraction $r\colon X\to Y$.

For each point $(z_1,z_2)\in X$, the retraction $r$ maps it to either $(z_1,i)$ or $(1,z_2)$, depending on which one is closer to $(z_1,z_2)$.

Actually this retraction is not well-defined. For example, if $z_1=z_2=e^{\pi i/4}$, then $(z_1,z_2)$ has the same distance with $(z_1,i)$ and $(1,z_2)$. Then which one is $r(z_1,z_2)$?
This question is a good exercise for students learning a first course of algebraic topology. I suggest to read "0.1 Construct an explicit deformation retraction of the torus with one point deleted onto a graph consisting of two circles intersecting in a point,  namely,  longitude and meridian circles of the torus" (the 1st page).
