Metamath Proof Explorer


Theorem pcelnn

Description: There are a positive number of powers of a prime P in N iff P divides N . (Contributed by Mario Carneiro, 23-Feb-2014)

Ref Expression
Assertion pcelnn P N P pCnt N P N

Proof

Step Hyp Ref Expression
1 nnz N N
2 1nn0 1 0
3 pcdvdsb P N 1 0 1 P pCnt N P 1 N
4 2 3 mp3an3 P N 1 P pCnt N P 1 N
5 1 4 sylan2 P N 1 P pCnt N P 1 N
6 pccl P N P pCnt N 0
7 elnnnn0c P pCnt N P pCnt N 0 1 P pCnt N
8 7 baibr P pCnt N 0 1 P pCnt N P pCnt N
9 6 8 syl P N 1 P pCnt N P pCnt N
10 prmnn P P
11 10 nncnd P P
12 11 exp1d P P 1 = P
13 12 adantr P N P 1 = P
14 13 breq1d P N P 1 N P N
15 5 9 14 3bitr3d P N P pCnt N P N