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

Theorem 2sqlem8a 20610
Description: Lemma for 2sqlem8 20611. (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 10291 . . . . . 6  |-  ( M  e.  ( ZZ>= `  2
)  <->  ( M  e.  NN  /\  M  =/=  1 ) )
42, 3sylib 188 . . . . 5  |-  ( ph  ->  ( M  e.  NN  /\  M  =/=  1 ) )
54simpld 445 . . . 4  |-  ( ph  ->  M  e.  NN )
6 2sqlem8.c . . . 4  |-  C  =  ( ( ( A  +  ( M  / 
2 ) )  mod 
M )  -  ( M  /  2 ) )
71, 5, 64sqlem5 12989 . . 3  |-  ( ph  ->  ( C  e.  ZZ  /\  ( ( A  -  C )  /  M
)  e.  ZZ ) )
87simpld 445 . 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 12989 . . 3  |-  ( ph  ->  ( D  e.  ZZ  /\  ( ( B  -  D )  /  M
)  e.  ZZ ) )
1211simpld 445 . 2  |-  ( ph  ->  D  e.  ZZ )
134simprd 449 . . . 4  |-  ( ph  ->  M  =/=  1 )
14 simpr 447 . . . . . . . . . 10  |-  ( (
ph  /\  ( C ^ 2 )  =  0 )  ->  ( C ^ 2 )  =  0 )
151, 5, 6, 144sqlem9 12993 . . . . . . . . 9  |-  ( (
ph  /\  ( C ^ 2 )  =  0 )  ->  ( M ^ 2 )  ||  ( A ^ 2 ) )
1615ex 423 . . . . . . . 8  |-  ( ph  ->  ( ( C ^
2 )  =  0  ->  ( M ^
2 )  ||  ( A ^ 2 ) ) )
17 eluzelz 10238 . . . . . . . . . 10  |-  ( M  e.  ( ZZ>= `  2
)  ->  M  e.  ZZ )
182, 17syl 15 . . . . . . . . 9  |-  ( ph  ->  M  e.  ZZ )
19 dvdssq 12739 . . . . . . . . 9  |-  ( ( M  e.  ZZ  /\  A  e.  ZZ )  ->  ( M  ||  A  <->  ( M ^ 2 ) 
||  ( A ^
2 ) ) )
2018, 1, 19syl2anc 642 . . . . . . . 8  |-  ( ph  ->  ( M  ||  A  <->  ( M ^ 2 ) 
||  ( A ^
2 ) ) )
2116, 20sylibrd 225 . . . . . . 7  |-  ( ph  ->  ( ( C ^
2 )  =  0  ->  M  ||  A
) )
22 simpr 447 . . . . . . . . . 10  |-  ( (
ph  /\  ( D ^ 2 )  =  0 )  ->  ( D ^ 2 )  =  0 )
239, 5, 10, 224sqlem9 12993 . . . . . . . . 9  |-  ( (
ph  /\  ( D ^ 2 )  =  0 )  ->  ( M ^ 2 )  ||  ( B ^ 2 ) )
2423ex 423 . . . . . . . 8  |-  ( ph  ->  ( ( D ^
2 )  =  0  ->  ( M ^
2 )  ||  ( B ^ 2 ) ) )
25 dvdssq 12739 . . . . . . . . 9  |-  ( ( M  e.  ZZ  /\  B  e.  ZZ )  ->  ( M  ||  B  <->  ( M ^ 2 ) 
||  ( B ^
2 ) ) )
2618, 9, 25syl2anc 642 . . . . . . . 8  |-  ( ph  ->  ( M  ||  B  <->  ( M ^ 2 ) 
||  ( B ^
2 ) ) )
2724, 26sylibrd 225 . . . . . . 7  |-  ( ph  ->  ( ( D ^
2 )  =  0  ->  M  ||  B
) )
28 2sqlem8.3 . . . . . . . . . . 11  |-  ( ph  ->  ( A  gcd  B
)  =  1 )
29 ax-1ne0 8806 . . . . . . . . . . . 12  |-  1  =/=  0
3029a1i 10 . . . . . . . . . . 11  |-  ( ph  ->  1  =/=  0 )
3128, 30eqnetrd 2464 . . . . . . . . . 10  |-  ( ph  ->  ( A  gcd  B
)  =/=  0 )
3231neneqd 2462 . . . . . . . . 9  |-  ( ph  ->  -.  ( A  gcd  B )  =  0 )
33 gcdeq0 12700 . . . . . . . . . 10  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( A  gcd  B )  =  0  <->  ( A  =  0  /\  B  =  0 ) ) )
341, 9, 33syl2anc 642 . . . . . . . . 9  |-  ( ph  ->  ( ( A  gcd  B )  =  0  <->  ( A  =  0  /\  B  =  0 ) ) )
3532, 34mtbid 291 . . . . . . . 8  |-  ( ph  ->  -.  ( A  =  0  /\  B  =  0 ) )
36 dvdslegcd 12695 . . . . . . . 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 1185 . . . . . . 7  |-  ( ph  ->  ( ( M  ||  A  /\  M  ||  B
)  ->  M  <_  ( A  gcd  B ) ) )
3821, 27, 37syl2and 469 . . . . . 6  |-  ( ph  ->  ( ( ( C ^ 2 )  =  0  /\  ( D ^ 2 )  =  0 )  ->  M  <_  ( A  gcd  B
) ) )
3928breq2d 4035 . . . . . . 7  |-  ( ph  ->  ( M  <_  ( A  gcd  B )  <->  M  <_  1 ) )
40 nnle1eq1 9774 . . . . . . . 8  |-  ( M  e.  NN  ->  ( M  <_  1  <->  M  = 
1 ) )
415, 40syl 15 . . . . . . 7  |-  ( ph  ->  ( M  <_  1  <->  M  =  1 ) )
4239, 41bitrd 244 . . . . . 6  |-  ( ph  ->  ( M  <_  ( A  gcd  B )  <->  M  = 
1 ) )
4338, 42sylibd 205 . . . . 5  |-  ( ph  ->  ( ( ( C ^ 2 )  =  0  /\  ( D ^ 2 )  =  0 )  ->  M  =  1 ) )
4443necon3ad 2482 . . . 4  |-  ( ph  ->  ( M  =/=  1  ->  -.  ( ( C ^ 2 )  =  0  /\  ( D ^ 2 )  =  0 ) ) )
4513, 44mpd 14 . . 3  |-  ( ph  ->  -.  ( ( C ^ 2 )  =  0  /\  ( D ^ 2 )  =  0 ) )
468zcnd 10118 . . . . 5  |-  ( ph  ->  C  e.  CC )
47 sqeq0 11168 . . . . 5  |-  ( C  e.  CC  ->  (
( C ^ 2 )  =  0  <->  C  =  0 ) )
4846, 47syl 15 . . . 4  |-  ( ph  ->  ( ( C ^
2 )  =  0  <-> 
C  =  0 ) )
4912zcnd 10118 . . . . 5  |-  ( ph  ->  D  e.  CC )
50 sqeq0 11168 . . . . 5  |-  ( D  e.  CC  ->  (
( D ^ 2 )  =  0  <->  D  =  0 ) )
5149, 50syl 15 . . . 4  |-  ( ph  ->  ( ( D ^
2 )  =  0  <-> 
D  =  0 ) )
5248, 51anbi12d 691 . . 3  |-  ( ph  ->  ( ( ( C ^ 2 )  =  0  /\  ( D ^ 2 )  =  0 )  <->  ( C  =  0  /\  D  =  0 ) ) )
5345, 52mtbid 291 . 2  |-  ( ph  ->  -.  ( C  =  0  /\  D  =  0 ) )
54 gcdn0cl 12693 . 2  |-  ( ( ( C  e.  ZZ  /\  D  e.  ZZ )  /\  -.  ( C  =  0  /\  D  =  0 ) )  ->  ( C  gcd  D )  e.  NN )
558, 12, 53, 54syl21anc 1181 1  |-  ( ph  ->  ( C  gcd  D
)  e.  NN )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 176    /\ wa 358    = wceq 1623    e. wcel 1684   {cab 2269    =/= wne 2446   A.wral 2543   E.wrex 2544   class class class wbr 4023    e. cmpt 4077   ran crn 4690   ` cfv 5255  (class class class)co 5858   CCcc 8735   0cc0 8737   1c1 8738    + caddc 8740    <_ cle 8868    - cmin 9037    / cdiv 9423   NNcn 9746   2c2 9795   ZZcz 10024   ZZ>=cuz 10230   ...cfz 10782    mod cmo 10973   ^cexp 11104   abscabs 11719    || cdivides 12531    gcd cgcd 12685   ZZ [ _i ]cgz 12976
This theorem is referenced by:  2sqlem8  20611
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1533  ax-5 1544  ax-17 1603  ax-9 1635  ax-8 1643  ax-13 1686  ax-14 1688  ax-6 1703  ax-7 1708  ax-11 1715  ax-12 1866  ax-ext 2264  ax-sep 4141  ax-nul 4149  ax-pow 4188  ax-pr 4214  ax-un 4512  ax-cnex 8793  ax-resscn 8794  ax-1cn 8795  ax-icn 8796  ax-addcl 8797  ax-addrcl 8798  ax-mulcl 8799  ax-mulrcl 8800  ax-mulcom 8801  ax-addass 8802  ax-mulass 8803  ax-distr 8804  ax-i2m1 8805  ax-1ne0 8806  ax-1rid 8807  ax-rnegex 8808  ax-rrecex 8809  ax-cnre 8810  ax-pre-lttri 8811  ax-pre-lttrn 8812  ax-pre-ltadd 8813  ax-pre-mulgt0 8814  ax-pre-sup 8815
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 935  df-3an 936  df-tru 1310  df-ex 1529  df-nf 1532  df-sb 1630  df-eu 2147  df-mo 2148  df-clab 2270  df-cleq 2276  df-clel 2279  df-nfc 2408  df-ne 2448  df-nel 2449  df-ral 2548  df-rex 2549  df-reu 2550  df-rmo 2551  df-rab 2552  df-v 2790  df-sbc 2992  df-csb 3082  df-dif 3155  df-un 3157  df-in 3159  df-ss 3166  df-pss 3168  df-nul 3456  df-if 3566  df-pw 3627  df-sn 3646  df-pr 3647  df-tp 3648  df-op 3649  df-uni 3828  df-iun 3907  df-br 4024  df-opab 4078  df-mpt 4079  df-tr 4114  df-eprel 4305  df-id 4309  df-po 4314  df-so 4315  df-fr 4352  df-we 4354  df-ord 4395  df-on 4396  df-lim 4397  df-suc 4398  df-om 4657  df-xp 4695  df-rel 4696  df-cnv 4697  df-co 4698  df-dm 4699  df-rn 4700  df-res 4701  df-ima 4702  df-iota 5219  df-fun 5257  df-fn 5258  df-f 5259  df-f1 5260  df-fo 5261  df-f1o 5262  df-fv 5263  df-ov 5861  df-oprab 5862  df-mpt2 5863  df-2nd 6123  df-riota 6304  df-recs 6388  df-rdg 6423  df-er 6660  df-en 6864  df-dom 6865  df-sdom 6866  df-sup 7194  df-pnf 8869  df-mnf 8870  df-xr 8871  df-ltxr 8872  df-le 8873  df-sub 9039  df-neg 9040  df-div 9424  df-nn 9747  df-2 9804  df-3 9805  df-n0 9966  df-z 10025  df-uz 10231  df-rp 10355  df-fl 10925  df-mod 10974  df-seq 11047  df-exp 11105  df-cj 11584  df-re 11585  df-im 11586  df-sqr 11720  df-abs 11721  df-dvds 12532  df-gcd 12686
  Copyright terms: Public domain W3C validator