Metamath Proof Explorer


Theorem prmdvdsexpr

Description: If a prime divides a nonnegative power of another, then they are equal. (Contributed by Mario Carneiro, 16-Jan-2015)

Ref Expression
Assertion prmdvdsexpr P Q N 0 P Q N P = Q

Proof

Step Hyp Ref Expression
1 elnn0 N 0 N N = 0
2 prmdvdsexpb P Q N P Q N P = Q
3 2 biimpd P Q N P Q N P = Q
4 3 3expia P Q N P Q N P = Q
5 prmnn Q Q
6 5 adantl P Q Q
7 6 nncnd P Q Q
8 7 exp0d P Q Q 0 = 1
9 8 breq2d P Q P Q 0 P 1
10 nprmdvds1 P ¬ P 1
11 10 pm2.21d P P 1 P = Q
12 11 adantr P Q P 1 P = Q
13 9 12 sylbid P Q P Q 0 P = Q
14 oveq2 N = 0 Q N = Q 0
15 14 breq2d N = 0 P Q N P Q 0
16 15 imbi1d N = 0 P Q N P = Q P Q 0 P = Q
17 13 16 syl5ibrcom P Q N = 0 P Q N P = Q
18 4 17 jaod P Q N N = 0 P Q N P = Q
19 1 18 syl5bi P Q N 0 P Q N P = Q
20 19 3impia P Q N 0 P Q N P = Q