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

Theorem dvdssub2 12892
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 10324 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  -  N
)  e.  ZZ )
213adant1 976 . . . . . . 7  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  -  N )  e.  ZZ )
3 dvds2sub 12887 . . . . . . 7  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  ( M  -  N )  e.  ZZ )  ->  (
( K  ||  M  /\  K  ||  ( M  -  N ) )  ->  K  ||  ( M  -  ( M  -  N ) ) ) )
42, 3syld3an3 1230 . . . . . 6  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( K  ||  M  /\  K  ||  ( M  -  N ) )  ->  K  ||  ( M  -  ( M  -  N ) ) ) )
54ancomsd 442 . . . . 5  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( K  ||  ( M  -  N )  /\  K  ||  M )  ->  K  ||  ( M  -  ( M  -  N ) ) ) )
65imp 420 . . . 4  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  ( K  ||  ( M  -  N )  /\  K  ||  M ) )  ->  K  ||  ( M  -  ( M  -  N ) ) )
7 zcn 10292 . . . . . . 7  |-  ( M  e.  ZZ  ->  M  e.  CC )
8 zcn 10292 . . . . . . 7  |-  ( N  e.  ZZ  ->  N  e.  CC )
9 nncan 9335 . . . . . . 7  |-  ( ( M  e.  CC  /\  N  e.  CC )  ->  ( M  -  ( M  -  N )
)  =  N )
107, 8, 9syl2an 465 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  -  ( M  -  N )
)  =  N )
11103adant1 976 . . . . 5  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  -  ( M  -  N ) )  =  N )
1211adantr 453 . . . 4  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  ( K  ||  ( M  -  N )  /\  K  ||  M ) )  ->  ( M  -  ( M  -  N ) )  =  N )
136, 12breqtrd 4239 . . 3  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  ( K  ||  ( M  -  N )  /\  K  ||  M ) )  ->  K  ||  N
)
1413expr 600 . 2  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  K  ||  ( M  -  N ) )  ->  ( K  ||  M  ->  K  ||  N
) )
15 dvds2add 12886 . . . . . 6  |-  ( ( K  e.  ZZ  /\  ( M  -  N
)  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( K  ||  ( M  -  N
)  /\  K  ||  N
)  ->  K  ||  (
( M  -  N
)  +  N ) ) )
162, 15syld3an2 1232 . . . . 5  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( K  ||  ( M  -  N )  /\  K  ||  N )  ->  K  ||  (
( M  -  N
)  +  N ) ) )
1716imp 420 . . . 4  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  ( K  ||  ( M  -  N )  /\  K  ||  N ) )  ->  K  ||  (
( M  -  N
)  +  N ) )
18 npcan 9319 . . . . . . 7  |-  ( ( M  e.  CC  /\  N  e.  CC )  ->  ( ( M  -  N )  +  N
)  =  M )
197, 8, 18syl2an 465 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( M  -  N )  +  N
)  =  M )
20193adant1 976 . . . . 5  |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  (
( M  -  N
)  +  N )  =  M )
2120adantr 453 . . . 4  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  ( K  ||  ( M  -  N )  /\  K  ||  N ) )  ->  ( ( M  -  N )  +  N )  =  M )
2217, 21breqtrd 4239 . . 3  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  ( K  ||  ( M  -  N )  /\  K  ||  N ) )  ->  K  ||  M
)
2322expr 600 . 2  |-  ( ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  K  ||  ( M  -  N ) )  ->  ( K  ||  N  ->  K  ||  M
) )
2414, 23impbid 185 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 178    /\ wa 360    /\ w3a 937    = wceq 1653    e. wcel 1726   class class class wbr 4215  (class class class)co 6084   CCcc 8993    + caddc 8998    - cmin 9296   ZZcz 10287    || cdivides 12857
This theorem is referenced by:  dvdsadd  12893  3dvds  12917  bitsmod  12953  bitsinv1lem  12958  sylow2blem3  15261  znunit  16849  perfectlem1  21018  lgsqr  21135  2sqlem8  21161  jm2.20nn  27082
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1556  ax-5 1567  ax-17 1627  ax-9 1667  ax-8 1688  ax-13 1728  ax-14 1730  ax-6 1745  ax-7 1750  ax-11 1762  ax-12 1951  ax-ext 2419  ax-sep 4333  ax-nul 4341  ax-pow 4380  ax-pr 4406  ax-un 4704  ax-resscn 9052  ax-1cn 9053  ax-icn 9054  ax-addcl 9055  ax-addrcl 9056  ax-mulcl 9057  ax-mulrcl 9058  ax-mulcom 9059  ax-addass 9060  ax-mulass 9061  ax-distr 9062  ax-i2m1 9063  ax-1ne0 9064  ax-1rid 9065  ax-rnegex 9066  ax-rrecex 9067  ax-cnre 9068  ax-pre-lttri 9069  ax-pre-lttrn 9070  ax-pre-ltadd 9071  ax-pre-mulgt0 9072
This theorem depends on definitions:  df-bi 179  df-or 361  df-an 362  df-3or 938  df-3an 939  df-tru 1329  df-ex 1552  df-nf 1555  df-sb 1660  df-eu 2287  df-mo 2288  df-clab 2425  df-cleq 2431  df-clel 2434  df-nfc 2563  df-ne 2603  df-nel 2604  df-ral 2712  df-rex 2713  df-reu 2714  df-rab 2716  df-v 2960  df-sbc 3164  df-csb 3254  df-dif 3325  df-un 3327  df-in 3329  df-ss 3336  df-pss 3338  df-nul 3631  df-if 3742  df-pw 3803  df-sn 3822  df-pr 3823  df-tp 3824  df-op 3825  df-uni 4018  df-iun 4097  df-br 4216  df-opab 4270  df-mpt 4271  df-tr 4306  df-eprel 4497  df-id 4501  df-po 4506  df-so 4507  df-fr 4544  df-we 4546  df-ord 4587  df-on 4588  df-lim 4589  df-suc 4590  df-om 4849  df-xp 4887  df-rel 4888  df-cnv 4889  df-co 4890  df-dm 4891  df-rn 4892  df-res 4893  df-ima 4894  df-iota 5421  df-fun 5459  df-fn 5460  df-f 5461  df-f1 5462  df-fo 5463  df-f1o 5464  df-fv 5465  df-ov 6087  df-oprab 6088  df-mpt2 6089  df-riota 6552  df-recs 6636  df-rdg 6671  df-er 6908  df-en 7113  df-dom 7114  df-sdom 7115  df-pnf 9127  df-mnf 9128  df-xr 9129  df-ltxr 9130  df-le 9131  df-sub 9298  df-neg 9299  df-nn 10006  df-n0 10227  df-z 10288  df-dvds 12858
  Copyright terms: Public domain W3C validator