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

Definition df-pc 15542
Description: Define the prime count function, which returns the largest exponent of a given prime (or other positive integer) that divides the number. For rational numbers, it returns negative values according to the power of a prime in the denominator. (Contributed by Mario Carneiro, 23-Feb-2014.)
Assertion
Ref Expression
df-pc  |-  pCnt  =  ( p  e.  Prime ,  r  e.  QQ  |->  if ( r  =  0 , +oo ,  ( iota z E. x  e.  ZZ  E. y  e.  NN  ( r  =  ( x  /  y
)  /\  z  =  ( sup ( { n  e.  NN0  |  ( p ^ n )  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( p ^ n
)  ||  y } ,  RR ,  <  )
) ) ) ) )
Distinct variable group:    r, p, z, x, y, n

Detailed syntax breakdown of Definition df-pc
StepHypRef Expression
1 cpc 15541 . 2  class  pCnt
2 vp . . 3  setvar  p
3 vr . . 3  setvar  r
4 cprime 15385 . . 3  class  Prime
5 cq 11788 . . 3  class  QQ
63cv 1482 . . . . 5  class  r
7 cc0 9936 . . . . 5  class  0
86, 7wceq 1483 . . . 4  wff  r  =  0
9 cpnf 10071 . . . 4  class +oo
10 vx . . . . . . . . . . 11  setvar  x
1110cv 1482 . . . . . . . . . 10  class  x
12 vy . . . . . . . . . . 11  setvar  y
1312cv 1482 . . . . . . . . . 10  class  y
14 cdiv 10684 . . . . . . . . . 10  class  /
1511, 13, 14co 6650 . . . . . . . . 9  class  ( x  /  y )
166, 15wceq 1483 . . . . . . . 8  wff  r  =  ( x  /  y
)
17 vz . . . . . . . . . 10  setvar  z
1817cv 1482 . . . . . . . . 9  class  z
192cv 1482 . . . . . . . . . . . . . 14  class  p
20 vn . . . . . . . . . . . . . . 15  setvar  n
2120cv 1482 . . . . . . . . . . . . . 14  class  n
22 cexp 12860 . . . . . . . . . . . . . 14  class  ^
2319, 21, 22co 6650 . . . . . . . . . . . . 13  class  ( p ^ n )
24 cdvds 14983 . . . . . . . . . . . . 13  class  ||
2523, 11, 24wbr 4653 . . . . . . . . . . . 12  wff  ( p ^ n )  ||  x
26 cn0 11292 . . . . . . . . . . . 12  class  NN0
2725, 20, 26crab 2916 . . . . . . . . . . 11  class  { n  e.  NN0  |  ( p ^ n )  ||  x }
28 cr 9935 . . . . . . . . . . 11  class  RR
29 clt 10074 . . . . . . . . . . 11  class  <
3027, 28, 29csup 8346 . . . . . . . . . 10  class  sup ( { n  e.  NN0  |  ( p ^ n
)  ||  x } ,  RR ,  <  )
3123, 13, 24wbr 4653 . . . . . . . . . . . 12  wff  ( p ^ n )  ||  y
3231, 20, 26crab 2916 . . . . . . . . . . 11  class  { n  e.  NN0  |  ( p ^ n )  ||  y }
3332, 28, 29csup 8346 . . . . . . . . . 10  class  sup ( { n  e.  NN0  |  ( p ^ n
)  ||  y } ,  RR ,  <  )
34 cmin 10266 . . . . . . . . . 10  class  -
3530, 33, 34co 6650 . . . . . . . . 9  class  ( sup ( { n  e. 
NN0  |  ( p ^ n )  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( p ^ n
)  ||  y } ,  RR ,  <  )
)
3618, 35wceq 1483 . . . . . . . 8  wff  z  =  ( sup ( { n  e.  NN0  | 
( p ^ n
)  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( p ^ n )  ||  y } ,  RR ,  <  ) )
3716, 36wa 384 . . . . . . 7  wff  ( r  =  ( x  / 
y )  /\  z  =  ( sup ( { n  e.  NN0  |  ( p ^ n
)  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( p ^ n )  ||  y } ,  RR ,  <  ) ) )
38 cn 11020 . . . . . . 7  class  NN
3937, 12, 38wrex 2913 . . . . . 6  wff  E. y  e.  NN  ( r  =  ( x  /  y
)  /\  z  =  ( sup ( { n  e.  NN0  |  ( p ^ n )  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( p ^ n
)  ||  y } ,  RR ,  <  )
) )
40 cz 11377 . . . . . 6  class  ZZ
4139, 10, 40wrex 2913 . . . . 5  wff  E. x  e.  ZZ  E. y  e.  NN  ( r  =  ( x  /  y
)  /\  z  =  ( sup ( { n  e.  NN0  |  ( p ^ n )  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( p ^ n
)  ||  y } ,  RR ,  <  )
) )
4241, 17cio 5849 . . . 4  class  ( iota z E. x  e.  ZZ  E. y  e.  NN  ( r  =  ( x  /  y
)  /\  z  =  ( sup ( { n  e.  NN0  |  ( p ^ n )  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( p ^ n
)  ||  y } ,  RR ,  <  )
) ) )
438, 9, 42cif 4086 . . 3  class  if ( r  =  0 , +oo ,  ( iota z E. x  e.  ZZ  E. y  e.  NN  ( r  =  ( x  /  y
)  /\  z  =  ( sup ( { n  e.  NN0  |  ( p ^ n )  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( p ^ n
)  ||  y } ,  RR ,  <  )
) ) ) )
442, 3, 4, 5, 43cmpt2 6652 . 2  class  ( p  e.  Prime ,  r  e.  QQ  |->  if ( r  =  0 , +oo ,  ( iota z E. x  e.  ZZ  E. y  e.  NN  (
r  =  ( x  /  y )  /\  z  =  ( sup ( { n  e.  NN0  |  ( p ^ n
)  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( p ^ n )  ||  y } ,  RR ,  <  ) ) ) ) ) )
451, 44wceq 1483 1  wff  pCnt  =  ( p  e.  Prime ,  r  e.  QQ  |->  if ( r  =  0 , +oo ,  ( iota z E. x  e.  ZZ  E. y  e.  NN  ( r  =  ( x  /  y
)  /\  z  =  ( sup ( { n  e.  NN0  |  ( p ^ n )  ||  x } ,  RR ,  <  )  -  sup ( { n  e.  NN0  |  ( p ^ n
)  ||  y } ,  RR ,  <  )
) ) ) ) )
Colors of variables: wff setvar class
This definition is referenced by:  pcval  15549  pc0  15559
  Copyright terms: Public domain W3C validator