Integer
Equivalence classes of ordered pairs

In modern set-theoretic mathematics, a more abstract construction allowing one to define arithmetical operations without any case distinction is often used instead. The integers can thus be formally constructed as the equivalence classes of ordered pairs of natural numbers (a, b).

The intuition is that (a, b) stands for the result of subtracting b from a. To confirm our expectation that 1 − 2 and 4 − 5 denote the same number, we define an equivalence relation ~ on these pairs with the following rule:

precisely when

Addition and multiplication of integers can be defined in terms of the equivalent operations on the natural numbers; by using to denote the equivalence class having (a, b) as a member, one has:

The negation (or additive inverse) of an integer is obtained by reversing the order of the pair:

Hence subtraction can be defined as the addition of the additive inverse:

The standard ordering on the integers is given by:

It is easily verified that these definitions are independent of the choice of representatives of the equivalence classes.

Every equivalence class has a unique member that is of the form (n,0) or (0, n) (or both at once). The natural number n is identified with the class (i.e., the natural numbers are embedded into the integers by map sending n to), and the class is denoted − n (this covers all remaining classes, and gives the class a second time since −0 = 0.

Thus, is denoted by

If the natural numbers are identified with the corresponding integers (using the embedding mentioned above), this convention creates no ambiguity.

This notation recovers the familiar representation of the integers as {..., −2, −1, 0, 1, 2,...}.

Some examples are:
language:response_language[Portuguese], detectable_format:number_highlighted_sections[5], change_case:capital_word_frequency[8]