Metamath Proof Explorer


Theorem pcexp

Description: Prime power of an exponential. (Contributed by Mario Carneiro, 10-Aug-2015)

Ref Expression
Assertion pcexp P A A 0 N P pCnt A N = N P pCnt A

Proof

Step Hyp Ref Expression
1 oveq2 x = 0 A x = A 0
2 1 oveq2d x = 0 P pCnt A x = P pCnt A 0
3 oveq1 x = 0 x P pCnt A = 0 P pCnt A
4 2 3 eqeq12d x = 0 P pCnt A x = x P pCnt A P pCnt A 0 = 0 P pCnt A
5 oveq2 x = y A x = A y
6 5 oveq2d x = y P pCnt A x = P pCnt A y
7 oveq1 x = y x P pCnt A = y P pCnt A
8 6 7 eqeq12d x = y P pCnt A x = x P pCnt A P pCnt A y = y P pCnt A
9 oveq2 x = y + 1 A x = A y + 1
10 9 oveq2d x = y + 1 P pCnt A x = P pCnt A y + 1
11 oveq1 x = y + 1 x P pCnt A = y + 1 P pCnt A
12 10 11 eqeq12d x = y + 1 P pCnt A x = x P pCnt A P pCnt A y + 1 = y + 1 P pCnt A
13 oveq2 x = y A x = A y
14 13 oveq2d x = y P pCnt A x = P pCnt A y
15 oveq1 x = y x P pCnt A = y P pCnt A
16 14 15 eqeq12d x = y P pCnt A x = x P pCnt A P pCnt A y = y P pCnt A
17 oveq2 x = N A x = A N
18 17 oveq2d x = N P pCnt A x = P pCnt A N
19 oveq1 x = N x P pCnt A = N P pCnt A
20 18 19 eqeq12d x = N P pCnt A x = x P pCnt A P pCnt A N = N P pCnt A
21 pc1 P P pCnt 1 = 0
22 21 adantr P A A 0 P pCnt 1 = 0
23 qcn A A
24 23 ad2antrl P A A 0 A
25 24 exp0d P A A 0 A 0 = 1
26 25 oveq2d P A A 0 P pCnt A 0 = P pCnt 1
27 pcqcl P A A 0 P pCnt A
28 27 zcnd P A A 0 P pCnt A
29 28 mul02d P A A 0 0 P pCnt A = 0
30 22 26 29 3eqtr4d P A A 0 P pCnt A 0 = 0 P pCnt A
31 oveq1 P pCnt A y = y P pCnt A P pCnt A y + P pCnt A = y P pCnt A + P pCnt A
32 expp1 A y 0 A y + 1 = A y A
33 24 32 sylan P A A 0 y 0 A y + 1 = A y A
34 33 oveq2d P A A 0 y 0 P pCnt A y + 1 = P pCnt A y A
35 simpll P A A 0 y 0 P
36 simplrl P A A 0 y 0 A
37 simplrr P A A 0 y 0 A 0
38 nn0z y 0 y
39 38 adantl P A A 0 y 0 y
40 qexpclz A A 0 y A y
41 36 37 39 40 syl3anc P A A 0 y 0 A y
42 24 adantr P A A 0 y 0 A
43 42 37 39 expne0d P A A 0 y 0 A y 0
44 pcqmul P A y A y 0 A A 0 P pCnt A y A = P pCnt A y + P pCnt A
45 35 41 43 36 37 44 syl122anc P A A 0 y 0 P pCnt A y A = P pCnt A y + P pCnt A
46 34 45 eqtrd P A A 0 y 0 P pCnt A y + 1 = P pCnt A y + P pCnt A
47 nn0cn y 0 y
48 47 adantl P A A 0 y 0 y
49 28 adantr P A A 0 y 0 P pCnt A
50 48 49 adddirp1d P A A 0 y 0 y + 1 P pCnt A = y P pCnt A + P pCnt A
51 46 50 eqeq12d P A A 0 y 0 P pCnt A y + 1 = y + 1 P pCnt A P pCnt A y + P pCnt A = y P pCnt A + P pCnt A
52 31 51 syl5ibr P A A 0 y 0 P pCnt A y = y P pCnt A P pCnt A y + 1 = y + 1 P pCnt A
53 52 ex P A A 0 y 0 P pCnt A y = y P pCnt A P pCnt A y + 1 = y + 1 P pCnt A
54 negeq P pCnt A y = y P pCnt A P pCnt A y = y P pCnt A
55 nnnn0 y y 0
56 expneg A y 0 A y = 1 A y
57 24 55 56 syl2an P A A 0 y A y = 1 A y
58 57 oveq2d P A A 0 y P pCnt A y = P pCnt 1 A y
59 simpll P A A 0 y P
60 55 41 sylan2 P A A 0 y A y
61 55 43 sylan2 P A A 0 y A y 0
62 pcrec P A y A y 0 P pCnt 1 A y = P pCnt A y
63 59 60 61 62 syl12anc P A A 0 y P pCnt 1 A y = P pCnt A y
64 58 63 eqtrd P A A 0 y P pCnt A y = P pCnt A y
65 nncn y y
66 mulneg1 y P pCnt A y P pCnt A = y P pCnt A
67 65 28 66 syl2anr P A A 0 y y P pCnt A = y P pCnt A
68 64 67 eqeq12d P A A 0 y P pCnt A y = y P pCnt A P pCnt A y = y P pCnt A
69 54 68 syl5ibr P A A 0 y P pCnt A y = y P pCnt A P pCnt A y = y P pCnt A
70 69 ex P A A 0 y P pCnt A y = y P pCnt A P pCnt A y = y P pCnt A
71 4 8 12 16 20 30 53 70 zindd P A A 0 N P pCnt A N = N P pCnt A
72 71 3impia P A A 0 N P pCnt A N = N P pCnt A