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

Theorem arisum2 10889
Description: Arithmetic series sum of the first  N nonnegative integers. (Contributed by Mario Carneiro, 17-Apr-2015.) (Proof shortened by AV, 2-Aug-2021.)
Assertion
Ref Expression
arisum2  |-  ( N  e.  NN0  ->  sum_ k  e.  ( 0 ... ( N  -  1 ) ) k  =  ( ( ( N ^
2 )  -  N
)  /  2 ) )
Distinct variable group:    k, N

Proof of Theorem arisum2
StepHypRef Expression
1 elnn0 8673 . 2  |-  ( N  e.  NN0  <->  ( N  e.  NN  \/  N  =  0 ) )
2 nnm1nn0 8712 . . . . . 6  |-  ( N  e.  NN  ->  ( N  -  1 )  e.  NN0 )
3 nn0uz 9051 . . . . . 6  |-  NN0  =  ( ZZ>= `  0 )
42, 3syl6eleq 2180 . . . . 5  |-  ( N  e.  NN  ->  ( N  -  1 )  e.  ( ZZ>= `  0
) )
5 elfznn0 9524 . . . . . . 7  |-  ( k  e.  ( 0 ... ( N  -  1 ) )  ->  k  e.  NN0 )
65adantl 271 . . . . . 6  |-  ( ( N  e.  NN  /\  k  e.  ( 0 ... ( N  - 
1 ) ) )  ->  k  e.  NN0 )
76nn0cnd 8726 . . . . 5  |-  ( ( N  e.  NN  /\  k  e.  ( 0 ... ( N  - 
1 ) ) )  ->  k  e.  CC )
8 id 19 . . . . 5  |-  ( k  =  0  ->  k  =  0 )
94, 7, 8fsum1p 10808 . . . 4  |-  ( N  e.  NN  ->  sum_ k  e.  ( 0 ... ( N  -  1 ) ) k  =  ( 0  +  sum_ k  e.  ( ( 0  +  1 ) ... ( N  -  1 ) ) k ) )
10 1e0p1 8916 . . . . . . . . 9  |-  1  =  ( 0  +  1 )
1110oveq1i 5662 . . . . . . . 8  |-  ( 1 ... ( N  - 
1 ) )  =  ( ( 0  +  1 ) ... ( N  -  1 ) )
1211sumeq1i 10748 . . . . . . 7  |-  sum_ k  e.  ( 1 ... ( N  -  1 ) ) k  =  sum_ k  e.  ( (
0  +  1 ) ... ( N  - 
1 ) ) k
1312oveq2i 5663 . . . . . 6  |-  ( 0  +  sum_ k  e.  ( 1 ... ( N  -  1 ) ) k )  =  ( 0  +  sum_ k  e.  ( ( 0  +  1 ) ... ( N  -  1 ) ) k )
14 1zzd 8775 . . . . . . . . 9  |-  ( N  e.  NN  ->  1  e.  ZZ )
152nn0zd 8864 . . . . . . . . 9  |-  ( N  e.  NN  ->  ( N  -  1 )  e.  ZZ )
1614, 15fzfigd 9834 . . . . . . . 8  |-  ( N  e.  NN  ->  (
1 ... ( N  - 
1 ) )  e. 
Fin )
17 elfznn 9466 . . . . . . . . . 10  |-  ( k  e.  ( 1 ... ( N  -  1 ) )  ->  k  e.  NN )
1817adantl 271 . . . . . . . . 9  |-  ( ( N  e.  NN  /\  k  e.  ( 1 ... ( N  - 
1 ) ) )  ->  k  e.  NN )
1918nncnd 8434 . . . . . . . 8  |-  ( ( N  e.  NN  /\  k  e.  ( 1 ... ( N  - 
1 ) ) )  ->  k  e.  CC )
2016, 19fsumcl 10790 . . . . . . 7  |-  ( N  e.  NN  ->  sum_ k  e.  ( 1 ... ( N  -  1 ) ) k  e.  CC )
2120addid2d 7630 . . . . . 6  |-  ( N  e.  NN  ->  (
0  +  sum_ k  e.  ( 1 ... ( N  -  1 ) ) k )  = 
sum_ k  e.  ( 1 ... ( N  -  1 ) ) k )
2213, 21syl5eqr 2134 . . . . 5  |-  ( N  e.  NN  ->  (
0  +  sum_ k  e.  ( ( 0  +  1 ) ... ( N  -  1 ) ) k )  = 
sum_ k  e.  ( 1 ... ( N  -  1 ) ) k )
23 arisum 10888 . . . . . . 7  |-  ( ( N  -  1 )  e.  NN0  ->  sum_ k  e.  ( 1 ... ( N  -  1 ) ) k  =  ( ( ( ( N  -  1 ) ^
2 )  +  ( N  -  1 ) )  /  2 ) )
242, 23syl 14 . . . . . 6  |-  ( N  e.  NN  ->  sum_ k  e.  ( 1 ... ( N  -  1 ) ) k  =  ( ( ( ( N  -  1 ) ^
2 )  +  ( N  -  1 ) )  /  2 ) )
25 nncn 8428 . . . . . . . . . . . . . 14  |-  ( N  e.  NN  ->  N  e.  CC )
26252timesd 8656 . . . . . . . . . . . . 13  |-  ( N  e.  NN  ->  (
2  x.  N )  =  ( N  +  N ) )
2726oveq2d 5668 . . . . . . . . . . . 12  |-  ( N  e.  NN  ->  (
( N ^ 2 )  -  ( 2  x.  N ) )  =  ( ( N ^ 2 )  -  ( N  +  N
) ) )
2825sqcld 10080 . . . . . . . . . . . . 13  |-  ( N  e.  NN  ->  ( N ^ 2 )  e.  CC )
2928, 25, 25subsub4d 7822 . . . . . . . . . . . 12  |-  ( N  e.  NN  ->  (
( ( N ^
2 )  -  N
)  -  N )  =  ( ( N ^ 2 )  -  ( N  +  N
) ) )
3027, 29eqtr4d 2123 . . . . . . . . . . 11  |-  ( N  e.  NN  ->  (
( N ^ 2 )  -  ( 2  x.  N ) )  =  ( ( ( N ^ 2 )  -  N )  -  N ) )
3130oveq1d 5667 . . . . . . . . . 10  |-  ( N  e.  NN  ->  (
( ( N ^
2 )  -  (
2  x.  N ) )  +  1 )  =  ( ( ( ( N ^ 2 )  -  N )  -  N )  +  1 ) )
32 binom2sub1 10064 . . . . . . . . . . 11  |-  ( N  e.  CC  ->  (
( N  -  1 ) ^ 2 )  =  ( ( ( N ^ 2 )  -  ( 2  x.  N ) )  +  1 ) )
3325, 32syl 14 . . . . . . . . . 10  |-  ( N  e.  NN  ->  (
( N  -  1 ) ^ 2 )  =  ( ( ( N ^ 2 )  -  ( 2  x.  N ) )  +  1 ) )
3428, 25subcld 7791 . . . . . . . . . . 11  |-  ( N  e.  NN  ->  (
( N ^ 2 )  -  N )  e.  CC )
35 1cnd 7502 . . . . . . . . . . 11  |-  ( N  e.  NN  ->  1  e.  CC )
3634, 25, 35subsubd 7819 . . . . . . . . . 10  |-  ( N  e.  NN  ->  (
( ( N ^
2 )  -  N
)  -  ( N  -  1 ) )  =  ( ( ( ( N ^ 2 )  -  N )  -  N )  +  1 ) )
3731, 33, 363eqtr4d 2130 . . . . . . . . 9  |-  ( N  e.  NN  ->  (
( N  -  1 ) ^ 2 )  =  ( ( ( N ^ 2 )  -  N )  -  ( N  -  1
) ) )
3837oveq1d 5667 . . . . . . . 8  |-  ( N  e.  NN  ->  (
( ( N  - 
1 ) ^ 2 )  +  ( N  -  1 ) )  =  ( ( ( ( N ^ 2 )  -  N )  -  ( N  - 
1 ) )  +  ( N  -  1 ) ) )
39 ax-1cn 7436 . . . . . . . . . 10  |-  1  e.  CC
40 subcl 7679 . . . . . . . . . 10  |-  ( ( N  e.  CC  /\  1  e.  CC )  ->  ( N  -  1 )  e.  CC )
4125, 39, 40sylancl 404 . . . . . . . . 9  |-  ( N  e.  NN  ->  ( N  -  1 )  e.  CC )
4234, 41npcand 7795 . . . . . . . 8  |-  ( N  e.  NN  ->  (
( ( ( N ^ 2 )  -  N )  -  ( N  -  1 ) )  +  ( N  -  1 ) )  =  ( ( N ^ 2 )  -  N ) )
4338, 42eqtrd 2120 . . . . . . 7  |-  ( N  e.  NN  ->  (
( ( N  - 
1 ) ^ 2 )  +  ( N  -  1 ) )  =  ( ( N ^ 2 )  -  N ) )
4443oveq1d 5667 . . . . . 6  |-  ( N  e.  NN  ->  (
( ( ( N  -  1 ) ^
2 )  +  ( N  -  1 ) )  /  2 )  =  ( ( ( N ^ 2 )  -  N )  / 
2 ) )
4524, 44eqtrd 2120 . . . . 5  |-  ( N  e.  NN  ->  sum_ k  e.  ( 1 ... ( N  -  1 ) ) k  =  ( ( ( N ^
2 )  -  N
)  /  2 ) )
4622, 45eqtrd 2120 . . . 4  |-  ( N  e.  NN  ->  (
0  +  sum_ k  e.  ( ( 0  +  1 ) ... ( N  -  1 ) ) k )  =  ( ( ( N ^ 2 )  -  N )  /  2
) )
479, 46eqtrd 2120 . . 3  |-  ( N  e.  NN  ->  sum_ k  e.  ( 0 ... ( N  -  1 ) ) k  =  ( ( ( N ^
2 )  -  N
)  /  2 ) )
48 oveq1 5659 . . . . . . . 8  |-  ( N  =  0  ->  ( N  -  1 )  =  ( 0  -  1 ) )
4948oveq2d 5668 . . . . . . 7  |-  ( N  =  0  ->  (
0 ... ( N  - 
1 ) )  =  ( 0 ... (
0  -  1 ) ) )
50 0re 7486 . . . . . . . . 9  |-  0  e.  RR
51 ltm1 8305 . . . . . . . . 9  |-  ( 0  e.  RR  ->  (
0  -  1 )  <  0 )
5250, 51ax-mp 7 . . . . . . . 8  |-  ( 0  -  1 )  <  0
53 0z 8759 . . . . . . . . 9  |-  0  e.  ZZ
54 peano2zm 8786 . . . . . . . . . 10  |-  ( 0  e.  ZZ  ->  (
0  -  1 )  e.  ZZ )
5553, 54ax-mp 7 . . . . . . . . 9  |-  ( 0  -  1 )  e.  ZZ
56 fzn 9454 . . . . . . . . 9  |-  ( ( 0  e.  ZZ  /\  ( 0  -  1 )  e.  ZZ )  ->  ( ( 0  -  1 )  <  0  <->  ( 0 ... ( 0  -  1 ) )  =  (/) ) )
5753, 55, 56mp2an 417 . . . . . . . 8  |-  ( ( 0  -  1 )  <  0  <->  ( 0 ... ( 0  -  1 ) )  =  (/) )
5852, 57mpbi 143 . . . . . . 7  |-  ( 0 ... ( 0  -  1 ) )  =  (/)
5949, 58syl6eq 2136 . . . . . 6  |-  ( N  =  0  ->  (
0 ... ( N  - 
1 ) )  =  (/) )
6059sumeq1d 10751 . . . . 5  |-  ( N  =  0  ->  sum_ k  e.  ( 0 ... ( N  -  1 ) ) k  =  sum_ k  e.  (/)  k )
61 sum0 10776 . . . . 5  |-  sum_ k  e.  (/)  k  =  0
6260, 61syl6eq 2136 . . . 4  |-  ( N  =  0  ->  sum_ k  e.  ( 0 ... ( N  -  1 ) ) k  =  0 )
63 sq0i 10042 . . . . . . . 8  |-  ( N  =  0  ->  ( N ^ 2 )  =  0 )
64 id 19 . . . . . . . 8  |-  ( N  =  0  ->  N  =  0 )
6563, 64oveq12d 5670 . . . . . . 7  |-  ( N  =  0  ->  (
( N ^ 2 )  -  N )  =  ( 0  -  0 ) )
66 0m0e0 8532 . . . . . . 7  |-  ( 0  -  0 )  =  0
6765, 66syl6eq 2136 . . . . . 6  |-  ( N  =  0  ->  (
( N ^ 2 )  -  N )  =  0 )
6867oveq1d 5667 . . . . 5  |-  ( N  =  0  ->  (
( ( N ^
2 )  -  N
)  /  2 )  =  ( 0  / 
2 ) )
69 2cn 8491 . . . . . 6  |-  2  e.  CC
70 2ap0 8513 . . . . . 6  |-  2 #  0
7169, 70div0api 8211 . . . . 5  |-  ( 0  /  2 )  =  0
7268, 71syl6eq 2136 . . . 4  |-  ( N  =  0  ->  (
( ( N ^
2 )  -  N
)  /  2 )  =  0 )
7362, 72eqtr4d 2123 . . 3  |-  ( N  =  0  ->  sum_ k  e.  ( 0 ... ( N  -  1 ) ) k  =  ( ( ( N ^
2 )  -  N
)  /  2 ) )
7447, 73jaoi 671 . 2  |-  ( ( N  e.  NN  \/  N  =  0 )  ->  sum_ k  e.  ( 0 ... ( N  -  1 ) ) k  =  ( ( ( N ^ 2 )  -  N )  /  2 ) )
751, 74sylbi 119 1  |-  ( N  e.  NN0  ->  sum_ k  e.  ( 0 ... ( N  -  1 ) ) k  =  ( ( ( N ^
2 )  -  N
)  /  2 ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 102    <-> wb 103    \/ wo 664    = wceq 1289    e. wcel 1438   (/)c0 3286   class class class wbr 3845   ` cfv 5015  (class class class)co 5652   CCcc 7346   RRcr 7347   0cc0 7348   1c1 7349    + caddc 7351    x. cmul 7353    < clt 7520    - cmin 7651    / cdiv 8137   NNcn 8420   2c2 8471   NN0cn0 8671   ZZcz 8748   ZZ>=cuz 9017   ...cfz 9422   ^cexp 9950   sum_csu 10738
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 104  ax-ia2 105  ax-ia3 106  ax-in1 579  ax-in2 580  ax-io 665  ax-5 1381  ax-7 1382  ax-gen 1383  ax-ie1 1427  ax-ie2 1428  ax-8 1440  ax-10 1441  ax-11 1442  ax-i12 1443  ax-bndl 1444  ax-4 1445  ax-13 1449  ax-14 1450  ax-17 1464  ax-i9 1468  ax-ial 1472  ax-i5r 1473  ax-ext 2070  ax-coll 3954  ax-sep 3957  ax-nul 3965  ax-pow 4009  ax-pr 4036  ax-un 4260  ax-setind 4353  ax-iinf 4403  ax-cnex 7434  ax-resscn 7435  ax-1cn 7436  ax-1re 7437  ax-icn 7438  ax-addcl 7439  ax-addrcl 7440  ax-mulcl 7441  ax-mulrcl 7442  ax-addcom 7443  ax-mulcom 7444  ax-addass 7445  ax-mulass 7446  ax-distr 7447  ax-i2m1 7448  ax-0lt1 7449  ax-1rid 7450  ax-0id 7451  ax-rnegex 7452  ax-precex 7453  ax-cnre 7454  ax-pre-ltirr 7455  ax-pre-ltwlin 7456  ax-pre-lttrn 7457  ax-pre-apti 7458  ax-pre-ltadd 7459  ax-pre-mulgt0 7460  ax-pre-mulext 7461  ax-arch 7462  ax-caucvg 7463
This theorem depends on definitions:  df-bi 115  df-dc 781  df-3or 925  df-3an 926  df-tru 1292  df-fal 1295  df-nf 1395  df-sb 1693  df-eu 1951  df-mo 1952  df-clab 2075  df-cleq 2081  df-clel 2084  df-nfc 2217  df-ne 2256  df-nel 2351  df-ral 2364  df-rex 2365  df-reu 2366  df-rmo 2367  df-rab 2368  df-v 2621  df-sbc 2841  df-csb 2934  df-dif 3001  df-un 3003  df-in 3005  df-ss 3012  df-nul 3287  df-if 3394  df-pw 3431  df-sn 3452  df-pr 3453  df-op 3455  df-uni 3654  df-int 3689  df-iun 3732  df-br 3846  df-opab 3900  df-mpt 3901  df-tr 3937  df-id 4120  df-po 4123  df-iso 4124  df-iord 4193  df-on 4195  df-ilim 4196  df-suc 4198  df-iom 4406  df-xp 4444  df-rel 4445  df-cnv 4446  df-co 4447  df-dm 4448  df-rn 4449  df-res 4450  df-ima 4451  df-iota 4980  df-fun 5017  df-fn 5018  df-f 5019  df-f1 5020  df-fo 5021  df-f1o 5022  df-fv 5023  df-isom 5024  df-riota 5608  df-ov 5655  df-oprab 5656  df-mpt2 5657  df-1st 5911  df-2nd 5912  df-recs 6070  df-irdg 6135  df-frec 6156  df-1o 6181  df-oadd 6185  df-er 6290  df-en 6456  df-dom 6457  df-fin 6458  df-pnf 7522  df-mnf 7523  df-xr 7524  df-ltxr 7525  df-le 7526  df-sub 7653  df-neg 7654  df-reap 8050  df-ap 8057  df-div 8138  df-inn 8421  df-2 8479  df-3 8480  df-4 8481  df-n0 8672  df-z 8749  df-uz 9018  df-q 9103  df-rp 9133  df-fz 9423  df-fzo 9550  df-iseq 9849  df-seq3 9850  df-exp 9951  df-fac 10130  df-bc 10152  df-ihash 10180  df-cj 10272  df-re 10273  df-im 10274  df-rsqrt 10427  df-abs 10428  df-clim 10663  df-isum 10739
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator