Metamath Proof Explorer


Theorem gsum2d2

Description: Write a group sum over a two-dimensional region as a double sum. Note that C ( j ) is a function of j . (Contributed by Mario Carneiro, 28-Dec-2014)

Ref Expression
Hypotheses gsum2d2.b 𝐵 = ( Base ‘ 𝐺 )
gsum2d2.z 0 = ( 0g𝐺 )
gsum2d2.g ( 𝜑𝐺 ∈ CMnd )
gsum2d2.a ( 𝜑𝐴𝑉 )
gsum2d2.r ( ( 𝜑𝑗𝐴 ) → 𝐶𝑊 )
gsum2d2.f ( ( 𝜑 ∧ ( 𝑗𝐴𝑘𝐶 ) ) → 𝑋𝐵 )
gsum2d2.u ( 𝜑𝑈 ∈ Fin )
gsum2d2.n ( ( 𝜑 ∧ ( ( 𝑗𝐴𝑘𝐶 ) ∧ ¬ 𝑗 𝑈 𝑘 ) ) → 𝑋 = 0 )
Assertion gsum2d2 ( 𝜑 → ( 𝐺 Σg ( 𝑗𝐴 , 𝑘𝐶𝑋 ) ) = ( 𝐺 Σg ( 𝑗𝐴 ↦ ( 𝐺 Σg ( 𝑘𝐶𝑋 ) ) ) ) )

Proof

Step Hyp Ref Expression
1 gsum2d2.b 𝐵 = ( Base ‘ 𝐺 )
2 gsum2d2.z 0 = ( 0g𝐺 )
3 gsum2d2.g ( 𝜑𝐺 ∈ CMnd )
4 gsum2d2.a ( 𝜑𝐴𝑉 )
5 gsum2d2.r ( ( 𝜑𝑗𝐴 ) → 𝐶𝑊 )
6 gsum2d2.f ( ( 𝜑 ∧ ( 𝑗𝐴𝑘𝐶 ) ) → 𝑋𝐵 )
7 gsum2d2.u ( 𝜑𝑈 ∈ Fin )
8 gsum2d2.n ( ( 𝜑 ∧ ( ( 𝑗𝐴𝑘𝐶 ) ∧ ¬ 𝑗 𝑈 𝑘 ) ) → 𝑋 = 0 )
9 snex { 𝑗 } ∈ V
10 xpexg ( ( { 𝑗 } ∈ V ∧ 𝐶𝑊 ) → ( { 𝑗 } × 𝐶 ) ∈ V )
11 9 5 10 sylancr ( ( 𝜑𝑗𝐴 ) → ( { 𝑗 } × 𝐶 ) ∈ V )
12 11 ralrimiva ( 𝜑 → ∀ 𝑗𝐴 ( { 𝑗 } × 𝐶 ) ∈ V )
13 iunexg ( ( 𝐴𝑉 ∧ ∀ 𝑗𝐴 ( { 𝑗 } × 𝐶 ) ∈ V ) → 𝑗𝐴 ( { 𝑗 } × 𝐶 ) ∈ V )
14 4 12 13 syl2anc ( 𝜑 𝑗𝐴 ( { 𝑗 } × 𝐶 ) ∈ V )
15 relxp Rel ( { 𝑗 } × 𝐶 )
16 15 rgenw 𝑗𝐴 Rel ( { 𝑗 } × 𝐶 )
17 reliun ( Rel 𝑗𝐴 ( { 𝑗 } × 𝐶 ) ↔ ∀ 𝑗𝐴 Rel ( { 𝑗 } × 𝐶 ) )
18 16 17 mpbir Rel 𝑗𝐴 ( { 𝑗 } × 𝐶 )
19 18 a1i ( 𝜑 → Rel 𝑗𝐴 ( { 𝑗 } × 𝐶 ) )
20 vex 𝑥 ∈ V
21 20 eldm2 ( 𝑥 ∈ dom 𝑗𝐴 ( { 𝑗 } × 𝐶 ) ↔ ∃ 𝑦𝑥 , 𝑦 ⟩ ∈ 𝑗𝐴 ( { 𝑗 } × 𝐶 ) )
22 eliunxp ( ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑗𝐴 ( { 𝑗 } × 𝐶 ) ↔ ∃ 𝑗𝑘 ( ⟨ 𝑥 , 𝑦 ⟩ = ⟨ 𝑗 , 𝑘 ⟩ ∧ ( 𝑗𝐴𝑘𝐶 ) ) )
23 vex 𝑦 ∈ V
24 20 23 opth1 ( ⟨ 𝑥 , 𝑦 ⟩ = ⟨ 𝑗 , 𝑘 ⟩ → 𝑥 = 𝑗 )
25 24 ad2antrl ( ( 𝜑 ∧ ( ⟨ 𝑥 , 𝑦 ⟩ = ⟨ 𝑗 , 𝑘 ⟩ ∧ ( 𝑗𝐴𝑘𝐶 ) ) ) → 𝑥 = 𝑗 )
26 simprrl ( ( 𝜑 ∧ ( ⟨ 𝑥 , 𝑦 ⟩ = ⟨ 𝑗 , 𝑘 ⟩ ∧ ( 𝑗𝐴𝑘𝐶 ) ) ) → 𝑗𝐴 )
27 25 26 eqeltrd ( ( 𝜑 ∧ ( ⟨ 𝑥 , 𝑦 ⟩ = ⟨ 𝑗 , 𝑘 ⟩ ∧ ( 𝑗𝐴𝑘𝐶 ) ) ) → 𝑥𝐴 )
28 27 ex ( 𝜑 → ( ( ⟨ 𝑥 , 𝑦 ⟩ = ⟨ 𝑗 , 𝑘 ⟩ ∧ ( 𝑗𝐴𝑘𝐶 ) ) → 𝑥𝐴 ) )
29 28 exlimdvv ( 𝜑 → ( ∃ 𝑗𝑘 ( ⟨ 𝑥 , 𝑦 ⟩ = ⟨ 𝑗 , 𝑘 ⟩ ∧ ( 𝑗𝐴𝑘𝐶 ) ) → 𝑥𝐴 ) )
30 22 29 syl5bi ( 𝜑 → ( ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑗𝐴 ( { 𝑗 } × 𝐶 ) → 𝑥𝐴 ) )
31 30 exlimdv ( 𝜑 → ( ∃ 𝑦𝑥 , 𝑦 ⟩ ∈ 𝑗𝐴 ( { 𝑗 } × 𝐶 ) → 𝑥𝐴 ) )
32 21 31 syl5bi ( 𝜑 → ( 𝑥 ∈ dom 𝑗𝐴 ( { 𝑗 } × 𝐶 ) → 𝑥𝐴 ) )
33 32 ssrdv ( 𝜑 → dom 𝑗𝐴 ( { 𝑗 } × 𝐶 ) ⊆ 𝐴 )
34 6 ralrimivva ( 𝜑 → ∀ 𝑗𝐴𝑘𝐶 𝑋𝐵 )
35 eqid ( 𝑗𝐴 , 𝑘𝐶𝑋 ) = ( 𝑗𝐴 , 𝑘𝐶𝑋 )
36 35 fmpox ( ∀ 𝑗𝐴𝑘𝐶 𝑋𝐵 ↔ ( 𝑗𝐴 , 𝑘𝐶𝑋 ) : 𝑗𝐴 ( { 𝑗 } × 𝐶 ) ⟶ 𝐵 )
37 34 36 sylib ( 𝜑 → ( 𝑗𝐴 , 𝑘𝐶𝑋 ) : 𝑗𝐴 ( { 𝑗 } × 𝐶 ) ⟶ 𝐵 )
38 1 2 3 4 5 6 7 8 gsum2d2lem ( 𝜑 → ( 𝑗𝐴 , 𝑘𝐶𝑋 ) finSupp 0 )
39 1 2 3 14 19 4 33 37 38 gsum2d ( 𝜑 → ( 𝐺 Σg ( 𝑗𝐴 , 𝑘𝐶𝑋 ) ) = ( 𝐺 Σg ( 𝑚𝐴 ↦ ( 𝐺 Σg ( 𝑛 ∈ ( 𝑗𝐴 ( { 𝑗 } × 𝐶 ) “ { 𝑚 } ) ↦ ( 𝑚 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑛 ) ) ) ) ) )
40 nfcv 𝑗 𝐺
41 nfcv 𝑗 Σg
42 nfiu1 𝑗 𝑗𝐴 ( { 𝑗 } × 𝐶 )
43 nfcv 𝑗 { 𝑚 }
44 42 43 nfima 𝑗 ( 𝑗𝐴 ( { 𝑗 } × 𝐶 ) “ { 𝑚 } )
45 nfcv 𝑗 𝑚
46 nfmpo1 𝑗 ( 𝑗𝐴 , 𝑘𝐶𝑋 )
47 nfcv 𝑗 𝑛
48 45 46 47 nfov 𝑗 ( 𝑚 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑛 )
49 44 48 nfmpt 𝑗 ( 𝑛 ∈ ( 𝑗𝐴 ( { 𝑗 } × 𝐶 ) “ { 𝑚 } ) ↦ ( 𝑚 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑛 ) )
50 40 41 49 nfov 𝑗 ( 𝐺 Σg ( 𝑛 ∈ ( 𝑗𝐴 ( { 𝑗 } × 𝐶 ) “ { 𝑚 } ) ↦ ( 𝑚 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑛 ) ) )
51 nfcv 𝑚 ( 𝐺 Σg ( 𝑛 ∈ ( 𝑗𝐴 ( { 𝑗 } × 𝐶 ) “ { 𝑗 } ) ↦ ( 𝑗 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑛 ) ) )
52 sneq ( 𝑚 = 𝑗 → { 𝑚 } = { 𝑗 } )
53 52 imaeq2d ( 𝑚 = 𝑗 → ( 𝑗𝐴 ( { 𝑗 } × 𝐶 ) “ { 𝑚 } ) = ( 𝑗𝐴 ( { 𝑗 } × 𝐶 ) “ { 𝑗 } ) )
54 oveq1 ( 𝑚 = 𝑗 → ( 𝑚 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑛 ) = ( 𝑗 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑛 ) )
55 53 54 mpteq12dv ( 𝑚 = 𝑗 → ( 𝑛 ∈ ( 𝑗𝐴 ( { 𝑗 } × 𝐶 ) “ { 𝑚 } ) ↦ ( 𝑚 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑛 ) ) = ( 𝑛 ∈ ( 𝑗𝐴 ( { 𝑗 } × 𝐶 ) “ { 𝑗 } ) ↦ ( 𝑗 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑛 ) ) )
56 55 oveq2d ( 𝑚 = 𝑗 → ( 𝐺 Σg ( 𝑛 ∈ ( 𝑗𝐴 ( { 𝑗 } × 𝐶 ) “ { 𝑚 } ) ↦ ( 𝑚 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑛 ) ) ) = ( 𝐺 Σg ( 𝑛 ∈ ( 𝑗𝐴 ( { 𝑗 } × 𝐶 ) “ { 𝑗 } ) ↦ ( 𝑗 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑛 ) ) ) )
57 50 51 56 cbvmpt ( 𝑚𝐴 ↦ ( 𝐺 Σg ( 𝑛 ∈ ( 𝑗𝐴 ( { 𝑗 } × 𝐶 ) “ { 𝑚 } ) ↦ ( 𝑚 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑛 ) ) ) ) = ( 𝑗𝐴 ↦ ( 𝐺 Σg ( 𝑛 ∈ ( 𝑗𝐴 ( { 𝑗 } × 𝐶 ) “ { 𝑗 } ) ↦ ( 𝑗 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑛 ) ) ) )
58 vex 𝑗 ∈ V
59 vex 𝑘 ∈ V
60 58 59 elimasn ( 𝑘 ∈ ( 𝑗𝐴 ( { 𝑗 } × 𝐶 ) “ { 𝑗 } ) ↔ ⟨ 𝑗 , 𝑘 ⟩ ∈ 𝑗𝐴 ( { 𝑗 } × 𝐶 ) )
61 opeliunxp ( ⟨ 𝑗 , 𝑘 ⟩ ∈ 𝑗𝐴 ( { 𝑗 } × 𝐶 ) ↔ ( 𝑗𝐴𝑘𝐶 ) )
62 60 61 bitri ( 𝑘 ∈ ( 𝑗𝐴 ( { 𝑗 } × 𝐶 ) “ { 𝑗 } ) ↔ ( 𝑗𝐴𝑘𝐶 ) )
63 62 baib ( 𝑗𝐴 → ( 𝑘 ∈ ( 𝑗𝐴 ( { 𝑗 } × 𝐶 ) “ { 𝑗 } ) ↔ 𝑘𝐶 ) )
64 63 eqrdv ( 𝑗𝐴 → ( 𝑗𝐴 ( { 𝑗 } × 𝐶 ) “ { 𝑗 } ) = 𝐶 )
65 64 mpteq1d ( 𝑗𝐴 → ( 𝑛 ∈ ( 𝑗𝐴 ( { 𝑗 } × 𝐶 ) “ { 𝑗 } ) ↦ ( 𝑗 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑛 ) ) = ( 𝑛𝐶 ↦ ( 𝑗 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑛 ) ) )
66 nfcv 𝑘 𝑗
67 nfmpo2 𝑘 ( 𝑗𝐴 , 𝑘𝐶𝑋 )
68 nfcv 𝑘 𝑛
69 66 67 68 nfov 𝑘 ( 𝑗 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑛 )
70 nfcv 𝑛 ( 𝑗 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑘 )
71 oveq2 ( 𝑛 = 𝑘 → ( 𝑗 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑛 ) = ( 𝑗 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑘 ) )
72 69 70 71 cbvmpt ( 𝑛𝐶 ↦ ( 𝑗 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑛 ) ) = ( 𝑘𝐶 ↦ ( 𝑗 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑘 ) )
73 65 72 eqtrdi ( 𝑗𝐴 → ( 𝑛 ∈ ( 𝑗𝐴 ( { 𝑗 } × 𝐶 ) “ { 𝑗 } ) ↦ ( 𝑗 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑛 ) ) = ( 𝑘𝐶 ↦ ( 𝑗 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑘 ) ) )
74 73 adantl ( ( 𝜑𝑗𝐴 ) → ( 𝑛 ∈ ( 𝑗𝐴 ( { 𝑗 } × 𝐶 ) “ { 𝑗 } ) ↦ ( 𝑗 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑛 ) ) = ( 𝑘𝐶 ↦ ( 𝑗 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑘 ) ) )
75 simprl ( ( 𝜑 ∧ ( 𝑗𝐴𝑘𝐶 ) ) → 𝑗𝐴 )
76 simprr ( ( 𝜑 ∧ ( 𝑗𝐴𝑘𝐶 ) ) → 𝑘𝐶 )
77 35 ovmpt4g ( ( 𝑗𝐴𝑘𝐶𝑋𝐵 ) → ( 𝑗 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑘 ) = 𝑋 )
78 75 76 6 77 syl3anc ( ( 𝜑 ∧ ( 𝑗𝐴𝑘𝐶 ) ) → ( 𝑗 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑘 ) = 𝑋 )
79 78 anassrs ( ( ( 𝜑𝑗𝐴 ) ∧ 𝑘𝐶 ) → ( 𝑗 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑘 ) = 𝑋 )
80 79 mpteq2dva ( ( 𝜑𝑗𝐴 ) → ( 𝑘𝐶 ↦ ( 𝑗 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑘 ) ) = ( 𝑘𝐶𝑋 ) )
81 74 80 eqtrd ( ( 𝜑𝑗𝐴 ) → ( 𝑛 ∈ ( 𝑗𝐴 ( { 𝑗 } × 𝐶 ) “ { 𝑗 } ) ↦ ( 𝑗 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑛 ) ) = ( 𝑘𝐶𝑋 ) )
82 81 oveq2d ( ( 𝜑𝑗𝐴 ) → ( 𝐺 Σg ( 𝑛 ∈ ( 𝑗𝐴 ( { 𝑗 } × 𝐶 ) “ { 𝑗 } ) ↦ ( 𝑗 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑛 ) ) ) = ( 𝐺 Σg ( 𝑘𝐶𝑋 ) ) )
83 82 mpteq2dva ( 𝜑 → ( 𝑗𝐴 ↦ ( 𝐺 Σg ( 𝑛 ∈ ( 𝑗𝐴 ( { 𝑗 } × 𝐶 ) “ { 𝑗 } ) ↦ ( 𝑗 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑛 ) ) ) ) = ( 𝑗𝐴 ↦ ( 𝐺 Σg ( 𝑘𝐶𝑋 ) ) ) )
84 57 83 eqtrid ( 𝜑 → ( 𝑚𝐴 ↦ ( 𝐺 Σg ( 𝑛 ∈ ( 𝑗𝐴 ( { 𝑗 } × 𝐶 ) “ { 𝑚 } ) ↦ ( 𝑚 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑛 ) ) ) ) = ( 𝑗𝐴 ↦ ( 𝐺 Σg ( 𝑘𝐶𝑋 ) ) ) )
85 84 oveq2d ( 𝜑 → ( 𝐺 Σg ( 𝑚𝐴 ↦ ( 𝐺 Σg ( 𝑛 ∈ ( 𝑗𝐴 ( { 𝑗 } × 𝐶 ) “ { 𝑚 } ) ↦ ( 𝑚 ( 𝑗𝐴 , 𝑘𝐶𝑋 ) 𝑛 ) ) ) ) ) = ( 𝐺 Σg ( 𝑗𝐴 ↦ ( 𝐺 Σg ( 𝑘𝐶𝑋 ) ) ) ) )
86 39 85 eqtrd ( 𝜑 → ( 𝐺 Σg ( 𝑗𝐴 , 𝑘𝐶𝑋 ) ) = ( 𝐺 Σg ( 𝑗𝐴 ↦ ( 𝐺 Σg ( 𝑘𝐶𝑋 ) ) ) ) )