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

Theorem gcdcllem3 12708
Description: Lemma for gcdn0cl 12709, gcddvds 12710 and dvdslegcd 12711. (Contributed by Paul Chapman, 21-Mar-2011.)
Hypotheses
Ref Expression
gcdcllem2.1  |-  S  =  { z  e.  ZZ  |  A. n  e.  { M ,  N }
z  ||  n }
gcdcllem2.2  |-  R  =  { z  e.  ZZ  |  ( z  ||  M  /\  z  ||  N
) }
Assertion
Ref Expression
gcdcllem3  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  ( sup ( R ,  RR ,  <  )  e.  NN  /\  ( sup ( R ,  RR ,  <  )  ||  M  /\  sup ( R ,  RR ,  <  ) 
||  N )  /\  ( ( K  e.  ZZ  /\  K  ||  M  /\  K  ||  N
)  ->  K  <_  sup ( R ,  RR ,  <  ) ) ) )
Distinct variable groups:    z, K    z, n, M    n, N, z
Allowed substitution hints:    R( z, n)    S( z, n)    K( n)

Proof of Theorem gcdcllem3
Dummy variables  x  y are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 gcdcllem2.2 . . . . 5  |-  R  =  { z  e.  ZZ  |  ( z  ||  M  /\  z  ||  N
) }
2 ssrab2 3271 . . . . 5  |-  { z  e.  ZZ  |  ( z  ||  M  /\  z  ||  N ) } 
C_  ZZ
31, 2eqsstri 3221 . . . 4  |-  R  C_  ZZ
4 prssi 3787 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  { M ,  N }  C_  ZZ )
54adantr 451 . . . . . . 7  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  { M ,  N }  C_  ZZ )
6 neorian 2546 . . . . . . . 8  |-  ( ( M  =/=  0  \/  N  =/=  0 )  <->  -.  ( M  =  0  /\  N  =  0 ) )
7 prid1g 3745 . . . . . . . . . . 11  |-  ( M  e.  ZZ  ->  M  e.  { M ,  N } )
8 neeq1 2467 . . . . . . . . . . . 12  |-  ( n  =  M  ->  (
n  =/=  0  <->  M  =/=  0 ) )
98rspcev 2897 . . . . . . . . . . 11  |-  ( ( M  e.  { M ,  N }  /\  M  =/=  0 )  ->  E. n  e.  { M ,  N } n  =/=  0
)
107, 9sylan 457 . . . . . . . . . 10  |-  ( ( M  e.  ZZ  /\  M  =/=  0 )  ->  E. n  e.  { M ,  N } n  =/=  0 )
1110adantlr 695 . . . . . . . . 9  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  M  =/=  0
)  ->  E. n  e.  { M ,  N } n  =/=  0
)
12 prid2g 3746 . . . . . . . . . . 11  |-  ( N  e.  ZZ  ->  N  e.  { M ,  N } )
13 neeq1 2467 . . . . . . . . . . . 12  |-  ( n  =  N  ->  (
n  =/=  0  <->  N  =/=  0 ) )
1413rspcev 2897 . . . . . . . . . . 11  |-  ( ( N  e.  { M ,  N }  /\  N  =/=  0 )  ->  E. n  e.  { M ,  N } n  =/=  0
)
1512, 14sylan 457 . . . . . . . . . 10  |-  ( ( N  e.  ZZ  /\  N  =/=  0 )  ->  E. n  e.  { M ,  N } n  =/=  0 )
1615adantll 694 . . . . . . . . 9  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  N  =/=  0
)  ->  E. n  e.  { M ,  N } n  =/=  0
)
1711, 16jaodan 760 . . . . . . . 8  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =/=  0  \/  N  =/=  0 ) )  ->  E. n  e.  { M ,  N } n  =/=  0 )
186, 17sylan2br 462 . . . . . . 7  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  E. n  e.  { M ,  N }
n  =/=  0 )
19 gcdcllem2.1 . . . . . . . 8  |-  S  =  { z  e.  ZZ  |  A. n  e.  { M ,  N }
z  ||  n }
2019gcdcllem1 12706 . . . . . . 7  |-  ( ( { M ,  N }  C_  ZZ  /\  E. n  e.  { M ,  N } n  =/=  0 )  ->  ( S  =/=  (/)  /\  E. x  e.  ZZ  A. y  e.  S  y  <_  x
) )
215, 18, 20syl2anc 642 . . . . . 6  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  ( S  =/=  (/)  /\  E. x  e.  ZZ  A. y  e.  S  y  <_  x
) )
2219, 1gcdcllem2 12707 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  R  =  S )
23 neeq1 2467 . . . . . . . . 9  |-  ( R  =  S  ->  ( R  =/=  (/)  <->  S  =/=  (/) ) )
24 raleq 2749 . . . . . . . . . 10  |-  ( R  =  S  ->  ( A. y  e.  R  y  <_  x  <->  A. y  e.  S  y  <_  x ) )
2524rexbidv 2577 . . . . . . . . 9  |-  ( R  =  S  ->  ( E. x  e.  ZZ  A. y  e.  R  y  <_  x  <->  E. x  e.  ZZ  A. y  e.  S  y  <_  x
) )
2623, 25anbi12d 691 . . . . . . . 8  |-  ( R  =  S  ->  (
( R  =/=  (/)  /\  E. x  e.  ZZ  A. y  e.  R  y  <_  x )  <->  ( S  =/=  (/)  /\  E. x  e.  ZZ  A. y  e.  S  y  <_  x
) ) )
2722, 26syl 15 . . . . . . 7  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( R  =/=  (/)  /\  E. x  e.  ZZ  A. y  e.  R  y  <_  x
)  <->  ( S  =/=  (/)  /\  E. x  e.  ZZ  A. y  e.  S  y  <_  x
) ) )
2827adantr 451 . . . . . 6  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  ( ( R  =/=  (/)  /\  E. x  e.  ZZ  A. y  e.  R  y  <_  x
)  <->  ( S  =/=  (/)  /\  E. x  e.  ZZ  A. y  e.  S  y  <_  x
) ) )
2921, 28mpbird 223 . . . . 5  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  ( R  =/=  (/)  /\  E. x  e.  ZZ  A. y  e.  R  y  <_  x
) )
30 suprzcl2 10324 . . . . . 6  |-  ( ( R  C_  ZZ  /\  R  =/=  (/)  /\  E. x  e.  ZZ  A. y  e.  R  y  <_  x
)  ->  sup ( R ,  RR ,  <  )  e.  R )
313, 30mp3an1 1264 . . . . 5  |-  ( ( R  =/=  (/)  /\  E. x  e.  ZZ  A. y  e.  R  y  <_  x )  ->  sup ( R ,  RR ,  <  )  e.  R )
3229, 31syl 15 . . . 4  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  sup ( R ,  RR ,  <  )  e.  R )
333, 32sseldi 3191 . . 3  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  sup ( R ,  RR ,  <  )  e.  ZZ )
343a1i 10 . . . 4  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  R  C_  ZZ )
3529simprd 449 . . . 4  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  E. x  e.  ZZ  A. y  e.  R  y  <_  x )
36 1dvds 12559 . . . . . . 7  |-  ( M  e.  ZZ  ->  1  ||  M )
37 1dvds 12559 . . . . . . 7  |-  ( N  e.  ZZ  ->  1  ||  N )
3836, 37anim12i 549 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( 1  ||  M  /\  1  ||  N ) )
39 1z 10069 . . . . . . 7  |-  1  e.  ZZ
40 breq1 4042 . . . . . . . . 9  |-  ( z  =  1  ->  (
z  ||  M  <->  1  ||  M ) )
41 breq1 4042 . . . . . . . . 9  |-  ( z  =  1  ->  (
z  ||  N  <->  1  ||  N ) )
4240, 41anbi12d 691 . . . . . . . 8  |-  ( z  =  1  ->  (
( z  ||  M  /\  z  ||  N )  <-> 
( 1  ||  M  /\  1  ||  N ) ) )
4342, 1elrab2 2938 . . . . . . 7  |-  ( 1  e.  R  <->  ( 1  e.  ZZ  /\  (
1  ||  M  /\  1  ||  N ) ) )
4439, 43mpbiran 884 . . . . . 6  |-  ( 1  e.  R  <->  ( 1 
||  M  /\  1  ||  N ) )
4538, 44sylibr 203 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  1  e.  R )
4645adantr 451 . . . 4  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  1  e.  R
)
47 suprzub 10325 . . . 4  |-  ( ( R  C_  ZZ  /\  E. x  e.  ZZ  A. y  e.  R  y  <_  x  /\  1  e.  R
)  ->  1  <_  sup ( R ,  RR ,  <  ) )
4834, 35, 46, 47syl3anc 1182 . . 3  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  1  <_  sup ( R ,  RR ,  <  ) )
49 elnnz1 10065 . . 3  |-  ( sup ( R ,  RR ,  <  )  e.  NN  <->  ( sup ( R ,  RR ,  <  )  e.  ZZ  /\  1  <_  sup ( R ,  RR ,  <  ) ) )
5033, 48, 49sylanbrc 645 . 2  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  sup ( R ,  RR ,  <  )  e.  NN )
51 breq1 4042 . . . . . 6  |-  ( x  =  sup ( R ,  RR ,  <  )  ->  ( x  ||  M 
<->  sup ( R ,  RR ,  <  )  ||  M ) )
52 breq1 4042 . . . . . 6  |-  ( x  =  sup ( R ,  RR ,  <  )  ->  ( x  ||  N 
<->  sup ( R ,  RR ,  <  )  ||  N ) )
5351, 52anbi12d 691 . . . . 5  |-  ( x  =  sup ( R ,  RR ,  <  )  ->  ( ( x 
||  M  /\  x  ||  N )  <->  ( sup ( R ,  RR ,  <  )  ||  M  /\  sup ( R ,  RR ,  <  )  ||  N
) ) )
54 breq1 4042 . . . . . . . 8  |-  ( z  =  x  ->  (
z  ||  M  <->  x  ||  M
) )
55 breq1 4042 . . . . . . . 8  |-  ( z  =  x  ->  (
z  ||  N  <->  x  ||  N
) )
5654, 55anbi12d 691 . . . . . . 7  |-  ( z  =  x  ->  (
( z  ||  M  /\  z  ||  N )  <-> 
( x  ||  M  /\  x  ||  N ) ) )
5756cbvrabv 2800 . . . . . 6  |-  { z  e.  ZZ  |  ( z  ||  M  /\  z  ||  N ) }  =  { x  e.  ZZ  |  ( x 
||  M  /\  x  ||  N ) }
581, 57eqtri 2316 . . . . 5  |-  R  =  { x  e.  ZZ  |  ( x  ||  M  /\  x  ||  N
) }
5953, 58elrab2 2938 . . . 4  |-  ( sup ( R ,  RR ,  <  )  e.  R  <->  ( sup ( R ,  RR ,  <  )  e.  ZZ  /\  ( sup ( R ,  RR ,  <  )  ||  M  /\  sup ( R ,  RR ,  <  )  ||  N ) ) )
6032, 59sylib 188 . . 3  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  ( sup ( R ,  RR ,  <  )  e.  ZZ  /\  ( sup ( R ,  RR ,  <  )  ||  M  /\  sup ( R ,  RR ,  <  ) 
||  N ) ) )
6160simprd 449 . 2  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  ( sup ( R ,  RR ,  <  )  ||  M  /\  sup ( R ,  RR ,  <  )  ||  N
) )
62 breq1 4042 . . . . . . 7  |-  ( z  =  K  ->  (
z  ||  M  <->  K  ||  M
) )
63 breq1 4042 . . . . . . 7  |-  ( z  =  K  ->  (
z  ||  N  <->  K  ||  N
) )
6462, 63anbi12d 691 . . . . . 6  |-  ( z  =  K  ->  (
( z  ||  M  /\  z  ||  N )  <-> 
( K  ||  M  /\  K  ||  N ) ) )
6564, 1elrab2 2938 . . . . 5  |-  ( K  e.  R  <->  ( K  e.  ZZ  /\  ( K 
||  M  /\  K  ||  N ) ) )
6665biimpri 197 . . . 4  |-  ( ( K  e.  ZZ  /\  ( K  ||  M  /\  K  ||  N ) )  ->  K  e.  R
)
67663impb 1147 . . 3  |-  ( ( K  e.  ZZ  /\  K  ||  M  /\  K  ||  N )  ->  K  e.  R )
68 suprzub 10325 . . . . 5  |-  ( ( R  C_  ZZ  /\  E. x  e.  ZZ  A. y  e.  R  y  <_  x  /\  K  e.  R
)  ->  K  <_  sup ( R ,  RR ,  <  ) )
69683expia 1153 . . . 4  |-  ( ( R  C_  ZZ  /\  E. x  e.  ZZ  A. y  e.  R  y  <_  x )  ->  ( K  e.  R  ->  K  <_  sup ( R ,  RR ,  <  ) ) )
703, 69mpan 651 . . 3  |-  ( E. x  e.  ZZ  A. y  e.  R  y  <_  x  ->  ( K  e.  R  ->  K  <_  sup ( R ,  RR ,  <  ) ) )
7135, 67, 70syl2im 34 . 2  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  ( ( K  e.  ZZ  /\  K  ||  M  /\  K  ||  N )  ->  K  <_  sup ( R ,  RR ,  <  ) ) )
7250, 61, 713jca 1132 1  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  ( sup ( R ,  RR ,  <  )  e.  NN  /\  ( sup ( R ,  RR ,  <  )  ||  M  /\  sup ( R ,  RR ,  <  ) 
||  N )  /\  ( ( K  e.  ZZ  /\  K  ||  M  /\  K  ||  N
)  ->  K  <_  sup ( R ,  RR ,  <  ) ) ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 176    \/ wo 357    /\ wa 358    /\ w3a 934    = wceq 1632    e. wcel 1696    =/= wne 2459   A.wral 2556   E.wrex 2557   {crab 2560    C_ wss 3165   (/)c0 3468   {cpr 3654   class class class wbr 4039   supcsup 7209   RRcr 8752   0cc0 8753   1c1 8754    < clt 8883    <_ cle 8884   NNcn 9762   ZZcz 10040    || cdivides 12547
This theorem is referenced by:  gcdn0cl  12709  gcddvds  12710  dvdslegcd  12711
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1536  ax-5 1547  ax-17 1606  ax-9 1644  ax-8 1661  ax-13 1698  ax-14 1700  ax-6 1715  ax-7 1720  ax-11 1727  ax-12 1878  ax-ext 2277  ax-sep 4157  ax-nul 4165  ax-pow 4204  ax-pr 4230  ax-un 4528  ax-cnex 8809  ax-resscn 8810  ax-1cn 8811  ax-icn 8812  ax-addcl 8813  ax-addrcl 8814  ax-mulcl 8815  ax-mulrcl 8816  ax-mulcom 8817  ax-addass 8818  ax-mulass 8819  ax-distr 8820  ax-i2m1 8821  ax-1ne0 8822  ax-1rid 8823  ax-rnegex 8824  ax-rrecex 8825  ax-cnre 8826  ax-pre-lttri 8827  ax-pre-lttrn 8828  ax-pre-ltadd 8829  ax-pre-mulgt0 8830  ax-pre-sup 8831
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 1532  df-nf 1535  df-sb 1639  df-eu 2160  df-mo 2161  df-clab 2283  df-cleq 2289  df-clel 2292  df-nfc 2421  df-ne 2461  df-nel 2462  df-ral 2561  df-rex 2562  df-reu 2563  df-rmo 2564  df-rab 2565  df-v 2803  df-sbc 3005  df-csb 3095  df-dif 3168  df-un 3170  df-in 3172  df-ss 3179  df-pss 3181  df-nul 3469  df-if 3579  df-pw 3640  df-sn 3659  df-pr 3660  df-tp 3661  df-op 3662  df-uni 3844  df-iun 3923  df-br 4040  df-opab 4094  df-mpt 4095  df-tr 4130  df-eprel 4321  df-id 4325  df-po 4330  df-so 4331  df-fr 4368  df-we 4370  df-ord 4411  df-on 4412  df-lim 4413  df-suc 4414  df-om 4673  df-xp 4711  df-rel 4712  df-cnv 4713  df-co 4714  df-dm 4715  df-rn 4716  df-res 4717  df-ima 4718  df-iota 5235  df-fun 5273  df-fn 5274  df-f 5275  df-f1 5276  df-fo 5277  df-f1o 5278  df-fv 5279  df-ov 5877  df-oprab 5878  df-mpt2 5879  df-2nd 6139  df-riota 6320  df-recs 6404  df-rdg 6439  df-er 6676  df-en 6880  df-dom 6881  df-sdom 6882  df-sup 7210  df-pnf 8885  df-mnf 8886  df-xr 8887  df-ltxr 8888  df-le 8889  df-sub 9055  df-neg 9056  df-div 9440  df-nn 9763  df-2 9820  df-3 9821  df-n0 9982  df-z 10041  df-uz 10247  df-rp 10371  df-seq 11063  df-exp 11121  df-cj 11600  df-re 11601  df-im 11602  df-sqr 11736  df-abs 11737  df-dvds 12548
  Copyright terms: Public domain W3C validator