Metamath Proof Explorer


Theorem dvdsexpnn

Description: dvdssqlem generalized to positive integer exponents. (Contributed by SN, 20-Aug-2024)

Ref Expression
Assertion dvdsexpnn A B N A B A N B N

Proof

Step Hyp Ref Expression
1 nnz A A
2 nnz B B
3 nnnn0 N N 0
4 dvdsexpim A B N 0 A B A N B N
5 1 2 3 4 syl3an A B N A B A N B N
6 gcdnncl A B A gcd B
7 6 nnrpd A B A gcd B +
8 7 3adant3 A B N A gcd B +
9 8 adantr A B N A N B N A gcd B +
10 simpl1 A B N A N B N A
11 10 nnrpd A B N A N B N A +
12 simpl3 A B N A N B N N
13 expgcd A B N 0 A gcd B N = A N gcd B N
14 3 13 syl3an3 A B N A gcd B N = A N gcd B N
15 14 adantr A B N A N B N A gcd B N = A N gcd B N
16 simp1 A B N A
17 3 3ad2ant3 A B N N 0
18 16 17 nnexpcld A B N A N
19 simp2 A B N B
20 19 17 nnexpcld A B N B N
21 gcdeq A N B N A N gcd B N = A N A N B N
22 18 20 21 syl2anc A B N A N gcd B N = A N A N B N
23 22 biimpar A B N A N B N A N gcd B N = A N
24 15 23 eqtrd A B N A N B N A gcd B N = A N
25 9 11 12 24 exp11nnd A B N A N B N A gcd B = A
26 gcddvds A B A gcd B A A gcd B B
27 26 simprd A B A gcd B B
28 1 2 27 syl2an A B A gcd B B
29 28 3adant3 A B N A gcd B B
30 29 adantr A B N A N B N A gcd B B
31 25 30 eqbrtrrd A B N A N B N A B
32 31 ex A B N A N B N A B
33 5 32 impbid A B N A B A N B N