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

Theorem gsumval2a 14782
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 2436 . . . 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 2437 . . . 4  |-  ( ph  ->  ( `' F "
( _V  \  O
) )  =  ( `' F " ( _V 
\  O ) ) )
6 gsumval2.g . . . 4  |-  ( ph  ->  G  e.  V )
7 ovex 6106 . . . . 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 14775 . . 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 3746 . . . . 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 16 . . . 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 10493 . . . . . . 7  |-  ( N  e.  ( ZZ>= `  M
)  ->  M  e.  ZZ )
1614, 15syl 16 . . . . . 6  |-  ( ph  ->  M  e.  ZZ )
17 eluzelz 10496 . . . . . . 7  |-  ( N  e.  ( ZZ>= `  M
)  ->  N  e.  ZZ )
1814, 17syl 16 . . . . . 6  |-  ( ph  ->  N  e.  ZZ )
19 fzf 11047 . . . . . . . 8  |-  ... :
( ZZ  X.  ZZ )
--> ~P ZZ
20 ffn 5591 . . . . . . . 8  |-  ( ...
: ( ZZ  X.  ZZ ) --> ~P ZZ  ->  ... 
Fn  ( ZZ  X.  ZZ ) )
2119, 20ax-mp 8 . . . . . . 7  |-  ...  Fn  ( ZZ  X.  ZZ )
22 fnovrn 6221 . . . . . . 7  |-  ( ( ...  Fn  ( ZZ 
X.  ZZ )  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M ... N )  e. 
ran  ... )
2321, 22mp3an1 1266 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M ... N
)  e.  ran  ... )
2416, 18, 23syl2anc 643 . . . . 5  |-  ( ph  ->  ( M ... N
)  e.  ran  ... )
25 iftrue 3745 . . . . 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 16 . . . 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 2468 . . 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 2468 . 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 5742 . . 3  |-  (  seq 
M (  .+  ,  F ) `  N
)  e.  _V
30 fzopth 11089 . . . . . . . . . . 11  |-  ( N  e.  ( ZZ>= `  M
)  ->  ( ( M ... N )  =  ( m ... n
)  <->  ( M  =  m  /\  N  =  n ) ) )
3114, 30syl 16 . . . . . . . . . 10  |-  ( ph  ->  ( ( M ... N )  =  ( m ... n )  <-> 
( M  =  m  /\  N  =  n ) ) )
32 simpl 444 . . . . . . . . . . . . . 14  |-  ( ( M  =  m  /\  N  =  n )  ->  M  =  m )
3332seqeq1d 11329 . . . . . . . . . . . . 13  |-  ( ( M  =  m  /\  N  =  n )  ->  seq  M (  .+  ,  F )  =  seq  m (  .+  ,  F ) )
34 simpr 448 . . . . . . . . . . . . 13  |-  ( ( M  =  m  /\  N  =  n )  ->  N  =  n )
3533, 34fveq12d 5734 . . . . . . . . . . . 12  |-  ( ( M  =  m  /\  N  =  n )  ->  (  seq  M ( 
.+  ,  F ) `
 N )  =  (  seq  m ( 
.+  ,  F ) `
 n ) )
3635eqcomd 2441 . . . . . . . . . . 11  |-  ( ( M  =  m  /\  N  =  n )  ->  (  seq  m ( 
.+  ,  F ) `
 n )  =  (  seq  M ( 
.+  ,  F ) `
 N ) )
37 eqeq1 2442 . . . . . . . . . . 11  |-  ( z  =  (  seq  m
(  .+  ,  F
) `  n )  ->  ( z  =  (  seq  M (  .+  ,  F ) `  N
)  <->  (  seq  m
(  .+  ,  F
) `  n )  =  (  seq  M ( 
.+  ,  F ) `
 N ) ) )
3836, 37syl5ibrcom 214 . . . . . . . . . 10  |-  ( ( M  =  m  /\  N  =  n )  ->  ( z  =  (  seq  m (  .+  ,  F ) `  n
)  ->  z  =  (  seq  M (  .+  ,  F ) `  N
) ) )
3931, 38syl6bi 220 . . . . . . . . 9  |-  ( ph  ->  ( ( M ... N )  =  ( m ... n )  ->  ( z  =  (  seq  m ( 
.+  ,  F ) `
 n )  -> 
z  =  (  seq 
M (  .+  ,  F ) `  N
) ) ) )
4039imp3a 421 . . . . . . . 8  |-  ( ph  ->  ( ( ( M ... N )  =  ( m ... n
)  /\  z  =  (  seq  m (  .+  ,  F ) `  n
) )  ->  z  =  (  seq  M ( 
.+  ,  F ) `
 N ) ) )
4140rexlimdvw 2833 . . . . . . 7  |-  ( ph  ->  ( E. n  e.  ( ZZ>= `  m )
( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq  m (  .+  ,  F ) `  n
) )  ->  z  =  (  seq  M ( 
.+  ,  F ) `
 N ) ) )
4241exlimdv 1646 . . . . . 6  |-  ( ph  ->  ( E. m E. n  e.  ( ZZ>= `  m ) ( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq  m ( 
.+  ,  F ) `
 n ) )  ->  z  =  (  seq  M (  .+  ,  F ) `  N
) ) )
4316adantr 452 . . . . . . . 8  |-  ( (
ph  /\  z  =  (  seq  M (  .+  ,  F ) `  N
) )  ->  M  e.  ZZ )
44 oveq2 6089 . . . . . . . . . . . . 13  |-  ( n  =  N  ->  ( M ... n )  =  ( M ... N
) )
4544eqcomd 2441 . . . . . . . . . . . 12  |-  ( n  =  N  ->  ( M ... N )  =  ( M ... n
) )
4645biantrurd 495 . . . . . . . . . . 11  |-  ( n  =  N  ->  (
z  =  (  seq 
M (  .+  ,  F ) `  n
)  <->  ( ( M ... N )  =  ( M ... n
)  /\  z  =  (  seq  M (  .+  ,  F ) `  n
) ) ) )
47 fveq2 5728 . . . . . . . . . . . 12  |-  ( n  =  N  ->  (  seq  M (  .+  ,  F ) `  n
)  =  (  seq 
M (  .+  ,  F ) `  N
) )
4847eqeq2d 2447 . . . . . . . . . . 11  |-  ( n  =  N  ->  (
z  =  (  seq 
M (  .+  ,  F ) `  n
)  <->  z  =  (  seq  M (  .+  ,  F ) `  N
) ) )
4946, 48bitr3d 247 . . . . . . . . . 10  |-  ( n  =  N  ->  (
( ( M ... N )  =  ( M ... n )  /\  z  =  (  seq  M (  .+  ,  F ) `  n
) )  <->  z  =  (  seq  M (  .+  ,  F ) `  N
) ) )
5049rspcev 3052 . . . . . . . . 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 458 . . . . . . . 8  |-  ( (
ph  /\  z  =  (  seq  M (  .+  ,  F ) `  N
) )  ->  E. n  e.  ( ZZ>= `  M )
( ( M ... N )  =  ( M ... n )  /\  z  =  (  seq  M (  .+  ,  F ) `  n
) ) )
52 fveq2 5728 . . . . . . . . . 10  |-  ( m  =  M  ->  ( ZZ>=
`  m )  =  ( ZZ>= `  M )
)
53 oveq1 6088 . . . . . . . . . . . 12  |-  ( m  =  M  ->  (
m ... n )  =  ( M ... n
) )
5453eqeq2d 2447 . . . . . . . . . . 11  |-  ( m  =  M  ->  (
( M ... N
)  =  ( m ... n )  <->  ( M ... N )  =  ( M ... n ) ) )
55 seqeq1 11326 . . . . . . . . . . . . 13  |-  ( m  =  M  ->  seq  m (  .+  ,  F )  =  seq  M (  .+  ,  F
) )
5655fveq1d 5730 . . . . . . . . . . . 12  |-  ( m  =  M  ->  (  seq  m (  .+  ,  F ) `  n
)  =  (  seq 
M (  .+  ,  F ) `  n
) )
5756eqeq2d 2447 . . . . . . . . . . 11  |-  ( m  =  M  ->  (
z  =  (  seq  m (  .+  ,  F ) `  n
)  <->  z  =  (  seq  M (  .+  ,  F ) `  n
) ) )
5854, 57anbi12d 692 . . . . . . . . . 10  |-  ( m  =  M  ->  (
( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq  m (  .+  ,  F ) `  n
) )  <->  ( ( M ... N )  =  ( M ... n
)  /\  z  =  (  seq  M (  .+  ,  F ) `  n
) ) ) )
5952, 58rexeqbidv 2917 . . . . . . . . 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 3037 . . . . . . . 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 58 . . . . . . 7  |-  ( (
ph  /\  z  =  (  seq  M (  .+  ,  F ) `  N
) )  ->  E. m E. n  e.  ( ZZ>=
`  m ) ( ( M ... N
)  =  ( m ... n )  /\  z  =  (  seq  m (  .+  ,  F ) `  n
) ) )
6261ex 424 . . . . . 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 184 . . . . 5  |-  ( ph  ->  ( E. m E. n  e.  ( ZZ>= `  m ) ( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq  m ( 
.+  ,  F ) `
 n ) )  <-> 
z  =  (  seq 
M (  .+  ,  F ) `  N
) ) )
6463adantr 452 . . . 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 5438 . . 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 653 . 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 2468 1  |-  ( ph  ->  ( G  gsumg  F )  =  (  seq  M (  .+  ,  F ) `  N
) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 177    /\ wa 359   E.wex 1550    = wceq 1652    e. wcel 1725   A.wral 2705   E.wrex 2706   {crab 2709   _Vcvv 2956    \ cdif 3317    C_ wss 3320   ifcif 3739   ~Pcpw 3799    X. cxp 4876   `'ccnv 4877   ran crn 4879   "cima 4881    o. ccom 4882   iotacio 5416    Fn wfn 5449   -->wf 5450   -1-1-onto->wf1o 5453   ` cfv 5454  (class class class)co 6081   1c1 8991   ZZcz 10282   ZZ>=cuz 10488   ...cfz 11043    seq cseq 11323   #chash 11618   Basecbs 13469   +g cplusg 13529   0gc0g 13723    gsumg cgsu 13724
This theorem is referenced by:  gsumval2  14783
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1555  ax-5 1566  ax-17 1626  ax-9 1666  ax-8 1687  ax-13 1727  ax-14 1729  ax-6 1744  ax-7 1749  ax-11 1761  ax-12 1950  ax-ext 2417  ax-sep 4330  ax-nul 4338  ax-pow 4377  ax-pr 4403  ax-un 4701  ax-cnex 9046  ax-resscn 9047  ax-pre-lttri 9064  ax-pre-lttrn 9065
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1328  df-ex 1551  df-nf 1554  df-sb 1659  df-eu 2285  df-mo 2286  df-clab 2423  df-cleq 2429  df-clel 2432  df-nfc 2561  df-ne 2601  df-nel 2602  df-ral 2710  df-rex 2711  df-rab 2714  df-v 2958  df-sbc 3162  df-csb 3252  df-dif 3323  df-un 3325  df-in 3327  df-ss 3334  df-nul 3629  df-if 3740  df-pw 3801  df-sn 3820  df-pr 3821  df-op 3823  df-uni 4016  df-iun 4095  df-br 4213  df-opab 4267  df-mpt 4268  df-id 4498  df-po 4503  df-so 4504  df-xp 4884  df-rel 4885  df-cnv 4886  df-co 4887  df-dm 4888  df-rn 4889  df-res 4890  df-ima 4891  df-iota 5418  df-fun 5456  df-fn 5457  df-f 5458  df-f1 5459  df-fo 5460  df-f1o 5461  df-fv 5462  df-ov 6084  df-oprab 6085  df-mpt2 6086  df-1st 6349  df-2nd 6350  df-recs 6633  df-rdg 6668  df-er 6905  df-en 7110  df-dom 7111  df-sdom 7112  df-pnf 9122  df-mnf 9123  df-xr 9124  df-ltxr 9125  df-le 9126  df-neg 9294  df-z 10283  df-uz 10489  df-fz 11044  df-seq 11324  df-gsum 13728
  Copyright terms: Public domain W3C validator