21. A specification for sets
We said that Method 18.1.11 “determines the set $\{x\mid P(x)\}$ precisely.” Actually, what the method does is explain how the notation determines the elements of the set precisely. But that is the basic fact about sets: a set is determined by its elements.
Indeed, the following specification contains everything about what a set is that you need to know (for the purposes of reading this book!).
21.1 Specification: set
A set is a single entity distinct from, but completely determined by, its elements (if there are any).
21.1.1 Remarks
a) This is a specification, rather than a definition. It tells you the operative properties of a set rather than giving a definition in terms of previously known objects.
Thus a set is a single abstract thing (entity) like a number or a point, even though it may have many elements. It is not the same thing as its elements, although it is determined by them.
b) In most circumstances which arise in mathematics or computer science, a kind of converse to Specification 21.1 holds: any collection of elements forms a set. However, this is not true universally. (See Section 24.)
21.2 Consequences of the specification for sets
A consequence of Specification 21.1 is the observation in Section 17.1 that, in using the list notation, the order in which you list the elements of a set is irrelevant. Another consequence is the following method.
21.2.1 Method
For any sets $A$ and $B$, $A=B$ means that
a) Every element of $A$ is an element of $B$ and
b) Every element of $B$ is an element of $A$.
21.2.2 Example For $x$ real,
$$\{x\mid x^{2}=1\}=\{x\mid(x=1)\vee(x=-1)\}$$
We will prove this using Method 21.2.1. Let
$$A=\{x\mid x^{2}=1\}\quad\text{and}\quad B=\{x\mid(x=1)\vee(x=-1)\}$$
Suppose $x \in A$. Then $x^{2}=1$ by 18.2. Then $x^{2}-1=0$, so $(x-1)(x+1)=0$, so $x=1$ or $x=-1$. Hence $x \in B$ by 18.1. On the other hand, if $x \in B$, then $x= 1$ or $x =-1$, so $x^{2}= 1$, so $x \in A$.
21.2.3 Remark The two statements, “$x^{2}= 1$” and “$(x = 1)\vee (x =-1)$” are different statements which nevertheless say the same thing. On the other hand, the descriptions $\{x\mid x^{2}=1\}$ and $\{x\mid(x=1)\vee(x=-1)\}$ denote the same set; in other words, the predicates “$x^{2}= 1$” and “$(x = 1)\vee (x =-1)$” have the same extension. This illustrates that the defining property for a particular set can be stated in various equivalent ways, but what the set is is determined precisely by its elements.
Pages 32–33 of the book (PDF).