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

Theorem gcdcom 12715
Description: The  gcd operator is commutative. (Contributed by Paul Chapman, 21-Mar-2011.)
Assertion
Ref Expression
gcdcom  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  N
)  =  ( N  gcd  M ) )

Proof of Theorem gcdcom
Dummy variable  n is distinct from all other variables.
StepHypRef Expression
1 ancom 437 . . 3  |-  ( ( M  =  0  /\  N  =  0 )  <-> 
( N  =  0  /\  M  =  0 ) )
2 ancom 437 . . . . . 6  |-  ( ( n  ||  M  /\  n  ||  N )  <->  ( n  ||  N  /\  n  ||  M ) )
32a1i 10 . . . . 5  |-  ( n  e.  ZZ  ->  (
( n  ||  M  /\  n  ||  N )  <-> 
( n  ||  N  /\  n  ||  M ) ) )
43rabbiia 2791 . . . 4  |-  { n  e.  ZZ  |  ( n 
||  M  /\  n  ||  N ) }  =  { n  e.  ZZ  |  ( n  ||  N  /\  n  ||  M
) }
54supeq1i 7216 . . 3  |-  sup ( { n  e.  ZZ  |  ( n  ||  M  /\  n  ||  N
) } ,  RR ,  <  )  =  sup ( { n  e.  ZZ  |  ( n  ||  N  /\  n  ||  M
) } ,  RR ,  <  )
61, 5ifbieq2i 3597 . 2  |-  if ( ( M  =  0  /\  N  =  0 ) ,  0 ,  sup ( { n  e.  ZZ  |  ( n 
||  M  /\  n  ||  N ) } ,  RR ,  <  ) )  =  if ( ( N  =  0  /\  M  =  0 ) ,  0 ,  sup ( { n  e.  ZZ  |  ( n  ||  N  /\  n  ||  M
) } ,  RR ,  <  ) )
7 gcdval 12703 . 2  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  N
)  =  if ( ( M  =  0  /\  N  =  0 ) ,  0 ,  sup ( { n  e.  ZZ  |  ( n 
||  M  /\  n  ||  N ) } ,  RR ,  <  ) ) )
8 gcdval 12703 . . 3  |-  ( ( N  e.  ZZ  /\  M  e.  ZZ )  ->  ( N  gcd  M
)  =  if ( ( N  =  0  /\  M  =  0 ) ,  0 ,  sup ( { n  e.  ZZ  |  ( n 
||  N  /\  n  ||  M ) } ,  RR ,  <  ) ) )
98ancoms 439 . 2  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( N  gcd  M
)  =  if ( ( N  =  0  /\  M  =  0 ) ,  0 ,  sup ( { n  e.  ZZ  |  ( n 
||  N  /\  n  ||  M ) } ,  RR ,  <  ) ) )
106, 7, 93eqtr4a 2354 1  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  N
)  =  ( N  gcd  M ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    <-> wb 176    /\ wa 358    = wceq 1632    e. wcel 1696   {crab 2560   ifcif 3578   class class class wbr 4039  (class class class)co 5874   supcsup 7209   RRcr 8752   0cc0 8753    < clt 8883   ZZcz 10040    || cdivides 12547    gcd cgcd 12701
This theorem is referenced by:  gcdid0  12719  neggcd  12722  gcdabs2  12730  modgcd  12731  1gcd  12732  rplpwr  12751  rppwr  12752  eucalginv  12770  qredeq  12801  rpexp12i  12817  phiprmpw  12860  eulerthlem1  12865  eulerthlem2  12866  fermltl  12868  prmdiv  12869  coprimeprodsq  12878  coprimeprodsq2  12879  pythagtriplem3  12887  pythagtrip  12903  pcgcd  12946  prmpwdvds  12967  pockthlem  12968  gcdi  13104  gcdmodi  13105  1259lem5  13149  2503lem3  13153  4001lem4  13158  odinv  14890  gexexlem  15160  ablfacrp2  15318  pgpfac1lem2  15326  dvdsmulf1o  20450  perfect1  20483  perfectlem1  20484  lgslem1  20551  lgsdirnn0  20594  lgsqrlem2  20597  lgsqr  20601  lgsquad2lem2  20614  lgsquad2  20615  lgsquad3  20616  2sqlem8  20627  gcd32  24175  nn0prpwlem  26341  jm2.19lem2  27186  jm2.20nn  27193
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-resscn 8810  ax-1cn 8811  ax-icn 8812  ax-addcl 8813  ax-mulcl 8815  ax-i2m1 8821  ax-pre-lttri 8827  ax-pre-lttrn 8828
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-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-nul 3469  df-if 3579  df-pw 3640  df-sn 3659  df-pr 3660  df-op 3662  df-uni 3844  df-br 4040  df-opab 4094  df-mpt 4095  df-id 4325  df-po 4330  df-so 4331  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-er 6676  df-en 6880  df-dom 6881  df-sdom 6882  df-sup 7210  df-pnf 8885  df-mnf 8886  df-ltxr 8888  df-gcd 12702
  Copyright terms: Public domain W3C validator