Metamath Proof Explorer


Theorem rpmulgcd

Description: If K and M are relatively prime, then the GCD of K and M x. N is the GCD of K and N . (Contributed by Scott Fenton, 12-Apr-2014) (Revised by Mario Carneiro, 19-Apr-2014)

Ref Expression
Assertion rpmulgcd K M N K gcd M = 1 K gcd M N = K gcd N

Proof

Step Hyp Ref Expression
1 gcdmultiple K N K gcd K N = K
2 1 3adant2 K M N K gcd K N = K
3 2 oveq1d K M N K gcd K N gcd M N = K gcd M N
4 nnz K K
5 4 3ad2ant1 K M N K
6 nnz N N
7 zmulcl K N K N
8 4 6 7 syl2an K N K N
9 8 3adant2 K M N K N
10 nnz M M
11 zmulcl M N M N
12 10 6 11 syl2an M N M N
13 12 3adant1 K M N M N
14 gcdass K K N M N K gcd K N gcd M N = K gcd K N gcd M N
15 5 9 13 14 syl3anc K M N K gcd K N gcd M N = K gcd K N gcd M N
16 3 15 eqtr3d K M N K gcd M N = K gcd K N gcd M N
17 16 adantr K M N K gcd M = 1 K gcd M N = K gcd K N gcd M N
18 nnnn0 N N 0
19 mulgcdr K M N 0 K N gcd M N = K gcd M N
20 4 10 18 19 syl3an K M N K N gcd M N = K gcd M N
21 oveq1 K gcd M = 1 K gcd M N = 1 N
22 20 21 sylan9eq K M N K gcd M = 1 K N gcd M N = 1 N
23 nncn N N
24 23 3ad2ant3 K M N N
25 24 adantr K M N K gcd M = 1 N
26 25 mulid2d K M N K gcd M = 1 1 N = N
27 22 26 eqtrd K M N K gcd M = 1 K N gcd M N = N
28 27 oveq2d K M N K gcd M = 1 K gcd K N gcd M N = K gcd N
29 17 28 eqtrd K M N K gcd M = 1 K gcd M N = K gcd N