MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  gcdaddmlem Unicode version

Theorem gcdaddmlem 12723
Description: Lemma for gcdaddm 12724. (Contributed by Paul Chapman, 31-Mar-2011.)
Hypotheses
Ref Expression
gcdaddmlem.1  |-  K  e.  ZZ
gcdaddmlem.2  |-  M  e.  ZZ
gcdaddmlem.3  |-  N  e.  ZZ
Assertion
Ref Expression
gcdaddmlem  |-  ( M  gcd  N )  =  ( M  gcd  (
( K  x.  M
)  +  N ) )

Proof of Theorem gcdaddmlem
StepHypRef Expression
1 gcdaddmlem.2 . . . . . . 7  |-  M  e.  ZZ
2 gcdaddmlem.3 . . . . . . 7  |-  N  e.  ZZ
3 gcddvds 12710 . . . . . . 7  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( M  gcd  N )  ||  M  /\  ( M  gcd  N ) 
||  N ) )
41, 2, 3mp2an 653 . . . . . 6  |-  ( ( M  gcd  N ) 
||  M  /\  ( M  gcd  N )  ||  N )
54simpli 444 . . . . 5  |-  ( M  gcd  N )  ||  M
6 gcdcl 12712 . . . . . . . . . 10  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  N
)  e.  NN0 )
71, 2, 6mp2an 653 . . . . . . . . 9  |-  ( M  gcd  N )  e. 
NN0
87nn0zi 10064 . . . . . . . 8  |-  ( M  gcd  N )  e.  ZZ
9 gcdaddmlem.1 . . . . . . . . 9  |-  K  e.  ZZ
10 1z 10069 . . . . . . . . 9  |-  1  e.  ZZ
11 dvds2ln 12575 . . . . . . . . 9  |-  ( ( ( 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 ) ) ) )
129, 10, 11mpanl12 663 . . . . . . . 8  |-  ( ( ( 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 ) ) ) )
138, 1, 2, 12mp3an 1277 . . . . . . 7  |-  ( ( ( M  gcd  N
)  ||  M  /\  ( M  gcd  N ) 
||  N )  -> 
( M  gcd  N
)  ||  ( ( K  x.  M )  +  ( 1  x.  N ) ) )
144, 13ax-mp 8 . . . . . 6  |-  ( M  gcd  N )  ||  ( ( K  x.  M )  +  ( 1  x.  N ) )
15 zcn 10045 . . . . . . . . 9  |-  ( N  e.  ZZ  ->  N  e.  CC )
162, 15ax-mp 8 . . . . . . . 8  |-  N  e.  CC
1716mulid2i 8856 . . . . . . 7  |-  ( 1  x.  N )  =  N
1817oveq2i 5885 . . . . . 6  |-  ( ( K  x.  M )  +  ( 1  x.  N ) )  =  ( ( K  x.  M )  +  N
)
1914, 18breqtri 4062 . . . . 5  |-  ( M  gcd  N )  ||  ( ( K  x.  M )  +  N
)
20 zmulcl 10082 . . . . . . . 8  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ )  ->  ( K  x.  M
)  e.  ZZ )
219, 1, 20mp2an 653 . . . . . . 7  |-  ( K  x.  M )  e.  ZZ
22 zaddcl 10075 . . . . . . 7  |-  ( ( ( K  x.  M
)  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( K  x.  M )  +  N
)  e.  ZZ )
2321, 2, 22mp2an 653 . . . . . 6  |-  ( ( K  x.  M )  +  N )  e.  ZZ
24 dvdslegcd 12711 . . . . . . 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
) ) ) )
2524ex 423 . . . . . 6  |-  ( ( ( 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
) ) ) ) )
268, 1, 23, 25mp3an 1277 . . . . 5  |-  ( -.  ( 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
) ) ) )
275, 19, 26mp2ani 659 . . . 4  |-  ( -.  ( M  =  0  /\  ( ( K  x.  M )  +  N )  =  0 )  ->  ( M  gcd  N )  <_  ( M  gcd  ( ( K  x.  M )  +  N ) ) )
28 gcddvds 12710 . . . . . . 7  |-  ( ( 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 ) ) )
291, 23, 28mp2an 653 . . . . . 6  |-  ( ( M  gcd  ( ( K  x.  M )  +  N ) ) 
||  M  /\  ( M  gcd  ( ( K  x.  M )  +  N ) )  ||  ( ( K  x.  M )  +  N
) )
3029simpli 444 . . . . 5  |-  ( M  gcd  ( ( K  x.  M )  +  N ) )  ||  M
31 gcdcl 12712 . . . . . . . . . 10  |-  ( ( M  e.  ZZ  /\  ( ( K  x.  M )  +  N
)  e.  ZZ )  ->  ( M  gcd  ( ( K  x.  M )  +  N
) )  e.  NN0 )
321, 23, 31mp2an 653 . . . . . . . . 9  |-  ( M  gcd  ( ( K  x.  M )  +  N ) )  e. 
NN0
3332nn0zi 10064 . . . . . . . 8  |-  ( M  gcd  ( ( K  x.  M )  +  N ) )  e.  ZZ
34 znegcl 10071 . . . . . . . . . 10  |-  ( K  e.  ZZ  ->  -u K  e.  ZZ )
359, 34ax-mp 8 . . . . . . . . 9  |-  -u K  e.  ZZ
36 dvds2ln 12575 . . . . . . . . 9  |-  ( ( ( -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 ) ) ) ) )
3735, 10, 36mpanl12 663 . . . . . . . 8  |-  ( ( ( 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 ) ) ) ) )
3833, 1, 23, 37mp3an 1277 . . . . . . 7  |-  ( ( ( 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 ) ) ) )
3929, 38ax-mp 8 . . . . . 6  |-  ( M  gcd  ( ( K  x.  M )  +  N ) )  ||  ( ( -u K  x.  M )  +  ( 1  x.  ( ( K  x.  M )  +  N ) ) )
40 zcn 10045 . . . . . . . . . 10  |-  ( K  e.  ZZ  ->  K  e.  CC )
419, 40ax-mp 8 . . . . . . . . 9  |-  K  e.  CC
42 zcn 10045 . . . . . . . . . 10  |-  ( M  e.  ZZ  ->  M  e.  CC )
431, 42ax-mp 8 . . . . . . . . 9  |-  M  e.  CC
4441, 43mulneg1i 9241 . . . . . . . 8  |-  ( -u K  x.  M )  =  -u ( K  x.  M )
45 zcn 10045 . . . . . . . . . 10  |-  ( ( ( K  x.  M
)  +  N )  e.  ZZ  ->  (
( K  x.  M
)  +  N )  e.  CC )
4623, 45ax-mp 8 . . . . . . . . 9  |-  ( ( K  x.  M )  +  N )  e.  CC
4746mulid2i 8856 . . . . . . . 8  |-  ( 1  x.  ( ( K  x.  M )  +  N ) )  =  ( ( K  x.  M )  +  N
)
4844, 47oveq12i 5886 . . . . . . 7  |-  ( (
-u K  x.  M
)  +  ( 1  x.  ( ( K  x.  M )  +  N ) ) )  =  ( -u ( K  x.  M )  +  ( ( K  x.  M )  +  N ) )
4941, 43mulcli 8858 . . . . . . . . . 10  |-  ( K  x.  M )  e.  CC
5049negcli 9130 . . . . . . . . . 10  |-  -u ( K  x.  M )  e.  CC
5149negidi 9131 . . . . . . . . . 10  |-  ( ( K  x.  M )  +  -u ( K  x.  M ) )  =  0
5249, 50, 51addcomli 9020 . . . . . . . . 9  |-  ( -u ( K  x.  M
)  +  ( K  x.  M ) )  =  0
5352oveq1i 5884 . . . . . . . 8  |-  ( (
-u ( K  x.  M )  +  ( K  x.  M ) )  +  N )  =  ( 0  +  N )
5450, 49, 16addassi 8861 . . . . . . . 8  |-  ( (
-u ( K  x.  M )  +  ( K  x.  M ) )  +  N )  =  ( -u ( K  x.  M )  +  ( ( K  x.  M )  +  N ) )
5516addid2i 9016 . . . . . . . 8  |-  ( 0  +  N )  =  N
5653, 54, 553eqtr3i 2324 . . . . . . 7  |-  ( -u ( K  x.  M
)  +  ( ( K  x.  M )  +  N ) )  =  N
5748, 56eqtri 2316 . . . . . 6  |-  ( (
-u K  x.  M
)  +  ( 1  x.  ( ( K  x.  M )  +  N ) ) )  =  N
5839, 57breqtri 4062 . . . . 5  |-  ( M  gcd  ( ( K  x.  M )  +  N ) )  ||  N
59 dvdslegcd 12711 . . . . . . 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 ) ) )
6059ex 423 . . . . . 6  |-  ( ( ( 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 ) ) ) )
6133, 1, 2, 60mp3an 1277 . . . . 5  |-  ( -.  ( 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 ) ) )
6230, 58, 61mp2ani 659 . . . 4  |-  ( -.  ( M  =  0  /\  N  =  0 )  ->  ( M  gcd  ( ( K  x.  M )  +  N
) )  <_  ( M  gcd  N ) )
6327, 62anim12i 549 . . 3  |-  ( ( -.  ( 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
) ) )
648zrei 10046 . . . 4  |-  ( M  gcd  N )  e.  RR
6533zrei 10046 . . . 4  |-  ( M  gcd  ( ( K  x.  M )  +  N ) )  e.  RR
6664, 65letri3i 8950 . . 3  |-  ( ( 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
) ) )
6763, 66sylibr 203 . 2  |-  ( ( -.  ( M  =  0  /\  ( ( K  x.  M )  +  N )  =  0 )  /\  -.  ( M  =  0  /\  N  =  0
) )  ->  ( M  gcd  N )  =  ( M  gcd  (
( K  x.  M
)  +  N ) ) )
68 pm4.57 483 . . 3  |-  ( -.  ( -.  ( M  =  0  /\  (
( K  x.  M
)  +  N )  =  0 )  /\  -.  ( M  =  0  /\  N  =  0 ) )  <->  ( ( M  =  0  /\  ( ( K  x.  M )  +  N
)  =  0 )  \/  ( M  =  0  /\  N  =  0 ) ) )
69 oveq2 5882 . . . . . . . . . 10  |-  ( M  =  0  ->  ( K  x.  M )  =  ( K  x.  0 ) )
7041mul01i 9018 . . . . . . . . . 10  |-  ( K  x.  0 )  =  0
7169, 70syl6eq 2344 . . . . . . . . 9  |-  ( M  =  0  ->  ( K  x.  M )  =  0 )
7271oveq1d 5889 . . . . . . . 8  |-  ( M  =  0  ->  (
( K  x.  M
)  +  N )  =  ( 0  +  N ) )
7372, 55syl6eq 2344 . . . . . . 7  |-  ( M  =  0  ->  (
( K  x.  M
)  +  N )  =  N )
7473eqeq1d 2304 . . . . . 6  |-  ( M  =  0  ->  (
( ( K  x.  M )  +  N
)  =  0  <->  N  =  0 ) )
7574pm5.32i 618 . . . . 5  |-  ( ( M  =  0  /\  ( ( K  x.  M )  +  N
)  =  0 )  <-> 
( M  =  0  /\  N  =  0 ) )
76 oveq12 5883 . . . . . 6  |-  ( ( M  =  0  /\  N  =  0 )  ->  ( M  gcd  N )  =  ( 0  gcd  0 ) )
77 oveq12 5883 . . . . . . 7  |-  ( ( M  =  0  /\  ( ( K  x.  M )  +  N
)  =  0 )  ->  ( M  gcd  ( ( K  x.  M )  +  N
) )  =  ( 0  gcd  0 ) )
7875, 77sylbir 204 . . . . . 6  |-  ( ( M  =  0  /\  N  =  0 )  ->  ( M  gcd  ( ( K  x.  M )  +  N
) )  =  ( 0  gcd  0 ) )
7976, 78eqtr4d 2331 . . . . 5  |-  ( ( M  =  0  /\  N  =  0 )  ->  ( M  gcd  N )  =  ( M  gcd  ( ( K  x.  M )  +  N ) ) )
8075, 79sylbi 187 . . . 4  |-  ( ( M  =  0  /\  ( ( K  x.  M )  +  N
)  =  0 )  ->  ( M  gcd  N )  =  ( M  gcd  ( ( K  x.  M )  +  N ) ) )
8180, 79jaoi 368 . . 3  |-  ( ( ( M  =  0  /\  ( ( K  x.  M )  +  N )  =  0 )  \/  ( M  =  0  /\  N  =  0 ) )  ->  ( M  gcd  N )  =  ( M  gcd  ( ( K  x.  M )  +  N ) ) )
8268, 81sylbi 187 . 2  |-  ( -.  ( -.  ( M  =  0  /\  (
( K  x.  M
)  +  N )  =  0 )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  ( M  gcd  N )  =  ( M  gcd  (
( K  x.  M
)  +  N ) ) )
8367, 82pm2.61i 156 1  |-  ( M  gcd  N )  =  ( M  gcd  (
( K  x.  M
)  +  N ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    \/ wo 357    /\ wa 358    /\ w3a 934    = wceq 1632    e. wcel 1696   class class class wbr 4039  (class class class)co 5874   CCcc 8751   0cc0 8753   1c1 8754    + caddc 8756    x. cmul 8758    <_ cle 8884   -ucneg 9054   NN0cn0 9981   ZZcz 10040    || cdivides 12547    gcd cgcd 12701
This theorem is referenced by:  gcdaddm  12724
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1536  ax-5 1547  ax-17 1606  ax-9 1644  ax-8 1661  ax-13 1698  ax-14 1700  ax-6 1715  ax-7 1720  ax-11 1727  ax-12 1878  ax-ext 2277  ax-sep 4157  ax-nul 4165  ax-pow 4204  ax-pr 4230  ax-un 4528  ax-cnex 8809  ax-resscn 8810  ax-1cn 8811  ax-icn 8812  ax-addcl 8813  ax-addrcl 8814  ax-mulcl 8815  ax-mulrcl 8816  ax-mulcom 8817  ax-addass 8818  ax-mulass 8819  ax-distr 8820  ax-i2m1 8821  ax-1ne0 8822  ax-1rid 8823  ax-rnegex 8824  ax-rrecex 8825  ax-cnre 8826  ax-pre-lttri 8827  ax-pre-lttrn 8828  ax-pre-ltadd 8829  ax-pre-mulgt0 8830  ax-pre-sup 8831
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 935  df-3an 936  df-tru 1310  df-ex 1532  df-nf 1535  df-sb 1639  df-eu 2160  df-mo 2161  df-clab 2283  df-cleq 2289  df-clel 2292  df-nfc 2421  df-ne 2461  df-nel 2462  df-ral 2561  df-rex 2562  df-reu 2563  df-rmo 2564  df-rab 2565  df-v 2803  df-sbc 3005  df-csb 3095  df-dif 3168  df-un 3170  df-in 3172  df-ss 3179  df-pss 3181  df-nul 3469  df-if 3579  df-pw 3640  df-sn 3659  df-pr 3660  df-tp 3661  df-op 3662  df-uni 3844  df-iun 3923  df-br 4040  df-opab 4094  df-mpt 4095  df-tr 4130  df-eprel 4321  df-id 4325  df-po 4330  df-so 4331  df-fr 4368  df-we 4370  df-ord 4411  df-on 4412  df-lim 4413  df-suc 4414  df-om 4673  df-xp 4711  df-rel 4712  df-cnv 4713  df-co 4714  df-dm 4715  df-rn 4716  df-res 4717  df-ima 4718  df-iota 5235  df-fun 5273  df-fn 5274  df-f 5275  df-f1 5276  df-fo 5277  df-f1o 5278  df-fv 5279  df-ov 5877  df-oprab 5878  df-mpt2 5879  df-2nd 6139  df-riota 6320  df-recs 6404  df-rdg 6439  df-er 6676  df-en 6880  df-dom 6881  df-sdom 6882  df-sup 7210  df-pnf 8885  df-mnf 8886  df-xr 8887  df-ltxr 8888  df-le 8889  df-sub 9055  df-neg 9056  df-div 9440  df-nn 9763  df-2 9820  df-3 9821  df-n0 9982  df-z 10041  df-uz 10247  df-rp 10371  df-seq 11063  df-exp 11121  df-cj 11600  df-re 11601  df-im 11602  df-sqr 11736  df-abs 11737  df-dvds 12548  df-gcd 12702
  Copyright terms: Public domain W3C validator