Is this complex analysis proof rigorous? I was reading Complex Analysis by Serge Lang. The Theorem 1.1 of the third chapter states:

Let $U$ be a connected open set, and let $f$ be a holomorphic function on $U$. If $f^{\prime}=0$ then $f$ is a constant.

It was proven by considering a curve $\gamma$ and showing that $f(\alpha)=f(\beta)$, where $\alpha$ and $\beta$ are the points connected by $\gamma$ and the function $t\to f(\gamma (t))$ is differentiable. Next it shows that for all the points $\alpha, z_0, z_1, \ldots , z_n, \beta$, where $z_i$ is a end and a star point of two curves on a path, $f(z_i)=f(\alpha)$. In other words, if you take the derivative of a path, it's constant on every point joining two curves. Then it claims that this proves the theorem.
Somehow this feels a bit odd since as I understood it, we would have to consider every possible path on the set $U$ to prove that $f$ is constant. Is this really rigorous? Thanks in advance.
 A: That depends on the definition of connectedness. It looks like you're using the path-connected using differentiable curves:

A set U is connected if for any two $a, b\in U$ there exists a differentiable function $\gamma: [0,1]\to U$ such that $a=\gamma(0)$ and $b=\gamma(1)$.

Also note that we use the definition of a function being constant:

A function $f$ is said to be constant on $U$ if for any two $a,b\in U$ we have $f(a)=f(b)$

You don't have to check along all possible paths since the fact that by selecting two points $a$ and $b$ and a path $\gamma$ between them implies that $f(a)=f(b)$ then another path $\tilde \gamma$ between them wouldn't alter anything since the fact that $f(a)=f(b)$ has been established.
A: Yes, it is rigorous. And he doesn't have to consider evey possible path in $U$ (and, if he did, why would that make it non-rigorous?). For each two points $\alpha$ and $\beta$, he considers a path from $\alpha$ to $\beta$. That's all.
A: Since you asked here's an alternative proof. It uses the topological definition of connectedness: a topological space is connected iff its only closed and open sets are the trivial ones. It also uses the calculus fact that a continuous function $f\colon[a, b]\to \mathbb C$ with vanishing derivative on $(a, b)$ is constant. (In calculus, one considers $f\colon [a,b]\to \mathbb R$, but there's no loss of generality, as it suffices to apply this fact to the real and the imaginary part).
Let $U\subset \mathbb C$ be open and let $f\colon U\to \mathbb C$ be (real or complex) differentiable and such that $f'(z)=0$ for all $z\in U$. Let $a\in U$ and 
$$S=\{z\in U\ :\ f(z)=f(a)\}.$$ 
The set $S$ is obviously closed. We show that $S$ is also open and so, since $a\in S$, the only possibility is that $S=U$, that is, $f$ is constant. Let $z\in U$. Since $U$ is open there exists an open disc $D$ such that 
$$z\in D\subset U.$$ 
For all $w\in D$, the segment with extremes in $z$ and $w$ lies entirely in $D$. We parametrize it as 
$$\gamma(t)=z+t(w-z),\qquad t\in[0, 1].$$ 
The composition $f\circ \gamma$ defines a one-variable function with derivative 
$$
\frac{d}{dt} (f\circ \gamma)(t) = f'( z+t(w-z) )(w-z) =0.$$ 
And so $f\circ \gamma$ is a constant, which implies that $f(z)=f(w)$. Since $w$ is arbitrary, $f$ is constant on $D$, which means that $D\subset S$. We have proven that $S$ is open. $\square$. 

Note that this proof is exactly the same as Lang's, only that it does not consider paths but only small segments (in technical words, it is a "local" proof). 
