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

Theorem gcdaddm 10582
Description: Adding a multiple of one operand of the  gcd operator to the other does not alter the result. (Contributed by Paul Chapman, 31-Mar-2011.)
Assertion
Ref Expression
gcdaddm  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  N )  =  ( M  gcd  ( N  +  ( K  x.  M ) ) ) )

Proof of Theorem gcdaddm
StepHypRef Expression
1 gcddvds 10562 . . . . . . . . 9  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( M  gcd  N )  ||  M  /\  ( M  gcd  N ) 
||  N ) )
213adant1 957 . . . . . . . 8  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( M  gcd  N
)  ||  M  /\  ( M  gcd  N ) 
||  N ) )
32simpld 110 . . . . . . 7  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  N )  ||  M )
4 simp1 939 . . . . . . . . . 10  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  K  e.  ZZ )
5 1zzd 8511 . . . . . . . . . 10  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  1  e.  ZZ )
6 gcdcl 10565 . . . . . . . . . . . 12  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  N
)  e.  NN0 )
763adant1 957 . . . . . . . . . . 11  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  N )  e. 
NN0 )
87nn0zd 8600 . . . . . . . . . 10  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  N )  e.  ZZ )
9 simp2 940 . . . . . . . . . 10  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  M  e.  ZZ )
10 simp3 941 . . . . . . . . . 10  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  N  e.  ZZ )
11 dvds2ln 10436 . . . . . . . . . 10  |-  ( ( ( K  e.  ZZ  /\  1  e.  ZZ )  /\  ( ( M  gcd  N )  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ ) )  -> 
( ( ( M  gcd  N )  ||  M  /\  ( M  gcd  N )  ||  N )  ->  ( M  gcd  N )  ||  ( ( K  x.  M )  +  ( 1  x.  N ) ) ) )
124, 5, 8, 9, 10, 11syl23anc 1177 . . . . . . . . 9  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( ( M  gcd  N )  ||  M  /\  ( M  gcd  N ) 
||  N )  -> 
( M  gcd  N
)  ||  ( ( K  x.  M )  +  ( 1  x.  N ) ) ) )
132, 12mpd 13 . . . . . . . 8  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  N )  ||  ( ( K  x.  M )  +  ( 1  x.  N ) ) )
1410zcnd 8603 . . . . . . . . . 10  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  N  e.  CC )
1514mulid2d 7251 . . . . . . . . 9  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
1  x.  N )  =  N )
1615oveq2d 5579 . . . . . . . 8  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( K  x.  M
)  +  ( 1  x.  N ) )  =  ( ( K  x.  M )  +  N ) )
1713, 16breqtrd 3829 . . . . . . 7  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  N )  ||  ( ( K  x.  M )  +  N
) )
183, 17jca 300 . . . . . 6  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( M  gcd  N
)  ||  M  /\  ( M  gcd  N ) 
||  ( ( K  x.  M )  +  N ) ) )
194, 9zmulcld 8608 . . . . . . . 8  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( K  x.  M )  e.  ZZ )
2019, 10zaddcld 8606 . . . . . . 7  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( K  x.  M
)  +  N )  e.  ZZ )
21 dvdslegcd 10563 . . . . . . . 8  |-  ( ( ( ( M  gcd  N )  e.  ZZ  /\  M  e.  ZZ  /\  (
( K  x.  M
)  +  N )  e.  ZZ )  /\  -.  ( M  =  0  /\  ( ( K  x.  M )  +  N )  =  0 ) )  ->  (
( ( M  gcd  N )  ||  M  /\  ( M  gcd  N ) 
||  ( ( K  x.  M )  +  N ) )  -> 
( M  gcd  N
)  <_  ( M  gcd  ( ( K  x.  M )  +  N
) ) ) )
2221ex 113 . . . . . . 7  |-  ( ( ( M  gcd  N
)  e.  ZZ  /\  M  e.  ZZ  /\  (
( K  x.  M
)  +  N )  e.  ZZ )  -> 
( -.  ( M  =  0  /\  (
( K  x.  M
)  +  N )  =  0 )  -> 
( ( ( M  gcd  N )  ||  M  /\  ( M  gcd  N )  ||  ( ( K  x.  M )  +  N ) )  ->  ( M  gcd  N )  <_  ( M  gcd  ( ( K  x.  M )  +  N
) ) ) ) )
238, 9, 20, 22syl3anc 1170 . . . . . 6  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( -.  ( M  =  0  /\  ( ( K  x.  M )  +  N )  =  0 )  ->  ( (
( M  gcd  N
)  ||  M  /\  ( M  gcd  N ) 
||  ( ( K  x.  M )  +  N ) )  -> 
( M  gcd  N
)  <_  ( M  gcd  ( ( K  x.  M )  +  N
) ) ) ) )
2418, 23mpid 41 . . . . 5  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( -.  ( M  =  0  /\  ( ( K  x.  M )  +  N )  =  0 )  ->  ( M  gcd  N )  <_  ( M  gcd  ( ( K  x.  M )  +  N ) ) ) )
25 gcddvds 10562 . . . . . . . . 9  |-  ( ( M  e.  ZZ  /\  ( ( K  x.  M )  +  N
)  e.  ZZ )  ->  ( ( M  gcd  ( ( K  x.  M )  +  N ) )  ||  M  /\  ( M  gcd  ( ( K  x.  M )  +  N
) )  ||  (
( K  x.  M
)  +  N ) ) )
269, 20, 25syl2anc 403 . . . . . . . 8  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( M  gcd  (
( K  x.  M
)  +  N ) )  ||  M  /\  ( M  gcd  ( ( K  x.  M )  +  N ) ) 
||  ( ( K  x.  M )  +  N ) ) )
2726simpld 110 . . . . . . 7  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  ( ( K  x.  M )  +  N ) )  ||  M )
284znegcld 8604 . . . . . . . . . 10  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  -u K  e.  ZZ )
299, 20gcdcld 10567 . . . . . . . . . . 11  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  ( ( K  x.  M )  +  N ) )  e. 
NN0 )
3029nn0zd 8600 . . . . . . . . . 10  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  ( ( K  x.  M )  +  N ) )  e.  ZZ )
31 dvds2ln 10436 . . . . . . . . . 10  |-  ( ( ( -u K  e.  ZZ  /\  1  e.  ZZ )  /\  (
( M  gcd  (
( K  x.  M
)  +  N ) )  e.  ZZ  /\  M  e.  ZZ  /\  (
( K  x.  M
)  +  N )  e.  ZZ ) )  ->  ( ( ( M  gcd  ( ( K  x.  M )  +  N ) ) 
||  M  /\  ( M  gcd  ( ( K  x.  M )  +  N ) )  ||  ( ( K  x.  M )  +  N
) )  ->  ( M  gcd  ( ( K  x.  M )  +  N ) )  ||  ( ( -u K  x.  M )  +  ( 1  x.  ( ( K  x.  M )  +  N ) ) ) ) )
3228, 5, 30, 9, 20, 31syl23anc 1177 . . . . . . . . 9  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( ( M  gcd  ( ( K  x.  M )  +  N
) )  ||  M  /\  ( M  gcd  (
( K  x.  M
)  +  N ) )  ||  ( ( K  x.  M )  +  N ) )  ->  ( M  gcd  ( ( K  x.  M )  +  N
) )  ||  (
( -u K  x.  M
)  +  ( 1  x.  ( ( K  x.  M )  +  N ) ) ) ) )
3326, 32mpd 13 . . . . . . . 8  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  ( ( K  x.  M )  +  N ) )  ||  ( ( -u K  x.  M )  +  ( 1  x.  ( ( K  x.  M )  +  N ) ) ) )
344zcnd 8603 . . . . . . . . . . 11  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  K  e.  CC )
359zcnd 8603 . . . . . . . . . . 11  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  M  e.  CC )
3634, 35mulneg1d 7634 . . . . . . . . . 10  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( -u K  x.  M )  =  -u ( K  x.  M ) )
3720zcnd 8603 . . . . . . . . . . 11  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( K  x.  M
)  +  N )  e.  CC )
3837mulid2d 7251 . . . . . . . . . 10  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
1  x.  ( ( K  x.  M )  +  N ) )  =  ( ( K  x.  M )  +  N ) )
3936, 38oveq12d 5581 . . . . . . . . 9  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( -u K  x.  M
)  +  ( 1  x.  ( ( K  x.  M )  +  N ) ) )  =  ( -u ( K  x.  M )  +  ( ( K  x.  M )  +  N ) ) )
4034, 35mulcld 7253 . . . . . . . . . . . . 13  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( K  x.  M )  e.  CC )
4140negcld 7525 . . . . . . . . . . . . 13  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  -u ( K  x.  M )  e.  CC )
4240, 41addcomd 7378 . . . . . . . . . . . 12  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( K  x.  M
)  +  -u ( K  x.  M )
)  =  ( -u ( K  x.  M
)  +  ( K  x.  M ) ) )
4340negidd 7528 . . . . . . . . . . . 12  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( K  x.  M
)  +  -u ( K  x.  M )
)  =  0 )
4442, 43eqtr3d 2117 . . . . . . . . . . 11  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( -u ( K  x.  M
)  +  ( K  x.  M ) )  =  0 )
4544oveq1d 5578 . . . . . . . . . 10  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( -u ( K  x.  M )  +  ( K  x.  M ) )  +  N )  =  ( 0  +  N ) )
4641, 40, 14addassd 7255 . . . . . . . . . 10  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( -u ( K  x.  M )  +  ( K  x.  M ) )  +  N )  =  ( -u ( K  x.  M )  +  ( ( K  x.  M )  +  N ) ) )
4714addid2d 7377 . . . . . . . . . 10  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
0  +  N )  =  N )
4845, 46, 473eqtr3d 2123 . . . . . . . . 9  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( -u ( K  x.  M
)  +  ( ( K  x.  M )  +  N ) )  =  N )
4939, 48eqtrd 2115 . . . . . . . 8  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( -u K  x.  M
)  +  ( 1  x.  ( ( K  x.  M )  +  N ) ) )  =  N )
5033, 49breqtrd 3829 . . . . . . 7  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  ( ( K  x.  M )  +  N ) )  ||  N )
5127, 50jca 300 . . . . . 6  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( M  gcd  (
( K  x.  M
)  +  N ) )  ||  M  /\  ( M  gcd  ( ( K  x.  M )  +  N ) ) 
||  N ) )
52 dvdslegcd 10563 . . . . . . . 8  |-  ( ( ( ( M  gcd  ( ( K  x.  M )  +  N
) )  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  -> 
( ( ( M  gcd  ( ( K  x.  M )  +  N ) )  ||  M  /\  ( M  gcd  ( ( K  x.  M )  +  N
) )  ||  N
)  ->  ( M  gcd  ( ( K  x.  M )  +  N
) )  <_  ( M  gcd  N ) ) )
5352ex 113 . . . . . . 7  |-  ( ( ( M  gcd  (
( K  x.  M
)  +  N ) )  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( -.  ( M  =  0  /\  N  =  0 )  ->  ( (
( M  gcd  (
( K  x.  M
)  +  N ) )  ||  M  /\  ( M  gcd  ( ( K  x.  M )  +  N ) ) 
||  N )  -> 
( M  gcd  (
( K  x.  M
)  +  N ) )  <_  ( M  gcd  N ) ) ) )
5430, 9, 10, 53syl3anc 1170 . . . . . 6  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( -.  ( M  =  0  /\  N  =  0 )  ->  ( (
( M  gcd  (
( K  x.  M
)  +  N ) )  ||  M  /\  ( M  gcd  ( ( K  x.  M )  +  N ) ) 
||  N )  -> 
( M  gcd  (
( K  x.  M
)  +  N ) )  <_  ( M  gcd  N ) ) ) )
5551, 54mpid 41 . . . . 5  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( -.  ( M  =  0  /\  N  =  0 )  ->  ( M  gcd  ( ( K  x.  M )  +  N
) )  <_  ( M  gcd  N ) ) )
5624, 55anim12d 328 . . . 4  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( -.  ( M  =  0  /\  (
( K  x.  M
)  +  N )  =  0 )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  (
( M  gcd  N
)  <_  ( M  gcd  ( ( K  x.  M )  +  N
) )  /\  ( M  gcd  ( ( K  x.  M )  +  N ) )  <_ 
( M  gcd  N
) ) ) )
577nn0red 8461 . . . . 5  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  N )  e.  RR )
5829nn0red 8461 . . . . 5  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  ( ( K  x.  M )  +  N ) )  e.  RR )
5957, 58letri3d 7345 . . . 4  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( M  gcd  N
)  =  ( M  gcd  ( ( K  x.  M )  +  N ) )  <->  ( ( M  gcd  N )  <_ 
( M  gcd  (
( K  x.  M
)  +  N ) )  /\  ( M  gcd  ( ( K  x.  M )  +  N ) )  <_ 
( M  gcd  N
) ) ) )
6056, 59sylibrd 167 . . 3  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( -.  ( M  =  0  /\  (
( K  x.  M
)  +  N )  =  0 )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  ( M  gcd  N )  =  ( M  gcd  (
( K  x.  M
)  +  N ) ) ) )
61 0zd 8496 . . . . . . 7  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  0  e.  ZZ )
62 zdceq 8556 . . . . . . 7  |-  ( ( M  e.  ZZ  /\  0  e.  ZZ )  -> DECID  M  =  0 )
639, 61, 62syl2anc 403 . . . . . 6  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  -> DECID  M  =  0
)
64 zdceq 8556 . . . . . . 7  |-  ( ( ( ( K  x.  M )  +  N
)  e.  ZZ  /\  0  e.  ZZ )  -> DECID  ( ( K  x.  M
)  +  N )  =  0 )
6520, 61, 64syl2anc 403 . . . . . 6  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  -> DECID  ( ( K  x.  M )  +  N
)  =  0 )
66 dcan 876 . . . . . 6  |-  (DECID  M  =  0  ->  (DECID  ( ( K  x.  M )  +  N )  =  0  -> DECID 
( M  =  0  /\  ( ( K  x.  M )  +  N )  =  0 ) ) )
6763, 65, 66sylc 61 . . . . 5  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  -> DECID  ( M  =  0  /\  ( ( K  x.  M )  +  N )  =  0 ) )
68 zdceq 8556 . . . . . . 7  |-  ( ( N  e.  ZZ  /\  0  e.  ZZ )  -> DECID  N  =  0 )
6910, 61, 68syl2anc 403 . . . . . 6  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  -> DECID  N  =  0
)
70 dcan 876 . . . . . 6  |-  (DECID  M  =  0  ->  (DECID  N  = 
0  -> DECID  ( M  =  0  /\  N  =  0 ) ) )
7163, 69, 70sylc 61 . . . . 5  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  -> DECID  ( M  =  0  /\  N  =  0 ) )
72 orandc 881 . . . . 5  |-  ( (DECID  ( M  =  0  /\  ( ( K  x.  M )  +  N
)  =  0 )  /\ DECID  ( M  =  0  /\  N  =  0 ) )  ->  (
( ( M  =  0  /\  ( ( K  x.  M )  +  N )  =  0 )  \/  ( M  =  0  /\  N  =  0 ) )  <->  -.  ( -.  ( M  =  0  /\  ( ( K  x.  M )  +  N
)  =  0 )  /\  -.  ( M  =  0  /\  N  =  0 ) ) ) )
7367, 71, 72syl2anc 403 . . . 4  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( ( M  =  0  /\  ( ( K  x.  M )  +  N )  =  0 )  \/  ( M  =  0  /\  N  =  0 ) )  <->  -.  ( -.  ( M  =  0  /\  ( ( K  x.  M )  +  N
)  =  0 )  /\  -.  ( M  =  0  /\  N  =  0 ) ) ) )
74 simpr 108 . . . . . . . . . . . 12  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  M  =  0
)  ->  M  = 
0 )
7574oveq2d 5579 . . . . . . . . . . 11  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  M  =  0
)  ->  ( K  x.  M )  =  ( K  x.  0 ) )
7634mul01d 7616 . . . . . . . . . . . 12  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( K  x.  0 )  =  0 )
7776adantr 270 . . . . . . . . . . 11  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  M  =  0
)  ->  ( K  x.  0 )  =  0 )
7875, 77eqtrd 2115 . . . . . . . . . 10  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  M  =  0
)  ->  ( K  x.  M )  =  0 )
7978oveq1d 5578 . . . . . . . . 9  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  M  =  0
)  ->  ( ( K  x.  M )  +  N )  =  ( 0  +  N ) )
8047adantr 270 . . . . . . . . 9  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  M  =  0
)  ->  ( 0  +  N )  =  N )
8179, 80eqtrd 2115 . . . . . . . 8  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  M  =  0
)  ->  ( ( K  x.  M )  +  N )  =  N )
8281eqeq1d 2091 . . . . . . 7  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  M  =  0
)  ->  ( (
( K  x.  M
)  +  N )  =  0  <->  N  = 
0 ) )
8382pm5.32da 440 . . . . . 6  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( M  =  0  /\  ( ( K  x.  M )  +  N )  =  0 )  <->  ( M  =  0  /\  N  =  0 ) ) )
84 oveq12 5572 . . . . . . . . 9  |-  ( ( M  =  0  /\  N  =  0 )  ->  ( M  gcd  N )  =  ( 0  gcd  0 ) )
8584adantl 271 . . . . . . . 8  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  ->  ( M  gcd  N )  =  ( 0  gcd  0
) )
86 oveq12 5572 . . . . . . . . . 10  |-  ( ( M  =  0  /\  ( ( K  x.  M )  +  N
)  =  0 )  ->  ( M  gcd  ( ( K  x.  M )  +  N
) )  =  ( 0  gcd  0 ) )
8783, 86syl6bir 162 . . . . . . . . 9  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( M  =  0  /\  N  =  0 )  ->  ( M  gcd  ( ( K  x.  M )  +  N
) )  =  ( 0  gcd  0 ) ) )
8887imp 122 . . . . . . . 8  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  ->  ( M  gcd  ( ( K  x.  M )  +  N ) )  =  ( 0  gcd  0
) )
8985, 88eqtr4d 2118 . . . . . . 7  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  ->  ( M  gcd  N )  =  ( M  gcd  (
( K  x.  M
)  +  N ) ) )
9089ex 113 . . . . . 6  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( M  =  0  /\  N  =  0 )  ->  ( M  gcd  N )  =  ( M  gcd  ( ( K  x.  M )  +  N ) ) ) )
9183, 90sylbid 148 . . . . 5  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( M  =  0  /\  ( ( K  x.  M )  +  N )  =  0 )  ->  ( M  gcd  N )  =  ( M  gcd  ( ( K  x.  M )  +  N ) ) ) )
9291, 90jaod 670 . . . 4  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( ( M  =  0  /\  ( ( K  x.  M )  +  N )  =  0 )  \/  ( M  =  0  /\  N  =  0 ) )  ->  ( M  gcd  N )  =  ( M  gcd  ( ( K  x.  M )  +  N ) ) ) )
9373, 92sylbird 168 . . 3  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( -.  ( -.  ( M  =  0  /\  (
( K  x.  M
)  +  N )  =  0 )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  ( M  gcd  N )  =  ( M  gcd  (
( K  x.  M
)  +  N ) ) ) )
94 dcn 780 . . . . . 6  |-  (DECID  ( M  =  0  /\  (
( K  x.  M
)  +  N )  =  0 )  -> DECID  -.  ( M  =  0  /\  ( ( K  x.  M )  +  N
)  =  0 ) )
9567, 94syl 14 . . . . 5  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  -> DECID  -.  ( M  =  0  /\  ( ( K  x.  M )  +  N )  =  0 ) )
96 dcn 780 . . . . . 6  |-  (DECID  ( M  =  0  /\  N  =  0 )  -> DECID  -.  ( M  =  0  /\  N  =  0
) )
9771, 96syl 14 . . . . 5  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  -> DECID  -.  ( M  =  0  /\  N  =  0 ) )
98 dcan 876 . . . . 5  |-  (DECID  -.  ( M  =  0  /\  ( ( K  x.  M )  +  N
)  =  0 )  ->  (DECID  -.  ( M  =  0  /\  N  =  0 )  -> DECID  ( -.  ( M  =  0  /\  (
( K  x.  M
)  +  N )  =  0 )  /\  -.  ( M  =  0  /\  N  =  0 ) ) ) )
9995, 97, 98sylc 61 . . . 4  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  -> DECID  ( -.  ( M  =  0  /\  (
( K  x.  M
)  +  N )  =  0 )  /\  -.  ( M  =  0  /\  N  =  0 ) ) )
100 exmiddc 778 . . . 4  |-  (DECID  ( -.  ( M  =  0  /\  ( ( K  x.  M )  +  N )  =  0 )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  ( ( -.  ( M  =  0  /\  ( ( K  x.  M )  +  N )  =  0 )  /\  -.  ( M  =  0  /\  N  =  0 ) )  \/  -.  ( -.  ( M  =  0  /\  ( ( K  x.  M )  +  N )  =  0 )  /\  -.  ( M  =  0  /\  N  =  0 ) ) ) )
10199, 100syl 14 . . 3  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( -.  ( M  =  0  /\  (
( K  x.  M
)  +  N )  =  0 )  /\  -.  ( M  =  0  /\  N  =  0 ) )  \/  -.  ( -.  ( M  =  0  /\  (
( K  x.  M
)  +  N )  =  0 )  /\  -.  ( M  =  0  /\  N  =  0 ) ) ) )
10260, 93, 101mpjaod 671 . 2  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  N )  =  ( M  gcd  (
( K  x.  M
)  +  N ) ) )
10340, 14addcomd 7378 . . 3  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( K  x.  M
)  +  N )  =  ( N  +  ( K  x.  M
) ) )
104103oveq2d 5579 . 2  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  ( ( K  x.  M )  +  N ) )  =  ( M  gcd  ( N  +  ( K  x.  M ) ) ) )
105102, 104eqtrd 2115 1  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  N )  =  ( M  gcd  ( N  +  ( K  x.  M ) ) ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 102    <-> wb 103    \/ wo 662  DECID wdc 776    /\ w3a 920    = wceq 1285    e. wcel 1434   class class class wbr 3805  (class class class)co 5563   0cc0 7095   1c1 7096    + caddc 7098    x. cmul 7100    <_ cle 7268   -ucneg 7399   NN0cn0 8407   ZZcz 8484    || cdvds 10403    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:  gcdadd  10583  gcdid  10584  modgcd  10589  gcdmultiple  10616
  Copyright terms: Public domain W3C validator