Metamath Proof Explorer


Theorem gsum2d

Description: Write a sum over a two-dimensional region as a double sum. (Contributed by Mario Carneiro, 28-Dec-2014) (Revised by AV, 8-Jun-2019)

Ref Expression
Hypotheses gsum2d.b B = Base G
gsum2d.z 0 ˙ = 0 G
gsum2d.g φ G CMnd
gsum2d.a φ A V
gsum2d.r φ Rel A
gsum2d.d φ D W
gsum2d.s φ dom A D
gsum2d.f φ F : A B
gsum2d.w φ finSupp 0 ˙ F
Assertion gsum2d φ G F = G j D G k A j j F k

Proof

Step Hyp Ref Expression
1 gsum2d.b B = Base G
2 gsum2d.z 0 ˙ = 0 G
3 gsum2d.g φ G CMnd
4 gsum2d.a φ A V
5 gsum2d.r φ Rel A
6 gsum2d.d φ D W
7 gsum2d.s φ dom A D
8 gsum2d.f φ F : A B
9 gsum2d.w φ finSupp 0 ˙ F
10 1 2 3 4 5 6 7 8 9 gsum2dlem2 φ G F A dom supp 0 ˙ F = G j dom supp 0 ˙ F G k A j j F k
11 suppssdm F supp 0 ˙ dom F
12 11 8 fssdm φ F supp 0 ˙ A
13 relss F supp 0 ˙ A Rel A Rel supp 0 ˙ F
14 12 5 13 sylc φ Rel supp 0 ˙ F
15 relssdmrn Rel supp 0 ˙ F F supp 0 ˙ dom supp 0 ˙ F × ran supp 0 ˙ F
16 ssv ran supp 0 ˙ F V
17 xpss2 ran supp 0 ˙ F V dom supp 0 ˙ F × ran supp 0 ˙ F dom supp 0 ˙ F × V
18 16 17 ax-mp dom supp 0 ˙ F × ran supp 0 ˙ F dom supp 0 ˙ F × V
19 15 18 sstrdi Rel supp 0 ˙ F F supp 0 ˙ dom supp 0 ˙ F × V
20 14 19 syl φ F supp 0 ˙ dom supp 0 ˙ F × V
21 12 20 ssind φ F supp 0 ˙ A dom supp 0 ˙ F × V
22 df-res A dom supp 0 ˙ F = A dom supp 0 ˙ F × V
23 21 22 sseqtrrdi φ F supp 0 ˙ A dom supp 0 ˙ F
24 1 2 3 4 8 23 9 gsumres φ G F A dom supp 0 ˙ F = G F
25 dmss F supp 0 ˙ A dom supp 0 ˙ F dom A
26 12 25 syl φ dom supp 0 ˙ F dom A
27 26 7 sstrd φ dom supp 0 ˙ F D
28 27 resmptd φ j D G k A j j F k dom supp 0 ˙ F = j dom supp 0 ˙ F G k A j j F k
29 28 oveq2d φ G j D G k A j j F k dom supp 0 ˙ F = G j dom supp 0 ˙ F G k A j j F k
30 1 2 3 4 5 6 7 8 9 gsum2dlem1 φ G k A j j F k B
31 30 adantr φ j D G k A j j F k B
32 31 fmpttd φ j D G k A j j F k : D B
33 vex j V
34 vex k V
35 33 34 elimasn k A j j k A
36 35 biimpi k A j j k A
37 36 ad2antll φ j D dom supp 0 ˙ F k A j j k A
38 eldifn j D dom supp 0 ˙ F ¬ j dom supp 0 ˙ F
39 38 ad2antrl φ j D dom supp 0 ˙ F k A j ¬ j dom supp 0 ˙ F
40 33 34 opeldm j k supp 0 ˙ F j dom supp 0 ˙ F
41 39 40 nsyl φ j D dom supp 0 ˙ F k A j ¬ j k supp 0 ˙ F
42 37 41 eldifd φ j D dom supp 0 ˙ F k A j j k A supp 0 ˙ F
43 df-ov j F k = F j k
44 ssidd φ F supp 0 ˙ F supp 0 ˙
45 2 fvexi 0 ˙ V
46 45 a1i φ 0 ˙ V
47 8 44 4 46 suppssr φ j k A supp 0 ˙ F F j k = 0 ˙
48 43 47 syl5eq φ j k A supp 0 ˙ F j F k = 0 ˙
49 42 48 syldan φ j D dom supp 0 ˙ F k A j j F k = 0 ˙
50 49 anassrs φ j D dom supp 0 ˙ F k A j j F k = 0 ˙
51 50 mpteq2dva φ j D dom supp 0 ˙ F k A j j F k = k A j 0 ˙
52 51 oveq2d φ j D dom supp 0 ˙ F G k A j j F k = G k A j 0 ˙
53 cmnmnd G CMnd G Mnd
54 3 53 syl φ G Mnd
55 imaexg A V A j V
56 4 55 syl φ A j V
57 2 gsumz G Mnd A j V G k A j 0 ˙ = 0 ˙
58 54 56 57 syl2anc φ G k A j 0 ˙ = 0 ˙
59 58 adantr φ j D dom supp 0 ˙ F G k A j 0 ˙ = 0 ˙
60 52 59 eqtrd φ j D dom supp 0 ˙ F G k A j j F k = 0 ˙
61 60 6 suppss2 φ j D G k A j j F k supp 0 ˙ dom supp 0 ˙ F
62 funmpt Fun j D G k A j j F k
63 62 a1i φ Fun j D G k A j j F k
64 9 fsuppimpd φ F supp 0 ˙ Fin
65 dmfi F supp 0 ˙ Fin dom supp 0 ˙ F Fin
66 64 65 syl φ dom supp 0 ˙ F Fin
67 66 61 ssfid φ j D G k A j j F k supp 0 ˙ Fin
68 6 mptexd φ j D G k A j j F k V
69 isfsupp j D G k A j j F k V 0 ˙ V finSupp 0 ˙ j D G k A j j F k Fun j D G k A j j F k j D G k A j j F k supp 0 ˙ Fin
70 68 46 69 syl2anc φ finSupp 0 ˙ j D G k A j j F k Fun j D G k A j j F k j D G k A j j F k supp 0 ˙ Fin
71 63 67 70 mpbir2and φ finSupp 0 ˙ j D G k A j j F k
72 1 2 3 6 32 61 71 gsumres φ G j D G k A j j F k dom supp 0 ˙ F = G j D G k A j j F k
73 29 72 eqtr3d φ G j dom supp 0 ˙ F G k A j j F k = G j D G k A j j F k
74 10 24 73 3eqtr3d φ G F = G j D G k A j j F k