Metamath Proof Explorer


Theorem isppw2

Description: Two ways to say that A is a prime power. (Contributed by Mario Carneiro, 7-Apr-2016)

Ref Expression
Assertion isppw2 A Λ A 0 p k A = p k

Proof

Step Hyp Ref Expression
1 isppw A Λ A 0 ∃! q q A
2 reu6 ∃! q q A p q q A q = p
3 equid p = p
4 breq1 q = p q A p A
5 equequ1 q = p q = p p = p
6 4 5 bibi12d q = p q A q = p p A p = p
7 6 rspcva p q q A q = p p A p = p
8 7 adantll A p q q A q = p p A p = p
9 3 8 mpbiri A p q q A q = p p A
10 simplr A p q q A q = p p
11 simpll A p q q A q = p A
12 pcelnn p A p pCnt A p A
13 10 11 12 syl2anc A p q q A q = p p pCnt A p A
14 9 13 mpbird A p q q A q = p p pCnt A
15 simpr A p q q A q = p q = p q = p
16 15 oveq1d A p q q A q = p q = p q pCnt A = p pCnt A
17 simpllr A p q q A q = p q = p p
18 pccl p A p pCnt A 0
19 18 ancoms A p p pCnt A 0
20 19 ad2antrr A p q q A q = p q = p p pCnt A 0
21 20 nn0zd A p q q A q = p q = p p pCnt A
22 pcid p p pCnt A p pCnt p p pCnt A = p pCnt A
23 17 21 22 syl2anc A p q q A q = p q = p p pCnt p p pCnt A = p pCnt A
24 16 23 eqtr4d A p q q A q = p q = p q pCnt A = p pCnt p p pCnt A
25 15 oveq1d A p q q A q = p q = p q pCnt p p pCnt A = p pCnt p p pCnt A
26 24 25 eqtr4d A p q q A q = p q = p q pCnt A = q pCnt p p pCnt A
27 simprr A p q q A q = p q A q = p
28 27 notbid A p q q A q = p ¬ q A ¬ q = p
29 28 biimpar A p q q A q = p ¬ q = p ¬ q A
30 simplrl A p q q A q = p ¬ q = p q
31 simplll A p q q A q = p ¬ q = p A
32 pceq0 q A q pCnt A = 0 ¬ q A
33 30 31 32 syl2anc A p q q A q = p ¬ q = p q pCnt A = 0 ¬ q A
34 29 33 mpbird A p q q A q = p ¬ q = p q pCnt A = 0
35 simprl A p q q A q = p q
36 simplr A p q q A q = p p
37 19 adantr A p q q A q = p p pCnt A 0
38 prmdvdsexpr q p p pCnt A 0 q p p pCnt A q = p
39 35 36 37 38 syl3anc A p q q A q = p q p p pCnt A q = p
40 39 con3dimp A p q q A q = p ¬ q = p ¬ q p p pCnt A
41 prmnn p p
42 41 adantl A p p
43 42 19 nnexpcld A p p p pCnt A
44 43 ad2antrr A p q q A q = p ¬ q = p p p pCnt A
45 pceq0 q p p pCnt A q pCnt p p pCnt A = 0 ¬ q p p pCnt A
46 30 44 45 syl2anc A p q q A q = p ¬ q = p q pCnt p p pCnt A = 0 ¬ q p p pCnt A
47 40 46 mpbird A p q q A q = p ¬ q = p q pCnt p p pCnt A = 0
48 34 47 eqtr4d A p q q A q = p ¬ q = p q pCnt A = q pCnt p p pCnt A
49 26 48 pm2.61dan A p q q A q = p q pCnt A = q pCnt p p pCnt A
50 49 expr A p q q A q = p q pCnt A = q pCnt p p pCnt A
51 50 ralimdva A p q q A q = p q q pCnt A = q pCnt p p pCnt A
52 51 imp A p q q A q = p q q pCnt A = q pCnt p p pCnt A
53 nnnn0 A A 0
54 53 ad2antrr A p q q A q = p A 0
55 43 adantr A p q q A q = p p p pCnt A
56 55 nnnn0d A p q q A q = p p p pCnt A 0
57 pc11 A 0 p p pCnt A 0 A = p p pCnt A q q pCnt A = q pCnt p p pCnt A
58 54 56 57 syl2anc A p q q A q = p A = p p pCnt A q q pCnt A = q pCnt p p pCnt A
59 52 58 mpbird A p q q A q = p A = p p pCnt A
60 oveq2 k = p pCnt A p k = p p pCnt A
61 60 rspceeqv p pCnt A A = p p pCnt A k A = p k
62 14 59 61 syl2anc A p q q A q = p k A = p k
63 62 ex A p q q A q = p k A = p k
64 prmdvdsexpb q p k q p k q = p
65 64 3coml p k q q p k q = p
66 65 3expa p k q q p k q = p
67 66 ralrimiva p k q q p k q = p
68 67 adantll A p k q q p k q = p
69 breq2 A = p k q A q p k
70 69 bibi1d A = p k q A q = p q p k q = p
71 70 ralbidv A = p k q q A q = p q q p k q = p
72 68 71 syl5ibrcom A p k A = p k q q A q = p
73 72 rexlimdva A p k A = p k q q A q = p
74 63 73 impbid A p q q A q = p k A = p k
75 74 rexbidva A p q q A q = p p k A = p k
76 2 75 syl5bb A ∃! q q A p k A = p k
77 1 76 bitrd A Λ A 0 p k A = p k