In this section, we’ll explore some properties of modular arithmetic that will be useful in the next chapter, when we study cryptographic algorithms based on modular arithmetic. First, recall the definition of modular equivalence from 7.1 Introduction to Number Theory.
Let
This definition captures the idea that
We will next look at how addition, subtraction, and multiplication all behave in an analogous fashion under modular arithmetic. The following proof is a little tedious because it is calculation-heavy; the main benefits here are practicing reading and using a new definition, and getting comfortable with this particular notation.
For all
We will only show how to translate and prove (2), and leave (1) and
(3) as exercises.
Let
By the Divisibility
of Linear Combinations Theorem, since
The above example stated that addition, subtraction, and
multiplication all preserve modular equivalence—but what above division?
The following statement is a “divide by
For the real numbers, division
(Modular inverse) Let
Let
Since
Rearranging this equation, we get that
Then by the definition of modular equivalence,
From this theorem about modular inverses, we can build up a form of
division for modular arithmetic. To gain some intuition, first think
about division
Let
This statement is quite complex! Remember that we focus on translation to examine the structure of the statement, so that we know how to set up a proof. We aren’t going to expand every single definition for the sake of expanding definitions.
So this is saying that under the given assumptions,
I notice that the hypothesis here (
Wait, I can multiply both sides by
Let
First, using the previous Modular Inverses theorem, since we
assmed
Second, we know from statement (3) of our first example above that
multiplication preserves modular equivalence, and so we know
Then we let
These two theorems bring together elements from all of our study of proofs so far. We have both types of quantifiers, mixed with a larger implication. We used the GCD Characterization Theorem for a key step in our proof. This illustrates the power of separating ideas into different statements and using each one to prove the next, just like we separate code into different functions in our programs!