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

Theorem gcdaddmlem 12707
Description: Lemma for gcdaddm 12708. (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 12694 . . . . . . 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 12696 . . . . . . . . . 10  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  N
)  e.  NN0 )
71, 2, 6mp2an 653 . . . . . . . . 9  |-  ( M  gcd  N )  e. 
NN0
87nn0zi 10048 . . . . . . . 8  |-  ( M  gcd  N )  e.  ZZ
9 gcdaddmlem.1 . . . . . . . . 9  |-  K  e.  ZZ
10 1z 10053 . . . . . . . . 9  |-  1  e.  ZZ
11 dvds2ln 12559 . . . . . . . . 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 10029 . . . . . . . . 9  |-  ( N  e.  ZZ  ->  N  e.  CC )
162, 15ax-mp 8 . . . . . . . 8  |-  N  e.  CC
1716mulid2i 8840 . . . . . . 7  |-  ( 1  x.  N )  =  N
1817oveq2i 5869 . . . . . 6  |-  ( ( K  x.  M )  +  ( 1  x.  N ) )  =  ( ( K  x.  M )  +  N
)
1914, 18breqtri 4046 . . . . 5  |-  ( M  gcd  N )  ||  ( ( K  x.  M )  +  N
)
20 zmulcl 10066 . . . . . . . 8  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ )  ->  ( K  x.  M
)  e.  ZZ )
219, 1, 20mp2an 653 . . . . . . 7  |-  ( K  x.  M )  e.  ZZ
22 zaddcl 10059 . . . . . . 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 12695 . . . . . . 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 12694 . . . . . . 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 12696 . . . . . . . . . 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 10048 . . . . . . . 8  |-  ( M  gcd  ( ( K  x.  M )  +  N ) )  e.  ZZ
34 znegcl 10055 . . . . . . . . . 10  |-  ( K  e.  ZZ  ->  -u K  e.  ZZ )
359, 34ax-mp 8 . . . . . . . . 9  |-  -u K  e.  ZZ
36 dvds2ln 12559 . . . . . . . . 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 10029 . . . . . . . . . 10  |-  ( K  e.  ZZ  ->  K  e.  CC )
419, 40ax-mp 8 . . . . . . . . 9  |-  K  e.  CC
42 zcn 10029 . . . . . . . . . 10  |-  ( M  e.  ZZ  ->  M  e.  CC )
431, 42ax-mp 8 . . . . . . . . 9  |-  M  e.  CC
4441, 43mulneg1i 9225 . . . . . . . 8  |-  ( -u K  x.  M )  =  -u ( K  x.  M )
45 zcn 10029 . . . . . . . . . 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 8840 . . . . . . . 8  |-  ( 1  x.  ( ( K  x.  M )  +  N ) )  =  ( ( K  x.  M )  +  N
)
4844, 47oveq12i 5870 . . . . . . 7  |-  ( (
-u K  x.  M
)  +  ( 1  x.  ( ( K  x.  M )  +  N ) ) )  =  ( -u ( K  x.  M )  +  ( ( K  x.  M )  +  N ) )
4941, 43mulcli 8842 . . . . . . . . . 10  |-  ( K  x.  M )  e.  CC
5049negcli 9114 . . . . . . . . . 10  |-  -u ( K  x.  M )  e.  CC
5149negidi 9115 . . . . . . . . . 10  |-  ( ( K  x.  M )  +  -u ( K  x.  M ) )  =  0
5249, 50, 51addcomli 9004 . . . . . . . . 9  |-  ( -u ( K  x.  M
)  +  ( K  x.  M ) )  =  0
5352oveq1i 5868 . . . . . . . 8  |-  ( (
-u ( K  x.  M )  +  ( K  x.  M ) )  +  N )  =  ( 0  +  N )
5450, 49, 16addassi 8845 . . . . . . . 8  |-  ( (
-u ( K  x.  M )  +  ( K  x.  M ) )  +  N )  =  ( -u ( K  x.  M )  +  ( ( K  x.  M )  +  N ) )
5516addid2i 9000 . . . . . . . 8  |-  ( 0  +  N )  =  N
5653, 54, 553eqtr3i 2311 . . . . . . 7  |-  ( -u ( K  x.  M
)  +  ( ( K  x.  M )  +  N ) )  =  N
5748, 56eqtri 2303 . . . . . 6  |-  ( (
-u K  x.  M
)  +  ( 1  x.  ( ( K  x.  M )  +  N ) ) )  =  N
5839, 57breqtri 4046 . . . . 5  |-  ( M  gcd  ( ( K  x.  M )  +  N ) )  ||  N
59 dvdslegcd 12695 . . . . . . 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 10030 . . . 4  |-  ( M  gcd  N )  e.  RR
6533zrei 10030 . . . 4  |-  ( M  gcd  ( ( K  x.  M )  +  N ) )  e.  RR
6664, 65letri3i 8934 . . 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 5866 . . . . . . . . . 10  |-  ( M  =  0  ->  ( K  x.  M )  =  ( K  x.  0 ) )
7041mul01i 9002 . . . . . . . . . 10  |-  ( K  x.  0 )  =  0
7169, 70syl6eq 2331 . . . . . . . . 9  |-  ( M  =  0  ->  ( K  x.  M )  =  0 )
7271oveq1d 5873 . . . . . . . 8  |-  ( M  =  0  ->  (
( K  x.  M
)  +  N )  =  ( 0  +  N ) )
7372, 55syl6eq 2331 . . . . . . 7  |-  ( M  =  0  ->  (
( K  x.  M
)  +  N )  =  N )
7473eqeq1d 2291 . . . . . 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 5867 . . . . . 6  |-  ( ( M  =  0  /\  N  =  0 )  ->  ( M  gcd  N )  =  ( 0  gcd  0 ) )
77 oveq12 5867 . . . . . . 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 2318 . . . . 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 1623    e. wcel 1684   class class class wbr 4023  (class class class)co 5858   CCcc 8735   0cc0 8737   1c1 8738    + caddc 8740    x. cmul 8742    <_ cle 8868   -ucneg 9038   NN0cn0 9965   ZZcz 10024    || cdivides 12531    gcd cgcd 12685
This theorem is referenced by:  gcdaddm  12708
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1533  ax-5 1544  ax-17 1603  ax-9 1635  ax-8 1643  ax-13 1686  ax-14 1688  ax-6 1703  ax-7 1708  ax-11 1715  ax-12 1866  ax-ext 2264  ax-sep 4141  ax-nul 4149  ax-pow 4188  ax-pr 4214  ax-un 4512  ax-cnex 8793  ax-resscn 8794  ax-1cn 8795  ax-icn 8796  ax-addcl 8797  ax-addrcl 8798  ax-mulcl 8799  ax-mulrcl 8800  ax-mulcom 8801  ax-addass 8802  ax-mulass 8803  ax-distr 8804  ax-i2m1 8805  ax-1ne0 8806  ax-1rid 8807  ax-rnegex 8808  ax-rrecex 8809  ax-cnre 8810  ax-pre-lttri 8811  ax-pre-lttrn 8812  ax-pre-ltadd 8813  ax-pre-mulgt0 8814  ax-pre-sup 8815
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 1529  df-nf 1532  df-sb 1630  df-eu 2147  df-mo 2148  df-clab 2270  df-cleq 2276  df-clel 2279  df-nfc 2408  df-ne 2448  df-nel 2449  df-ral 2548  df-rex 2549  df-reu 2550  df-rmo 2551  df-rab 2552  df-v 2790  df-sbc 2992  df-csb 3082  df-dif 3155  df-un 3157  df-in 3159  df-ss 3166  df-pss 3168  df-nul 3456  df-if 3566  df-pw 3627  df-sn 3646  df-pr 3647  df-tp 3648  df-op 3649  df-uni 3828  df-iun 3907  df-br 4024  df-opab 4078  df-mpt 4079  df-tr 4114  df-eprel 4305  df-id 4309  df-po 4314  df-so 4315  df-fr 4352  df-we 4354  df-ord 4395  df-on 4396  df-lim 4397  df-suc 4398  df-om 4657  df-xp 4695  df-rel 4696  df-cnv 4697  df-co 4698  df-dm 4699  df-rn 4700  df-res 4701  df-ima 4702  df-iota 5219  df-fun 5257  df-fn 5258  df-f 5259  df-f1 5260  df-fo 5261  df-f1o 5262  df-fv 5263  df-ov 5861  df-oprab 5862  df-mpt2 5863  df-2nd 6123  df-riota 6304  df-recs 6388  df-rdg 6423  df-er 6660  df-en 6864  df-dom 6865  df-sdom 6866  df-sup 7194  df-pnf 8869  df-mnf 8870  df-xr 8871  df-ltxr 8872  df-le 8873  df-sub 9039  df-neg 9040  df-div 9424  df-nn 9747  df-2 9804  df-3 9805  df-n0 9966  df-z 10025  df-uz 10231  df-rp 10355  df-seq 11047  df-exp 11105  df-cj 11584  df-re 11585  df-im 11586  df-sqr 11720  df-abs 11721  df-dvds 12532  df-gcd 12686
  Copyright terms: Public domain W3C validator