How can we see a tuple as a set? In the book "mathematical logic", it is said that $(a,b)$ is an abbreviation for $\{ \{a,a\},\{a,b \}\}$.
I don't understand this, since firstly, $\{a,a\}=\{a\}$, and secondly, even if this weren't the case, how does  $\{ \{a,a\},\{a,b \}\}$ capture the ordered relation of $(a,b)$?
i.e. how do we see a tuple as a set?

$f(a,b) = \{\{a\}, \{a,b\}\}$ captures ordering in the following way: $a$ is contained in the both elements of $f(a,b)$ and $b$ is contained in only one element.
