HomeHome Intuitionistic Logic Explorer
Theorem List (p. 158 of 166)
< Previous  Next >
Browser slow? Try the
Unicode version.

Mirrors  >  Metamath Home Page  >  ILE Home Page  >  Theorem List Contents  >  Recent Proofs       This page: Page List

Theorem List for Intuitionistic Logic Explorer - 15701-15800   *Has distinct variable group(s)
TypeLabelDescription
Statement
 
Theoremlgslem2 15701 The set  Z of all integers with absolute value at most 
1 contains  { -u 1 ,  0 ,  1 }. (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  Z  =  { x  e.  ZZ  |  ( abs `  x )  <_  1 }   =>    |-  ( -u 1  e.  Z  /\  0  e.  Z  /\  1  e.  Z )
 
Theoremlgslem3 15702* The set  Z of all integers with absolute value at most 
1 is closed under multiplication. (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  Z  =  { x  e.  ZZ  |  ( abs `  x )  <_  1 }   =>    |-  ( ( A  e.  Z  /\  B  e.  Z )  ->  ( A  x.  B )  e.  Z )
 
Theoremlgslem4 15703* Lemma for lgsfcl2 15706. (Contributed by Mario Carneiro, 4-Feb-2015.) (Proof shortened by AV, 19-Mar-2022.)
 |-  Z  =  { x  e.  ZZ  |  ( abs `  x )  <_  1 }   =>    |-  ( ( A  e.  ZZ  /\  P  e.  ( Prime  \  { 2 } ) )  ->  (
 ( ( ( A ^ ( ( P  -  1 )  / 
 2 ) )  +  1 )  mod  P )  -  1 )  e.  Z )
 
Theoremlgsval 15704* Value of the Legendre symbol at an arbitrary integer. (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  F  =  ( n  e.  NN  |->  if ( n  e.  Prime ,  ( if ( n  =  2 ,  if ( 2 
 ||  A ,  0 ,  if ( ( A  mod  8 )  e.  { 1 ,  7 } ,  1 ,  -u 1 ) ) ,  ( ( ( ( A ^ (
 ( n  -  1
 )  /  2 )
 )  +  1 ) 
 mod  n )  -  1 ) ) ^
 ( n  pCnt  N ) ) ,  1 ) )   =>    |-  ( ( A  e.  ZZ  /\  N  e.  ZZ )  ->  ( A  /L N )  =  if ( N  =  0 ,  if ( ( A ^ 2 )  =  1 ,  1 ,  0 ) ,  ( if ( ( N  <  0 
 /\  A  <  0
 ) ,  -u 1 ,  1 )  x.  (  seq 1 (  x.  ,  F ) `
  ( abs `  N ) ) ) ) )
 
Theoremlgsfvalg 15705* Value of the function  F which defines the Legendre symbol at the primes. (Contributed by Mario Carneiro, 4-Feb-2015.) (Revised by Jim Kingdon, 4-Nov-2024.)
 |-  F  =  ( n  e.  NN  |->  if ( n  e.  Prime ,  ( if ( n  =  2 ,  if ( 2 
 ||  A ,  0 ,  if ( ( A  mod  8 )  e.  { 1 ,  7 } ,  1 ,  -u 1 ) ) ,  ( ( ( ( A ^ (
 ( n  -  1
 )  /  2 )
 )  +  1 ) 
 mod  n )  -  1 ) ) ^
 ( n  pCnt  N ) ) ,  1 ) )   =>    |-  ( ( A  e.  ZZ  /\  N  e.  NN  /\  M  e.  NN )  ->  ( F `  M )  =  if ( M  e.  Prime ,  ( if ( M  =  2 ,  if ( 2 
 ||  A ,  0 ,  if ( ( A  mod  8 )  e.  { 1 ,  7 } ,  1 ,  -u 1 ) ) ,  ( ( ( ( A ^ (
 ( M  -  1
 )  /  2 )
 )  +  1 ) 
 mod  M )  -  1
 ) ) ^ ( M  pCnt  N ) ) ,  1 ) )
 
Theoremlgsfcl2 15706* The function  F is closed in integers with absolute value less than  1 (namely  { -u
1 ,  0 ,  1 }, see zabsle1 15699). (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  F  =  ( n  e.  NN  |->  if ( n  e.  Prime ,  ( if ( n  =  2 ,  if ( 2 
 ||  A ,  0 ,  if ( ( A  mod  8 )  e.  { 1 ,  7 } ,  1 ,  -u 1 ) ) ,  ( ( ( ( A ^ (
 ( n  -  1
 )  /  2 )
 )  +  1 ) 
 mod  n )  -  1 ) ) ^
 ( n  pCnt  N ) ) ,  1 ) )   &    |-  Z  =  { x  e.  ZZ  |  ( abs `  x )  <_  1 }   =>    |-  ( ( A  e.  ZZ  /\  N  e.  ZZ  /\  N  =/=  0 ) 
 ->  F : NN --> Z )
 
Theoremlgscllem 15707* The Legendre symbol is an element of  Z. (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  F  =  ( n  e.  NN  |->  if ( n  e.  Prime ,  ( if ( n  =  2 ,  if ( 2 
 ||  A ,  0 ,  if ( ( A  mod  8 )  e.  { 1 ,  7 } ,  1 ,  -u 1 ) ) ,  ( ( ( ( A ^ (
 ( n  -  1
 )  /  2 )
 )  +  1 ) 
 mod  n )  -  1 ) ) ^
 ( n  pCnt  N ) ) ,  1 ) )   &    |-  Z  =  { x  e.  ZZ  |  ( abs `  x )  <_  1 }   =>    |-  ( ( A  e.  ZZ  /\  N  e.  ZZ )  ->  ( A  /L N )  e.  Z )
 
Theoremlgsfcl 15708* Closure of the function  F which defines the Legendre symbol at the primes. (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  F  =  ( n  e.  NN  |->  if ( n  e.  Prime ,  ( if ( n  =  2 ,  if ( 2 
 ||  A ,  0 ,  if ( ( A  mod  8 )  e.  { 1 ,  7 } ,  1 ,  -u 1 ) ) ,  ( ( ( ( A ^ (
 ( n  -  1
 )  /  2 )
 )  +  1 ) 
 mod  n )  -  1 ) ) ^
 ( n  pCnt  N ) ) ,  1 ) )   =>    |-  ( ( A  e.  ZZ  /\  N  e.  ZZ  /\  N  =/=  0 ) 
 ->  F : NN --> ZZ )
 
Theoremlgsfle1 15709* The function  F has magnitude less or equal to  1. (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  F  =  ( n  e.  NN  |->  if ( n  e.  Prime ,  ( if ( n  =  2 ,  if ( 2 
 ||  A ,  0 ,  if ( ( A  mod  8 )  e.  { 1 ,  7 } ,  1 ,  -u 1 ) ) ,  ( ( ( ( A ^ (
 ( n  -  1
 )  /  2 )
 )  +  1 ) 
 mod  n )  -  1 ) ) ^
 ( n  pCnt  N ) ) ,  1 ) )   =>    |-  ( ( ( A  e.  ZZ  /\  N  e.  ZZ  /\  N  =/=  0 )  /\  M  e.  NN )  ->  ( abs `  ( F `  M ) )  <_  1 )
 
Theoremlgsval2lem 15710* Lemma for lgsval2 15716. (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  F  =  ( n  e.  NN  |->  if ( n  e.  Prime ,  ( if ( n  =  2 ,  if ( 2 
 ||  A ,  0 ,  if ( ( A  mod  8 )  e.  { 1 ,  7 } ,  1 ,  -u 1 ) ) ,  ( ( ( ( A ^ (
 ( n  -  1
 )  /  2 )
 )  +  1 ) 
 mod  n )  -  1 ) ) ^
 ( n  pCnt  N ) ) ,  1 ) )   =>    |-  ( ( A  e.  ZZ  /\  N  e.  Prime ) 
 ->  ( A  /L N )  =  if ( N  =  2 ,  if ( 2  ||  A ,  0 ,  if ( ( A  mod  8 )  e.  { 1 ,  7 } , 
 1 ,  -u 1
 ) ) ,  (
 ( ( ( A ^ ( ( N  -  1 )  / 
 2 ) )  +  1 )  mod  N )  -  1 ) ) )
 
Theoremlgsval4lem 15711* Lemma for lgsval4 15720. (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  F  =  ( n  e.  NN  |->  if ( n  e.  Prime ,  ( if ( n  =  2 ,  if ( 2 
 ||  A ,  0 ,  if ( ( A  mod  8 )  e.  { 1 ,  7 } ,  1 ,  -u 1 ) ) ,  ( ( ( ( A ^ (
 ( n  -  1
 )  /  2 )
 )  +  1 ) 
 mod  n )  -  1 ) ) ^
 ( n  pCnt  N ) ) ,  1 ) )   =>    |-  ( ( A  e.  ZZ  /\  N  e.  ZZ  /\  N  =/=  0 ) 
 ->  F  =  ( n  e.  NN  |->  if ( n  e.  Prime ,  (
 ( A  /L
 n ) ^ ( n  pCnt  N ) ) ,  1 ) ) )
 
Theoremlgscl2 15712* The Legendre symbol is an integer with absolute value less than or equal to 1. (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  Z  =  { x  e.  ZZ  |  ( abs `  x )  <_  1 }   =>    |-  ( ( A  e.  ZZ  /\  N  e.  ZZ )  ->  ( A  /L N )  e.  Z )
 
Theoremlgs0 15713 The Legendre symbol when the second argument is zero. (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  ( A  e.  ZZ  ->  ( A  /L
 0 )  =  if ( ( A ^
 2 )  =  1 ,  1 ,  0 ) )
 
Theoremlgscl 15714 The Legendre symbol is an integer. (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  ( ( A  e.  ZZ  /\  N  e.  ZZ )  ->  ( A  /L N )  e.  ZZ )
 
Theoremlgsle1 15715 The Legendre symbol has absolute value less than or equal to 1. Together with lgscl 15714 this implies that it takes values in  { -u 1 ,  0 ,  1 }. (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  ( ( A  e.  ZZ  /\  N  e.  ZZ )  ->  ( abs `  ( A  /L N ) )  <_  1 )
 
Theoremlgsval2 15716 The Legendre symbol at a prime (this is the traditional domain of the Legendre symbol, except for the addition of prime  2). (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  ( ( A  e.  ZZ  /\  P  e.  Prime ) 
 ->  ( A  /L P )  =  if ( P  =  2 ,  if ( 2  ||  A ,  0 ,  if ( ( A  mod  8 )  e.  { 1 ,  7 } , 
 1 ,  -u 1
 ) ) ,  (
 ( ( ( A ^ ( ( P  -  1 )  / 
 2 ) )  +  1 )  mod  P )  -  1 ) ) )
 
Theoremlgs2 15717 The Legendre symbol at  2. (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  ( A  e.  ZZ  ->  ( A  /L
 2 )  =  if ( 2  ||  A ,  0 ,  if ( ( A  mod  8 )  e.  { 1 ,  7 } , 
 1 ,  -u 1
 ) ) )
 
Theoremlgsval3 15718 The Legendre symbol at an odd prime (this is the traditional domain of the Legendre symbol). (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  ( ( A  e.  ZZ  /\  P  e.  ( Prime  \  { 2 } ) )  ->  ( A  /L P )  =  ( ( ( ( A ^ (
 ( P  -  1
 )  /  2 )
 )  +  1 ) 
 mod  P )  -  1
 ) )
 
Theoremlgsvalmod 15719 The Legendre symbol is equivalent to 
a ^ ( ( p  -  1 )  /  2 ),  mod  p. This theorem is also called "Euler's criterion", see theorem 9.2 in [ApostolNT] p. 180, or a representation of Euler's criterion using the Legendre symbol, (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  ( ( A  e.  ZZ  /\  P  e.  ( Prime  \  { 2 } ) )  ->  (
 ( A  /L P )  mod  P )  =  ( ( A ^ ( ( P  -  1 )  / 
 2 ) )  mod  P ) )
 
Theoremlgsval4 15720* Restate lgsval 15704 for nonzero  N, where the function  F has been abbreviated into a self-referential expression taking the value of  /L on the primes as given. (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  F  =  ( n  e.  NN  |->  if ( n  e.  Prime ,  (
 ( A  /L
 n ) ^ ( n  pCnt  N ) ) ,  1 ) )   =>    |-  ( ( A  e.  ZZ  /\  N  e.  ZZ  /\  N  =/=  0 ) 
 ->  ( A  /L N )  =  ( if ( ( N  <  0 
 /\  A  <  0
 ) ,  -u 1 ,  1 )  x.  (  seq 1 (  x.  ,  F ) `
  ( abs `  N ) ) ) )
 
Theoremlgsfcl3 15721* Closure of the function  F which defines the Legendre symbol at the primes. (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  F  =  ( n  e.  NN  |->  if ( n  e.  Prime ,  (
 ( A  /L
 n ) ^ ( n  pCnt  N ) ) ,  1 ) )   =>    |-  ( ( A  e.  ZZ  /\  N  e.  ZZ  /\  N  =/=  0 ) 
 ->  F : NN --> ZZ )
 
Theoremlgsval4a 15722* Same as lgsval4 15720 for positive  N. (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  F  =  ( n  e.  NN  |->  if ( n  e.  Prime ,  (
 ( A  /L
 n ) ^ ( n  pCnt  N ) ) ,  1 ) )   =>    |-  ( ( A  e.  ZZ  /\  N  e.  NN )  ->  ( A  /L N )  =  ( 
 seq 1 (  x. 
 ,  F ) `  N ) )
 
Theoremlgscl1 15723 The value of the Legendre symbol is either -1 or 0 or 1. (Contributed by AV, 13-Jul-2021.)
 |-  ( ( A  e.  ZZ  /\  N  e.  ZZ )  ->  ( A  /L N )  e.  { -u 1 ,  0 ,  1 } )
 
Theoremlgsneg 15724 The Legendre symbol is either even or odd under negation with respect to the second parameter according to the sign of the first. (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  ( ( A  e.  ZZ  /\  N  e.  ZZ  /\  N  =/=  0 ) 
 ->  ( A  /L -u N )  =  ( if ( A  <  0 ,  -u 1 ,  1 )  x.  ( A 
 /L N ) ) )
 
Theoremlgsneg1 15725 The Legendre symbol for nonnegative first parameter is unchanged by negation of the second. (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  ( ( A  e.  NN0  /\  N  e.  ZZ )  ->  ( A  /L -u N )  =  ( A  /L N ) )
 
Theoremlgsmod 15726 The Legendre (Jacobi) symbol is preserved under reduction  mod  n when  n is odd. (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  ( ( A  e.  ZZ  /\  N  e.  NN  /\ 
 -.  2  ||  N )  ->  ( ( A 
 mod  N )  /L N )  =  ( A  /L N ) )
 
Theoremlgsdilem 15727 Lemma for lgsdi 15737 and lgsdir 15735: the sign part of the Legendre symbol is multiplicative. (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  ->  if ( ( N  <  0 
 /\  ( A  x.  B )  <  0 ) ,  -u 1 ,  1 )  =  ( if ( ( N  <  0 
 /\  A  <  0
 ) ,  -u 1 ,  1 )  x. 
 if ( ( N  <  0  /\  B  <  0 ) ,  -u 1 ,  1 ) ) )
 
Theoremlgsdir2lem1 15728 Lemma for lgsdir2 15733. (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  ( ( ( 1 
 mod  8 )  =  1  /\  ( -u 1  mod  8 )  =  7 )  /\  (
 ( 3  mod  8
 )  =  3  /\  ( -u 3  mod  8
 )  =  5 ) )
 
Theoremlgsdir2lem2 15729 Lemma for lgsdir2 15733. (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  ( K  e.  ZZ  /\  2  ||  ( K  +  1 )  /\  ( ( A  e.  ZZ  /\  -.  2  ||  A )  ->  ( ( A  mod  8 )  e.  ( 0 ...
 K )  ->  ( A  mod  8 )  e.  S ) ) )   &    |-  M  =  ( K  +  1 )   &    |-  N  =  ( M  +  1 )   &    |-  N  e.  S   =>    |-  ( N  e.  ZZ  /\  2  ||  ( N  +  1 )  /\  ( ( A  e.  ZZ  /\  -.  2  ||  A )  ->  ( ( A  mod  8 )  e.  (
 0 ... N )  ->  ( A  mod  8 )  e.  S ) ) )
 
Theoremlgsdir2lem3 15730 Lemma for lgsdir2 15733. (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  ( ( A  e.  ZZ  /\  -.  2  ||  A )  ->  ( A 
 mod  8 )  e.  ( { 1 ,  7 }  u.  {
 3 ,  5 } ) )
 
Theoremlgsdir2lem4 15731 Lemma for lgsdir2 15733. (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( A  mod  8 )  e. 
 { 1 ,  7 } )  ->  (
 ( ( A  x.  B )  mod  8 )  e.  { 1 ,  7 }  <->  ( B  mod  8 )  e.  { 1 ,  7 } )
 )
 
Theoremlgsdir2lem5 15732 Lemma for lgsdir2 15733. (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  (
 ( A  mod  8
 )  e.  { 3 ,  5 }  /\  ( B  mod  8 )  e.  { 3 ,  5 } ) ) 
 ->  ( ( A  x.  B )  mod  8 )  e.  { 1 ,  7 } )
 
Theoremlgsdir2 15733 The Legendre symbol is completely multiplicative at  2. (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( A  x.  B )  /L 2 )  =  ( ( A  /L 2 )  x.  ( B  /L
 2 ) ) )
 
Theoremlgsdirprm 15734 The Legendre symbol is completely multiplicative at the primes. See theorem 9.3 in [ApostolNT] p. 180. (Contributed by Mario Carneiro, 4-Feb-2015.) (Proof shortened by AV, 18-Mar-2022.)
 |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  ->  ( ( A  x.  B )  /L P )  =  ( ( A  /L P )  x.  ( B  /L P ) ) )
 
Theoremlgsdir 15735 The Legendre symbol is completely multiplicative in its left argument. Generalization of theorem 9.9(a) in [ApostolNT] p. 188 (which assumes that  A and  B are odd positive integers). (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  ->  ( ( A  x.  B )  /L N )  =  ( ( A  /L N )  x.  ( B  /L N ) ) )
 
Theoremlgsdilem2 15736* Lemma for lgsdi 15737. (Contributed by Mario Carneiro, 4-Feb-2015.)
 |-  ( ph  ->  A  e.  ZZ )   &    |-  ( ph  ->  M  e.  ZZ )   &    |-  ( ph  ->  N  e.  ZZ )   &    |-  ( ph  ->  M  =/=  0 )   &    |-  ( ph  ->  N  =/=  0 )   &    |-  F  =  ( n  e.  NN  |->  if ( n  e.  Prime ,  ( ( A  /L n ) ^
 ( n  pCnt  M ) ) ,  1 ) )   =>    |-  ( ph  ->  (  seq 1 (  x.  ,  F ) `  ( abs `  M ) )  =  (  seq 1
 (  x.  ,  F ) `  ( abs `  ( M  x.  N ) ) ) )
 
Theoremlgsdi 15737 The Legendre symbol is completely multiplicative in its right argument. Generalization of theorem 9.9(b) in [ApostolNT] p. 188 (which assumes that  M and  N are odd positive integers). (Contributed by Mario Carneiro, 5-Feb-2015.)
 |-  ( ( ( A  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =/=  0  /\  N  =/=  0 ) )  ->  ( A  /L ( M  x.  N ) )  =  ( ( A  /L M )  x.  ( A  /L N ) ) )
 
Theoremlgsne0 15738 The Legendre symbol is nonzero (and hence equal to  1 or  -u 1) precisely when the arguments are coprime. (Contributed by Mario Carneiro, 5-Feb-2015.)
 |-  ( ( A  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( A 
 /L N )  =/=  0  <->  ( A  gcd  N )  =  1 ) )
 
Theoremlgsabs1 15739 The Legendre symbol is nonzero (and hence equal to  1 or  -u 1) precisely when the arguments are coprime. (Contributed by Mario Carneiro, 5-Feb-2015.)
 |-  ( ( A  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( abs `  ( A  /L N ) )  =  1  <->  ( A  gcd  N )  =  1 ) )
 
Theoremlgssq 15740 The Legendre symbol at a square is equal to  1. Together with lgsmod 15726 this implies that the Legendre symbol takes value  1 at every quadratic residue. (Contributed by Mario Carneiro, 5-Feb-2015.) (Revised by AV, 20-Jul-2021.)
 |-  ( ( ( A  e.  ZZ  /\  A  =/=  0 )  /\  N  e.  ZZ  /\  ( A 
 gcd  N )  =  1 )  ->  ( ( A ^ 2 )  /L N )  =  1 )
 
Theoremlgssq2 15741 The Legendre symbol at a square is equal to  1. (Contributed by Mario Carneiro, 5-Feb-2015.)
 |-  ( ( A  e.  ZZ  /\  N  e.  NN  /\  ( A  gcd  N )  =  1 )  ->  ( A  /L
 ( N ^ 2
 ) )  =  1 )
 
Theoremlgsprme0 15742 The Legendre symbol at any prime (even at 2) is  0 iff the prime does not divide the first argument. See definition in [ApostolNT] p. 179. (Contributed by AV, 20-Jul-2021.)
 |-  ( ( A  e.  ZZ  /\  P  e.  Prime ) 
 ->  ( ( A  /L P )  =  0  <-> 
 ( A  mod  P )  =  0 )
 )
 
Theorem1lgs 15743 The Legendre symbol at  1. See example 1 in [ApostolNT] p. 180. (Contributed by Mario Carneiro, 28-Apr-2016.)
 |-  ( N  e.  ZZ  ->  ( 1  /L N )  =  1
 )
 
Theoremlgs1 15744 The Legendre symbol at  1. See definition in [ApostolNT] p. 188. (Contributed by Mario Carneiro, 28-Apr-2016.)
 |-  ( A  e.  ZZ  ->  ( A  /L
 1 )  =  1 )
 
Theoremlgsmodeq 15745 The Legendre (Jacobi) symbol is preserved under reduction  mod  n when  n is odd. Theorem 9.9(c) in [ApostolNT] p. 188. (Contributed by AV, 20-Jul-2021.)
 |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  ( N  e.  NN  /\ 
 -.  2  ||  N ) )  ->  ( ( A  mod  N )  =  ( B  mod  N )  ->  ( A  /L N )  =  ( B  /L N ) ) )
 
Theoremlgsmulsqcoprm 15746 The Legendre (Jacobi) symbol is preserved under multiplication with a square of an integer coprime to the second argument. Theorem 9.9(d) in [ApostolNT] p. 188. (Contributed by AV, 20-Jul-2021.)
 |-  ( ( ( A  e.  ZZ  /\  A  =/=  0 )  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  ( N  e.  ZZ  /\  ( A  gcd  N )  =  1 ) )  ->  ( ( ( A ^ 2 )  x.  B )  /L N )  =  ( B  /L N ) )
 
Theoremlgsdirnn0 15747 Variation on lgsdir 15735 valid for all  A ,  B but only for positive  N. (The exact location of the failure of this law is for  A  =  0,  B  <  0,  N  =  -u 1 in which case  ( 0  /L -u 1
)  =  1 but  ( B  /L -u 1 )  = 
-u 1.) (Contributed by Mario Carneiro, 28-Apr-2016.)
 |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  NN0 )  ->  ( ( A  x.  B )  /L N )  =  ( ( A  /L N )  x.  ( B  /L N ) ) )
 
Theoremlgsdinn0 15748 Variation on lgsdi 15737 valid for all  M ,  N but only for positive  A. (The exact location of the failure of this law is for  A  =  -u
1,  M  =  0, and some  N in which case  ( -u 1  /L 0 )  =  1 but  ( -u 1  /L N )  = 
-u 1 when  -u 1 is not a quadratic residue mod  N.) (Contributed by Mario Carneiro, 28-Apr-2016.)
 |-  ( ( A  e.  NN0  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( A  /L
 ( M  x.  N ) )  =  (
 ( A  /L M )  x.  ( A  /L N ) ) )
 
11.3.5  Gauss' Lemma

Gauss' Lemma is valid for any integer not dividing the given prime number. In the following, only the special case for 2 (not dividing any odd prime) is proven, see gausslemma2d 15769. The general case is still to prove.

 
Theoremgausslemma2dlem0a 15749 Auxiliary lemma 1 for gausslemma2d 15769. (Contributed by AV, 9-Jul-2021.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   =>    |-  ( ph  ->  P  e.  NN )
 
Theoremgausslemma2dlem0b 15750 Auxiliary lemma 2 for gausslemma2d 15769. (Contributed by AV, 9-Jul-2021.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  H  =  ( ( P  -  1 )  /  2
 )   =>    |-  ( ph  ->  H  e.  NN )
 
Theoremgausslemma2dlem0c 15751 Auxiliary lemma 3 for gausslemma2d 15769. (Contributed by AV, 13-Jul-2021.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  H  =  ( ( P  -  1 )  /  2
 )   =>    |-  ( ph  ->  (
 ( ! `  H )  gcd  P )  =  1 )
 
Theoremgausslemma2dlem0d 15752 Auxiliary lemma 4 for gausslemma2d 15769. (Contributed by AV, 9-Jul-2021.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  M  =  ( |_ `  ( P  /  4 ) )   =>    |-  ( ph  ->  M  e.  NN0 )
 
Theoremgausslemma2dlem0e 15753 Auxiliary lemma 5 for gausslemma2d 15769. (Contributed by AV, 9-Jul-2021.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  M  =  ( |_ `  ( P  /  4 ) )   =>    |-  ( ph  ->  ( M  x.  2 )  <  ( P  /  2 ) )
 
Theoremgausslemma2dlem0f 15754 Auxiliary lemma 6 for gausslemma2d 15769. (Contributed by AV, 9-Jul-2021.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  M  =  ( |_ `  ( P  /  4 ) )   &    |-  H  =  ( ( P  -  1 )  / 
 2 )   =>    |-  ( ph  ->  ( M  +  1 )  <_  H )
 
Theoremgausslemma2dlem0g 15755 Auxiliary lemma 7 for gausslemma2d 15769. (Contributed by AV, 9-Jul-2021.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  M  =  ( |_ `  ( P  /  4 ) )   &    |-  H  =  ( ( P  -  1 )  / 
 2 )   =>    |-  ( ph  ->  M  <_  H )
 
Theoremgausslemma2dlem0h 15756 Auxiliary lemma 8 for gausslemma2d 15769. (Contributed by AV, 9-Jul-2021.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  M  =  ( |_ `  ( P  /  4 ) )   &    |-  H  =  ( ( P  -  1 )  / 
 2 )   &    |-  N  =  ( H  -  M )   =>    |-  ( ph  ->  N  e.  NN0 )
 
Theoremgausslemma2dlem0i 15757 Auxiliary lemma 9 for gausslemma2d 15769. (Contributed by AV, 14-Jul-2021.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  M  =  ( |_ `  ( P  /  4 ) )   &    |-  H  =  ( ( P  -  1 )  / 
 2 )   &    |-  N  =  ( H  -  M )   =>    |-  ( ph  ->  ( (
 ( 2  /L P )  mod  P )  =  ( ( -u 1 ^ N )  mod  P )  ->  ( 2  /L P )  =  ( -u 1 ^ N ) ) )
 
Theoremgausslemma2dlem1a 15758* Lemma for gausslemma2dlem1 15761. (Contributed by AV, 1-Jul-2021.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  H  =  ( ( P  -  1 )  /  2
 )   &    |-  R  =  ( x  e.  ( 1 ...
 H )  |->  if (
 ( x  x.  2
 )  <  ( P  /  2 ) ,  ( x  x.  2 ) ,  ( P  -  ( x  x.  2 ) ) ) )   =>    |-  ( ph  ->  ran  R  =  ( 1 ... H ) )
 
Theoremgausslemma2dlem1cl 15759 Lemma for gausslemma2dlem1 15761. Closure of the body of the definition of  R. (Contributed by Jim Kingdon, 10-Aug-2025.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  H  =  ( ( P  -  1 )  /  2
 )   &    |-  R  =  ( x  e.  ( 1 ...
 H )  |->  if (
 ( x  x.  2
 )  <  ( P  /  2 ) ,  ( x  x.  2 ) ,  ( P  -  ( x  x.  2 ) ) ) )   &    |-  ( ph  ->  A  e.  ( 1 ...
 H ) )   =>    |-  ( ph  ->  if ( ( A  x.  2 )  <  ( P 
 /  2 ) ,  ( A  x.  2
 ) ,  ( P  -  ( A  x.  2 ) ) )  e.  ZZ )
 
Theoremgausslemma2dlem1f1o 15760* Lemma for gausslemma2dlem1 15761. (Contributed by Jim Kingdon, 9-Aug-2025.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  H  =  ( ( P  -  1 )  /  2
 )   &    |-  R  =  ( x  e.  ( 1 ...
 H )  |->  if (
 ( x  x.  2
 )  <  ( P  /  2 ) ,  ( x  x.  2 ) ,  ( P  -  ( x  x.  2 ) ) ) )   =>    |-  ( ph  ->  R : ( 1 ...
 H ) -1-1-onto-> ( 1 ... H ) )
 
Theoremgausslemma2dlem1 15761* Lemma 1 for gausslemma2d 15769. (Contributed by AV, 5-Jul-2021.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  H  =  ( ( P  -  1 )  /  2
 )   &    |-  R  =  ( x  e.  ( 1 ...
 H )  |->  if (
 ( x  x.  2
 )  <  ( P  /  2 ) ,  ( x  x.  2 ) ,  ( P  -  ( x  x.  2 ) ) ) )   =>    |-  ( ph  ->  ( ! `  H )  = 
 prod_ k  e.  (
 1 ... H ) ( R `  k ) )
 
Theoremgausslemma2dlem2 15762* Lemma 2 for gausslemma2d 15769. (Contributed by AV, 4-Jul-2021.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  H  =  ( ( P  -  1 )  /  2
 )   &    |-  R  =  ( x  e.  ( 1 ...
 H )  |->  if (
 ( x  x.  2
 )  <  ( P  /  2 ) ,  ( x  x.  2 ) ,  ( P  -  ( x  x.  2 ) ) ) )   &    |-  M  =  ( |_ `  ( P 
 /  4 ) )   =>    |-  ( ph  ->  A. k  e.  ( 1 ... M ) ( R `  k )  =  (
 k  x.  2 ) )
 
Theoremgausslemma2dlem3 15763* Lemma 3 for gausslemma2d 15769. (Contributed by AV, 4-Jul-2021.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  H  =  ( ( P  -  1 )  /  2
 )   &    |-  R  =  ( x  e.  ( 1 ...
 H )  |->  if (
 ( x  x.  2
 )  <  ( P  /  2 ) ,  ( x  x.  2 ) ,  ( P  -  ( x  x.  2 ) ) ) )   &    |-  M  =  ( |_ `  ( P 
 /  4 ) )   =>    |-  ( ph  ->  A. k  e.  ( ( M  +  1 ) ... H ) ( R `  k )  =  ( P  -  ( k  x.  2 ) ) )
 
Theoremgausslemma2dlem4 15764* Lemma 4 for gausslemma2d 15769. (Contributed by AV, 16-Jun-2021.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  H  =  ( ( P  -  1 )  /  2
 )   &    |-  R  =  ( x  e.  ( 1 ...
 H )  |->  if (
 ( x  x.  2
 )  <  ( P  /  2 ) ,  ( x  x.  2 ) ,  ( P  -  ( x  x.  2 ) ) ) )   &    |-  M  =  ( |_ `  ( P 
 /  4 ) )   =>    |-  ( ph  ->  ( ! `  H )  =  (
 prod_ k  e.  (
 1 ... M ) ( R `  k )  x.  prod_ k  e.  (
 ( M  +  1 ) ... H ) ( R `  k
 ) ) )
 
Theoremgausslemma2dlem5a 15765* Lemma for gausslemma2dlem5 15766. (Contributed by AV, 8-Jul-2021.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  H  =  ( ( P  -  1 )  /  2
 )   &    |-  R  =  ( x  e.  ( 1 ...
 H )  |->  if (
 ( x  x.  2
 )  <  ( P  /  2 ) ,  ( x  x.  2 ) ,  ( P  -  ( x  x.  2 ) ) ) )   &    |-  M  =  ( |_ `  ( P 
 /  4 ) )   =>    |-  ( ph  ->  ( prod_ k  e.  ( ( M  +  1 ) ... H ) ( R `  k )  mod  P )  =  ( prod_ k  e.  ( ( M  +  1 ) ... H ) ( -u 1  x.  ( k  x.  2
 ) )  mod  P ) )
 
Theoremgausslemma2dlem5 15766* Lemma 5 for gausslemma2d 15769. (Contributed by AV, 9-Jul-2021.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  H  =  ( ( P  -  1 )  /  2
 )   &    |-  R  =  ( x  e.  ( 1 ...
 H )  |->  if (
 ( x  x.  2
 )  <  ( P  /  2 ) ,  ( x  x.  2 ) ,  ( P  -  ( x  x.  2 ) ) ) )   &    |-  M  =  ( |_ `  ( P 
 /  4 ) )   &    |-  N  =  ( H  -  M )   =>    |-  ( ph  ->  ( prod_ k  e.  ( ( M  +  1 )
 ... H ) ( R `  k ) 
 mod  P )  =  ( ( ( -u 1 ^ N )  x.  prod_ k  e.  ( ( M  +  1 ) ... H ) ( k  x.  2 ) )  mod  P ) )
 
Theoremgausslemma2dlem6 15767* Lemma 6 for gausslemma2d 15769. (Contributed by AV, 16-Jun-2021.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  H  =  ( ( P  -  1 )  /  2
 )   &    |-  R  =  ( x  e.  ( 1 ...
 H )  |->  if (
 ( x  x.  2
 )  <  ( P  /  2 ) ,  ( x  x.  2 ) ,  ( P  -  ( x  x.  2 ) ) ) )   &    |-  M  =  ( |_ `  ( P 
 /  4 ) )   &    |-  N  =  ( H  -  M )   =>    |-  ( ph  ->  (
 ( ! `  H )  mod  P )  =  ( ( ( (
 -u 1 ^ N )  x.  ( 2 ^ H ) )  x.  ( ! `  H ) )  mod  P ) )
 
Theoremgausslemma2dlem7 15768* Lemma 7 for gausslemma2d 15769. (Contributed by AV, 13-Jul-2021.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  H  =  ( ( P  -  1 )  /  2
 )   &    |-  R  =  ( x  e.  ( 1 ...
 H )  |->  if (
 ( x  x.  2
 )  <  ( P  /  2 ) ,  ( x  x.  2 ) ,  ( P  -  ( x  x.  2 ) ) ) )   &    |-  M  =  ( |_ `  ( P 
 /  4 ) )   &    |-  N  =  ( H  -  M )   =>    |-  ( ph  ->  (
 ( ( -u 1 ^ N )  x.  (
 2 ^ H ) )  mod  P )  =  1 )
 
Theoremgausslemma2d 15769* Gauss' Lemma (see also theorem 9.6 in [ApostolNT] p. 182) for integer  2: Let p be an odd prime. Let S = {2, 4, 6, ..., p - 1}. Let n denote the number of elements of S whose least positive residue modulo p is greater than p/2. Then ( 2 | p ) = (-1)^n. (Contributed by AV, 14-Jul-2021.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  H  =  ( ( P  -  1 )  /  2
 )   &    |-  R  =  ( x  e.  ( 1 ...
 H )  |->  if (
 ( x  x.  2
 )  <  ( P  /  2 ) ,  ( x  x.  2 ) ,  ( P  -  ( x  x.  2 ) ) ) )   &    |-  M  =  ( |_ `  ( P 
 /  4 ) )   &    |-  N  =  ( H  -  M )   =>    |-  ( ph  ->  (
 2  /L P )  =  ( -u 1 ^ N ) )
 
11.3.6  Quadratic reciprocity
 
Theoremlgseisenlem1 15770* Lemma for lgseisen 15774. If  R ( u )  =  ( Q  x.  u )  mod  P and  M ( u )  =  ( -u
1 ^ R ( u ) )  x.  R ( u ), then for any even  1  <_  u  <_  P  -  1,  M ( u ) is also an even integer  1  <_  M
( u )  <_  P  -  1. To simplify these statements, we divide all the even numbers by  2, so that it becomes the statement that  M ( x  /  2 )  =  ( -u 1 ^ R ( x  / 
2 ) )  x.  R ( x  / 
2 )  /  2 is an integer between  1 and  ( P  -  1 )  / 
2. (Contributed by Mario Carneiro, 17-Jun-2015.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  ( ph  ->  Q  e.  ( Prime  \  { 2 } ) )   &    |-  ( ph  ->  P  =/=  Q )   &    |-  R  =  ( ( Q  x.  ( 2  x.  x ) )  mod  P )   &    |-  M  =  ( x  e.  ( 1 ... (
 ( P  -  1
 )  /  2 )
 )  |->  ( ( ( ( -u 1 ^ R )  x.  R )  mod  P )  /  2 ) )   =>    |-  ( ph  ->  M : ( 1 ... ( ( P  -  1 )  /  2
 ) ) --> ( 1
 ... ( ( P  -  1 )  / 
 2 ) ) )
 
Theoremlgseisenlem2 15771* Lemma for lgseisen 15774. The function  M is an injection (and hence a bijection by the pigeonhole principle). (Contributed by Mario Carneiro, 17-Jun-2015.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  ( ph  ->  Q  e.  ( Prime  \  { 2 } ) )   &    |-  ( ph  ->  P  =/=  Q )   &    |-  R  =  ( ( Q  x.  ( 2  x.  x ) )  mod  P )   &    |-  M  =  ( x  e.  ( 1 ... (
 ( P  -  1
 )  /  2 )
 )  |->  ( ( ( ( -u 1 ^ R )  x.  R )  mod  P )  /  2 ) )   &    |-  S  =  ( ( Q  x.  (
 2  x.  y ) )  mod  P )   =>    |-  ( ph  ->  M :
 ( 1 ... (
 ( P  -  1
 )  /  2 )
 )
 -1-1-onto-> ( 1 ... (
 ( P  -  1
 )  /  2 )
 ) )
 
Theoremlgseisenlem3 15772* Lemma for lgseisen 15774. (Contributed by Mario Carneiro, 17-Jun-2015.) (Proof shortened by AV, 28-Jul-2019.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  ( ph  ->  Q  e.  ( Prime  \  { 2 } ) )   &    |-  ( ph  ->  P  =/=  Q )   &    |-  R  =  ( ( Q  x.  ( 2  x.  x ) )  mod  P )   &    |-  M  =  ( x  e.  ( 1 ... (
 ( P  -  1
 )  /  2 )
 )  |->  ( ( ( ( -u 1 ^ R )  x.  R )  mod  P )  /  2 ) )   &    |-  S  =  ( ( Q  x.  (
 2  x.  y ) )  mod  P )   &    |-  Y  =  (ℤ/n `  P )   &    |-  G  =  (mulGrp `  Y )   &    |-  L  =  ( ZRHom `  Y )   =>    |-  ( ph  ->  ( G  gsumg  ( x  e.  ( 1 ... ( ( P  -  1 )  /  2
 ) )  |->  ( L `
  ( ( -u 1 ^ R )  x.  Q ) ) ) )  =  ( 1r
 `  Y ) )
 
Theoremlgseisenlem4 15773* Lemma for lgseisen 15774. (Contributed by Mario Carneiro, 18-Jun-2015.) (Proof shortened by AV, 15-Jun-2019.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  ( ph  ->  Q  e.  ( Prime  \  { 2 } ) )   &    |-  ( ph  ->  P  =/=  Q )   &    |-  R  =  ( ( Q  x.  ( 2  x.  x ) )  mod  P )   &    |-  M  =  ( x  e.  ( 1 ... (
 ( P  -  1
 )  /  2 )
 )  |->  ( ( ( ( -u 1 ^ R )  x.  R )  mod  P )  /  2 ) )   &    |-  S  =  ( ( Q  x.  (
 2  x.  y ) )  mod  P )   &    |-  Y  =  (ℤ/n `  P )   &    |-  G  =  (mulGrp `  Y )   &    |-  L  =  ( ZRHom `  Y )   =>    |-  ( ph  ->  ( ( Q ^ ( ( P  -  1 )  / 
 2 ) )  mod  P )  =  ( (
 -u 1 ^ sum_ x  e.  ( 1 ... ( ( P  -  1 )  /  2
 ) ) ( |_ `  ( ( Q  /  P )  x.  (
 2  x.  x ) ) ) )  mod  P ) )
 
Theoremlgseisen 15774* Eisenstein's lemma, an expression for 
( P  /L
Q ) when  P ,  Q are distinct odd primes. (Contributed by Mario Carneiro, 18-Jun-2015.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  ( ph  ->  Q  e.  ( Prime  \  { 2 } ) )   &    |-  ( ph  ->  P  =/=  Q )   =>    |-  ( ph  ->  ( Q  /L P )  =  ( -u 1 ^ sum_ x  e.  (
 1 ... ( ( P  -  1 )  / 
 2 ) ) ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x ) ) ) ) )
 
Theoremlgsquadlemsfi 15775* Lemma for lgsquad 15780. 
S is finite. (Contributed by Jim Kingdon, 16-Sep-2025.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  ( ph  ->  Q  e.  ( Prime  \  { 2 } ) )   &    |-  ( ph  ->  P  =/=  Q )   &    |-  M  =  ( ( P  -  1 )  /  2
 )   &    |-  N  =  ( ( Q  -  1 ) 
 /  2 )   &    |-  S  =  { <. x ,  y >.  |  ( ( x  e.  ( 1 ...
 M )  /\  y  e.  ( 1 ... N ) )  /\  ( y  x.  P )  < 
 ( x  x.  Q ) ) }   =>    |-  ( ph  ->  S  e.  Fin )
 
Theoremlgsquadlemofi 15776* Lemma for lgsquad 15780. There are finitely many members of  S with odd first part. (Contributed by Jim Kingdon, 16-Sep-2025.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  ( ph  ->  Q  e.  ( Prime  \  { 2 } ) )   &    |-  ( ph  ->  P  =/=  Q )   &    |-  M  =  ( ( P  -  1 )  /  2
 )   &    |-  N  =  ( ( Q  -  1 ) 
 /  2 )   &    |-  S  =  { <. x ,  y >.  |  ( ( x  e.  ( 1 ...
 M )  /\  y  e.  ( 1 ... N ) )  /\  ( y  x.  P )  < 
 ( x  x.  Q ) ) }   =>    |-  ( ph  ->  { z  e.  S  |  -.  2  ||  ( 1st `  z ) }  e.  Fin )
 
Theoremlgsquadlem1 15777* Lemma for lgsquad 15780. Count the members of  S with odd coordinates. (Contributed by Mario Carneiro, 19-Jun-2015.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  ( ph  ->  Q  e.  ( Prime  \  { 2 } ) )   &    |-  ( ph  ->  P  =/=  Q )   &    |-  M  =  ( ( P  -  1 )  /  2
 )   &    |-  N  =  ( ( Q  -  1 ) 
 /  2 )   &    |-  S  =  { <. x ,  y >.  |  ( ( x  e.  ( 1 ...
 M )  /\  y  e.  ( 1 ... N ) )  /\  ( y  x.  P )  < 
 ( x  x.  Q ) ) }   =>    |-  ( ph  ->  (
 -u 1 ^ sum_ u  e.  ( ( ( |_ `  ( M 
 /  2 ) )  +  1 ) ... M ) ( |_ `  (
 ( Q  /  P )  x.  ( 2  x.  u ) ) ) )  =  ( -u 1 ^ ( `  { z  e.  S  |  -.  2  ||  ( 1st `  z
 ) } ) ) )
 
Theoremlgsquadlem2 15778* Lemma for lgsquad 15780. Count the members of  S with even coordinates, and combine with lgsquadlem1 15777 to get the total count of lattice points in  S (up to parity). (Contributed by Mario Carneiro, 18-Jun-2015.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  ( ph  ->  Q  e.  ( Prime  \  { 2 } ) )   &    |-  ( ph  ->  P  =/=  Q )   &    |-  M  =  ( ( P  -  1 )  /  2
 )   &    |-  N  =  ( ( Q  -  1 ) 
 /  2 )   &    |-  S  =  { <. x ,  y >.  |  ( ( x  e.  ( 1 ...
 M )  /\  y  e.  ( 1 ... N ) )  /\  ( y  x.  P )  < 
 ( x  x.  Q ) ) }   =>    |-  ( ph  ->  ( Q  /L P )  =  ( -u 1 ^ ( `  S )
 ) )
 
Theoremlgsquadlem3 15779* Lemma for lgsquad 15780. (Contributed by Mario Carneiro, 18-Jun-2015.)
 |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )   &    |-  ( ph  ->  Q  e.  ( Prime  \  { 2 } ) )   &    |-  ( ph  ->  P  =/=  Q )   &    |-  M  =  ( ( P  -  1 )  /  2
 )   &    |-  N  =  ( ( Q  -  1 ) 
 /  2 )   &    |-  S  =  { <. x ,  y >.  |  ( ( x  e.  ( 1 ...
 M )  /\  y  e.  ( 1 ... N ) )  /\  ( y  x.  P )  < 
 ( x  x.  Q ) ) }   =>    |-  ( ph  ->  ( ( P  /L Q )  x.  ( Q  /L P ) )  =  ( -u 1 ^ ( M  x.  N ) ) )
 
Theoremlgsquad 15780 The Law of Quadratic Reciprocity, see also theorem 9.8 in [ApostolNT] p. 185. If  P and  Q are distinct odd primes, then the product of the Legendre symbols  ( P  /L
Q ) and  ( Q  /L P ) is the parity of  ( ( P  -  1 )  /  2 )  x.  ( ( Q  - 
1 )  /  2
). This uses Eisenstein's proof, which also has a nice geometric interpretation - see https://en.wikipedia.org/wiki/Proofs_of_quadratic_reciprocity. This is Metamath 100 proof #7. (Contributed by Mario Carneiro, 19-Jun-2015.)
 |-  ( ( P  e.  ( Prime  \  { 2 } )  /\  Q  e.  ( Prime  \  { 2 } )  /\  P  =/=  Q )  ->  ( ( P  /L Q )  x.  ( Q  /L P ) )  =  ( -u 1 ^ (
 ( ( P  -  1 )  /  2
 )  x.  ( ( Q  -  1 ) 
 /  2 ) ) ) )
 
Theoremlgsquad2lem1 15781 Lemma for lgsquad2 15783. (Contributed by Mario Carneiro, 19-Jun-2015.)
 |-  ( ph  ->  M  e.  NN )   &    |-  ( ph  ->  -.  2  ||  M )   &    |-  ( ph  ->  N  e.  NN )   &    |-  ( ph  ->  -.  2  ||  N )   &    |-  ( ph  ->  ( M  gcd  N )  =  1 )   &    |-  ( ph  ->  A  e.  NN )   &    |-  ( ph  ->  B  e.  NN )   &    |-  ( ph  ->  ( A  x.  B )  =  M )   &    |-  ( ph  ->  ( ( A 
 /L N )  x.  ( N  /L A ) )  =  ( -u 1 ^ (
 ( ( A  -  1 )  /  2
 )  x.  ( ( N  -  1 ) 
 /  2 ) ) ) )   &    |-  ( ph  ->  ( ( B  /L N )  x.  ( N  /L B ) )  =  ( -u 1 ^ ( ( ( B  -  1 ) 
 /  2 )  x.  ( ( N  -  1 )  /  2
 ) ) ) )   =>    |-  ( ph  ->  ( ( M  /L N )  x.  ( N  /L M ) )  =  ( -u 1 ^ (
 ( ( M  -  1 )  /  2
 )  x.  ( ( N  -  1 ) 
 /  2 ) ) ) )
 
Theoremlgsquad2lem2 15782* Lemma for lgsquad2 15783. (Contributed by Mario Carneiro, 19-Jun-2015.)
 |-  ( ph  ->  M  e.  NN )   &    |-  ( ph  ->  -.  2  ||  M )   &    |-  ( ph  ->  N  e.  NN )   &    |-  ( ph  ->  -.  2  ||  N )   &    |-  ( ph  ->  ( M  gcd  N )  =  1 )   &    |-  (
 ( ph  /\  ( m  e.  ( Prime  \  {
 2 } )  /\  ( m  gcd  N )  =  1 ) ) 
 ->  ( ( m  /L N )  x.  ( N  /L m ) )  =  ( -u 1 ^ ( ( ( m  -  1 ) 
 /  2 )  x.  ( ( N  -  1 )  /  2
 ) ) ) )   &    |-  ( ps  <->  A. x  e.  (
 1 ... k ) ( ( x  gcd  (
 2  x.  N ) )  =  1  ->  ( ( x  /L N )  x.  ( N  /L x ) )  =  ( -u 1 ^ ( ( ( x  -  1 ) 
 /  2 )  x.  ( ( N  -  1 )  /  2
 ) ) ) ) )   =>    |-  ( ph  ->  (
 ( M  /L N )  x.  ( N  /L M ) )  =  ( -u 1 ^ ( ( ( M  -  1 ) 
 /  2 )  x.  ( ( N  -  1 )  /  2
 ) ) ) )
 
Theoremlgsquad2 15783 Extend lgsquad 15780 to coprime odd integers (the domain of the Jacobi symbol). (Contributed by Mario Carneiro, 19-Jun-2015.)
 |-  ( ph  ->  M  e.  NN )   &    |-  ( ph  ->  -.  2  ||  M )   &    |-  ( ph  ->  N  e.  NN )   &    |-  ( ph  ->  -.  2  ||  N )   &    |-  ( ph  ->  ( M  gcd  N )  =  1 )   =>    |-  ( ph  ->  ( ( M  /L N )  x.  ( N  /L M ) )  =  ( -u 1 ^ ( ( ( M  -  1 ) 
 /  2 )  x.  ( ( N  -  1 )  /  2
 ) ) ) )
 
Theoremlgsquad3 15784 Extend lgsquad2 15783 to integers which share a factor. (Contributed by Mario Carneiro, 19-Jun-2015.)
 |-  ( ( ( M  e.  NN  /\  -.  2  ||  M )  /\  ( N  e.  NN  /\ 
 -.  2  ||  N ) )  ->  ( M 
 /L N )  =  ( ( -u 1 ^ ( ( ( M  -  1 ) 
 /  2 )  x.  ( ( N  -  1 )  /  2
 ) ) )  x.  ( N  /L M ) ) )
 
Theoremm1lgs 15785 The first supplement to the law of quadratic reciprocity. Negative one is a square mod an odd prime  P iff  P  ==  1 (mod  4). See first case of theorem 9.4 in [ApostolNT] p. 181. (Contributed by Mario Carneiro, 19-Jun-2015.)
 |-  ( P  e.  ( Prime  \  { 2 } )  ->  ( ( -u 1  /L P )  =  1  <->  ( P  mod  4 )  =  1
 ) )
 
Theorem2lgslem1a1 15786* Lemma 1 for 2lgslem1a 15788. (Contributed by AV, 16-Jun-2021.)
 |-  ( ( P  e.  NN  /\  -.  2  ||  P )  ->  A. i  e.  ( 1 ... (
 ( P  -  1
 )  /  2 )
 ) ( i  x.  2 )  =  ( ( i  x.  2
 )  mod  P )
 )
 
Theorem2lgslem1a2 15787 Lemma 2 for 2lgslem1a 15788. (Contributed by AV, 18-Jun-2021.)
 |-  ( ( N  e.  ZZ  /\  I  e.  ZZ )  ->  ( ( |_ `  ( N  /  4
 ) )  <  I  <->  ( N  /  2 )  <  ( I  x.  2 ) ) )
 
Theorem2lgslem1a 15788* Lemma 1 for 2lgslem1 15791. (Contributed by AV, 18-Jun-2021.)
 |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  ->  { x  e.  ZZ  |  E. i  e.  ( 1 ... (
 ( P  -  1
 )  /  2 )
 ) ( x  =  ( i  x.  2
 )  /\  ( P  /  2 )  <  ( x  mod  P ) ) }  =  { x  e.  ZZ  |  E. i  e.  ( ( ( |_ `  ( P  /  4
 ) )  +  1 ) ... ( ( P  -  1 ) 
 /  2 ) ) x  =  ( i  x.  2 ) }
 )
 
Theorem2lgslem1b 15789* Lemma 2 for 2lgslem1 15791. (Contributed by AV, 18-Jun-2021.)
 |-  I  =  ( A
 ... B )   &    |-  F  =  ( j  e.  I  |->  ( j  x.  2
 ) )   =>    |-  F : I -1-1-onto-> { x  e.  ZZ  |  E. i  e.  I  x  =  ( i  x.  2
 ) }
 
Theorem2lgslem1c 15790 Lemma 3 for 2lgslem1 15791. (Contributed by AV, 19-Jun-2021.)
 |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  ->  ( |_ `  ( P  /  4
 ) )  <_  (
 ( P  -  1
 )  /  2 )
 )
 
Theorem2lgslem1 15791* Lemma 1 for 2lgs 15804. (Contributed by AV, 19-Jun-2021.)
 |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  ->  ( `  { x  e.  ZZ  |  E. i  e.  ( 1 ... (
 ( P  -  1
 )  /  2 )
 ) ( x  =  ( i  x.  2
 )  /\  ( P  /  2 )  <  ( x  mod  P ) ) } )  =  ( ( ( P  -  1 )  /  2
 )  -  ( |_ `  ( P  /  4
 ) ) ) )
 
Theorem2lgslem2 15792 Lemma 2 for 2lgs 15804. (Contributed by AV, 20-Jun-2021.)
 |-  N  =  ( ( ( P  -  1
 )  /  2 )  -  ( |_ `  ( P  /  4 ) ) )   =>    |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  ->  N  e.  ZZ )
 
Theorem2lgslem3a 15793 Lemma for 2lgslem3a1 15797. (Contributed by AV, 14-Jul-2021.)
 |-  N  =  ( ( ( P  -  1
 )  /  2 )  -  ( |_ `  ( P  /  4 ) ) )   =>    |-  ( ( K  e.  NN0  /\  P  =  ( ( 8  x.  K )  +  1 ) ) 
 ->  N  =  ( 2  x.  K ) )
 
Theorem2lgslem3b 15794 Lemma for 2lgslem3b1 15798. (Contributed by AV, 16-Jul-2021.)
 |-  N  =  ( ( ( P  -  1
 )  /  2 )  -  ( |_ `  ( P  /  4 ) ) )   =>    |-  ( ( K  e.  NN0  /\  P  =  ( ( 8  x.  K )  +  3 ) ) 
 ->  N  =  ( ( 2  x.  K )  +  1 ) )
 
Theorem2lgslem3c 15795 Lemma for 2lgslem3c1 15799. (Contributed by AV, 16-Jul-2021.)
 |-  N  =  ( ( ( P  -  1
 )  /  2 )  -  ( |_ `  ( P  /  4 ) ) )   =>    |-  ( ( K  e.  NN0  /\  P  =  ( ( 8  x.  K )  +  5 ) ) 
 ->  N  =  ( ( 2  x.  K )  +  1 ) )
 
Theorem2lgslem3d 15796 Lemma for 2lgslem3d1 15800. (Contributed by AV, 16-Jul-2021.)
 |-  N  =  ( ( ( P  -  1
 )  /  2 )  -  ( |_ `  ( P  /  4 ) ) )   =>    |-  ( ( K  e.  NN0  /\  P  =  ( ( 8  x.  K )  +  7 ) ) 
 ->  N  =  ( ( 2  x.  K )  +  2 ) )
 
Theorem2lgslem3a1 15797 Lemma 1 for 2lgslem3 15801. (Contributed by AV, 15-Jul-2021.)
 |-  N  =  ( ( ( P  -  1
 )  /  2 )  -  ( |_ `  ( P  /  4 ) ) )   =>    |-  ( ( P  e.  NN  /\  ( P  mod  8 )  =  1
 )  ->  ( N  mod  2 )  =  0 )
 
Theorem2lgslem3b1 15798 Lemma 2 for 2lgslem3 15801. (Contributed by AV, 16-Jul-2021.)
 |-  N  =  ( ( ( P  -  1
 )  /  2 )  -  ( |_ `  ( P  /  4 ) ) )   =>    |-  ( ( P  e.  NN  /\  ( P  mod  8 )  =  3
 )  ->  ( N  mod  2 )  =  1 )
 
Theorem2lgslem3c1 15799 Lemma 3 for 2lgslem3 15801. (Contributed by AV, 16-Jul-2021.)
 |-  N  =  ( ( ( P  -  1
 )  /  2 )  -  ( |_ `  ( P  /  4 ) ) )   =>    |-  ( ( P  e.  NN  /\  ( P  mod  8 )  =  5
 )  ->  ( N  mod  2 )  =  1 )
 
Theorem2lgslem3d1 15800 Lemma 4 for 2lgslem3 15801. (Contributed by AV, 15-Jul-2021.)
 |-  N  =  ( ( ( P  -  1
 )  /  2 )  -  ( |_ `  ( P  /  4 ) ) )   =>    |-  ( ( P  e.  NN  /\  ( P  mod  8 )  =  7
 )  ->  ( N  mod  2 )  =  0 )
    < Previous  Next >

Page List
Jump to page: Contents  1 1-100 2 101-200 3 201-300 4 301-400 5 401-500 6 501-600 7 601-700 8 701-800 9 801-900 10 901-1000 11 1001-1100 12 1101-1200 13 1201-1300 14 1301-1400 15 1401-1500 16 1501-1600 17 1601-1700 18 1701-1800 19 1801-1900 20 1901-2000 21 2001-2100 22 2101-2200 23 2201-2300 24 2301-2400 25 2401-2500 26 2501-2600 27 2601-2700 28 2701-2800 29 2801-2900 30 2901-3000 31 3001-3100 32 3101-3200 33 3201-3300 34 3301-3400 35 3401-3500 36 3501-3600 37 3601-3700 38 3701-3800 39 3801-3900 40 3901-4000 41 4001-4100 42 4101-4200 43 4201-4300 44 4301-4400 45 4401-4500 46 4501-4600 47 4601-4700 48 4701-4800 49 4801-4900 50 4901-5000 51 5001-5100 52 5101-5200 53 5201-5300 54 5301-5400 55 5401-5500 56 5501-5600 57 5601-5700 58 5701-5800 59 5801-5900 60 5901-6000 61 6001-6100 62 6101-6200 63 6201-6300 64 6301-6400 65 6401-6500 66 6501-6600 67 6601-6700 68 6701-6800 69 6801-6900 70 6901-7000 71 7001-7100 72 7101-7200 73 7201-7300 74 7301-7400 75 7401-7500 76 7501-7600 77 7601-7700 78 7701-7800 79 7801-7900 80 7901-8000 81 8001-8100 82 8101-8200 83 8201-8300 84 8301-8400 85 8401-8500 86 8501-8600 87 8601-8700 88 8701-8800 89 8801-8900 90 8901-9000 91 9001-9100 92 9101-9200 93 9201-9300 94 9301-9400 95 9401-9500 96 9501-9600 97 9601-9700 98 9701-9800 99 9801-9900 100 9901-10000 101 10001-10100 102 10101-10200 103 10201-10300 104 10301-10400 105 10401-10500 106 10501-10600 107 10601-10700 108 10701-10800 109 10801-10900 110 10901-11000 111 11001-11100 112 11101-11200 113 11201-11300 114 11301-11400 115 11401-11500 116 11501-11600 117 11601-11700 118 11701-11800 119 11801-11900 120 11901-12000 121 12001-12100 122 12101-12200 123 12201-12300 124 12301-12400 125 12401-12500 126 12501-12600 127 12601-12700 128 12701-12800 129 12801-12900 130 12901-13000 131 13001-13100 132 13101-13200 133 13201-13300 134 13301-13400 135 13401-13500 136 13501-13600 137 13601-13700 138 13701-13800 139 13801-13900 140 13901-14000 141 14001-14100 142 14101-14200 143 14201-14300 144 14301-14400 145 14401-14500 146 14501-14600 147 14601-14700 148 14701-14800 149 14801-14900 150 14901-15000 151 15001-15100 152 15101-15200 153 15201-15300 154 15301-15400 155 15401-15500 156 15501-15600 157 15601-15700 158 15701-15800 159 15801-15900 160 15901-16000 161 16001-16100 162 16101-16200 163 16201-16300 164 16301-16400 165 16401-16500 166 16501-16566
  Copyright terms: Public domain < Previous  Next >