Metamath Proof Explorer


Theorem indsumin

Description: Finite sum of a product with the indicator function / Cartesian product with the indicator function. (Contributed by Thierry Arnoux, 11-Dec-2021)

Ref Expression
Hypotheses indsumin.1 φ O V
indsumin.2 φ A Fin
indsumin.3 φ A O
indsumin.4 φ B O
indsumin.5 φ k A C
Assertion indsumin φ k A 𝟙 O B k C = k A B C

Proof

Step Hyp Ref Expression
1 indsumin.1 φ O V
2 indsumin.2 φ A Fin
3 indsumin.3 φ A O
4 indsumin.4 φ B O
5 indsumin.5 φ k A C
6 inindif A B A B =
7 6 a1i φ A B A B =
8 inundif A B A B = A
9 8 eqcomi A = A B A B
10 9 a1i φ A = A B A B
11 pr01ssre 0 1
12 ax-resscn
13 11 12 sstri 0 1
14 indf O V B O 𝟙 O B : O 0 1
15 1 4 14 syl2anc φ 𝟙 O B : O 0 1
16 15 adantr φ k A 𝟙 O B : O 0 1
17 3 sselda φ k A k O
18 16 17 ffvelrnd φ k A 𝟙 O B k 0 1
19 13 18 sselid φ k A 𝟙 O B k
20 19 5 mulcld φ k A 𝟙 O B k C
21 7 10 2 20 fsumsplit φ k A 𝟙 O B k C = k A B 𝟙 O B k C + k A B 𝟙 O B k C
22 1 adantr φ k A B O V
23 4 adantr φ k A B B O
24 inss2 A B B
25 24 a1i φ A B B
26 25 sselda φ k A B k B
27 ind1 O V B O k B 𝟙 O B k = 1
28 22 23 26 27 syl3anc φ k A B 𝟙 O B k = 1
29 28 oveq1d φ k A B 𝟙 O B k C = 1 C
30 inss1 A B A
31 30 a1i φ A B A
32 31 sselda φ k A B k A
33 32 5 syldan φ k A B C
34 33 mulid2d φ k A B 1 C = C
35 29 34 eqtrd φ k A B 𝟙 O B k C = C
36 35 sumeq2dv φ k A B 𝟙 O B k C = k A B C
37 1 adantr φ k A B O V
38 4 adantr φ k A B B O
39 3 ssdifd φ A B O B
40 39 sselda φ k A B k O B
41 ind0 O V B O k O B 𝟙 O B k = 0
42 37 38 40 41 syl3anc φ k A B 𝟙 O B k = 0
43 42 oveq1d φ k A B 𝟙 O B k C = 0 C
44 difssd φ A B A
45 44 sselda φ k A B k A
46 45 5 syldan φ k A B C
47 46 mul02d φ k A B 0 C = 0
48 43 47 eqtrd φ k A B 𝟙 O B k C = 0
49 48 sumeq2dv φ k A B 𝟙 O B k C = k A B 0
50 diffi A Fin A B Fin
51 2 50 syl φ A B Fin
52 sumz A B 0 A B Fin k A B 0 = 0
53 52 olcs A B Fin k A B 0 = 0
54 51 53 syl φ k A B 0 = 0
55 49 54 eqtrd φ k A B 𝟙 O B k C = 0
56 36 55 oveq12d φ k A B 𝟙 O B k C + k A B 𝟙 O B k C = k A B C + 0
57 infi A Fin A B Fin
58 2 57 syl φ A B Fin
59 58 33 fsumcl φ k A B C
60 59 addid1d φ k A B C + 0 = k A B C
61 21 56 60 3eqtrd φ k A 𝟙 O B k C = k A B C