I want to verify the proof of this Lemma:
Lemma: If a real analytic function $g$ has infinitely many real zeros, then there exist no $w∈ℝ$ such that the fiber $g⁻¹(w)$ is finite.
Proof: Since the zeros of $g$ are isolated, then there exist a bijection between the zero set $Z(g)$ of $g$ and $ℤ$. Thus, we can identify $Z(g)$ by integers. For every $n$, let $I_{n}=(n,n+1)$. If $w>0$ and $g>0$ on some $I_{n}$, then $g>0$ on each interval $I_{n+2k}$ and the supremum of $g$ on $I_{n+2k}$ goes to infinity when $k→∞$. Assume that this maximum is at least $w$ for every $k≥k_{w}$ and let $k≥k_{w}$. Then, $g(n+2k)=0$ and $g(n+2k+w_{k})≥w$ for some $0≤w_{k}≤1$. By the intermediate value theorem, there exists $s_{k}$ in the interval $(n+2k,n+2k+w_{k}]$ such that $g(s_{k})=a$. Hence ${s_{k}:k≥k_{a}}⊂g⁻¹(a)$, which is infinite. The same method for $w<0$.
Okay.
Correct so far.
That's a bit fishy, but I guess we can let that pass as "abuse of notation".
$x \mapsto x^2\cdot \cos x$ begs to differ.
Why should it? $\frac{1}{1+x^2}$
If the preceding parts were okay, that would be too, if we accept the abuse of notation.
What is $a$, suddenly?
Are there set braces missing? $\{s_k : k \geqslant k_a \} \subset g^{-1}(a)$? That would make at least notational sense.
Well, ...
I don't see that it could be fixed, since the assertion is false. There are real-analytic functions $g$ with infinitely many zeros such that $g^{-1}(w)$ is finite for some $w$.