ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  gcddvds Unicode version

Theorem gcddvds 10861
Description: The gcd of two integers divides each of them. (Contributed by Paul Chapman, 21-Mar-2011.)
Assertion
Ref Expression
gcddvds  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( M  gcd  N )  ||  M  /\  ( M  gcd  N ) 
||  N ) )

Proof of Theorem gcddvds
Dummy variables  n  x  y  z are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 0z 8697 . . . . . 6  |-  0  e.  ZZ
2 dvds0 10717 . . . . . 6  |-  ( 0  e.  ZZ  ->  0  ||  0 )
31, 2ax-mp 7 . . . . 5  |-  0  ||  0
4 breq2 3826 . . . . . . 7  |-  ( M  =  0  ->  (
0  ||  M  <->  0  ||  0 ) )
5 breq2 3826 . . . . . . 7  |-  ( N  =  0  ->  (
0  ||  N  <->  0  ||  0 ) )
64, 5bi2anan9 571 . . . . . 6  |-  ( ( M  =  0  /\  N  =  0 )  ->  ( ( 0 
||  M  /\  0  ||  N )  <->  ( 0 
||  0  /\  0  ||  0 ) ) )
7 anidm 388 . . . . . 6  |-  ( ( 0  ||  0  /\  0  ||  0 )  <->  0  ||  0 )
86, 7syl6bb 194 . . . . 5  |-  ( ( M  =  0  /\  N  =  0 )  ->  ( ( 0 
||  M  /\  0  ||  N )  <->  0  ||  0 ) )
93, 8mpbiri 166 . . . 4  |-  ( ( M  =  0  /\  N  =  0 )  ->  ( 0  ||  M  /\  0  ||  N
) )
10 oveq12 5624 . . . . . . 7  |-  ( ( M  =  0  /\  N  =  0 )  ->  ( M  gcd  N )  =  ( 0  gcd  0 ) )
11 gcd0val 10858 . . . . . . 7  |-  ( 0  gcd  0 )  =  0
1210, 11syl6eq 2133 . . . . . 6  |-  ( ( M  =  0  /\  N  =  0 )  ->  ( M  gcd  N )  =  0 )
1312breq1d 3832 . . . . 5  |-  ( ( M  =  0  /\  N  =  0 )  ->  ( ( M  gcd  N )  ||  M 
<->  0  ||  M ) )
1412breq1d 3832 . . . . 5  |-  ( ( M  =  0  /\  N  =  0 )  ->  ( ( M  gcd  N )  ||  N 
<->  0  ||  N ) )
1513, 14anbi12d 457 . . . 4  |-  ( ( M  =  0  /\  N  =  0 )  ->  ( ( ( M  gcd  N ) 
||  M  /\  ( M  gcd  N )  ||  N )  <->  ( 0 
||  M  /\  0  ||  N ) ) )
169, 15mpbird 165 . . 3  |-  ( ( M  =  0  /\  N  =  0 )  ->  ( ( M  gcd  N )  ||  M  /\  ( M  gcd  N )  ||  N ) )
1716adantl 271 . 2  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  -> 
( ( M  gcd  N )  ||  M  /\  ( M  gcd  N ) 
||  N ) )
18 gcdn0val 10859 . . . 4  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  ( M  gcd  N )  =  sup ( { n  e.  ZZ  |  ( n  ||  M  /\  n  ||  N
) } ,  RR ,  <  ) )
19 zssre 8693 . . . . . 6  |-  ZZ  C_  RR
20 gcdsupex 10855 . . . . . 6  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  E. x  e.  ZZ  ( A. y  e.  {
n  e.  ZZ  | 
( n  ||  M  /\  n  ||  N ) }  -.  x  < 
y  /\  A. y  e.  RR  ( y  < 
x  ->  E. z  e.  { n  e.  ZZ  |  ( n  ||  M  /\  n  ||  N
) } y  < 
z ) ) )
21 ssrexv 3075 . . . . . 6  |-  ( ZZ  C_  RR  ->  ( E. x  e.  ZZ  ( A. y  e.  { n  e.  ZZ  |  ( n 
||  M  /\  n  ||  N ) }  -.  x  <  y  /\  A. y  e.  RR  (
y  <  x  ->  E. z  e.  { n  e.  ZZ  |  ( n 
||  M  /\  n  ||  N ) } y  <  z ) )  ->  E. x  e.  RR  ( A. y  e.  {
n  e.  ZZ  | 
( n  ||  M  /\  n  ||  N ) }  -.  x  < 
y  /\  A. y  e.  RR  ( y  < 
x  ->  E. z  e.  { n  e.  ZZ  |  ( n  ||  M  /\  n  ||  N
) } y  < 
z ) ) ) )
2219, 20, 21mpsyl 64 . . . . 5  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  E. x  e.  RR  ( A. y  e.  {
n  e.  ZZ  | 
( n  ||  M  /\  n  ||  N ) }  -.  x  < 
y  /\  A. y  e.  RR  ( y  < 
x  ->  E. z  e.  { n  e.  ZZ  |  ( n  ||  M  /\  n  ||  N
) } y  < 
z ) ) )
23 ssrab2 3095 . . . . . 6  |-  { n  e.  ZZ  |  ( n 
||  M  /\  n  ||  N ) }  C_  ZZ
2423a1i 9 . . . . 5  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  { n  e.  ZZ  |  ( n 
||  M  /\  n  ||  N ) }  C_  ZZ )
2522, 24suprzclex 8780 . . . 4  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  sup ( { n  e.  ZZ  |  ( n 
||  M  /\  n  ||  N ) } ,  RR ,  <  )  e. 
{ n  e.  ZZ  |  ( n  ||  M  /\  n  ||  N
) } )
2618, 25eqeltrd 2161 . . 3  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  ( M  gcd  N )  e.  { n  e.  ZZ  |  ( n 
||  M  /\  n  ||  N ) } )
27 gcdn0cl 10860 . . . . 5  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  ( M  gcd  N )  e.  NN )
2827nnzd 8803 . . . 4  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  ( M  gcd  N )  e.  ZZ )
29 breq1 3825 . . . . . 6  |-  ( n  =  ( M  gcd  N )  ->  ( n  ||  M  <->  ( M  gcd  N )  ||  M ) )
30 breq1 3825 . . . . . 6  |-  ( n  =  ( M  gcd  N )  ->  ( n  ||  N  <->  ( M  gcd  N )  ||  N ) )
3129, 30anbi12d 457 . . . . 5  |-  ( n  =  ( M  gcd  N )  ->  ( (
n  ||  M  /\  n  ||  N )  <->  ( ( M  gcd  N )  ||  M  /\  ( M  gcd  N )  ||  N ) ) )
3231elrab3 2763 . . . 4  |-  ( ( M  gcd  N )  e.  ZZ  ->  (
( M  gcd  N
)  e.  { n  e.  ZZ  |  ( n 
||  M  /\  n  ||  N ) }  <->  ( ( M  gcd  N )  ||  M  /\  ( M  gcd  N )  ||  N ) ) )
3328, 32syl 14 . . 3  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  ( ( M  gcd  N )  e. 
{ n  e.  ZZ  |  ( n  ||  M  /\  n  ||  N
) }  <->  ( ( M  gcd  N )  ||  M  /\  ( M  gcd  N )  ||  N ) ) )
3426, 33mpbid 145 . 2  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  ( ( M  gcd  N )  ||  M  /\  ( M  gcd  N )  ||  N ) )
35 gcdmndc 10846 . . 3  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  -> DECID  ( M  =  0  /\  N  =  0 ) )
36 exmiddc 780 . . 3  |-  (DECID  ( M  =  0  /\  N  =  0 )  -> 
( ( M  =  0  /\  N  =  0 )  \/  -.  ( M  =  0  /\  N  =  0
) ) )
3735, 36syl 14 . 2  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( M  =  0  /\  N  =  0 )  \/  -.  ( M  =  0  /\  N  =  0
) ) )
3817, 34, 37mpjaodan 745 1  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( M  gcd  N )  ||  M  /\  ( M  gcd  N ) 
||  N ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 102    <-> wb 103    \/ wo 662  DECID wdc 778    = wceq 1287    e. wcel 1436   A.wral 2355   E.wrex 2356   {crab 2359    C_ wss 2988   class class class wbr 3822  (class class class)co 5615   supcsup 6624   RRcr 7296   0cc0 7297    < clt 7469   ZZcz 8686    || cdvds 10702    gcd cgcd 10844
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 104  ax-ia2 105  ax-ia3 106  ax-in1 577  ax-in2 578  ax-io 663  ax-5 1379  ax-7 1380  ax-gen 1381  ax-ie1 1425  ax-ie2 1426  ax-8 1438  ax-10 1439  ax-11 1440  ax-i12 1441  ax-bndl 1442  ax-4 1443  ax-13 1447  ax-14 1448  ax-17 1462  ax-i9 1466  ax-ial 1470  ax-i5r 1471  ax-ext 2067  ax-coll 3931  ax-sep 3934  ax-nul 3942  ax-pow 3986  ax-pr 4012  ax-un 4236  ax-setind 4328  ax-iinf 4378  ax-cnex 7383  ax-resscn 7384  ax-1cn 7385  ax-1re 7386  ax-icn 7387  ax-addcl 7388  ax-addrcl 7389  ax-mulcl 7390  ax-mulrcl 7391  ax-addcom 7392  ax-mulcom 7393  ax-addass 7394  ax-mulass 7395  ax-distr 7396  ax-i2m1 7397  ax-0lt1 7398  ax-1rid 7399  ax-0id 7400  ax-rnegex 7401  ax-precex 7402  ax-cnre 7403  ax-pre-ltirr 7404  ax-pre-ltwlin 7405  ax-pre-lttrn 7406  ax-pre-apti 7407  ax-pre-ltadd 7408  ax-pre-mulgt0 7409  ax-pre-mulext 7410  ax-arch 7411  ax-caucvg 7412
This theorem depends on definitions:  df-bi 115  df-dc 779  df-3or 923  df-3an 924  df-tru 1290  df-fal 1293  df-nf 1393  df-sb 1690  df-eu 1948  df-mo 1949  df-clab 2072  df-cleq 2078  df-clel 2081  df-nfc 2214  df-ne 2252  df-nel 2347  df-ral 2360  df-rex 2361  df-reu 2362  df-rmo 2363  df-rab 2364  df-v 2617  df-sbc 2830  df-csb 2923  df-dif 2990  df-un 2992  df-in 2994  df-ss 3001  df-nul 3276  df-if 3380  df-pw 3417  df-sn 3437  df-pr 3438  df-op 3440  df-uni 3639  df-int 3674  df-iun 3717  df-br 3823  df-opab 3877  df-mpt 3878  df-tr 3914  df-id 4096  df-po 4099  df-iso 4100  df-iord 4169  df-on 4171  df-ilim 4172  df-suc 4174  df-iom 4381  df-xp 4419  df-rel 4420  df-cnv 4421  df-co 4422  df-dm 4423  df-rn 4424  df-res 4425  df-ima 4426  df-iota 4948  df-fun 4985  df-fn 4986  df-f 4987  df-f1 4988  df-fo 4989  df-f1o 4990  df-fv 4991  df-riota 5571  df-ov 5618  df-oprab 5619  df-mpt2 5620  df-1st 5870  df-2nd 5871  df-recs 6026  df-frec 6112  df-sup 6626  df-pnf 7471  df-mnf 7472  df-xr 7473  df-ltxr 7474  df-le 7475  df-sub 7602  df-neg 7603  df-reap 7996  df-ap 8003  df-div 8082  df-inn 8361  df-2 8419  df-3 8420  df-4 8421  df-n0 8610  df-z 8687  df-uz 8955  df-q 9040  df-rp 9070  df-fz 9360  df-fzo 9485  df-fl 9608  df-mod 9661  df-iseq 9783  df-iexp 9857  df-cj 10175  df-re 10176  df-im 10177  df-rsqrt 10330  df-abs 10331  df-dvds 10703  df-gcd 10845
This theorem is referenced by:  zeqzmulgcd  10868  divgcdz  10869  divgcdnn  10872  gcd0id  10876  gcdneg  10879  gcdaddm  10881  gcd1  10884  dvdsgcdb  10908  dfgcd2  10909  mulgcd  10911  gcdzeq  10917  dvdsmulgcd  10920  sqgcd  10924  dvdssqlem  10925  bezoutr  10927  gcddvdslcm  10961  lcmgcdlem  10965  lcmgcdeq  10971  coprmgcdb  10976  ncoprmgcdne1b  10977  mulgcddvds  10982  rpmulgcd2  10983  qredeu  10985  rpdvds  10987  divgcdcoprm0  10989  divgcdodd  11028  coprm  11029  rpexp  11038  divnumden  11080  phimullem  11107  hashgcdlem  11109  hashgcdeq  11110
  Copyright terms: Public domain W3C validator