Does a Hasse principle hold for the property of being a rational times a square ?


Let $a \in \mathbb{K}$ be an element of a number field. Assume that at every place $\mathbb{K}\_v$ of $\mathbb{K}$, $a$ can be written as $a=q k^2$, with $q \in \mathbb{Q}$ and $k \in \mathbb{K}\_v$. Is it true that $a$ can always be written as $q k^2$ with $q \in \mathbb{Q}$ and $k\in \mathbb{K}$ ?


EDIT : there's a restriction at the real places of $\mathbb{K}$. One should assume that the sign of $a$ is the same at every real place.



Hasse principle for rational times square
$\def\QQ{\mathbb{Q}}\def\KK{\mathbb{K}}$I've been meaning for a while to come back and talk about the group theory of this situation. I'm going to use GH from MO's fixed formulation: For every place $u$ of $\QQ$, there should be a rational number $q\_u$ such that $a/q\_u$ is square in $\KK\_v$ for all $v$ above $u$. Note that all of the examples of "No Hasse" principle in my other answer do not incorporate GH from MO's fix, and disappear once it is included. 


I will assume that $\KK/\QQ$ is Galois, with Galois group $H$. Others are welcome to work out the non-Galois case. Assume that the local condition holds.


**Observation:** $\KK(\sqrt{a})$ is Galois over $\QQ$. Proof: It is equivalent to show, for any $\sigma \in H$, that $\sigma(a)/a$ is square in $\KK$. Let $u$ be a place of $\QQ$. Then there is a $q\_u \in \QQ$, and elements $x\_v \in \KK\_v$ for each $v$ over $u$, such that $a = q\_u x\_v^2$ in $\KK\_v$. Then $\sigma(a) = q\_u \sigma(x\_v)^2$ in $\KK\_{\sigma(v)}$. So $\sigma(a)/a = \sigma(x\_{\sigma^{-1}(v)})^2/x\_v^2$ in $\KK\_v$. So $\sigma(a)/a$ is locally a square everywhere and hence a square.


Let $G = \mathrm{Gal}(\KK(\sqrt{a})/\QQ)$. So we have a short exact sequence $$1 \to \mathbb{Z}/(2 \mathbb{Z}) \to G \to H \to 1 \ (\ast)$$ which, since $\mathrm{Aut}(\mathbb{Z}/(2 \mathbb{Z}))$ is trivial, must be a central extension. 


We have $a = q x^2$, for $q \in \QQ$ and $x \in \KK$, if and only if $\KK(\sqrt{a}) = \KK(\sqrt{q})$. This happens if and only if the extension $(\ast)$ is split. 


If $\# H$ is odd, then any central extension is split and we are done; the Hasse principle holds. This has been observed in other answers.


But the local hypothesis puts additional constraints on the sequence $(\ast)$. Suppose that $\tau \in H$ has even order, and let $\sigma$ be a lift of $\tau$ to $G$. Let $(w,v,u)$ be a tower of places in $(\KK(\sqrt{a}), \KK, \QQ)$ respectively, with Frobenius elements $\sigma$ and $\tau$ corresponding to $w$ and $v$, and assume that $w$ is unramified with odd characteristic. Then $\KK\_v:\QQ\_u$ is even degree, unramified with odd residue characteristic, which means that all units of $\QQ\_u$ is square in $\KK\_v$. So $a$ is square in $\KK\_v$, and we deduce that $\KK\_v(\sqrt{a}) = \KK\_v$. So $\sigma$ and $\tau$ have the same order. In short, we have shown: 



> 
> If $\tau \in H$ has even order, and $\sigma$ is a lift of $\tau$ to
>  $G$, then $\sigma$ has the same order as $\tau$. $(\dagger)$
> 
> 
> 


There are many groups $H$ for which one check that $(\dagger)$ implies $(\ast)$ is split -- for example, cyclic groups, or $(\mathbb{Z}/2 \mathbb{Z})^n$. So that is a number more cases in which the Hasse principle holds.


However, $(\dagger)$ does not always imply splitting of $(\ast)$. The smallest example I can find is that $G$ is the $32$-element group $\left( \begin{smallmatrix} 1 & \mathbb{Z}/4 & \mathbb{Z}/2 \\ 0 & 1 & \mathbb{Z}/4 \\ 0 & 0 & 1 \end{smallmatrix} \right)$ and $H$ is the quotient by $\left( \begin{smallmatrix} 1 & 0 & 1 \\ 0 & 1 & 0\\ 0 & 0 & 1 \end{smallmatrix} \right)$.


All nilpotent groups are realizable as Galois groups over $\mathbb{Q}$, so thiere is some tower $\KK(\sqrt{a})/\KK/\QQ$ which yields this group. And this $a$ will not be globally $q x^2$. Will it obey the local condition? At the unramified primes, yes. If $v$ is a place of $\KK$ which is not split over $\QQ$, then $v$ splits further in $\KK(\sqrt{a})$, so $a$ is square in $\KK\_v$. If $v$ is a place of $\KK$ which is split over $\QQ$, then $\KK\_v \cong \QQ\_u$ and $\sigma(a)/a \in \QQ\_u^2$ for every $\sigma$, so we can find some $q \in \QQ$ such that $\sigma(a) /q$ is in $\QQ\_u^2$ for every $\sigma$.


I'm not sure about the ramified primes.


If someone understands enough about the constructive Galois problem to rig up an extension with this Galois group, it would be fun to see.


