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

Theorem gsumval2a 15505
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 2441 . . . 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 2442 . . . 4  |-  ( ph  ->  ( `' F "
( _V  \  O
) )  =  ( `' F " ( _V 
\  O ) ) )
6 gsumval2.g . . . 4  |-  ( ph  ->  G  e.  V )
7 ovex 6115 . . . . 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 15498 . . 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 3796 . . . . 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 10862 . . . . . . 7  |-  ( N  e.  ( ZZ>= `  M
)  ->  M  e.  ZZ )
1614, 15syl 16 . . . . . 6  |-  ( ph  ->  M  e.  ZZ )
17 eluzelz 10866 . . . . . . 7  |-  ( N  e.  ( ZZ>= `  M
)  ->  N  e.  ZZ )
1814, 17syl 16 . . . . . 6  |-  ( ph  ->  N  e.  ZZ )
19 fzf 11437 . . . . . . . 8  |-  ... :
( ZZ  X.  ZZ )
--> ~P ZZ
20 ffn 5556 . . . . . . . 8  |-  ( ...
: ( ZZ  X.  ZZ ) --> ~P ZZ  ->  ... 
Fn  ( ZZ  X.  ZZ ) )
2119, 20ax-mp 5 . . . . . . 7  |-  ...  Fn  ( ZZ  X.  ZZ )
22 fnovrn 6237 . . . . . . 7  |-  ( ( ...  Fn  ( ZZ 
X.  ZZ )  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M ... N )  e. 
ran  ... )
2321, 22mp3an1 1296 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M ... N
)  e.  ran  ... )
2416, 18, 23syl2anc 656 . . . . 5  |-  ( ph  ->  ( M ... N
)  e.  ran  ... )
25 iftrue 3794 . . . . 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 2473 . . 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 2473 . 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 5698 . . 3  |-  (  seq M (  .+  ,  F ) `  N
)  e.  _V
30 fzopth 11491 . . . . . . . . . . 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 454 . . . . . . . . . . . . . 14  |-  ( ( M  =  m  /\  N  =  n )  ->  M  =  m )
3332seqeq1d 11808 . . . . . . . . . . . . 13  |-  ( ( M  =  m  /\  N  =  n )  ->  seq M (  .+  ,  F )  =  seq m (  .+  ,  F ) )
34 simpr 458 . . . . . . . . . . . . 13  |-  ( ( M  =  m  /\  N  =  n )  ->  N  =  n )
3533, 34fveq12d 5694 . . . . . . . . . . . 12  |-  ( ( M  =  m  /\  N  =  n )  ->  (  seq M ( 
.+  ,  F ) `
 N )  =  (  seq m ( 
.+  ,  F ) `
 n ) )
3635eqcomd 2446 . . . . . . . . . . 11  |-  ( ( M  =  m  /\  N  =  n )  ->  (  seq m ( 
.+  ,  F ) `
 n )  =  (  seq M ( 
.+  ,  F ) `
 N ) )
37 eqeq1 2447 . . . . . . . . . . 11  |-  ( z  =  (  seq m
(  .+  ,  F
) `  n )  ->  ( z  =  (  seq M (  .+  ,  F ) `  N
)  <->  (  seq m
(  .+  ,  F
) `  n )  =  (  seq M ( 
.+  ,  F ) `
 N ) ) )
3836, 37syl5ibrcom 222 . . . . . . . . . 10  |-  ( ( M  =  m  /\  N  =  n )  ->  ( z  =  (  seq m (  .+  ,  F ) `  n
)  ->  z  =  (  seq M (  .+  ,  F ) `  N
) ) )
3931, 38syl6bi 228 . . . . . . . . 9  |-  ( ph  ->  ( ( M ... N )  =  ( m ... n )  ->  ( z  =  (  seq m ( 
.+  ,  F ) `
 n )  -> 
z  =  (  seq M (  .+  ,  F ) `  N
) ) ) )
4039imp3a 431 . . . . . . . 8  |-  ( ph  ->  ( ( ( M ... N )  =  ( m ... n
)  /\  z  =  (  seq m (  .+  ,  F ) `  n
) )  ->  z  =  (  seq M ( 
.+  ,  F ) `
 N ) ) )
4140rexlimdvw 2842 . . . . . . 7  |-  ( ph  ->  ( E. n  e.  ( ZZ>= `  m )
( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq m (  .+  ,  F ) `  n
) )  ->  z  =  (  seq M ( 
.+  ,  F ) `
 N ) ) )
4241exlimdv 1695 . . . . . 6  |-  ( ph  ->  ( E. m E. n  e.  ( ZZ>= `  m ) ( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq m
(  .+  ,  F
) `  n )
)  ->  z  =  (  seq M (  .+  ,  F ) `  N
) ) )
4316adantr 462 . . . . . . . 8  |-  ( (
ph  /\  z  =  (  seq M (  .+  ,  F ) `  N
) )  ->  M  e.  ZZ )
44 oveq2 6098 . . . . . . . . . . . . 13  |-  ( n  =  N  ->  ( M ... n )  =  ( M ... N
) )
4544eqcomd 2446 . . . . . . . . . . . 12  |-  ( n  =  N  ->  ( M ... N )  =  ( M ... n
) )
4645biantrurd 505 . . . . . . . . . . 11  |-  ( n  =  N  ->  (
z  =  (  seq M (  .+  ,  F ) `  n
)  <->  ( ( M ... N )  =  ( M ... n
)  /\  z  =  (  seq M (  .+  ,  F ) `  n
) ) ) )
47 fveq2 5688 . . . . . . . . . . . 12  |-  ( n  =  N  ->  (  seq M (  .+  ,  F ) `  n
)  =  (  seq M (  .+  ,  F ) `  N
) )
4847eqeq2d 2452 . . . . . . . . . . 11  |-  ( n  =  N  ->  (
z  =  (  seq M (  .+  ,  F ) `  n
)  <->  z  =  (  seq M (  .+  ,  F ) `  N
) ) )
4946, 48bitr3d 255 . . . . . . . . . 10  |-  ( n  =  N  ->  (
( ( M ... N )  =  ( M ... n )  /\  z  =  (  seq M (  .+  ,  F ) `  n
) )  <->  z  =  (  seq M (  .+  ,  F ) `  N
) ) )
5049rspcev 3070 . . . . . . . . 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 468 . . . . . . . 8  |-  ( (
ph  /\  z  =  (  seq M (  .+  ,  F ) `  N
) )  ->  E. n  e.  ( ZZ>= `  M )
( ( M ... N )  =  ( M ... n )  /\  z  =  (  seq M (  .+  ,  F ) `  n
) ) )
52 fveq2 5688 . . . . . . . . . 10  |-  ( m  =  M  ->  ( ZZ>=
`  m )  =  ( ZZ>= `  M )
)
53 oveq1 6097 . . . . . . . . . . . 12  |-  ( m  =  M  ->  (
m ... n )  =  ( M ... n
) )
5453eqeq2d 2452 . . . . . . . . . . 11  |-  ( m  =  M  ->  (
( M ... N
)  =  ( m ... n )  <->  ( M ... N )  =  ( M ... n ) ) )
55 seqeq1 11805 . . . . . . . . . . . . 13  |-  ( m  =  M  ->  seq m (  .+  ,  F )  =  seq M (  .+  ,  F ) )
5655fveq1d 5690 . . . . . . . . . . . 12  |-  ( m  =  M  ->  (  seq m (  .+  ,  F ) `  n
)  =  (  seq M (  .+  ,  F ) `  n
) )
5756eqeq2d 2452 . . . . . . . . . . 11  |-  ( m  =  M  ->  (
z  =  (  seq m (  .+  ,  F ) `  n
)  <->  z  =  (  seq M (  .+  ,  F ) `  n
) ) )
5854, 57anbi12d 705 . . . . . . . . . 10  |-  ( m  =  M  ->  (
( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq m (  .+  ,  F ) `  n
) )  <->  ( ( M ... N )  =  ( M ... n
)  /\  z  =  (  seq M (  .+  ,  F ) `  n
) ) ) )
5952, 58rexeqbidv 2930 . . . . . . . . 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 3055 . . . . . . . 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 60 . . . . . . 7  |-  ( (
ph  /\  z  =  (  seq M (  .+  ,  F ) `  N
) )  ->  E. m E. n  e.  ( ZZ>=
`  m ) ( ( M ... N
)  =  ( m ... n )  /\  z  =  (  seq m (  .+  ,  F ) `  n
) ) )
6261ex 434 . . . . . 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 191 . . . . 5  |-  ( ph  ->  ( E. m E. n  e.  ( ZZ>= `  m ) ( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq m
(  .+  ,  F
) `  n )
)  <->  z  =  (  seq M (  .+  ,  F ) `  N
) ) )
6463adantr 462 . . . 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 5398 . . 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 666 . 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 2473 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 1364   E.wex 1591    e. wcel 1761   A.wral 2713   E.wrex 2714   {crab 2717   _Vcvv 2970    \ cdif 3322    C_ wss 3325   ifcif 3788   ~Pcpw 3857    X. cxp 4834   `'ccnv 4835   ran crn 4837   "cima 4839    o. ccom 4840   iotacio 5376    Fn wfn 5410   -->wf 5411   -1-1-onto->wf1o 5414   ` cfv 5415  (class class class)co 6090   1c1 9279   ZZcz 10642   ZZ>=cuz 10857   ...cfz 11433    seqcseq 11802   #chash 12099   Basecbs 14170   +g cplusg 14234   0gc0g 14374    gsumg cgsu 14375
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1596  ax-4 1607  ax-5 1675  ax-6 1713  ax-7 1733  ax-8 1763  ax-9 1765  ax-10 1780  ax-11 1785  ax-12 1797  ax-13 1948  ax-ext 2422  ax-sep 4410  ax-nul 4418  ax-pow 4467  ax-pr 4528  ax-un 6371  ax-cnex 9334  ax-resscn 9335  ax-pre-lttri 9352  ax-pre-lttrn 9353
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 961  df-3an 962  df-tru 1367  df-ex 1592  df-nf 1595  df-sb 1706  df-eu 2261  df-mo 2262  df-clab 2428  df-cleq 2434  df-clel 2437  df-nfc 2566  df-ne 2606  df-nel 2607  df-ral 2718  df-rex 2719  df-rab 2722  df-v 2972  df-sbc 3184  df-csb 3286  df-dif 3328  df-un 3330  df-in 3332  df-ss 3339  df-nul 3635  df-if 3789  df-pw 3859  df-sn 3875  df-pr 3877  df-op 3881  df-uni 4089  df-iun 4170  df-br 4290  df-opab 4348  df-mpt 4349  df-id 4632  df-po 4637  df-so 4638  df-xp 4842  df-rel 4843  df-cnv 4844  df-co 4845  df-dm 4846  df-rn 4847  df-res 4848  df-ima 4849  df-iota 5378  df-fun 5417  df-fn 5418  df-f 5419  df-f1 5420  df-fo 5421  df-f1o 5422  df-fv 5423  df-ov 6093  df-oprab 6094  df-mpt2 6095  df-1st 6576  df-2nd 6577  df-recs 6828  df-rdg 6862  df-er 7097  df-en 7307  df-dom 7308  df-sdom 7309  df-pnf 9416  df-mnf 9417  df-xr 9418  df-ltxr 9419  df-le 9420  df-neg 9594  df-z 10643  df-uz 10858  df-fz 11434  df-seq 11803  df-gsum 14377
This theorem is referenced by:  gsumval2  15506
  Copyright terms: Public domain W3C validator