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

Theorem gsumval2a 15527
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 2443 . . . 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 2444 . . . 4  |-  ( ph  ->  ( `' F "
( _V  \  O
) )  =  ( `' F " ( _V 
\  O ) ) )
6 gsumval2.g . . . 4  |-  ( ph  ->  G  e.  V )
7 ovex 6131 . . . . 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 15518 . . 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 3814 . . . . 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 10881 . . . . . . 7  |-  ( N  e.  ( ZZ>= `  M
)  ->  M  e.  ZZ )
1614, 15syl 16 . . . . . 6  |-  ( ph  ->  M  e.  ZZ )
17 eluzelz 10885 . . . . . . 7  |-  ( N  e.  ( ZZ>= `  M
)  ->  N  e.  ZZ )
1814, 17syl 16 . . . . . 6  |-  ( ph  ->  N  e.  ZZ )
19 fzf 11456 . . . . . . . 8  |-  ... :
( ZZ  X.  ZZ )
--> ~P ZZ
20 ffn 5574 . . . . . . . 8  |-  ( ...
: ( ZZ  X.  ZZ ) --> ~P ZZ  ->  ... 
Fn  ( ZZ  X.  ZZ ) )
2119, 20ax-mp 5 . . . . . . 7  |-  ...  Fn  ( ZZ  X.  ZZ )
22 fnovrn 6253 . . . . . . 7  |-  ( ( ...  Fn  ( ZZ 
X.  ZZ )  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M ... N )  e. 
ran  ... )
2321, 22mp3an1 1301 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M ... N
)  e.  ran  ... )
2416, 18, 23syl2anc 661 . . . . 5  |-  ( ph  ->  ( M ... N
)  e.  ran  ... )
25 iftrue 3812 . . . . 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 2475 . . 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 2475 . 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 5716 . . 3  |-  (  seq M (  .+  ,  F ) `  N
)  e.  _V
30 fzopth 11510 . . . . . . . . . . 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 457 . . . . . . . . . . . . . 14  |-  ( ( M  =  m  /\  N  =  n )  ->  M  =  m )
3332seqeq1d 11827 . . . . . . . . . . . . 13  |-  ( ( M  =  m  /\  N  =  n )  ->  seq M (  .+  ,  F )  =  seq m (  .+  ,  F ) )
34 simpr 461 . . . . . . . . . . . . 13  |-  ( ( M  =  m  /\  N  =  n )  ->  N  =  n )
3533, 34fveq12d 5712 . . . . . . . . . . . 12  |-  ( ( M  =  m  /\  N  =  n )  ->  (  seq M ( 
.+  ,  F ) `
 N )  =  (  seq m ( 
.+  ,  F ) `
 n ) )
3635eqcomd 2448 . . . . . . . . . . 11  |-  ( ( M  =  m  /\  N  =  n )  ->  (  seq m ( 
.+  ,  F ) `
 n )  =  (  seq M ( 
.+  ,  F ) `
 N ) )
37 eqeq1 2449 . . . . . . . . . . 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
) ) ) )
4039impd 431 . . . . . . . 8  |-  ( ph  ->  ( ( ( M ... N )  =  ( m ... n
)  /\  z  =  (  seq m (  .+  ,  F ) `  n
) )  ->  z  =  (  seq M ( 
.+  ,  F ) `
 N ) ) )
4140rexlimdvw 2859 . . . . . . 7  |-  ( ph  ->  ( E. n  e.  ( ZZ>= `  m )
( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq m (  .+  ,  F ) `  n
) )  ->  z  =  (  seq M ( 
.+  ,  F ) `
 N ) ) )
4241exlimdv 1690 . . . . . 6  |-  ( ph  ->  ( E. m E. n  e.  ( ZZ>= `  m ) ( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq m
(  .+  ,  F
) `  n )
)  ->  z  =  (  seq M (  .+  ,  F ) `  N
) ) )
4316adantr 465 . . . . . . . 8  |-  ( (
ph  /\  z  =  (  seq M (  .+  ,  F ) `  N
) )  ->  M  e.  ZZ )
44 oveq2 6114 . . . . . . . . . . . . 13  |-  ( n  =  N  ->  ( M ... n )  =  ( M ... N
) )
4544eqcomd 2448 . . . . . . . . . . . 12  |-  ( n  =  N  ->  ( M ... N )  =  ( M ... n
) )
4645biantrurd 508 . . . . . . . . . . 11  |-  ( n  =  N  ->  (
z  =  (  seq M (  .+  ,  F ) `  n
)  <->  ( ( M ... N )  =  ( M ... n
)  /\  z  =  (  seq M (  .+  ,  F ) `  n
) ) ) )
47 fveq2 5706 . . . . . . . . . . . 12  |-  ( n  =  N  ->  (  seq M (  .+  ,  F ) `  n
)  =  (  seq M (  .+  ,  F ) `  N
) )
4847eqeq2d 2454 . . . . . . . . . . 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 3088 . . . . . . . . 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 471 . . . . . . . 8  |-  ( (
ph  /\  z  =  (  seq M (  .+  ,  F ) `  N
) )  ->  E. n  e.  ( ZZ>= `  M )
( ( M ... N )  =  ( M ... n )  /\  z  =  (  seq M (  .+  ,  F ) `  n
) ) )
52 fveq2 5706 . . . . . . . . . 10  |-  ( m  =  M  ->  ( ZZ>=
`  m )  =  ( ZZ>= `  M )
)
53 oveq1 6113 . . . . . . . . . . . 12  |-  ( m  =  M  ->  (
m ... n )  =  ( M ... n
) )
5453eqeq2d 2454 . . . . . . . . . . 11  |-  ( m  =  M  ->  (
( M ... N
)  =  ( m ... n )  <->  ( M ... N )  =  ( M ... n ) ) )
55 seqeq1 11824 . . . . . . . . . . . . 13  |-  ( m  =  M  ->  seq m (  .+  ,  F )  =  seq M (  .+  ,  F ) )
5655fveq1d 5708 . . . . . . . . . . . 12  |-  ( m  =  M  ->  (  seq m (  .+  ,  F ) `  n
)  =  (  seq M (  .+  ,  F ) `  n
) )
5756eqeq2d 2454 . . . . . . . . . . 11  |-  ( m  =  M  ->  (
z  =  (  seq m (  .+  ,  F ) `  n
)  <->  z  =  (  seq M (  .+  ,  F ) `  n
) ) )
5854, 57anbi12d 710 . . . . . . . . . 10  |-  ( m  =  M  ->  (
( ( M ... N )  =  ( m ... n )  /\  z  =  (  seq m (  .+  ,  F ) `  n
) )  <->  ( ( M ... N )  =  ( M ... n
)  /\  z  =  (  seq M (  .+  ,  F ) `  n
) ) ) )
5952, 58rexeqbidv 2947 . . . . . . . . 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 3073 . . . . . . . 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 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
) ) )
6564iota5 5416 . . 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 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 ) )
6728, 66eqtrd 2475 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 1369   E.wex 1586    e. wcel 1756   A.wral 2730   E.wrex 2731   {crab 2734   _Vcvv 2987    \ cdif 3340    C_ wss 3343   ifcif 3806   ~Pcpw 3875    X. cxp 4853   `'ccnv 4854   ran crn 4856   "cima 4858    o. ccom 4859   iotacio 5394    Fn wfn 5428   -->wf 5429   -1-1-onto->wf1o 5432   ` cfv 5433  (class class class)co 6106   1c1 9298   ZZcz 10661   ZZ>=cuz 10876   ...cfz 11452    seqcseq 11821   #chash 12118   Basecbs 14189   +g cplusg 14253   0gc0g 14393    gsumg cgsu 14394
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1591  ax-4 1602  ax-5 1670  ax-6 1708  ax-7 1728  ax-8 1758  ax-9 1760  ax-10 1775  ax-11 1780  ax-12 1792  ax-13 1943  ax-ext 2423  ax-sep 4428  ax-nul 4436  ax-pow 4485  ax-pr 4546  ax-un 6387  ax-cnex 9353  ax-resscn 9354  ax-pre-lttri 9371  ax-pre-lttrn 9372
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1372  df-ex 1587  df-nf 1590  df-sb 1701  df-eu 2257  df-mo 2258  df-clab 2430  df-cleq 2436  df-clel 2439  df-nfc 2577  df-ne 2622  df-nel 2623  df-ral 2735  df-rex 2736  df-rab 2739  df-v 2989  df-sbc 3202  df-csb 3304  df-dif 3346  df-un 3348  df-in 3350  df-ss 3357  df-nul 3653  df-if 3807  df-pw 3877  df-sn 3893  df-pr 3895  df-op 3899  df-uni 4107  df-iun 4188  df-br 4308  df-opab 4366  df-mpt 4367  df-id 4651  df-po 4656  df-so 4657  df-xp 4861  df-rel 4862  df-cnv 4863  df-co 4864  df-dm 4865  df-rn 4866  df-res 4867  df-ima 4868  df-iota 5396  df-fun 5435  df-fn 5436  df-f 5437  df-f1 5438  df-fo 5439  df-f1o 5440  df-fv 5441  df-ov 6109  df-oprab 6110  df-mpt2 6111  df-1st 6592  df-2nd 6593  df-recs 6847  df-rdg 6881  df-er 7116  df-en 7326  df-dom 7327  df-sdom 7328  df-pnf 9435  df-mnf 9436  df-xr 9437  df-ltxr 9438  df-le 9439  df-neg 9613  df-z 10662  df-uz 10877  df-fz 11453  df-seq 11822  df-gsum 14396
This theorem is referenced by:  gsumval2  15528
  Copyright terms: Public domain W3C validator