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

Theorem arisum2 11219
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 8933 . 2  |-  ( N  e.  NN0  <->  ( N  e.  NN  \/  N  =  0 ) )
2 nnm1nn0 8972 . . . . . 6  |-  ( N  e.  NN  ->  ( N  -  1 )  e.  NN0 )
3 nn0uz 9312 . . . . . 6  |-  NN0  =  ( ZZ>= `  0 )
42, 3syl6eleq 2208 . . . . 5  |-  ( N  e.  NN  ->  ( N  -  1 )  e.  ( ZZ>= `  0
) )
5 elfznn0 9845 . . . . . . 7  |-  ( k  e.  ( 0 ... ( N  -  1 ) )  ->  k  e.  NN0 )
65adantl 273 . . . . . 6  |-  ( ( N  e.  NN  /\  k  e.  ( 0 ... ( N  - 
1 ) ) )  ->  k  e.  NN0 )
76nn0cnd 8986 . . . . 5  |-  ( ( N  e.  NN  /\  k  e.  ( 0 ... ( N  - 
1 ) ) )  ->  k  e.  CC )
8 id 19 . . . . 5  |-  ( k  =  0  ->  k  =  0 )
94, 7, 8fsum1p 11138 . . . 4  |-  ( N  e.  NN  ->  sum_ k  e.  ( 0 ... ( N  -  1 ) ) k  =  ( 0  +  sum_ k  e.  ( ( 0  +  1 ) ... ( N  -  1 ) ) k ) )
10 1e0p1 9177 . . . . . . . . 9  |-  1  =  ( 0  +  1 )
1110oveq1i 5750 . . . . . . . 8  |-  ( 1 ... ( N  - 
1 ) )  =  ( ( 0  +  1 ) ... ( N  -  1 ) )
1211sumeq1i 11083 . . . . . . 7  |-  sum_ k  e.  ( 1 ... ( N  -  1 ) ) k  =  sum_ k  e.  ( (
0  +  1 ) ... ( N  - 
1 ) ) k
1312oveq2i 5751 . . . . . 6  |-  ( 0  +  sum_ k  e.  ( 1 ... ( N  -  1 ) ) k )  =  ( 0  +  sum_ k  e.  ( ( 0  +  1 ) ... ( N  -  1 ) ) k )
14 1zzd 9035 . . . . . . . . 9  |-  ( N  e.  NN  ->  1  e.  ZZ )
152nn0zd 9125 . . . . . . . . 9  |-  ( N  e.  NN  ->  ( N  -  1 )  e.  ZZ )
1614, 15fzfigd 10155 . . . . . . . 8  |-  ( N  e.  NN  ->  (
1 ... ( N  - 
1 ) )  e. 
Fin )
17 elfznn 9785 . . . . . . . . . 10  |-  ( k  e.  ( 1 ... ( N  -  1 ) )  ->  k  e.  NN )
1817adantl 273 . . . . . . . . 9  |-  ( ( N  e.  NN  /\  k  e.  ( 1 ... ( N  - 
1 ) ) )  ->  k  e.  NN )
1918nncnd 8694 . . . . . . . 8  |-  ( ( N  e.  NN  /\  k  e.  ( 1 ... ( N  - 
1 ) ) )  ->  k  e.  CC )
2016, 19fsumcl 11120 . . . . . . 7  |-  ( N  e.  NN  ->  sum_ k  e.  ( 1 ... ( N  -  1 ) ) k  e.  CC )
2120addid2d 7876 . . . . . 6  |-  ( N  e.  NN  ->  (
0  +  sum_ k  e.  ( 1 ... ( N  -  1 ) ) k )  = 
sum_ k  e.  ( 1 ... ( N  -  1 ) ) k )
2213, 21syl5eqr 2162 . . . . 5  |-  ( N  e.  NN  ->  (
0  +  sum_ k  e.  ( ( 0  +  1 ) ... ( N  -  1 ) ) k )  = 
sum_ k  e.  ( 1 ... ( N  -  1 ) ) k )
23 arisum 11218 . . . . . . 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 8688 . . . . . . . . . . . . . 14  |-  ( N  e.  NN  ->  N  e.  CC )
26252timesd 8916 . . . . . . . . . . . . 13  |-  ( N  e.  NN  ->  (
2  x.  N )  =  ( N  +  N ) )
2726oveq2d 5756 . . . . . . . . . . . 12  |-  ( N  e.  NN  ->  (
( N ^ 2 )  -  ( 2  x.  N ) )  =  ( ( N ^ 2 )  -  ( N  +  N
) ) )
2825sqcld 10373 . . . . . . . . . . . . 13  |-  ( N  e.  NN  ->  ( N ^ 2 )  e.  CC )
2928, 25, 25subsub4d 8068 . . . . . . . . . . . 12  |-  ( N  e.  NN  ->  (
( ( N ^
2 )  -  N
)  -  N )  =  ( ( N ^ 2 )  -  ( N  +  N
) ) )
3027, 29eqtr4d 2151 . . . . . . . . . . 11  |-  ( N  e.  NN  ->  (
( N ^ 2 )  -  ( 2  x.  N ) )  =  ( ( ( N ^ 2 )  -  N )  -  N ) )
3130oveq1d 5755 . . . . . . . . . 10  |-  ( N  e.  NN  ->  (
( ( N ^
2 )  -  (
2  x.  N ) )  +  1 )  =  ( ( ( ( N ^ 2 )  -  N )  -  N )  +  1 ) )
32 binom2sub1 10357 . . . . . . . . . . 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 8037 . . . . . . . . . . 11  |-  ( N  e.  NN  ->  (
( N ^ 2 )  -  N )  e.  CC )
35 1cnd 7746 . . . . . . . . . . 11  |-  ( N  e.  NN  ->  1  e.  CC )
3634, 25, 35subsubd 8065 . . . . . . . . . 10  |-  ( N  e.  NN  ->  (
( ( N ^
2 )  -  N
)  -  ( N  -  1 ) )  =  ( ( ( ( N ^ 2 )  -  N )  -  N )  +  1 ) )
3731, 33, 363eqtr4d 2158 . . . . . . . . 9  |-  ( N  e.  NN  ->  (
( N  -  1 ) ^ 2 )  =  ( ( ( N ^ 2 )  -  N )  -  ( N  -  1
) ) )
3837oveq1d 5755 . . . . . . . 8  |-  ( N  e.  NN  ->  (
( ( N  - 
1 ) ^ 2 )  +  ( N  -  1 ) )  =  ( ( ( ( N ^ 2 )  -  N )  -  ( N  - 
1 ) )  +  ( N  -  1 ) ) )
39 ax-1cn 7677 . . . . . . . . . 10  |-  1  e.  CC
40 subcl 7925 . . . . . . . . . 10  |-  ( ( N  e.  CC  /\  1  e.  CC )  ->  ( N  -  1 )  e.  CC )
4125, 39, 40sylancl 407 . . . . . . . . 9  |-  ( N  e.  NN  ->  ( N  -  1 )  e.  CC )
4234, 41npcand 8041 . . . . . . . 8  |-  ( N  e.  NN  ->  (
( ( ( N ^ 2 )  -  N )  -  ( N  -  1 ) )  +  ( N  -  1 ) )  =  ( ( N ^ 2 )  -  N ) )
4338, 42eqtrd 2148 . . . . . . 7  |-  ( N  e.  NN  ->  (
( ( N  - 
1 ) ^ 2 )  +  ( N  -  1 ) )  =  ( ( N ^ 2 )  -  N ) )
4443oveq1d 5755 . . . . . 6  |-  ( N  e.  NN  ->  (
( ( ( N  -  1 ) ^
2 )  +  ( N  -  1 ) )  /  2 )  =  ( ( ( N ^ 2 )  -  N )  / 
2 ) )
4524, 44eqtrd 2148 . . . . 5  |-  ( N  e.  NN  ->  sum_ k  e.  ( 1 ... ( N  -  1 ) ) k  =  ( ( ( N ^
2 )  -  N
)  /  2 ) )
4622, 45eqtrd 2148 . . . 4  |-  ( N  e.  NN  ->  (
0  +  sum_ k  e.  ( ( 0  +  1 ) ... ( N  -  1 ) ) k )  =  ( ( ( N ^ 2 )  -  N )  /  2
) )
479, 46eqtrd 2148 . . 3  |-  ( N  e.  NN  ->  sum_ k  e.  ( 0 ... ( N  -  1 ) ) k  =  ( ( ( N ^
2 )  -  N
)  /  2 ) )
48 oveq1 5747 . . . . . . . 8  |-  ( N  =  0  ->  ( N  -  1 )  =  ( 0  -  1 ) )
4948oveq2d 5756 . . . . . . 7  |-  ( N  =  0  ->  (
0 ... ( N  - 
1 ) )  =  ( 0 ... (
0  -  1 ) ) )
50 0re 7730 . . . . . . . . 9  |-  0  e.  RR
51 ltm1 8564 . . . . . . . . 9  |-  ( 0  e.  RR  ->  (
0  -  1 )  <  0 )
5250, 51ax-mp 5 . . . . . . . 8  |-  ( 0  -  1 )  <  0
53 0z 9019 . . . . . . . . 9  |-  0  e.  ZZ
54 peano2zm 9046 . . . . . . . . . 10  |-  ( 0  e.  ZZ  ->  (
0  -  1 )  e.  ZZ )
5553, 54ax-mp 5 . . . . . . . . 9  |-  ( 0  -  1 )  e.  ZZ
56 fzn 9773 . . . . . . . . 9  |-  ( ( 0  e.  ZZ  /\  ( 0  -  1 )  e.  ZZ )  ->  ( ( 0  -  1 )  <  0  <->  ( 0 ... ( 0  -  1 ) )  =  (/) ) )
5753, 55, 56mp2an 420 . . . . . . . 8  |-  ( ( 0  -  1 )  <  0  <->  ( 0 ... ( 0  -  1 ) )  =  (/) )
5852, 57mpbi 144 . . . . . . 7  |-  ( 0 ... ( 0  -  1 ) )  =  (/)
5949, 58syl6eq 2164 . . . . . 6  |-  ( N  =  0  ->  (
0 ... ( N  - 
1 ) )  =  (/) )
6059sumeq1d 11086 . . . . 5  |-  ( N  =  0  ->  sum_ k  e.  ( 0 ... ( N  -  1 ) ) k  =  sum_ k  e.  (/)  k )
61 sum0 11108 . . . . 5  |-  sum_ k  e.  (/)  k  =  0
6260, 61syl6eq 2164 . . . 4  |-  ( N  =  0  ->  sum_ k  e.  ( 0 ... ( N  -  1 ) ) k  =  0 )
63 sq0i 10335 . . . . . . . 8  |-  ( N  =  0  ->  ( N ^ 2 )  =  0 )
64 id 19 . . . . . . . 8  |-  ( N  =  0  ->  N  =  0 )
6563, 64oveq12d 5758 . . . . . . 7  |-  ( N  =  0  ->  (
( N ^ 2 )  -  N )  =  ( 0  -  0 ) )
66 0m0e0 8792 . . . . . . 7  |-  ( 0  -  0 )  =  0
6765, 66syl6eq 2164 . . . . . 6  |-  ( N  =  0  ->  (
( N ^ 2 )  -  N )  =  0 )
6867oveq1d 5755 . . . . 5  |-  ( N  =  0  ->  (
( ( N ^
2 )  -  N
)  /  2 )  =  ( 0  / 
2 ) )
69 2cn 8751 . . . . . 6  |-  2  e.  CC
70 2ap0 8773 . . . . . 6  |-  2 #  0
7169, 70div0api 8469 . . . . 5  |-  ( 0  /  2 )  =  0
7268, 71syl6eq 2164 . . . 4  |-  ( N  =  0  ->  (
( ( N ^
2 )  -  N
)  /  2 )  =  0 )
7362, 72eqtr4d 2151 . . 3  |-  ( N  =  0  ->  sum_ k  e.  ( 0 ... ( N  -  1 ) ) k  =  ( ( ( N ^
2 )  -  N
)  /  2 ) )
7447, 73jaoi 688 . 2  |-  ( ( N  e.  NN  \/  N  =  0 )  ->  sum_ k  e.  ( 0 ... ( N  -  1 ) ) k  =  ( ( ( N ^ 2 )  -  N )  /  2 ) )
751, 74sylbi 120 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 103    <-> wb 104    \/ wo 680    = wceq 1314    e. wcel 1463   (/)c0 3331   class class class wbr 3897   ` cfv 5091  (class class class)co 5740   CCcc 7582   RRcr 7583   0cc0 7584   1c1 7585    + caddc 7587    x. cmul 7589    < clt 7764    - cmin 7897    / cdiv 8395   NNcn 8680   2c2 8731   NN0cn0 8931   ZZcz 9008   ZZ>=cuz 9278   ...cfz 9741   ^cexp 10243   sum_csu 11073
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 105  ax-ia2 106  ax-ia3 107  ax-in1 586  ax-in2 587  ax-io 681  ax-5 1406  ax-7 1407  ax-gen 1408  ax-ie1 1452  ax-ie2 1453  ax-8 1465  ax-10 1466  ax-11 1467  ax-i12 1468  ax-bndl 1469  ax-4 1470  ax-13 1474  ax-14 1475  ax-17 1489  ax-i9 1493  ax-ial 1497  ax-i5r 1498  ax-ext 2097  ax-coll 4011  ax-sep 4014  ax-nul 4022  ax-pow 4066  ax-pr 4099  ax-un 4323  ax-setind 4420  ax-iinf 4470  ax-cnex 7675  ax-resscn 7676  ax-1cn 7677  ax-1re 7678  ax-icn 7679  ax-addcl 7680  ax-addrcl 7681  ax-mulcl 7682  ax-mulrcl 7683  ax-addcom 7684  ax-mulcom 7685  ax-addass 7686  ax-mulass 7687  ax-distr 7688  ax-i2m1 7689  ax-0lt1 7690  ax-1rid 7691  ax-0id 7692  ax-rnegex 7693  ax-precex 7694  ax-cnre 7695  ax-pre-ltirr 7696  ax-pre-ltwlin 7697  ax-pre-lttrn 7698  ax-pre-apti 7699  ax-pre-ltadd 7700  ax-pre-mulgt0 7701  ax-pre-mulext 7702  ax-arch 7703  ax-caucvg 7704
This theorem depends on definitions:  df-bi 116  df-dc 803  df-3or 946  df-3an 947  df-tru 1317  df-fal 1320  df-nf 1420  df-sb 1719  df-eu 1978  df-mo 1979  df-clab 2102  df-cleq 2108  df-clel 2111  df-nfc 2245  df-ne 2284  df-nel 2379  df-ral 2396  df-rex 2397  df-reu 2398  df-rmo 2399  df-rab 2400  df-v 2660  df-sbc 2881  df-csb 2974  df-dif 3041  df-un 3043  df-in 3045  df-ss 3052  df-nul 3332  df-if 3443  df-pw 3480  df-sn 3501  df-pr 3502  df-op 3504  df-uni 3705  df-int 3740  df-iun 3783  df-br 3898  df-opab 3958  df-mpt 3959  df-tr 3995  df-id 4183  df-po 4186  df-iso 4187  df-iord 4256  df-on 4258  df-ilim 4259  df-suc 4261  df-iom 4473  df-xp 4513  df-rel 4514  df-cnv 4515  df-co 4516  df-dm 4517  df-rn 4518  df-res 4519  df-ima 4520  df-iota 5056  df-fun 5093  df-fn 5094  df-f 5095  df-f1 5096  df-fo 5097  df-f1o 5098  df-fv 5099  df-isom 5100  df-riota 5696  df-ov 5743  df-oprab 5744  df-mpo 5745  df-1st 6004  df-2nd 6005  df-recs 6168  df-irdg 6233  df-frec 6254  df-1o 6279  df-oadd 6283  df-er 6395  df-en 6601  df-dom 6602  df-fin 6603  df-pnf 7766  df-mnf 7767  df-xr 7768  df-ltxr 7769  df-le 7770  df-sub 7899  df-neg 7900  df-reap 8300  df-ap 8307  df-div 8396  df-inn 8681  df-2 8739  df-3 8740  df-4 8741  df-n0 8932  df-z 9009  df-uz 9279  df-q 9364  df-rp 9394  df-fz 9742  df-fzo 9871  df-seqfrec 10170  df-exp 10244  df-fac 10423  df-bc 10445  df-ihash 10473  df-cj 10565  df-re 10566  df-im 10567  df-rsqrt 10721  df-abs 10722  df-clim 10999  df-sumdc 11074
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator