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

Theorem 2sqlem8a 22594
Description: Lemma for 2sqlem8 22595. (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 10915 . . . . . 6  |-  ( M  e.  ( ZZ>= `  2
)  <->  ( M  e.  NN  /\  M  =/=  1 ) )
42, 3sylib 196 . . . . 5  |-  ( ph  ->  ( M  e.  NN  /\  M  =/=  1 ) )
54simpld 456 . . . 4  |-  ( ph  ->  M  e.  NN )
6 2sqlem8.c . . . 4  |-  C  =  ( ( ( A  +  ( M  / 
2 ) )  mod 
M )  -  ( M  /  2 ) )
71, 5, 64sqlem5 13985 . . 3  |-  ( ph  ->  ( C  e.  ZZ  /\  ( ( A  -  C )  /  M
)  e.  ZZ ) )
87simpld 456 . 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 13985 . . 3  |-  ( ph  ->  ( D  e.  ZZ  /\  ( ( B  -  D )  /  M
)  e.  ZZ ) )
1211simpld 456 . 2  |-  ( ph  ->  D  e.  ZZ )
134simprd 460 . . . 4  |-  ( ph  ->  M  =/=  1 )
14 simpr 458 . . . . . . . . . 10  |-  ( (
ph  /\  ( C ^ 2 )  =  0 )  ->  ( C ^ 2 )  =  0 )
151, 5, 6, 144sqlem9 13989 . . . . . . . . 9  |-  ( (
ph  /\  ( C ^ 2 )  =  0 )  ->  ( M ^ 2 )  ||  ( A ^ 2 ) )
1615ex 434 . . . . . . . 8  |-  ( ph  ->  ( ( C ^
2 )  =  0  ->  ( M ^
2 )  ||  ( A ^ 2 ) ) )
17 eluzelz 10857 . . . . . . . . . 10  |-  ( M  e.  ( ZZ>= `  2
)  ->  M  e.  ZZ )
182, 17syl 16 . . . . . . . . 9  |-  ( ph  ->  M  e.  ZZ )
19 dvdssq 13726 . . . . . . . . 9  |-  ( ( M  e.  ZZ  /\  A  e.  ZZ )  ->  ( M  ||  A  <->  ( M ^ 2 ) 
||  ( A ^
2 ) ) )
2018, 1, 19syl2anc 654 . . . . . . . 8  |-  ( ph  ->  ( M  ||  A  <->  ( M ^ 2 ) 
||  ( A ^
2 ) ) )
2116, 20sylibrd 234 . . . . . . 7  |-  ( ph  ->  ( ( C ^
2 )  =  0  ->  M  ||  A
) )
22 simpr 458 . . . . . . . . . 10  |-  ( (
ph  /\  ( D ^ 2 )  =  0 )  ->  ( D ^ 2 )  =  0 )
239, 5, 10, 224sqlem9 13989 . . . . . . . . 9  |-  ( (
ph  /\  ( D ^ 2 )  =  0 )  ->  ( M ^ 2 )  ||  ( B ^ 2 ) )
2423ex 434 . . . . . . . 8  |-  ( ph  ->  ( ( D ^
2 )  =  0  ->  ( M ^
2 )  ||  ( B ^ 2 ) ) )
25 dvdssq 13726 . . . . . . . . 9  |-  ( ( M  e.  ZZ  /\  B  e.  ZZ )  ->  ( M  ||  B  <->  ( M ^ 2 ) 
||  ( B ^
2 ) ) )
2618, 9, 25syl2anc 654 . . . . . . . 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 9338 . . . . . . . . . . . 12  |-  1  =/=  0
3029a1i 11 . . . . . . . . . . 11  |-  ( ph  ->  1  =/=  0 )
3128, 30eqnetrd 2616 . . . . . . . . . 10  |-  ( ph  ->  ( A  gcd  B
)  =/=  0 )
3231neneqd 2614 . . . . . . . . 9  |-  ( ph  ->  -.  ( A  gcd  B )  =  0 )
33 gcdeq0 13687 . . . . . . . . . 10  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( A  gcd  B )  =  0  <->  ( A  =  0  /\  B  =  0 ) ) )
341, 9, 33syl2anc 654 . . . . . . . . 9  |-  ( ph  ->  ( ( A  gcd  B )  =  0  <->  ( A  =  0  /\  B  =  0 ) ) )
3532, 34mtbid 300 . . . . . . . 8  |-  ( ph  ->  -.  ( A  =  0  /\  B  =  0 ) )
36 dvdslegcd 13682 . . . . . . . 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 1214 . . . . . . 7  |-  ( ph  ->  ( ( M  ||  A  /\  M  ||  B
)  ->  M  <_  ( A  gcd  B ) ) )
3821, 27, 37syl2and 480 . . . . . 6  |-  ( ph  ->  ( ( ( C ^ 2 )  =  0  /\  ( D ^ 2 )  =  0 )  ->  M  <_  ( A  gcd  B
) ) )
3928breq2d 4292 . . . . . . 7  |-  ( ph  ->  ( M  <_  ( A  gcd  B )  <->  M  <_  1 ) )
40 nnle1eq1 10337 . . . . . . . 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 2634 . . . 4  |-  ( ph  ->  ( M  =/=  1  ->  -.  ( ( C ^ 2 )  =  0  /\  ( D ^ 2 )  =  0 ) ) )
4513, 44mpd 15 . . 3  |-  ( ph  ->  -.  ( ( C ^ 2 )  =  0  /\  ( D ^ 2 )  =  0 ) )
468zcnd 10735 . . . . 5  |-  ( ph  ->  C  e.  CC )
47 sqeq0 11913 . . . . 5  |-  ( C  e.  CC  ->  (
( C ^ 2 )  =  0  <->  C  =  0 ) )
4846, 47syl 16 . . . 4  |-  ( ph  ->  ( ( C ^
2 )  =  0  <-> 
C  =  0 ) )
4912zcnd 10735 . . . . 5  |-  ( ph  ->  D  e.  CC )
50 sqeq0 11913 . . . . 5  |-  ( D  e.  CC  ->  (
( D ^ 2 )  =  0  <->  D  =  0 ) )
5149, 50syl 16 . . . 4  |-  ( ph  ->  ( ( D ^
2 )  =  0  <-> 
D  =  0 ) )
5248, 51anbi12d 703 . . 3  |-  ( ph  ->  ( ( ( C ^ 2 )  =  0  /\  ( D ^ 2 )  =  0 )  <->  ( C  =  0  /\  D  =  0 ) ) )
5345, 52mtbid 300 . 2  |-  ( ph  ->  -.  ( C  =  0  /\  D  =  0 ) )
54 gcdn0cl 13680 . 2  |-  ( ( ( C  e.  ZZ  /\  D  e.  ZZ )  /\  -.  ( C  =  0  /\  D  =  0 ) )  ->  ( C  gcd  D )  e.  NN )
558, 12, 53, 54syl21anc 1210 1  |-  ( ph  ->  ( C  gcd  D
)  e.  NN )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 184    /\ wa 369    = wceq 1362    e. wcel 1755   {cab 2419    =/= wne 2596   A.wral 2705   E.wrex 2706   class class class wbr 4280    e. cmpt 4338   ran crn 4828   ` cfv 5406  (class class class)co 6080   CCcc 9267   0cc0 9269   1c1 9270    + caddc 9272    <_ cle 9406    - cmin 9582    / cdiv 9980   NNcn 10309   2c2 10358   ZZcz 10633   ZZ>=cuz 10848   ...cfz 11423    mod cmo 11691   ^cexp 11848   abscabs 12706    || cdivides 13517    gcd cgcd 13672   ZZ[_i]cgz 13972
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1594  ax-4 1605  ax-5 1669  ax-6 1707  ax-7 1727  ax-8 1757  ax-9 1759  ax-10 1774  ax-11 1779  ax-12 1791  ax-13 1942  ax-ext 2414  ax-sep 4401  ax-nul 4409  ax-pow 4458  ax-pr 4519  ax-un 6361  ax-cnex 9325  ax-resscn 9326  ax-1cn 9327  ax-icn 9328  ax-addcl 9329  ax-addrcl 9330  ax-mulcl 9331  ax-mulrcl 9332  ax-mulcom 9333  ax-addass 9334  ax-mulass 9335  ax-distr 9336  ax-i2m1 9337  ax-1ne0 9338  ax-1rid 9339  ax-rnegex 9340  ax-rrecex 9341  ax-cnre 9342  ax-pre-lttri 9343  ax-pre-lttrn 9344  ax-pre-ltadd 9345  ax-pre-mulgt0 9346  ax-pre-sup 9347
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 959  df-3an 960  df-tru 1365  df-ex 1590  df-nf 1593  df-sb 1700  df-eu 2258  df-mo 2259  df-clab 2420  df-cleq 2426  df-clel 2429  df-nfc 2558  df-ne 2598  df-nel 2599  df-ral 2710  df-rex 2711  df-reu 2712  df-rmo 2713  df-rab 2714  df-v 2964  df-sbc 3176  df-csb 3277  df-dif 3319  df-un 3321  df-in 3323  df-ss 3330  df-pss 3332  df-nul 3626  df-if 3780  df-pw 3850  df-sn 3866  df-pr 3868  df-tp 3870  df-op 3872  df-uni 4080  df-iun 4161  df-br 4281  df-opab 4339  df-mpt 4340  df-tr 4374  df-eprel 4619  df-id 4623  df-po 4628  df-so 4629  df-fr 4666  df-we 4668  df-ord 4709  df-on 4710  df-lim 4711  df-suc 4712  df-xp 4833  df-rel 4834  df-cnv 4835  df-co 4836  df-dm 4837  df-rn 4838  df-res 4839  df-ima 4840  df-iota 5369  df-fun 5408  df-fn 5409  df-f 5410  df-f1 5411  df-fo 5412  df-f1o 5413  df-fv 5414  df-riota 6039  df-ov 6083  df-oprab 6084  df-mpt2 6085  df-om 6466  df-2nd 6567  df-recs 6818  df-rdg 6852  df-er 7089  df-en 7299  df-dom 7300  df-sdom 7301  df-sup 7679  df-pnf 9407  df-mnf 9408  df-xr 9409  df-ltxr 9410  df-le 9411  df-sub 9584  df-neg 9585  df-div 9981  df-nn 10310  df-2 10367  df-3 10368  df-n0 10567  df-z 10634  df-uz 10849  df-rp 10979  df-fl 11625  df-mod 11692  df-seq 11790  df-exp 11849  df-cj 12571  df-re 12572  df-im 12573  df-sqr 12707  df-abs 12708  df-dvds 13518  df-gcd 13673
This theorem is referenced by:  2sqlem8  22595
  Copyright terms: Public domain W3C validator