We consider $f:\hat{\mathbb{C}}\rightarrow \hat{\mathbb{C}}$ which is holomorphic on $\mathbb{C}$ and has a continuous extension to $\infty$. Then it follows that $f$ is holomorphic on $\hat{\mathbb{C}}$.
Does the following argument work as a proof? What are the details needed for a complete proof?
We consider the following cases:
If $f$ is constant on $\mathbb{C}$ then $\lim_{z\rightarrow\infty} f(z)=constant$ i.e. $f$ is constant on $\hat{\mathbb{C}}$.
If $f$ is non-constant on $\mathbb{C}$ then it is unbounded by Liouville. So $\lim_{z\rightarrow\infty} f(z)=\infty$ (since $f$ has a continuous extension to $\infty$). The set of zeros of $f$ is a discrete subset of $\hat{\mathbb{C}}$ hence a finite set. Let $g$ a polynomial with the same zeros and multiplicities as $f$ and consider $h=\frac{f}{g}$. The conclusion shouldn't be that $h$ is constant and $f$ is a polynomial? For this, the argument is that $h$ is an entire bounded function?
The map $\hat f:\hat {\mathbb C}\to \hat{\mathbb C}$ obtained by defining $\hat f(\infty)=\infty$ is continuous.
To prove that $\hat f$ is holomorphic at $\infty$ means that the continuous function $g$ defined near $0$ by $g(w) =\frac {1}{f(\frac 1w)}$ for $w\neq 0$ and $g(0)=0$ is holomorphic.
But this follows from Riemann's removable singularities theorem acording to which a continuous function on a domain that is holomorphic outside a point of that domain is actually holomorphic on the whole domain.