Metamath Proof Explorer


Theorem fsum2d

Description: Write a double sum as a sum over a two-dimensional region. Note that B ( j ) is a function of j . (Contributed by Mario Carneiro, 27-Apr-2014)

Ref Expression
Hypotheses fsum2d.1 z = j k D = C
fsum2d.2 φ A Fin
fsum2d.3 φ j A B Fin
fsum2d.4 φ j A k B C
Assertion fsum2d φ j A k B C = z j A j × B D

Proof

Step Hyp Ref Expression
1 fsum2d.1 z = j k D = C
2 fsum2d.2 φ A Fin
3 fsum2d.3 φ j A B Fin
4 fsum2d.4 φ j A k B C
5 ssid A A
6 sseq1 w = w A A
7 sumeq1 w = j w k B C = j k B C
8 iuneq1 w = j w j × B = j j × B
9 8 sumeq1d w = z j w j × B D = z j j × B D
10 7 9 eqeq12d w = j w k B C = z j w j × B D j k B C = z j j × B D
11 6 10 imbi12d w = w A j w k B C = z j w j × B D A j k B C = z j j × B D
12 11 imbi2d w = φ w A j w k B C = z j w j × B D φ A j k B C = z j j × B D
13 sseq1 w = x w A x A
14 sumeq1 w = x j w k B C = j x k B C
15 iuneq1 w = x j w j × B = j x j × B
16 15 sumeq1d w = x z j w j × B D = z j x j × B D
17 14 16 eqeq12d w = x j w k B C = z j w j × B D j x k B C = z j x j × B D
18 13 17 imbi12d w = x w A j w k B C = z j w j × B D x A j x k B C = z j x j × B D
19 18 imbi2d w = x φ w A j w k B C = z j w j × B D φ x A j x k B C = z j x j × B D
20 sseq1 w = x y w A x y A
21 sumeq1 w = x y j w k B C = j x y k B C
22 iuneq1 w = x y j w j × B = j x y j × B
23 22 sumeq1d w = x y z j w j × B D = z j x y j × B D
24 21 23 eqeq12d w = x y j w k B C = z j w j × B D j x y k B C = z j x y j × B D
25 20 24 imbi12d w = x y w A j w k B C = z j w j × B D x y A j x y k B C = z j x y j × B D
26 25 imbi2d w = x y φ w A j w k B C = z j w j × B D φ x y A j x y k B C = z j x y j × B D
27 sseq1 w = A w A A A
28 sumeq1 w = A j w k B C = j A k B C
29 iuneq1 w = A j w j × B = j A j × B
30 29 sumeq1d w = A z j w j × B D = z j A j × B D
31 28 30 eqeq12d w = A j w k B C = z j w j × B D j A k B C = z j A j × B D
32 27 31 imbi12d w = A w A j w k B C = z j w j × B D A A j A k B C = z j A j × B D
33 32 imbi2d w = A φ w A j w k B C = z j w j × B D φ A A j A k B C = z j A j × B D
34 sum0 z D = 0
35 0iun j j × B =
36 35 sumeq1i z j j × B D = z D
37 sum0 j k B C = 0
38 34 36 37 3eqtr4ri j k B C = z j j × B D
39 38 2a1i φ A j k B C = z j j × B D
40 ssun1 x x y
41 sstr x x y x y A x A
42 40 41 mpan x y A x A
43 42 imim1i x A j x k B C = z j x j × B D x y A j x k B C = z j x j × B D
44 simpll φ ¬ y x x y A φ
45 44 2 syl φ ¬ y x x y A A Fin
46 44 3 sylan φ ¬ y x x y A j A B Fin
47 44 4 sylan φ ¬ y x x y A j A k B C
48 simplr φ ¬ y x x y A ¬ y x
49 simpr φ ¬ y x x y A x y A
50 biid j x k B C = z j x j × B D j x k B C = z j x j × B D
51 1 45 46 47 48 49 50 fsum2dlem φ ¬ y x x y A j x k B C = z j x j × B D j x y k B C = z j x y j × B D
52 51 exp31 φ ¬ y x x y A j x k B C = z j x j × B D j x y k B C = z j x y j × B D
53 52 a2d φ ¬ y x x y A j x k B C = z j x j × B D x y A j x y k B C = z j x y j × B D
54 43 53 syl5 φ ¬ y x x A j x k B C = z j x j × B D x y A j x y k B C = z j x y j × B D
55 54 expcom ¬ y x φ x A j x k B C = z j x j × B D x y A j x y k B C = z j x y j × B D
56 55 a2d ¬ y x φ x A j x k B C = z j x j × B D φ x y A j x y k B C = z j x y j × B D
57 56 adantl x Fin ¬ y x φ x A j x k B C = z j x j × B D φ x y A j x y k B C = z j x y j × B D
58 12 19 26 33 39 57 findcard2s A Fin φ A A j A k B C = z j A j × B D
59 2 58 mpcom φ A A j A k B C = z j A j × B D
60 5 59 mpi φ j A k B C = z j A j × B D