Metamath Proof Explorer


Theorem sumeq2ii

Description: Equality theorem for sum, with the class expressions B and C guarded by _I to be always sets. (Contributed by Mario Carneiro, 13-Jun-2019)

Ref Expression
Assertion sumeq2ii k A I B = I C k A B = k A C

Proof

Step Hyp Ref Expression
1 simpr k A I B = I C m m
2 simpr k A I B = I C m x m n A n A
3 simplll k A I B = I C m x m n A k A I B = I C
4 nfcv _ k I
5 nfcsb1v _ k n / k B
6 4 5 nffv _ k I n / k B
7 nfcsb1v _ k n / k C
8 4 7 nffv _ k I n / k C
9 6 8 nfeq k I n / k B = I n / k C
10 csbeq1a k = n B = n / k B
11 10 fveq2d k = n I B = I n / k B
12 csbeq1a k = n C = n / k C
13 12 fveq2d k = n I C = I n / k C
14 11 13 eqeq12d k = n I B = I C I n / k B = I n / k C
15 9 14 rspc n A k A I B = I C I n / k B = I n / k C
16 2 3 15 sylc k A I B = I C m x m n A I n / k B = I n / k C
17 16 ifeq1da k A I B = I C m x m if n A I n / k B I 0 = if n A I n / k C I 0
18 fvif I if n A n / k B 0 = if n A I n / k B I 0
19 fvif I if n A n / k C 0 = if n A I n / k C I 0
20 17 18 19 3eqtr4g k A I B = I C m x m I if n A n / k B 0 = I if n A n / k C 0
21 20 mpteq2dv k A I B = I C m x m n I if n A n / k B 0 = n I if n A n / k C 0
22 21 fveq1d k A I B = I C m x m n I if n A n / k B 0 x = n I if n A n / k C 0 x
23 eqid n if n A n / k B 0 = n if n A n / k B 0
24 eqid n I if n A n / k B 0 = n I if n A n / k B 0
25 23 24 fvmptex n if n A n / k B 0 x = n I if n A n / k B 0 x
26 eqid n if n A n / k C 0 = n if n A n / k C 0
27 eqid n I if n A n / k C 0 = n I if n A n / k C 0
28 26 27 fvmptex n if n A n / k C 0 x = n I if n A n / k C 0 x
29 22 25 28 3eqtr4g k A I B = I C m x m n if n A n / k B 0 x = n if n A n / k C 0 x
30 1 29 seqfeq k A I B = I C m seq m + n if n A n / k B 0 = seq m + n if n A n / k C 0
31 30 breq1d k A I B = I C m seq m + n if n A n / k B 0 x seq m + n if n A n / k C 0 x
32 31 anbi2d k A I B = I C m A m seq m + n if n A n / k B 0 x A m seq m + n if n A n / k C 0 x
33 32 rexbidva k A I B = I C m A m seq m + n if n A n / k B 0 x m A m seq m + n if n A n / k C 0 x
34 simplr k A I B = I C m f : 1 m 1-1 onto A m
35 nnuz = 1
36 34 35 eleqtrdi k A I B = I C m f : 1 m 1-1 onto A m 1
37 f1of f : 1 m 1-1 onto A f : 1 m A
38 37 ad2antlr k A I B = I C m f : 1 m 1-1 onto A x 1 m f : 1 m A
39 ffvelrn f : 1 m A x 1 m f x A
40 38 39 sylancom k A I B = I C m f : 1 m 1-1 onto A x 1 m f x A
41 simplll k A I B = I C m f : 1 m 1-1 onto A x 1 m k A I B = I C
42 nfcsb1v _ k f x / k I B
43 nfcsb1v _ k f x / k I C
44 42 43 nfeq k f x / k I B = f x / k I C
45 csbeq1a k = f x I B = f x / k I B
46 csbeq1a k = f x I C = f x / k I C
47 45 46 eqeq12d k = f x I B = I C f x / k I B = f x / k I C
48 44 47 rspc f x A k A I B = I C f x / k I B = f x / k I C
49 40 41 48 sylc k A I B = I C m f : 1 m 1-1 onto A x 1 m f x / k I B = f x / k I C
50 fvex f x V
51 csbfv2g f x V f x / k I B = I f x / k B
52 50 51 ax-mp f x / k I B = I f x / k B
53 csbfv2g f x V f x / k I C = I f x / k C
54 50 53 ax-mp f x / k I C = I f x / k C
55 49 52 54 3eqtr3g k A I B = I C m f : 1 m 1-1 onto A x 1 m I f x / k B = I f x / k C
56 elfznn x 1 m x
57 56 adantl k A I B = I C m f : 1 m 1-1 onto A x 1 m x
58 fveq2 n = x f n = f x
59 58 csbeq1d n = x f n / k B = f x / k B
60 eqid n f n / k B = n f n / k B
61 59 60 fvmpti x n f n / k B x = I f x / k B
62 57 61 syl k A I B = I C m f : 1 m 1-1 onto A x 1 m n f n / k B x = I f x / k B
63 58 csbeq1d n = x f n / k C = f x / k C
64 eqid n f n / k C = n f n / k C
65 63 64 fvmpti x n f n / k C x = I f x / k C
66 57 65 syl k A I B = I C m f : 1 m 1-1 onto A x 1 m n f n / k C x = I f x / k C
67 55 62 66 3eqtr4d k A I B = I C m f : 1 m 1-1 onto A x 1 m n f n / k B x = n f n / k C x
68 36 67 seqfveq k A I B = I C m f : 1 m 1-1 onto A seq 1 + n f n / k B m = seq 1 + n f n / k C m
69 68 eqeq2d k A I B = I C m f : 1 m 1-1 onto A x = seq 1 + n f n / k B m x = seq 1 + n f n / k C m
70 69 pm5.32da k A I B = I C m f : 1 m 1-1 onto A x = seq 1 + n f n / k B m f : 1 m 1-1 onto A x = seq 1 + n f n / k C m
71 70 exbidv k A I B = I C m f f : 1 m 1-1 onto A x = seq 1 + n f n / k B m f f : 1 m 1-1 onto A x = seq 1 + n f n / k C m
72 71 rexbidva k A I B = I C m f f : 1 m 1-1 onto A x = seq 1 + n f n / k B m m f f : 1 m 1-1 onto A x = seq 1 + n f n / k C m
73 33 72 orbi12d k A I B = I C m A m seq m + n if n A n / k B 0 x m f f : 1 m 1-1 onto A x = seq 1 + n f n / k B m m A m seq m + n if n A n / k C 0 x m f f : 1 m 1-1 onto A x = seq 1 + n f n / k C m
74 73 iotabidv k A I B = I C ι x | m A m seq m + n if n A n / k B 0 x m f f : 1 m 1-1 onto A x = seq 1 + n f n / k B m = ι x | m A m seq m + n if n A n / k C 0 x m f f : 1 m 1-1 onto A x = seq 1 + n f n / k C m
75 df-sum k A B = ι x | m A m seq m + n if n A n / k B 0 x m f f : 1 m 1-1 onto A x = seq 1 + n f n / k B m
76 df-sum k A C = ι x | m A m seq m + n if n A n / k C 0 x m f f : 1 m 1-1 onto A x = seq 1 + n f n / k C m
77 74 75 76 3eqtr4g k A I B = I C k A B = k A C