In the answer to this post, the following fact seems implicitly used:
Suppose $f: \mathbb{C} \to \mathbb{C}$ is entire. Further, suppose $f$ is a bijection $\mathbb{R} \to \mathbb{R}$ and $z$ is real $\iff$ $f(z)$ is real. Then either $f(z)$ is a polynomial, or $f(1/z)$ has an essential singularity at $z=0$.
Is this true? I only learned about essential singularities a few days ago, so I'm lacking intuition.
My work
Certainly, polynomials may have the stated property; and if $f$ is a polynomial, $f(1/z)$ has a pole at zero.
Now suppose $f$ is not a polynomial. Since $f$ is entire, it equals its Laurent series at $0$, which is not a polynomial. We want to say something about $f(1/z)$.
Entirety of $f$ $\implies$ $f$ can only have non-negative order terms in its Laurent series. As $f$ is not a polynomial, there are infinitely many such terms. Then $f(1/z)$ has infinitely many negative-order terms. This implies $f(1/z)$ has an essential singularity. (This is something I know from lectures.)
Is my proof sound?