ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  fsumdvds Unicode version

Theorem fsumdvds 12197
Description: If every term in a sum is divisible by  N, then so is the sum. (Contributed by Mario Carneiro, 17-Jan-2015.)
Hypotheses
Ref Expression
fsumdvds.1  |-  ( ph  ->  A  e.  Fin )
fsumdvds.2  |-  ( ph  ->  N  e.  ZZ )
fsumdvds.3  |-  ( (
ph  /\  k  e.  A )  ->  B  e.  ZZ )
fsumdvds.4  |-  ( (
ph  /\  k  e.  A )  ->  N  ||  B )
Assertion
Ref Expression
fsumdvds  |-  ( ph  ->  N  ||  sum_ k  e.  A  B )
Distinct variable groups:    A, k    k, N    ph, k
Allowed substitution hint:    B( k)

Proof of Theorem fsumdvds
Dummy variable  j is distinct from all other variables.
StepHypRef Expression
1 0z 9390 . . . 4  |-  0  e.  ZZ
2 dvds0 12161 . . . 4  |-  ( 0  e.  ZZ  ->  0  ||  0 )
31, 2mp1i 10 . . 3  |-  ( (
ph  /\  N  = 
0 )  ->  0  ||  0 )
4 simpr 110 . . 3  |-  ( (
ph  /\  N  = 
0 )  ->  N  =  0 )
5 simplr 528 . . . . . . 7  |-  ( ( ( ph  /\  N  =  0 )  /\  k  e.  A )  ->  N  =  0 )
6 fsumdvds.4 . . . . . . . 8  |-  ( (
ph  /\  k  e.  A )  ->  N  ||  B )
76adantlr 477 . . . . . . 7  |-  ( ( ( ph  /\  N  =  0 )  /\  k  e.  A )  ->  N  ||  B )
85, 7eqbrtrrd 4071 . . . . . 6  |-  ( ( ( ph  /\  N  =  0 )  /\  k  e.  A )  ->  0  ||  B )
9 fsumdvds.3 . . . . . . . 8  |-  ( (
ph  /\  k  e.  A )  ->  B  e.  ZZ )
109adantlr 477 . . . . . . 7  |-  ( ( ( ph  /\  N  =  0 )  /\  k  e.  A )  ->  B  e.  ZZ )
11 0dvds 12166 . . . . . . 7  |-  ( B  e.  ZZ  ->  (
0  ||  B  <->  B  = 
0 ) )
1210, 11syl 14 . . . . . 6  |-  ( ( ( ph  /\  N  =  0 )  /\  k  e.  A )  ->  ( 0  ||  B  <->  B  =  0 ) )
138, 12mpbid 147 . . . . 5  |-  ( ( ( ph  /\  N  =  0 )  /\  k  e.  A )  ->  B  =  0 )
1413sumeq2dv 11723 . . . 4  |-  ( (
ph  /\  N  = 
0 )  ->  sum_ k  e.  A  B  =  sum_ k  e.  A  0 )
15 fsumdvds.1 . . . . . . 7  |-  ( ph  ->  A  e.  Fin )
1615adantr 276 . . . . . 6  |-  ( (
ph  /\  N  = 
0 )  ->  A  e.  Fin )
1716olcd 736 . . . . 5  |-  ( (
ph  /\  N  = 
0 )  ->  (
( 0  e.  ZZ  /\  A  C_  ( ZZ>= ` 
0 )  /\  A. j  e.  ( ZZ>= ` 
0 )DECID  j  e.  A )  \/  A  e.  Fin ) )
18 isumz 11744 . . . . 5  |-  ( ( ( 0  e.  ZZ  /\  A  C_  ( ZZ>= ` 
0 )  /\  A. j  e.  ( ZZ>= ` 
0 )DECID  j  e.  A )  \/  A  e.  Fin )  ->  sum_ k  e.  A 
0  =  0 )
1917, 18syl 14 . . . 4  |-  ( (
ph  /\  N  = 
0 )  ->  sum_ k  e.  A  0  = 
0 )
2014, 19eqtrd 2239 . . 3  |-  ( (
ph  /\  N  = 
0 )  ->  sum_ k  e.  A  B  = 
0 )
213, 4, 203brtr4d 4079 . 2  |-  ( (
ph  /\  N  = 
0 )  ->  N  || 
sum_ k  e.  A  B )
2215adantr 276 . . . . 5  |-  ( (
ph  /\  N  =/=  0 )  ->  A  e.  Fin )
23 fsumdvds.2 . . . . . . 7  |-  ( ph  ->  N  e.  ZZ )
2423adantr 276 . . . . . 6  |-  ( (
ph  /\  N  =/=  0 )  ->  N  e.  ZZ )
2524zcnd 9503 . . . . 5  |-  ( (
ph  /\  N  =/=  0 )  ->  N  e.  CC )
269adantlr 477 . . . . . 6  |-  ( ( ( ph  /\  N  =/=  0 )  /\  k  e.  A )  ->  B  e.  ZZ )
2726zcnd 9503 . . . . 5  |-  ( ( ( ph  /\  N  =/=  0 )  /\  k  e.  A )  ->  B  e.  CC )
28 zapne 9454 . . . . . . 7  |-  ( ( N  e.  ZZ  /\  0  e.  ZZ )  ->  ( N #  0  <->  N  =/=  0 ) )
2923, 1, 28sylancl 413 . . . . . 6  |-  ( ph  ->  ( N #  0  <->  N  =/=  0 ) )
3029biimpar 297 . . . . 5  |-  ( (
ph  /\  N  =/=  0 )  ->  N #  0 )
3122, 25, 27, 30fsumdivapc 11805 . . . 4  |-  ( (
ph  /\  N  =/=  0 )  ->  ( sum_ k  e.  A  B  /  N )  =  sum_ k  e.  A  ( B  /  N ) )
326adantlr 477 . . . . . 6  |-  ( ( ( ph  /\  N  =/=  0 )  /\  k  e.  A )  ->  N  ||  B )
3324adantr 276 . . . . . . 7  |-  ( ( ( ph  /\  N  =/=  0 )  /\  k  e.  A )  ->  N  e.  ZZ )
34 simplr 528 . . . . . . 7  |-  ( ( ( ph  /\  N  =/=  0 )  /\  k  e.  A )  ->  N  =/=  0 )
35 dvdsval2 12145 . . . . . . 7  |-  ( ( N  e.  ZZ  /\  N  =/=  0  /\  B  e.  ZZ )  ->  ( N  ||  B  <->  ( B  /  N )  e.  ZZ ) )
3633, 34, 26, 35syl3anc 1250 . . . . . 6  |-  ( ( ( ph  /\  N  =/=  0 )  /\  k  e.  A )  ->  ( N  ||  B  <->  ( B  /  N )  e.  ZZ ) )
3732, 36mpbid 147 . . . . 5  |-  ( ( ( ph  /\  N  =/=  0 )  /\  k  e.  A )  ->  ( B  /  N )  e.  ZZ )
3822, 37fsumzcl 11757 . . . 4  |-  ( (
ph  /\  N  =/=  0 )  ->  sum_ k  e.  A  ( B  /  N )  e.  ZZ )
3931, 38eqeltrd 2283 . . 3  |-  ( (
ph  /\  N  =/=  0 )  ->  ( sum_ k  e.  A  B  /  N )  e.  ZZ )
40 simpr 110 . . . 4  |-  ( (
ph  /\  N  =/=  0 )  ->  N  =/=  0 )
4115, 9fsumzcl 11757 . . . . 5  |-  ( ph  -> 
sum_ k  e.  A  B  e.  ZZ )
4241adantr 276 . . . 4  |-  ( (
ph  /\  N  =/=  0 )  ->  sum_ k  e.  A  B  e.  ZZ )
43 dvdsval2 12145 . . . 4  |-  ( ( N  e.  ZZ  /\  N  =/=  0  /\  sum_ k  e.  A  B  e.  ZZ )  ->  ( N  ||  sum_ k  e.  A  B 
<->  ( sum_ k  e.  A  B  /  N )  e.  ZZ ) )
4424, 40, 42, 43syl3anc 1250 . . 3  |-  ( (
ph  /\  N  =/=  0 )  ->  ( N  ||  sum_ k  e.  A  B 
<->  ( sum_ k  e.  A  B  /  N )  e.  ZZ ) )
4539, 44mpbird 167 . 2  |-  ( (
ph  /\  N  =/=  0 )  ->  N  || 
sum_ k  e.  A  B )
46 zdceq 9455 . . . 4  |-  ( ( N  e.  ZZ  /\  0  e.  ZZ )  -> DECID  N  =  0 )
4723, 1, 46sylancl 413 . . 3  |-  ( ph  -> DECID  N  =  0 )
48 dcne 2388 . . 3  |-  (DECID  N  =  0  <->  ( N  =  0  \/  N  =/=  0 ) )
4947, 48sylib 122 . 2  |-  ( ph  ->  ( N  =  0  \/  N  =/=  0
) )
5021, 45, 49mpjaodan 800 1  |-  ( ph  ->  N  ||  sum_ k  e.  A  B )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 104    <-> wb 105    \/ wo 710  DECID wdc 836    /\ w3a 981    = wceq 1373    e. wcel 2177    =/= wne 2377   A.wral 2485    C_ wss 3167   class class class wbr 4047   ` cfv 5276  (class class class)co 5951   Fincfn 6834   0cc0 7932   # cap 8661    / cdiv 8752   ZZcz 9379   ZZ>=cuz 9655   sum_csu 11708    || cdvds 12142
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 106  ax-ia2 107  ax-ia3 108  ax-in1 615  ax-in2 616  ax-io 711  ax-5 1471  ax-7 1472  ax-gen 1473  ax-ie1 1517  ax-ie2 1518  ax-8 1528  ax-10 1529  ax-11 1530  ax-i12 1531  ax-bndl 1533  ax-4 1534  ax-17 1550  ax-i9 1554  ax-ial 1558  ax-i5r 1559  ax-13 2179  ax-14 2180  ax-ext 2188  ax-coll 4163  ax-sep 4166  ax-nul 4174  ax-pow 4222  ax-pr 4257  ax-un 4484  ax-setind 4589  ax-iinf 4640  ax-cnex 8023  ax-resscn 8024  ax-1cn 8025  ax-1re 8026  ax-icn 8027  ax-addcl 8028  ax-addrcl 8029  ax-mulcl 8030  ax-mulrcl 8031  ax-addcom 8032  ax-mulcom 8033  ax-addass 8034  ax-mulass 8035  ax-distr 8036  ax-i2m1 8037  ax-0lt1 8038  ax-1rid 8039  ax-0id 8040  ax-rnegex 8041  ax-precex 8042  ax-cnre 8043  ax-pre-ltirr 8044  ax-pre-ltwlin 8045  ax-pre-lttrn 8046  ax-pre-apti 8047  ax-pre-ltadd 8048  ax-pre-mulgt0 8049  ax-pre-mulext 8050  ax-arch 8051  ax-caucvg 8052
This theorem depends on definitions:  df-bi 117  df-dc 837  df-3or 982  df-3an 983  df-tru 1376  df-fal 1379  df-nf 1485  df-sb 1787  df-eu 2058  df-mo 2059  df-clab 2193  df-cleq 2199  df-clel 2202  df-nfc 2338  df-ne 2378  df-nel 2473  df-ral 2490  df-rex 2491  df-reu 2492  df-rmo 2493  df-rab 2494  df-v 2775  df-sbc 3000  df-csb 3095  df-dif 3169  df-un 3171  df-in 3173  df-ss 3180  df-nul 3462  df-if 3573  df-pw 3619  df-sn 3640  df-pr 3641  df-op 3643  df-uni 3853  df-int 3888  df-iun 3931  df-br 4048  df-opab 4110  df-mpt 4111  df-tr 4147  df-id 4344  df-po 4347  df-iso 4348  df-iord 4417  df-on 4419  df-ilim 4420  df-suc 4422  df-iom 4643  df-xp 4685  df-rel 4686  df-cnv 4687  df-co 4688  df-dm 4689  df-rn 4690  df-res 4691  df-ima 4692  df-iota 5237  df-fun 5278  df-fn 5279  df-f 5280  df-f1 5281  df-fo 5282  df-f1o 5283  df-fv 5284  df-isom 5285  df-riota 5906  df-ov 5954  df-oprab 5955  df-mpo 5956  df-1st 6233  df-2nd 6234  df-recs 6398  df-irdg 6463  df-frec 6484  df-1o 6509  df-oadd 6513  df-er 6627  df-en 6835  df-dom 6836  df-fin 6837  df-pnf 8116  df-mnf 8117  df-xr 8118  df-ltxr 8119  df-le 8120  df-sub 8252  df-neg 8253  df-reap 8655  df-ap 8662  df-div 8753  df-inn 9044  df-2 9102  df-3 9103  df-4 9104  df-n0 9303  df-z 9380  df-uz 9656  df-q 9748  df-rp 9783  df-fz 10138  df-fzo 10272  df-seqfrec 10600  df-exp 10691  df-ihash 10928  df-cj 11197  df-re 11198  df-im 11199  df-rsqrt 11353  df-abs 11354  df-clim 11634  df-sumdc 11709  df-dvds 12143
This theorem is referenced by:  3dvds  12219
  Copyright terms: Public domain W3C validator