Metamath Proof Explorer


Theorem prmrp

Description: Unequal prime numbers are relatively prime. (Contributed by Mario Carneiro, 23-Feb-2014)

Ref Expression
Assertion prmrp P Q P gcd Q = 1 P Q

Proof

Step Hyp Ref Expression
1 prmz Q Q
2 coprm P Q ¬ P Q P gcd Q = 1
3 1 2 sylan2 P Q ¬ P Q P gcd Q = 1
4 prmuz2 P P 2
5 dvdsprm P 2 Q P Q P = Q
6 4 5 sylan P Q P Q P = Q
7 6 necon3bbid P Q ¬ P Q P Q
8 3 7 bitr3d P Q P gcd Q = 1 P Q