# Can we construct a $\mathbb Q$-basis for the Pythagorean closure of $\mathbb Q?$

This is a follow-up question to this one. I asked it there first but moved it here following the advice from Cam McLeman.

I tried to prove that $(\mathbb P:\mathbb Q)=\aleph_0$ and I think I succeeded: it's clear that the square of every natural number is in $\mathbb P$. Indeed, $$\sqrt n=(\underbrace{1^2+1^2+\ldots+1^2}_n)^{1/2}\in\mathbb P.$$ In this question I learned how to prove that the squares of primes are linearly independent over $\mathbb Q.$ Thus $\{\sqrt p\,|\,p \text{ is prime}\}\subset \mathbb P$ is an infinite linearly independent set.

Can we construct a $\mathbb Q$-basis of $\mathbb P?$ We have for $p_1,p_2,\ldots,p_m,q_1,q_2,\ldots,q_n\in \mathbb Q$

$$\frac 1 {\sqrt{p_1^2+p_2^2+\ldots+p_m^2}}=\frac{1}{p_1^2+p_2^2+\ldots+p_m^2}\cdot\sqrt{p_1^2+p_2^2+\ldots+p_m^2}$$ and $$\sqrt{p_1^2+p_2^2+\ldots+p_m^2}\cdot \sqrt{q_1^2+q_2^2+\ldots+q_n^2}=\sqrt{\sum_{1\leq i\leq m,1\leq j\leq n}(p_iq_j)^2}.$$

So I think every number in $\mathbb P$ should be possible to write as a linear combination of numbers of the form $\sqrt{p_1^2+p_2^2+\ldots+p_m^2}.$ But the set of such numbers cannot possibly be linearly indepentent over $\mathbb Q.$ (Although I think it's a step in the right direction, isn't it?)

EDIT I'll try to clarify why I think the above equations are relevant. I think I know that every number in $\mathbb P$ is a result of iterating field operations on the set of numbers of the form $\sqrt{p_1^2+\ldots +p_n^2}.$ The above equations tell me that I don't need muliplication and multiplicative inversion in this procedure. So every number in $\mathbb P$ is a result of iterating addition and additive inversion on the set of numbers of the form $\sqrt{p_1^2+\ldots +p_n^2}.$ These two happen to be vector space operations. So this set generates the whole $\mathbb P$ as a vector space.

-
I think there's some confusion between a basis and a minimal adjoining set. For example, your last equations show how elements of the Pythagorean field relate multiplicatively, but this doesn't say anything about linear independence. For example, $\sqrt{2}$, $\sqrt{3}$, and $\sqrt{6}$ are $\mathbb{Q}$-linearly independent, but $\sqrt{6}\in\mathbb{Q}(\sqrt{2},\sqrt{3})$. –  Cam McLeman Mar 5 '12 at 22:16
@CamMcLeman I agree that this says nothing about linear independence but I think it says something about generating, which is the second thing a basis has to do. I'm simply saying that the numbers of the form $\sqrt{p_1^2+\ldots+p_n^2}$ generate $\mathbb P$ as a vector space over $\mathbb Q$ because inverting and multiplying such numbers doesn't lead us outside the set of such numbers multiplied by scalars from $\mathbb Q.$ –  user23211 Mar 5 '12 at 22:26
@ymar: If a certain field $F$ is obtainable by adding finitely many algebraic numbers to $\mathbb{Q}$, then $F$ has finite dimension as a vector space over $\mathbb{Q}$. The square roots of the primes, indeed any positive integers, are in $\mathbb{P}$, so since you already know the square roots of the primes are linearly independent over $\mathbb{Q}$, you are finished. More delicate would be to prove the undoubtedly true fact that the field of (say real) constructible numbers has infinite dimension over $\mathbb{P}$. –  André Nicolas Mar 5 '12 at 22:45
@ymar: Any such basis is, by my comment above, also by your work, countably infinite. I would no more know how to construct a nice basis for $\mathbb{P}$ as a vector space over $\mathbb{Q}$ than how to construct a nice basis for the algebraic numbers over $\mathbb{Q}$. One can cheat and enumerate $\mathbb{P}$, then climb up the enumeration, keeping a number if it is not a linear combination of previous ones, discarding it otherwise. –  André Nicolas Mar 5 '12 at 22:58
@ymar: I did it once long ago, to win an argument about whether Cantor's proof of the existence of transcendentals is constructive (it is). Do not know a standard source for the details. –  André Nicolas Mar 5 '12 at 23:28