Metamath Proof Explorer


Theorem expnprm

Description: A second or higher power of a rational number is not a prime number. Or by contraposition, the n-th root of a prime number is irrational. Suggested by Norm Megill. (Contributed by Mario Carneiro, 10-Aug-2015)

Ref Expression
Assertion expnprm A N 2 ¬ A N

Proof

Step Hyp Ref Expression
1 eluz2b3 N 2 N N 1
2 1 simprbi N 2 N 1
3 2 adantl A N 2 N 1
4 eluzelz N 2 N
5 4 ad2antlr A N 2 A N N
6 simpr A N 2 A N A N
7 simpll A N 2 A N A
8 prmnn A N A N
9 8 adantl A N 2 A N A N
10 9 nnne0d A N 2 A N A N 0
11 eluz2nn N 2 N
12 11 ad2antlr A N 2 A N N
13 12 0expd A N 2 A N 0 N = 0
14 10 13 neeqtrrd A N 2 A N A N 0 N
15 oveq1 A = 0 A N = 0 N
16 15 necon3i A N 0 N A 0
17 14 16 syl A N 2 A N A 0
18 pcqcl A N A A 0 A N pCnt A
19 6 7 17 18 syl12anc A N 2 A N A N pCnt A
20 dvdsmul1 N A N pCnt A N N A N pCnt A
21 5 19 20 syl2anc A N 2 A N N N A N pCnt A
22 9 nncnd A N 2 A N A N
23 22 exp1d A N 2 A N A N 1 = A N
24 23 oveq2d A N 2 A N A N pCnt A N 1 = A N pCnt A N
25 1z 1
26 pcid A N 1 A N pCnt A N 1 = 1
27 6 25 26 sylancl A N 2 A N A N pCnt A N 1 = 1
28 pcexp A N A A 0 N A N pCnt A N = N A N pCnt A
29 6 7 17 5 28 syl121anc A N 2 A N A N pCnt A N = N A N pCnt A
30 24 27 29 3eqtr3rd A N 2 A N N A N pCnt A = 1
31 21 30 breqtrd A N 2 A N N 1
32 31 ex A N 2 A N N 1
33 11 adantl A N 2 N
34 33 nnnn0d A N 2 N 0
35 dvds1 N 0 N 1 N = 1
36 34 35 syl A N 2 N 1 N = 1
37 32 36 sylibd A N 2 A N N = 1
38 37 necon3ad A N 2 N 1 ¬ A N
39 3 38 mpd A N 2 ¬ A N