Definition
Modular arithmetic is a system of arithmetic restricted to the remainders.
Basic Properties
- Let
and , with and
Reduced Residue System
Prime Reduced Residue System
Let
- Since
, . - To prove that no 2 elements in
are equal assume but . - Therefore
. - Meaning you could write
.
Since
Full Definition
The full definition of a reduced residue system
The construction is the exact same as with prime modulo.
Fermat’s Little Theorem
Let
Proof 1
Using the Reduced Residue System
Proof 2 by Induction
- Base case:
- Induction forwards. Assume
, then by assumption. - Induction backwards. Assume
, then . For is odd. so we get which by our assumption . For , we get which by our our assumption . - Therefore we get the fact that
. If has an inverse you get .
Euler’s Theorem
(Euler’s Totient Function) Euler’s Theorem is a more general case of Fermat’s Little Theorem. It states that
In the case of
- By considering the elements of
(The reduced residue system ), multiplying them together. . - Hence
- Since the products only contain
coprime to the whole product will share no prime factors to and so the whole product is coprime to and therefore can be cancelled. - Therefore
.
Inverses
Definition
Using the Reduced Residue System
Existence
However inverses are NOT guaranteed to exist but they are
- Let
, then
Uniqueness
Inverses are unique meaning only one solution exists to
- Assume that there are two inverses such that
. - So we get that
. Since this must mean that but since ,
Fractional Behaviour
You can write inverses as a fraction like
Pairs of Inverses
Since
Wilson’s Theorem
Start with
Proof of the reverse direction
Assume
Congruence Equations
Equations with modular arithmetic are given in terms called congruence equations and their answers are usually given in terms of least residues.
The set of least residues
Since a solution
Congruence Equation Properties
Let
the equation has no solutions the equation has solutions in the set of least residues
Advance Properties and Results
Results
- For
, (Wolstenholme’s Theorem). This is also equivalent to saying .
Explanations
- By Bezouts Theorem
.
- By Bezouts Theorem
- We have
. , with - So
. So - Therefore
- We have
- Prove that
- Expanding LHS obtains
. - Since
, all terms except and are divisible by
- Expanding LHS obtains
- Inductive proof.
- Base case: it is clear that
satisfies the equation. - Assume
. , by our assumption
- Base case: it is clear that
- Prove that
- By Fermat’s Little Theorem LHS
. - One of
is .
- By Fermat’s Little Theorem LHS
- For
, (Wolstenholme’s Theorem). This is also equivalent to saying . - Since we have a factor of
it is now sufficient to show that for the original sum to be . - Since
we can replace the denominators with and we can multiply the sum by to restore the amount of terms back to , the reason being that after the terms descend back symmetrically so term is equivalent to term as - So we get
. - Since inverses are unique we get that
so each term corresponds to a unique residue. Therefore . Since - Going back to step 4 we now get
but which by step 2 is sufficient to prove the statement.
Euler’s Totient Function
Euler’s totient function is defined as
Properties
is Multiplicative Function- Let
Explanations
is Multiplicative Function- Consider
. Then consider the set numbers . - By Euclid’s Division Lemma every such number can be written in the form
with . You can think of putting this in a grid with each being in row index and column index . - Let
be the subset of that has coefficient for e.g. . - Each
forms a complete residue class as so for each there are elements coprime to . - Then let
be the subset of with remainder e.g. - Each
forms a complete residue class as so for each there are elements coprime to . - So the total amount that is coprime to
is - You can think this as starting in the top row there are elements that are coprime to and each of them form a column in which there are that are also coprime to . Only the columns where the first element is coprime to work as any element that has a common factor with will form a column in which all those elements share that common factor with . (This is due to the fact that )
- Consider
- Every number
other than a multiple of is coprime to . There are multiples of and there are numbers so combing them we get
- Every number
- Let
- Using property 2,
- Since
is multiplicative and primes are pairwise coprime.
- Using property 2,
. (This is completely multiplicative as is - ).- Let
- Every positive divisor
. - Using the fact that
is multiplicate we get - You can repeatedly factor out
from the summation with as it is constant as you are changing all up to but not including so the summation is constant and can be factored out. - This obtains
- For each term we get
which using property 2 gets a telescoping sum of - Replacing every sum we get
- Let
- INSERT PROOF
Modular Contradictions
, by Fermat’s Little Theorem , by Euler’s Theorem