[proofplan]
The forward direction is immediate from the [Fundamental Theorem of Contour Integration](/theorems/339): if $F' = f$, every closed-path integral vanishes. The reverse direction constructs $F(z) = \int_\sigma f(w) \, dw$ by integrating from a fixed basepoint $a$ along any path $\sigma$ to $z$. The vanishing hypothesis guarantees path-independence, and holomorphicity of $F$ follows by differentiating the integral over a small segment.
[/proofplan]
[step:Forward direction: antiderivative implies vanishing closed-path integrals]
If $F' = f$ on $U$, then for any closed piecewise $C^1$ path $\gamma$ in $U$, the [Fundamental Theorem of Contour Integration](/theorems/339) gives
\begin{align*}
\int_\gamma f(z) \, dz = F(\gamma(b)) - F(\gamma(a)) = 0,
\end{align*}
since $\gamma(b) = \gamma(a)$.
[/step]
[step:Reverse direction: construct the antiderivative by integrating from a basepoint]
Suppose $\int_\gamma f(z) \, dz = 0$ for every closed piecewise $C^1$ path in $U$. Fix a basepoint $a \in U$. Since $U$ is a domain (connected and open), for any $z \in U$ there exists a piecewise $C^1$ path $\sigma$ in $U$ from $a$ to $z$. Define
\begin{align*}
F(z) = \int_\sigma f(w) \, dw.
\end{align*}
**Path-independence.** If $\sigma_1, \sigma_2$ are two paths from $a$ to $z$, then $\sigma_1 * \overline{\sigma_2}$ is a closed path, so $\int_{\sigma_1} f - \int_{\sigma_2} f = \int_{\sigma_1 * \overline{\sigma_2}} f = 0$. Hence $F(z)$ is well-defined.
[/step]
[step:Verify holomorphicity of $F$ by computing the difference quotient]
For $z \in U$, choose $\varepsilon > 0$ with $B(z, \varepsilon) \subseteq U$. For $|h| < \varepsilon$, take the path from $a$ to $z$ followed by the straight segment $[z, z+h]$. By path-independence:
\begin{align*}
F(z+h) - F(z) = \int_{[z, z+h]} f(w) \, dw = \int_0^1 f(z + th) \cdot h \, d\mathcal{L}^1(t).
\end{align*}
Therefore:
\begin{align*}
\frac{F(z+h) - F(z)}{h} - f(z) = \int_0^1 \bigl(f(z+th) - f(z)\bigr) \, d\mathcal{L}^1(t).
\end{align*}
Since $f$ is [continuous](/page/Continuity) at $z$, for any $\varepsilon' > 0$ there exists $\delta > 0$ such that $|f(z+th) - f(z)| < \varepsilon'$ whenever $|h| < \delta$ (uniformly in $t \in [0,1]$, since $|th| \leq |h| < \delta$). Therefore
\begin{align*}
\left|\frac{F(z+h) - F(z)}{h} - f(z)\right| \leq \int_0^1 |f(z+th) - f(z)| \, d\mathcal{L}^1(t) < \varepsilon'.
\end{align*}
Taking $h \to 0$ gives $F'(z) = f(z)$.
[guided]
The construction $F(z) = \int_a^z f$ mirrors the real-variable proof of the Fundamental Theorem of Calculus.
The two main issues are:
(1)
**Path-independence.** In $\mathbb{R}$, there is only one path from $a$ to $z$ (up to parametrisation), so the integral is automatically well-defined.
In $\mathbb{C}$, there are infinitely many paths, and the integral could depend on the choice.
The hypothesis $\int_\gamma f = 0$ for all closed $\gamma$ is exactly what eliminates this ambiguity: any two paths from $a$ to $z$ form a closed loop, and the integral over that loop vanishes.
(2)
**Differentiating the integral.** We compute $F(z+h) - F(z)$ by integrating $f$ along the short segment $[z, z+h]$.
The difference quotient becomes $\frac{1}{h}\int_0^1 f(z+th) \cdot h \, d\mathcal{L}^1(t) = \int_0^1 f(z+th) \, d\mathcal{L}^1(t)$, and [continuity](/page/Continuity) of $f$ ensures this converges to $f(z)$ as $h \to 0$.
The uniform bound $|th| \leq |h|$ for $t \in [0,1]$ ensures the convergence of the integrand is uniform in $t$, justifying passage of the limit inside the integral.
[/guided]
[/step]