Artificial intelligent assistant

$f^2$ holomorphic polynomial on the disc, $f$ entire, then $f$ is a polynomial. I know this question will look similar to this link's question: _=_ However, I am not entirely satisfied with either answer here. The first answer uses a fact we have not proven in class, and the second one is a little ambiguous and unclear to me (Why could we not have both roots of $a$? And why does the newly defined function have a zero at $z_{n_j}$?) Anyway, my question is, if $f$ is an entire function, and $f^2$ is a holomorphic polynomial on the open unit disc in $\Bbb C$, then prove that $f$ is in fact a polynomial. I am specifically trying to replicate, with perhaps more clarity, the second answer in the link above. Can any expound on that solution?

By uniqueness of analytic continuation, $f^2$ is globally a polynomial. Factor $f^2$ into linear factors. Each linear factor must occur to an even power since the zeros of $f^2$ are the same as the zeros of $f$, with twice the order. So $f^2=\lambda\cdot\prod_i(z-z_i)^{2n_i}$

Define $g=f/\prod_i(z-z_i)^{n_i}$. Then $g$ is an entire function and $g^2=\lambda$. There are two possible square roots of $\lambda$, which as a set have the discrete topology, so since $g$ is continuous on all of $\mathbb{C}$, $g$ is constant, taking just one of the square roots of $\lambda$ as it's value. Hence $f(z)=\sqrt{\lambda}\cdot\prod_i(z-z_i)^{n_i}$ is a polynomial.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 0d29fe3465d693f5ce2464526ff9845e