For a twice continuously differentiable function, the curl of its gradient vanishes. In components, because the second derivatives are symmetric in while the Levi-Civita symbol is antisymmetric. Thus adding a gradient to a vector potential preserves the represented curl. No topological assumption is needed for this identity, unlike the converse assertion that every curl-free vector field has a global potential.
New to topics? Read the docs here!