MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  df-gcd Structured version   Visualization version   Unicode version

Definition df-gcd 15217
Description: Define the  gcd operator. For example,  ( -u 6  gcd  9 )  =  3 (ex-gcd 27314). For an alternate definition, based on the definition in [ApostolNT] p. 15, see dfgcd2 15263. (Contributed by Paul Chapman, 21-Mar-2011.)
Assertion
Ref Expression
df-gcd  |-  gcd  =  ( x  e.  ZZ ,  y  e.  ZZ  |->  if ( ( x  =  0  /\  y  =  0 ) ,  0 ,  sup ( { n  e.  ZZ  | 
( n  ||  x  /\  n  ||  y ) } ,  RR ,  <  ) ) )
Distinct variable group:    x, n, y

Detailed syntax breakdown of Definition df-gcd
StepHypRef Expression
1 cgcd 15216 . 2  class  gcd
2 vx . . 3  setvar  x
3 vy . . 3  setvar  y
4 cz 11377 . . 3  class  ZZ
52cv 1482 . . . . . 6  class  x
6 cc0 9936 . . . . . 6  class  0
75, 6wceq 1483 . . . . 5  wff  x  =  0
83cv 1482 . . . . . 6  class  y
98, 6wceq 1483 . . . . 5  wff  y  =  0
107, 9wa 384 . . . 4  wff  ( x  =  0  /\  y  =  0 )
11 vn . . . . . . . . 9  setvar  n
1211cv 1482 . . . . . . . 8  class  n
13 cdvds 14983 . . . . . . . 8  class  ||
1412, 5, 13wbr 4653 . . . . . . 7  wff  n  ||  x
1512, 8, 13wbr 4653 . . . . . . 7  wff  n  ||  y
1614, 15wa 384 . . . . . 6  wff  ( n 
||  x  /\  n  ||  y )
1716, 11, 4crab 2916 . . . . 5  class  { n  e.  ZZ  |  ( n 
||  x  /\  n  ||  y ) }
18 cr 9935 . . . . 5  class  RR
19 clt 10074 . . . . 5  class  <
2017, 18, 19csup 8346 . . . 4  class  sup ( { n  e.  ZZ  |  ( n  ||  x  /\  n  ||  y
) } ,  RR ,  <  )
2110, 6, 20cif 4086 . . 3  class  if ( ( x  =  0  /\  y  =  0 ) ,  0 ,  sup ( { n  e.  ZZ  |  ( n 
||  x  /\  n  ||  y ) } ,  RR ,  <  ) )
222, 3, 4, 4, 21cmpt2 6652 . 2  class  ( x  e.  ZZ ,  y  e.  ZZ  |->  if ( ( x  =  0  /\  y  =  0 ) ,  0 ,  sup ( { n  e.  ZZ  |  ( n 
||  x  /\  n  ||  y ) } ,  RR ,  <  ) ) )
231, 22wceq 1483 1  wff  gcd  =  ( x  e.  ZZ ,  y  e.  ZZ  |->  if ( ( x  =  0  /\  y  =  0 ) ,  0 ,  sup ( { n  e.  ZZ  | 
( n  ||  x  /\  n  ||  y ) } ,  RR ,  <  ) ) )
Colors of variables: wff setvar class
This definition is referenced by:  gcdval  15218  gcdf  15234
  Copyright terms: Public domain W3C validator