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

Theorem 2sqlem8a 21157
Description: Lemma for 2sqlem8 21158. (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 10551 . . . . . 6  |-  ( M  e.  ( ZZ>= `  2
)  <->  ( M  e.  NN  /\  M  =/=  1 ) )
42, 3sylib 190 . . . . 5  |-  ( ph  ->  ( M  e.  NN  /\  M  =/=  1 ) )
54simpld 447 . . . 4  |-  ( ph  ->  M  e.  NN )
6 2sqlem8.c . . . 4  |-  C  =  ( ( ( A  +  ( M  / 
2 ) )  mod 
M )  -  ( M  /  2 ) )
71, 5, 64sqlem5 13312 . . 3  |-  ( ph  ->  ( C  e.  ZZ  /\  ( ( A  -  C )  /  M
)  e.  ZZ ) )
87simpld 447 . 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 13312 . . 3  |-  ( ph  ->  ( D  e.  ZZ  /\  ( ( B  -  D )  /  M
)  e.  ZZ ) )
1211simpld 447 . 2  |-  ( ph  ->  D  e.  ZZ )
134simprd 451 . . . 4  |-  ( ph  ->  M  =/=  1 )
14 simpr 449 . . . . . . . . . 10  |-  ( (
ph  /\  ( C ^ 2 )  =  0 )  ->  ( C ^ 2 )  =  0 )
151, 5, 6, 144sqlem9 13316 . . . . . . . . 9  |-  ( (
ph  /\  ( C ^ 2 )  =  0 )  ->  ( M ^ 2 )  ||  ( A ^ 2 ) )
1615ex 425 . . . . . . . 8  |-  ( ph  ->  ( ( C ^
2 )  =  0  ->  ( M ^
2 )  ||  ( A ^ 2 ) ) )
17 eluzelz 10498 . . . . . . . . . 10  |-  ( M  e.  ( ZZ>= `  2
)  ->  M  e.  ZZ )
182, 17syl 16 . . . . . . . . 9  |-  ( ph  ->  M  e.  ZZ )
19 dvdssq 13062 . . . . . . . . 9  |-  ( ( M  e.  ZZ  /\  A  e.  ZZ )  ->  ( M  ||  A  <->  ( M ^ 2 ) 
||  ( A ^
2 ) ) )
2018, 1, 19syl2anc 644 . . . . . . . 8  |-  ( ph  ->  ( M  ||  A  <->  ( M ^ 2 ) 
||  ( A ^
2 ) ) )
2116, 20sylibrd 227 . . . . . . 7  |-  ( ph  ->  ( ( C ^
2 )  =  0  ->  M  ||  A
) )
22 simpr 449 . . . . . . . . . 10  |-  ( (
ph  /\  ( D ^ 2 )  =  0 )  ->  ( D ^ 2 )  =  0 )
239, 5, 10, 224sqlem9 13316 . . . . . . . . 9  |-  ( (
ph  /\  ( D ^ 2 )  =  0 )  ->  ( M ^ 2 )  ||  ( B ^ 2 ) )
2423ex 425 . . . . . . . 8  |-  ( ph  ->  ( ( D ^
2 )  =  0  ->  ( M ^
2 )  ||  ( B ^ 2 ) ) )
25 dvdssq 13062 . . . . . . . . 9  |-  ( ( M  e.  ZZ  /\  B  e.  ZZ )  ->  ( M  ||  B  <->  ( M ^ 2 ) 
||  ( B ^
2 ) ) )
2618, 9, 25syl2anc 644 . . . . . . . 8  |-  ( ph  ->  ( M  ||  B  <->  ( M ^ 2 ) 
||  ( B ^
2 ) ) )
2724, 26sylibrd 227 . . . . . . 7  |-  ( ph  ->  ( ( D ^
2 )  =  0  ->  M  ||  B
) )
28 2sqlem8.3 . . . . . . . . . . 11  |-  ( ph  ->  ( A  gcd  B
)  =  1 )
29 ax-1ne0 9061 . . . . . . . . . . . 12  |-  1  =/=  0
3029a1i 11 . . . . . . . . . . 11  |-  ( ph  ->  1  =/=  0 )
3128, 30eqnetrd 2621 . . . . . . . . . 10  |-  ( ph  ->  ( A  gcd  B
)  =/=  0 )
3231neneqd 2619 . . . . . . . . 9  |-  ( ph  ->  -.  ( A  gcd  B )  =  0 )
33 gcdeq0 13023 . . . . . . . . . 10  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( A  gcd  B )  =  0  <->  ( A  =  0  /\  B  =  0 ) ) )
341, 9, 33syl2anc 644 . . . . . . . . 9  |-  ( ph  ->  ( ( A  gcd  B )  =  0  <->  ( A  =  0  /\  B  =  0 ) ) )
3532, 34mtbid 293 . . . . . . . 8  |-  ( ph  ->  -.  ( A  =  0  /\  B  =  0 ) )
36 dvdslegcd 13018 . . . . . . . 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 1188 . . . . . . 7  |-  ( ph  ->  ( ( M  ||  A  /\  M  ||  B
)  ->  M  <_  ( A  gcd  B ) ) )
3821, 27, 37syl2and 471 . . . . . 6  |-  ( ph  ->  ( ( ( C ^ 2 )  =  0  /\  ( D ^ 2 )  =  0 )  ->  M  <_  ( A  gcd  B
) ) )
3928breq2d 4226 . . . . . . 7  |-  ( ph  ->  ( M  <_  ( A  gcd  B )  <->  M  <_  1 ) )
40 nnle1eq1 10030 . . . . . . . 8  |-  ( M  e.  NN  ->  ( M  <_  1  <->  M  = 
1 ) )
415, 40syl 16 . . . . . . 7  |-  ( ph  ->  ( M  <_  1  <->  M  =  1 ) )
4239, 41bitrd 246 . . . . . 6  |-  ( ph  ->  ( M  <_  ( A  gcd  B )  <->  M  = 
1 ) )
4338, 42sylibd 207 . . . . 5  |-  ( ph  ->  ( ( ( C ^ 2 )  =  0  /\  ( D ^ 2 )  =  0 )  ->  M  =  1 ) )
4443necon3ad 2639 . . . 4  |-  ( ph  ->  ( M  =/=  1  ->  -.  ( ( C ^ 2 )  =  0  /\  ( D ^ 2 )  =  0 ) ) )
4513, 44mpd 15 . . 3  |-  ( ph  ->  -.  ( ( C ^ 2 )  =  0  /\  ( D ^ 2 )  =  0 ) )
468zcnd 10378 . . . . 5  |-  ( ph  ->  C  e.  CC )
47 sqeq0 11448 . . . . 5  |-  ( C  e.  CC  ->  (
( C ^ 2 )  =  0  <->  C  =  0 ) )
4846, 47syl 16 . . . 4  |-  ( ph  ->  ( ( C ^
2 )  =  0  <-> 
C  =  0 ) )
4912zcnd 10378 . . . . 5  |-  ( ph  ->  D  e.  CC )
50 sqeq0 11448 . . . . 5  |-  ( D  e.  CC  ->  (
( D ^ 2 )  =  0  <->  D  =  0 ) )
5149, 50syl 16 . . . 4  |-  ( ph  ->  ( ( D ^
2 )  =  0  <-> 
D  =  0 ) )
5248, 51anbi12d 693 . . 3  |-  ( ph  ->  ( ( ( C ^ 2 )  =  0  /\  ( D ^ 2 )  =  0 )  <->  ( C  =  0  /\  D  =  0 ) ) )
5345, 52mtbid 293 . 2  |-  ( ph  ->  -.  ( C  =  0  /\  D  =  0 ) )
54 gcdn0cl 13016 . 2  |-  ( ( ( C  e.  ZZ  /\  D  e.  ZZ )  /\  -.  ( C  =  0  /\  D  =  0 ) )  ->  ( C  gcd  D )  e.  NN )
558, 12, 53, 54syl21anc 1184 1  |-  ( ph  ->  ( C  gcd  D
)  e.  NN )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 178    /\ wa 360    = wceq 1653    e. wcel 1726   {cab 2424    =/= wne 2601   A.wral 2707   E.wrex 2708   class class class wbr 4214    e. cmpt 4268   ran crn 4881   ` cfv 5456  (class class class)co 6083   CCcc 8990   0cc0 8992   1c1 8993    + caddc 8995    <_ cle 9123    - cmin 9293    / cdiv 9679   NNcn 10002   2c2 10051   ZZcz 10284   ZZ>=cuz 10490   ...cfz 11045    mod cmo 11252   ^cexp 11384   abscabs 12041    || cdivides 12854    gcd cgcd 13008   ZZ [ _i ]cgz 13299
This theorem is referenced by:  2sqlem8  21158
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1556  ax-5 1567  ax-17 1627  ax-9 1667  ax-8 1688  ax-13 1728  ax-14 1730  ax-6 1745  ax-7 1750  ax-11 1762  ax-12 1951  ax-ext 2419  ax-sep 4332  ax-nul 4340  ax-pow 4379  ax-pr 4405  ax-un 4703  ax-cnex 9048  ax-resscn 9049  ax-1cn 9050  ax-icn 9051  ax-addcl 9052  ax-addrcl 9053  ax-mulcl 9054  ax-mulrcl 9055  ax-mulcom 9056  ax-addass 9057  ax-mulass 9058  ax-distr 9059  ax-i2m1 9060  ax-1ne0 9061  ax-1rid 9062  ax-rnegex 9063  ax-rrecex 9064  ax-cnre 9065  ax-pre-lttri 9066  ax-pre-lttrn 9067  ax-pre-ltadd 9068  ax-pre-mulgt0 9069  ax-pre-sup 9070
This theorem depends on definitions:  df-bi 179  df-or 361  df-an 362  df-3or 938  df-3an 939  df-tru 1329  df-ex 1552  df-nf 1555  df-sb 1660  df-eu 2287  df-mo 2288  df-clab 2425  df-cleq 2431  df-clel 2434  df-nfc 2563  df-ne 2603  df-nel 2604  df-ral 2712  df-rex 2713  df-reu 2714  df-rmo 2715  df-rab 2716  df-v 2960  df-sbc 3164  df-csb 3254  df-dif 3325  df-un 3327  df-in 3329  df-ss 3336  df-pss 3338  df-nul 3631  df-if 3742  df-pw 3803  df-sn 3822  df-pr 3823  df-tp 3824  df-op 3825  df-uni 4018  df-iun 4097  df-br 4215  df-opab 4269  df-mpt 4270  df-tr 4305  df-eprel 4496  df-id 4500  df-po 4505  df-so 4506  df-fr 4543  df-we 4545  df-ord 4586  df-on 4587  df-lim 4588  df-suc 4589  df-om 4848  df-xp 4886  df-rel 4887  df-cnv 4888  df-co 4889  df-dm 4890  df-rn 4891  df-res 4892  df-ima 4893  df-iota 5420  df-fun 5458  df-fn 5459  df-f 5460  df-f1 5461  df-fo 5462  df-f1o 5463  df-fv 5464  df-ov 6086  df-oprab 6087  df-mpt2 6088  df-2nd 6352  df-riota 6551  df-recs 6635  df-rdg 6670  df-er 6907  df-en 7112  df-dom 7113  df-sdom 7114  df-sup 7448  df-pnf 9124  df-mnf 9125  df-xr 9126  df-ltxr 9127  df-le 9128  df-sub 9295  df-neg 9296  df-div 9680  df-nn 10003  df-2 10060  df-3 10061  df-n0 10224  df-z 10285  df-uz 10491  df-rp 10615  df-fl 11204  df-mod 11253  df-seq 11326  df-exp 11385  df-cj 11906  df-re 11907  df-im 11908  df-sqr 12042  df-abs 12043  df-dvds 12855  df-gcd 13009
  Copyright terms: Public domain W3C validator