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

Theorem gsumval2a 14459
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 2283 . . . 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 2284 . . . 4  |-  ( ph  ->  ( `' F "
( _V  \  O
) )  =  ( `' F " ( _V 
\  O ) ) )
6 gsumval2.g . . . 4  |-  ( ph  ->  G  e.  V )
7 ovex 5883 . . . . 5  |-  ( M ... N )  e. 
_V
87a1i 10 . . . 4  |-  ( ph  ->  ( M ... N
)  e.  _V )
9 gsumval2.f . . . 4  |-  ( ph  ->  F : ( M ... N ) --> B )
101, 2, 3, 4, 5, 6, 8, 9gsumval 14452 . . 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 )
12 iffalse 3572 . . . . 5  |-  ( -. 
ran  F  C_  O  ->  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 ) ) ) ) ) ) ) )
1311, 12syl 15 . . . 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 ) ) ) ) ) ) ) )
14 gsumval2.n . . . . . . 7  |-  ( ph  ->  N  e.  ( ZZ>= `  M ) )
15 eluzel2 10235 . . . . . . 7  |-  ( N  e.  ( ZZ>= `  M
)  ->  M  e.  ZZ )
1614, 15syl 15 . . . . . 6  |-  ( ph  ->  M  e.  ZZ )
17 eluzelz 10238 . . . . . . 7  |-  ( N  e.  ( ZZ>= `  M
)  ->  N  e.  ZZ )
1814, 17syl 15 . . . . . 6  |-  ( ph  ->  N  e.  ZZ )
19 fzf 10786 . . . . . . . 8  |-  ... :
( ZZ  X.  ZZ )
--> ~P ZZ
20 ffn 5389 . . . . . . . 8  |-  ( ...
: ( ZZ  X.  ZZ ) --> ~P ZZ  ->  ... 
Fn  ( ZZ  X.  ZZ ) )
2119, 20ax-mp 8 . . . . . . 7  |-  ...  Fn  ( ZZ  X.  ZZ )
22 fnovrn 5995 . . . . . . 7  |-  ( ( ...  Fn  ( ZZ 
X.  ZZ )  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M ... N )  e. 
ran  ... )
2321, 22mp3an1 1264 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M ... N
)  e.  ran  ... )
2416, 18, 23syl2anc 642 . . . . 5  |-  ( ph  ->  ( M ... N
)  e.  ran  ... )
25 iftrue 3571 . . . . 5  |-  ( ( M ... N )  e.  ran  ...  ->  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 ) ) ) )
2624, 25syl 15 . . . 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 ) ) ) )
2713, 26eqtrd 2315 . . 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
) ) ) )
2810, 27eqtrd 2315 . 2  |-  ( ph  ->  ( G  gsumg  F )  =  ( iota z E. m E. n  e.  ( ZZ>=
`  m ) ( ( M ... N
)  =  ( m ... n )  /\  z  =  (  seq  m (  .+  ,  F ) `  n
) ) ) )
29 fvex 5539 . . 3  |-  (  seq 
M (  .+  ,  F ) `  N
)  e.  _V
30 fzopth 10828 . . . . . . . . . . 11  |-  ( N  e.  ( ZZ>= `  M
)  ->  ( ( M ... N )  =  ( m ... n
)  <->  ( M  =  m  /\  N  =  n ) ) )
3114, 30syl 15 . . . . . . . . . 10  |-  ( ph  ->  ( ( M ... N )  =  ( m ... n )  <-> 
( M  =  m  /\  N  =  n ) ) )
32 simpl 443 . . . . . . . . . . . . . 14  |-  ( ( M  =  m  /\  N  =  n )  ->  M  =  m )
3332seqeq1d 11052 . . . . . . . . . . . . 13  |-  ( ( M  =  m  /\  N  =  n )  ->  seq  M (  .+  ,  F )  =  seq  m (  .+  ,  F ) )
34 simpr 447 . . . . . . . . . . . . 13  |-  ( ( M  =  m  /\  N  =  n )  ->  N  =  n )
3533, 34fveq12d 5531 . . . . . . . . . . . 12  |-  ( ( M  =  m  /\  N  =  n )  ->  (  seq  M ( 
.+  ,  F ) `
 N )  =  (  seq  m ( 
.+  ,  F ) `
 n ) )
3635eqcomd 2288 . . . . . . . . . . 11  |-  ( ( M  =  m  /\  N  =  n )  ->  (  seq  m ( 
.+  ,  F ) `
 n )  =  (  seq  M ( 
.+  ,  F ) `
 N ) )
37 eqeq1 2289 . . . . . . . . . . 11  |-  ( z  =  (  seq  m
(  .+  ,  F
) `  n )  ->  ( z  =  (  seq  M (  .+  ,  F ) `  N
)  <->  (  seq  m
(  .+  ,  F
) `  n )  =  (  seq  M ( 
.+  ,  F ) `
 N ) ) )
3836, 37syl5ibrcom 213 . . . . . . . . . 10  |-  ( ( M  =  m  /\  N  =  n )  ->  ( z  =  (  seq  m (  .+  ,  F ) `  n
)  ->  z  =  (  seq  M (  .+  ,  F ) `  N
) ) )
3931, 38syl6bi 219 . . . . . . . . 9  |-  ( ph  ->  ( ( M ... N )  =  ( m ... n )  ->  ( z  =  (  seq  m ( 
.+  ,  F ) `
 n )  -> 
z  =  (  seq 
M (  .+  ,  F ) `  N
) ) ) )
4039imp3a 420 . . . . . . . 8  |-  ( ph  ->  ( ( ( M ... N )  =  ( m ... n
)  /\  z  =  (  seq  m (  .+  ,  F ) `  n
) )  ->  z  =  (  seq  M ( 
.+  ,  F ) `
 N ) ) )
4140rexlimdvw 2670 . . . . . . 7  |-  ( ph  ->  ( E. n  e.  ( ZZ>= `  m )
( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq  m (  .+  ,  F ) `  n
) )  ->  z  =  (  seq  M ( 
.+  ,  F ) `
 N ) ) )
4241exlimdv 1664 . . . . . 6  |-  ( ph  ->  ( E. m E. n  e.  ( ZZ>= `  m ) ( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq  m ( 
.+  ,  F ) `
 n ) )  ->  z  =  (  seq  M (  .+  ,  F ) `  N
) ) )
4316adantr 451 . . . . . . . 8  |-  ( (
ph  /\  z  =  (  seq  M (  .+  ,  F ) `  N
) )  ->  M  e.  ZZ )
44 oveq2 5866 . . . . . . . . . . . . 13  |-  ( n  =  N  ->  ( M ... n )  =  ( M ... N
) )
4544eqcomd 2288 . . . . . . . . . . . 12  |-  ( n  =  N  ->  ( M ... N )  =  ( M ... n
) )
4645biantrurd 494 . . . . . . . . . . 11  |-  ( n  =  N  ->  (
z  =  (  seq 
M (  .+  ,  F ) `  n
)  <->  ( ( M ... N )  =  ( M ... n
)  /\  z  =  (  seq  M (  .+  ,  F ) `  n
) ) ) )
47 fveq2 5525 . . . . . . . . . . . 12  |-  ( n  =  N  ->  (  seq  M (  .+  ,  F ) `  n
)  =  (  seq 
M (  .+  ,  F ) `  N
) )
4847eqeq2d 2294 . . . . . . . . . . 11  |-  ( n  =  N  ->  (
z  =  (  seq 
M (  .+  ,  F ) `  n
)  <->  z  =  (  seq  M (  .+  ,  F ) `  N
) ) )
4946, 48bitr3d 246 . . . . . . . . . 10  |-  ( n  =  N  ->  (
( ( M ... N )  =  ( M ... n )  /\  z  =  (  seq  M (  .+  ,  F ) `  n
) )  <->  z  =  (  seq  M (  .+  ,  F ) `  N
) ) )
5049rspcev 2884 . . . . . . . . 9  |-  ( ( N  e.  ( ZZ>= `  M )  /\  z  =  (  seq  M ( 
.+  ,  F ) `
 N ) )  ->  E. n  e.  (
ZZ>= `  M ) ( ( M ... N
)  =  ( M ... n )  /\  z  =  (  seq  M (  .+  ,  F
) `  n )
) )
5114, 50sylan 457 . . . . . . . 8  |-  ( (
ph  /\  z  =  (  seq  M (  .+  ,  F ) `  N
) )  ->  E. n  e.  ( ZZ>= `  M )
( ( M ... N )  =  ( M ... n )  /\  z  =  (  seq  M (  .+  ,  F ) `  n
) ) )
52 fveq2 5525 . . . . . . . . . 10  |-  ( m  =  M  ->  ( ZZ>=
`  m )  =  ( ZZ>= `  M )
)
53 oveq1 5865 . . . . . . . . . . . 12  |-  ( m  =  M  ->  (
m ... n )  =  ( M ... n
) )
5453eqeq2d 2294 . . . . . . . . . . 11  |-  ( m  =  M  ->  (
( M ... N
)  =  ( m ... n )  <->  ( M ... N )  =  ( M ... n ) ) )
55 seqeq1 11049 . . . . . . . . . . . . 13  |-  ( m  =  M  ->  seq  m (  .+  ,  F )  =  seq  M (  .+  ,  F
) )
5655fveq1d 5527 . . . . . . . . . . . 12  |-  ( m  =  M  ->  (  seq  m (  .+  ,  F ) `  n
)  =  (  seq 
M (  .+  ,  F ) `  n
) )
5756eqeq2d 2294 . . . . . . . . . . 11  |-  ( m  =  M  ->  (
z  =  (  seq  m (  .+  ,  F ) `  n
)  <->  z  =  (  seq  M (  .+  ,  F ) `  n
) ) )
5854, 57anbi12d 691 . . . . . . . . . 10  |-  ( m  =  M  ->  (
( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq  m (  .+  ,  F ) `  n
) )  <->  ( ( M ... N )  =  ( M ... n
)  /\  z  =  (  seq  M (  .+  ,  F ) `  n
) ) ) )
5952, 58rexeqbidv 2749 . . . . . . . . 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
) ) ) )
6059spcegv 2869 . . . . . . . 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
) ) ) )
6143, 51, 60sylc 56 . . . . . . 7  |-  ( (
ph  /\  z  =  (  seq  M (  .+  ,  F ) `  N
) )  ->  E. m E. n  e.  ( ZZ>=
`  m ) ( ( M ... N
)  =  ( m ... n )  /\  z  =  (  seq  m (  .+  ,  F ) `  n
) ) )
6261ex 423 . . . . . 6  |-  ( ph  ->  ( z  =  (  seq  M (  .+  ,  F ) `  N
)  ->  E. m E. n  e.  ( ZZ>=
`  m ) ( ( M ... N
)  =  ( m ... n )  /\  z  =  (  seq  m (  .+  ,  F ) `  n
) ) ) )
6342, 62impbid 183 . . . . 5  |-  ( ph  ->  ( E. m E. n  e.  ( ZZ>= `  m ) ( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq  m ( 
.+  ,  F ) `
 n ) )  <-> 
z  =  (  seq 
M (  .+  ,  F ) `  N
) ) )
6463adantr 451 . . . 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
) ) )
6564iota5 5239 . . 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
) )
6629, 65mpan2 652 . 2  |-  ( ph  ->  ( iota z E. m E. n  e.  ( ZZ>= `  m )
( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq  m (  .+  ,  F ) `  n
) ) )  =  (  seq  M ( 
.+  ,  F ) `
 N ) )
6728, 66eqtrd 2315 1  |-  ( ph  ->  ( G  gsumg  F )  =  (  seq  M (  .+  ,  F ) `  N
) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 176    /\ wa 358   E.wex 1528    = wceq 1623    e. wcel 1684   A.wral 2543   E.wrex 2544   {crab 2547   _Vcvv 2788    \ cdif 3149    C_ wss 3152   ifcif 3565   ~Pcpw 3625    X. cxp 4687   `'ccnv 4688   ran crn 4690   "cima 4692    o. ccom 4693   iotacio 5217    Fn wfn 5250   -->wf 5251   -1-1-onto->wf1o 5254   ` cfv 5255  (class class class)co 5858   1c1 8738   ZZcz 10024   ZZ>=cuz 10230   ...cfz 10782    seq cseq 11046   #chash 11337   Basecbs 13148   +g cplusg 13208   0gc0g 13400    gsumg cgsu 13401
This theorem is referenced by:  gsumval2  14460
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1533  ax-5 1544  ax-17 1603  ax-9 1635  ax-8 1643  ax-13 1686  ax-14 1688  ax-6 1703  ax-7 1708  ax-11 1715  ax-12 1866  ax-ext 2264  ax-sep 4141  ax-nul 4149  ax-pow 4188  ax-pr 4214  ax-un 4512  ax-cnex 8793  ax-resscn 8794  ax-pre-lttri 8811  ax-pre-lttrn 8812
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 935  df-3an 936  df-tru 1310  df-ex 1529  df-nf 1532  df-sb 1630  df-eu 2147  df-mo 2148  df-clab 2270  df-cleq 2276  df-clel 2279  df-nfc 2408  df-ne 2448  df-nel 2449  df-ral 2548  df-rex 2549  df-rab 2552  df-v 2790  df-sbc 2992  df-csb 3082  df-dif 3155  df-un 3157  df-in 3159  df-ss 3166  df-nul 3456  df-if 3566  df-pw 3627  df-sn 3646  df-pr 3647  df-op 3649  df-uni 3828  df-iun 3907  df-br 4024  df-opab 4078  df-mpt 4079  df-id 4309  df-po 4314  df-so 4315  df-xp 4695  df-rel 4696  df-cnv 4697  df-co 4698  df-dm 4699  df-rn 4700  df-res 4701  df-ima 4702  df-iota 5219  df-fun 5257  df-fn 5258  df-f 5259  df-f1 5260  df-fo 5261  df-f1o 5262  df-fv 5263  df-ov 5861  df-oprab 5862  df-mpt2 5863  df-1st 6122  df-2nd 6123  df-recs 6388  df-rdg 6423  df-er 6660  df-en 6864  df-dom 6865  df-sdom 6866  df-pnf 8869  df-mnf 8870  df-xr 8871  df-ltxr 8872  df-le 8873  df-neg 9040  df-z 10025  df-uz 10231  df-fz 10783  df-seq 11047  df-gsum 13405
  Copyright terms: Public domain W3C validator