I have been reading Velleman's How to Prove book and the following statement in the book confuses me:
For example, suppose we wanted to define S to be the set of all perfect squares. Perhaps the easiest way to describe this set is to say that it consists of all numbers of the form $n^2$, where n is a natural number. This is written $S = \{n^2 \mid n \in \mathbb N \}$. Note that we could also define this set by writing $S = \{ x \mid \exists n \in \mathbb{N}(x=n^2)\}$
The last logical form confuses me. Shouldn't it be like this:
$S = \{ x \mid \forall n \in \mathbb{N}(x=n^2)\}$
The part on the left of the "$\mid$" is a "prototype" for an element of the set. The part on the right describes what must hold for such a prototype to actually be in the set. The first definition means you can find some $n$ so that your prototype $x$ is equal to $n^2$. So, if e.g. $x$ is $36$, you can find $n=6$, so $x$ is in the set. Your second definition would mean that $x$ could only be in the set if it were simultaneously equal to all $n^2$ for all $n$ and as there is no such $x$ your set would be empty.