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

Theorem gcdaddmlem 13028
Description: Lemma for gcdaddm 13029. (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 13015 . . . . . . 7  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( M  gcd  N )  ||  M  /\  ( M  gcd  N ) 
||  N ) )
41, 2, 3mp2an 654 . . . . . 6  |-  ( ( M  gcd  N ) 
||  M  /\  ( M  gcd  N )  ||  N )
54simpli 445 . . . . 5  |-  ( M  gcd  N )  ||  M
6 gcdcl 13017 . . . . . . . . . 10  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  N
)  e.  NN0 )
71, 2, 6mp2an 654 . . . . . . . . 9  |-  ( M  gcd  N )  e. 
NN0
87nn0zi 10306 . . . . . . . 8  |-  ( M  gcd  N )  e.  ZZ
9 gcdaddmlem.1 . . . . . . . . 9  |-  K  e.  ZZ
10 1z 10311 . . . . . . . . 9  |-  1  e.  ZZ
11 dvds2ln 12880 . . . . . . . . 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 664 . . . . . . . 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 1279 . . . . . . 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 10287 . . . . . . . . 9  |-  ( N  e.  ZZ  ->  N  e.  CC )
162, 15ax-mp 8 . . . . . . . 8  |-  N  e.  CC
1716mulid2i 9093 . . . . . . 7  |-  ( 1  x.  N )  =  N
1817oveq2i 6092 . . . . . 6  |-  ( ( K  x.  M )  +  ( 1  x.  N ) )  =  ( ( K  x.  M )  +  N
)
1914, 18breqtri 4235 . . . . 5  |-  ( M  gcd  N )  ||  ( ( K  x.  M )  +  N
)
20 zmulcl 10324 . . . . . . . 8  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ )  ->  ( K  x.  M
)  e.  ZZ )
219, 1, 20mp2an 654 . . . . . . 7  |-  ( K  x.  M )  e.  ZZ
22 zaddcl 10317 . . . . . . 7  |-  ( ( ( K  x.  M
)  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( K  x.  M )  +  N
)  e.  ZZ )
2321, 2, 22mp2an 654 . . . . . 6  |-  ( ( K  x.  M )  +  N )  e.  ZZ
24 dvdslegcd 13016 . . . . . . 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 424 . . . . . 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 1279 . . . . 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 660 . . . 4  |-  ( -.  ( M  =  0  /\  ( ( K  x.  M )  +  N )  =  0 )  ->  ( M  gcd  N )  <_  ( M  gcd  ( ( K  x.  M )  +  N ) ) )
28 gcddvds 13015 . . . . . . 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 654 . . . . . 6  |-  ( ( M  gcd  ( ( K  x.  M )  +  N ) ) 
||  M  /\  ( M  gcd  ( ( K  x.  M )  +  N ) )  ||  ( ( K  x.  M )  +  N
) )
3029simpli 445 . . . . 5  |-  ( M  gcd  ( ( K  x.  M )  +  N ) )  ||  M
31 gcdcl 13017 . . . . . . . . . 10  |-  ( ( M  e.  ZZ  /\  ( ( K  x.  M )  +  N
)  e.  ZZ )  ->  ( M  gcd  ( ( K  x.  M )  +  N
) )  e.  NN0 )
321, 23, 31mp2an 654 . . . . . . . . 9  |-  ( M  gcd  ( ( K  x.  M )  +  N ) )  e. 
NN0
3332nn0zi 10306 . . . . . . . 8  |-  ( M  gcd  ( ( K  x.  M )  +  N ) )  e.  ZZ
34 znegcl 10313 . . . . . . . . . 10  |-  ( K  e.  ZZ  ->  -u K  e.  ZZ )
359, 34ax-mp 8 . . . . . . . . 9  |-  -u K  e.  ZZ
36 dvds2ln 12880 . . . . . . . . 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 664 . . . . . . . 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 1279 . . . . . . 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 10287 . . . . . . . . . 10  |-  ( K  e.  ZZ  ->  K  e.  CC )
419, 40ax-mp 8 . . . . . . . . 9  |-  K  e.  CC
42 zcn 10287 . . . . . . . . . 10  |-  ( M  e.  ZZ  ->  M  e.  CC )
431, 42ax-mp 8 . . . . . . . . 9  |-  M  e.  CC
4441, 43mulneg1i 9479 . . . . . . . 8  |-  ( -u K  x.  M )  =  -u ( K  x.  M )
45 zcn 10287 . . . . . . . . . 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 9093 . . . . . . . 8  |-  ( 1  x.  ( ( K  x.  M )  +  N ) )  =  ( ( K  x.  M )  +  N
)
4844, 47oveq12i 6093 . . . . . . 7  |-  ( (
-u K  x.  M
)  +  ( 1  x.  ( ( K  x.  M )  +  N ) ) )  =  ( -u ( K  x.  M )  +  ( ( K  x.  M )  +  N ) )
4941, 43mulcli 9095 . . . . . . . . . 10  |-  ( K  x.  M )  e.  CC
5049negcli 9368 . . . . . . . . . 10  |-  -u ( K  x.  M )  e.  CC
5149negidi 9369 . . . . . . . . . 10  |-  ( ( K  x.  M )  +  -u ( K  x.  M ) )  =  0
5249, 50, 51addcomli 9258 . . . . . . . . 9  |-  ( -u ( K  x.  M
)  +  ( K  x.  M ) )  =  0
5352oveq1i 6091 . . . . . . . 8  |-  ( (
-u ( K  x.  M )  +  ( K  x.  M ) )  +  N )  =  ( 0  +  N )
5450, 49, 16addassi 9098 . . . . . . . 8  |-  ( (
-u ( K  x.  M )  +  ( K  x.  M ) )  +  N )  =  ( -u ( K  x.  M )  +  ( ( K  x.  M )  +  N ) )
5516addid2i 9254 . . . . . . . 8  |-  ( 0  +  N )  =  N
5653, 54, 553eqtr3i 2464 . . . . . . 7  |-  ( -u ( K  x.  M
)  +  ( ( K  x.  M )  +  N ) )  =  N
5748, 56eqtri 2456 . . . . . 6  |-  ( (
-u K  x.  M
)  +  ( 1  x.  ( ( K  x.  M )  +  N ) ) )  =  N
5839, 57breqtri 4235 . . . . 5  |-  ( M  gcd  ( ( K  x.  M )  +  N ) )  ||  N
59 dvdslegcd 13016 . . . . . . 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 424 . . . . . 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 1279 . . . . 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 660 . . . 4  |-  ( -.  ( M  =  0  /\  N  =  0 )  ->  ( M  gcd  ( ( K  x.  M )  +  N
) )  <_  ( M  gcd  N ) )
6327, 62anim12i 550 . . 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 10288 . . . 4  |-  ( M  gcd  N )  e.  RR
6533zrei 10288 . . . 4  |-  ( M  gcd  ( ( K  x.  M )  +  N ) )  e.  RR
6664, 65letri3i 9189 . . 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 204 . 2  |-  ( ( -.  ( M  =  0  /\  ( ( K  x.  M )  +  N )  =  0 )  /\  -.  ( M  =  0  /\  N  =  0
) )  ->  ( M  gcd  N )  =  ( M  gcd  (
( K  x.  M
)  +  N ) ) )
68 pm4.57 484 . . 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 6089 . . . . . . . . . 10  |-  ( M  =  0  ->  ( K  x.  M )  =  ( K  x.  0 ) )
7041mul01i 9256 . . . . . . . . . 10  |-  ( K  x.  0 )  =  0
7169, 70syl6eq 2484 . . . . . . . . 9  |-  ( M  =  0  ->  ( K  x.  M )  =  0 )
7271oveq1d 6096 . . . . . . . 8  |-  ( M  =  0  ->  (
( K  x.  M
)  +  N )  =  ( 0  +  N ) )
7372, 55syl6eq 2484 . . . . . . 7  |-  ( M  =  0  ->  (
( K  x.  M
)  +  N )  =  N )
7473eqeq1d 2444 . . . . . 6  |-  ( M  =  0  ->  (
( ( K  x.  M )  +  N
)  =  0  <->  N  =  0 ) )
7574pm5.32i 619 . . . . 5  |-  ( ( M  =  0  /\  ( ( K  x.  M )  +  N
)  =  0 )  <-> 
( M  =  0  /\  N  =  0 ) )
76 oveq12 6090 . . . . . 6  |-  ( ( M  =  0  /\  N  =  0 )  ->  ( M  gcd  N )  =  ( 0  gcd  0 ) )
77 oveq12 6090 . . . . . . 7  |-  ( ( M  =  0  /\  ( ( K  x.  M )  +  N
)  =  0 )  ->  ( M  gcd  ( ( K  x.  M )  +  N
) )  =  ( 0  gcd  0 ) )
7875, 77sylbir 205 . . . . . 6  |-  ( ( M  =  0  /\  N  =  0 )  ->  ( M  gcd  ( ( K  x.  M )  +  N
) )  =  ( 0  gcd  0 ) )
7976, 78eqtr4d 2471 . . . . 5  |-  ( ( M  =  0  /\  N  =  0 )  ->  ( M  gcd  N )  =  ( M  gcd  ( ( K  x.  M )  +  N ) ) )
8075, 79sylbi 188 . . . 4  |-  ( ( M  =  0  /\  ( ( K  x.  M )  +  N
)  =  0 )  ->  ( M  gcd  N )  =  ( M  gcd  ( ( K  x.  M )  +  N ) ) )
8180, 79jaoi 369 . . 3  |-  ( ( ( M  =  0  /\  ( ( K  x.  M )  +  N )  =  0 )  \/  ( M  =  0  /\  N  =  0 ) )  ->  ( M  gcd  N )  =  ( M  gcd  ( ( K  x.  M )  +  N ) ) )
8268, 81sylbi 188 . 2  |-  ( -.  ( -.  ( M  =  0  /\  (
( K  x.  M
)  +  N )  =  0 )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  ( M  gcd  N )  =  ( M  gcd  (
( K  x.  M
)  +  N ) ) )
8367, 82pm2.61i 158 1  |-  ( M  gcd  N )  =  ( M  gcd  (
( K  x.  M
)  +  N ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    \/ wo 358    /\ wa 359    /\ w3a 936    = wceq 1652    e. wcel 1725   class class class wbr 4212  (class class class)co 6081   CCcc 8988   0cc0 8990   1c1 8991    + caddc 8993    x. cmul 8995    <_ cle 9121   -ucneg 9292   NN0cn0 10221   ZZcz 10282    || cdivides 12852    gcd cgcd 13006
This theorem is referenced by:  gcdaddm  13029
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1555  ax-5 1566  ax-17 1626  ax-9 1666  ax-8 1687  ax-13 1727  ax-14 1729  ax-6 1744  ax-7 1749  ax-11 1761  ax-12 1950  ax-ext 2417  ax-sep 4330  ax-nul 4338  ax-pow 4377  ax-pr 4403  ax-un 4701  ax-cnex 9046  ax-resscn 9047  ax-1cn 9048  ax-icn 9049  ax-addcl 9050  ax-addrcl 9051  ax-mulcl 9052  ax-mulrcl 9053  ax-mulcom 9054  ax-addass 9055  ax-mulass 9056  ax-distr 9057  ax-i2m1 9058  ax-1ne0 9059  ax-1rid 9060  ax-rnegex 9061  ax-rrecex 9062  ax-cnre 9063  ax-pre-lttri 9064  ax-pre-lttrn 9065  ax-pre-ltadd 9066  ax-pre-mulgt0 9067  ax-pre-sup 9068
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1328  df-ex 1551  df-nf 1554  df-sb 1659  df-eu 2285  df-mo 2286  df-clab 2423  df-cleq 2429  df-clel 2432  df-nfc 2561  df-ne 2601  df-nel 2602  df-ral 2710  df-rex 2711  df-reu 2712  df-rmo 2713  df-rab 2714  df-v 2958  df-sbc 3162  df-csb 3252  df-dif 3323  df-un 3325  df-in 3327  df-ss 3334  df-pss 3336  df-nul 3629  df-if 3740  df-pw 3801  df-sn 3820  df-pr 3821  df-tp 3822  df-op 3823  df-uni 4016  df-iun 4095  df-br 4213  df-opab 4267  df-mpt 4268  df-tr 4303  df-eprel 4494  df-id 4498  df-po 4503  df-so 4504  df-fr 4541  df-we 4543  df-ord 4584  df-on 4585  df-lim 4586  df-suc 4587  df-om 4846  df-xp 4884  df-rel 4885  df-cnv 4886  df-co 4887  df-dm 4888  df-rn 4889  df-res 4890  df-ima 4891  df-iota 5418  df-fun 5456  df-fn 5457  df-f 5458  df-f1 5459  df-fo 5460  df-f1o 5461  df-fv 5462  df-ov 6084  df-oprab 6085  df-mpt2 6086  df-2nd 6350  df-riota 6549  df-recs 6633  df-rdg 6668  df-er 6905  df-en 7110  df-dom 7111  df-sdom 7112  df-sup 7446  df-pnf 9122  df-mnf 9123  df-xr 9124  df-ltxr 9125  df-le 9126  df-sub 9293  df-neg 9294  df-div 9678  df-nn 10001  df-2 10058  df-3 10059  df-n0 10222  df-z 10283  df-uz 10489  df-rp 10613  df-seq 11324  df-exp 11383  df-cj 11904  df-re 11905  df-im 11906  df-sqr 12040  df-abs 12041  df-dvds 12853  df-gcd 13007
  Copyright terms: Public domain W3C validator