>>14368604If you take natural numbers for granted, a common way of implementing integers is as pairs of natural numbers (x,y) where two integers (x1,y1), (x2,y2) are declared to be equal if x1 and x2, and y1 and y2 differ by the same amount. Addition is defined component-wise. The point is that (x,y) is to be understood as the difference between x and y together with the information about which number is greater (this is the sign of the integer). For example
(5,3) = value is 5-3, first number is greater = "2"
(4,6) = value is 6-4, second number is greater = "-2"
Zero is then any integer of the form (n,n). It serves as the neutral element, since (x,y)+(n,n) = (x+n,y+n) is declared to be equal to (x,y) in our definition. Every integer (x,y) has the additive inverse (y,x) because (x,y)+(y,x) = (x+y,x+y) which is 0 literally by definition.