Is this set definition valid:
$A = \{ |x| < 4 : x\text{ is an element of }\mathbb Z\}\quad?$
Is this set definition valid:
$A = \{ |x| < 4 : x\text{ is an element of }\mathbb Z\}\quad?$
No, that's not correct notation. If you mean the set of all elements $x$ of $\mathbb{Z}$ such that $|x|<4$, then the standard set-builder notation is $\{ x \in \mathbb{Z} : |x|<4 \}$. The name of a general element of the set ($x$) goes before the colon, along with the statement of the universe of discourse ($\mathbb{Z}$). The condition an element of the universe has to satisfy to be in the set ($|x|<4$) goes after the colon.
The general form of class builder notation is
$ \{ f(x) : x \in S \mid P(x) \} $
where $f$ is some function expression, $S$ is a class, and $P$ is a unary predicate. If $S$ is a set, then this notation also denotes a set, and we call this 'set builder notation'. I've borrowed the : and | from the magma
language.
For example, the set {0, 1, 4, 9} could be given by
$ \{ x^2 : x \in \mathbb{Z} \mid 0 \leq x \leq 3 \}$
Usually one doesn't write all three parts. You can omit the first part:
$ \{ x \in \mathbb{Z} \mid 0 \leq x \leq 10 \} = \{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 \} $
You can omit the last part:
$ \{ \sin(\pi x) : x \in \mathbb{Z} \} = \{ 0 \} $
You can omit the middle part (but should be careful about forming proper classes!):
$ \{ \{ x \} : \forall y, y \notin x \} = \{ \{ \emptyset \} \} $
more commonly, you combine the second and third parts
$ \{ 2x \mid x \in \mathbb{Z} \wedge |x| < 2 \} = \{ -2, 0, 2 \} $
If you mean that $ A = \{ \lvert x \lvert : \lvert x \lvert < 4, \text{ and } x \in \mathbb{Z}\}$, then indeed you have a valid set. In that case you have in fact that $ A = \{ 0, 1, 2, 3 \}.$
However, the notation is a bit off as there might be a confusion about whether you mean that $A$ is a set where the elements are $\lvert x \lvert$ or if you mean that $A$ is the set where the elements are $x\in \mathbb{Z}$. In both cases, however, you actually have a set.
The only thing that someone might raise a finger at is the notation.