Solution (source code)

= Solution

Use the assumed separability of the <Hilbert space> to choose a countable <Hilbertian basis> $(e_j)$. For $\|f_n\|\le M$, every scalar sequence $\langle f_n,e_j\rangle$ is bounded. Repeated extraction followed by the <diagonal subsequence argument> gives one subsequence with all these coordinates converging, say to $a_j$. The <Bessel inequality> gives $\sum_{j\le N}|a_j|^2\le M^2$ for every $N$, so $g=\sum_ja_je_j$ exists and $\|g\|\le M$.

For $h\in H$, let $h_N$ be its finite basis truncation. Coordinate convergence gives $\langle f_{\varphi(n)}-g,h_N\rangle\to0$, while the <Cauchy-Schwarz inequality> bounds the remaining inner product by $2M\|h-h_N\|$, uniformly in $n$. First choose $N$ large, then $n$ large. Thus
$$
\boxed{f_{\varphi(n)}\rightharpoonup g.}
$$
This proves the asserted sequential conclusion. To obtain actual compactness for the <weak topology>, note that on a bounded ball it is induced by the metric
$$
d(v,w)=\sum_{j=1}^\infty2^{-j}\frac{|\langle v-w,e_j\rangle|}{1+|\langle v-w,e_j\rangle|}.
$$
Finite coordinates and the uniformly small tail show that $d$ gives coordinate convergence; uniform boundedness of the ball extends this to every inner product as above. Hence this metric induces exactly the restricted <weak topology>. In a <metric space>, sequential compactness implies compactness. The closed unit ball is therefore \b[weakly compact], and the limit remains inside it.