MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  2sqlem5 Unicode version

Theorem 2sqlem5 21021
Description: Lemma for 2sq 21029. If a number that is a sum of two squares is divisible by a prime that is a sum of two squares, then the quotient is a sum of two squares. (Contributed by Mario Carneiro, 20-Jun-2015.)
Hypotheses
Ref Expression
2sq.1  |-  S  =  ran  ( w  e.  ZZ [ _i ]  |->  ( ( abs `  w
) ^ 2 ) )
2sqlem5.1  |-  ( ph  ->  N  e.  NN )
2sqlem5.2  |-  ( ph  ->  P  e.  Prime )
2sqlem5.3  |-  ( ph  ->  ( N  x.  P
)  e.  S )
2sqlem5.4  |-  ( ph  ->  P  e.  S )
Assertion
Ref Expression
2sqlem5  |-  ( ph  ->  N  e.  S )

Proof of Theorem 2sqlem5
Dummy variables  p  q  x  y are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 2sqlem5.4 . . 3  |-  ( ph  ->  P  e.  S )
2 2sq.1 . . . 4  |-  S  =  ran  ( w  e.  ZZ [ _i ]  |->  ( ( abs `  w
) ^ 2 ) )
322sqlem2 21017 . . 3  |-  ( P  e.  S  <->  E. p  e.  ZZ  E. q  e.  ZZ  P  =  ( ( p ^ 2 )  +  ( q ^ 2 ) ) )
41, 3sylib 189 . 2  |-  ( ph  ->  E. p  e.  ZZ  E. q  e.  ZZ  P  =  ( ( p ^ 2 )  +  ( q ^ 2 ) ) )
5 2sqlem5.3 . . 3  |-  ( ph  ->  ( N  x.  P
)  e.  S )
622sqlem2 21017 . . 3  |-  ( ( N  x.  P )  e.  S  <->  E. x  e.  ZZ  E. y  e.  ZZ  ( N  x.  P )  =  ( ( x ^ 2 )  +  ( y ^ 2 ) ) )
75, 6sylib 189 . 2  |-  ( ph  ->  E. x  e.  ZZ  E. y  e.  ZZ  ( N  x.  P )  =  ( ( x ^ 2 )  +  ( y ^ 2 ) ) )
8 reeanv 2820 . . 3  |-  ( E. p  e.  ZZ  E. x  e.  ZZ  ( E. q  e.  ZZ  P  =  ( (
p ^ 2 )  +  ( q ^
2 ) )  /\  E. y  e.  ZZ  ( N  x.  P )  =  ( ( x ^ 2 )  +  ( y ^ 2 ) ) )  <->  ( E. p  e.  ZZ  E. q  e.  ZZ  P  =  ( ( p ^ 2 )  +  ( q ^ 2 ) )  /\  E. x  e.  ZZ  E. y  e.  ZZ  ( N  x.  P )  =  ( ( x ^ 2 )  +  ( y ^ 2 ) ) ) )
9 reeanv 2820 . . . . 5  |-  ( E. q  e.  ZZ  E. y  e.  ZZ  ( P  =  ( (
p ^ 2 )  +  ( q ^
2 ) )  /\  ( N  x.  P
)  =  ( ( x ^ 2 )  +  ( y ^
2 ) ) )  <-> 
( E. q  e.  ZZ  P  =  ( ( p ^ 2 )  +  ( q ^ 2 ) )  /\  E. y  e.  ZZ  ( N  x.  P )  =  ( ( x ^ 2 )  +  ( y ^ 2 ) ) ) )
10 2sqlem5.1 . . . . . . . . 9  |-  ( ph  ->  N  e.  NN )
1110ad2antrr 707 . . . . . . . 8  |-  ( ( ( ph  /\  (
p  e.  ZZ  /\  x  e.  ZZ )
)  /\  ( (
q  e.  ZZ  /\  y  e.  ZZ )  /\  ( P  =  ( ( p ^ 2 )  +  ( q ^ 2 ) )  /\  ( N  x.  P )  =  ( ( x ^ 2 )  +  ( y ^ 2 ) ) ) ) )  ->  N  e.  NN )
12 2sqlem5.2 . . . . . . . . 9  |-  ( ph  ->  P  e.  Prime )
1312ad2antrr 707 . . . . . . . 8  |-  ( ( ( ph  /\  (
p  e.  ZZ  /\  x  e.  ZZ )
)  /\  ( (
q  e.  ZZ  /\  y  e.  ZZ )  /\  ( P  =  ( ( p ^ 2 )  +  ( q ^ 2 ) )  /\  ( N  x.  P )  =  ( ( x ^ 2 )  +  ( y ^ 2 ) ) ) ) )  ->  P  e.  Prime )
14 simplrr 738 . . . . . . . 8  |-  ( ( ( ph  /\  (
p  e.  ZZ  /\  x  e.  ZZ )
)  /\  ( (
q  e.  ZZ  /\  y  e.  ZZ )  /\  ( P  =  ( ( p ^ 2 )  +  ( q ^ 2 ) )  /\  ( N  x.  P )  =  ( ( x ^ 2 )  +  ( y ^ 2 ) ) ) ) )  ->  x  e.  ZZ )
15 simprlr 740 . . . . . . . 8  |-  ( ( ( ph  /\  (
p  e.  ZZ  /\  x  e.  ZZ )
)  /\  ( (
q  e.  ZZ  /\  y  e.  ZZ )  /\  ( P  =  ( ( p ^ 2 )  +  ( q ^ 2 ) )  /\  ( N  x.  P )  =  ( ( x ^ 2 )  +  ( y ^ 2 ) ) ) ) )  -> 
y  e.  ZZ )
16 simplrl 737 . . . . . . . 8  |-  ( ( ( ph  /\  (
p  e.  ZZ  /\  x  e.  ZZ )
)  /\  ( (
q  e.  ZZ  /\  y  e.  ZZ )  /\  ( P  =  ( ( p ^ 2 )  +  ( q ^ 2 ) )  /\  ( N  x.  P )  =  ( ( x ^ 2 )  +  ( y ^ 2 ) ) ) ) )  ->  p  e.  ZZ )
17 simprll 739 . . . . . . . 8  |-  ( ( ( ph  /\  (
p  e.  ZZ  /\  x  e.  ZZ )
)  /\  ( (
q  e.  ZZ  /\  y  e.  ZZ )  /\  ( P  =  ( ( p ^ 2 )  +  ( q ^ 2 ) )  /\  ( N  x.  P )  =  ( ( x ^ 2 )  +  ( y ^ 2 ) ) ) ) )  -> 
q  e.  ZZ )
18 simprrr 742 . . . . . . . 8  |-  ( ( ( ph  /\  (
p  e.  ZZ  /\  x  e.  ZZ )
)  /\  ( (
q  e.  ZZ  /\  y  e.  ZZ )  /\  ( P  =  ( ( p ^ 2 )  +  ( q ^ 2 ) )  /\  ( N  x.  P )  =  ( ( x ^ 2 )  +  ( y ^ 2 ) ) ) ) )  -> 
( N  x.  P
)  =  ( ( x ^ 2 )  +  ( y ^
2 ) ) )
19 simprrl 741 . . . . . . . 8  |-  ( ( ( ph  /\  (
p  e.  ZZ  /\  x  e.  ZZ )
)  /\  ( (
q  e.  ZZ  /\  y  e.  ZZ )  /\  ( P  =  ( ( p ^ 2 )  +  ( q ^ 2 ) )  /\  ( N  x.  P )  =  ( ( x ^ 2 )  +  ( y ^ 2 ) ) ) ) )  ->  P  =  ( (
p ^ 2 )  +  ( q ^
2 ) ) )
202, 11, 13, 14, 15, 16, 17, 18, 192sqlem4 21020 . . . . . . 7  |-  ( ( ( ph  /\  (
p  e.  ZZ  /\  x  e.  ZZ )
)  /\  ( (
q  e.  ZZ  /\  y  e.  ZZ )  /\  ( P  =  ( ( p ^ 2 )  +  ( q ^ 2 ) )  /\  ( N  x.  P )  =  ( ( x ^ 2 )  +  ( y ^ 2 ) ) ) ) )  ->  N  e.  S )
2120expr 599 . . . . . 6  |-  ( ( ( ph  /\  (
p  e.  ZZ  /\  x  e.  ZZ )
)  /\  ( q  e.  ZZ  /\  y  e.  ZZ ) )  -> 
( ( P  =  ( ( p ^
2 )  +  ( q ^ 2 ) )  /\  ( N  x.  P )  =  ( ( x ^
2 )  +  ( y ^ 2 ) ) )  ->  N  e.  S ) )
2221rexlimdvva 2782 . . . . 5  |-  ( (
ph  /\  ( p  e.  ZZ  /\  x  e.  ZZ ) )  -> 
( E. q  e.  ZZ  E. y  e.  ZZ  ( P  =  ( ( p ^
2 )  +  ( q ^ 2 ) )  /\  ( N  x.  P )  =  ( ( x ^
2 )  +  ( y ^ 2 ) ) )  ->  N  e.  S ) )
239, 22syl5bir 210 . . . 4  |-  ( (
ph  /\  ( p  e.  ZZ  /\  x  e.  ZZ ) )  -> 
( ( E. q  e.  ZZ  P  =  ( ( p ^ 2 )  +  ( q ^ 2 ) )  /\  E. y  e.  ZZ  ( N  x.  P )  =  ( ( x ^ 2 )  +  ( y ^ 2 ) ) )  ->  N  e.  S ) )
2423rexlimdvva 2782 . . 3  |-  ( ph  ->  ( E. p  e.  ZZ  E. x  e.  ZZ  ( E. q  e.  ZZ  P  =  ( ( p ^ 2 )  +  ( q ^ 2 ) )  /\  E. y  e.  ZZ  ( N  x.  P )  =  ( ( x ^ 2 )  +  ( y ^ 2 ) ) )  ->  N  e.  S ) )
258, 24syl5bir 210 . 2  |-  ( ph  ->  ( ( E. p  e.  ZZ  E. q  e.  ZZ  P  =  ( ( p ^ 2 )  +  ( q ^ 2 ) )  /\  E. x  e.  ZZ  E. y  e.  ZZ  ( N  x.  P )  =  ( ( x ^ 2 )  +  ( y ^ 2 ) ) )  ->  N  e.  S ) )
264, 7, 25mp2and 661 1  |-  ( ph  ->  N  e.  S )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 359    = wceq 1649    e. wcel 1717   E.wrex 2652    e. cmpt 4209   ran crn 4821   ` cfv 5396  (class class class)co 6022    + caddc 8928    x. cmul 8930   NNcn 9934   2c2 9983   ZZcz 10216   ^cexp 11311   abscabs 11968   Primecprime 13008   ZZ [ _i ]cgz 13226
This theorem is referenced by:  2sqlem6  21022
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1552  ax-5 1563  ax-17 1623  ax-9 1661  ax-8 1682  ax-13 1719  ax-14 1721  ax-6 1736  ax-7 1741  ax-11 1753  ax-12 1939  ax-ext 2370  ax-sep 4273  ax-nul 4281  ax-pow 4320  ax-pr 4346  ax-un 4643  ax-cnex 8981  ax-resscn 8982  ax-1cn 8983  ax-icn 8984  ax-addcl 8985  ax-addrcl 8986  ax-mulcl 8987  ax-mulrcl 8988  ax-mulcom 8989  ax-addass 8990  ax-mulass 8991  ax-distr 8992  ax-i2m1 8993  ax-1ne0 8994  ax-1rid 8995  ax-rnegex 8996  ax-rrecex 8997  ax-cnre 8998  ax-pre-lttri 8999  ax-pre-lttrn 9000  ax-pre-ltadd 9001  ax-pre-mulgt0 9002  ax-pre-sup 9003
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1325  df-ex 1548  df-nf 1551  df-sb 1656  df-eu 2244  df-mo 2245  df-clab 2376  df-cleq 2382  df-clel 2385  df-nfc 2514  df-ne 2554  df-nel 2555  df-ral 2656  df-rex 2657  df-reu 2658  df-rmo 2659  df-rab 2660  df-v 2903  df-sbc 3107  df-csb 3197  df-dif 3268  df-un 3270  df-in 3272  df-ss 3279  df-pss 3281  df-nul 3574  df-if 3685  df-pw 3746  df-sn 3765  df-pr 3766  df-tp 3767  df-op 3768  df-uni 3960  df-int 3995  df-iun 4039  df-br 4156  df-opab 4210  df-mpt 4211  df-tr 4246  df-eprel 4437  df-id 4441  df-po 4446  df-so 4447  df-fr 4484  df-we 4486  df-ord 4527  df-on 4528  df-lim 4529  df-suc 4530  df-om 4788  df-xp 4826  df-rel 4827  df-cnv 4828  df-co 4829  df-dm 4830  df-rn 4831  df-res 4832  df-ima 4833  df-iota 5360  df-fun 5398  df-fn 5399  df-f 5400  df-f1 5401  df-fo 5402  df-f1o 5403  df-fv 5404  df-ov 6025  df-oprab 6026  df-mpt2 6027  df-2nd 6291  df-riota 6487  df-recs 6571  df-rdg 6606  df-1o 6662  df-2o 6663  df-oadd 6666  df-er 6843  df-en 7048  df-dom 7049  df-sdom 7050  df-fin 7051  df-sup 7383  df-pnf 9057  df-mnf 9058  df-xr 9059  df-ltxr 9060  df-le 9061  df-sub 9227  df-neg 9228  df-div 9612  df-nn 9935  df-2 9992  df-3 9993  df-n0 10156  df-z 10217  df-uz 10423  df-rp 10547  df-fl 11131  df-mod 11180  df-seq 11253  df-exp 11312  df-cj 11833  df-re 11834  df-im 11835  df-sqr 11969  df-abs 11970  df-dvds 12782  df-gcd 12936  df-prm 13009  df-gz 13227
  Copyright terms: Public domain W3C validator