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

Theorem gsumval2a 15779
Description: Value of the group sum operation over a finite set of sequential integers. (Contributed by Mario Carneiro, 7-Dec-2014.)
Hypotheses
Ref Expression
gsumval2.b  |-  B  =  ( Base `  G
)
gsumval2.p  |-  .+  =  ( +g  `  G )
gsumval2.g  |-  ( ph  ->  G  e.  V )
gsumval2.n  |-  ( ph  ->  N  e.  ( ZZ>= `  M ) )
gsumval2.f  |-  ( ph  ->  F : ( M ... N ) --> B )
gsumval2a.o  |-  O  =  { x  e.  B  |  A. y  e.  B  ( ( x  .+  y )  =  y  /\  ( y  .+  x )  =  y ) }
gsumval2a.f  |-  ( ph  ->  -.  ran  F  C_  O )
Assertion
Ref Expression
gsumval2a  |-  ( ph  ->  ( G  gsumg  F )  =  (  seq M (  .+  ,  F ) `  N
) )
Distinct variable groups:    x, y, B    x, G, y    x, V    x,  .+ , y
Allowed substitution hints:    ph( x, y)    F( x, y)    M( x, y)    N( x, y)    O( x, y)    V( y)

Proof of Theorem gsumval2a
Dummy variables  z 
f  m  n are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 gsumval2.b . . . 4  |-  B  =  ( Base `  G
)
2 eqid 2467 . . . 4  |-  ( 0g
`  G )  =  ( 0g `  G
)
3 gsumval2.p . . . 4  |-  .+  =  ( +g  `  G )
4 gsumval2a.o . . . 4  |-  O  =  { x  e.  B  |  A. y  e.  B  ( ( x  .+  y )  =  y  /\  ( y  .+  x )  =  y ) }
5 eqidd 2468 . . . 4  |-  ( ph  ->  ( `' F "
( _V  \  O
) )  =  ( `' F " ( _V 
\  O ) ) )
6 gsumval2.g . . . 4  |-  ( ph  ->  G  e.  V )
7 ovex 6320 . . . . 5  |-  ( M ... N )  e. 
_V
87a1i 11 . . . 4  |-  ( ph  ->  ( M ... N
)  e.  _V )
9 gsumval2.f . . . 4  |-  ( ph  ->  F : ( M ... N ) --> B )
101, 2, 3, 4, 5, 6, 8, 9gsumval 15771 . . 3  |-  ( ph  ->  ( G  gsumg  F )  =  if ( ran  F  C_  O ,  ( 0g `  G ) ,  if ( ( M ... N )  e.  ran  ...
,  ( iota z E. m E. n  e.  ( ZZ>= `  m )
( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq m (  .+  ,  F ) `  n
) ) ) ,  ( iota z E. f ( f : ( 1 ... ( # `
 ( `' F " ( _V  \  O
) ) ) ) -1-1-onto-> ( `' F " ( _V 
\  O ) )  /\  z  =  (  seq 1 (  .+  ,  ( F  o.  f ) ) `  ( # `  ( `' F " ( _V 
\  O ) ) ) ) ) ) ) ) )
11 gsumval2a.f . . . . 5  |-  ( ph  ->  -.  ran  F  C_  O )
1211iffalsed 3956 . . . 4  |-  ( ph  ->  if ( ran  F  C_  O ,  ( 0g
`  G ) ,  if ( ( M ... N )  e. 
ran  ... ,  ( iota z E. m E. n  e.  ( ZZ>= `  m ) ( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq m
(  .+  ,  F
) `  n )
) ) ,  ( iota z E. f
( f : ( 1 ... ( # `  ( `' F "
( _V  \  O
) ) ) ) -1-1-onto-> ( `' F " ( _V 
\  O ) )  /\  z  =  (  seq 1 (  .+  ,  ( F  o.  f ) ) `  ( # `  ( `' F " ( _V 
\  O ) ) ) ) ) ) ) )  =  if ( ( M ... N )  e.  ran  ...
,  ( iota z E. m E. n  e.  ( ZZ>= `  m )
( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq m (  .+  ,  F ) `  n
) ) ) ,  ( iota z E. f ( f : ( 1 ... ( # `
 ( `' F " ( _V  \  O
) ) ) ) -1-1-onto-> ( `' F " ( _V 
\  O ) )  /\  z  =  (  seq 1 (  .+  ,  ( F  o.  f ) ) `  ( # `  ( `' F " ( _V 
\  O ) ) ) ) ) ) ) )
13 gsumval2.n . . . . . . 7  |-  ( ph  ->  N  e.  ( ZZ>= `  M ) )
14 eluzel2 11099 . . . . . . 7  |-  ( N  e.  ( ZZ>= `  M
)  ->  M  e.  ZZ )
1513, 14syl 16 . . . . . 6  |-  ( ph  ->  M  e.  ZZ )
16 eluzelz 11103 . . . . . . 7  |-  ( N  e.  ( ZZ>= `  M
)  ->  N  e.  ZZ )
1713, 16syl 16 . . . . . 6  |-  ( ph  ->  N  e.  ZZ )
18 fzf 11688 . . . . . . . 8  |-  ... :
( ZZ  X.  ZZ )
--> ~P ZZ
19 ffn 5737 . . . . . . . 8  |-  ( ...
: ( ZZ  X.  ZZ ) --> ~P ZZ  ->  ... 
Fn  ( ZZ  X.  ZZ ) )
2018, 19ax-mp 5 . . . . . . 7  |-  ...  Fn  ( ZZ  X.  ZZ )
21 fnovrn 6445 . . . . . . 7  |-  ( ( ...  Fn  ( ZZ 
X.  ZZ )  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M ... N )  e. 
ran  ... )
2220, 21mp3an1 1311 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M ... N
)  e.  ran  ... )
2315, 17, 22syl2anc 661 . . . . 5  |-  ( ph  ->  ( M ... N
)  e.  ran  ... )
2423iftrued 3953 . . . 4  |-  ( ph  ->  if ( ( M ... N )  e. 
ran  ... ,  ( iota z E. m E. n  e.  ( ZZ>= `  m ) ( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq m
(  .+  ,  F
) `  n )
) ) ,  ( iota z E. f
( f : ( 1 ... ( # `  ( `' F "
( _V  \  O
) ) ) ) -1-1-onto-> ( `' F " ( _V 
\  O ) )  /\  z  =  (  seq 1 (  .+  ,  ( F  o.  f ) ) `  ( # `  ( `' F " ( _V 
\  O ) ) ) ) ) ) )  =  ( iota z E. m E. n  e.  ( ZZ>= `  m ) ( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq m
(  .+  ,  F
) `  n )
) ) )
2512, 24eqtrd 2508 . . 3  |-  ( ph  ->  if ( ran  F  C_  O ,  ( 0g
`  G ) ,  if ( ( M ... N )  e. 
ran  ... ,  ( iota z E. m E. n  e.  ( ZZ>= `  m ) ( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq m
(  .+  ,  F
) `  n )
) ) ,  ( iota z E. f
( f : ( 1 ... ( # `  ( `' F "
( _V  \  O
) ) ) ) -1-1-onto-> ( `' F " ( _V 
\  O ) )  /\  z  =  (  seq 1 (  .+  ,  ( F  o.  f ) ) `  ( # `  ( `' F " ( _V 
\  O ) ) ) ) ) ) ) )  =  ( iota z E. m E. n  e.  ( ZZ>=
`  m ) ( ( M ... N
)  =  ( m ... n )  /\  z  =  (  seq m (  .+  ,  F ) `  n
) ) ) )
2610, 25eqtrd 2508 . 2  |-  ( ph  ->  ( G  gsumg  F )  =  ( iota z E. m E. n  e.  ( ZZ>=
`  m ) ( ( M ... N
)  =  ( m ... n )  /\  z  =  (  seq m (  .+  ,  F ) `  n
) ) ) )
27 fvex 5882 . . 3  |-  (  seq M (  .+  ,  F ) `  N
)  e.  _V
28 fzopth 11732 . . . . . . . . . . 11  |-  ( N  e.  ( ZZ>= `  M
)  ->  ( ( M ... N )  =  ( m ... n
)  <->  ( M  =  m  /\  N  =  n ) ) )
2913, 28syl 16 . . . . . . . . . 10  |-  ( ph  ->  ( ( M ... N )  =  ( m ... n )  <-> 
( M  =  m  /\  N  =  n ) ) )
30 simpl 457 . . . . . . . . . . . . . 14  |-  ( ( M  =  m  /\  N  =  n )  ->  M  =  m )
3130seqeq1d 12093 . . . . . . . . . . . . 13  |-  ( ( M  =  m  /\  N  =  n )  ->  seq M (  .+  ,  F )  =  seq m (  .+  ,  F ) )
32 simpr 461 . . . . . . . . . . . . 13  |-  ( ( M  =  m  /\  N  =  n )  ->  N  =  n )
3331, 32fveq12d 5878 . . . . . . . . . . . 12  |-  ( ( M  =  m  /\  N  =  n )  ->  (  seq M ( 
.+  ,  F ) `
 N )  =  (  seq m ( 
.+  ,  F ) `
 n ) )
3433eqcomd 2475 . . . . . . . . . . 11  |-  ( ( M  =  m  /\  N  =  n )  ->  (  seq m ( 
.+  ,  F ) `
 n )  =  (  seq M ( 
.+  ,  F ) `
 N ) )
35 eqeq1 2471 . . . . . . . . . . 11  |-  ( z  =  (  seq m
(  .+  ,  F
) `  n )  ->  ( z  =  (  seq M (  .+  ,  F ) `  N
)  <->  (  seq m
(  .+  ,  F
) `  n )  =  (  seq M ( 
.+  ,  F ) `
 N ) ) )
3634, 35syl5ibrcom 222 . . . . . . . . . 10  |-  ( ( M  =  m  /\  N  =  n )  ->  ( z  =  (  seq m (  .+  ,  F ) `  n
)  ->  z  =  (  seq M (  .+  ,  F ) `  N
) ) )
3729, 36syl6bi 228 . . . . . . . . 9  |-  ( ph  ->  ( ( M ... N )  =  ( m ... n )  ->  ( z  =  (  seq m ( 
.+  ,  F ) `
 n )  -> 
z  =  (  seq M (  .+  ,  F ) `  N
) ) ) )
3837impd 431 . . . . . . . 8  |-  ( ph  ->  ( ( ( M ... N )  =  ( m ... n
)  /\  z  =  (  seq m (  .+  ,  F ) `  n
) )  ->  z  =  (  seq M ( 
.+  ,  F ) `
 N ) ) )
3938rexlimdvw 2962 . . . . . . 7  |-  ( ph  ->  ( E. n  e.  ( ZZ>= `  m )
( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq m (  .+  ,  F ) `  n
) )  ->  z  =  (  seq M ( 
.+  ,  F ) `
 N ) ) )
4039exlimdv 1700 . . . . . 6  |-  ( ph  ->  ( E. m E. n  e.  ( ZZ>= `  m ) ( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq m
(  .+  ,  F
) `  n )
)  ->  z  =  (  seq M (  .+  ,  F ) `  N
) ) )
4115adantr 465 . . . . . . . 8  |-  ( (
ph  /\  z  =  (  seq M (  .+  ,  F ) `  N
) )  ->  M  e.  ZZ )
42 oveq2 6303 . . . . . . . . . . . . 13  |-  ( n  =  N  ->  ( M ... n )  =  ( M ... N
) )
4342eqcomd 2475 . . . . . . . . . . . 12  |-  ( n  =  N  ->  ( M ... N )  =  ( M ... n
) )
4443biantrurd 508 . . . . . . . . . . 11  |-  ( n  =  N  ->  (
z  =  (  seq M (  .+  ,  F ) `  n
)  <->  ( ( M ... N )  =  ( M ... n
)  /\  z  =  (  seq M (  .+  ,  F ) `  n
) ) ) )
45 fveq2 5872 . . . . . . . . . . . 12  |-  ( n  =  N  ->  (  seq M (  .+  ,  F ) `  n
)  =  (  seq M (  .+  ,  F ) `  N
) )
4645eqeq2d 2481 . . . . . . . . . . 11  |-  ( n  =  N  ->  (
z  =  (  seq M (  .+  ,  F ) `  n
)  <->  z  =  (  seq M (  .+  ,  F ) `  N
) ) )
4744, 46bitr3d 255 . . . . . . . . . 10  |-  ( n  =  N  ->  (
( ( M ... N )  =  ( M ... n )  /\  z  =  (  seq M (  .+  ,  F ) `  n
) )  <->  z  =  (  seq M (  .+  ,  F ) `  N
) ) )
4847rspcev 3219 . . . . . . . . 9  |-  ( ( N  e.  ( ZZ>= `  M )  /\  z  =  (  seq M ( 
.+  ,  F ) `
 N ) )  ->  E. n  e.  (
ZZ>= `  M ) ( ( M ... N
)  =  ( M ... n )  /\  z  =  (  seq M (  .+  ,  F ) `  n
) ) )
4913, 48sylan 471 . . . . . . . 8  |-  ( (
ph  /\  z  =  (  seq M (  .+  ,  F ) `  N
) )  ->  E. n  e.  ( ZZ>= `  M )
( ( M ... N )  =  ( M ... n )  /\  z  =  (  seq M (  .+  ,  F ) `  n
) ) )
50 fveq2 5872 . . . . . . . . . 10  |-  ( m  =  M  ->  ( ZZ>=
`  m )  =  ( ZZ>= `  M )
)
51 oveq1 6302 . . . . . . . . . . . 12  |-  ( m  =  M  ->  (
m ... n )  =  ( M ... n
) )
5251eqeq2d 2481 . . . . . . . . . . 11  |-  ( m  =  M  ->  (
( M ... N
)  =  ( m ... n )  <->  ( M ... N )  =  ( M ... n ) ) )
53 seqeq1 12090 . . . . . . . . . . . . 13  |-  ( m  =  M  ->  seq m (  .+  ,  F )  =  seq M (  .+  ,  F ) )
5453fveq1d 5874 . . . . . . . . . . . 12  |-  ( m  =  M  ->  (  seq m (  .+  ,  F ) `  n
)  =  (  seq M (  .+  ,  F ) `  n
) )
5554eqeq2d 2481 . . . . . . . . . . 11  |-  ( m  =  M  ->  (
z  =  (  seq m (  .+  ,  F ) `  n
)  <->  z  =  (  seq M (  .+  ,  F ) `  n
) ) )
5652, 55anbi12d 710 . . . . . . . . . 10  |-  ( m  =  M  ->  (
( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq m (  .+  ,  F ) `  n
) )  <->  ( ( M ... N )  =  ( M ... n
)  /\  z  =  (  seq M (  .+  ,  F ) `  n
) ) ) )
5750, 56rexeqbidv 3078 . . . . . . . . 9  |-  ( m  =  M  ->  ( E. n  e.  ( ZZ>=
`  m ) ( ( M ... N
)  =  ( m ... n )  /\  z  =  (  seq m (  .+  ,  F ) `  n
) )  <->  E. n  e.  ( ZZ>= `  M )
( ( M ... N )  =  ( M ... n )  /\  z  =  (  seq M (  .+  ,  F ) `  n
) ) ) )
5857spcegv 3204 . . . . . . . 8  |-  ( M  e.  ZZ  ->  ( E. n  e.  ( ZZ>=
`  M ) ( ( M ... N
)  =  ( M ... n )  /\  z  =  (  seq M (  .+  ,  F ) `  n
) )  ->  E. m E. n  e.  ( ZZ>=
`  m ) ( ( M ... N
)  =  ( m ... n )  /\  z  =  (  seq m (  .+  ,  F ) `  n
) ) ) )
5941, 49, 58sylc 60 . . . . . . 7  |-  ( (
ph  /\  z  =  (  seq M (  .+  ,  F ) `  N
) )  ->  E. m E. n  e.  ( ZZ>=
`  m ) ( ( M ... N
)  =  ( m ... n )  /\  z  =  (  seq m (  .+  ,  F ) `  n
) ) )
6059ex 434 . . . . . 6  |-  ( ph  ->  ( z  =  (  seq M (  .+  ,  F ) `  N
)  ->  E. m E. n  e.  ( ZZ>=
`  m ) ( ( M ... N
)  =  ( m ... n )  /\  z  =  (  seq m (  .+  ,  F ) `  n
) ) ) )
6140, 60impbid 191 . . . . 5  |-  ( ph  ->  ( E. m E. n  e.  ( ZZ>= `  m ) ( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq m
(  .+  ,  F
) `  n )
)  <->  z  =  (  seq M (  .+  ,  F ) `  N
) ) )
6261adantr 465 . . . 4  |-  ( (
ph  /\  (  seq M (  .+  ,  F ) `  N
)  e.  _V )  ->  ( E. m E. n  e.  ( ZZ>= `  m ) ( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq m
(  .+  ,  F
) `  n )
)  <->  z  =  (  seq M (  .+  ,  F ) `  N
) ) )
6362iota5 5577 . . 3  |-  ( (
ph  /\  (  seq M (  .+  ,  F ) `  N
)  e.  _V )  ->  ( iota z E. m E. n  e.  ( ZZ>= `  m )
( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq m (  .+  ,  F ) `  n
) ) )  =  (  seq M ( 
.+  ,  F ) `
 N ) )
6427, 63mpan2 671 . 2  |-  ( ph  ->  ( iota z E. m E. n  e.  ( ZZ>= `  m )
( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq m (  .+  ,  F ) `  n
) ) )  =  (  seq M ( 
.+  ,  F ) `
 N ) )
6526, 64eqtrd 2508 1  |-  ( ph  ->  ( G  gsumg  F )  =  (  seq M (  .+  ,  F ) `  N
) )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 184    /\ wa 369    = wceq 1379   E.wex 1596    e. wcel 1767   A.wral 2817   E.wrex 2818   {crab 2821   _Vcvv 3118    \ cdif 3478    C_ wss 3481   ifcif 3945   ~Pcpw 4016    X. cxp 5003   `'ccnv 5004   ran crn 5006   "cima 5008    o. ccom 5009   iotacio 5555    Fn wfn 5589   -->wf 5590   -1-1-onto->wf1o 5593   ` cfv 5594  (class class class)co 6295   1c1 9505   ZZcz 10876   ZZ>=cuz 11094   ...cfz 11684    seqcseq 12087   #chash 12385   Basecbs 14506   +g cplusg 14571   0gc0g 14711    gsumg cgsu 14712
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1601  ax-4 1612  ax-5 1680  ax-6 1719  ax-7 1739  ax-8 1769  ax-9 1771  ax-10 1786  ax-11 1791  ax-12 1803  ax-13 1968  ax-ext 2445  ax-sep 4574  ax-nul 4582  ax-pow 4631  ax-pr 4692  ax-un 6587  ax-cnex 9560  ax-resscn 9561  ax-pre-lttri 9578  ax-pre-lttrn 9579
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 974  df-3an 975  df-tru 1382  df-ex 1597  df-nf 1600  df-sb 1712  df-eu 2279  df-mo 2280  df-clab 2453  df-cleq 2459  df-clel 2462  df-nfc 2617  df-ne 2664  df-nel 2665  df-ral 2822  df-rex 2823  df-rab 2826  df-v 3120  df-sbc 3337  df-csb 3441  df-dif 3484  df-un 3486  df-in 3488  df-ss 3495  df-nul 3791  df-if 3946  df-pw 4018  df-sn 4034  df-pr 4036  df-op 4040  df-uni 4252  df-iun 4333  df-br 4454  df-opab 4512  df-mpt 4513  df-id 4801  df-po 4806  df-so 4807  df-xp 5011  df-rel 5012  df-cnv 5013  df-co 5014  df-dm 5015  df-rn 5016  df-res 5017  df-ima 5018  df-iota 5557  df-fun 5596  df-fn 5597  df-f 5598  df-f1 5599  df-fo 5600  df-f1o 5601  df-fv 5602  df-ov 6298  df-oprab 6299  df-mpt2 6300  df-1st 6795  df-2nd 6796  df-recs 7054  df-rdg 7088  df-er 7323  df-en 7529  df-dom 7530  df-sdom 7531  df-pnf 9642  df-mnf 9643  df-xr 9644  df-ltxr 9645  df-le 9646  df-neg 9820  df-z 10877  df-uz 11095  df-fz 11685  df-seq 12088  df-gsum 14714
This theorem is referenced by:  gsumval2  15780
  Copyright terms: Public domain W3C validator