Metamath Proof Explorer


Theorem rpdvds

Description: If K is relatively prime to N then it is also relatively prime to any divisor M of N . (Contributed by Mario Carneiro, 19-Jun-2015)

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

Proof

Step Hyp Ref Expression
1 simpl1 K M N K gcd N = 1 M N K
2 simpl2 K M N K gcd N = 1 M N M
3 gcddvds K M K gcd M K K gcd M M
4 1 2 3 syl2anc K M N K gcd N = 1 M N K gcd M K K gcd M M
5 4 simpld K M N K gcd N = 1 M N K gcd M K
6 ax-1ne0 1 0
7 simprl K M N K gcd N = 1 M N K gcd N = 1
8 7 neeq1d K M N K gcd N = 1 M N K gcd N 0 1 0
9 6 8 mpbiri K M N K gcd N = 1 M N K gcd N 0
10 9 neneqd K M N K gcd N = 1 M N ¬ K gcd N = 0
11 simprl K M N K gcd N = 1 M N K = 0 M = 0 K = 0
12 simprr K M N K gcd N = 1 M N K = 0 M = 0 M = 0
13 simplrr K M N K gcd N = 1 M N K = 0 M = 0 M N
14 12 13 eqbrtrrd K M N K gcd N = 1 M N K = 0 M = 0 0 N
15 simpll3 K M N K gcd N = 1 M N K = 0 M = 0 N
16 0dvds N 0 N N = 0
17 15 16 syl K M N K gcd N = 1 M N K = 0 M = 0 0 N N = 0
18 14 17 mpbid K M N K gcd N = 1 M N K = 0 M = 0 N = 0
19 11 18 jca K M N K gcd N = 1 M N K = 0 M = 0 K = 0 N = 0
20 19 ex K M N K gcd N = 1 M N K = 0 M = 0 K = 0 N = 0
21 simpl3 K M N K gcd N = 1 M N N
22 gcdeq0 K N K gcd N = 0 K = 0 N = 0
23 1 21 22 syl2anc K M N K gcd N = 1 M N K gcd N = 0 K = 0 N = 0
24 20 23 sylibrd K M N K gcd N = 1 M N K = 0 M = 0 K gcd N = 0
25 10 24 mtod K M N K gcd N = 1 M N ¬ K = 0 M = 0
26 gcdn0cl K M ¬ K = 0 M = 0 K gcd M
27 1 2 25 26 syl21anc K M N K gcd N = 1 M N K gcd M
28 27 nnzd K M N K gcd N = 1 M N K gcd M
29 4 simprd K M N K gcd N = 1 M N K gcd M M
30 simprr K M N K gcd N = 1 M N M N
31 28 2 21 29 30 dvdstrd K M N K gcd N = 1 M N K gcd M N
32 10 23 mtbid K M N K gcd N = 1 M N ¬ K = 0 N = 0
33 dvdslegcd K gcd M K N ¬ K = 0 N = 0 K gcd M K K gcd M N K gcd M K gcd N
34 28 1 21 32 33 syl31anc K M N K gcd N = 1 M N K gcd M K K gcd M N K gcd M K gcd N
35 5 31 34 mp2and K M N K gcd N = 1 M N K gcd M K gcd N
36 35 7 breqtrd K M N K gcd N = 1 M N K gcd M 1
37 nnle1eq1 K gcd M K gcd M 1 K gcd M = 1
38 27 37 syl K M N K gcd N = 1 M N K gcd M 1 K gcd M = 1
39 36 38 mpbid K M N K gcd N = 1 M N K gcd M = 1