 
 has a solution modulo
 has a solution modulo  .  
Algorithms for computing solutions to
.  
Algorithms for computing solutions to 
 are the topic of Section 2.3.
 are the topic of Section 2.3.
First we prove a proposition that gives a criterion under which one can cancel a quantity from both sides of a congruence.
When  has a multiplicative inverse
 has a multiplicative inverse  in
 in 
 (i.e.,
 (i.e.,
 ) then the equation
) then the equation 
 has a unique
solution
 has a unique
solution 
 modulo
 modulo  .  Thus, it is of interest to
determine the units in
.  Thus, it is of interest to
determine the units in 
 , i.e., the elements which have a
multiplicative inverse.
, i.e., the elements which have a
multiplicative inverse.
We will use complete sets of residues
to prove that the units in 
 are exactly the
 are exactly the 
 such that
such that 
 for any lift
 for any lift  of
 of  to
to 
 (it doesn't matter which lift).
 (it doesn't matter which lift).
 of size
 of size  whose reductions modulo
 whose reductions modulo  are
pairwise distinct a complete set of residues
modulo
 are
pairwise distinct a complete set of residues
modulo  .  In other words, a complete set of residues is a choice of
representative for each equivalence class in
.  In other words, a complete set of residues is a choice of
representative for each equivalence class in 
 .
.
 
is a complete set of residues modulo
 .
When
.
When  ,
, 
 is a complete set of residues.
is a complete set of residues.
 is a complete set of residues modulo
 is a complete set of residues modulo  and
 and 
 with
 with
 , then
, then 
 is also a complete set of residues modulo
is also a complete set of residues modulo  .
. with
 with 
 , then 
Proposition 2.1.9 implies that
, then 
Proposition 2.1.9 implies that 
 .
Because
.
Because  is a complete set of residues, this implies
that
 is a complete set of residues, this implies
that  .  Thus the elements of
.  Thus the elements of
 have distinct reductions modulo
 have distinct reductions modulo  .
It follows, since
.
It follows, since  , that
, that  is a 
complete set of residues modulo
 is a 
complete set of residues modulo  .
.
  
 be a complete set of residues modulo
 be a complete set of residues modulo  , so there
is a unique element of
, so there
is a unique element of  that is congruent to
 that is congruent to  modulo
 modulo  .
By Lemma 2.1.11,
.
By Lemma 2.1.11,  
 is also a complete set of residues modulo
 is also a complete set of residues modulo  , so
there is a unique element
, so
there is a unique element  that is congruent
to
 that is congruent
to  modulo
 modulo  , and we have
, and we have 
 .
.
  
 , then
the map
, then
the map 
 given by left multiplication by
 given by left multiplication by  is
a bijection.
 is
a bijection.
 ,
and the complete set
,
and the complete set 
 of coset representatives.  We have
of coset representatives.  We have
 
so
 .
.
When 
 , then the equation
, then the equation 
 may or
may not have a solution.  For example,
 may or
may not have a solution.  For example, 
 has no
solution, but
 has no
solution, but 
 does, and in fact it has more than
one mod
 does, and in fact it has more than
one mod  (
 ( and
 and  ).  Generalizing
Proposition 2.1.12, we obtain the following more general
criterion for solvability.
).  Generalizing
Proposition 2.1.12, we obtain the following more general
criterion for solvability.
 .  If there is a solution
.  If there is a solution  to the equation
 to the equation
  
 , then
, then 
 .  Since
.  Since  and
 and  , it follows that
, it follows that  .
.
Conversely, suppose that  .  Then
.  Then 
 if and only
  if
 if and only
  if 
 
Thus
 has a solution if and only if
 has a solution if and only if 
 has a solution.  Since
 has a solution.  Since
  
 , Proposition 2.1.12 implies this
  latter equation does have a solution.
, Proposition 2.1.12 implies this
  latter equation does have a solution.
  
In Chapter 4 we will study quadratic reciprocity,
which gives a nice criterion for whether or not a quadratic equation
modulo  has a solution.
 has a solution.  
William 2007-06-01