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

Theorem sumeq2w 13736
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 csbeq2 3405 . . . . . . . . . 10  |-  ( A. k  B  =  C  ->  [_ n  /  k ]_ B  =  [_ n  /  k ]_ C
)
21ifeq1d 3933 . . . . . . . . 9  |-  ( A. k  B  =  C  ->  if ( n  e.  A ,  [_ n  /  k ]_ B ,  0 )  =  if ( n  e.  A ,  [_ n  /  k ]_ C ,  0 ) )
32mpteq2dv 4513 . . . . . . . 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 ) ) )
43seqeq3d 12218 . . . . . . 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 ) ) ) )
54breq1d 4436 . . . . . 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 ) )
65anbi2d 708 . . . . 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 ) ) )
76rexbidv 2946 . . . 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 ) ) )
8 csbeq2 3405 . . . . . . . . . . 11  |-  ( A. k  B  =  C  ->  [_ ( f `  n )  /  k ]_ B  =  [_ (
f `  n )  /  k ]_ C
)
98mpteq2dv 4513 . . . . . . . . . 10  |-  ( A. k  B  =  C  ->  ( n  e.  NN  |->  [_ ( f `  n
)  /  k ]_ B )  =  ( n  e.  NN  |->  [_ ( f `  n
)  /  k ]_ C ) )
109seqeq3d 12218 . . . . . . . . 9  |-  ( A. k  B  =  C  ->  seq 1 (  +  ,  ( n  e.  NN  |->  [_ ( f `  n )  /  k ]_ B ) )  =  seq 1 (  +  ,  ( n  e.  NN  |->  [_ ( f `  n )  /  k ]_ C ) ) )
1110fveq1d 5883 . . . . . . . 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 ) )
1211eqeq2d 2443 . . . . . . 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 ) ) )
1312anbi2d 708 . . . . . 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
) ) ) )
1413exbidv 1761 . . . . 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 ) ) ) )
1514rexbidv 2946 . . . 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 ) ) ) )
167, 15orbi12d 714 . . 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 ) ) ) ) )
1716iotabidv 5586 . 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 ) ) ) ) )
18 df-sum 13731 . 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 ) ) ) )
19 df-sum 13731 . 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 ) ) ) )
2017, 18, 193eqtr4g 2495 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 369    /\ wa 370   A.wal 1435    = wceq 1437   E.wex 1659    e. wcel 1870   E.wrex 2783   [_csb 3401    C_ wss 3442   ifcif 3915   class class class wbr 4426    |-> cmpt 4484   iotacio 5563   -1-1-onto->wf1o 5600   ` cfv 5601  (class class class)co 6305   0cc0 9538   1c1 9539    + caddc 9541   NNcn 10609   ZZcz 10937   ZZ>=cuz 11159   ...cfz 11782    seqcseq 12210    ~~> cli 13526   sum_csu 13730
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1665  ax-4 1678  ax-5 1751  ax-6 1797  ax-7 1841  ax-10 1889  ax-11 1894  ax-12 1907  ax-13 2055  ax-ext 2407
This theorem depends on definitions:  df-bi 188  df-or 371  df-an 372  df-3an 984  df-tru 1440  df-ex 1660  df-nf 1664  df-sb 1790  df-clab 2415  df-cleq 2421  df-clel 2424  df-nfc 2579  df-ral 2787  df-rex 2788  df-rab 2791  df-v 3089  df-sbc 3306  df-csb 3402  df-dif 3445  df-un 3447  df-in 3449  df-ss 3456  df-nul 3768  df-if 3916  df-sn 4003  df-pr 4005  df-op 4009  df-uni 4223  df-br 4427  df-opab 4485  df-mpt 4486  df-xp 4860  df-cnv 4862  df-dm 4864  df-rn 4865  df-res 4866  df-ima 4867  df-pred 5399  df-iota 5565  df-fv 5609  df-ov 6308  df-oprab 6309  df-mpt2 6310  df-wrecs 7036  df-recs 7098  df-rdg 7136  df-seq 12211  df-sum 13731
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator