Why $a$ is not an essential singularity and how $f$ can be extended in our online lecture we had the following statement but I don't see exactly why it's true , if anyone could explain me why  it would be appreciated.


We have  $a \in \mathbb{C}$ a complex number and $r \in \mathbb{R}$ with $r>0$. Let $U=\mathbb{D}(a,r)\ _{\diagdown \left\{a \right\}}$ and $f \in O(U)$ a holomorphic function such that $Re(f(z)) \geq 0 \; \forall z \in U$.


And it says that $f$ can be extended ( in a holomorphic function )  all over the disk $\mathbb{D}(a,r)$ and that $a$ isn't a essential singular point. 
Thanks in advance for your help .
 A: The singularity of $f$ at $a$ is either a pole, a removable singularity or an essential singularity.  
If it were a pole of order $n$, you'd have $f(z) = c (z-a)^n + O((z-a)^{n-1})$ for some $c \ne 0$.  By having $z$ approach $a$ from a direction such that $c (z-a)^n$ is on the negative real axis you'd get $\text{Re}(f(z)) < 0$.
If it were an essential singularity, Casorati-Weierstrass theorem would say there is $z$ near $a$ such that $f(z)$ is near, say, $-1$.
The only other possibility is a removable singularity.  That says that $f$ can be extended to be analytic at $a$.
A: Another way which may or may not be easier than @Robert solution is to notice that if $\Re a \ge 0$ then $|a-1| \le |a+1|$ (and of course $|a+1| \ne 0$), so $B=\frac{f-1}{f+1}$ is bounded by $1$ in the punctured disc, hence $B$ extends to an analytic function in the full disc with $B(a) \ne 1$ since even if $B$ constant it cannot be $1$ as $-1 \ne 1$ so $f=\frac{1+B}{1-B}$ extends then to the full disc.
A: Another proof is obtained defining $g(z):=e^{-f(z)}$. From this $|g|\le e^{-\Re(f)}\le 1$, and so $g$ has a removable singularity in $a$. However, if $f$ has either a pole of an essential singularity, $e^f$ has an essential singularity. By contradiction, $f$ must have a removable singularity in $a$
