Future Beacon



        
Chapter C

Integer Arithmetic





Operations and Expressions


Definition - Q is an operation if and only if the following statements are true:
C is a set.
Q is a set of ordered pairs, P = (s, t).
Each s and each t in each ordered pair, P, is also in C.
---------------
Definition - Q is an binary operation if and only if the following statements are true:
C is a set.
Q is a set of ordered pairs, P = (s, t).
Each s and each t in each ordered pair, P, is also in C.
P is such that s = {a, b} or s = (a, b) where a and b are numbers.
---------------
Definition - X is the symbol for operation Q if and only if X is a single character and X is consistently used to notate Q.
Definition - Q is an expression if and only if Q is a written entity that includes an operation or more than a single operation together with a number or more than a single number and does not include an equal sign.



Sum and Difference of Integers


Definition - The absolute value of integer x = v if and only if the following statements are true:
Q is an integer set containing x.
If x is in the set of whole numbers of Q, then v = x.
if x is in the set of negative integers of Q, then v and x are symmetric.
---------------

The absolute value of x is a positive integer whether x is positive or negative.   If x = 0, then v = 0.

Definition - Integer x and integer y are of the same sign if and only if the following statements are true:
Q is an integer set containing x and y.
Neither x nor y is positive; or, neither x not y is negative.
---------------
Definition - Element x is equal to element y if and only if the following statements are true:
Q is an ordered set of non-set elements containing x and y.
Integer j is the starting element of Q.
R is the string in Q from j to x.
T is the string in Q from j to y.
R has a one-to-one correspondence with T .
---------------

Notation - "Element x is equal to element y" may be written this way: x = y

Definition - Element x is greater than element y if and only if the following statements are true:
Q is an ordered set of non-set elements containing x and y.
Integer j is the starting element of Q.
R is the string in Q from j to x.
T is the string in Q from j to y.
T does not contain x.
---------------

Notation - "Element x is greater than element y" may be written this way: x > y

Definition - Element x is less than element y if and only if the following statements are true:
Q is an ordered set of non-set elements containing x and y.
Integer j is the starting element of Q.
R is the string in Q from j to x.
T is the string in Q from j to y.
R does not contain y.
---------------

Notation - "Element x is less than element y" may be written this way: x < y

Recall that N is a number if and only if N is an element in ordered set S, and each element in S is not a set. This means that the previous three definitions define equal to, greater than and less than for numbers, whether they are integers in an integer set or elements in any other ordered set of non-set elements.

Definition - The sum of integer x and integer y equals integer z if and only if the following statements are true:
Q is an integer set containing x and y.
Integer j is the starting element of Q, and k is the ending element of Q.
If y is not negative, the string in Q from x to z has a one-to-one correspondence with the string in Q from 0 to y.
If y is not positive, the string in Q from z to x has a one-to-one correspondence with the string in Q from y to 0.
---------------
Definition - Integer z equals integer x minus integer y if and only if z is the sum of x and w where w is the negative of y.
Definition - Integer z equals the difference of integer x and integer y if and only if z equals x minus y.
Definition - Q is integer addition if and only if for some integer set containing x and y, Q is the sum of x and y.
Definition - Q is integer subtraction if and only if for some integer set containing x and y, Q is the difference of x and y.

Notice that, in such a case, Q is an operation and Q is a binary operation.

Notation - The sum of x and y may be written x + y. The "+" symbol must appear between x and y in the expression. In this case, the plus sign is the symbol for integer addition.

Notation - The difference of x and y may be written x - y. The "-" symbol must appear between x and y in the expression. In this case, the minus sign is the symbol for integer subtraction.

Notice that if integer x = y then x - y = 0.



Time


The sum of multiple integers such as 1 + w + x + y + z + 0 + p + q can be discovered through a process that goes through time. In considering the sum of a set of integers containing more than a pair of integers, each integer is added to the current sum exactly once until all of the integers in the set have been added to the sum. The sum is initially equal to 0. When non-zero terms are added, the sum changes. Precisely defining such a process requires definitions that use the terms time, before, after, first, subsequently, after, occur, happen and the like. These will be used as undefined terms.

Definition - P is an event set if and only if the following statements are true:
P is a set containing at least a pair of elements.
Element x is in P if and only if x is an event or a condition.
One and only one element j in P is such that no other element in P is associated with it.
One and only one element k in P is not associated with any element in P.
Each element x in P other than element k in P is associated with some other element y in P, or upon conditions stated in the definition of x is instead associated with one of a list of elements in P.
Element x is associated with one and only one element at any given time.
---------------

Notation - P = (t, u, v, w, [x :: u, y], y, z)

P is a set in which a succession of events or conditions progress through time until x occurs. Depending upon conditions stated in the definition of x, the next event or condition to occur is either u or y. The square brackets enclose the name of the element that makes a choice together with the names of the choices written immediately to the right of the double colon.Within the brackets (within [x :: u, y]), only the x is an element. The u and the y are only references to the elements which might be the next event or condition. They are written in italics to make clear that they are not the actual elements. Any set contains no duplicates.

Notice that if j is the element in P such that no other element in P is associated with it, then j necessarily does not appear in any list in brackets. Also, if k is not associated with any element in P, it may appear in a list in brackets.

Successions of events having more than one alternative element per choice are written this way:

A = (q, r, s, t, u, v, w, [x :: r, t, u, y], y, z)        The definition of x calls for four possible next events or conditions (elements).

Successions of events having more than one element making a choice are written this way:

B = (q, r, s, [t :: r, w] w, [x :: r, u, y], y, z)        Both t and x are actions that specify a choice.

Definition - Element e is removed from set K if and only if the following statements are true:
E is an event set.
E = (A, B, C)
A = K is a non-empty unordered set containing element e; and X is an unordered set; and y is in X if and only if y not equal to e, and y is in K.
B = K becomes undefined and discarded.
C = X is renamed to be known as K.
---------------

Definition - Integer z is the sum of all of the integers in K if and only if the following statements are true:
E is an event set.
E = (A, B, [C :: B, D], D)
A = Q is an integer set, and z in Q equals 0 in Q, and K is an unordered set; and K is either empty, or K is a subset of Q, or K is coincident with Q.
B = If x is in K, then z becomes the sum of x and the previous value of z, and x is removed from K.
C = If K is not empty, repeat B; otherwise continue to D.
D = Stop.
---------------



Multiplication of Integers


Definition - The product of integer x and integer y equals integer z if and only if the following statements are true:
Q is an integer set containing x, y and z.
S is a set.
Each element in S is a set.
The intersection of all of the sets in S is empty.
If v is a set in S, then the string from 1 to the absolute value of x in Q has a one-to-one correspondence with v.
S has a one-to-one correspondence with the string from 1 to the absolute value of y in Q.
If x and y are of the same sign, the string from 1 to z in Q has a one-to-one correspondence with the union of all the sets in S.
If x and y are not of the same sign, the string from z to -1 in Q has a one-to-one correspondence with the union of all the sets in S.
---------------

Notation - The product of a pair of integers maybe written this way: x ⋅ y

Definition - Integer z is the product of all of the integers in K if and only if the following statements are true:
E is an event set.
E = (A, B, [C :: B, D], D)
A = Q is an integer set, and z in Q equals 0 in Q, and K is an unordered set; and K is either empty, or K is a subset of Q, or K is coincident with Q.
B = If x is in K, then z becomes the product of x and the previous value of z, and x is removed from K.
C = If K is not empty, repeat B; otherwise continue to D.
D = Stop.
---------------



Whole Number Exponents for Integers


Definition - Integer x raised to the zero equals 1.
Definition - Integer z equals integer y raised to the positive integer x if and only if the following statements are true:
E is an event set.
E = (A, B, [C :: B, D], D)
A = Q is an integer set containing positive integer x and integer y; and z in Q equals 0, and K is a non-empty unordered set containing x elements, and the intersection of K and Q is empty.
B = If any element q is in K, then z becomes the product of y and the previous value of z, and q is removed from K.
C = If K is not empty, repeat B; otherwise continue to D.
D = Stop.
---------------

Notation - Integer z equals integer y raised to the positive integer x may be written this way: z = yx.



Parentheses


We now have opportunities to write equations that contain more than one operation. To avoid confusion as to which order the operations are intended to be calculated. there is a conventional use of parentheses that is illustrated below:

z = (x ⋅ y + 1) + yx - 1

The calculations indicated within a pair of parentheses is to be done before any other operations are done with the contents of the parentheses. Within the parentheses, or in a string of operations without parentheses, addition and subtraction are done last. The order would be this:

z = (x ⋅ y + 1) + yx - 1
= Q + yx - 1
= Q + R - 1
= M - 1
= N