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

Theorem gsumval2a 14475
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 2296 . . . 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 2297 . . . 4  |-  ( ph  ->  ( `' F "
( _V  \  O
) )  =  ( `' F " ( _V 
\  O ) ) )
6 gsumval2.g . . . 4  |-  ( ph  ->  G  e.  V )
7 ovex 5899 . . . . 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 14468 . . 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 3585 . . . . 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 10251 . . . . . . 7  |-  ( N  e.  ( ZZ>= `  M
)  ->  M  e.  ZZ )
1614, 15syl 15 . . . . . 6  |-  ( ph  ->  M  e.  ZZ )
17 eluzelz 10254 . . . . . . 7  |-  ( N  e.  ( ZZ>= `  M
)  ->  N  e.  ZZ )
1814, 17syl 15 . . . . . 6  |-  ( ph  ->  N  e.  ZZ )
19 fzf 10802 . . . . . . . 8  |-  ... :
( ZZ  X.  ZZ )
--> ~P ZZ
20 ffn 5405 . . . . . . . 8  |-  ( ...
: ( ZZ  X.  ZZ ) --> ~P ZZ  ->  ... 
Fn  ( ZZ  X.  ZZ ) )
2119, 20ax-mp 8 . . . . . . 7  |-  ...  Fn  ( ZZ  X.  ZZ )
22 fnovrn 6011 . . . . . . 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 3584 . . . . 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 2328 . . 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 2328 . 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 5555 . . 3  |-  (  seq 
M (  .+  ,  F ) `  N
)  e.  _V
30 fzopth 10844 . . . . . . . . . . 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 11068 . . . . . . . . . . . . 13  |-  ( ( M  =  m  /\  N  =  n )  ->  seq  M (  .+  ,  F )  =  seq  m (  .+  ,  F ) )
34 simpr 447 . . . . . . . . . . . . 13  |-  ( ( M  =  m  /\  N  =  n )  ->  N  =  n )
3533, 34fveq12d 5547 . . . . . . . . . . . 12  |-  ( ( M  =  m  /\  N  =  n )  ->  (  seq  M ( 
.+  ,  F ) `
 N )  =  (  seq  m ( 
.+  ,  F ) `
 n ) )
3635eqcomd 2301 . . . . . . . . . . 11  |-  ( ( M  =  m  /\  N  =  n )  ->  (  seq  m ( 
.+  ,  F ) `
 n )  =  (  seq  M ( 
.+  ,  F ) `
 N ) )
37 eqeq1 2302 . . . . . . . . . . 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 2683 . . . . . . 7  |-  ( ph  ->  ( E. n  e.  ( ZZ>= `  m )
( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq  m (  .+  ,  F ) `  n
) )  ->  z  =  (  seq  M ( 
.+  ,  F ) `
 N ) ) )
4241exlimdv 1626 . . . . . 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 5882 . . . . . . . . . . . . 13  |-  ( n  =  N  ->  ( M ... n )  =  ( M ... N
) )
4544eqcomd 2301 . . . . . . . . . . . 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 5541 . . . . . . . . . . . 12  |-  ( n  =  N  ->  (  seq  M (  .+  ,  F ) `  n
)  =  (  seq 
M (  .+  ,  F ) `  N
) )
4847eqeq2d 2307 . . . . . . . . . . 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 2897 . . . . . . . . 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 5541 . . . . . . . . . 10  |-  ( m  =  M  ->  ( ZZ>=
`  m )  =  ( ZZ>= `  M )
)
53 oveq1 5881 . . . . . . . . . . . 12  |-  ( m  =  M  ->  (
m ... n )  =  ( M ... n
) )
5453eqeq2d 2307 . . . . . . . . . . 11  |-  ( m  =  M  ->  (
( M ... N
)  =  ( m ... n )  <->  ( M ... N )  =  ( M ... n ) ) )
55 seqeq1 11065 . . . . . . . . . . . . 13  |-  ( m  =  M  ->  seq  m (  .+  ,  F )  =  seq  M (  .+  ,  F
) )
5655fveq1d 5543 . . . . . . . . . . . 12  |-  ( m  =  M  ->  (  seq  m (  .+  ,  F ) `  n
)  =  (  seq 
M (  .+  ,  F ) `  n
) )
5756eqeq2d 2307 . . . . . . . . . . 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 2762 . . . . . . . . 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 2882 . . . . . . . 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 5255 . . 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 2328 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 1531    = wceq 1632    e. wcel 1696   A.wral 2556   E.wrex 2557   {crab 2560   _Vcvv 2801    \ cdif 3162    C_ wss 3165   ifcif 3578   ~Pcpw 3638    X. cxp 4703   `'ccnv 4704   ran crn 4706   "cima 4708    o. ccom 4709   iotacio 5233    Fn wfn 5266   -->wf 5267   -1-1-onto->wf1o 5270   ` cfv 5271  (class class class)co 5874   1c1 8754   ZZcz 10040   ZZ>=cuz 10246   ...cfz 10798    seq cseq 11062   #chash 11353   Basecbs 13164   +g cplusg 13224   0gc0g 13416    gsumg cgsu 13417
This theorem is referenced by:  gsumval2  14476
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1536  ax-5 1547  ax-17 1606  ax-9 1644  ax-8 1661  ax-13 1698  ax-14 1700  ax-6 1715  ax-7 1720  ax-11 1727  ax-12 1878  ax-ext 2277  ax-sep 4157  ax-nul 4165  ax-pow 4204  ax-pr 4230  ax-un 4528  ax-cnex 8809  ax-resscn 8810  ax-pre-lttri 8827  ax-pre-lttrn 8828
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 1532  df-nf 1535  df-sb 1639  df-eu 2160  df-mo 2161  df-clab 2283  df-cleq 2289  df-clel 2292  df-nfc 2421  df-ne 2461  df-nel 2462  df-ral 2561  df-rex 2562  df-rab 2565  df-v 2803  df-sbc 3005  df-csb 3095  df-dif 3168  df-un 3170  df-in 3172  df-ss 3179  df-nul 3469  df-if 3579  df-pw 3640  df-sn 3659  df-pr 3660  df-op 3662  df-uni 3844  df-iun 3923  df-br 4040  df-opab 4094  df-mpt 4095  df-id 4325  df-po 4330  df-so 4331  df-xp 4711  df-rel 4712  df-cnv 4713  df-co 4714  df-dm 4715  df-rn 4716  df-res 4717  df-ima 4718  df-iota 5235  df-fun 5273  df-fn 5274  df-f 5275  df-f1 5276  df-fo 5277  df-f1o 5278  df-fv 5279  df-ov 5877  df-oprab 5878  df-mpt2 5879  df-1st 6138  df-2nd 6139  df-recs 6404  df-rdg 6439  df-er 6676  df-en 6880  df-dom 6881  df-sdom 6882  df-pnf 8885  df-mnf 8886  df-xr 8887  df-ltxr 8888  df-le 8889  df-neg 9056  df-z 10041  df-uz 10247  df-fz 10799  df-seq 11063  df-gsum 13421
  Copyright terms: Public domain W3C validator