The supported modulo operations are addition, subtraction, and multiplication. The properties of these modulo operations are as follows:
Theorem A-1.2.1 Properties of Modulo Operations
For any integer , the following is true:
Proof.
For any integer ,
and differ by some multiple of
and differ by some multiple of
(where ) and differ by some multiple of
Conversely, if and are coprime (i.e., ), then has a multiplicative inverse modulo . From
Based on the modulo operations in Theorem A-1.2.1, we can also derive the following properties of modulo arithmetic:
Theorem A-1.2.2 Properties of Modulo Arithmetic
For example, suppose and . Then, and are interchangeable, and and are interchangeable in modulo arithmetic as follows:
The proof of Theorem A-1.2.2 is similar to that of Theorem A-1.2.1, which we leave as an exercise for the reader.