# Embedding of rational number Q into real number R is dense and the embedding of Q into p-adic numbers $Q_p$ is dense too

Q: If $$p,q$$ are different primes, show the embedding $$\mathbb{Q} \rightarrow \mathbb{Q}_q \times \mathbb{Q}_p$$ $$x \rightarrow (x,x)$$ is dense in the product space $$\mathbb{Q}_q \times \mathbb{Q}_p$$.

Furthermore, show the embedding $$\mathbb{Q} \rightarrow \mathbb{R} \times \mathbb{Q}_p$$ $$x \rightarrow (x,x)$$ is dense in the product space $$\mathbb{R} \times \mathbb{Q}_p$$.

My idea: The professor gives us a hint to use Chinese Remainder Theorem. However, I still have no idea to start off my solutions...Can anyone help to explain how to do this proof? I am confused about this topic also. Thank you.

• That's two questions! – Lord Shark the Unknown Oct 20 '18 at 4:10
• They are not the same? It seems they are similar to each other and I think the method is more or less the same... – Jason Ng Oct 20 '18 at 6:32
• But then how should I start to show the first one?? – Jason Ng Oct 20 '18 at 10:30

Let's look at the second one. Given $$a\in \Bbb R$$, $$b\in\Bbb Q_p$$ and $$\newcommand{\ep}{\varepsilon}\ep>0$$ one needs to prove the existence of $$x\in\Bbb Q$$ with $$|a-x|_\infty<\ep$$ and $$|b-x|_p<\ep$$. There are certainly $$a'$$, $$b'\in\Bbb Q$$ with $$|a-a'|_\infty<\ep/2$$ and $$|b-b'|_p<\ep/2$$ so it suffices to prove that there is $$x\in\Bbb Q$$ with $$|x-a'|_\infty<\ep/2$$ and $$|x-b'|_p<\ep/2$$. Let $$y=x-b'$$ and $$c=a'-b'$$. Then we want $$y\in\Bbb Q$$ with $$|y-c|_\infty<\ep$$ and $$|y|_p<\ep/2$$.
To achieve this, consider $$u=p^N/(1+p^{2N})$$ where $$N$$ is a sufficiently large integer. Choosing $$N$$ large enough, gives $$|u|_p<\ep/4$$ and $$|u|_\infty<\ep/4$$ say. Then $$|mu|_p<\ep/4$$ for all integers $$m$$. We can now take $$m\in\Bbb Z$$ so that $$mu$$ lies in the interval $$(c-\ep/4,c+\ep/4)$$ inside $$\Bbb R$$.