Metamath Proof Explorer


Theorem prmexpb

Description: Two positive prime powers are equal iff the primes and the powers are equal. (Contributed by Paul Chapman, 30-Nov-2012)

Ref Expression
Assertion prmexpb ( ( ( 𝑃 ∈ ℙ ∧ 𝑄 ∈ ℙ ) ∧ ( 𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ ) ) → ( ( 𝑃𝑀 ) = ( 𝑄𝑁 ) ↔ ( 𝑃 = 𝑄𝑀 = 𝑁 ) ) )

Proof

Step Hyp Ref Expression
1 prmz ( 𝑃 ∈ ℙ → 𝑃 ∈ ℤ )
2 1 adantr ( ( 𝑃 ∈ ℙ ∧ 𝑄 ∈ ℙ ) → 𝑃 ∈ ℤ )
3 2 3ad2ant1 ( ( ( 𝑃 ∈ ℙ ∧ 𝑄 ∈ ℙ ) ∧ ( 𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ ) ∧ ( 𝑃𝑀 ) = ( 𝑄𝑁 ) ) → 𝑃 ∈ ℤ )
4 simp2l ( ( ( 𝑃 ∈ ℙ ∧ 𝑄 ∈ ℙ ) ∧ ( 𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ ) ∧ ( 𝑃𝑀 ) = ( 𝑄𝑁 ) ) → 𝑀 ∈ ℕ )
5 iddvdsexp ( ( 𝑃 ∈ ℤ ∧ 𝑀 ∈ ℕ ) → 𝑃 ∥ ( 𝑃𝑀 ) )
6 3 4 5 syl2anc ( ( ( 𝑃 ∈ ℙ ∧ 𝑄 ∈ ℙ ) ∧ ( 𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ ) ∧ ( 𝑃𝑀 ) = ( 𝑄𝑁 ) ) → 𝑃 ∥ ( 𝑃𝑀 ) )
7 breq2 ( ( 𝑃𝑀 ) = ( 𝑄𝑁 ) → ( 𝑃 ∥ ( 𝑃𝑀 ) ↔ 𝑃 ∥ ( 𝑄𝑁 ) ) )
8 7 3ad2ant3 ( ( ( 𝑃 ∈ ℙ ∧ 𝑄 ∈ ℙ ) ∧ ( 𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ ) ∧ ( 𝑃𝑀 ) = ( 𝑄𝑁 ) ) → ( 𝑃 ∥ ( 𝑃𝑀 ) ↔ 𝑃 ∥ ( 𝑄𝑁 ) ) )
9 simp1l ( ( ( 𝑃 ∈ ℙ ∧ 𝑄 ∈ ℙ ) ∧ ( 𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ ) ∧ ( 𝑃𝑀 ) = ( 𝑄𝑁 ) ) → 𝑃 ∈ ℙ )
10 simp1r ( ( ( 𝑃 ∈ ℙ ∧ 𝑄 ∈ ℙ ) ∧ ( 𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ ) ∧ ( 𝑃𝑀 ) = ( 𝑄𝑁 ) ) → 𝑄 ∈ ℙ )
11 simp2r ( ( ( 𝑃 ∈ ℙ ∧ 𝑄 ∈ ℙ ) ∧ ( 𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ ) ∧ ( 𝑃𝑀 ) = ( 𝑄𝑁 ) ) → 𝑁 ∈ ℕ )
12 prmdvdsexpb ( ( 𝑃 ∈ ℙ ∧ 𝑄 ∈ ℙ ∧ 𝑁 ∈ ℕ ) → ( 𝑃 ∥ ( 𝑄𝑁 ) ↔ 𝑃 = 𝑄 ) )
13 9 10 11 12 syl3anc ( ( ( 𝑃 ∈ ℙ ∧ 𝑄 ∈ ℙ ) ∧ ( 𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ ) ∧ ( 𝑃𝑀 ) = ( 𝑄𝑁 ) ) → ( 𝑃 ∥ ( 𝑄𝑁 ) ↔ 𝑃 = 𝑄 ) )
14 8 13 bitrd ( ( ( 𝑃 ∈ ℙ ∧ 𝑄 ∈ ℙ ) ∧ ( 𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ ) ∧ ( 𝑃𝑀 ) = ( 𝑄𝑁 ) ) → ( 𝑃 ∥ ( 𝑃𝑀 ) ↔ 𝑃 = 𝑄 ) )
15 6 14 mpbid ( ( ( 𝑃 ∈ ℙ ∧ 𝑄 ∈ ℙ ) ∧ ( 𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ ) ∧ ( 𝑃𝑀 ) = ( 𝑄𝑁 ) ) → 𝑃 = 𝑄 )
16 3 zred ( ( ( 𝑃 ∈ ℙ ∧ 𝑄 ∈ ℙ ) ∧ ( 𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ ) ∧ ( 𝑃𝑀 ) = ( 𝑄𝑁 ) ) → 𝑃 ∈ ℝ )
17 4 nnzd ( ( ( 𝑃 ∈ ℙ ∧ 𝑄 ∈ ℙ ) ∧ ( 𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ ) ∧ ( 𝑃𝑀 ) = ( 𝑄𝑁 ) ) → 𝑀 ∈ ℤ )
18 11 nnzd ( ( ( 𝑃 ∈ ℙ ∧ 𝑄 ∈ ℙ ) ∧ ( 𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ ) ∧ ( 𝑃𝑀 ) = ( 𝑄𝑁 ) ) → 𝑁 ∈ ℤ )
19 prmgt1 ( 𝑃 ∈ ℙ → 1 < 𝑃 )
20 19 ad2antrr ( ( ( 𝑃 ∈ ℙ ∧ 𝑄 ∈ ℙ ) ∧ ( 𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ ) ) → 1 < 𝑃 )
21 20 3adant3 ( ( ( 𝑃 ∈ ℙ ∧ 𝑄 ∈ ℙ ) ∧ ( 𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ ) ∧ ( 𝑃𝑀 ) = ( 𝑄𝑁 ) ) → 1 < 𝑃 )
22 simp3 ( ( ( 𝑃 ∈ ℙ ∧ 𝑄 ∈ ℙ ) ∧ ( 𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ ) ∧ ( 𝑃𝑀 ) = ( 𝑄𝑁 ) ) → ( 𝑃𝑀 ) = ( 𝑄𝑁 ) )
23 15 oveq1d ( ( ( 𝑃 ∈ ℙ ∧ 𝑄 ∈ ℙ ) ∧ ( 𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ ) ∧ ( 𝑃𝑀 ) = ( 𝑄𝑁 ) ) → ( 𝑃𝑁 ) = ( 𝑄𝑁 ) )
24 22 23 eqtr4d ( ( ( 𝑃 ∈ ℙ ∧ 𝑄 ∈ ℙ ) ∧ ( 𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ ) ∧ ( 𝑃𝑀 ) = ( 𝑄𝑁 ) ) → ( 𝑃𝑀 ) = ( 𝑃𝑁 ) )
25 16 17 18 21 24 expcand ( ( ( 𝑃 ∈ ℙ ∧ 𝑄 ∈ ℙ ) ∧ ( 𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ ) ∧ ( 𝑃𝑀 ) = ( 𝑄𝑁 ) ) → 𝑀 = 𝑁 )
26 15 25 jca ( ( ( 𝑃 ∈ ℙ ∧ 𝑄 ∈ ℙ ) ∧ ( 𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ ) ∧ ( 𝑃𝑀 ) = ( 𝑄𝑁 ) ) → ( 𝑃 = 𝑄𝑀 = 𝑁 ) )
27 26 3expia ( ( ( 𝑃 ∈ ℙ ∧ 𝑄 ∈ ℙ ) ∧ ( 𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ ) ) → ( ( 𝑃𝑀 ) = ( 𝑄𝑁 ) → ( 𝑃 = 𝑄𝑀 = 𝑁 ) ) )
28 oveq12 ( ( 𝑃 = 𝑄𝑀 = 𝑁 ) → ( 𝑃𝑀 ) = ( 𝑄𝑁 ) )
29 27 28 impbid1 ( ( ( 𝑃 ∈ ℙ ∧ 𝑄 ∈ ℙ ) ∧ ( 𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ ) ) → ( ( 𝑃𝑀 ) = ( 𝑄𝑁 ) ↔ ( 𝑃 = 𝑄𝑀 = 𝑁 ) ) )