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

Theorem sumeq2w 13477
Description: Equality theorem for sum, when the class expressions  B and  C are equal everywhere. Proved using only Extensionality. (Contributed by Mario Carneiro, 24-Jun-2014.) (Revised by Mario Carneiro, 13-Jun-2019.)
Assertion
Ref Expression
sumeq2w  |-  ( A. k  B  =  C  -> 
sum_ k  e.  A  B  =  sum_ k  e.  A  C )

Proof of Theorem sumeq2w
Dummy variables  f  m  n  x are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 vex 3116 . . . . . . . . . . 11  |-  n  e. 
_V
2 nfcv 2629 . . . . . . . . . . . 12  |-  F/_ k
n
3 nfcsb1v 3451 . . . . . . . . . . . . 13  |-  F/_ k [_ n  /  k ]_ B
4 nfcsb1v 3451 . . . . . . . . . . . . 13  |-  F/_ k [_ n  /  k ]_ C
53, 4nfeq 2640 . . . . . . . . . . . 12  |-  F/ k
[_ n  /  k ]_ B  =  [_ n  /  k ]_ C
6 csbeq1a 3444 . . . . . . . . . . . . 13  |-  ( k  =  n  ->  B  =  [_ n  /  k ]_ B )
7 csbeq1a 3444 . . . . . . . . . . . . 13  |-  ( k  =  n  ->  C  =  [_ n  /  k ]_ C )
86, 7eqeq12d 2489 . . . . . . . . . . . 12  |-  ( k  =  n  ->  ( B  =  C  <->  [_ n  / 
k ]_ B  =  [_ n  /  k ]_ C
) )
92, 5, 8spcgf 3193 . . . . . . . . . . 11  |-  ( n  e.  _V  ->  ( A. k  B  =  C  ->  [_ n  /  k ]_ B  =  [_ n  /  k ]_ C
) )
101, 9ax-mp 5 . . . . . . . . . 10  |-  ( A. k  B  =  C  ->  [_ n  /  k ]_ B  =  [_ n  /  k ]_ C
)
11 ifeq1 3943 . . . . . . . . . 10  |-  ( [_ n  /  k ]_ B  =  [_ n  /  k ]_ C  ->  if ( n  e.  A ,  [_ n  /  k ]_ B ,  0 )  =  if ( n  e.  A ,  [_ n  /  k ]_ C ,  0 ) )
1210, 11syl 16 . . . . . . . . 9  |-  ( A. k  B  =  C  ->  if ( n  e.  A ,  [_ n  /  k ]_ B ,  0 )  =  if ( n  e.  A ,  [_ n  /  k ]_ C ,  0 ) )
1312mpteq2dv 4534 . . . . . . . 8  |-  ( A. k  B  =  C  ->  ( n  e.  ZZ  |->  if ( n  e.  A ,  [_ n  /  k ]_ B ,  0 ) )  =  ( n  e.  ZZ  |->  if ( n  e.  A ,  [_ n  /  k ]_ C ,  0 ) ) )
1413seqeq3d 12083 . . . . . . 7  |-  ( A. k  B  =  C  ->  seq m (  +  ,  ( n  e.  ZZ  |->  if ( n  e.  A ,  [_ n  /  k ]_ B ,  0 ) ) )  =  seq m
(  +  ,  ( n  e.  ZZ  |->  if ( n  e.  A ,  [_ n  /  k ]_ C ,  0 ) ) ) )
1514breq1d 4457 . . . . . 6  |-  ( A. k  B  =  C  ->  (  seq m (  +  ,  ( n  e.  ZZ  |->  if ( n  e.  A ,  [_ n  /  k ]_ B ,  0 ) ) )  ~~>  x  <->  seq m
(  +  ,  ( n  e.  ZZ  |->  if ( n  e.  A ,  [_ n  /  k ]_ C ,  0 ) ) )  ~~>  x ) )
1615anbi2d 703 . . . . 5  |-  ( A. k  B  =  C  ->  ( ( A  C_  ( ZZ>= `  m )  /\  seq m (  +  ,  ( n  e.  ZZ  |->  if ( n  e.  A ,  [_ n  /  k ]_ B ,  0 ) ) )  ~~>  x )  <->  ( A  C_  ( ZZ>= `  m )  /\  seq m (  +  ,  ( n  e.  ZZ  |->  if ( n  e.  A ,  [_ n  /  k ]_ C ,  0 ) ) )  ~~>  x ) ) )
1716rexbidv 2973 . . . 4  |-  ( A. k  B  =  C  ->  ( E. m  e.  ZZ  ( A  C_  ( ZZ>= `  m )  /\  seq m (  +  ,  ( n  e.  ZZ  |->  if ( n  e.  A ,  [_ n  /  k ]_ B ,  0 ) ) )  ~~>  x )  <->  E. m  e.  ZZ  ( A  C_  ( ZZ>= `  m )  /\  seq m (  +  ,  ( n  e.  ZZ  |->  if ( n  e.  A ,  [_ n  /  k ]_ C ,  0 ) ) )  ~~>  x ) ) )
18 fvex 5876 . . . . . . . . . . . 12  |-  ( f `
 n )  e. 
_V
19 nfcv 2629 . . . . . . . . . . . . 13  |-  F/_ k
( f `  n
)
20 nfcsb1v 3451 . . . . . . . . . . . . . 14  |-  F/_ k [_ ( f `  n
)  /  k ]_ B
21 nfcsb1v 3451 . . . . . . . . . . . . . 14  |-  F/_ k [_ ( f `  n
)  /  k ]_ C
2220, 21nfeq 2640 . . . . . . . . . . . . 13  |-  F/ k
[_ ( f `  n )  /  k ]_ B  =  [_ (
f `  n )  /  k ]_ C
23 csbeq1a 3444 . . . . . . . . . . . . . 14  |-  ( k  =  ( f `  n )  ->  B  =  [_ ( f `  n )  /  k ]_ B )
24 csbeq1a 3444 . . . . . . . . . . . . . 14  |-  ( k  =  ( f `  n )  ->  C  =  [_ ( f `  n )  /  k ]_ C )
2523, 24eqeq12d 2489 . . . . . . . . . . . . 13  |-  ( k  =  ( f `  n )  ->  ( B  =  C  <->  [_ ( f `
 n )  / 
k ]_ B  =  [_ ( f `  n
)  /  k ]_ C ) )
2619, 22, 25spcgf 3193 . . . . . . . . . . . 12  |-  ( ( f `  n )  e.  _V  ->  ( A. k  B  =  C  ->  [_ ( f `  n )  /  k ]_ B  =  [_ (
f `  n )  /  k ]_ C
) )
2718, 26ax-mp 5 . . . . . . . . . . 11  |-  ( A. k  B  =  C  ->  [_ ( f `  n )  /  k ]_ B  =  [_ (
f `  n )  /  k ]_ C
)
2827mpteq2dv 4534 . . . . . . . . . 10  |-  ( A. k  B  =  C  ->  ( n  e.  NN  |->  [_ ( f `  n
)  /  k ]_ B )  =  ( n  e.  NN  |->  [_ ( f `  n
)  /  k ]_ C ) )
2928seqeq3d 12083 . . . . . . . . 9  |-  ( A. k  B  =  C  ->  seq 1 (  +  ,  ( n  e.  NN  |->  [_ ( f `  n )  /  k ]_ B ) )  =  seq 1 (  +  ,  ( n  e.  NN  |->  [_ ( f `  n )  /  k ]_ C ) ) )
3029fveq1d 5868 . . . . . . . 8  |-  ( A. k  B  =  C  ->  (  seq 1 (  +  ,  ( n  e.  NN  |->  [_ (
f `  n )  /  k ]_ B
) ) `  m
)  =  (  seq 1 (  +  , 
( n  e.  NN  |->  [_ ( f `  n
)  /  k ]_ C ) ) `  m ) )
3130eqeq2d 2481 . . . . . . 7  |-  ( A. k  B  =  C  ->  ( x  =  (  seq 1 (  +  ,  ( n  e.  NN  |->  [_ ( f `  n )  /  k ]_ B ) ) `  m )  <->  x  =  (  seq 1 (  +  ,  ( n  e.  NN  |->  [_ ( f `  n )  /  k ]_ C ) ) `  m ) ) )
3231anbi2d 703 . . . . . 6  |-  ( A. k  B  =  C  ->  ( ( f : ( 1 ... m
)
-1-1-onto-> A  /\  x  =  (  seq 1 (  +  ,  ( n  e.  NN  |->  [_ ( f `  n )  /  k ]_ B ) ) `  m ) )  <->  ( f : ( 1 ... m ) -1-1-onto-> A  /\  x  =  (  seq 1 (  +  ,  ( n  e.  NN  |->  [_ (
f `  n )  /  k ]_ C
) ) `  m
) ) ) )
3332exbidv 1690 . . . . 5  |-  ( A. k  B  =  C  ->  ( E. f ( f : ( 1 ... m ) -1-1-onto-> A  /\  x  =  (  seq 1 (  +  , 
( n  e.  NN  |->  [_ ( f `  n
)  /  k ]_ B ) ) `  m ) )  <->  E. f
( f : ( 1 ... m ) -1-1-onto-> A  /\  x  =  (  seq 1 (  +  ,  ( n  e.  NN  |->  [_ ( f `  n )  /  k ]_ C ) ) `  m ) ) ) )
3433rexbidv 2973 . . . 4  |-  ( A. k  B  =  C  ->  ( E. m  e.  NN  E. f ( f : ( 1 ... m ) -1-1-onto-> A  /\  x  =  (  seq 1 (  +  , 
( n  e.  NN  |->  [_ ( f `  n
)  /  k ]_ B ) ) `  m ) )  <->  E. m  e.  NN  E. f ( f : ( 1 ... m ) -1-1-onto-> A  /\  x  =  (  seq 1 (  +  , 
( n  e.  NN  |->  [_ ( f `  n
)  /  k ]_ C ) ) `  m ) ) ) )
3517, 34orbi12d 709 . . 3  |-  ( A. k  B  =  C  ->  ( ( E. m  e.  ZZ  ( A  C_  ( ZZ>= `  m )  /\  seq m (  +  ,  ( n  e.  ZZ  |->  if ( n  e.  A ,  [_ n  /  k ]_ B ,  0 ) ) )  ~~>  x )  \/ 
E. m  e.  NN  E. f ( f : ( 1 ... m
)
-1-1-onto-> A  /\  x  =  (  seq 1 (  +  ,  ( n  e.  NN  |->  [_ ( f `  n )  /  k ]_ B ) ) `  m ) ) )  <-> 
( E. m  e.  ZZ  ( A  C_  ( ZZ>= `  m )  /\  seq m (  +  ,  ( n  e.  ZZ  |->  if ( n  e.  A ,  [_ n  /  k ]_ C ,  0 ) ) )  ~~>  x )  \/ 
E. m  e.  NN  E. f ( f : ( 1 ... m
)
-1-1-onto-> A  /\  x  =  (  seq 1 (  +  ,  ( n  e.  NN  |->  [_ ( f `  n )  /  k ]_ C ) ) `  m ) ) ) ) )
3635iotabidv 5572 . 2  |-  ( A. k  B  =  C  ->  ( iota x ( E. m  e.  ZZ  ( A  C_  ( ZZ>= `  m )  /\  seq m (  +  , 
( n  e.  ZZ  |->  if ( n  e.  A ,  [_ n  /  k ]_ B ,  0 ) ) )  ~~>  x )  \/  E. m  e.  NN  E. f ( f : ( 1 ... m ) -1-1-onto-> A  /\  x  =  (  seq 1 (  +  , 
( n  e.  NN  |->  [_ ( f `  n
)  /  k ]_ B ) ) `  m ) ) ) )  =  ( iota
x ( E. m  e.  ZZ  ( A  C_  ( ZZ>= `  m )  /\  seq m (  +  ,  ( n  e.  ZZ  |->  if ( n  e.  A ,  [_ n  /  k ]_ C ,  0 ) ) )  ~~>  x )  \/ 
E. m  e.  NN  E. f ( f : ( 1 ... m
)
-1-1-onto-> A  /\  x  =  (  seq 1 (  +  ,  ( n  e.  NN  |->  [_ ( f `  n )  /  k ]_ C ) ) `  m ) ) ) ) )
37 df-sum 13472 . 2  |-  sum_ k  e.  A  B  =  ( iota x ( E. m  e.  ZZ  ( A  C_  ( ZZ>= `  m
)  /\  seq m
(  +  ,  ( n  e.  ZZ  |->  if ( n  e.  A ,  [_ n  /  k ]_ B ,  0 ) ) )  ~~>  x )  \/  E. m  e.  NN  E. f ( f : ( 1 ... m ) -1-1-onto-> A  /\  x  =  (  seq 1 (  +  , 
( n  e.  NN  |->  [_ ( f `  n
)  /  k ]_ B ) ) `  m ) ) ) )
38 df-sum 13472 . 2  |-  sum_ k  e.  A  C  =  ( iota x ( E. m  e.  ZZ  ( A  C_  ( ZZ>= `  m
)  /\  seq m
(  +  ,  ( n  e.  ZZ  |->  if ( n  e.  A ,  [_ n  /  k ]_ C ,  0 ) ) )  ~~>  x )  \/  E. m  e.  NN  E. f ( f : ( 1 ... m ) -1-1-onto-> A  /\  x  =  (  seq 1 (  +  , 
( n  e.  NN  |->  [_ ( f `  n
)  /  k ]_ C ) ) `  m ) ) ) )
3936, 37, 383eqtr4g 2533 1  |-  ( A. k  B  =  C  -> 
sum_ k  e.  A  B  =  sum_ k  e.  A  C )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    \/ wo 368    /\ wa 369   A.wal 1377    = wceq 1379   E.wex 1596    e. wcel 1767   E.wrex 2815   _Vcvv 3113   [_csb 3435    C_ wss 3476   ifcif 3939   class class class wbr 4447    |-> cmpt 4505   iotacio 5549   -1-1-onto->wf1o 5587   ` cfv 5588  (class class class)co 6284   0cc0 9492   1c1 9493    + caddc 9495   NNcn 10536   ZZcz 10864   ZZ>=cuz 11082   ...cfz 11672    seqcseq 12075    ~~> cli 13270   sum_csu 13471
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1601  ax-4 1612  ax-5 1680  ax-6 1719  ax-7 1739  ax-10 1786  ax-11 1791  ax-12 1803  ax-13 1968  ax-ext 2445  ax-nul 4576
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3an 975  df-tru 1382  df-ex 1597  df-nf 1600  df-sb 1712  df-eu 2279  df-clab 2453  df-cleq 2459  df-clel 2462  df-nfc 2617  df-ne 2664  df-ral 2819  df-rex 2820  df-rab 2823  df-v 3115  df-sbc 3332  df-csb 3436  df-dif 3479  df-un 3481  df-in 3483  df-ss 3490  df-nul 3786  df-if 3940  df-sn 4028  df-pr 4030  df-op 4034  df-uni 4246  df-br 4448  df-opab 4506  df-mpt 4507  df-cnv 5007  df-dm 5009  df-rn 5010  df-res 5011  df-ima 5012  df-iota 5551  df-fv 5596  df-ov 6287  df-oprab 6288  df-mpt2 6289  df-recs 7042  df-rdg 7076  df-seq 12076  df-sum 13472
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator