Metamath Proof Explorer


Theorem pcprmpw2

Description: Self-referential expression for a prime power. (Contributed by Mario Carneiro, 16-Jan-2015)

Ref Expression
Assertion pcprmpw2 P A n 0 A P n A = P P pCnt A

Proof

Step Hyp Ref Expression
1 simplr P A n 0 A P n A
2 1 nnnn0d P A n 0 A P n A 0
3 prmnn P P
4 3 ad2antrr P A n 0 A P n P
5 pccl P A P pCnt A 0
6 5 adantr P A n 0 A P n P pCnt A 0
7 4 6 nnexpcld P A n 0 A P n P P pCnt A
8 7 nnnn0d P A n 0 A P n P P pCnt A 0
9 6 nn0red P A n 0 A P n P pCnt A
10 9 leidd P A n 0 A P n P pCnt A P pCnt A
11 simpll P A n 0 A P n P
12 6 nn0zd P A n 0 A P n P pCnt A
13 pcid P P pCnt A P pCnt P P pCnt A = P pCnt A
14 11 12 13 syl2anc P A n 0 A P n P pCnt P P pCnt A = P pCnt A
15 10 14 breqtrrd P A n 0 A P n P pCnt A P pCnt P P pCnt A
16 15 ad2antrr P A n 0 A P n p p = P P pCnt A P pCnt P P pCnt A
17 simpr P A n 0 A P n p p = P p = P
18 17 oveq1d P A n 0 A P n p p = P p pCnt A = P pCnt A
19 17 oveq1d P A n 0 A P n p p = P p pCnt P P pCnt A = P pCnt P P pCnt A
20 16 18 19 3brtr4d P A n 0 A P n p p = P p pCnt A p pCnt P P pCnt A
21 simplrr P A n 0 A P n p A P n
22 prmz p p
23 22 adantl P A n 0 A P n p p
24 1 adantr P A n 0 A P n p A
25 24 nnzd P A n 0 A P n p A
26 simprl P A n 0 A P n n 0
27 4 26 nnexpcld P A n 0 A P n P n
28 27 adantr P A n 0 A P n p P n
29 28 nnzd P A n 0 A P n p P n
30 dvdstr p A P n p A A P n p P n
31 23 25 29 30 syl3anc P A n 0 A P n p p A A P n p P n
32 21 31 mpan2d P A n 0 A P n p p A p P n
33 simpr P A n 0 A P n p p
34 11 adantr P A n 0 A P n p P
35 simplrl P A n 0 A P n p n 0
36 prmdvdsexpr p P n 0 p P n p = P
37 33 34 35 36 syl3anc P A n 0 A P n p p P n p = P
38 32 37 syld P A n 0 A P n p p A p = P
39 38 necon3ad P A n 0 A P n p p P ¬ p A
40 39 imp P A n 0 A P n p p P ¬ p A
41 simplr P A n 0 A P n p p P p
42 1 ad2antrr P A n 0 A P n p p P A
43 pceq0 p A p pCnt A = 0 ¬ p A
44 41 42 43 syl2anc P A n 0 A P n p p P p pCnt A = 0 ¬ p A
45 40 44 mpbird P A n 0 A P n p p P p pCnt A = 0
46 7 ad2antrr P A n 0 A P n p p P P P pCnt A
47 41 46 pccld P A n 0 A P n p p P p pCnt P P pCnt A 0
48 47 nn0ge0d P A n 0 A P n p p P 0 p pCnt P P pCnt A
49 45 48 eqbrtrd P A n 0 A P n p p P p pCnt A p pCnt P P pCnt A
50 20 49 pm2.61dane P A n 0 A P n p p pCnt A p pCnt P P pCnt A
51 50 ralrimiva P A n 0 A P n p p pCnt A p pCnt P P pCnt A
52 1 nnzd P A n 0 A P n A
53 7 nnzd P A n 0 A P n P P pCnt A
54 pc2dvds A P P pCnt A A P P pCnt A p p pCnt A p pCnt P P pCnt A
55 52 53 54 syl2anc P A n 0 A P n A P P pCnt A p p pCnt A p pCnt P P pCnt A
56 51 55 mpbird P A n 0 A P n A P P pCnt A
57 pcdvds P A P P pCnt A A
58 57 adantr P A n 0 A P n P P pCnt A A
59 dvdseq A 0 P P pCnt A 0 A P P pCnt A P P pCnt A A A = P P pCnt A
60 2 8 56 58 59 syl22anc P A n 0 A P n A = P P pCnt A
61 60 rexlimdvaa P A n 0 A P n A = P P pCnt A
62 3 adantr P A P
63 62 5 nnexpcld P A P P pCnt A
64 63 nnzd P A P P pCnt A
65 iddvds P P pCnt A P P pCnt A P P pCnt A
66 64 65 syl P A P P pCnt A P P pCnt A
67 oveq2 n = P pCnt A P n = P P pCnt A
68 67 breq2d n = P pCnt A P P pCnt A P n P P pCnt A P P pCnt A
69 68 rspcev P pCnt A 0 P P pCnt A P P pCnt A n 0 P P pCnt A P n
70 5 66 69 syl2anc P A n 0 P P pCnt A P n
71 breq1 A = P P pCnt A A P n P P pCnt A P n
72 71 rexbidv A = P P pCnt A n 0 A P n n 0 P P pCnt A P n
73 70 72 syl5ibrcom P A A = P P pCnt A n 0 A P n
74 61 73 impbid P A n 0 A P n A = P P pCnt A