Metamath Proof Explorer


Theorem coprmgcdb

Description: Two positive integers are coprime, i.e. the only positive integer that divides both of them is 1, iff their greatest common divisor is 1. (Contributed by AV, 9-Aug-2020)

Ref Expression
Assertion coprmgcdb A B i i A i B i = 1 A gcd B = 1

Proof

Step Hyp Ref Expression
1 nnz A A
2 nnz B B
3 gcddvds A B A gcd B A A gcd B B
4 1 2 3 syl2an A B A gcd B A A gcd B B
5 simpr A B A gcd B A A gcd B B A gcd B A A gcd B B
6 gcdnncl A B A gcd B
7 6 adantr A B A gcd B A A gcd B B A gcd B
8 breq1 i = A gcd B i A A gcd B A
9 breq1 i = A gcd B i B A gcd B B
10 8 9 anbi12d i = A gcd B i A i B A gcd B A A gcd B B
11 eqeq1 i = A gcd B i = 1 A gcd B = 1
12 10 11 imbi12d i = A gcd B i A i B i = 1 A gcd B A A gcd B B A gcd B = 1
13 12 rspcv A gcd B i i A i B i = 1 A gcd B A A gcd B B A gcd B = 1
14 7 13 syl A B A gcd B A A gcd B B i i A i B i = 1 A gcd B A A gcd B B A gcd B = 1
15 5 14 mpid A B A gcd B A A gcd B B i i A i B i = 1 A gcd B = 1
16 4 15 mpdan A B i i A i B i = 1 A gcd B = 1
17 simpl A B A gcd B = 1 A B
18 17 anim1ci A B A gcd B = 1 i i A B
19 3anass i A B i A B
20 18 19 sylibr A B A gcd B = 1 i i A B
21 nndvdslegcd i A B i A i B i A gcd B
22 20 21 syl A B A gcd B = 1 i i A i B i A gcd B
23 breq2 A gcd B = 1 i A gcd B i 1
24 23 adantr A gcd B = 1 i i A gcd B i 1
25 nnge1 i 1 i
26 nnre i i
27 1red i 1
28 26 27 letri3d i i = 1 i 1 1 i
29 28 biimprd i i 1 1 i i = 1
30 25 29 mpan2d i i 1 i = 1
31 30 adantl A gcd B = 1 i i 1 i = 1
32 24 31 sylbid A gcd B = 1 i i A gcd B i = 1
33 32 adantll A B A gcd B = 1 i i A gcd B i = 1
34 22 33 syld A B A gcd B = 1 i i A i B i = 1
35 34 ralrimiva A B A gcd B = 1 i i A i B i = 1
36 35 ex A B A gcd B = 1 i i A i B i = 1
37 16 36 impbid A B i i A i B i = 1 A gcd B = 1