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

Theorem fsumrev 12482
Description: Reversal of a finite sum. (Contributed by NM, 26-Nov-2005.) (Revised by Mario Carneiro, 24-Apr-2014.)
Hypotheses
Ref Expression
fsumrev.1  |-  ( ph  ->  K  e.  ZZ )
fsumrev.2  |-  ( ph  ->  M  e.  ZZ )
fsumrev.3  |-  ( ph  ->  N  e.  ZZ )
fsumrev.4  |-  ( (
ph  /\  j  e.  ( M ... N ) )  ->  A  e.  CC )
fsumrev.5  |-  ( j  =  ( K  -  k )  ->  A  =  B )
Assertion
Ref Expression
fsumrev  |-  ( ph  -> 
sum_ j  e.  ( M ... N ) A  =  sum_ k  e.  ( ( K  -  N ) ... ( K  -  M )
) B )
Distinct variable groups:    A, k    B, j    j, k, K   
j, M, k    j, N, k    ph, j, k
Allowed substitution hints:    A( j)    B( k)

Proof of Theorem fsumrev
StepHypRef Expression
1 fsumrev.5 . 2  |-  ( j  =  ( K  -  k )  ->  A  =  B )
2 fzfid 11232 . 2  |-  ( ph  ->  ( ( K  -  N ) ... ( K  -  M )
)  e.  Fin )
3 ovex 6038 . . . . 5  |-  ( K  -  j )  e. 
_V
4 eqid 2380 . . . . 5  |-  ( j  e.  ( ( K  -  N ) ... ( K  -  M
) )  |->  ( K  -  j ) )  =  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  |->  ( K  -  j ) )
53, 4fnmpti 5506 . . . 4  |-  ( j  e.  ( ( K  -  N ) ... ( K  -  M
) )  |->  ( K  -  j ) )  Fn  ( ( K  -  N ) ... ( K  -  M
) )
65a1i 11 . . 3  |-  ( ph  ->  ( j  e.  ( ( K  -  N
) ... ( K  -  M ) )  |->  ( K  -  j ) )  Fn  ( ( K  -  N ) ... ( K  -  M ) ) )
7 ovex 6038 . . . . 5  |-  ( K  -  k )  e. 
_V
8 eqid 2380 . . . . 5  |-  ( k  e.  ( M ... N )  |->  ( K  -  k ) )  =  ( k  e.  ( M ... N
)  |->  ( K  -  k ) )
97, 8fnmpti 5506 . . . 4  |-  ( k  e.  ( M ... N )  |->  ( K  -  k ) )  Fn  ( M ... N )
10 simprr 734 . . . . . . . . . 10  |-  ( (
ph  /\  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) )  -> 
k  =  ( K  -  j ) )
11 simprl 733 . . . . . . . . . . 11  |-  ( (
ph  /\  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) )  -> 
j  e.  ( ( K  -  N ) ... ( K  -  M ) ) )
12 fsumrev.2 . . . . . . . . . . . . 13  |-  ( ph  ->  M  e.  ZZ )
1312adantr 452 . . . . . . . . . . . 12  |-  ( (
ph  /\  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) )  ->  M  e.  ZZ )
14 fsumrev.3 . . . . . . . . . . . . 13  |-  ( ph  ->  N  e.  ZZ )
1514adantr 452 . . . . . . . . . . . 12  |-  ( (
ph  /\  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) )  ->  N  e.  ZZ )
16 fsumrev.1 . . . . . . . . . . . . 13  |-  ( ph  ->  K  e.  ZZ )
1716adantr 452 . . . . . . . . . . . 12  |-  ( (
ph  /\  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) )  ->  K  e.  ZZ )
18 elfzelz 10984 . . . . . . . . . . . . 13  |-  ( j  e.  ( ( K  -  N ) ... ( K  -  M
) )  ->  j  e.  ZZ )
1911, 18syl 16 . . . . . . . . . . . 12  |-  ( (
ph  /\  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) )  -> 
j  e.  ZZ )
20 fzrev 11032 . . . . . . . . . . . 12  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( K  e.  ZZ  /\  j  e.  ZZ ) )  -> 
( j  e.  ( ( K  -  N
) ... ( K  -  M ) )  <->  ( K  -  j )  e.  ( M ... N
) ) )
2113, 15, 17, 19, 20syl22anc 1185 . . . . . . . . . . 11  |-  ( (
ph  /\  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) )  -> 
( j  e.  ( ( K  -  N
) ... ( K  -  M ) )  <->  ( K  -  j )  e.  ( M ... N
) ) )
2211, 21mpbid 202 . . . . . . . . . 10  |-  ( (
ph  /\  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) )  -> 
( K  -  j
)  e.  ( M ... N ) )
2310, 22eqeltrd 2454 . . . . . . . . 9  |-  ( (
ph  /\  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) )  -> 
k  e.  ( M ... N ) )
2410oveq2d 6029 . . . . . . . . . 10  |-  ( (
ph  /\  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) )  -> 
( K  -  k
)  =  ( K  -  ( K  -  j ) ) )
25 zcn 10212 . . . . . . . . . . . 12  |-  ( K  e.  ZZ  ->  K  e.  CC )
26 zcn 10212 . . . . . . . . . . . 12  |-  ( j  e.  ZZ  ->  j  e.  CC )
27 nncan 9255 . . . . . . . . . . . 12  |-  ( ( K  e.  CC  /\  j  e.  CC )  ->  ( K  -  ( K  -  j )
)  =  j )
2825, 26, 27syl2an 464 . . . . . . . . . . 11  |-  ( ( K  e.  ZZ  /\  j  e.  ZZ )  ->  ( K  -  ( K  -  j )
)  =  j )
2917, 19, 28syl2anc 643 . . . . . . . . . 10  |-  ( (
ph  /\  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) )  -> 
( K  -  ( K  -  j )
)  =  j )
3024, 29eqtr2d 2413 . . . . . . . . 9  |-  ( (
ph  /\  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) )  -> 
j  =  ( K  -  k ) )
3123, 30jca 519 . . . . . . . 8  |-  ( (
ph  /\  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) )  -> 
( k  e.  ( M ... N )  /\  j  =  ( K  -  k ) ) )
32 simprr 734 . . . . . . . . . 10  |-  ( (
ph  /\  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) )  -> 
j  =  ( K  -  k ) )
33 simprl 733 . . . . . . . . . . 11  |-  ( (
ph  /\  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) )  -> 
k  e.  ( M ... N ) )
3412adantr 452 . . . . . . . . . . . 12  |-  ( (
ph  /\  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) )  ->  M  e.  ZZ )
3514adantr 452 . . . . . . . . . . . 12  |-  ( (
ph  /\  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) )  ->  N  e.  ZZ )
3616adantr 452 . . . . . . . . . . . 12  |-  ( (
ph  /\  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) )  ->  K  e.  ZZ )
37 elfzelz 10984 . . . . . . . . . . . . 13  |-  ( k  e.  ( M ... N )  ->  k  e.  ZZ )
3833, 37syl 16 . . . . . . . . . . . 12  |-  ( (
ph  /\  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) )  -> 
k  e.  ZZ )
39 fzrev2 11033 . . . . . . . . . . . 12  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( K  e.  ZZ  /\  k  e.  ZZ ) )  -> 
( k  e.  ( M ... N )  <-> 
( K  -  k
)  e.  ( ( K  -  N ) ... ( K  -  M ) ) ) )
4034, 35, 36, 38, 39syl22anc 1185 . . . . . . . . . . 11  |-  ( (
ph  /\  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) )  -> 
( k  e.  ( M ... N )  <-> 
( K  -  k
)  e.  ( ( K  -  N ) ... ( K  -  M ) ) ) )
4133, 40mpbid 202 . . . . . . . . . 10  |-  ( (
ph  /\  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) )  -> 
( K  -  k
)  e.  ( ( K  -  N ) ... ( K  -  M ) ) )
4232, 41eqeltrd 2454 . . . . . . . . 9  |-  ( (
ph  /\  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) )  -> 
j  e.  ( ( K  -  N ) ... ( K  -  M ) ) )
4332oveq2d 6029 . . . . . . . . . 10  |-  ( (
ph  /\  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) )  -> 
( K  -  j
)  =  ( K  -  ( K  -  k ) ) )
44 zcn 10212 . . . . . . . . . . . 12  |-  ( k  e.  ZZ  ->  k  e.  CC )
45 nncan 9255 . . . . . . . . . . . 12  |-  ( ( K  e.  CC  /\  k  e.  CC )  ->  ( K  -  ( K  -  k )
)  =  k )
4625, 44, 45syl2an 464 . . . . . . . . . . 11  |-  ( ( K  e.  ZZ  /\  k  e.  ZZ )  ->  ( K  -  ( K  -  k )
)  =  k )
4736, 38, 46syl2anc 643 . . . . . . . . . 10  |-  ( (
ph  /\  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) )  -> 
( K  -  ( K  -  k )
)  =  k )
4843, 47eqtr2d 2413 . . . . . . . . 9  |-  ( (
ph  /\  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) )  -> 
k  =  ( K  -  j ) )
4942, 48jca 519 . . . . . . . 8  |-  ( (
ph  /\  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) )  -> 
( j  e.  ( ( K  -  N
) ... ( K  -  M ) )  /\  k  =  ( K  -  j ) ) )
5031, 49impbida 806 . . . . . . 7  |-  ( ph  ->  ( ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) )  <->  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) ) )
5150opabbidv 4205 . . . . . 6  |-  ( ph  ->  { <. k ,  j
>.  |  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) }  =  { <. k ,  j
>.  |  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) } )
52 df-mpt 4202 . . . . . . . 8  |-  ( j  e.  ( ( K  -  N ) ... ( K  -  M
) )  |->  ( K  -  j ) )  =  { <. j ,  k >.  |  ( j  e.  ( ( K  -  N ) ... ( K  -  M ) )  /\  k  =  ( K  -  j ) ) }
5352cnveqi 4980 . . . . . . 7  |-  `' ( j  e.  ( ( K  -  N ) ... ( K  -  M ) )  |->  ( K  -  j ) )  =  `' { <. j ,  k >.  |  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) }
54 cnvopab 5207 . . . . . . 7  |-  `' { <. j ,  k >.  |  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) }  =  { <. k ,  j
>.  |  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) }
5553, 54eqtri 2400 . . . . . 6  |-  `' ( j  e.  ( ( K  -  N ) ... ( K  -  M ) )  |->  ( K  -  j ) )  =  { <. k ,  j >.  |  ( j  e.  ( ( K  -  N ) ... ( K  -  M ) )  /\  k  =  ( K  -  j ) ) }
56 df-mpt 4202 . . . . . 6  |-  ( k  e.  ( M ... N )  |->  ( K  -  k ) )  =  { <. k ,  j >.  |  ( k  e.  ( M ... N )  /\  j  =  ( K  -  k ) ) }
5751, 55, 563eqtr4g 2437 . . . . 5  |-  ( ph  ->  `' ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  |->  ( K  -  j ) )  =  ( k  e.  ( M ... N ) 
|->  ( K  -  k
) ) )
5857fneq1d 5469 . . . 4  |-  ( ph  ->  ( `' ( j  e.  ( ( K  -  N ) ... ( K  -  M
) )  |->  ( K  -  j ) )  Fn  ( M ... N )  <->  ( k  e.  ( M ... N
)  |->  ( K  -  k ) )  Fn  ( M ... N
) ) )
599, 58mpbiri 225 . . 3  |-  ( ph  ->  `' ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  |->  ( K  -  j ) )  Fn  ( M ... N
) )
60 dff1o4 5615 . . 3  |-  ( ( j  e.  ( ( K  -  N ) ... ( K  -  M ) )  |->  ( K  -  j ) ) : ( ( K  -  N ) ... ( K  -  M ) ) -1-1-onto-> ( M ... N )  <->  ( (
j  e.  ( ( K  -  N ) ... ( K  -  M ) )  |->  ( K  -  j ) )  Fn  ( ( K  -  N ) ... ( K  -  M ) )  /\  `' ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  |->  ( K  -  j ) )  Fn  ( M ... N
) ) )
616, 59, 60sylanbrc 646 . 2  |-  ( ph  ->  ( j  e.  ( ( K  -  N
) ... ( K  -  M ) )  |->  ( K  -  j ) ) : ( ( K  -  N ) ... ( K  -  M ) ) -1-1-onto-> ( M ... N ) )
62 oveq2 6021 . . . 4  |-  ( j  =  k  ->  ( K  -  j )  =  ( K  -  k ) )
6362, 4, 7fvmpt 5738 . . 3  |-  ( k  e.  ( ( K  -  N ) ... ( K  -  M
) )  ->  (
( j  e.  ( ( K  -  N
) ... ( K  -  M ) )  |->  ( K  -  j ) ) `  k )  =  ( K  -  k ) )
6463adantl 453 . 2  |-  ( (
ph  /\  k  e.  ( ( K  -  N ) ... ( K  -  M )
) )  ->  (
( j  e.  ( ( K  -  N
) ... ( K  -  M ) )  |->  ( K  -  j ) ) `  k )  =  ( K  -  k ) )
65 fsumrev.4 . 2  |-  ( (
ph  /\  j  e.  ( M ... N ) )  ->  A  e.  CC )
661, 2, 61, 64, 65fsumf1o 12437 1  |-  ( ph  -> 
sum_ j  e.  ( M ... N ) A  =  sum_ k  e.  ( ( K  -  N ) ... ( K  -  M )
) B )
Colors of variables: wff set class
Syntax hints:    -> wi 4    <-> wb 177    /\ wa 359    = wceq 1649    e. wcel 1717   {copab 4199    e. cmpt 4200   `'ccnv 4810    Fn wfn 5382   -1-1-onto->wf1o 5386   ` cfv 5387  (class class class)co 6013   CCcc 8914    - cmin 9216   ZZcz 10207   ...cfz 10968   sum_csu 12399
This theorem is referenced by:  fsumrev2  12485  birthdaylem2  20651
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1552  ax-5 1563  ax-17 1623  ax-9 1661  ax-8 1682  ax-13 1719  ax-14 1721  ax-6 1736  ax-7 1741  ax-11 1753  ax-12 1939  ax-ext 2361  ax-rep 4254  ax-sep 4264  ax-nul 4272  ax-pow 4311  ax-pr 4337  ax-un 4634  ax-inf2 7522  ax-cnex 8972  ax-resscn 8973  ax-1cn 8974  ax-icn 8975  ax-addcl 8976  ax-addrcl 8977  ax-mulcl 8978  ax-mulrcl 8979  ax-mulcom 8980  ax-addass 8981  ax-mulass 8982  ax-distr 8983  ax-i2m1 8984  ax-1ne0 8985  ax-1rid 8986  ax-rnegex 8987  ax-rrecex 8988  ax-cnre 8989  ax-pre-lttri 8990  ax-pre-lttrn 8991  ax-pre-ltadd 8992  ax-pre-mulgt0 8993  ax-pre-sup 8994
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1325  df-ex 1548  df-nf 1551  df-sb 1656  df-eu 2235  df-mo 2236  df-clab 2367  df-cleq 2373  df-clel 2376  df-nfc 2505  df-ne 2545  df-nel 2546  df-ral 2647  df-rex 2648  df-reu 2649  df-rmo 2650  df-rab 2651  df-v 2894  df-sbc 3098  df-csb 3188  df-dif 3259  df-un 3261  df-in 3263  df-ss 3270  df-pss 3272  df-nul 3565  df-if 3676  df-pw 3737  df-sn 3756  df-pr 3757  df-tp 3758  df-op 3759  df-uni 3951  df-int 3986  df-iun 4030  df-br 4147  df-opab 4201  df-mpt 4202  df-tr 4237  df-eprel 4428  df-id 4432  df-po 4437  df-so 4438  df-fr 4475  df-se 4476  df-we 4477  df-ord 4518  df-on 4519  df-lim 4520  df-suc 4521  df-om 4779  df-xp 4817  df-rel 4818  df-cnv 4819  df-co 4820  df-dm 4821  df-rn 4822  df-res 4823  df-ima 4824  df-iota 5351  df-fun 5389  df-fn 5390  df-f 5391  df-f1 5392  df-fo 5393  df-f1o 5394  df-fv 5395  df-isom 5396  df-ov 6016  df-oprab 6017  df-mpt2 6018  df-1st 6281  df-2nd 6282  df-riota 6478  df-recs 6562  df-rdg 6597  df-1o 6653  df-oadd 6657  df-er 6834  df-en 7039  df-dom 7040  df-sdom 7041  df-fin 7042  df-sup 7374  df-oi 7405  df-card 7752  df-pnf 9048  df-mnf 9049  df-xr 9050  df-ltxr 9051  df-le 9052  df-sub 9218  df-neg 9219  df-div 9603  df-nn 9926  df-2 9983  df-3 9984  df-n0 10147  df-z 10208  df-uz 10414  df-rp 10538  df-fz 10969  df-fzo 11059  df-seq 11244  df-exp 11303  df-hash 11539  df-cj 11824  df-re 11825  df-im 11826  df-sqr 11960  df-abs 11961  df-clim 12202  df-sum 12400
  Copyright terms: Public domain W3C validator