Metamath Proof Explorer


Theorem fsumadd

Description: The sum of two finite sums. (Contributed by NM, 14-Nov-2005) (Revised by Mario Carneiro, 22-Apr-2014)

Ref Expression
Hypotheses fsumadd.1 φ A Fin
fsumadd.2 φ k A B
fsumadd.3 φ k A C
Assertion fsumadd φ k A B + C = k A B + k A C

Proof

Step Hyp Ref Expression
1 fsumadd.1 φ A Fin
2 fsumadd.2 φ k A B
3 fsumadd.3 φ k A C
4 00id 0 + 0 = 0
5 sum0 k B = 0
6 sum0 k C = 0
7 5 6 oveq12i k B + k C = 0 + 0
8 sum0 k B + C = 0
9 4 7 8 3eqtr4ri k B + C = k B + k C
10 sumeq1 A = k A B + C = k B + C
11 sumeq1 A = k A B = k B
12 sumeq1 A = k A C = k C
13 11 12 oveq12d A = k A B + k A C = k B + k C
14 9 10 13 3eqtr4a A = k A B + C = k A B + k A C
15 14 a1i φ A = k A B + C = k A B + k A C
16 simprl φ A f : 1 A 1-1 onto A A
17 nnuz = 1
18 16 17 eleqtrdi φ A f : 1 A 1-1 onto A A 1
19 2 adantlr φ A f : 1 A 1-1 onto A k A B
20 19 fmpttd φ A f : 1 A 1-1 onto A k A B : A
21 simprr φ A f : 1 A 1-1 onto A f : 1 A 1-1 onto A
22 f1of f : 1 A 1-1 onto A f : 1 A A
23 21 22 syl φ A f : 1 A 1-1 onto A f : 1 A A
24 fco k A B : A f : 1 A A k A B f : 1 A
25 20 23 24 syl2anc φ A f : 1 A 1-1 onto A k A B f : 1 A
26 25 ffvelrnda φ A f : 1 A 1-1 onto A n 1 A k A B f n
27 3 adantlr φ A f : 1 A 1-1 onto A k A C
28 27 fmpttd φ A f : 1 A 1-1 onto A k A C : A
29 fco k A C : A f : 1 A A k A C f : 1 A
30 28 23 29 syl2anc φ A f : 1 A 1-1 onto A k A C f : 1 A
31 30 ffvelrnda φ A f : 1 A 1-1 onto A n 1 A k A C f n
32 23 ffvelrnda φ A f : 1 A 1-1 onto A n 1 A f n A
33 ovex B + C V
34 eqid k A B + C = k A B + C
35 34 fvmpt2 k A B + C V k A B + C k = B + C
36 33 35 mpan2 k A k A B + C k = B + C
37 36 adantl φ k A k A B + C k = B + C
38 simpr φ k A k A
39 eqid k A B = k A B
40 39 fvmpt2 k A B k A B k = B
41 38 2 40 syl2anc φ k A k A B k = B
42 eqid k A C = k A C
43 42 fvmpt2 k A C k A C k = C
44 38 3 43 syl2anc φ k A k A C k = C
45 41 44 oveq12d φ k A k A B k + k A C k = B + C
46 37 45 eqtr4d φ k A k A B + C k = k A B k + k A C k
47 46 ralrimiva φ k A k A B + C k = k A B k + k A C k
48 47 ad2antrr φ A f : 1 A 1-1 onto A n 1 A k A k A B + C k = k A B k + k A C k
49 nffvmpt1 _ k k A B + C f n
50 nffvmpt1 _ k k A B f n
51 nfcv _ k +
52 nffvmpt1 _ k k A C f n
53 50 51 52 nfov _ k k A B f n + k A C f n
54 49 53 nfeq k k A B + C f n = k A B f n + k A C f n
55 fveq2 k = f n k A B + C k = k A B + C f n
56 fveq2 k = f n k A B k = k A B f n
57 fveq2 k = f n k A C k = k A C f n
58 56 57 oveq12d k = f n k A B k + k A C k = k A B f n + k A C f n
59 55 58 eqeq12d k = f n k A B + C k = k A B k + k A C k k A B + C f n = k A B f n + k A C f n
60 54 59 rspc f n A k A k A B + C k = k A B k + k A C k k A B + C f n = k A B f n + k A C f n
61 32 48 60 sylc φ A f : 1 A 1-1 onto A n 1 A k A B + C f n = k A B f n + k A C f n
62 fvco3 f : 1 A A n 1 A k A B + C f n = k A B + C f n
63 23 62 sylan φ A f : 1 A 1-1 onto A n 1 A k A B + C f n = k A B + C f n
64 fvco3 f : 1 A A n 1 A k A B f n = k A B f n
65 23 64 sylan φ A f : 1 A 1-1 onto A n 1 A k A B f n = k A B f n
66 fvco3 f : 1 A A n 1 A k A C f n = k A C f n
67 23 66 sylan φ A f : 1 A 1-1 onto A n 1 A k A C f n = k A C f n
68 65 67 oveq12d φ A f : 1 A 1-1 onto A n 1 A k A B f n + k A C f n = k A B f n + k A C f n
69 61 63 68 3eqtr4d φ A f : 1 A 1-1 onto A n 1 A k A B + C f n = k A B f n + k A C f n
70 18 26 31 69 seradd φ A f : 1 A 1-1 onto A seq 1 + k A B + C f A = seq 1 + k A B f A + seq 1 + k A C f A
71 fveq2 m = f n k A B + C m = k A B + C f n
72 19 27 addcld φ A f : 1 A 1-1 onto A k A B + C
73 72 fmpttd φ A f : 1 A 1-1 onto A k A B + C : A
74 73 ffvelrnda φ A f : 1 A 1-1 onto A m A k A B + C m
75 71 16 21 74 63 fsum φ A f : 1 A 1-1 onto A m A k A B + C m = seq 1 + k A B + C f A
76 fveq2 m = f n k A B m = k A B f n
77 20 ffvelrnda φ A f : 1 A 1-1 onto A m A k A B m
78 76 16 21 77 65 fsum φ A f : 1 A 1-1 onto A m A k A B m = seq 1 + k A B f A
79 fveq2 m = f n k A C m = k A C f n
80 28 ffvelrnda φ A f : 1 A 1-1 onto A m A k A C m
81 79 16 21 80 67 fsum φ A f : 1 A 1-1 onto A m A k A C m = seq 1 + k A C f A
82 78 81 oveq12d φ A f : 1 A 1-1 onto A m A k A B m + m A k A C m = seq 1 + k A B f A + seq 1 + k A C f A
83 70 75 82 3eqtr4d φ A f : 1 A 1-1 onto A m A k A B + C m = m A k A B m + m A k A C m
84 sumfc m A k A B + C m = k A B + C
85 sumfc m A k A B m = k A B
86 sumfc m A k A C m = k A C
87 85 86 oveq12i m A k A B m + m A k A C m = k A B + k A C
88 83 84 87 3eqtr3g φ A f : 1 A 1-1 onto A k A B + C = k A B + k A C
89 88 expr φ A f : 1 A 1-1 onto A k A B + C = k A B + k A C
90 89 exlimdv φ A f f : 1 A 1-1 onto A k A B + C = k A B + k A C
91 90 expimpd φ A f f : 1 A 1-1 onto A k A B + C = k A B + k A C
92 fz1f1o A Fin A = A f f : 1 A 1-1 onto A
93 1 92 syl φ A = A f f : 1 A 1-1 onto A
94 15 91 93 mpjaod φ k A B + C = k A B + k A C