ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  divgcdcoprmex Unicode version

Theorem divgcdcoprmex 10691
Description: Integers divided by gcd are coprime (see ProofWiki "Integers Divided by GCD are Coprime", 11-Jul-2021, https://proofwiki.org/wiki/Integers_Divided_by_GCD_are_Coprime): Any pair of integers, not both zero, can be reduced to a pair of coprime ones by dividing them by their gcd. (Contributed by AV, 12-Jul-2021.)
Assertion
Ref Expression
divgcdcoprmex  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  ->  E. a  e.  ZZ  E. b  e.  ZZ  ( A  =  ( M  x.  a
)  /\  B  =  ( M  x.  b
)  /\  ( a  gcd  b )  =  1 ) )
Distinct variable groups:    A, a, b    B, a, b    M, a, b

Proof of Theorem divgcdcoprmex
StepHypRef Expression
1 simpl 107 . . . . 5  |-  ( ( B  e.  ZZ  /\  B  =/=  0 )  ->  B  e.  ZZ )
21anim2i 334 . . . 4  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 ) )  ->  ( A  e.  ZZ  /\  B  e.  ZZ ) )
3 zeqzmulgcd 10569 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  E. a  e.  ZZ  A  =  ( a  x.  ( A  gcd  B
) ) )
42, 3syl 14 . . 3  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 ) )  ->  E. a  e.  ZZ  A  =  ( a  x.  ( A  gcd  B ) ) )
543adant3 959 . 2  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  ->  E. a  e.  ZZ  A  =  ( a  x.  ( A  gcd  B ) ) )
6 zeqzmulgcd 10569 . . . . 5  |-  ( ( B  e.  ZZ  /\  A  e.  ZZ )  ->  E. b  e.  ZZ  B  =  ( b  x.  ( B  gcd  A
) ) )
76adantlr 461 . . . 4  |-  ( ( ( B  e.  ZZ  /\  B  =/=  0 )  /\  A  e.  ZZ )  ->  E. b  e.  ZZ  B  =  ( b  x.  ( B  gcd  A
) ) )
87ancoms 264 . . 3  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 ) )  ->  E. b  e.  ZZ  B  =  ( b  x.  ( B  gcd  A ) ) )
983adant3 959 . 2  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  ->  E. b  e.  ZZ  B  =  ( b  x.  ( B  gcd  A ) ) )
10 reeanv 2528 . . 3  |-  ( E. a  e.  ZZ  E. b  e.  ZZ  ( A  =  ( a  x.  ( A  gcd  B
) )  /\  B  =  ( b  x.  ( B  gcd  A
) ) )  <->  ( E. a  e.  ZZ  A  =  ( a  x.  ( A  gcd  B
) )  /\  E. b  e.  ZZ  B  =  ( b  x.  ( B  gcd  A
) ) ) )
11 zcn 8489 . . . . . . . . . . . 12  |-  ( a  e.  ZZ  ->  a  e.  CC )
1211adantl 271 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  ->  a  e.  CC )
13 gcdcl 10565 . . . . . . . . . . . . . . 15  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( A  gcd  B
)  e.  NN0 )
142, 13syl 14 . . . . . . . . . . . . . 14  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 ) )  ->  ( A  gcd  B )  e.  NN0 )
1514nn0cnd 8462 . . . . . . . . . . . . 13  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 ) )  ->  ( A  gcd  B )  e.  CC )
16153adant3 959 . . . . . . . . . . . 12  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  ->  ( A  gcd  B )  e.  CC )
1716adantr 270 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  ->  ( A  gcd  B )  e.  CC )
1812, 17mulcomd 7254 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  ->  (
a  x.  ( A  gcd  B ) )  =  ( ( A  gcd  B )  x.  a ) )
19 simp3 941 . . . . . . . . . . . . 13  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  ->  M  =  ( A  gcd  B ) )
2019eqcomd 2088 . . . . . . . . . . . 12  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  ->  ( A  gcd  B )  =  M )
2120oveq1d 5578 . . . . . . . . . . 11  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  ->  ( ( A  gcd  B )  x.  a )  =  ( M  x.  a ) )
2221adantr 270 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  ->  (
( A  gcd  B
)  x.  a )  =  ( M  x.  a ) )
2318, 22eqtrd 2115 . . . . . . . . 9  |-  ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  ->  (
a  x.  ( A  gcd  B ) )  =  ( M  x.  a ) )
2423ad2antrr 472 . . . . . . . 8  |-  ( ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  /\  ( A  =  ( a  x.  ( A  gcd  B
) )  /\  B  =  ( b  x.  ( B  gcd  A
) ) ) )  ->  ( a  x.  ( A  gcd  B
) )  =  ( M  x.  a ) )
25 eqeq1 2089 . . . . . . . . . 10  |-  ( A  =  ( a  x.  ( A  gcd  B
) )  ->  ( A  =  ( M  x.  a )  <->  ( a  x.  ( A  gcd  B
) )  =  ( M  x.  a ) ) )
2625adantr 270 . . . . . . . . 9  |-  ( ( A  =  ( a  x.  ( A  gcd  B ) )  /\  B  =  ( b  x.  ( B  gcd  A
) ) )  -> 
( A  =  ( M  x.  a )  <-> 
( a  x.  ( A  gcd  B ) )  =  ( M  x.  a ) ) )
2726adantl 271 . . . . . . . 8  |-  ( ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  /\  ( A  =  ( a  x.  ( A  gcd  B
) )  /\  B  =  ( b  x.  ( B  gcd  A
) ) ) )  ->  ( A  =  ( M  x.  a
)  <->  ( a  x.  ( A  gcd  B
) )  =  ( M  x.  a ) ) )
2824, 27mpbird 165 . . . . . . 7  |-  ( ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  /\  ( A  =  ( a  x.  ( A  gcd  B
) )  /\  B  =  ( b  x.  ( B  gcd  A
) ) ) )  ->  A  =  ( M  x.  a ) )
29 simpr 108 . . . . . . . 8  |-  ( ( A  =  ( a  x.  ( A  gcd  B ) )  /\  B  =  ( b  x.  ( B  gcd  A
) ) )  ->  B  =  ( b  x.  ( B  gcd  A
) ) )
302ancomd 263 . . . . . . . . . . . . . 14  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 ) )  ->  ( B  e.  ZZ  /\  A  e.  ZZ ) )
31 gcdcom 10572 . . . . . . . . . . . . . 14  |-  ( ( B  e.  ZZ  /\  A  e.  ZZ )  ->  ( B  gcd  A
)  =  ( A  gcd  B ) )
3230, 31syl 14 . . . . . . . . . . . . 13  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 ) )  ->  ( B  gcd  A )  =  ( A  gcd  B ) )
33323adant3 959 . . . . . . . . . . . 12  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  ->  ( B  gcd  A )  =  ( A  gcd  B ) )
3433oveq2d 5579 . . . . . . . . . . 11  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  ->  ( b  x.  ( B  gcd  A
) )  =  ( b  x.  ( A  gcd  B ) ) )
3534adantr 270 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  b  e.  ZZ )  ->  (
b  x.  ( B  gcd  A ) )  =  ( b  x.  ( A  gcd  B
) ) )
36 zcn 8489 . . . . . . . . . . . 12  |-  ( b  e.  ZZ  ->  b  e.  CC )
3736adantl 271 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  b  e.  ZZ )  ->  b  e.  CC )
38143adant3 959 . . . . . . . . . . . . 13  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  ->  ( A  gcd  B )  e.  NN0 )
3938adantr 270 . . . . . . . . . . . 12  |-  ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  b  e.  ZZ )  ->  ( A  gcd  B )  e. 
NN0 )
4039nn0cnd 8462 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  b  e.  ZZ )  ->  ( A  gcd  B )  e.  CC )
4137, 40mulcomd 7254 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  b  e.  ZZ )  ->  (
b  x.  ( A  gcd  B ) )  =  ( ( A  gcd  B )  x.  b ) )
4220adantr 270 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  b  e.  ZZ )  ->  ( A  gcd  B )  =  M )
4342oveq1d 5578 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  b  e.  ZZ )  ->  (
( A  gcd  B
)  x.  b )  =  ( M  x.  b ) )
4435, 41, 433eqtrd 2119 . . . . . . . . 9  |-  ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  b  e.  ZZ )  ->  (
b  x.  ( B  gcd  A ) )  =  ( M  x.  b ) )
4544adantlr 461 . . . . . . . 8  |-  ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  ->  (
b  x.  ( B  gcd  A ) )  =  ( M  x.  b ) )
4629, 45sylan9eqr 2137 . . . . . . 7  |-  ( ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  /\  ( A  =  ( a  x.  ( A  gcd  B
) )  /\  B  =  ( b  x.  ( B  gcd  A
) ) ) )  ->  B  =  ( M  x.  b ) )
47 zcn 8489 . . . . . . . . . . . . . 14  |-  ( A  e.  ZZ  ->  A  e.  CC )
48473ad2ant1 960 . . . . . . . . . . . . 13  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  ->  A  e.  CC )
4948ad2antrr 472 . . . . . . . . . . . 12  |-  ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  ->  A  e.  CC )
5012adantr 270 . . . . . . . . . . . 12  |-  ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  ->  a  e.  CC )
51 simp1 939 . . . . . . . . . . . . . . 15  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  ->  A  e.  ZZ )
5213ad2ant2 961 . . . . . . . . . . . . . . 15  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  ->  B  e.  ZZ )
5351, 52gcdcld 10567 . . . . . . . . . . . . . 14  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  ->  ( A  gcd  B )  e.  NN0 )
5453nn0cnd 8462 . . . . . . . . . . . . 13  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  ->  ( A  gcd  B )  e.  CC )
5554ad2antrr 472 . . . . . . . . . . . 12  |-  ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  ->  ( A  gcd  B )  e.  CC )
56 gcdeq0 10575 . . . . . . . . . . . . . . . . . 18  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( A  gcd  B )  =  0  <->  ( A  =  0  /\  B  =  0 ) ) )
57 simpr 108 . . . . . . . . . . . . . . . . . 18  |-  ( ( A  =  0  /\  B  =  0 )  ->  B  =  0 )
5856, 57syl6bi 161 . . . . . . . . . . . . . . . . 17  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( A  gcd  B )  =  0  ->  B  =  0 ) )
5958necon3d 2293 . . . . . . . . . . . . . . . 16  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( B  =/=  0  ->  ( A  gcd  B
)  =/=  0 ) )
6059impr 371 . . . . . . . . . . . . . . 15  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 ) )  ->  ( A  gcd  B )  =/=  0
)
61603adant3 959 . . . . . . . . . . . . . 14  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  ->  ( A  gcd  B )  =/=  0
)
6261ad2antrr 472 . . . . . . . . . . . . 13  |-  ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  ->  ( A  gcd  B )  =/=  0 )
6338ad2antrr 472 . . . . . . . . . . . . . . 15  |-  ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  ->  ( A  gcd  B )  e. 
NN0 )
6463nn0zd 8600 . . . . . . . . . . . . . 14  |-  ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  ->  ( A  gcd  B )  e.  ZZ )
65 0zd 8496 . . . . . . . . . . . . . 14  |-  ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  ->  0  e.  ZZ )
66 zapne 8555 . . . . . . . . . . . . . 14  |-  ( ( ( A  gcd  B
)  e.  ZZ  /\  0  e.  ZZ )  ->  ( ( A  gcd  B ) #  0  <->  ( A  gcd  B )  =/=  0
) )
6764, 65, 66syl2anc 403 . . . . . . . . . . . . 13  |-  ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  ->  (
( A  gcd  B
) #  0  <->  ( A  gcd  B )  =/=  0
) )
6862, 67mpbird 165 . . . . . . . . . . . 12  |-  ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  ->  ( A  gcd  B ) #  0 )
6949, 50, 55, 68divmulap3d 8030 . . . . . . . . . . 11  |-  ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  ->  (
( A  /  ( A  gcd  B ) )  =  a  <->  A  =  ( a  x.  ( A  gcd  B ) ) ) )
7069bicomd 139 . . . . . . . . . 10  |-  ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  ->  ( A  =  ( a  x.  ( A  gcd  B
) )  <->  ( A  /  ( A  gcd  B ) )  =  a ) )
71 zcn 8489 . . . . . . . . . . . . . . 15  |-  ( B  e.  ZZ  ->  B  e.  CC )
7271adantr 270 . . . . . . . . . . . . . 14  |-  ( ( B  e.  ZZ  /\  B  =/=  0 )  ->  B  e.  CC )
73723ad2ant2 961 . . . . . . . . . . . . 13  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  ->  B  e.  CC )
7473ad2antrr 472 . . . . . . . . . . . 12  |-  ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  ->  B  e.  CC )
7536adantl 271 . . . . . . . . . . . 12  |-  ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  ->  b  e.  CC )
7674, 75, 55, 68divmulap3d 8030 . . . . . . . . . . 11  |-  ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  ->  (
( B  /  ( A  gcd  B ) )  =  b  <->  B  =  ( b  x.  ( A  gcd  B ) ) ) )
7723adant3 959 . . . . . . . . . . . . . . 15  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  ->  ( A  e.  ZZ  /\  B  e.  ZZ ) )
78 gcdcom 10572 . . . . . . . . . . . . . . 15  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( A  gcd  B
)  =  ( B  gcd  A ) )
7977, 78syl 14 . . . . . . . . . . . . . 14  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  ->  ( A  gcd  B )  =  ( B  gcd  A ) )
8079ad2antrr 472 . . . . . . . . . . . . 13  |-  ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  ->  ( A  gcd  B )  =  ( B  gcd  A
) )
8180oveq2d 5579 . . . . . . . . . . . 12  |-  ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  ->  (
b  x.  ( A  gcd  B ) )  =  ( b  x.  ( B  gcd  A
) ) )
8281eqeq2d 2094 . . . . . . . . . . 11  |-  ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  ->  ( B  =  ( b  x.  ( A  gcd  B
) )  <->  B  =  ( b  x.  ( B  gcd  A ) ) ) )
8376, 82bitr2d 187 . . . . . . . . . 10  |-  ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  ->  ( B  =  ( b  x.  ( B  gcd  A
) )  <->  ( B  /  ( A  gcd  B ) )  =  b ) )
8470, 83anbi12d 457 . . . . . . . . 9  |-  ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  ->  (
( A  =  ( a  x.  ( A  gcd  B ) )  /\  B  =  ( b  x.  ( B  gcd  A ) ) )  <->  ( ( A  /  ( A  gcd  B ) )  =  a  /\  ( B  / 
( A  gcd  B
) )  =  b ) ) )
85 3anass 924 . . . . . . . . . . . . . 14  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  B  =/=  0 )  <->  ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 ) ) )
8685biimpri 131 . . . . . . . . . . . . 13  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 ) )  ->  ( A  e.  ZZ  /\  B  e.  ZZ  /\  B  =/=  0 ) )
87863adant3 959 . . . . . . . . . . . 12  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  ->  ( A  e.  ZZ  /\  B  e.  ZZ  /\  B  =/=  0 ) )
88 divgcdcoprm0 10690 . . . . . . . . . . . 12  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  B  =/=  0 )  ->  (
( A  /  ( A  gcd  B ) )  gcd  ( B  / 
( A  gcd  B
) ) )  =  1 )
8987, 88syl 14 . . . . . . . . . . 11  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  ->  ( ( A  /  ( A  gcd  B ) )  gcd  ( B  /  ( A  gcd  B ) ) )  =  1 )
90 oveq12 5572 . . . . . . . . . . . 12  |-  ( ( ( A  /  ( A  gcd  B ) )  =  a  /\  ( B  /  ( A  gcd  B ) )  =  b )  ->  ( ( A  /  ( A  gcd  B ) )  gcd  ( B  /  ( A  gcd  B ) ) )  =  ( a  gcd  b
) )
9190eqeq1d 2091 . . . . . . . . . . 11  |-  ( ( ( A  /  ( A  gcd  B ) )  =  a  /\  ( B  /  ( A  gcd  B ) )  =  b )  ->  ( (
( A  /  ( A  gcd  B ) )  gcd  ( B  / 
( A  gcd  B
) ) )  =  1  <->  ( a  gcd  b )  =  1 ) )
9289, 91syl5ibcom 153 . . . . . . . . . 10  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  ->  ( (
( A  /  ( A  gcd  B ) )  =  a  /\  ( B  /  ( A  gcd  B ) )  =  b )  ->  ( a  gcd  b )  =  1 ) )
9392ad2antrr 472 . . . . . . . . 9  |-  ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  ->  (
( ( A  / 
( A  gcd  B
) )  =  a  /\  ( B  / 
( A  gcd  B
) )  =  b )  ->  ( a  gcd  b )  =  1 ) )
9484, 93sylbid 148 . . . . . . . 8  |-  ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  ->  (
( A  =  ( a  x.  ( A  gcd  B ) )  /\  B  =  ( b  x.  ( B  gcd  A ) ) )  ->  ( a  gcd  b )  =  1 ) )
9594imp 122 . . . . . . 7  |-  ( ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  /\  ( A  =  ( a  x.  ( A  gcd  B
) )  /\  B  =  ( b  x.  ( B  gcd  A
) ) ) )  ->  ( a  gcd  b )  =  1 )
9628, 46, 953jca 1119 . . . . . 6  |-  ( ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  /\  ( A  =  ( a  x.  ( A  gcd  B
) )  /\  B  =  ( b  x.  ( B  gcd  A
) ) ) )  ->  ( A  =  ( M  x.  a
)  /\  B  =  ( M  x.  b
)  /\  ( a  gcd  b )  =  1 ) )
9796ex 113 . . . . 5  |-  ( ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  /\  b  e.  ZZ )  ->  (
( A  =  ( a  x.  ( A  gcd  B ) )  /\  B  =  ( b  x.  ( B  gcd  A ) ) )  ->  ( A  =  ( M  x.  a )  /\  B  =  ( M  x.  b )  /\  (
a  gcd  b )  =  1 ) ) )
9897reximdva 2468 . . . 4  |-  ( ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  /\  a  e.  ZZ )  ->  ( E. b  e.  ZZ  ( A  =  (
a  x.  ( A  gcd  B ) )  /\  B  =  ( b  x.  ( B  gcd  A ) ) )  ->  E. b  e.  ZZ  ( A  =  ( M  x.  a
)  /\  B  =  ( M  x.  b
)  /\  ( a  gcd  b )  =  1 ) ) )
9998reximdva 2468 . . 3  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  ->  ( E. a  e.  ZZ  E. b  e.  ZZ  ( A  =  ( a  x.  ( A  gcd  B ) )  /\  B  =  ( b  x.  ( B  gcd  A ) ) )  ->  E. a  e.  ZZ  E. b  e.  ZZ  ( A  =  ( M  x.  a
)  /\  B  =  ( M  x.  b
)  /\  ( a  gcd  b )  =  1 ) ) )
10010, 99syl5bir 151 . 2  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  ->  ( ( E. a  e.  ZZ  A  =  ( a  x.  ( A  gcd  B
) )  /\  E. b  e.  ZZ  B  =  ( b  x.  ( B  gcd  A
) ) )  ->  E. a  e.  ZZ  E. b  e.  ZZ  ( A  =  ( M  x.  a )  /\  B  =  ( M  x.  b )  /\  (
a  gcd  b )  =  1 ) ) )
1015, 9, 100mp2and 424 1  |-  ( ( A  e.  ZZ  /\  ( B  e.  ZZ  /\  B  =/=  0 )  /\  M  =  ( A  gcd  B ) )  ->  E. a  e.  ZZ  E. b  e.  ZZ  ( A  =  ( M  x.  a
)  /\  B  =  ( M  x.  b
)  /\  ( a  gcd  b )  =  1 ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 102    <-> wb 103    /\ w3a 920    = wceq 1285    e. wcel 1434    =/= wne 2249   E.wrex 2354   class class class wbr 3805  (class class class)co 5563   CCcc 7093   0cc0 7095   1c1 7096    x. cmul 7100   # cap 7800    / cdiv 7879   NN0cn0 8407   ZZcz 8484    gcd cgcd 10545
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 104  ax-ia2 105  ax-ia3 106  ax-in1 577  ax-in2 578  ax-io 663  ax-5 1377  ax-7 1378  ax-gen 1379  ax-ie1 1423  ax-ie2 1424  ax-8 1436  ax-10 1437  ax-11 1438  ax-i12 1439  ax-bndl 1440  ax-4 1441  ax-13 1445  ax-14 1446  ax-17 1460  ax-i9 1464  ax-ial 1468  ax-i5r 1469  ax-ext 2065  ax-coll 3913  ax-sep 3916  ax-nul 3924  ax-pow 3968  ax-pr 3992  ax-un 4216  ax-setind 4308  ax-iinf 4357  ax-cnex 7181  ax-resscn 7182  ax-1cn 7183  ax-1re 7184  ax-icn 7185  ax-addcl 7186  ax-addrcl 7187  ax-mulcl 7188  ax-mulrcl 7189  ax-addcom 7190  ax-mulcom 7191  ax-addass 7192  ax-mulass 7193  ax-distr 7194  ax-i2m1 7195  ax-0lt1 7196  ax-1rid 7197  ax-0id 7198  ax-rnegex 7199  ax-precex 7200  ax-cnre 7201  ax-pre-ltirr 7202  ax-pre-ltwlin 7203  ax-pre-lttrn 7204  ax-pre-apti 7205  ax-pre-ltadd 7206  ax-pre-mulgt0 7207  ax-pre-mulext 7208  ax-arch 7209  ax-caucvg 7210
This theorem depends on definitions:  df-bi 115  df-dc 777  df-3or 921  df-3an 922  df-tru 1288  df-fal 1291  df-nf 1391  df-sb 1688  df-eu 1946  df-mo 1947  df-clab 2070  df-cleq 2076  df-clel 2079  df-nfc 2212  df-ne 2250  df-nel 2345  df-ral 2358  df-rex 2359  df-reu 2360  df-rmo 2361  df-rab 2362  df-v 2612  df-sbc 2825  df-csb 2918  df-dif 2984  df-un 2986  df-in 2988  df-ss 2995  df-nul 3268  df-if 3369  df-pw 3402  df-sn 3422  df-pr 3423  df-op 3425  df-uni 3622  df-int 3657  df-iun 3700  df-br 3806  df-opab 3860  df-mpt 3861  df-tr 3896  df-id 4076  df-po 4079  df-iso 4080  df-iord 4149  df-on 4151  df-ilim 4152  df-suc 4154  df-iom 4360  df-xp 4397  df-rel 4398  df-cnv 4399  df-co 4400  df-dm 4401  df-rn 4402  df-res 4403  df-ima 4404  df-iota 4917  df-fun 4954  df-fn 4955  df-f 4956  df-f1 4957  df-fo 4958  df-f1o 4959  df-fv 4960  df-riota 5519  df-ov 5566  df-oprab 5567  df-mpt2 5568  df-1st 5818  df-2nd 5819  df-recs 5974  df-frec 6060  df-sup 6491  df-pnf 7269  df-mnf 7270  df-xr 7271  df-ltxr 7272  df-le 7273  df-sub 7400  df-neg 7401  df-reap 7794  df-ap 7801  df-div 7880  df-inn 8159  df-2 8217  df-3 8218  df-4 8219  df-n0 8408  df-z 8485  df-uz 8753  df-q 8838  df-rp 8868  df-fz 9158  df-fzo 9282  df-fl 9404  df-mod 9457  df-iseq 9574  df-iexp 9625  df-cj 9930  df-re 9931  df-im 9932  df-rsqrt 10085  df-abs 10086  df-dvds 10404  df-gcd 10546
This theorem is referenced by:  cncongr1  10692
  Copyright terms: Public domain W3C validator