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

Theorem fsumrev 13619
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 12009 . 2  |-  ( ph  ->  ( ( K  -  N ) ... ( K  -  M )
)  e.  Fin )
3 ovex 6246 . . . . 5  |-  ( K  -  j )  e. 
_V
4 eqid 2396 . . . . 5  |-  ( j  e.  ( ( K  -  N ) ... ( K  -  M
) )  |->  ( K  -  j ) )  =  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  |->  ( K  -  j ) )
53, 4fnmpti 5634 . . . 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 6246 . . . . 5  |-  ( K  -  k )  e. 
_V
8 eqid 2396 . . . . 5  |-  ( k  e.  ( M ... N )  |->  ( K  -  k ) )  =  ( k  e.  ( M ... N
)  |->  ( K  -  k ) )
97, 8fnmpti 5634 . . . 4  |-  ( k  e.  ( M ... N )  |->  ( K  -  k ) )  Fn  ( M ... N )
10 simprr 755 . . . . . . . . 9  |-  ( (
ph  /\  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) )  -> 
k  =  ( K  -  j ) )
11 simprl 754 . . . . . . . . . 10  |-  ( (
ph  /\  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) )  -> 
j  e.  ( ( K  -  N ) ... ( K  -  M ) ) )
12 fsumrev.2 . . . . . . . . . . . 12  |-  ( ph  ->  M  e.  ZZ )
1312adantr 463 . . . . . . . . . . 11  |-  ( (
ph  /\  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) )  ->  M  e.  ZZ )
14 fsumrev.3 . . . . . . . . . . . 12  |-  ( ph  ->  N  e.  ZZ )
1514adantr 463 . . . . . . . . . . 11  |-  ( (
ph  /\  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) )  ->  N  e.  ZZ )
16 fsumrev.1 . . . . . . . . . . . 12  |-  ( ph  ->  K  e.  ZZ )
1716adantr 463 . . . . . . . . . . 11  |-  ( (
ph  /\  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) )  ->  K  e.  ZZ )
18 elfzelz 11631 . . . . . . . . . . . 12  |-  ( j  e.  ( ( K  -  N ) ... ( K  -  M
) )  ->  j  e.  ZZ )
1911, 18syl 16 . . . . . . . . . . 11  |-  ( (
ph  /\  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) )  -> 
j  e.  ZZ )
20 fzrev 11686 . . . . . . . . . . 11  |-  ( ( ( 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 1227 . . . . . . . . . 10  |-  ( (
ph  /\  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) )  -> 
( j  e.  ( ( K  -  N
) ... ( K  -  M ) )  <->  ( K  -  j )  e.  ( M ... N
) ) )
2211, 21mpbid 210 . . . . . . . . 9  |-  ( (
ph  /\  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) )  -> 
( K  -  j
)  e.  ( M ... N ) )
2310, 22eqeltrd 2484 . . . . . . . 8  |-  ( (
ph  /\  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) )  -> 
k  e.  ( M ... N ) )
2410oveq2d 6234 . . . . . . . . 9  |-  ( (
ph  /\  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) )  -> 
( K  -  k
)  =  ( K  -  ( K  -  j ) ) )
25 zcn 10808 . . . . . . . . . . 11  |-  ( K  e.  ZZ  ->  K  e.  CC )
26 zcn 10808 . . . . . . . . . . 11  |-  ( j  e.  ZZ  ->  j  e.  CC )
27 nncan 9783 . . . . . . . . . . 11  |-  ( ( K  e.  CC  /\  j  e.  CC )  ->  ( K  -  ( K  -  j )
)  =  j )
2825, 26, 27syl2an 475 . . . . . . . . . 10  |-  ( ( K  e.  ZZ  /\  j  e.  ZZ )  ->  ( K  -  ( K  -  j )
)  =  j )
2917, 19, 28syl2anc 659 . . . . . . . . 9  |-  ( (
ph  /\  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) )  -> 
( K  -  ( K  -  j )
)  =  j )
3024, 29eqtr2d 2438 . . . . . . . 8  |-  ( (
ph  /\  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) )  -> 
j  =  ( K  -  k ) )
3123, 30jca 530 . . . . . . 7  |-  ( (
ph  /\  ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) ) )  -> 
( k  e.  ( M ... N )  /\  j  =  ( K  -  k ) ) )
32 simprr 755 . . . . . . . . 9  |-  ( (
ph  /\  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) )  -> 
j  =  ( K  -  k ) )
33 simprl 754 . . . . . . . . . 10  |-  ( (
ph  /\  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) )  -> 
k  e.  ( M ... N ) )
3412adantr 463 . . . . . . . . . . 11  |-  ( (
ph  /\  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) )  ->  M  e.  ZZ )
3514adantr 463 . . . . . . . . . . 11  |-  ( (
ph  /\  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) )  ->  N  e.  ZZ )
3616adantr 463 . . . . . . . . . . 11  |-  ( (
ph  /\  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) )  ->  K  e.  ZZ )
37 elfzelz 11631 . . . . . . . . . . . 12  |-  ( k  e.  ( M ... N )  ->  k  e.  ZZ )
3833, 37syl 16 . . . . . . . . . . 11  |-  ( (
ph  /\  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) )  -> 
k  e.  ZZ )
39 fzrev2 11687 . . . . . . . . . . 11  |-  ( ( ( 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 1227 . . . . . . . . . 10  |-  ( (
ph  /\  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) )  -> 
( k  e.  ( M ... N )  <-> 
( K  -  k
)  e.  ( ( K  -  N ) ... ( K  -  M ) ) ) )
4133, 40mpbid 210 . . . . . . . . 9  |-  ( (
ph  /\  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) )  -> 
( K  -  k
)  e.  ( ( K  -  N ) ... ( K  -  M ) ) )
4232, 41eqeltrd 2484 . . . . . . . 8  |-  ( (
ph  /\  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) )  -> 
j  e.  ( ( K  -  N ) ... ( K  -  M ) ) )
4332oveq2d 6234 . . . . . . . . 9  |-  ( (
ph  /\  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) )  -> 
( K  -  j
)  =  ( K  -  ( K  -  k ) ) )
44 zcn 10808 . . . . . . . . . . 11  |-  ( k  e.  ZZ  ->  k  e.  CC )
45 nncan 9783 . . . . . . . . . . 11  |-  ( ( K  e.  CC  /\  k  e.  CC )  ->  ( K  -  ( K  -  k )
)  =  k )
4625, 44, 45syl2an 475 . . . . . . . . . 10  |-  ( ( K  e.  ZZ  /\  k  e.  ZZ )  ->  ( K  -  ( K  -  k )
)  =  k )
4736, 38, 46syl2anc 659 . . . . . . . . 9  |-  ( (
ph  /\  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) )  -> 
( K  -  ( K  -  k )
)  =  k )
4843, 47eqtr2d 2438 . . . . . . . 8  |-  ( (
ph  /\  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) )  -> 
k  =  ( K  -  j ) )
4942, 48jca 530 . . . . . . 7  |-  ( (
ph  /\  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) )  -> 
( j  e.  ( ( K  -  N
) ... ( K  -  M ) )  /\  k  =  ( K  -  j ) ) )
5031, 49impbida 830 . . . . . 6  |-  ( ph  ->  ( ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  /\  k  =  ( K  -  j
) )  <->  ( k  e.  ( M ... N
)  /\  j  =  ( K  -  k
) ) ) )
5150mptcnv 5335 . . . . 5  |-  ( ph  ->  `' ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  |->  ( K  -  j ) )  =  ( k  e.  ( M ... N ) 
|->  ( K  -  k
) ) )
5251fneq1d 5596 . . . 4  |-  ( ph  ->  ( `' ( j  e.  ( ( K  -  N ) ... ( K  -  M
) )  |->  ( K  -  j ) )  Fn  ( M ... N )  <->  ( k  e.  ( M ... N
)  |->  ( K  -  k ) )  Fn  ( M ... N
) ) )
539, 52mpbiri 233 . . 3  |-  ( ph  ->  `' ( j  e.  ( ( K  -  N ) ... ( K  -  M )
)  |->  ( K  -  j ) )  Fn  ( M ... N
) )
54 dff1o4 5749 . . 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
) ) )
556, 53, 54sylanbrc 662 . 2  |-  ( ph  ->  ( j  e.  ( ( K  -  N
) ... ( K  -  M ) )  |->  ( K  -  j ) ) : ( ( K  -  N ) ... ( K  -  M ) ) -1-1-onto-> ( M ... N ) )
56 oveq2 6226 . . . 4  |-  ( j  =  k  ->  ( K  -  j )  =  ( K  -  k ) )
5756, 4, 7fvmpt 5874 . . 3  |-  ( k  e.  ( ( K  -  N ) ... ( K  -  M
) )  ->  (
( j  e.  ( ( K  -  N
) ... ( K  -  M ) )  |->  ( K  -  j ) ) `  k )  =  ( K  -  k ) )
5857adantl 464 . 2  |-  ( (
ph  /\  k  e.  ( ( K  -  N ) ... ( K  -  M )
) )  ->  (
( j  e.  ( ( K  -  N
) ... ( K  -  M ) )  |->  ( K  -  j ) ) `  k )  =  ( K  -  k ) )
59 fsumrev.4 . 2  |-  ( (
ph  /\  j  e.  ( M ... N ) )  ->  A  e.  CC )
601, 2, 55, 58, 59fsumf1o 13570 1  |-  ( ph  -> 
sum_ j  e.  ( M ... N ) A  =  sum_ k  e.  ( ( K  -  N ) ... ( K  -  M )
) B )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    /\ wa 367    = wceq 1399    e. wcel 1836    |-> cmpt 4442   `'ccnv 4929    Fn wfn 5508   -1-1-onto->wf1o 5512   ` cfv 5513  (class class class)co 6218   CCcc 9423    - cmin 9740   ZZcz 10803   ...cfz 11615   sum_csu 13533
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1633  ax-4 1646  ax-5 1719  ax-6 1765  ax-7 1808  ax-8 1838  ax-9 1840  ax-10 1855  ax-11 1860  ax-12 1872  ax-13 2020  ax-ext 2374  ax-rep 4495  ax-sep 4505  ax-nul 4513  ax-pow 4560  ax-pr 4618  ax-un 6513  ax-inf2 7994  ax-cnex 9481  ax-resscn 9482  ax-1cn 9483  ax-icn 9484  ax-addcl 9485  ax-addrcl 9486  ax-mulcl 9487  ax-mulrcl 9488  ax-mulcom 9489  ax-addass 9490  ax-mulass 9491  ax-distr 9492  ax-i2m1 9493  ax-1ne0 9494  ax-1rid 9495  ax-rnegex 9496  ax-rrecex 9497  ax-cnre 9498  ax-pre-lttri 9499  ax-pre-lttrn 9500  ax-pre-ltadd 9501  ax-pre-mulgt0 9502  ax-pre-sup 9503
This theorem depends on definitions:  df-bi 185  df-or 368  df-an 369  df-3or 972  df-3an 973  df-tru 1402  df-fal 1405  df-ex 1628  df-nf 1632  df-sb 1758  df-eu 2236  df-mo 2237  df-clab 2382  df-cleq 2388  df-clel 2391  df-nfc 2546  df-ne 2593  df-nel 2594  df-ral 2751  df-rex 2752  df-reu 2753  df-rmo 2754  df-rab 2755  df-v 3053  df-sbc 3270  df-csb 3366  df-dif 3409  df-un 3411  df-in 3413  df-ss 3420  df-pss 3422  df-nul 3729  df-if 3875  df-pw 3946  df-sn 3962  df-pr 3964  df-tp 3966  df-op 3968  df-uni 4181  df-int 4217  df-iun 4262  df-br 4385  df-opab 4443  df-mpt 4444  df-tr 4478  df-eprel 4722  df-id 4726  df-po 4731  df-so 4732  df-fr 4769  df-se 4770  df-we 4771  df-ord 4812  df-on 4813  df-lim 4814  df-suc 4815  df-xp 4936  df-rel 4937  df-cnv 4938  df-co 4939  df-dm 4940  df-rn 4941  df-res 4942  df-ima 4943  df-iota 5477  df-fun 5515  df-fn 5516  df-f 5517  df-f1 5518  df-fo 5519  df-f1o 5520  df-fv 5521  df-isom 5522  df-riota 6180  df-ov 6221  df-oprab 6222  df-mpt2 6223  df-om 6622  df-1st 6721  df-2nd 6722  df-recs 6982  df-rdg 7016  df-1o 7070  df-oadd 7074  df-er 7251  df-en 7458  df-dom 7459  df-sdom 7460  df-fin 7461  df-sup 7838  df-oi 7872  df-card 8255  df-pnf 9563  df-mnf 9564  df-xr 9565  df-ltxr 9566  df-le 9567  df-sub 9742  df-neg 9743  df-div 10146  df-nn 10475  df-2 10533  df-3 10534  df-n0 10735  df-z 10804  df-uz 11024  df-rp 11162  df-fz 11616  df-fzo 11740  df-seq 12034  df-exp 12093  df-hash 12331  df-cj 12957  df-re 12958  df-im 12959  df-sqrt 13093  df-abs 13094  df-clim 13336  df-sum 13534
This theorem is referenced by:  fsumrev2  13622  birthdaylem2  23422
  Copyright terms: Public domain W3C validator