I was reading Rogawski's Calculus Multivariable and came across the following:
Can every vector field $\textbf{G}$ satisfying $\text{div}(\textbf{G})=0$ be written in the form $\textbf{G}=\text{curl}(\textbf{A})$ for some vector potential $\textbf{A}$? Again, the answer is yes--provided that the domain is a region $\mathcal{W}$ in $\mathbb{R}^3$ that has "no holes," like a ball, cube, or all of $\textbf{R}^3$. The inverse-square field $\textbf{F}_{\text{IS}}=\textbf{e}_r/r^3$ plays the role of vortex field in this setting: Although $\text{div}(\textbf{F}_{\text{IS}})=0$, $\textbf{F}_{\text{IS}}$ cannot have a vector potential becuse its flux through the unit sphere is nonzero as shown in Theorem 2 (the flux over a closed surface of a vector field with a vector potential is always zero by Theorem 2 of Section 17.2). In this case, the domain of $\textbf{F}_{\text{IS}}=\textbf{e}_r/r^2$ is $\textbf{R}^3$ with the origin removed, which "has a hole."
Here the vectorfield $\textbf{F}_{\text{IS}}$ is
$$\textbf{F}_{\text{IS}}=\frac{\textbf{e}_r}{r^2}=\frac{\langle x,y,z\rangle/r}{r^2}=\frac{\langle x,y,z\rangle}{(\sqrt{x^2+y^2+z^2})^3}.$$
My question is what precisely is meant by "no holes"? It's not "simply connected," because $\mathbb{R}^3 \setminus\{\textbf{0}\}$ is simply connected. Does it mean trivial second homology or $\pi_2$? I haven't been able to find any sources that give the technical assumptions needed here. Most just say the implication always holds, and one site said it holds if the domain is simply connected (both of which are clearly false because of the example above).
In slightly more advanced language, we call a "vector field" (actually a differential form, the difference isn't too importnat for this question) with $\text{div}(G) = 0$ to be closed. An exact "vector field" is one where $G = \text{curl}(A)$.
We clearly have that all exact vector fields are closed. When are all closed vector fields exact? This occurs on a Contractible Space (this is the Poincare Lemma). Intutively, a contractible space is one which can be continuously shrunk down into a point.