I'm trying to solve an exercise in Brezis' Functional Analysis, i.e.,
Let $(\lambda_n)_{n\ge 1}$ be a sequence of positive numbers with $\lim_n \lambda_n = \infty$. Let $V$ be the space of sequences $(u_n)_{n\ge 1}$ such that $$ \sum_{n=1}^\infty \lambda_n |u_n|^2 < \infty. $$ The space $V$ is equipped with the inner product $$ [u, v] := \sum_{n=1}^\infty \lambda_n u_nv_n \quad \forall u,v \in V. $$ Prove that $V$ is a Hilbert space and $V \subset \ell^2$ with compact injection.
There are possibly subtle mistakes that I could not recognize in below attempt. Could you please have a check on it?
We define a $\sigma$-finite measure $\mu$ on $\mathbb N^*$ by $$ \mu (n) := \lambda_n \quad \forall n \in \mathbb N^*. $$
Then $V=L^2(\mathbb N^*, \mu, \mathbb R)$. Then $V$ together with $[\cdot, \cdot]$ is a Hilbert space. Because $\lim_n \lambda_n = \infty$, there is $N \in \mathbb N^*$ such that $\lambda_n \ge 1$ for $n \ge N$. Let $\alpha := \sup_{1 \le n \le N} \frac{1}{\lambda_n} < \infty$. Then for $u \in V$, $$ \begin{align} \sum_{n=1}^\infty |u_n|^2 &= \sum_{n=1}^N |u_n|^2 + \sum_{n=1}^{N+1} |u_n|^2 \\ &\le \alpha \sum_{n=1}^N \lambda_n |u_n|^2 + \sum_{n=1}^{N+1} \lambda_n |u_n|^2 \\ &\le (\alpha+1) \sum_{n=1}^\infty \lambda_n |u_n|^2 . \end{align} $$
Then the linear injection $J:V \to \ell^2, (u_n) \mapsto (u_n)$ is continuous. Let $B$ be the closed unit ball of $V$. Let's prove that $J(B)$ has compact closure in $\ell^2$. Because $\ell^2$ is complete, it remains to prove that $J(B)$ is totally bounded in $\ell^2$. Let $|\cdot|_V$ and $|\cdot|_{\ell^2}$ be the corresponding norms of $V$ and $\ell^2$. Let $u = (u_n) \in B$ and $v = (v_n) \in B$. Then $$ \begin{align} |u|_V^2 &= \sum_{n=1}^\infty \lambda_n |u_n|^2, \\ |Ju|_{\ell^2}^2 &= \sum_{n=1}^\infty |u_n|^2. \end{align} $$
Fix $\varepsilon \in (0, 1)$. Because $\lim_n \lambda_n = \infty$, there is $N \in \mathbb N^*$ such that $\lambda_n \ge \frac{1}{\varepsilon}$ for $n \ge N$. Then $$ \frac{1}{\varepsilon} \sum_{n=N}^\infty |u_n|^2 \le \sum_{n=N}^\infty \lambda_n |u_n|^2 \le 1. $$
Then $\sum_{n=N}^\infty |u_n|^2 \le \varepsilon$ and thus $\sum_{n=N}^\infty |u_n -v_n|^2 \le 4\varepsilon$. It remains to control the set $C:=\{(x_n) \in B : x_n=0 \quad \forall n \ge N\}$. Clearly, $C$ is bounded in $\ell^2$ and contained in a finite-dimensional subspace, so $C$ is totally bounded $\ell^2$. This completes the proof.
Update I have added more explanation below.
Because $C$ is totally bounded, it has an $\varepsilon$-covering $\{x^1, \ldots, x^M\}$. We claim that $\{x^1, \ldots, x^M\}$ is a $5\varepsilon$-covering of $B$. Let $u = (u_n) \in B$. There is $x^k$ for some $k \in \{1, 2, \ldots, M\}$ such that $$ \sum_{n=1}^{N-1} |x^k_n-u_n|^2 \le \varepsilon^2 \le \varepsilon. $$
Because $x^k, u \in B$, we get $\sum_{n=N}^{\infty} |x^k_n-u_n|^2 \le 4\varepsilon$. Then $$ \begin{align} |x^k-u|_V^2 &= \sum_{n=1}^{N-1} |x^k_n-u_n|^2 + \sum_{n=N}^{\infty} |x^k_n-u_n|^2 \\ &\le \varepsilon + 4\varepsilon. \end{align} $$
Clearly, $5\varepsilon$ can be arbitrarily small.