I have heard that the following is true:
Let $\vec{F}$ be a vector field such that $\nabla \times \vec{F} = \vec{0}$ everywhere on its domain, $D$. Further require that $D$ is simply connected. Then there exists a scalar field $f(x,y,z)$ such that $\vec{F} = \nabla f$.
It's that second portion of my definition, that $D$ needs to be simply connected, that concerns me. Here is my issue:
let's go backwards. Let $f(x,y,z)$ be defined on a domain that is not simply connected. Can I not still compute $\nabla f$? This would be a vector field, and I presume it exists (if I'm wrong here then the next part is also not correct). Assuming the gradient exists on this domain, then wouldn't it have zero curl on that domain? In short, why is it important that my domain be simply connected in order to go back to my scalar field?