Metamath Proof Explorer


Definition df-pc

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)

Ref Expression
Assertion df-pc pCnt = p , r if r = 0 +∞ ι z | x y r = x y z = sup n 0 | p n x < sup n 0 | p n y <

Detailed syntax breakdown

Step Hyp Ref Expression
0 cpc class pCnt
1 vp setvar p
2 cprime class
3 vr setvar r
4 cq class
5 3 cv setvar r
6 cc0 class 0
7 5 6 wceq wff r = 0
8 cpnf class +∞
9 vz setvar z
10 vx setvar x
11 cz class
12 vy setvar y
13 cn class
14 10 cv setvar x
15 cdiv class ÷
16 12 cv setvar y
17 14 16 15 co class x y
18 5 17 wceq wff r = x y
19 9 cv setvar z
20 vn setvar n
21 cn0 class 0
22 1 cv setvar p
23 cexp class ^
24 20 cv setvar n
25 22 24 23 co class p n
26 cdvds class
27 25 14 26 wbr wff p n x
28 27 20 21 crab class n 0 | p n x
29 cr class
30 clt class <
31 28 29 30 csup class sup n 0 | p n x <
32 cmin class
33 25 16 26 wbr wff p n y
34 33 20 21 crab class n 0 | p n y
35 34 29 30 csup class sup n 0 | p n y <
36 31 35 32 co class sup n 0 | p n x < sup n 0 | p n y <
37 19 36 wceq wff z = sup n 0 | p n x < sup n 0 | p n y <
38 18 37 wa wff r = x y z = sup n 0 | p n x < sup n 0 | p n y <
39 38 12 13 wrex wff y r = x y z = sup n 0 | p n x < sup n 0 | p n y <
40 39 10 11 wrex wff x y r = x y z = sup n 0 | p n x < sup n 0 | p n y <
41 40 9 cio class ι z | x y r = x y z = sup n 0 | p n x < sup n 0 | p n y <
42 7 8 41 cif class if r = 0 +∞ ι z | x y r = x y z = sup n 0 | p n x < sup n 0 | p n y <
43 1 3 2 4 42 cmpo class p , r if r = 0 +∞ ι z | x y r = x y z = sup n 0 | p n x < sup n 0 | p n y <
44 0 43 wceq wff pCnt = p , r if r = 0 +∞ ι z | x y r = x y z = sup n 0 | p n x < sup n 0 | p n y <