# Proof that l2 has a countable and dense subset

this is my first question and I hope I don't make any relevant mistakes. For a little bit of context, in my real analysis homework I have the following problem.

Show that the subset D $$\subset$$ $$l_2$$ composed by all the sequences $$(x_n)$$ with $$x_n\neq0$$ being a rational number for a finite number of indexes, is countable and dense in $$l_2$$

Here the set $$l_2$$ is the set of all real number sequences $$(x_n)$$ that satisfy: $$\sum_{n=1}^{\infty}|x_n|^2\leq \infty$$ And the metric is given by:

$$d((x_n)(y_n))=(\sum_{n=1}^{\infty}|x_n-y_n|^2)^\frac{1}{2}$$

My question in reality is, should I consider D as being the set of all sequences with a finite number of entries being rational numbers that are different than 0 and the rest of the sequence being all real numbers. Or should i consider D as the set of all sequences with finite entries beign rational numbers that are different than 0 and the rest of all entries being equal to 0 ?

Not sure if the point of the question is clear, in any case hit me up and we can dicuss the matter. Thanks in advance, any help would be appreciated

• All zero except for finitely many that are rational numbers. – user647486 Apr 18 at 2:09
• Any suggestions as to how to show that this set is dense in l2 ? – Guilherme takata Apr 18 at 14:39
• If $x\in \ell^2$, then there is $N$ such that $\sum_{k>N}|x_k|^2<\epsilon^2/2$. Then take $y\in\ell^2$ such that $y_k=0$ for $k>N$ and $y_k\in\mathbb{Q}$ and $\sum_{k=1}^{N}|y_k-x_k|^2<\epsilon^2/2$. It follows that $\|y-x\|<\epsilon$. – user647486 Apr 18 at 14:43
• Oh, got it now. Thank you – Guilherme takata Apr 18 at 18:25

$$D$$ is the set of all rational sequences with finitely many non-zero entries.
It's dense because you can truncate any sequence up to some term, the series that the norm must be convergent, and rationals are dense in $$\mathbb{R}$$.