If every holomorphic function $f$ defined on an open subset $\Omega$ of $\mathbb C$ has a primitive. Is it true that $\Omega$ is simply connected?
I saw this post: If every harmonic function on $\Omega$ has a harmonic conjugate on $\Omega$, then $\Omega$ is simply connected. Then I am curious whether it is true for assuming the existence of primitive.
I think we can decompose an open set into the union of connected components. Then suppose there is a connected component that is not simply connected. By the definition of simply connected, there exists a point $z_0\notin\Omega$ encompassed by a Jordan curve $\gamma$ lying in a small circle which is completely contained in the connected component. Consider the holomorphic function $f=\frac 1{z-z_0}$, it should be clear that $f$ does not have a primitive in the small neighborhood. Contradiction!
Is my proof correct?
Edit: I should have claimed that every connected component of $\Omega$ is simply connected.
It is necessary to assume that your open set is connected. If you consider the union of two disjoint open disks then any analytic function on it has a primitive but the set is not even connected.
Assuming connectedness, you are making things too complicated. Rudin's RCA has a theorem giving various ways of characterizing simply connected regions and this is one of them. If you know that a region is simply connected iff the integral of any analytic function over any closed path in it is $0$ then this result is obvious because the integral of a derivative over a close path is $0$ by the very definition of the integral.