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

Theorem gcdaddm 10850
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 10830 . . . . . . . . 9  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( M  gcd  N )  ||  M  /\  ( M  gcd  N ) 
||  N ) )
213adant1 959 . . . . . . . 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 941 . . . . . . . . . 10  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  K  e.  ZZ )
5 1zzd 8710 . . . . . . . . . 10  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  1  e.  ZZ )
6 gcdcl 10833 . . . . . . . . . . . 12  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  N
)  e.  NN0 )
763adant1 959 . . . . . . . . . . 11  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  N )  e. 
NN0 )
87nn0zd 8799 . . . . . . . . . 10  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  N )  e.  ZZ )
9 simp2 942 . . . . . . . . . 10  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  M  e.  ZZ )
10 simp3 943 . . . . . . . . . 10  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  N  e.  ZZ )
11 dvds2ln 10704 . . . . . . . . . 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 1179 . . . . . . . . 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 8802 . . . . . . . . . 10  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  N  e.  CC )
1514mulid2d 7450 . . . . . . . . 9  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
1  x.  N )  =  N )
1615oveq2d 5629 . . . . . . . 8  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( K  x.  M
)  +  ( 1  x.  N ) )  =  ( ( K  x.  M )  +  N ) )
1713, 16breqtrd 3844 . . . . . . 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 8807 . . . . . . . 8  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( K  x.  M )  e.  ZZ )
2019, 10zaddcld 8805 . . . . . . 7  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( K  x.  M
)  +  N )  e.  ZZ )
21 dvdslegcd 10831 . . . . . . . 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 1172 . . . . . 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 10830 . . . . . . . . 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 8803 . . . . . . . . . 10  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  -u K  e.  ZZ )
299, 20gcdcld 10835 . . . . . . . . . . 11  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  ( ( K  x.  M )  +  N ) )  e. 
NN0 )
3029nn0zd 8799 . . . . . . . . . 10  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  ( ( K  x.  M )  +  N ) )  e.  ZZ )
31 dvds2ln 10704 . . . . . . . . . 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 1179 . . . . . . . . 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 8802 . . . . . . . . . . 11  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  K  e.  CC )
359zcnd 8802 . . . . . . . . . . 11  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  M  e.  CC )
3634, 35mulneg1d 7833 . . . . . . . . . 10  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( -u K  x.  M )  =  -u ( K  x.  M ) )
3720zcnd 8802 . . . . . . . . . . 11  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( K  x.  M
)  +  N )  e.  CC )
3837mulid2d 7450 . . . . . . . . . 10  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
1  x.  ( ( K  x.  M )  +  N ) )  =  ( ( K  x.  M )  +  N ) )
3936, 38oveq12d 5631 . . . . . . . . 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 7452 . . . . . . . . . . . . 13  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( K  x.  M )  e.  CC )
4140negcld 7724 . . . . . . . . . . . . 13  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  -u ( K  x.  M )  e.  CC )
4240, 41addcomd 7577 . . . . . . . . . . . 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 7727 . . . . . . . . . . . 12  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( K  x.  M
)  +  -u ( K  x.  M )
)  =  0 )
4442, 43eqtr3d 2119 . . . . . . . . . . 11  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( -u ( K  x.  M
)  +  ( K  x.  M ) )  =  0 )
4544oveq1d 5628 . . . . . . . . . 10  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( -u ( K  x.  M )  +  ( K  x.  M ) )  +  N )  =  ( 0  +  N ) )
4641, 40, 14addassd 7454 . . . . . . . . . 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 7576 . . . . . . . . . 10  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
0  +  N )  =  N )
4845, 46, 473eqtr3d 2125 . . . . . . . . 9  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( -u ( K  x.  M
)  +  ( ( K  x.  M )  +  N ) )  =  N )
4939, 48eqtrd 2117 . . . . . . . 8  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( -u K  x.  M
)  +  ( 1  x.  ( ( K  x.  M )  +  N ) ) )  =  N )
5033, 49breqtrd 3844 . . . . . . 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 10831 . . . . . . . 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 1172 . . . . . 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 8660 . . . . 5  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  N )  e.  RR )
5829nn0red 8660 . . . . 5  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  ( ( K  x.  M )  +  N ) )  e.  RR )
5957, 58letri3d 7544 . . . 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 8695 . . . . . . 7  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  0  e.  ZZ )
62 zdceq 8755 . . . . . . 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 8755 . . . . . . 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 878 . . . . . 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 8755 . . . . . . 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 878 . . . . . 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 883 . . . . 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 5629 . . . . . . . . . . 11  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  M  =  0
)  ->  ( K  x.  M )  =  ( K  x.  0 ) )
7634mul01d 7815 . . . . . . . . . . . 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 2117 . . . . . . . . . 10  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  M  =  0
)  ->  ( K  x.  M )  =  0 )
7978oveq1d 5628 . . . . . . . . 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 2117 . . . . . . . 8  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  M  =  0
)  ->  ( ( K  x.  M )  +  N )  =  N )
8281eqeq1d 2093 . . . . . . 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 5622 . . . . . . . . 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 5622 . . . . . . . . . 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 2120 . . . . . . 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 782 . . . . . 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 782 . . . . . 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 878 . . . . 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 780 . . . 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 7577 . . 3  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( K  x.  M
)  +  N )  =  ( N  +  ( K  x.  M
) ) )
104103oveq2d 5629 . 2  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  ( ( K  x.  M )  +  N ) )  =  ( M  gcd  ( N  +  ( K  x.  M ) ) ) )
105102, 104eqtrd 2117 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 778    /\ w3a 922    = wceq 1287    e. wcel 1436   class class class wbr 3820  (class class class)co 5613   0cc0 7294   1c1 7295    + caddc 7297    x. cmul 7299    <_ cle 7467   -ucneg 7598   NN0cn0 8606   ZZcz 8683    || cdvds 10671    gcd cgcd 10813
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 1379  ax-7 1380  ax-gen 1381  ax-ie1 1425  ax-ie2 1426  ax-8 1438  ax-10 1439  ax-11 1440  ax-i12 1441  ax-bndl 1442  ax-4 1443  ax-13 1447  ax-14 1448  ax-17 1462  ax-i9 1466  ax-ial 1470  ax-i5r 1471  ax-ext 2067  ax-coll 3929  ax-sep 3932  ax-nul 3940  ax-pow 3984  ax-pr 4010  ax-un 4234  ax-setind 4326  ax-iinf 4376  ax-cnex 7380  ax-resscn 7381  ax-1cn 7382  ax-1re 7383  ax-icn 7384  ax-addcl 7385  ax-addrcl 7386  ax-mulcl 7387  ax-mulrcl 7388  ax-addcom 7389  ax-mulcom 7390  ax-addass 7391  ax-mulass 7392  ax-distr 7393  ax-i2m1 7394  ax-0lt1 7395  ax-1rid 7396  ax-0id 7397  ax-rnegex 7398  ax-precex 7399  ax-cnre 7400  ax-pre-ltirr 7401  ax-pre-ltwlin 7402  ax-pre-lttrn 7403  ax-pre-apti 7404  ax-pre-ltadd 7405  ax-pre-mulgt0 7406  ax-pre-mulext 7407  ax-arch 7408  ax-caucvg 7409
This theorem depends on definitions:  df-bi 115  df-dc 779  df-3or 923  df-3an 924  df-tru 1290  df-fal 1293  df-nf 1393  df-sb 1690  df-eu 1948  df-mo 1949  df-clab 2072  df-cleq 2078  df-clel 2081  df-nfc 2214  df-ne 2252  df-nel 2347  df-ral 2360  df-rex 2361  df-reu 2362  df-rmo 2363  df-rab 2364  df-v 2617  df-sbc 2830  df-csb 2923  df-dif 2990  df-un 2992  df-in 2994  df-ss 3001  df-nul 3276  df-if 3380  df-pw 3417  df-sn 3437  df-pr 3438  df-op 3440  df-uni 3637  df-int 3672  df-iun 3715  df-br 3821  df-opab 3875  df-mpt 3876  df-tr 3912  df-id 4094  df-po 4097  df-iso 4098  df-iord 4167  df-on 4169  df-ilim 4170  df-suc 4172  df-iom 4379  df-xp 4417  df-rel 4418  df-cnv 4419  df-co 4420  df-dm 4421  df-rn 4422  df-res 4423  df-ima 4424  df-iota 4946  df-fun 4983  df-fn 4984  df-f 4985  df-f1 4986  df-fo 4987  df-f1o 4988  df-fv 4989  df-riota 5569  df-ov 5616  df-oprab 5617  df-mpt2 5618  df-1st 5868  df-2nd 5869  df-recs 6024  df-frec 6110  df-sup 6623  df-pnf 7468  df-mnf 7469  df-xr 7470  df-ltxr 7471  df-le 7472  df-sub 7599  df-neg 7600  df-reap 7993  df-ap 8000  df-div 8079  df-inn 8358  df-2 8416  df-3 8417  df-4 8418  df-n0 8607  df-z 8684  df-uz 8952  df-q 9037  df-rp 9067  df-fz 9357  df-fzo 9482  df-fl 9605  df-mod 9658  df-iseq 9780  df-iexp 9853  df-cj 10171  df-re 10172  df-im 10173  df-rsqrt 10326  df-abs 10327  df-dvds 10672  df-gcd 10814
This theorem is referenced by:  gcdadd  10851  gcdid  10852  modgcd  10857  gcdmultiple  10884
  Copyright terms: Public domain W3C validator