One of the algebraic shortcomings of the natural numbers is that non-zero naturals have no inverses. We can fix this by using the integers. In fact, we can construct the integers using the natural numbers. We do this now and explore some of their properties. But first, we need to introduce some new mathematical ideas to make the construction work.
Definition Equivalence Relations
An equivalence relation ∼ over a set X is a subset of X×X such that:
- it is reflexive: (x,x)∈∼ for all x∈X
- it is transitive: if (x,y)∈∼ and (y,z)∈∼, then (x,z)∈∼
- it is symmetric: if (x,y)∈∼, then (y,x)∈∼
We often write x∼y instead of (x,y)∈∼. The properties of equivalence relations are inspired from the corresponding properties of equality, =.
Definition Equivalence Classes
Given an equivalence relation ∼ over a set X and x∈X, the set [x]={ξ∈X: ξ∼x} is called the equivalence class of x. Note that [x] is necessarily a subset of X. Also, by reflexivity, [x] is never empty because at least x∈[x].
Lemma CharEquiClass
Characterization of Equivalence Classes: Given an equivalence relation ∼ on a set X, the following are equivalent:
- x∼y
- [x]=[y]
- [x]∩[y]≠∅
Proof: Suppose x∼y. Now consider an arbitrary element ξ∈[x]. Then, by definition, ξ∼x. So using transitivity on this and our initial supposition, we get ξ∼y. Hence, ξ∈[y]. Thus, since ξ was an arbitrary element of [x], [x]⊆[y]. By an entirely analogous argument applied to y∼x (which we get from the symmetry of x∼y), we get [y]⊆[x].
Now suppose [x]=[y]. Note that by reflexivity, x∈[x]. Hence, since [x]=[y], x∈[y] also. So obviously x∈[x]∩[y] and we see that [x]∩[y]≠∅.
The readers can show the final implication that if [x]∩[y]≠∅, then x∼y.
Definition Equivalence Quotient
Given an equivalence relation ∼ over a set X, the set of all equivalence classes of elements of X: X/∼ ={[x]:x∈X} is called the quotient set relative to ∼. Note that since each [x]⊆X, the quotient set is a subset of the power set PX of X.
Definition Equivalence Well-Defined-ness
Given a function f:X→Y and an equivalence relation ∼ on X, we say that f is well-defined relative to ∼ if whenever x∼χ we also have f(x)=f(χ) for all x,χ∈X.
If f is well-defined relative to ∼, then, there is a natural way to define a function [f] from X/∼ to Y: simply put [f]([x])=f(x). This is well-defined as a function because if [x]=[χ], then by the lemma above, x∼χ. Hence, the well-defined-ness of f relative to ∼ gives
[f](x)=f(x)=f(χ)=[f]([χ]) Thus, [f] maps values in its domain to unique values in its codomain, as a function should.
Now we have enough theoretical tools to formally define the integers in terms of the natural numbers
Definition Integers
Consider the set N×N. Now define a relation on this set thus: (l,r)≈Z(l′,r′) iff l+r′=l′+r. This is an equivalence relation:
- (l,r)≈Z(l,r) because obviously, l+r=l+r (addition being a function, l+r represents a unique value).
- (l,r)≈Z(l′,r′) implies (l′,r′)≈Z(l,r) because l+r′=l′+r trivially implies l′+r=l+r′.
- (l,r)≈Z(l′,r′) and (l′,r′)≈Z(l′′,r′′) implies (l,r)≈Z(l′′,r′′). Showing this is a bit more involved. Well, suppose (a) l+r′=l′+r and (b) l′+r′′=l′′+r′. Now,
l+(l′′+r′)=(l+r′)+l′′ by associativity and commutativity=(l′+r)+l′′ by (a)=l′+(l′′+r) by associativity and commutativity At the same time,
l+(l′′+r′)=l+(l′+r′′) by (b)=l′+(l+r′′) by associativity and commutativity Hence, l′+(l+r′′)=l′+(l′′+r) and we can cancel l′ on both sides to get l+r′′=l′′+r i.e. (l,r)≈Z(l′′,r′′) as desired.
To get an intuitive idea of what our equivalence means, pretend for a moment that subtraction over naturals is defined. Then, (l,r)≈Z(l′,r′) can be translated as l−r=l′−r′. But, of course, subtraction is not defined over all pairs of naturals. This is why we write the intuitive translation l−r=l′−r′ by rearranging the terms as l+r′=l′+r.
Finally, we define the integers as the quotient set relative to the equivalence above: Z=(N×N)/≈Z.