[proofplan]
We factor $q$ and $p$ near $a$ according to their zero orders. After shrinking the neighbourhood, the nonvanishing factor of $q$ has no zeros, so the quotient of the two holomorphic factors is holomorphic and nonzero at $a$. On the punctured neighbourhood where $f$ is defined, this writes $f$ as $(z-a)^{-(s-r)}$ times a [holomorphic function](/page/Holomorphic%20Function) nonzero at $a$, which is exactly the definition of a pole of order $s-r$.
[/proofplan]
custom_env
admin
[step:Factor $q$ and $p$ by their zero orders at $a$]Because $q$ has a zero of order $s$ at $a$, there are an open neighbourhood $V_q \subset U$ of $a$ and a holomorphic function
\begin{align*}
Q: V_q \to \mathbb{C}
\end{align*}
such that $Q(a) \neq 0$ and
\begin{align*}
q(z) = (z-a)^s Q(z)
\end{align*}
for every $z \in V_q$.
We next define the holomorphic factor for $p$. If $r=0$, set $V_p := U$ and define
\begin{align*}
P: V_p \to \mathbb{C}
\end{align*}
by $P(z) := p(z)$; then $P(a)=p(a)\neq 0$. If $r \geq 1$, the hypothesis that $p$ has a zero of order $r$ at $a$ gives an open neighbourhood $V_p \subset U$ of $a$ and a holomorphic function
\begin{align*}
P: V_p \to \mathbb{C}
\end{align*}
such that $P(a) \neq 0$ and
\begin{align*}
p(z) = (z-a)^r P(z)
\end{align*}
for every $z \in V_p$.[/step]
custom_env
admin
[guided]The meaning of a zero of order $s$ is precisely that the first nonzero local factor after removing $(z-a)^s$ is holomorphic and nonzero at $a$. Thus, for $q$, there is an open neighbourhood $V_q \subset U$ of $a$ and a holomorphic map
\begin{align*}
Q: V_q \to \mathbb{C}
\end{align*}
with $Q(a) \neq 0$ such that
\begin{align*}
q(z) = (z-a)^s Q(z)
\end{align*}
for all $z \in V_q$.
For $p$, there are two cases because the theorem allows $p$ not to vanish at $a$. If $r=0$, no power of $z-a$ should be removed, so we put $V_p := U$ and define
\begin{align*}
P: V_p \to \mathbb{C}
\end{align*}
by $P(z):=p(z)$. The hypothesis in this case gives $P(a)=p(a)\neq 0$, and the identity
\begin{align*}
p(z) = (z-a)^0 P(z)
\end{align*}
holds for every $z \in V_p$.
If $r \geq 1$, the hypothesis says that $p$ has a zero of order $r$ at $a$. Hence there are an open neighbourhood $V_p \subset U$ of $a$ and a holomorphic map
\begin{align*}
P: V_p \to \mathbb{C}
\end{align*}
with $P(a)\neq 0$ such that
\begin{align*}
p(z) = (z-a)^r P(z)
\end{align*}
for every $z \in V_p$. In both cases we have produced the same kind of representation for $p$: a power $(z-a)^r$ times a holomorphic factor nonzero at $a$.[/guided]
custom_env
admin
[step:Shrink to a neighbourhood where the remaining denominator does not vanish]
Since $Q$ is holomorphic, it is continuous. Since $Q(a)\neq 0$, there exists an open neighbourhood $V \subset V_p \cap V_q$ of $a$ such that $Q(z)\neq 0$ for every $z \in V$. For $z \in V \setminus \{a\}$, the factorization
\begin{align*}
q(z) = (z-a)^s Q(z)
\end{align*}
and the inequalities $z\neq a$ and $Q(z)\neq 0$ imply $q(z)\neq 0$. Therefore
\begin{align*}
V \setminus \{a\} \subset U \setminus Z(q),
\end{align*}
so $f$ is defined on $V \setminus \{a\}$.
[/step]
custom_env
admin
[step:Write the quotient as a negative power times a nonvanishing holomorphic factor]
Define
\begin{align*}
h: V \to \mathbb{C}
\end{align*}
by
\begin{align*}
h(z) := \frac{P(z)}{Q(z)}.
\end{align*}
Because $P$ and $Q$ are holomorphic on $V$ and $Q$ has no zeros on $V$, the function $h$ is holomorphic on $V$. Also
\begin{align*}
h(a) = \frac{P(a)}{Q(a)} \neq 0.
\end{align*}
For every $z \in V \setminus \{a\}$, using the factorizations of $p$ and $q$ gives
\begin{align*}
f(z) = \frac{p(z)}{q(z)} = \frac{(z-a)^r P(z)}{(z-a)^s Q(z)} = (z-a)^{-(s-r)} h(z).
\end{align*}
[/step]
custom_env
admin
[step:Identify the pole order from the local normal form]
The integer $s-r$ is positive because $r<s$. We have found an open neighbourhood $V$ of $a$ and a holomorphic function $h:V\to\mathbb{C}$ with $h(a)\neq 0$ such that
\begin{align*}
f(z) = (z-a)^{-(s-r)} h(z)
\end{align*}
for every $z \in V\setminus\{a\}$. By the definition of a pole of finite order, $f$ has a pole of order $s-r$ at $a$.
[/step]