Metamath Proof Explorer


Theorem rpmulgcd2

Description: If M is relatively prime to N , then the GCD of K with M x. N is the product of the GCDs with M and N respectively. (Contributed by Mario Carneiro, 2-Jul-2015)

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

Proof

Step Hyp Ref Expression
1 simpl1 K M N M gcd N = 1 K
2 simpl2 K M N M gcd N = 1 M
3 simpl3 K M N M gcd N = 1 N
4 2 3 zmulcld K M N M gcd N = 1 M N
5 1 4 gcdcld K M N M gcd N = 1 K gcd M N 0
6 1 2 gcdcld K M N M gcd N = 1 K gcd M 0
7 1 3 gcdcld K M N M gcd N = 1 K gcd N 0
8 6 7 nn0mulcld K M N M gcd N = 1 K gcd M K gcd N 0
9 mulgcddvds K M N K gcd M N K gcd M K gcd N
10 9 adantr K M N M gcd N = 1 K gcd M N K gcd M K gcd N
11 gcddvds K M K gcd M K K gcd M M
12 1 2 11 syl2anc K M N M gcd N = 1 K gcd M K K gcd M M
13 12 simpld K M N M gcd N = 1 K gcd M K
14 gcddvds K N K gcd N K K gcd N N
15 1 3 14 syl2anc K M N M gcd N = 1 K gcd N K K gcd N N
16 15 simpld K M N M gcd N = 1 K gcd N K
17 6 nn0zd K M N M gcd N = 1 K gcd M
18 7 nn0zd K M N M gcd N = 1 K gcd N
19 17 18 gcdcld K M N M gcd N = 1 K gcd M gcd K gcd N 0
20 19 nn0zd K M N M gcd N = 1 K gcd M gcd K gcd N
21 gcddvds K gcd M K gcd N K gcd M gcd K gcd N K gcd M K gcd M gcd K gcd N K gcd N
22 17 18 21 syl2anc K M N M gcd N = 1 K gcd M gcd K gcd N K gcd M K gcd M gcd K gcd N K gcd N
23 22 simpld K M N M gcd N = 1 K gcd M gcd K gcd N K gcd M
24 12 simprd K M N M gcd N = 1 K gcd M M
25 20 17 2 23 24 dvdstrd K M N M gcd N = 1 K gcd M gcd K gcd N M
26 22 simprd K M N M gcd N = 1 K gcd M gcd K gcd N K gcd N
27 15 simprd K M N M gcd N = 1 K gcd N N
28 20 18 3 26 27 dvdstrd K M N M gcd N = 1 K gcd M gcd K gcd N N
29 dvdsgcd K gcd M gcd K gcd N M N K gcd M gcd K gcd N M K gcd M gcd K gcd N N K gcd M gcd K gcd N M gcd N
30 20 2 3 29 syl3anc K M N M gcd N = 1 K gcd M gcd K gcd N M K gcd M gcd K gcd N N K gcd M gcd K gcd N M gcd N
31 25 28 30 mp2and K M N M gcd N = 1 K gcd M gcd K gcd N M gcd N
32 simpr K M N M gcd N = 1 M gcd N = 1
33 31 32 breqtrd K M N M gcd N = 1 K gcd M gcd K gcd N 1
34 dvds1 K gcd M gcd K gcd N 0 K gcd M gcd K gcd N 1 K gcd M gcd K gcd N = 1
35 19 34 syl K M N M gcd N = 1 K gcd M gcd K gcd N 1 K gcd M gcd K gcd N = 1
36 33 35 mpbid K M N M gcd N = 1 K gcd M gcd K gcd N = 1
37 coprmdvds2 K gcd M K gcd N K K gcd M gcd K gcd N = 1 K gcd M K K gcd N K K gcd M K gcd N K
38 17 18 1 36 37 syl31anc K M N M gcd N = 1 K gcd M K K gcd N K K gcd M K gcd N K
39 13 16 38 mp2and K M N M gcd N = 1 K gcd M K gcd N K
40 dvdscmul K gcd N N K gcd M K gcd N N K gcd M K gcd N K gcd M N
41 18 3 17 40 syl3anc K M N M gcd N = 1 K gcd N N K gcd M K gcd N K gcd M N
42 dvdsmulc K gcd M M N K gcd M M K gcd M N M N
43 17 2 3 42 syl3anc K M N M gcd N = 1 K gcd M M K gcd M N M N
44 17 18 zmulcld K M N M gcd N = 1 K gcd M K gcd N
45 17 3 zmulcld K M N M gcd N = 1 K gcd M N
46 dvdstr K gcd M K gcd N K gcd M N M N K gcd M K gcd N K gcd M N K gcd M N M N K gcd M K gcd N M N
47 44 45 4 46 syl3anc K M N M gcd N = 1 K gcd M K gcd N K gcd M N K gcd M N M N K gcd M K gcd N M N
48 41 43 47 syl2and K M N M gcd N = 1 K gcd N N K gcd M M K gcd M K gcd N M N
49 27 24 48 mp2and K M N M gcd N = 1 K gcd M K gcd N M N
50 dvdsgcd K gcd M K gcd N K M N K gcd M K gcd N K K gcd M K gcd N M N K gcd M K gcd N K gcd M N
51 44 1 4 50 syl3anc K M N M gcd N = 1 K gcd M K gcd N K K gcd M K gcd N M N K gcd M K gcd N K gcd M N
52 39 49 51 mp2and K M N M gcd N = 1 K gcd M K gcd N K gcd M N
53 dvdseq K gcd M N 0 K gcd M K gcd N 0 K gcd M N K gcd M K gcd N K gcd M K gcd N K gcd M N K gcd M N = K gcd M K gcd N
54 5 8 10 52 53 syl22anc K M N M gcd N = 1 K gcd M N = K gcd M K gcd N