HomeHome Metamath Proof Explorer
Theorem List (p. 131 of 328)
< Previous  Next >
Browser slow? Try the
Unicode version.

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

Color key:    Metamath Proof Explorer  Metamath Proof Explorer
(1-21514)
  Hilbert Space Explorer  Hilbert Space Explorer
(21515-23037)
  Users' Mathboxes  Users' Mathboxes
(23038-32776)
 

Theorem List for Metamath Proof Explorer - 13001-13100   *Has distinct variable group(s)
TypeLabelDescription
Statement
 
Theoremgzmulcl 13001 The gaussian integers are closed under multiplication. (Contributed by Mario Carneiro, 14-Jul-2014.)
 |-  ( ( A  e.  ZZ [ _i ]  /\  B  e.  ZZ [ _i ] )  ->  ( A  x.  B )  e. 
 ZZ [ _i ]
 )
 
Theoremgzreim 13002 Construct a gaussian integer from real and imaginary parts. (Contributed by Mario Carneiro, 16-Jul-2014.)
 |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( A  +  ( _i  x.  B ) )  e.  ZZ [ _i ] )
 
Theoremgzsubcl 13003 The gaussian integers are closed under subtraction. (Contributed by Mario Carneiro, 14-Jul-2014.)
 |-  ( ( A  e.  ZZ [ _i ]  /\  B  e.  ZZ [ _i ] )  ->  ( A  -  B )  e. 
 ZZ [ _i ]
 )
 
Theoremgzabssqcl 13004 The squared norm of a gaussian integer is an integer. (Contributed by Mario Carneiro, 16-Jul-2014.)
 |-  ( A  e.  ZZ [ _i ]  ->  (
 ( abs `  A ) ^ 2 )  e. 
 NN0 )
 
Theorem4sqlem5 13005 Lemma for 4sq 13027. (Contributed by Mario Carneiro, 15-Jul-2014.)
 |-  ( ph  ->  A  e.  ZZ )   &    |-  ( ph  ->  M  e.  NN )   &    |-  B  =  ( ( ( A  +  ( M  / 
 2 ) )  mod  M )  -  ( M 
 /  2 ) )   =>    |-  ( ph  ->  ( B  e.  ZZ  /\  ( ( A  -  B ) 
 /  M )  e. 
 ZZ ) )
 
Theorem4sqlem6 13006 Lemma for 4sq 13027. (Contributed by Mario Carneiro, 15-Jul-2014.)
 |-  ( ph  ->  A  e.  ZZ )   &    |-  ( ph  ->  M  e.  NN )   &    |-  B  =  ( ( ( A  +  ( M  / 
 2 ) )  mod  M )  -  ( M 
 /  2 ) )   =>    |-  ( ph  ->  ( -u ( M  /  2 )  <_  B  /\  B  <  ( M  /  2 ) ) )
 
Theorem4sqlem7 13007 Lemma for 4sq 13027. (Contributed by Mario Carneiro, 15-Jul-2014.)
 |-  ( ph  ->  A  e.  ZZ )   &    |-  ( ph  ->  M  e.  NN )   &    |-  B  =  ( ( ( A  +  ( M  / 
 2 ) )  mod  M )  -  ( M 
 /  2 ) )   =>    |-  ( ph  ->  ( B ^ 2 )  <_  ( ( ( M ^ 2 )  / 
 2 )  /  2
 ) )
 
Theorem4sqlem8 13008 Lemma for 4sq 13027. (Contributed by Mario Carneiro, 15-Jul-2014.)
 |-  ( ph  ->  A  e.  ZZ )   &    |-  ( ph  ->  M  e.  NN )   &    |-  B  =  ( ( ( A  +  ( M  / 
 2 ) )  mod  M )  -  ( M 
 /  2 ) )   =>    |-  ( ph  ->  M  ||  (
 ( A ^ 2
 )  -  ( B ^ 2 ) ) )
 
Theorem4sqlem9 13009 Lemma for 4sq 13027. (Contributed by Mario Carneiro, 15-Jul-2014.)
 |-  ( ph  ->  A  e.  ZZ )   &    |-  ( ph  ->  M  e.  NN )   &    |-  B  =  ( ( ( A  +  ( M  / 
 2 ) )  mod  M )  -  ( M 
 /  2 ) )   &    |-  ( ( ph  /\  ps )  ->  ( B ^
 2 )  =  0 )   =>    |-  ( ( ph  /\  ps )  ->  ( M ^
 2 )  ||  ( A ^ 2 ) )
 
Theorem4sqlem10 13010 Lemma for 4sq 13027. (Contributed by Mario Carneiro, 16-Jul-2014.)
 |-  ( ph  ->  A  e.  ZZ )   &    |-  ( ph  ->  M  e.  NN )   &    |-  B  =  ( ( ( A  +  ( M  / 
 2 ) )  mod  M )  -  ( M 
 /  2 ) )   &    |-  ( ( ph  /\  ps )  ->  ( ( ( ( M ^ 2
 )  /  2 )  /  2 )  -  ( B ^ 2 ) )  =  0 )   =>    |-  ( ( ph  /\  ps )  ->  ( M ^
 2 )  ||  (
 ( A ^ 2
 )  -  ( ( ( M ^ 2
 )  /  2 )  /  2 ) ) )
 
Theorem4sqlem1 13011* Lemma for 4sq 13027. The set  S is the set of all numbers that are expressible as a sum of four squares. Our goal is to show that  S  =  NN0; here we show one subset direction. (Contributed by Mario Carneiro, 14-Jul-2014.)
 |-  S  =  { n  |  E. x  e.  ZZ  E. y  e.  ZZ  E. z  e.  ZZ  E. w  e.  ZZ  n  =  ( ( ( x ^
 2 )  +  (
 y ^ 2 ) )  +  ( ( z ^ 2 )  +  ( w ^
 2 ) ) ) }   =>    |-  S  C_  NN0
 
Theorem4sqlem2 13012* Lemma for 4sq 13027. Change bound variables in  S. (Contributed by Mario Carneiro, 14-Jul-2014.)
 |-  S  =  { n  |  E. x  e.  ZZ  E. y  e.  ZZ  E. z  e.  ZZ  E. w  e.  ZZ  n  =  ( ( ( x ^
 2 )  +  (
 y ^ 2 ) )  +  ( ( z ^ 2 )  +  ( w ^
 2 ) ) ) }   =>    |-  ( A  e.  S  <->  E. a  e.  ZZ  E. b  e.  ZZ  E. c  e.  ZZ  E. d  e. 
 ZZ  A  =  ( ( ( a ^
 2 )  +  (
 b ^ 2 ) )  +  ( ( c ^ 2 )  +  ( d ^
 2 ) ) ) )
 
Theorem4sqlem3 13013* Lemma for 4sq 13027. Sufficient condition to be in  S. (Contributed by Mario Carneiro, 14-Jul-2014.)
 |-  S  =  { n  |  E. x  e.  ZZ  E. y  e.  ZZ  E. z  e.  ZZ  E. w  e.  ZZ  n  =  ( ( ( x ^
 2 )  +  (
 y ^ 2 ) )  +  ( ( z ^ 2 )  +  ( w ^
 2 ) ) ) }   =>    |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( C  e.  ZZ  /\  D  e.  ZZ ) )  ->  ( ( ( A ^ 2 )  +  ( B ^ 2 ) )  +  ( ( C ^ 2 )  +  ( D ^
 2 ) ) )  e.  S )
 
Theorem4sqlem4a 13014* Lemma for 4sqlem4 13015. (Contributed by Mario Carneiro, 14-Jul-2014.)
 |-  S  =  { n  |  E. x  e.  ZZ  E. y  e.  ZZ  E. z  e.  ZZ  E. w  e.  ZZ  n  =  ( ( ( x ^
 2 )  +  (
 y ^ 2 ) )  +  ( ( z ^ 2 )  +  ( w ^
 2 ) ) ) }   =>    |-  ( ( A  e.  ZZ [ _i ]  /\  B  e.  ZZ [ _i ] )  ->  ( ( ( abs `  A ) ^ 2 )  +  ( ( abs `  B ) ^ 2 ) )  e.  S )
 
Theorem4sqlem4 13015* Lemma for 4sq 13027. We can express the four-square property more compactly in terms of gaussian integers, because the norms of gaussian integers are exactly sums of two squares. (Contributed by Mario Carneiro, 14-Jul-2014.)
 |-  S  =  { n  |  E. x  e.  ZZ  E. y  e.  ZZ  E. z  e.  ZZ  E. w  e.  ZZ  n  =  ( ( ( x ^
 2 )  +  (
 y ^ 2 ) )  +  ( ( z ^ 2 )  +  ( w ^
 2 ) ) ) }   =>    |-  ( A  e.  S  <->  E. u  e.  ZZ [ _i ]  E. v  e. 
 ZZ [ _i ]  A  =  ( (
 ( abs `  u ) ^ 2 )  +  ( ( abs `  v
 ) ^ 2 ) ) )
 
Theoremmul4sqlem 13016* Lemma for mul4sq 13017: algebraic manipulations. The extra assumptions involving  M are for a part of 4sqlem17 13024 which needs to know not just that the product is a sum of squares, but also that it preserves divisibility by  M. (Contributed by Mario Carneiro, 14-Jul-2014.)
 |-  S  =  { n  |  E. x  e.  ZZ  E. y  e.  ZZ  E. z  e.  ZZ  E. w  e.  ZZ  n  =  ( ( ( x ^
 2 )  +  (
 y ^ 2 ) )  +  ( ( z ^ 2 )  +  ( w ^
 2 ) ) ) }   &    |-  ( ph  ->  A  e.  ZZ [ _i ] )   &    |-  ( ph  ->  B  e.  ZZ [ _i ] )   &    |-  ( ph  ->  C  e.  ZZ [ _i ] )   &    |-  ( ph  ->  D  e.  ZZ [ _i ] )   &    |-  X  =  ( ( ( abs `  A ) ^ 2 )  +  ( ( abs `  B ) ^ 2 ) )   &    |-  Y  =  ( (
 ( abs `  C ) ^ 2 )  +  ( ( abs `  D ) ^ 2 ) )   &    |-  ( ph  ->  M  e.  NN )   &    |-  ( ph  ->  ( ( A  -  C )  /  M )  e. 
 ZZ [ _i ]
 )   &    |-  ( ph  ->  (
 ( B  -  D )  /  M )  e. 
 ZZ [ _i ]
 )   &    |-  ( ph  ->  ( X  /  M )  e. 
 NN0 )   =>    |-  ( ph  ->  (
 ( X  /  M )  x.  ( Y  /  M ) )  e.  S )
 
Theoremmul4sq 13017* Euler's four-square identity: The product of two sums of four squares is also a sum of four squares. This is usually quoted as an explicit formula involving eight real variables; we save some time by working with complex numbers (gaussian integers) instead, so that we only have to work with four variables, and also hiding the actual formula for the product in the proof of mul4sqlem 13016. (For the curious, the explicit formula that is used is  (  |  a  |  ^ 2  +  |  b  |  ^
2 ) (  |  c  |  ^ 2  +  |  d  |  ^ 2 )  =  |  a *  x.  c  +  b  x.  d *  |  ^ 2  +  | 
a *  x.  d  -  b  x.  c
*  |  ^ 2.) (Contributed by Mario Carneiro, 14-Jul-2014.)
 |-  S  =  { n  |  E. x  e.  ZZ  E. y  e.  ZZ  E. z  e.  ZZ  E. w  e.  ZZ  n  =  ( ( ( x ^
 2 )  +  (
 y ^ 2 ) )  +  ( ( z ^ 2 )  +  ( w ^
 2 ) ) ) }   =>    |-  ( ( A  e.  S  /\  B  e.  S )  ->  ( A  x.  B )  e.  S )
 
Theorem4sqlem11 13018* Lemma for 4sq 13027. Use the pigeonhole principle to show that the sets  { m ^
2  |  m  e.  ( 0 ... N
) } and  { -u 1  -  n ^ 2  |  n  e.  ( 0 ... N ) } have a common element,  mod  P. (Contributed by Mario Carneiro, 15-Jul-2014.)
 |-  S  =  { n  |  E. x  e.  ZZ  E. y  e.  ZZ  E. z  e.  ZZ  E. w  e.  ZZ  n  =  ( ( ( x ^
 2 )  +  (
 y ^ 2 ) )  +  ( ( z ^ 2 )  +  ( w ^
 2 ) ) ) }   &    |-  ( ph  ->  N  e.  NN )   &    |-  ( ph  ->  P  =  ( ( 2  x.  N )  +  1 )
 )   &    |-  ( ph  ->  P  e.  Prime )   &    |-  A  =  { u  |  E. m  e.  ( 0 ... N ) u  =  (
 ( m ^ 2
 )  mod  P ) }   &    |-  F  =  ( v  e.  A  |->  ( ( P  -  1 )  -  v ) )   =>    |-  ( ph  ->  ( A  i^i  ran  F )  =/=  (/) )
 
Theorem4sqlem12 13019* Lemma for 4sq 13027. For any odd prime  P, there is a  k  <  P such that  k P  -  1 is a sum of two squares. (Contributed by Mario Carneiro, 15-Jul-2014.)
 |-  S  =  { n  |  E. x  e.  ZZ  E. y  e.  ZZ  E. z  e.  ZZ  E. w  e.  ZZ  n  =  ( ( ( x ^
 2 )  +  (
 y ^ 2 ) )  +  ( ( z ^ 2 )  +  ( w ^
 2 ) ) ) }   &    |-  ( ph  ->  N  e.  NN )   &    |-  ( ph  ->  P  =  ( ( 2  x.  N )  +  1 )
 )   &    |-  ( ph  ->  P  e.  Prime )   &    |-  A  =  { u  |  E. m  e.  ( 0 ... N ) u  =  (
 ( m ^ 2
 )  mod  P ) }   &    |-  F  =  ( v  e.  A  |->  ( ( P  -  1 )  -  v ) )   =>    |-  ( ph  ->  E. k  e.  ( 1 ... ( P  -  1 ) ) E. u  e.  ZZ [ _i ]  ( ( ( abs `  u ) ^ 2 )  +  1 )  =  (
 k  x.  P ) )
 
Theorem4sqlem13 13020* Lemma for 4sq 13027. (Contributed by Mario Carneiro, 16-Jul-2014.)
 |-  S  =  { n  |  E. x  e.  ZZ  E. y  e.  ZZ  E. z  e.  ZZ  E. w  e.  ZZ  n  =  ( ( ( x ^
 2 )  +  (
 y ^ 2 ) )  +  ( ( z ^ 2 )  +  ( w ^
 2 ) ) ) }   &    |-  ( ph  ->  N  e.  NN )   &    |-  ( ph  ->  P  =  ( ( 2  x.  N )  +  1 )
 )   &    |-  ( ph  ->  P  e.  Prime )   &    |-  ( ph  ->  ( 0 ... ( 2  x.  N ) ) 
 C_  S )   &    |-  T  =  { i  e.  NN  |  ( i  x.  P )  e.  S }   &    |-  M  =  sup ( T ,  RR ,  `'  <  )   =>    |-  ( ph  ->  ( T  =/=  (/)  /\  M  <  P ) )
 
Theorem4sqlem14 13021* Lemma for 4sq 13027. (Contributed by Mario Carneiro, 16-Jul-2014.)
 |-  S  =  { n  |  E. x  e.  ZZ  E. y  e.  ZZ  E. z  e.  ZZ  E. w  e.  ZZ  n  =  ( ( ( x ^
 2 )  +  (
 y ^ 2 ) )  +  ( ( z ^ 2 )  +  ( w ^
 2 ) ) ) }   &    |-  ( ph  ->  N  e.  NN )   &    |-  ( ph  ->  P  =  ( ( 2  x.  N )  +  1 )
 )   &    |-  ( ph  ->  P  e.  Prime )   &    |-  ( ph  ->  ( 0 ... ( 2  x.  N ) ) 
 C_  S )   &    |-  T  =  { i  e.  NN  |  ( i  x.  P )  e.  S }   &    |-  M  =  sup ( T ,  RR ,  `'  <  )   &    |-  ( ph  ->  M  e.  ( ZZ>=
 `  2 ) )   &    |-  ( ph  ->  A  e.  ZZ )   &    |-  ( ph  ->  B  e.  ZZ )   &    |-  ( ph  ->  C  e.  ZZ )   &    |-  ( ph  ->  D  e.  ZZ )   &    |-  E  =  ( ( ( A  +  ( M  /  2
 ) )  mod  M )  -  ( M  / 
 2 ) )   &    |-  F  =  ( ( ( B  +  ( M  / 
 2 ) )  mod  M )  -  ( M 
 /  2 ) )   &    |-  G  =  ( (
 ( C  +  ( M  /  2 ) ) 
 mod  M )  -  ( M  /  2 ) )   &    |-  H  =  ( (
 ( D  +  ( M  /  2 ) ) 
 mod  M )  -  ( M  /  2 ) )   &    |-  R  =  ( (
 ( ( E ^
 2 )  +  ( F ^ 2 ) )  +  ( ( G ^ 2 )  +  ( H ^ 2 ) ) )  /  M )   &    |-  ( ph  ->  ( M  x.  P )  =  ( ( ( A ^ 2 )  +  ( B ^ 2 ) )  +  ( ( C ^ 2 )  +  ( D ^
 2 ) ) ) )   =>    |-  ( ph  ->  R  e.  NN0 )
 
Theorem4sqlem15 13022* Lemma for 4sq 13027. (Contributed by Mario Carneiro, 16-Jul-2014.)
 |-  S  =  { n  |  E. x  e.  ZZ  E. y  e.  ZZ  E. z  e.  ZZ  E. w  e.  ZZ  n  =  ( ( ( x ^
 2 )  +  (
 y ^ 2 ) )  +  ( ( z ^ 2 )  +  ( w ^
 2 ) ) ) }   &    |-  ( ph  ->  N  e.  NN )   &    |-  ( ph  ->  P  =  ( ( 2  x.  N )  +  1 )
 )   &    |-  ( ph  ->  P  e.  Prime )   &    |-  ( ph  ->  ( 0 ... ( 2  x.  N ) ) 
 C_  S )   &    |-  T  =  { i  e.  NN  |  ( i  x.  P )  e.  S }   &    |-  M  =  sup ( T ,  RR ,  `'  <  )   &    |-  ( ph  ->  M  e.  ( ZZ>=
 `  2 ) )   &    |-  ( ph  ->  A  e.  ZZ )   &    |-  ( ph  ->  B  e.  ZZ )   &    |-  ( ph  ->  C  e.  ZZ )   &    |-  ( ph  ->  D  e.  ZZ )   &    |-  E  =  ( ( ( A  +  ( M  /  2
 ) )  mod  M )  -  ( M  / 
 2 ) )   &    |-  F  =  ( ( ( B  +  ( M  / 
 2 ) )  mod  M )  -  ( M 
 /  2 ) )   &    |-  G  =  ( (
 ( C  +  ( M  /  2 ) ) 
 mod  M )  -  ( M  /  2 ) )   &    |-  H  =  ( (
 ( D  +  ( M  /  2 ) ) 
 mod  M )  -  ( M  /  2 ) )   &    |-  R  =  ( (
 ( ( E ^
 2 )  +  ( F ^ 2 ) )  +  ( ( G ^ 2 )  +  ( H ^ 2 ) ) )  /  M )   &    |-  ( ph  ->  ( M  x.  P )  =  ( ( ( A ^ 2 )  +  ( B ^ 2 ) )  +  ( ( C ^ 2 )  +  ( D ^
 2 ) ) ) )   =>    |-  ( ( ph  /\  R  =  M )  ->  (
 ( ( ( ( ( M ^ 2
 )  /  2 )  /  2 )  -  ( E ^ 2 ) )  =  0  /\  ( ( ( ( M ^ 2 ) 
 /  2 )  / 
 2 )  -  ( F ^ 2 ) )  =  0 )  /\  ( ( ( ( ( M ^ 2
 )  /  2 )  /  2 )  -  ( G ^ 2 ) )  =  0  /\  ( ( ( ( M ^ 2 ) 
 /  2 )  / 
 2 )  -  ( H ^ 2 ) )  =  0 ) ) )
 
Theorem4sqlem16 13023* Lemma for 4sq 13027. (Contributed by Mario Carneiro, 16-Jul-2014.)
 |-  S  =  { n  |  E. x  e.  ZZ  E. y  e.  ZZ  E. z  e.  ZZ  E. w  e.  ZZ  n  =  ( ( ( x ^
 2 )  +  (
 y ^ 2 ) )  +  ( ( z ^ 2 )  +  ( w ^
 2 ) ) ) }   &    |-  ( ph  ->  N  e.  NN )   &    |-  ( ph  ->  P  =  ( ( 2  x.  N )  +  1 )
 )   &    |-  ( ph  ->  P  e.  Prime )   &    |-  ( ph  ->  ( 0 ... ( 2  x.  N ) ) 
 C_  S )   &    |-  T  =  { i  e.  NN  |  ( i  x.  P )  e.  S }   &    |-  M  =  sup ( T ,  RR ,  `'  <  )   &    |-  ( ph  ->  M  e.  ( ZZ>=
 `  2 ) )   &    |-  ( ph  ->  A  e.  ZZ )   &    |-  ( ph  ->  B  e.  ZZ )   &    |-  ( ph  ->  C  e.  ZZ )   &    |-  ( ph  ->  D  e.  ZZ )   &    |-  E  =  ( ( ( A  +  ( M  /  2
 ) )  mod  M )  -  ( M  / 
 2 ) )   &    |-  F  =  ( ( ( B  +  ( M  / 
 2 ) )  mod  M )  -  ( M 
 /  2 ) )   &    |-  G  =  ( (
 ( C  +  ( M  /  2 ) ) 
 mod  M )  -  ( M  /  2 ) )   &    |-  H  =  ( (
 ( D  +  ( M  /  2 ) ) 
 mod  M )  -  ( M  /  2 ) )   &    |-  R  =  ( (
 ( ( E ^
 2 )  +  ( F ^ 2 ) )  +  ( ( G ^ 2 )  +  ( H ^ 2 ) ) )  /  M )   &    |-  ( ph  ->  ( M  x.  P )  =  ( ( ( A ^ 2 )  +  ( B ^ 2 ) )  +  ( ( C ^ 2 )  +  ( D ^
 2 ) ) ) )   =>    |-  ( ph  ->  ( R  <_  M  /\  (
 ( R  =  0  \/  R  =  M )  ->  ( M ^
 2 )  ||  ( M  x.  P ) ) ) )
 
Theorem4sqlem17 13024* Lemma for 4sq 13027. (Contributed by Mario Carneiro, 16-Jul-2014.)
 |-  S  =  { n  |  E. x  e.  ZZ  E. y  e.  ZZ  E. z  e.  ZZ  E. w  e.  ZZ  n  =  ( ( ( x ^
 2 )  +  (
 y ^ 2 ) )  +  ( ( z ^ 2 )  +  ( w ^
 2 ) ) ) }   &    |-  ( ph  ->  N  e.  NN )   &    |-  ( ph  ->  P  =  ( ( 2  x.  N )  +  1 )
 )   &    |-  ( ph  ->  P  e.  Prime )   &    |-  ( ph  ->  ( 0 ... ( 2  x.  N ) ) 
 C_  S )   &    |-  T  =  { i  e.  NN  |  ( i  x.  P )  e.  S }   &    |-  M  =  sup ( T ,  RR ,  `'  <  )   &    |-  ( ph  ->  M  e.  ( ZZ>=
 `  2 ) )   &    |-  ( ph  ->  A  e.  ZZ )   &    |-  ( ph  ->  B  e.  ZZ )   &    |-  ( ph  ->  C  e.  ZZ )   &    |-  ( ph  ->  D  e.  ZZ )   &    |-  E  =  ( ( ( A  +  ( M  /  2
 ) )  mod  M )  -  ( M  / 
 2 ) )   &    |-  F  =  ( ( ( B  +  ( M  / 
 2 ) )  mod  M )  -  ( M 
 /  2 ) )   &    |-  G  =  ( (
 ( C  +  ( M  /  2 ) ) 
 mod  M )  -  ( M  /  2 ) )   &    |-  H  =  ( (
 ( D  +  ( M  /  2 ) ) 
 mod  M )  -  ( M  /  2 ) )   &    |-  R  =  ( (
 ( ( E ^
 2 )  +  ( F ^ 2 ) )  +  ( ( G ^ 2 )  +  ( H ^ 2 ) ) )  /  M )   &    |-  ( ph  ->  ( M  x.  P )  =  ( ( ( A ^ 2 )  +  ( B ^ 2 ) )  +  ( ( C ^ 2 )  +  ( D ^
 2 ) ) ) )   =>    |- 
 -.  ph
 
Theorem4sqlem18 13025* Lemma for 4sq 13027. Inductive step, odd prime case. (Contributed by Mario Carneiro, 16-Jul-2014.)
 |-  S  =  { n  |  E. x  e.  ZZ  E. y  e.  ZZ  E. z  e.  ZZ  E. w  e.  ZZ  n  =  ( ( ( x ^
 2 )  +  (
 y ^ 2 ) )  +  ( ( z ^ 2 )  +  ( w ^
 2 ) ) ) }   &    |-  ( ph  ->  N  e.  NN )   &    |-  ( ph  ->  P  =  ( ( 2  x.  N )  +  1 )
 )   &    |-  ( ph  ->  P  e.  Prime )   &    |-  ( ph  ->  ( 0 ... ( 2  x.  N ) ) 
 C_  S )   &    |-  T  =  { i  e.  NN  |  ( i  x.  P )  e.  S }   &    |-  M  =  sup ( T ,  RR ,  `'  <  )   =>    |-  ( ph  ->  P  e.  S )
 
Theorem4sqlem19 13026* Lemma for 4sq 13027. The proof is by strong induction - we show that if all the integers less than  k are in  S, then  k is as well. In this part of the proof we do the induction argument and dispense with all the cases except the odd prime case, which is sent to 4sqlem18 13025. If  k is  0 ,  1 ,  2, we show  k  e.  S directly; otherwise if  k is composite,  k is the product of two numbers less than it (and hence in  S by assumption), so by mul4sq 13017  k  e.  S. (Contributed by Mario Carneiro, 14-Jul-2014.) (Revised by Mario Carneiro, 20-Jun-2015.)
 |-  S  =  { n  |  E. x  e.  ZZ  E. y  e.  ZZ  E. z  e.  ZZ  E. w  e.  ZZ  n  =  ( ( ( x ^
 2 )  +  (
 y ^ 2 ) )  +  ( ( z ^ 2 )  +  ( w ^
 2 ) ) ) }   =>    |- 
 NN0  =  S
 
Theorem4sq 13027* Lagrange's four-square theorem, or Bachet's conjecture: every nonnegative integer is expressible as a sum of four squares. (Contributed by Mario Carneiro, 16-Jul-2014.)
 |-  ( A  e.  NN0  <->  E. a  e.  ZZ  E. b  e.  ZZ  E. c  e. 
 ZZ  E. d  e.  ZZ  A  =  ( (
 ( a ^ 2
 )  +  ( b ^ 2 ) )  +  ( ( c ^ 2 )  +  ( d ^ 2
 ) ) ) )
 
6.2.11  Van der Waerden's theorem
 
Syntaxcvdwa 13028 The arithmetic progression function.
 class AP
 
Syntaxcvdwm 13029 The monochromatic arithmetic progression predicate.
 class MonoAP
 
Syntaxcvdwp 13030 The polychromatic arithmetic progression predicate.
 class PolyAP
 
Definitiondf-vdwap 13031* Define the arithmetic progression function, which takes as input a length  k, a start point  a, and a step  d and outputs the set of points in this progression. (Contributed by Mario Carneiro, 18-Aug-2014.)
 |- AP 
 =  ( k  e. 
 NN0  |->  ( a  e. 
 NN ,  d  e. 
 NN  |->  ran  ( m  e.  ( 0 ... (
 k  -  1 ) )  |->  ( a  +  ( m  x.  d
 ) ) ) ) )
 
Definitiondf-vdwmc 13032* Define the "contains a monochromatic AP" predicate. (Contributed by Mario Carneiro, 18-Aug-2014.)
 |- MonoAP  =  { <. k ,  f >.  |  E. c ( ran  (AP `  k
 )  i^i  ~P ( `' f " { c } ) )  =/=  (/) }
 
Definitiondf-vdwpc 13033* Define the "contains a polychromatic colleciton of APs" predicate. See vdwpc 13043 for more information. (Contributed by Mario Carneiro, 18-Aug-2014.)
 |- PolyAP  =  { <. <. m ,  k >. ,  f >.  |  E. a  e.  NN  E. d  e.  ( NN  ^m  (
 1 ... m ) ) ( A. i  e.  ( 1 ... m ) ( ( a  +  ( d `  i ) ) (AP
 `  k ) ( d `  i ) )  C_  ( `' f " { ( f `
  ( a  +  ( d `  i
 ) ) ) }
 )  /\  ( # `  ran  ( i  e.  (
 1 ... m )  |->  ( f `  ( a  +  ( d `  i ) ) ) ) )  =  m ) }
 
Theoremvdwapfval 13034* Define the arithmetic progression function, which takes as input a length  k, a start point  a, and a step  d and outputs the set of points in this progression. (Contributed by Mario Carneiro, 18-Aug-2014.)
 |-  ( K  e.  NN0  ->  (AP `  K )  =  ( a  e.  NN ,  d  e.  NN  |->  ran  ( m  e.  (
 0 ... ( K  -  1 ) )  |->  ( a  +  ( m  x.  d ) ) ) ) )
 
Theoremvdwapf 13035 The arithmetic progression function is a function. (Contributed by Mario Carneiro, 18-Aug-2014.)
 |-  ( K  e.  NN0  ->  (AP `  K ) : ( NN  X.  NN )
 --> ~P NN )
 
Theoremvdwapval 13036* Value of the arithmetic progression function. (Contributed by Mario Carneiro, 18-Aug-2014.)
 |-  ( ( K  e.  NN0  /\  A  e.  NN  /\  D  e.  NN )  ->  ( X  e.  ( A (AP `  K ) D )  <->  E. m  e.  (
 0 ... ( K  -  1 ) ) X  =  ( A  +  ( m  x.  D ) ) ) )
 
Theoremvdwapun 13037 Remove the first element of an arithmetic progression. (Contributed by Mario Carneiro, 11-Sep-2014.)
 |-  ( ( K  e.  NN0  /\  A  e.  NN  /\  D  e.  NN )  ->  ( A (AP `  ( K  +  1
 ) ) D )  =  ( { A }  u.  ( ( A  +  D ) (AP
 `  K ) D ) ) )
 
Theoremvdwapid1 13038 The first element of an arithmetic progression. (Contributed by Mario Carneiro, 12-Sep-2014.)
 |-  ( ( K  e.  NN  /\  A  e.  NN  /\  D  e.  NN )  ->  A  e.  ( A (AP `  K ) D ) )
 
Theoremvdwap0 13039 Value of a length-1 arithmetic progression. (Contributed by Mario Carneiro, 18-Aug-2014.)
 |-  ( ( A  e.  NN  /\  D  e.  NN )  ->  ( A (AP
 `  0 ) D )  =  (/) )
 
Theoremvdwap1 13040 Value of a length-1 arithmetic progression. (Contributed by Mario Carneiro, 18-Aug-2014.)
 |-  ( ( A  e.  NN  /\  D  e.  NN )  ->  ( A (AP
 `  1 ) D )  =  { A } )
 
Theoremvdwmc 13041* The predicate " The  <. R ,  N >.-coloring  F contains a monochromatic AP of length 
K". (Contributed by Mario Carneiro, 18-Aug-2014.)
 |-  X  e.  _V   &    |-  ( ph  ->  K  e.  NN0 )   &    |-  ( ph  ->  F : X --> R )   =>    |-  ( ph  ->  ( K MonoAP  F  <->  E. c E. a  e.  NN  E. d  e. 
 NN  ( a (AP
 `  K ) d )  C_  ( `' F " { c }
 ) ) )
 
Theoremvdwmc2 13042* Expand out the definition of an arithmetic progression. (Contributed by Mario Carneiro, 18-Aug-2014.)
 |-  X  e.  _V   &    |-  ( ph  ->  K  e.  NN0 )   &    |-  ( ph  ->  F : X --> R )   &    |-  ( ph  ->  A  e.  X )   =>    |-  ( ph  ->  ( K MonoAP  F  <->  E. c  e.  R  E. a  e.  NN  E. d  e.  NN  A. m  e.  ( 0 ... ( K  -  1
 ) ) ( a  +  ( m  x.  d ) )  e.  ( `' F " { c } )
 ) )
 
Theoremvdwpc 13043* The predicate " The coloring 
F contains a polychromatic  M-tuple of AP's of length  K". A polychromatic 
M-tuple of AP's is a set of AP's with the same base point but different step lengths, such that each individual AP is monochromatic, but the AP's all have mutually distinct colors. (The common basepoint is not required to have the same color as any of the AP's.) (Contributed by Mario Carneiro, 18-Aug-2014.)
 |-  X  e.  _V   &    |-  ( ph  ->  K  e.  NN0 )   &    |-  ( ph  ->  F : X --> R )   &    |-  ( ph  ->  M  e.  NN )   &    |-  J  =  ( 1
 ... M )   =>    |-  ( ph  ->  (
 <. M ,  K >. PolyAP  F  <->  E. a  e.  NN  E. d  e.  ( NN  ^m  J ) ( A. i  e.  J  (
 ( a  +  (
 d `  i )
 ) (AP `  K ) ( d `  i ) )  C_  ( `' F " { ( F `  ( a  +  ( d `  i
 ) ) ) }
 )  /\  ( # `  ran  ( i  e.  J  |->  ( F `  ( a  +  ( d `  i ) ) ) ) )  =  M ) ) )
 
Theoremvdwlem1 13044* Lemma for vdw 13057. (Contributed by Mario Carneiro, 12-Sep-2014.)
 |-  ( ph  ->  R  e.  Fin )   &    |-  ( ph  ->  K  e.  NN )   &    |-  ( ph  ->  W  e.  NN )   &    |-  ( ph  ->  F : ( 1 ...
 W ) --> R )   &    |-  ( ph  ->  A  e.  NN )   &    |-  ( ph  ->  M  e.  NN )   &    |-  ( ph  ->  D : ( 1 ... M ) --> NN )   &    |-  ( ph  ->  A. i  e.  ( 1
 ... M ) ( ( A  +  ( D `  i ) ) (AP `  K )
 ( D `  i
 ) )  C_  ( `' F " { ( F `  ( A  +  ( D `  i ) ) ) } )
 )   &    |-  ( ph  ->  I  e.  ( 1 ... M ) )   &    |-  ( ph  ->  ( F `  A )  =  ( F `  ( A  +  ( D `  I ) ) ) )   =>    |-  ( ph  ->  ( K  +  1 ) MonoAP  F )
 
Theoremvdwlem2 13045* Lemma for vdw 13057. (Contributed by Mario Carneiro, 12-Sep-2014.)
 |-  ( ph  ->  R  e.  Fin )   &    |-  ( ph  ->  K  e.  NN0 )   &    |-  ( ph  ->  W  e.  NN )   &    |-  ( ph  ->  N  e.  NN )   &    |-  ( ph  ->  F : ( 1 ...
 M ) --> R )   &    |-  ( ph  ->  M  e.  ( ZZ>= `  ( W  +  N ) ) )   &    |-  G  =  ( x  e.  ( 1 ... W )  |->  ( F `  ( x  +  N ) ) )   =>    |-  ( ph  ->  ( K MonoAP  G  ->  K MonoAP  F ) )
 
Theoremvdwlem3 13046 Lemma for vdw 13057. (Contributed by Mario Carneiro, 13-Sep-2014.)
 |-  ( ph  ->  V  e.  NN )   &    |-  ( ph  ->  W  e.  NN )   &    |-  ( ph  ->  A  e.  (
 1 ... V ) )   &    |-  ( ph  ->  B  e.  ( 1 ... W ) )   =>    |-  ( ph  ->  ( B  +  ( W  x.  ( ( A  -  1 )  +  V ) ) )  e.  ( 1 ... ( W  x.  ( 2  x.  V ) ) ) )
 
Theoremvdwlem4 13047* Lemma for vdw 13057. (Contributed by Mario Carneiro, 12-Sep-2014.)
 |-  ( ph  ->  V  e.  NN )   &    |-  ( ph  ->  W  e.  NN )   &    |-  ( ph  ->  R  e.  Fin )   &    |-  ( ph  ->  H : ( 1 ... ( W  x.  (
 2  x.  V ) ) ) --> R )   &    |-  F  =  ( x  e.  ( 1 ... V )  |->  ( y  e.  ( 1 ... W )  |->  ( H `  ( y  +  ( W  x.  ( ( x  -  1 )  +  V ) ) ) ) ) )   =>    |-  ( ph  ->  F : ( 1 ...
 V ) --> ( R 
 ^m  ( 1 ...
 W ) ) )
 
Theoremvdwlem5 13048* Lemma for vdw 13057. (Contributed by Mario Carneiro, 12-Sep-2014.)
 |-  ( ph  ->  V  e.  NN )   &    |-  ( ph  ->  W  e.  NN )   &    |-  ( ph  ->  R  e.  Fin )   &    |-  ( ph  ->  H : ( 1 ... ( W  x.  (
 2  x.  V ) ) ) --> R )   &    |-  F  =  ( x  e.  ( 1 ... V )  |->  ( y  e.  ( 1 ... W )  |->  ( H `  ( y  +  ( W  x.  ( ( x  -  1 )  +  V ) ) ) ) ) )   &    |-  ( ph  ->  M  e.  NN )   &    |-  ( ph  ->  G : ( 1 ...
 W ) --> R )   &    |-  ( ph  ->  K  e.  ( ZZ>= `  2 )
 )   &    |-  ( ph  ->  A  e.  NN )   &    |-  ( ph  ->  D  e.  NN )   &    |-  ( ph  ->  ( A (AP
 `  K ) D )  C_  ( `' F " { G }
 ) )   &    |-  ( ph  ->  B  e.  NN )   &    |-  ( ph  ->  E : ( 1 ... M ) --> NN )   &    |-  ( ph  ->  A. i  e.  ( 1
 ... M ) ( ( B  +  ( E `  i ) ) (AP `  K )
 ( E `  i
 ) )  C_  ( `' G " { ( G `  ( B  +  ( E `  i ) ) ) } )
 )   &    |-  J  =  ( i  e.  ( 1 ...
 M )  |->  ( G `
  ( B  +  ( E `  i ) ) ) )   &    |-  ( ph  ->  ( # `  ran  J )  =  M )   &    |-  T  =  ( B  +  ( W  x.  (
 ( A  +  ( V  -  D ) )  -  1 ) ) )   &    |-  P  =  ( j  e.  ( 1
 ... ( M  +  1 ) )  |->  ( if ( j  =  ( M  +  1 ) ,  0 ,  ( E `  j
 ) )  +  ( W  x.  D ) ) )   =>    |-  ( ph  ->  T  e.  NN )
 
Theoremvdwlem6 13049* Lemma for vdw 13057. (Contributed by Mario Carneiro, 13-Sep-2014.)
 |-  ( ph  ->  V  e.  NN )   &    |-  ( ph  ->  W  e.  NN )   &    |-  ( ph  ->  R  e.  Fin )   &    |-  ( ph  ->  H : ( 1 ... ( W  x.  (
 2  x.  V ) ) ) --> R )   &    |-  F  =  ( x  e.  ( 1 ... V )  |->  ( y  e.  ( 1 ... W )  |->  ( H `  ( y  +  ( W  x.  ( ( x  -  1 )  +  V ) ) ) ) ) )   &    |-  ( ph  ->  M  e.  NN )   &    |-  ( ph  ->  G : ( 1 ...
 W ) --> R )   &    |-  ( ph  ->  K  e.  ( ZZ>= `  2 )
 )   &    |-  ( ph  ->  A  e.  NN )   &    |-  ( ph  ->  D  e.  NN )   &    |-  ( ph  ->  ( A (AP
 `  K ) D )  C_  ( `' F " { G }
 ) )   &    |-  ( ph  ->  B  e.  NN )   &    |-  ( ph  ->  E : ( 1 ... M ) --> NN )   &    |-  ( ph  ->  A. i  e.  ( 1
 ... M ) ( ( B  +  ( E `  i ) ) (AP `  K )
 ( E `  i
 ) )  C_  ( `' G " { ( G `  ( B  +  ( E `  i ) ) ) } )
 )   &    |-  J  =  ( i  e.  ( 1 ...
 M )  |->  ( G `
  ( B  +  ( E `  i ) ) ) )   &    |-  ( ph  ->  ( # `  ran  J )  =  M )   &    |-  T  =  ( B  +  ( W  x.  (
 ( A  +  ( V  -  D ) )  -  1 ) ) )   &    |-  P  =  ( j  e.  ( 1
 ... ( M  +  1 ) )  |->  ( if ( j  =  ( M  +  1 ) ,  0 ,  ( E `  j
 ) )  +  ( W  x.  D ) ) )   =>    |-  ( ph  ->  ( <. ( M  +  1 ) ,  K >. PolyAP  H  \/  ( K  +  1 ) MonoAP  G ) )
 
Theoremvdwlem7 13050* Lemma for vdw 13057. (Contributed by Mario Carneiro, 12-Sep-2014.)
 |-  ( ph  ->  V  e.  NN )   &    |-  ( ph  ->  W  e.  NN )   &    |-  ( ph  ->  R  e.  Fin )   &    |-  ( ph  ->  H : ( 1 ... ( W  x.  (
 2  x.  V ) ) ) --> R )   &    |-  F  =  ( x  e.  ( 1 ... V )  |->  ( y  e.  ( 1 ... W )  |->  ( H `  ( y  +  ( W  x.  ( ( x  -  1 )  +  V ) ) ) ) ) )   &    |-  ( ph  ->  M  e.  NN )   &    |-  ( ph  ->  G : ( 1 ...
 W ) --> R )   &    |-  ( ph  ->  K  e.  ( ZZ>= `  2 )
 )   &    |-  ( ph  ->  A  e.  NN )   &    |-  ( ph  ->  D  e.  NN )   &    |-  ( ph  ->  ( A (AP
 `  K ) D )  C_  ( `' F " { G }
 ) )   =>    |-  ( ph  ->  ( <. M ,  K >. PolyAP  G  ->  ( <. ( M  +  1 ) ,  K >. PolyAP 
 H  \/  ( K  +  1 ) MonoAP  G ) ) )
 
Theoremvdwlem8 13051* Lemma for vdw 13057. (Contributed by Mario Carneiro, 18-Aug-2014.)
 |-  ( ph  ->  R  e.  Fin )   &    |-  ( ph  ->  K  e.  ( ZZ>= `  2
 ) )   &    |-  ( ph  ->  W  e.  NN )   &    |-  ( ph  ->  F : ( 1 ... ( 2  x.  W ) ) --> R )   &    |-  C  e.  _V   &    |-  ( ph  ->  A  e.  NN )   &    |-  ( ph  ->  D  e.  NN )   &    |-  ( ph  ->  ( A (AP `  K ) D )  C_  ( `' G " { C } ) )   &    |-  G  =  ( x  e.  (
 1 ... W )  |->  ( F `  ( x  +  W ) ) )   =>    |-  ( ph  ->  <. 1 ,  K >. PolyAP  F )
 
Theoremvdwlem9 13052* Lemma for vdw 13057. (Contributed by Mario Carneiro, 12-Sep-2014.)
 |-  ( ph  ->  R  e.  Fin )   &    |-  ( ph  ->  K  e.  ( ZZ>= `  2
 ) )   &    |-  ( ph  ->  A. s  e.  Fin  E. n  e.  NN  A. f  e.  ( s  ^m  (
 1 ... n ) ) K MonoAP  f )   &    |-  ( ph  ->  M  e.  NN )   &    |-  ( ph  ->  W  e.  NN )   &    |-  ( ph  ->  A. g  e.  ( R 
 ^m  ( 1 ...
 W ) ) (
 <. M ,  K >. PolyAP  g  \/  ( K  +  1 ) MonoAP  g ) )   &    |-  ( ph  ->  V  e.  NN )   &    |-  ( ph  ->  A. f  e.  ( ( R  ^m  ( 1
 ... W ) ) 
 ^m  ( 1 ...
 V ) ) K MonoAP 
 f )   &    |-  ( ph  ->  H : ( 1 ... ( W  x.  (
 2  x.  V ) ) ) --> R )   &    |-  F  =  ( x  e.  ( 1 ... V )  |->  ( y  e.  ( 1 ... W )  |->  ( H `  ( y  +  ( W  x.  ( ( x  -  1 )  +  V ) ) ) ) ) )   =>    |-  ( ph  ->  (
 <. ( M  +  1 ) ,  K >. PolyAP  H  \/  ( K  +  1 ) MonoAP  H ) )
 
Theoremvdwlem10 13053* Lemma for vdw 13057. Set up secondary induction on  M. (Contributed by Mario Carneiro, 18-Aug-2014.)
 |-  ( ph  ->  R  e.  Fin )   &    |-  ( ph  ->  K  e.  ( ZZ>= `  2
 ) )   &    |-  ( ph  ->  A. s  e.  Fin  E. n  e.  NN  A. f  e.  ( s  ^m  (
 1 ... n ) ) K MonoAP  f )   &    |-  ( ph  ->  M  e.  NN )   =>    |-  ( ph  ->  E. n  e.  NN  A. f  e.  ( R  ^m  (
 1 ... n ) ) ( <. M ,  K >. PolyAP 
 f  \/  ( K  +  1 ) MonoAP  f
 ) )
 
Theoremvdwlem11 13054* Lemma for vdw 13057. (Contributed by Mario Carneiro, 18-Aug-2014.)
 |-  ( ph  ->  R  e.  Fin )   &    |-  ( ph  ->  K  e.  ( ZZ>= `  2
 ) )   &    |-  ( ph  ->  A. s  e.  Fin  E. n  e.  NN  A. f  e.  ( s  ^m  (
 1 ... n ) ) K MonoAP  f )   =>    |-  ( ph  ->  E. n  e.  NN  A. f  e.  ( R  ^m  ( 1 ... n ) ) ( K  +  1 ) MonoAP  f
 )
 
Theoremvdwlem12 13055 Lemma for vdw 13057. 
K  =  2 base case of induction. (Contributed by Mario Carneiro, 18-Aug-2014.)
 |-  ( ph  ->  R  e.  Fin )   &    |-  ( ph  ->  F : ( 1 ... ( ( # `  R )  +  1 )
 ) --> R )   &    |-  ( ph  ->  -.  2 MonoAP  F )   =>    |-  -.  ph
 
Theoremvdwlem13 13056* Lemma for vdw 13057. Main induction on  K;  K  =  0,  K  =  1 base cases. (Contributed by Mario Carneiro, 18-Aug-2014.)
 |-  ( ph  ->  R  e.  Fin )   &    |-  ( ph  ->  K  e.  NN0 )   =>    |-  ( ph  ->  E. n  e.  NN  A. f  e.  ( R  ^m  (
 1 ... n ) ) K MonoAP  f )
 
Theoremvdw 13057* Van der Waerden's theorem. For any finite coloring  R and integer  K, there is an  N such that every coloring function from  1 ... N to  R contains a monochromatic arithmetic progression (which written out in full means that there is a color  c and base, increment values  a ,  d such that all the numbers  a ,  a  +  d ,  ... ,  a  +  ( k  -  1 ) d lie in the preimage of  {
c }, i.e. they are all in  1 ... N and  f evaluated at each one yields  c). (Contributed by Mario Carneiro, 13-Sep-2014.)
 |-  ( ( R  e.  Fin  /\  K  e.  NN0 )  ->  E. n  e.  NN  A. f  e.  ( R 
 ^m  ( 1 ... n ) ) E. c  e.  R  E. a  e.  NN  E. d  e. 
 NN  A. m  e.  (
 0 ... ( K  -  1 ) ) ( a  +  ( m  x.  d ) )  e.  ( `' f " { c } )
 )
 
Theoremvdwnnlem1 13058* Corollary of vdw 13057, and lemma for vdwnn 13061. If  F is a coloring of the integers, then there are arbitrarily long monochromatic APs in  F. (Contributed by Mario Carneiro, 13-Sep-2014.)
 |-  ( ( R  e.  Fin  /\  F : NN --> R  /\  K  e.  NN0 )  ->  E. c  e.  R  E. a  e.  NN  E. d  e.  NN  A. m  e.  ( 0 ... ( K  -  1
 ) ) ( a  +  ( m  x.  d ) )  e.  ( `' F " { c } )
 )
 
Theoremvdwnnlem2 13059* Lemma for vdwnn 13061. The set of all "bad"  k for the theorem is upwards-closed, because a long AP implies a short AP. (Contributed by Mario Carneiro, 13-Sep-2014.)
 |-  ( ph  ->  R  e.  Fin )   &    |-  ( ph  ->  F : NN --> R )   &    |-  S  =  { k  e.  NN  |  -.  E. a  e.  NN  E. d  e.  NN  A. m  e.  ( 0 ... (
 k  -  1 ) ) ( a  +  ( m  x.  d
 ) )  e.  ( `' F " { c } ) }   =>    |-  ( ( ph  /\  B  e.  ( ZZ>= `  A ) )  ->  ( A  e.  S  ->  B  e.  S ) )
 
Theoremvdwnnlem3 13060* Lemma for vdwnn 13061. (Contributed by Mario Carneiro, 13-Sep-2014.)
 |-  ( ph  ->  R  e.  Fin )   &    |-  ( ph  ->  F : NN --> R )   &    |-  S  =  { k  e.  NN  |  -.  E. a  e.  NN  E. d  e.  NN  A. m  e.  ( 0 ... (
 k  -  1 ) ) ( a  +  ( m  x.  d
 ) )  e.  ( `' F " { c } ) }   &    |-  ( ph  ->  A. c  e.  R  S  =/=  (/) )   =>    |- 
 -.  ph
 
Theoremvdwnn 13061* Van der Waerden's theorem, infinitary version. For any finite coloring  F of the natural numbers, there is a color  c that contains arbitrarily long arithmetic progressions. (Contributed by Mario Carneiro, 13-Sep-2014.)
 |-  ( ( R  e.  Fin  /\  F : NN --> R ) 
 ->  E. c  e.  R  A. k  e.  NN  E. a  e.  NN  E. d  e.  NN  A. m  e.  ( 0 ... (
 k  -  1 ) ) ( a  +  ( m  x.  d
 ) )  e.  ( `' F " { c } ) )
 
6.2.12  Ramsey's theorem
 
Syntaxcram 13062 Extend class notation with the Ramsey number function.
 class Ramsey
 
Theoremramtlecl 13063* The set  T of numbers with the Ramsey number property is upward-closed. (Contributed by Mario Carneiro, 21-Apr-2015.)
 |-  T  =  { n  e.  NN0  |  A. s
 ( n  <_  ( # `
  s )  ->  ph ) }   =>    |-  ( M  e.  T  ->  ( ZZ>= `  M )  C_  T )
 
Definitiondf-ram 13064* Define the Ramsey number function. The input is a number  m for the size of the edges of the hypergraph, and a tuple  r from the finite color set to lower bounds for each color. The Ramsey number  ( M Ramsey  R
) is the smallest number such that for any set  S with  ( M Ramsey  R
)  <_  # S and any coloring  F of the set of  M-element subsets of  S (with color set  dom  R), there is a color  c  e.  dom  R and a subset  x  C_  S such that  R ( c )  <_  # x and all the hyperedges of  x (that is, subsets of  x of size  M) have color  c. (Contributed by Mario Carneiro, 20-Apr-2015.)
 |- Ramsey  =  ( m  e.  NN0 ,  r  e.  _V  |->  sup ( { n  e. 
 NN0  |  A. s ( n  <_  ( # `  s
 )  ->  A. f  e.  ( dom  r  ^m  { y  e.  ~P s  |  ( # `  y
 )  =  m }
 ) E. c  e. 
 dom  r E. x  e.  ~P  s ( ( r `  c ) 
 <_  ( # `  x )  /\  A. y  e. 
 ~P  x ( ( # `  y )  =  m  ->  ( f `  y )  =  c ) ) ) } ,  RR* ,  `'  <  ) )
 
Theoremhashbcval 13065* Value of the "binomial set", the set of all  N-element subsets of  A. (Contributed by Mario Carneiro, 20-Apr-2015.)
 |-  C  =  ( a  e.  _V ,  i  e.  NN0  |->  { b  e.  ~P a  |  ( # `  b
 )  =  i }
 )   =>    |-  ( ( A  e.  V  /\  N  e.  NN0 )  ->  ( A C N )  =  { x  e.  ~P A  |  ( # `  x )  =  N }
 )
 
Theoremhashbccl 13066* The binomial set is a finite set. (Contributed by Mario Carneiro, 20-Apr-2015.)
 |-  C  =  ( a  e.  _V ,  i  e.  NN0  |->  { b  e.  ~P a  |  ( # `  b
 )  =  i }
 )   =>    |-  ( ( A  e.  Fin  /\  N  e.  NN0 )  ->  ( A C N )  e.  Fin )
 
Theoremhashbcss 13067* Subset relation for the binomial set. (Contributed by Mario Carneiro, 20-Apr-2015.)
 |-  C  =  ( a  e.  _V ,  i  e.  NN0  |->  { b  e.  ~P a  |  ( # `  b
 )  =  i }
 )   =>    |-  ( ( A  e.  V  /\  B  C_  A  /\  N  e.  NN0 )  ->  ( B C N )  C_  ( A C N ) )
 
Theoremhashbc0 13068* The set of subsets of size zero is the singleton of the empty set. (Contributed by Mario Carneiro, 22-Apr-2015.)
 |-  C  =  ( a  e.  _V ,  i  e.  NN0  |->  { b  e.  ~P a  |  ( # `  b
 )  =  i }
 )   =>    |-  ( A  e.  V  ->  ( A C 0 )  =  { (/) } )
 
Theoremhashbc2 13069* The size of the binomial set is the binomial coefficient. (Contributed by Mario Carneiro, 20-Apr-2015.)
 |-  C  =  ( a  e.  _V ,  i  e.  NN0  |->  { b  e.  ~P a  |  ( # `  b
 )  =  i }
 )   =>    |-  ( ( A  e.  Fin  /\  N  e.  NN0 )  ->  ( # `  ( A C N ) )  =  ( ( # `  A )  _C  N ) )
 
Theorem0hashbc 13070* There are no subsets of the empty set with size greater than zero. (Contributed by Mario Carneiro, 22-Apr-2015.)
 |-  C  =  ( a  e.  _V ,  i  e.  NN0  |->  { b  e.  ~P a  |  ( # `  b
 )  =  i }
 )   =>    |-  ( N  e.  NN  ->  ( (/) C N )  =  (/) )
 
Theoremramval 13071* The value of the Ramsey number function. (Contributed by Mario Carneiro, 21-Apr-2015.)
 |-  C  =  ( a  e.  _V ,  i  e.  NN0  |->  { b  e.  ~P a  |  ( # `  b
 )  =  i }
 )   &    |-  T  =  { n  e.  NN0  |  A. s
 ( n  <_  ( # `
  s )  ->  A. f  e.  ( R  ^m  ( s C M ) ) E. c  e.  R  E. x  e.  ~P  s ( ( F `  c ) 
 <_  ( # `  x )  /\  ( x C M )  C_  ( `' f " { c } ) ) ) }   =>    |-  ( ( M  e.  NN0  /\  R  e.  V  /\  F : R --> NN0 )  ->  ( M Ramsey  F )  =  sup ( T ,  RR*
 ,  `'  <  )
 )
 
Theoremramcl2lem 13072* Lemma for extended real closure of the Ramsey number function. (Contributed by Mario Carneiro, 20-Apr-2015.)
 |-  C  =  ( a  e.  _V ,  i  e.  NN0  |->  { b  e.  ~P a  |  ( # `  b
 )  =  i }
 )   &    |-  T  =  { n  e.  NN0  |  A. s
 ( n  <_  ( # `
  s )  ->  A. f  e.  ( R  ^m  ( s C M ) ) E. c  e.  R  E. x  e.  ~P  s ( ( F `  c ) 
 <_  ( # `  x )  /\  ( x C M )  C_  ( `' f " { c } ) ) ) }   =>    |-  ( ( M  e.  NN0  /\  R  e.  V  /\  F : R --> NN0 )  ->  ( M Ramsey  F )  =  if ( T  =  (/)
 ,  +oo ,  sup ( T ,  RR ,  `'  <  ) ) )
 
Theoremramtcl 13073* The Ramsey number has the Ramsey number property if any number does. (Contributed by Mario Carneiro, 20-Apr-2015.)
 |-  C  =  ( a  e.  _V ,  i  e.  NN0  |->  { b  e.  ~P a  |  ( # `  b
 )  =  i }
 )   &    |-  T  =  { n  e.  NN0  |  A. s
 ( n  <_  ( # `
  s )  ->  A. f  e.  ( R  ^m  ( s C M ) ) E. c  e.  R  E. x  e.  ~P  s ( ( F `  c ) 
 <_  ( # `  x )  /\  ( x C M )  C_  ( `' f " { c } ) ) ) }   =>    |-  ( ( M  e.  NN0  /\  R  e.  V  /\  F : R --> NN0 )  ->  ( ( M Ramsey  F )  e.  T  <->  T  =/=  (/) ) )
 
Theoremramtcl2 13074* The Ramsey number is an integer iff there is a number with the Ramsey number property. (Contributed by Mario Carneiro, 20-Apr-2015.)
 |-  C  =  ( a  e.  _V ,  i  e.  NN0  |->  { b  e.  ~P a  |  ( # `  b
 )  =  i }
 )   &    |-  T  =  { n  e.  NN0  |  A. s
 ( n  <_  ( # `
  s )  ->  A. f  e.  ( R  ^m  ( s C M ) ) E. c  e.  R  E. x  e.  ~P  s ( ( F `  c ) 
 <_  ( # `  x )  /\  ( x C M )  C_  ( `' f " { c } ) ) ) }   =>    |-  ( ( M  e.  NN0  /\  R  e.  V  /\  F : R --> NN0 )  ->  ( ( M Ramsey  F )  e.  NN0  <->  T  =/=  (/) ) )
 
Theoremramtub 13075* The Ramsey number is a lower bound on the set of all numbers with the Ramsey number property. (Contributed by Mario Carneiro, 20-Apr-2015.)
 |-  C  =  ( a  e.  _V ,  i  e.  NN0  |->  { b  e.  ~P a  |  ( # `  b
 )  =  i }
 )   &    |-  T  =  { n  e.  NN0  |  A. s
 ( n  <_  ( # `
  s )  ->  A. f  e.  ( R  ^m  ( s C M ) ) E. c  e.  R  E. x  e.  ~P  s ( ( F `  c ) 
 <_  ( # `  x )  /\  ( x C M )  C_  ( `' f " { c } ) ) ) }   =>    |-  ( ( ( M  e.  NN0  /\  R  e.  V  /\  F : R --> NN0 )  /\  A  e.  T )  ->  ( M Ramsey  F )  <_  A )
 
Theoremramub 13076* The Ramsey number is a lower bound on the set of all numbers with the Ramsey number property. (Contributed by Mario Carneiro, 22-Apr-2015.)
 |-  C  =  ( a  e.  _V ,  i  e.  NN0  |->  { b  e.  ~P a  |  ( # `  b
 )  =  i }
 )   &    |-  ( ph  ->  M  e.  NN0 )   &    |-  ( ph  ->  R  e.  V )   &    |-  ( ph  ->  F : R --> NN0 )   &    |-  ( ph  ->  N  e.  NN0 )   &    |-  ( ( ph  /\  ( N  <_  ( # `
  s )  /\  f : ( s C M ) --> R ) )  ->  E. c  e.  R  E. x  e. 
 ~P  s ( ( F `  c ) 
 <_  ( # `  x )  /\  ( x C M )  C_  ( `' f " { c } ) ) )   =>    |-  ( ph  ->  ( M Ramsey  F )  <_  N )
 
Theoremramub2 13077* It is sufficient to check the Ramsey property on finite sets of size equal to the upper bound. (Contributed by Mario Carneiro, 23-Apr-2015.)
 |-  C  =  ( a  e.  _V ,  i  e.  NN0  |->  { b  e.  ~P a  |  ( # `  b
 )  =  i }
 )   &    |-  ( ph  ->  M  e.  NN0 )   &    |-  ( ph  ->  R  e.  V )   &    |-  ( ph  ->  F : R --> NN0 )   &    |-  ( ph  ->  N  e.  NN0 )   &    |-  ( ( ph  /\  ( ( # `  s
 )  =  N  /\  f : ( s C M ) --> R ) )  ->  E. c  e.  R  E. x  e. 
 ~P  s ( ( F `  c ) 
 <_  ( # `  x )  /\  ( x C M )  C_  ( `' f " { c } ) ) )   =>    |-  ( ph  ->  ( M Ramsey  F )  <_  N )
 
Theoremrami 13078* The defining property of a Ramsey number. (Contributed by Mario Carneiro, 22-Apr-2015.)
 |-  C  =  ( a  e.  _V ,  i  e.  NN0  |->  { b  e.  ~P a  |  ( # `  b
 )  =  i }
 )   &    |-  ( ph  ->  M  e.  NN0 )   &    |-  ( ph  ->  R  e.  V )   &    |-  ( ph  ->  F : R --> NN0 )   &    |-  ( ph  ->  ( M Ramsey  F )  e.  NN0 )   &    |-  ( ph  ->  S  e.  W )   &    |-  ( ph  ->  ( M Ramsey  F )  <_  ( # `
  S ) )   &    |-  ( ph  ->  G :
 ( S C M )
 --> R )   =>    |-  ( ph  ->  E. c  e.  R  E. x  e. 
 ~P  S ( ( F `  c ) 
 <_  ( # `  x )  /\  ( x C M )  C_  ( `' G " { c } ) ) )
 
Theoremramcl2 13079 The Ramsey number is either a nonnegative integer or plus infinity. (Contributed by Mario Carneiro, 20-Apr-2015.)
 |-  ( ( M  e.  NN0  /\  R  e.  V  /\  F : R --> NN0 )  ->  ( M Ramsey  F )  e.  ( NN0  u.  {  +oo } ) )
 
Theoremramxrcl 13080 The Ramsey number is an extended real number. (This theorem does not imply Ramsey's theorem, unlike ramcl 13092.) (Contributed by Mario Carneiro, 20-Apr-2015.)
 |-  ( ( M  e.  NN0  /\  R  e.  V  /\  F : R --> NN0 )  ->  ( M Ramsey  F )  e.  RR* )
 
Theoremramubcl 13081 If the Ramsey number is upper bounded, then it is an integer. (Contributed by Mario Carneiro, 20-Apr-2015.)
 |-  ( ( ( M  e.  NN0  /\  R  e.  V  /\  F : R --> NN0 )  /\  ( A  e.  NN0  /\  ( M Ramsey  F )  <_  A ) )  ->  ( M Ramsey  F )  e.  NN0 )
 
Theoremramlb 13082* Establish a lower bound on a Ramsey number. (Contributed by Mario Carneiro, 22-Apr-2015.)
 |-  C  =  ( a  e.  _V ,  i  e.  NN0  |->  { b  e.  ~P a  |  ( # `  b
 )  =  i }
 )   &    |-  ( ph  ->  M  e.  NN0 )   &    |-  ( ph  ->  R  e.  V )   &    |-  ( ph  ->  F : R --> NN0 )   &    |-  ( ph  ->  N  e.  NN0 )   &    |-  ( ph  ->  G : ( ( 1
 ... N ) C M ) --> R )   &    |-  ( ( ph  /\  (
 c  e.  R  /\  x  C_  ( 1 ...
 N ) ) ) 
 ->  ( ( x C M )  C_  ( `' G " { c } )  ->  ( # `  x )  <  ( F `  c ) ) )   =>    |-  ( ph  ->  N  <  ( M Ramsey  F )
 )
 
Theorem0ram 13083* The Ramsey number when  M  =  0. (Contributed by Mario Carneiro, 22-Apr-2015.)
 |-  ( ( ( R  e.  V  /\  R  =/= 
 (/)  /\  F : R --> NN0 )  /\  E. x  e.  ZZ  A. y  e. 
 ran  F  y  <_  x )  ->  ( 0 Ramsey  F )  =  sup ( ran  F ,  RR ,  <  ) )
 
Theorem0ram2 13084 The Ramsey number when  M  =  0. (Contributed by Mario Carneiro, 22-Apr-2015.)
 |-  ( ( R  e.  Fin  /\  R  =/=  (/)  /\  F : R --> NN0 )  ->  (
 0 Ramsey  F )  =  sup ( ran  F ,  RR ,  <  ) )
 
Theoremram0 13085 The Ramsey number when  R  =  (/). (Contributed by Mario Carneiro, 22-Apr-2015.)
 |-  ( M  e.  NN0  ->  ( M Ramsey  (/) )  =  M )
 
Theorem0ramcl 13086 Lemma for ramcl 13092: Existence of the Ramsey number when  M  =  0. (Contributed by Mario Carneiro, 23-Apr-2015.)
 |-  ( ( R  e.  Fin  /\  F : R --> NN0 )  ->  ( 0 Ramsey  F )  e.  NN0 )
 
Theoremramz2 13087 The Ramsey number when  F has value zero for some color  C. (Contributed by Mario Carneiro, 22-Apr-2015.)
 |-  ( ( ( M  e.  NN  /\  R  e.  V  /\  F : R
 --> NN0 )  /\  ( C  e.  R  /\  ( F `  C )  =  0 ) ) 
 ->  ( M Ramsey  F )  =  0 )
 
Theoremramz 13088 The Ramsey number when  F is the zero function. (Contributed by Mario Carneiro, 22-Apr-2015.)
 |-  ( ( M  e.  NN0  /\  R  e.  V  /\  R  =/=  (/) )  ->  ( M Ramsey  ( R  X.  {
 0 } ) )  =  0 )
 
Theoremramub1lem1 13089* Lemma for ramub1 13091. (Contributed by Mario Carneiro, 23-Apr-2015.)
 |-  ( ph  ->  M  e.  NN )   &    |-  ( ph  ->  R  e.  Fin )   &    |-  ( ph  ->  F : R --> NN )   &    |-  G  =  ( x  e.  R  |->  ( M Ramsey  ( y  e.  R  |->  if ( y  =  x ,  ( ( F `  x )  -  1 ) ,  ( F `  y
 ) ) ) ) )   &    |-  ( ph  ->  G : R --> NN0 )   &    |-  ( ph  ->  ( ( M  -  1 ) Ramsey  G )  e.  NN0 )   &    |-  C  =  ( a  e.  _V ,  i  e.  NN0  |->  { b  e.  ~P a  |  ( # `  b )  =  i } )   &    |-  ( ph  ->  S  e.  Fin )   &    |-  ( ph  ->  ( # `
  S )  =  ( ( ( M  -  1 ) Ramsey  G )  +  1 )
 )   &    |-  ( ph  ->  K : ( S C M ) --> R )   &    |-  ( ph  ->  X  e.  S )   &    |-  H  =  ( u  e.  ( ( S  \  { X } ) C ( M  -  1 ) )  |->  ( K `  ( u  u.  { X } ) ) )   &    |-  ( ph  ->  D  e.  R )   &    |-  ( ph  ->  W 
 C_  ( S  \  { X } ) )   &    |-  ( ph  ->  ( G `  D )  <_  ( # `
  W ) )   &    |-  ( ph  ->  ( W C ( M  -  1 ) )  C_  ( `' H " { D } ) )   &    |-  ( ph  ->  E  e.  R )   &    |-  ( ph  ->  V  C_  W )   &    |-  ( ph  ->  if ( E  =  D ,  ( ( F `  D )  -  1
 ) ,  ( F `
  E ) ) 
 <_  ( # `  V ) )   &    |-  ( ph  ->  ( V C M ) 
 C_  ( `' K " { E } )
 )   =>    |-  ( ph  ->  E. z  e.  ~P  S ( ( F `  E ) 
 <_  ( # `  z
 )  /\  ( z C M )  C_  ( `' K " { E } ) ) )
 
Theoremramub1lem2 13090* Lemma for ramub1 13091. (Contributed by Mario Carneiro, 23-Apr-2015.)
 |-  ( ph  ->  M  e.  NN )   &    |-  ( ph  ->  R  e.  Fin )   &    |-  ( ph  ->  F : R --> NN )   &    |-  G  =  ( x  e.  R  |->  ( M Ramsey  ( y  e.  R  |->  if ( y  =  x ,  ( ( F `  x )  -  1 ) ,  ( F `  y
 ) ) ) ) )   &    |-  ( ph  ->  G : R --> NN0 )   &    |-  ( ph  ->  ( ( M  -  1 ) Ramsey  G )  e.  NN0 )   &    |-  C  =  ( a  e.  _V ,  i  e.  NN0  |->  { b  e.  ~P a  |  ( # `  b )  =  i } )   &    |-  ( ph  ->  S  e.  Fin )   &    |-  ( ph  ->  ( # `
  S )  =  ( ( ( M  -  1 ) Ramsey  G )  +  1 )
 )   &    |-  ( ph  ->  K : ( S C M ) --> R )   &    |-  ( ph  ->  X  e.  S )   &    |-  H  =  ( u  e.  ( ( S  \  { X } ) C ( M  -  1 ) )  |->  ( K `  ( u  u.  { X } ) ) )   =>    |-  ( ph  ->  E. c  e.  R  E. z  e. 
 ~P  S ( ( F `  c ) 
 <_  ( # `  z
 )  /\  ( z C M )  C_  ( `' K " { c } ) ) )
 
Theoremramub1 13091* Inductive step for Ramsey's theorem, in the form of an explicit upper bound. (Contributed by Mario Carneiro, 23-Apr-2015.)
 |-  ( ph  ->  M  e.  NN )   &    |-  ( ph  ->  R  e.  Fin )   &    |-  ( ph  ->  F : R --> NN )   &    |-  G  =  ( x  e.  R  |->  ( M Ramsey  ( y  e.  R  |->  if ( y  =  x ,  ( ( F `  x )  -  1 ) ,  ( F `  y
 ) ) ) ) )   &    |-  ( ph  ->  G : R --> NN0 )   &    |-  ( ph  ->  ( ( M  -  1 ) Ramsey  G )  e.  NN0 )   =>    |-  ( ph  ->  ( M Ramsey  F )  <_  (
 ( ( M  -  1 ) Ramsey  G )  +  1 ) )
 
Theoremramcl 13092 Ramsey's theorem: the Ramsey number is an integer for every finite coloring and set of upper bounds. (Contributed by Mario Carneiro, 23-Apr-2015.)
 |-  ( ( M  e.  NN0  /\  R  e.  Fin  /\  F : R --> NN0 )  ->  ( M Ramsey  F )  e.  NN0 )
 
Theoremramsey 13093* Ramsey's theorem with the definition Ramsey eliminated. If  M is an integer,  R is a specified finite set of colors, and  F : R --> NN0 is a set of lower bounds for each color, then there is an  n such that for every set  s of size greater than  n and every coloring  f of the set  ( s C M ) of all  M-element subsets of  s, there is a color  c and a subset  x  C_  s such that  x is larger than  F (
c ) and the  M-element subsets of  x are monochromatic with color  c. This is the hypergraph version of Ramsey's theorem; the version for simple graphs is the case  M  =  2. (Contributed by Mario Carneiro, 23-Apr-2015.)
 |-  C  =  ( a  e.  _V ,  i  e.  NN0  |->  { b  e.  ~P a  |  ( # `  b
 )  =  i }
 )   =>    |-  ( ( M  e.  NN0  /\  R  e.  Fin  /\  F : R --> NN0 )  ->  E. n  e.  NN0  A. s ( n  <_  ( # `  s ) 
 ->  A. f  e.  ( R  ^m  ( s C M ) ) E. c  e.  R  E. x  e.  ~P  s ( ( F `  c ) 
 <_  ( # `  x )  /\  ( x C M )  C_  ( `' f " { c } ) ) ) )
 
6.2.13  Decimal arithmetic (cont.)
 
Theoremdec2dvds 13094 Divisibility by two is obvious in base 10. (Contributed by Mario Carneiro, 19-Apr-2015.)
 |-  A  e.  NN0   &    |-  B  e.  NN0   &    |-  ( B  x.  2
 )  =  C   &    |-  D  =  ( C  +  1 )   =>    |- 
 -.  2  || ; A D
 
Theoremdec5dvds 13095 Divisibility by five is obvious in base 10. (Contributed by Mario Carneiro, 19-Apr-2015.)
 |-  A  e.  NN0   &    |-  B  e.  NN   &    |-  B  <  5   =>    |- 
 -.  5  || ; A B
 
Theoremdec5dvds2 13096 Divisibility by five is obvious in base 10. (Contributed by Mario Carneiro, 19-Apr-2015.)
 |-  A  e.  NN0   &    |-  B  e.  NN   &    |-  B  <  5   &    |-  ( 5  +  B )  =  C   =>    |-  -.  5  || ; A C
 
Theoremdec5nprm 13097 Divisibility by five is obvious in base 10. (Contributed by Mario Carneiro, 19-Apr-2015.)
 |-  A  e.  NN   =>    |-  -. ; A 5  e.  Prime
 
Theoremdec2nprm 13098 Divisibility by two is obvious in base 10. (Contributed by Mario Carneiro, 19-Apr-2015.)
 |-  A  e.  NN   &    |-  B  e.  NN0   &    |-  ( B  x.  2
 )  =  C   =>    |-  -. ; A C  e.  Prime
 
Theoremmodxai 13099 Add exponents in a power mod calculation. (Contributed by Mario Carneiro, 21-Feb-2014.) (Revised by Mario Carneiro, 5-Feb-2015.)
 |-  N  e.  NN   &    |-  A  e.  NN   &    |-  B  e.  NN0   &    |-  D  e.  ZZ   &    |-  K  e.  NN0   &    |-  M  e.  NN0   &    |-  C  e.  NN0   &    |-  L  e.  NN0   &    |-  ( ( A ^ B )  mod  N )  =  ( K  mod  N )   &    |-  ( ( A ^ C )  mod  N )  =  ( L 
 mod  N )   &    |-  ( B  +  C )  =  E   &    |-  (
 ( D  x.  N )  +  M )  =  ( K  x.  L )   =>    |-  ( ( A ^ E )  mod  N )  =  ( M  mod  N )
 
Theoremmod2xi 13100 Double exponents in a power mod calculation. (Contributed by Mario Carneiro, 21-Feb-2014.)
 |-  N  e.  NN   &    |-  A  e.  NN   &    |-  B  e.  NN0   &    |-  D  e.  ZZ   &    |-  K  e.  NN0   &    |-  M  e.  NN0   &    |-  ( ( A ^ B )  mod  N )  =  ( K  mod  N )   &    |-  ( 2  x.  B )  =  E   &    |-  (
 ( D  x.  N )  +  M )  =  ( K  x.  K )   =>    |-  ( ( A ^ E )  mod  N )  =  ( M  mod  N )
    < 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-16600 167 16601-16700 168 16701-16800 169 16801-16900 170 16901-17000 171 17001-17100 172 17101-17200 173 17201-17300 174 17301-17400 175 17401-17500 176 17501-17600 177 17601-17700 178 17701-17800 179 17801-17900 180 17901-18000 181 18001-18100 182 18101-18200 183 18201-18300 184 18301-18400 185 18401-18500 186 18501-18600 187 18601-18700 188 18701-18800 189 18801-18900 190 18901-19000 191 19001-19100 192 19101-19200 193 19201-19300 194 19301-19400 195 19401-19500 196 19501-19600 197 19601-19700 198 19701-19800 199 19801-19900 200 19901-20000 201 20001-20100 202 20101-20200 203 20201-20300 204 20301-20400 205 20401-20500 206 20501-20600 207 20601-20700 208 20701-20800 209 20801-20900 210 20901-21000 211 21001-21100 212 21101-21200 213 21201-21300 214 21301-21400 215 21401-21500 216 21501-21600 217 21601-21700 218 21701-21800 219 21801-21900 220 21901-22000 221 22001-22100 222 22101-22200 223 22201-22300 224 22301-22400 225 22401-22500 226 22501-22600 227 22601-22700 228 22701-22800 229 22801-22900 230 22901-23000 231 23001-23100 232 23101-23200 233 23201-23300 234 23301-23400 235 23401-23500 236 23501-23600 237 23601-23700 238 23701-23800 239 23801-23900 240 23901-24000 241 24001-24100 242 24101-24200 243 24201-24300 244 24301-24400 245 24401-24500 246 24501-24600 247 24601-24700 248 24701-24800 249 24801-24900 250 24901-25000 251 25001-25100 252 25101-25200 253 25201-25300 254 25301-25400 255 25401-25500 256 25501-25600 257 25601-25700 258 25701-25800 259 25801-25900 260 25901-26000 261 26001-26100 262 26101-26200 263 26201-26300 264 26301-26400 265 26401-26500 266 26501-26600 267 26601-26700 268 26701-26800 269 26801-26900 270 26901-27000 271 27001-27100 272 27101-27200 273 27201-27300 274 27301-27400 275 27401-27500 276 27501-27600 277 27601-27700 278 27701-27800 279 27801-27900 280 27901-28000 281 28001-28100 282 28101-28200 283 28201-28300 284 28301-28400 285 28401-28500 286 28501-28600 287 28601-28700 288 28701-28800 289 28801-28900 290 28901-29000 291 29001-29100 292 29101-29200 293 29201-29300 294 29301-29400 295 29401-29500 296 29501-29600 297 29601-29700 298 29701-29800 299 29801-29900 300 29901-30000 301 30001-30100 302 30101-30200 303 30201-30300 304 30301-30400 305 30401-30500 306 30501-30600 307 30601-30700 308 30701-30800 309 30801-30900 310 30901-31000 311 31001-31100 312 31101-31200 313 31201-31300 314 31301-31400 315 31401-31500 316 31501-31600 317 31601-31700 318 31701-31800 319 31801-31900 320 31901-32000 321 32001-32100 322 32101-32200 323 32201-32300 324 32301-32400 325 32401-32500 326 32501-32600 327 32601-32700 328 32701-32776
  Copyright terms: Public domain < Previous  Next >