How can the two basic binary operations (addition and subtraction) be defined in set-theoretical terms? I recently stumbled upon this interesting definition of mathematics:

Math is the study of things that can be described as sets.

I am aware that the integers and the real numbers can be defined in terms of sets, but how can we define the operations of addition and subtraction?
 A: You can use cardinals of sets to construct the natural numbers and prove the Peano axioms. Also you can use the ordinals defining $0:=\emptyset$ and $n^+:=n\cup \{n\}$, and so prove the Peano axioms again. 
To construct the integers from natural numbers, you can use the cartesian product to define integers $(a,b)$ and $(c,d)$ such that two integers are equal if $a+d=c+b$.
The topic is technical so you need to read a book about set theory abd foundations. The Wikipedia has good references.
A: Just to give an idea ( but I'm far from being an authority).
You may have a look at Peterseon, Theory Of Arithmetic.


*

*One may say that : $0$ is ( by definition) the same object as $\emptyset$.


*Define $S(n)$ ( the successor of number $n$) as the set : $n \cup \{n\}$.
So, for example, $S(0) = S(\emptyset)= \emptyset\cup\{\emptyset\}=\{\emptyset\}$.
Call this number: " number 1". Hence : $1 =\{\emptyset\} =\{0\}$ by definition.
Note : continuing the process , you will get this ( at first sight)  " strange" result that every natural number is the set of all its predecessors.

*

*Then state two rules in order to define addition as a function taking as input any couple of natural numbers ( that is, any element of the cartesian product $N\times N$ ) and sending back as output an element of $N$ (meaning that addition is an operation on $N$):

(1) $n+O=n$ ( $n$ being any natural number)
(2) $n+ S(m) = S (n+m)$ ( $n$ and $m$ being any natural numbers).
Note : the rules mean that, $a+b= a$ if $a = O$ and that $a+b= S(a+ $ predecessor of $b$) if $b\neq 0$.

*

*So for axample:

$3+2 = 3+S(1) = S(3+1) = S (3+S(0))= S S( 3+0) = SS(3) =S(4)= 5$.
( 5 being " the successor of 4" by definition).

*

*As to substraction, onece you have defined the integers ( using an equivalence relation on the set of couples of natural numbers) , you can say that :

$n-m = n+(-m)$.
