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

Theorem dvdssub2 12774
Description: If an integer divides a difference, then it divides one term iff it divides the other. (Contributed by Mario Carneiro, 13-Jul-2014.)
Assertion
Ref Expression
dvdssub2  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  K  ||  ( M  -  N ) )  ->  ( K  ||  M 
<->  K  ||  N ) )

Proof of Theorem dvdssub2
StepHypRef Expression
1 zsubcl 10212 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  -  N
)  e.  ZZ )
213adant1 974 . . . . . . 7  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  -  N )  e.  ZZ )
3 dvds2sub 12769 . . . . . . 7  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  ( M  -  N )  e.  ZZ )  ->  (
( K  ||  M  /\  K  ||  ( M  -  N ) )  ->  K  ||  ( M  -  ( M  -  N ) ) ) )
42, 3syld3an3 1228 . . . . . 6  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( K  ||  M  /\  K  ||  ( M  -  N ) )  ->  K  ||  ( M  -  ( M  -  N ) ) ) )
54ancomsd 440 . . . . 5  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( K  ||  ( M  -  N )  /\  K  ||  M )  ->  K  ||  ( M  -  ( M  -  N ) ) ) )
65imp 418 . . . 4  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  ( K  ||  ( M  -  N )  /\  K  ||  M ) )  ->  K  ||  ( M  -  ( M  -  N ) ) )
7 zcn 10180 . . . . . . 7  |-  ( M  e.  ZZ  ->  M  e.  CC )
8 zcn 10180 . . . . . . 7  |-  ( N  e.  ZZ  ->  N  e.  CC )
9 nncan 9223 . . . . . . 7  |-  ( ( M  e.  CC  /\  N  e.  CC )  ->  ( M  -  ( M  -  N )
)  =  N )
107, 8, 9syl2an 463 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  -  ( M  -  N )
)  =  N )
11103adant1 974 . . . . 5  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  -  ( M  -  N ) )  =  N )
1211adantr 451 . . . 4  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  ( K  ||  ( M  -  N )  /\  K  ||  M ) )  ->  ( M  -  ( M  -  N ) )  =  N )
136, 12breqtrd 4149 . . 3  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  ( K  ||  ( M  -  N )  /\  K  ||  M ) )  ->  K  ||  N
)
1413expr 598 . 2  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  K  ||  ( M  -  N ) )  ->  ( K  ||  M  ->  K  ||  N
) )
15 dvds2add 12768 . . . . . 6  |-  ( ( K  e.  ZZ  /\  ( M  -  N
)  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( K  ||  ( M  -  N
)  /\  K  ||  N
)  ->  K  ||  (
( M  -  N
)  +  N ) ) )
162, 15syld3an2 1230 . . . . 5  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( K  ||  ( M  -  N )  /\  K  ||  N )  ->  K  ||  (
( M  -  N
)  +  N ) ) )
1716imp 418 . . . 4  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  ( K  ||  ( M  -  N )  /\  K  ||  N ) )  ->  K  ||  (
( M  -  N
)  +  N ) )
18 npcan 9207 . . . . . . 7  |-  ( ( M  e.  CC  /\  N  e.  CC )  ->  ( ( M  -  N )  +  N
)  =  M )
197, 8, 18syl2an 463 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( M  -  N )  +  N
)  =  M )
20193adant1 974 . . . . 5  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( M  -  N
)  +  N )  =  M )
2120adantr 451 . . . 4  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  ( K  ||  ( M  -  N )  /\  K  ||  N ) )  ->  ( ( M  -  N )  +  N )  =  M )
2217, 21breqtrd 4149 . . 3  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  ( K  ||  ( M  -  N )  /\  K  ||  N ) )  ->  K  ||  M
)
2322expr 598 . 2  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  K  ||  ( M  -  N ) )  ->  ( K  ||  N  ->  K  ||  M
) )
2414, 23impbid 183 1  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  K  ||  ( M  -  N ) )  ->  ( K  ||  M 
<->  K  ||  N ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    <-> wb 176    /\ wa 358    /\ w3a 935    = wceq 1647    e. wcel 1715   class class class wbr 4125  (class class class)co 5981   CCcc 8882    + caddc 8887    - cmin 9184   ZZcz 10175    || cdivides 12739
This theorem is referenced by:  dvdsadd  12775  3dvds  12799  bitsmod  12835  bitsinv1lem  12840  sylow2blem3  15143  znunit  16734  perfectlem1  20691  lgsqr  20808  2sqlem8  20834  jm2.20nn  26596
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1551  ax-5 1562  ax-17 1621  ax-9 1659  ax-8 1680  ax-13 1717  ax-14 1719  ax-6 1734  ax-7 1739  ax-11 1751  ax-12 1937  ax-ext 2347  ax-sep 4243  ax-nul 4251  ax-pow 4290  ax-pr 4316  ax-un 4615  ax-resscn 8941  ax-1cn 8942  ax-icn 8943  ax-addcl 8944  ax-addrcl 8945  ax-mulcl 8946  ax-mulrcl 8947  ax-mulcom 8948  ax-addass 8949  ax-mulass 8950  ax-distr 8951  ax-i2m1 8952  ax-1ne0 8953  ax-1rid 8954  ax-rnegex 8955  ax-rrecex 8956  ax-cnre 8957  ax-pre-lttri 8958  ax-pre-lttrn 8959  ax-pre-ltadd 8960  ax-pre-mulgt0 8961
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 936  df-3an 937  df-tru 1324  df-ex 1547  df-nf 1550  df-sb 1654  df-eu 2221  df-mo 2222  df-clab 2353  df-cleq 2359  df-clel 2362  df-nfc 2491  df-ne 2531  df-nel 2532  df-ral 2633  df-rex 2634  df-reu 2635  df-rab 2637  df-v 2875  df-sbc 3078  df-csb 3168  df-dif 3241  df-un 3243  df-in 3245  df-ss 3252  df-pss 3254  df-nul 3544  df-if 3655  df-pw 3716  df-sn 3735  df-pr 3736  df-tp 3737  df-op 3738  df-uni 3930  df-iun 4009  df-br 4126  df-opab 4180  df-mpt 4181  df-tr 4216  df-eprel 4408  df-id 4412  df-po 4417  df-so 4418  df-fr 4455  df-we 4457  df-ord 4498  df-on 4499  df-lim 4500  df-suc 4501  df-om 4760  df-xp 4798  df-rel 4799  df-cnv 4800  df-co 4801  df-dm 4802  df-rn 4803  df-res 4804  df-ima 4805  df-iota 5322  df-fun 5360  df-fn 5361  df-f 5362  df-f1 5363  df-fo 5364  df-f1o 5365  df-fv 5366  df-ov 5984  df-oprab 5985  df-mpt2 5986  df-riota 6446  df-recs 6530  df-rdg 6565  df-er 6802  df-en 7007  df-dom 7008  df-sdom 7009  df-pnf 9016  df-mnf 9017  df-xr 9018  df-ltxr 9019  df-le 9020  df-sub 9186  df-neg 9187  df-nn 9894  df-n0 10115  df-z 10176  df-dvds 12740
  Copyright terms: Public domain W3C validator