Retractions and fundamental groups On page 39 of Allen Hatcher's Algebraic topology (page 19 in the pdf document available on Allen Hatcher's website), exercise 16 c), I have the following proof : 
Let $\varphi : S^1 \to S^1 \times D^2$ be a parametrization of the displayed curve. Since this curve is homotopic to a point in $S^1 \times D^2$, $[\varphi] = 0$. If a retraction $r : S^1 \times D^2 \to A$ would exist, then the induced map $r_* : \pi_1(S^1 \times D^2) \to \pi_1(A)$ would be such that $r_*([\varphi]) = r_*([0]) = 0 \in \pi_1(A)$. However, since $r$ is a retraction, it must restrict to the identity on $A$, therefore $r_*([\varphi]) = [\varphi] \neq 0 \in \pi_1(A)$, because $A$ is homeomorphic to a circle and $\varphi$ "goes around it once", thus cannot be a trivial loop.
So that does it for this exercise. It took me a while to figure it out, so I wondered to what extent this argument can be used, and I got stuck somewhere. So the loop that defines $A$, if you untie the knot on the bottom of the picture, it becomes homotopic to a point with no need to self intersect. What if before we tied that knot, we made it go around the torus's "hole" a few times? In other words, what if the curve we began with, after being untied, was going around the torus $n$ times, $n \in \mathbb Z$? (Assume it has only one knot similar to the one shown in the picture.) Call $A_n$ the resulting subspace and $\varphi_n$ the corresponding parametrization.
(I am conscious this is a bit handwavy but it would've taken tremendous amounts of work to make a reasonable online picture...)
In this case, if a retraction onto $A_n$ would exist, then since $\pi_1(S^1 \times D^2) = \pi_1(S^1) \times \pi_1(D^2) \sim \mathbb Z$ (and a loop corresponds to $m \in \mathbb Z$ depending on how many times it goes around the torus, call such a loop $\omega_m$), we have 
$$
[\varphi_n] = r_*([\varphi_n]) = r_*([\omega_n])
$$ 
and note that $[\varphi_n] \in \pi_1(A) \simeq \mathbb Z$ corresponds to $1 \in \mathbb Z$, and $[\omega_n] \in \pi_1(S^1 \times D^2) \simeq \mathbb Z$ correponds to $n$. Unless $n = \pm 1$, there is no group homomorphism from $\mathbb Z \to \mathbb Z$ which maps $n$ to $1$, so we cannot have a retraction if $n \neq \pm 1$. 
But the $n = \pm 1$ case is still weird, I mean, there's a knot in the curve! I don't think there would be a retraction to the curve in this case either, and this is where I am stuck. (Note that this question is not in the book, so I have no idea where it is going.)
I have not even read section 1.2., so I feel I am lacking some tools to understand this question... any ideas? Is there a retraction from $S^1 \times D^2$ to $\varphi_n(S^1)$ when $n = \pm 1$?
I am not looking for hints, I'm more curious for a solution since I don't expect to know how to solve it with what I have.
 A: I think, in your question you mean the situation where the embedding $\varphi_n$ induces an isomorphism of fundamental groups $\pi_1(S^1)\to \pi_1(D^2\times S^1)$. In this case, there is always a retraction. Here is a proof in the case when the image $K$ of the map is a "tame knot", i.e., a knot isotopic to a polygonal one. You notice that both domain $X$ and the range of the map $Y$ are aspherical (have contractible universal covers). Now, you can apply a relative version of Whitehead's theorem that given an isomorphism of fundamental groups of such complexes $\pi_1(Y)\to \pi_1(X)$, there exists a continuous map $f: Y\to X$ inducing this map. This theorem is proven by induction on skeleta and, hence, has a relative version, where you already have a map defined on a subcomplex of $Y=D^2\times S^1$, which, in your case, is the image of $\varphi_n$, and you have to extend it to the rest of $Y$. 
Here is what you do: Triangulate $Y$ so that $K$ is a subcomplex. Extend the identity map $f: K\to K$ to the 0-skeleton arbitrarily. Next, pick a maximal subgraph $T\subset Y^1$ (1-skeleton) which contains $K$ and whose fundamental group is infinite cyclic. (Thus, $T$ is the circle $K$ plus a disjoint union of trees.) Next, for each edge $e$ of $T$ which is not in $K$, extend $f$ (defined on the end-points $p, q$) to be a map sending $e$ to an arc of $K$ connecting $f(p)$ and $f(q)$. Then, each edge $e$ of $Y^1$ which is not in $T$ defines a free generator of $\pi_1(Y^1)$. Choose the extension $f$ to $e$ so that this free 
generator maps trivially to $\pi_1(K)$ under the extension map. Now, we have to extend $f$ to 2-skeleton. By construction, the boundary circle of each 2-dimensional simplex in $Y^2$ maps to a null-homotopic look in $K$. This allows you to extend the map to $Y^2$. Lastly, to extend the map to $Y^3$, you argue as in the proof of Whitehead's theorem (since $\pi_2(K)=0$, the boundary map of every 3-simplex extends continuously). 
I think, this proof generalizes to the case when $K$ is a wild knot, using the fact that a circle is an ANR (absolute neighborhood retract) but I did not think about the details.   
