$\mathbb{Q}[x]$ is dense in $\mathbb{R}^\mathbb{R}$?

85 Views Asked by At

I know that $\mathbb{R}^\mathbb{R}$ is separable by the general theorem on the products of separable spaces, but my professor said that a countable dense subset of this space is $\mathbb{Q}[x]$, i.e. the set of polynomial functions with rational coefficient, which is easy to verify to be countable, but I searched for a proof that is also dense and I was unable to find one, can someone provide such a proof to me?

1

There are 1 best solutions below

3
On

Yes, $\Bbb Q[x]$ is indeed dense in this power in the product topology (here we regard these polynomials as defining functions only, not as elements of the ring). Sketch of the argument:

Let $\prod_{r \in \Bbb R} U_r$ be a basic non-empty open set of $\Bbb R^{\Bbb R}$, so that we have a finite subset $F$ of $\Bbb R$ so that $U_r = \Bbb R$ when $r \notin F$ and $U_r$ is a non-empty open subset (usual topology) in $\Bbb R$ for $r \in F$.

It's easy to find a polynomial over $\Bbb R$, say $p(x)=\sum_{i=0}^n a_i x^i$ (of degree $|F|$ at most) such that $p(r) \in U_r$ for all $r \in F$ (we only have $|F|$ many constraints, see a.o. Lagrange interpolation).

Then approximate the coefficients $a_i$ by rational ones $q_i$ so that $q(x)=\sum_{i=0}^n q_i x^i$ also maps all $r \in F$ into rational values in $U_r$; this is a bit technical but some continuity/density arguments and maybe a version of Stone-Weierstraß can be used to achieve this.

Then $q(x)$ is a function from $\Bbb Q[x]$ in this basic subset and that shows $\Bbb Q[x]$ is indeed dense.