Notation conventions for subsets of widely used sets I want to express &quot;$x$ is rational and not equal to $0$&quot;
$x\neq 0 \in \mathbb{Q}$ seems awkward to me since $x\neq 0$ is a logical statement, not a rational number. Options I can think of include:
$$x\in \mathbb{Q} \setminus 0$$
$$x\in \mathbb{Q} \land x \neq 0$$
$$x \in \mathbb{Q} | x\neq 0$$
Is there a standard convention? I'm trying to develop a sensible, standard notation to use amongst my classes.
One alternative notation you can use is
$$x\in \mathbb Q^\times.$$
Here $\mathbb Q^\times$ denotes all elements of $\mathbb Q$ which are invertible in $\mathbb Q$. Since $\mathbb Q$ is a field, this is all non-zero elements of $\mathbb Q$. However be aware that this is not always equal to the set without zero; for example $\mathbb Z^\times = \{-1,1\}$ because for any other $n\in\mathbb Z\setminus\{0\}$, $\frac{1}{n}\notin\mathbb Z$.
Yet another not uncommon notation writes the inequality without the leading $x$ as index, that is,
$$x\in\mathbb Q_{\ne 0}.$$
This notation has the advantage that it works also for a whole bunch of other sets, like $\mathbb R_{&lt;0}$ for the negative real numbers, $\mathbb Q_{\ge 0}$ for the nonnegative rational numbers or $\mathbb Z_{&gt;42}$ for the integers larger than $42$.
However if only a single number is excluded, I personally would prefer the notation
$$x\in\mathbb Q\setminus\{0\}$$
(note the braces around $0$, which are missing in your post). At least in cases where I explicitly would use formulas; otherwise I'd just write:

$x$ is a non-zero rational number.
Any set excluding $0$ is generally notated with a superscript asterisk.  This notation comes from multiplicative groups.
$$\Bbb Q\setminus\{0\} = \Bbb Q^*$$