# Integers, rationals and reals as sets? [duplicate]

Natural numbers can be represented as pure sets by defining them to contain every number that is smaller than them. Arithmetic can be performed on them using the Peano axioms. Are there any similar definitions for integers, rationals and reals?

For example, I could define a rational to be an ordered pair of dividend and divisor. But that would leave the two rationals $\frac{1}{2}$ and $\frac{2}{4}$ not equal to each other, and it would be based on ordered things rather than pure sets.

## marked as duplicate by Asaf Karagila♦ set-theory StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); May 17 '14 at 20:31

Yes the procedure you outline is correct, but you must define equivalence classes, $(a,b)\sim (b,c)$ if $ac=bd$. Thus a rational number is an equivalence class of pairs. One then defines the arithmetic operations addition and multiplications and show that they are invariant under equivalence. The same can be done to define the integers from the natural numbers here the relation is $(n,m)\sim (r,s)$ if $n+s=r+m$. The reals are then defined as Dedekind cuts of the rationals.

• Your definition of the integers seems to differ from the other answer, but it seems to agree with the definition linked in the comments to my question. How come? (or maybe I should ask the other answerer that question) – user151634 May 17 '14 at 20:39
• @user151634: There are many ways to define things. We mostly don't care which definition we pick as long as the resulting structures behave the same way. – user2357112 May 17 '14 at 20:53

Yes.

1. Define the ordered pair $(a, b)$ as the set $\{a, \{a, b\}\}$
2. Define the integers as $(\{1, 0\} \times \mathbb N) \setminus (0, 0)$: ordered pairs where the first element represents the sign and the second represents the magnitude, excluding negative $0$. In the first slot, $1$ represents positive, $0$ represents negative.
3. Define the rational number $\frac{p}{q}$ as $\{(a, b): aq=bp\}$: the set of all ordered pairs that reduce to the same thing $(p, q)$ does in lowest terms. (That's not quite what this definition says, but it's easier to say and amounts to the same thing.)
4. Define real numbers as sets of rationals for which if $\frac{p}{q}$ is in the set, then all rationals lower than $\frac{p}{q}$ are in the set. (Also, the empty set and $\mathbb Q$ are specifically excluded from being real numbers.)
• Am I correct that your last point, in very rough terms, states that a real number is the set of all (rational?) numbers smaller than it? Is the real numbers smaller than the particular real number not included? Also, why would the empty set and the rationals be excluded from the real numbers? – user151634 May 17 '14 at 20:25
• Yes, it's known as "Dedekind cuts", it's one of common ways to formally construct real numbers. – Marcin Łoś May 17 '14 at 20:27
• I think I get it. One question though, how do you originally define -1 in point two? – user151634 May 17 '14 at 20:29
• @user151634: Yup. The empty set and $\mathbb Q$ would represent negative and positive infinity, respectively. If we were defining the affinely extended real number line, we would include them. – user2357112 May 17 '14 at 20:29
• @user151634: ...I knew there was a reason I originally used $0$ instead of $-1$. – user2357112 May 17 '14 at 20:30