I have this exercise which seems very simple, but I am not able to find a solution.
Given a structure $\mathfrak A$=($\Bbb Q$, $\cdot$)
Is $\Bbb Q_{\ge 0}$ elementary definable in $\mathfrak A$?
The formula $\phi(x)=\exists y(x=y \cdot y)$ would not accept 2 which is obviously in $\Bbb Q_{\ge 0}$. On the other side I am not able to find an automorphism which is not compatible with the relation $\Bbb Q_{\ge 0}$.
Can you help me to find such a formula or the automorphism?
Any nonzero rational number $q$ can be written uniquely as $q = 2^nr$, where $n$ is an integer and $r$ is a rational number, such that when $r$ is written in lowest terms as $a/b$, both $a$ and $b$ are odd. Define $v_2(q) = n$. (This is called the $2$-adic valuation of $q$.)
Consider the map $f\colon \mathbb{Q}\to\mathbb{Q}$ defined by $$f(q) = \begin{cases} q & \text{if $v_2(q)$ is even}\\ -q & \text{if $v_2(q)$ is odd}.\end{cases}$$
Now check that $f$ is an automorphism of $(\mathbb{Q},\cdot)$ which doesn't preserve $\mathbb{Q}_{\geq 0}$, since $f(2) = -2$.
Edit: I feel like I should put some model theory in this answer, so I'll point out that $(\mathbb{Q},\cdot)$ is an abelian group (well, almost - it has the extra element $0$, but this element interacts trivially with the rest of the structure and doesn't affect the definable sets at all), and definable sets in abelian groups (and $R$-modules more generally, for any ring $R$) are well-understood. See Theorem 3.3.5 in Tent & Ziegler's book A Course in Model Theory.
Every formula is equivalent to a Boolean combination of positive primitive formulas, which have the form $$\exists y_1,\dots,y_n\, \bigwedge_{i=1}^k \varphi_k(\overline{x},\overline{y}),$$ where each $\varphi_k$ is an equation. In the case of $(\mathbb{Q}_{\neq 0},\cdot)$, an equation looks like $$x_1^{a_1}\cdot \ldots \cdot x_m^{a_m}\cdot y_1^{b_1}\cdot \ldots \cdot y_n^{b_n} = 1,$$ where all the $a_i$ and $b_i$ are integers.
So if you want to check whether a particular subset of $\mathbb{Q}$ is definable, you can do this by checking whether or not its a finite Boolean combination of sets defined by positive primitive formulas. It turns out that positive primitive formulas always define subgroups, which can be helpful (though a Boolean combination of subgroups is not necessarily a subgroup). Of course, in this case the argument via an automorphism was much easier.