While studying Ahlfor's Complex Analysis text, I came upon this theorem:

Theorem II. Suppose that $f(z)$ is analytic at $z_0$, $f(z_0) = w_0$, and that $f(z) - w_0$ has a zero of order $n$ at $z_0$. If $\epsilon > 0$ is sufficiently small, there exists a corresponding $\delta > 0$ such that for all $a$ with $|a - w_0| < \delta$ the equation $f(z) = a$ has exactly $n$ roots in the disk $|z - z_0| < \epsilon$.

I found the proof of this quite easy. However, I then encountered the following:

It is understood that multiple roots are counted according to their multiplicity, but if $\epsilon$ is sufficiently small we can assert that all roots of the equation $f(z) = a$ are simple for $a \neq w_0$. Indeed, it is sufficient to choose $\epsilon$ so that $f'(z)$ does not vanish for $0 < |z - z_0| < \epsilon$

After much thought, I realized that if $p$ is a root of $f$ of multiplicity $n \ge 2$ then $f'(p) = 0$. As a quick proof, $f(z) = (z-p)^ng(z)$ with $g(z)$ nonzero and analytic in a small enough neighborhood of $p$, and so $f'(z) = m(z-p)^{n-1}g(z) + (z-p)^ng'(z)$ so that $f'(a) = a$. Thus all $n$ roots must be simple. $\;\square$

However, I thought that if $f'$ did not vanish on the region $0 < |z - z_o| < \epsilon$ then $f$ must be injective on the region, and so we could not have distinct points $p_1$ and $p_2$ such that $f(p_1) = f(p_2) = a$, i.e. $f(z)-a$ could not have more than one root in the region, let alone $n$ of them!

Where am I mistaken here?

if $f'$ did not vanish on the region $0<|z−z_0|<\epsilon$ then $f$ must be injective on the region
In real analysis, this is a consequence of Rolle's theorem, which does not hold on $\mathbb C$.
Note that $f(z)=z^n$ has a non-vanishing derivative on $0< |z-z_0| < \epsilon$ for all $\epsilon >0$, but for $n \geq 2$ is never injective on this region.
• I see. So does $f' \neq 0$ implying $f$ is locally injective only hold on simply connected neighborhoods such as disks? For example, if $f(z) = z^n$ then $f$ is injective on every disk not containing the origin. I simply read that "analytic function is locally 1-1 whenever its derivative is nonzero" and I am not sure what is meant by "locally" Commented May 11, 2018 at 4:23
• $f(z)=z^n$ is analytic on every disk. What you probably mean is that for each $a \neq 0$ there exists an $r$ such that $f(z)=z^n$ is injective on $|z-a|<r$. Commented May 11, 2018 at 4:27
• @BrevanEllefsen And I think that it is true that if $f$ is analytic at $a$ and $f'(a)\neq 0$ then $f$ is injective on some $|z-a|<r$.But the key is what happens at $a$ not on $0< |z-a|<r$. Commented May 11, 2018 at 4:30