Metamath Proof Explorer


Theorem gsummpt2d

Description: Express a finite sum over a two-dimensional range as a double sum. See also gsum2d . (Contributed by Thierry Arnoux, 27-Apr-2020)

Ref Expression
Hypotheses gsummpt2d.c _zC
gsummpt2d.0 yφ
gsummpt2d.b B=BaseW
gsummpt2d.1 x=yzC=D
gsummpt2d.r φRelA
gsummpt2d.2 φAFin
gsummpt2d.m φWCMnd
gsummpt2d.3 φxACB
Assertion gsummpt2d φWxAC=WydomAWzAyD

Proof

Step Hyp Ref Expression
1 gsummpt2d.c _zC
2 gsummpt2d.0 yφ
3 gsummpt2d.b B=BaseW
4 gsummpt2d.1 x=yzC=D
5 gsummpt2d.r φRelA
6 gsummpt2d.2 φAFin
7 gsummpt2d.m φWCMnd
8 gsummpt2d.3 φxACB
9 eqid 0W=0W
10 6 dmexd φdomAV
11 1stdm RelAxA1stxdomA
12 5 11 sylan φxA1stxdomA
13 fo1st 1st:VontoV
14 fofn 1st:VontoV1stFnV
15 dffn5 1stFnV1st=xV1stx
16 15 biimpi 1stFnV1st=xV1stx
17 13 14 16 mp2b 1st=xV1stx
18 17 reseq1i 1stA=xV1stxA
19 ssv AV
20 resmpt AVxV1stxA=xA1stx
21 19 20 ax-mp xV1stxA=xA1stx
22 18 21 eqtri 1stA=xA1stx
23 3 9 7 6 10 8 12 22 gsummpt2co φWxAC=WydomAWx1stA-1yC
24 7 adantr φydomAWCMnd
25 6 adantr φydomAAFin
26 imaexg AFinAyV
27 25 26 syl φydomAAyV
28 4 adantl φydomAzAyxAx=yzC=D
29 simp-4l φydomAzAyxAx=yzφ
30 simplr φydomAzAyxAx=yzxA
31 29 30 8 syl2anc φydomAzAyxAx=yzCB
32 28 31 eqeltrrd φydomAzAyxAx=yzDB
33 vex yV
34 vex zV
35 33 34 elimasn zAyyzA
36 35 biimpi zAyyzA
37 36 adantl φydomAzAyyzA
38 simpr φydomAzAyx=yzx=yz
39 38 eqeq1d φydomAzAyx=yzx=yzyz=yz
40 eqidd φydomAzAyyz=yz
41 37 39 40 rspcedvd φydomAzAyxAx=yz
42 32 41 r19.29a φydomAzAyDB
43 42 fmpttd φydomAzAyD:AyB
44 eqid zAyD=zAyD
45 imafi2 AFinAyFin
46 6 45 syl φAyFin
47 46 adantr φydomAAyFin
48 fvex 0WV
49 48 a1i φydomA0WV
50 44 47 42 49 fsuppmptdm φydomAfinSupp0WzAyD
51 2ndconst ydomA2ndy×Ay:y×Ay1-1 ontoAy
52 51 adantl φydomA2ndy×Ay:y×Ay1-1 ontoAy
53 1stpreimas RelAydomA1stA-1y=y×Ay
54 5 53 sylan φydomA1stA-1y=y×Ay
55 54 reseq2d φydomA2nd1stA-1y=2ndy×Ay
56 55 f1oeq1d φydomA2nd1stA-1y:y×Ay1-1 ontoAy2ndy×Ay:y×Ay1-1 ontoAy
57 52 56 mpbird φydomA2nd1stA-1y:y×Ay1-1 ontoAy
58 3 9 24 27 43 50 57 gsumf1o φydomAWzAyD=WzAyD2nd1stA-1y
59 simpr φydomAx1stA-1yx1stA-1y
60 54 adantr φydomAx1stA-1y1stA-1y=y×Ay
61 59 60 eleqtrd φydomAx1stA-1yxy×Ay
62 xp2nd xy×Ay2ndxAy
63 61 62 syl φydomAx1stA-1y2ndxAy
64 63 ralrimiva φydomAx1stA-1y2ndxAy
65 fo2nd 2nd:VontoV
66 fofn 2nd:VontoV2ndFnV
67 dffn5 2ndFnV2nd=xV2ndx
68 67 biimpi 2ndFnV2nd=xV2ndx
69 65 66 68 mp2b 2nd=xV2ndx
70 69 reseq1i 2nd1stA-1y=xV2ndx1stA-1y
71 ssv 1stA-1yV
72 resmpt 1stA-1yVxV2ndx1stA-1y=x1stA-1y2ndx
73 71 72 ax-mp xV2ndx1stA-1y=x1stA-1y2ndx
74 70 73 eqtri 2nd1stA-1y=x1stA-1y2ndx
75 74 a1i φydomA2nd1stA-1y=x1stA-1y2ndx
76 eqidd φydomAzAyD=zAyD
77 64 75 76 fmptcos φydomAzAyD2nd1stA-1y=x1stA-1y2ndx/zD
78 nfv zφydomAx1stA-1y
79 1 a1i φydomAx1stA-1y_zC
80 61 adantr φydomAx1stA-1yz=2ndxxy×Ay
81 xp1st xy×Ay1stxy
82 80 81 syl φydomAx1stA-1yz=2ndx1stxy
83 fvex 1stxV
84 83 elsn 1stxy1stx=y
85 82 84 sylib φydomAx1stA-1yz=2ndx1stx=y
86 simpr φydomAx1stA-1yz=2ndxz=2ndx
87 86 eqcomd φydomAx1stA-1yz=2ndx2ndx=z
88 eqopi xy×Ay1stx=y2ndx=zx=yz
89 80 85 87 88 syl12anc φydomAx1stA-1yz=2ndxx=yz
90 89 4 syl φydomAx1stA-1yz=2ndxC=D
91 90 eqcomd φydomAx1stA-1yz=2ndxD=C
92 78 79 63 91 csbiedf φydomAx1stA-1y2ndx/zD=C
93 92 mpteq2dva φydomAx1stA-1y2ndx/zD=x1stA-1yC
94 77 93 eqtrd φydomAzAyD2nd1stA-1y=x1stA-1yC
95 94 oveq2d φydomAWzAyD2nd1stA-1y=Wx1stA-1yC
96 58 95 eqtr2d φydomAWx1stA-1yC=WzAyD
97 2 96 mpteq2da φydomAWx1stA-1yC=ydomAWzAyD
98 97 oveq2d φWydomAWx1stA-1yC=WydomAWzAyD
99 23 98 eqtrd φWxAC=WydomAWzAyD