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

Theorem 2sqlem8a 22828
Description: Lemma for 2sqlem8 22829. (Contributed by Mario Carneiro, 4-Jun-2016.)
Hypotheses
Ref Expression
2sq.1  |-  S  =  ran  ( w  e.  ZZ[_i]  |->  ( ( abs `  w
) ^ 2 ) )
2sqlem7.2  |-  Y  =  { z  |  E. x  e.  ZZ  E. y  e.  ZZ  ( ( x  gcd  y )  =  1  /\  z  =  ( ( x ^
2 )  +  ( y ^ 2 ) ) ) }
2sqlem9.5  |-  ( ph  ->  A. b  e.  ( 1 ... ( M  -  1 ) ) A. a  e.  Y  ( b  ||  a  ->  b  e.  S ) )
2sqlem9.7  |-  ( ph  ->  M  ||  N )
2sqlem8.n  |-  ( ph  ->  N  e.  NN )
2sqlem8.m  |-  ( ph  ->  M  e.  ( ZZ>= ` 
2 ) )
2sqlem8.1  |-  ( ph  ->  A  e.  ZZ )
2sqlem8.2  |-  ( ph  ->  B  e.  ZZ )
2sqlem8.3  |-  ( ph  ->  ( A  gcd  B
)  =  1 )
2sqlem8.4  |-  ( ph  ->  N  =  ( ( A ^ 2 )  +  ( B ^
2 ) ) )
2sqlem8.c  |-  C  =  ( ( ( A  +  ( M  / 
2 ) )  mod 
M )  -  ( M  /  2 ) )
2sqlem8.d  |-  D  =  ( ( ( B  +  ( M  / 
2 ) )  mod 
M )  -  ( M  /  2 ) )
Assertion
Ref Expression
2sqlem8a  |-  ( ph  ->  ( C  gcd  D
)  e.  NN )
Distinct variable groups:    a, b, w, x, y, z    A, a, x, y, z    x, C    ph, x, y    B, a, b, x, y    M, a, b, x, y, z    S, a, b, x, y, z    x, D    x, N, y, z    Y, a, b, x, y
Allowed substitution hints:    ph( z, w, a, b)    A( w, b)    B( z, w)    C( y, z, w, a, b)    D( y, z, w, a, b)    S( w)    M( w)    N( w, a, b)    Y( z, w)

Proof of Theorem 2sqlem8a
StepHypRef Expression
1 2sqlem8.1 . . . 4  |-  ( ph  ->  A  e.  ZZ )
2 2sqlem8.m . . . . . 6  |-  ( ph  ->  M  e.  ( ZZ>= ` 
2 ) )
3 eluz2b3 11031 . . . . . 6  |-  ( M  e.  ( ZZ>= `  2
)  <->  ( M  e.  NN  /\  M  =/=  1 ) )
42, 3sylib 196 . . . . 5  |-  ( ph  ->  ( M  e.  NN  /\  M  =/=  1 ) )
54simpld 459 . . . 4  |-  ( ph  ->  M  e.  NN )
6 2sqlem8.c . . . 4  |-  C  =  ( ( ( A  +  ( M  / 
2 ) )  mod 
M )  -  ( M  /  2 ) )
71, 5, 64sqlem5 14107 . . 3  |-  ( ph  ->  ( C  e.  ZZ  /\  ( ( A  -  C )  /  M
)  e.  ZZ ) )
87simpld 459 . 2  |-  ( ph  ->  C  e.  ZZ )
9 2sqlem8.2 . . . 4  |-  ( ph  ->  B  e.  ZZ )
10 2sqlem8.d . . . 4  |-  D  =  ( ( ( B  +  ( M  / 
2 ) )  mod 
M )  -  ( M  /  2 ) )
119, 5, 104sqlem5 14107 . . 3  |-  ( ph  ->  ( D  e.  ZZ  /\  ( ( B  -  D )  /  M
)  e.  ZZ ) )
1211simpld 459 . 2  |-  ( ph  ->  D  e.  ZZ )
134simprd 463 . . . 4  |-  ( ph  ->  M  =/=  1 )
14 simpr 461 . . . . . . . . . 10  |-  ( (
ph  /\  ( C ^ 2 )  =  0 )  ->  ( C ^ 2 )  =  0 )
151, 5, 6, 144sqlem9 14111 . . . . . . . . 9  |-  ( (
ph  /\  ( C ^ 2 )  =  0 )  ->  ( M ^ 2 )  ||  ( A ^ 2 ) )
1615ex 434 . . . . . . . 8  |-  ( ph  ->  ( ( C ^
2 )  =  0  ->  ( M ^
2 )  ||  ( A ^ 2 ) ) )
17 eluzelz 10973 . . . . . . . . . 10  |-  ( M  e.  ( ZZ>= `  2
)  ->  M  e.  ZZ )
182, 17syl 16 . . . . . . . . 9  |-  ( ph  ->  M  e.  ZZ )
19 dvdssq 13848 . . . . . . . . 9  |-  ( ( M  e.  ZZ  /\  A  e.  ZZ )  ->  ( M  ||  A  <->  ( M ^ 2 ) 
||  ( A ^
2 ) ) )
2018, 1, 19syl2anc 661 . . . . . . . 8  |-  ( ph  ->  ( M  ||  A  <->  ( M ^ 2 ) 
||  ( A ^
2 ) ) )
2116, 20sylibrd 234 . . . . . . 7  |-  ( ph  ->  ( ( C ^
2 )  =  0  ->  M  ||  A
) )
22 simpr 461 . . . . . . . . . 10  |-  ( (
ph  /\  ( D ^ 2 )  =  0 )  ->  ( D ^ 2 )  =  0 )
239, 5, 10, 224sqlem9 14111 . . . . . . . . 9  |-  ( (
ph  /\  ( D ^ 2 )  =  0 )  ->  ( M ^ 2 )  ||  ( B ^ 2 ) )
2423ex 434 . . . . . . . 8  |-  ( ph  ->  ( ( D ^
2 )  =  0  ->  ( M ^
2 )  ||  ( B ^ 2 ) ) )
25 dvdssq 13848 . . . . . . . . 9  |-  ( ( M  e.  ZZ  /\  B  e.  ZZ )  ->  ( M  ||  B  <->  ( M ^ 2 ) 
||  ( B ^
2 ) ) )
2618, 9, 25syl2anc 661 . . . . . . . 8  |-  ( ph  ->  ( M  ||  B  <->  ( M ^ 2 ) 
||  ( B ^
2 ) ) )
2724, 26sylibrd 234 . . . . . . 7  |-  ( ph  ->  ( ( D ^
2 )  =  0  ->  M  ||  B
) )
28 2sqlem8.3 . . . . . . . . . . 11  |-  ( ph  ->  ( A  gcd  B
)  =  1 )
29 ax-1ne0 9454 . . . . . . . . . . . 12  |-  1  =/=  0
3029a1i 11 . . . . . . . . . . 11  |-  ( ph  ->  1  =/=  0 )
3128, 30eqnetrd 2741 . . . . . . . . . 10  |-  ( ph  ->  ( A  gcd  B
)  =/=  0 )
3231neneqd 2651 . . . . . . . . 9  |-  ( ph  ->  -.  ( A  gcd  B )  =  0 )
33 gcdeq0 13809 . . . . . . . . . 10  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( A  gcd  B )  =  0  <->  ( A  =  0  /\  B  =  0 ) ) )
341, 9, 33syl2anc 661 . . . . . . . . 9  |-  ( ph  ->  ( ( A  gcd  B )  =  0  <->  ( A  =  0  /\  B  =  0 ) ) )
3532, 34mtbid 300 . . . . . . . 8  |-  ( ph  ->  -.  ( A  =  0  /\  B  =  0 ) )
36 dvdslegcd 13804 . . . . . . . 8  |-  ( ( ( M  e.  ZZ  /\  A  e.  ZZ  /\  B  e.  ZZ )  /\  -.  ( A  =  0  /\  B  =  0 ) )  -> 
( ( M  ||  A  /\  M  ||  B
)  ->  M  <_  ( A  gcd  B ) ) )
3718, 1, 9, 35, 36syl31anc 1222 . . . . . . 7  |-  ( ph  ->  ( ( M  ||  A  /\  M  ||  B
)  ->  M  <_  ( A  gcd  B ) ) )
3821, 27, 37syl2and 483 . . . . . 6  |-  ( ph  ->  ( ( ( C ^ 2 )  =  0  /\  ( D ^ 2 )  =  0 )  ->  M  <_  ( A  gcd  B
) ) )
3928breq2d 4404 . . . . . . 7  |-  ( ph  ->  ( M  <_  ( A  gcd  B )  <->  M  <_  1 ) )
40 nnle1eq1 10453 . . . . . . . 8  |-  ( M  e.  NN  ->  ( M  <_  1  <->  M  = 
1 ) )
415, 40syl 16 . . . . . . 7  |-  ( ph  ->  ( M  <_  1  <->  M  =  1 ) )
4239, 41bitrd 253 . . . . . 6  |-  ( ph  ->  ( M  <_  ( A  gcd  B )  <->  M  = 
1 ) )
4338, 42sylibd 214 . . . . 5  |-  ( ph  ->  ( ( ( C ^ 2 )  =  0  /\  ( D ^ 2 )  =  0 )  ->  M  =  1 ) )
4443necon3ad 2658 . . . 4  |-  ( ph  ->  ( M  =/=  1  ->  -.  ( ( C ^ 2 )  =  0  /\  ( D ^ 2 )  =  0 ) ) )
4513, 44mpd 15 . . 3  |-  ( ph  ->  -.  ( ( C ^ 2 )  =  0  /\  ( D ^ 2 )  =  0 ) )
468zcnd 10851 . . . . 5  |-  ( ph  ->  C  e.  CC )
47 sqeq0 12033 . . . . 5  |-  ( C  e.  CC  ->  (
( C ^ 2 )  =  0  <->  C  =  0 ) )
4846, 47syl 16 . . . 4  |-  ( ph  ->  ( ( C ^
2 )  =  0  <-> 
C  =  0 ) )
4912zcnd 10851 . . . . 5  |-  ( ph  ->  D  e.  CC )
50 sqeq0 12033 . . . . 5  |-  ( D  e.  CC  ->  (
( D ^ 2 )  =  0  <->  D  =  0 ) )
5149, 50syl 16 . . . 4  |-  ( ph  ->  ( ( D ^
2 )  =  0  <-> 
D  =  0 ) )
5248, 51anbi12d 710 . . 3  |-  ( ph  ->  ( ( ( C ^ 2 )  =  0  /\  ( D ^ 2 )  =  0 )  <->  ( C  =  0  /\  D  =  0 ) ) )
5345, 52mtbid 300 . 2  |-  ( ph  ->  -.  ( C  =  0  /\  D  =  0 ) )
54 gcdn0cl 13802 . 2  |-  ( ( ( C  e.  ZZ  /\  D  e.  ZZ )  /\  -.  ( C  =  0  /\  D  =  0 ) )  ->  ( C  gcd  D )  e.  NN )
558, 12, 53, 54syl21anc 1218 1  |-  ( ph  ->  ( C  gcd  D
)  e.  NN )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 184    /\ wa 369    = wceq 1370    e. wcel 1758   {cab 2436    =/= wne 2644   A.wral 2795   E.wrex 2796   class class class wbr 4392    |-> cmpt 4450   ran crn 4941   ` cfv 5518  (class class class)co 6192   CCcc 9383   0cc0 9385   1c1 9386    + caddc 9388    <_ cle 9522    - cmin 9698    / cdiv 10096   NNcn 10425   2c2 10474   ZZcz 10749   ZZ>=cuz 10964   ...cfz 11540    mod cmo 11811   ^cexp 11968   abscabs 12827    || cdivides 13639    gcd cgcd 13794   ZZ[_i]cgz 14094
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1592  ax-4 1603  ax-5 1671  ax-6 1710  ax-7 1730  ax-8 1760  ax-9 1762  ax-10 1777  ax-11 1782  ax-12 1794  ax-13 1952  ax-ext 2430  ax-sep 4513  ax-nul 4521  ax-pow 4570  ax-pr 4631  ax-un 6474  ax-cnex 9441  ax-resscn 9442  ax-1cn 9443  ax-icn 9444  ax-addcl 9445  ax-addrcl 9446  ax-mulcl 9447  ax-mulrcl 9448  ax-mulcom 9449  ax-addass 9450  ax-mulass 9451  ax-distr 9452  ax-i2m1 9453  ax-1ne0 9454  ax-1rid 9455  ax-rnegex 9456  ax-rrecex 9457  ax-cnre 9458  ax-pre-lttri 9459  ax-pre-lttrn 9460  ax-pre-ltadd 9461  ax-pre-mulgt0 9462  ax-pre-sup 9463
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1373  df-ex 1588  df-nf 1591  df-sb 1703  df-eu 2264  df-mo 2265  df-clab 2437  df-cleq 2443  df-clel 2446  df-nfc 2601  df-ne 2646  df-nel 2647  df-ral 2800  df-rex 2801  df-reu 2802  df-rmo 2803  df-rab 2804  df-v 3072  df-sbc 3287  df-csb 3389  df-dif 3431  df-un 3433  df-in 3435  df-ss 3442  df-pss 3444  df-nul 3738  df-if 3892  df-pw 3962  df-sn 3978  df-pr 3980  df-tp 3982  df-op 3984  df-uni 4192  df-iun 4273  df-br 4393  df-opab 4451  df-mpt 4452  df-tr 4486  df-eprel 4732  df-id 4736  df-po 4741  df-so 4742  df-fr 4779  df-we 4781  df-ord 4822  df-on 4823  df-lim 4824  df-suc 4825  df-xp 4946  df-rel 4947  df-cnv 4948  df-co 4949  df-dm 4950  df-rn 4951  df-res 4952  df-ima 4953  df-iota 5481  df-fun 5520  df-fn 5521  df-f 5522  df-f1 5523  df-fo 5524  df-f1o 5525  df-fv 5526  df-riota 6153  df-ov 6195  df-oprab 6196  df-mpt2 6197  df-om 6579  df-2nd 6680  df-recs 6934  df-rdg 6968  df-er 7203  df-en 7413  df-dom 7414  df-sdom 7415  df-sup 7794  df-pnf 9523  df-mnf 9524  df-xr 9525  df-ltxr 9526  df-le 9527  df-sub 9700  df-neg 9701  df-div 10097  df-nn 10426  df-2 10483  df-3 10484  df-n0 10683  df-z 10750  df-uz 10965  df-rp 11095  df-fl 11745  df-mod 11812  df-seq 11910  df-exp 11969  df-cj 12692  df-re 12693  df-im 12694  df-sqr 12828  df-abs 12829  df-dvds 13640  df-gcd 13795
This theorem is referenced by:  2sqlem8  22829
  Copyright terms: Public domain W3C validator