Metamath Proof Explorer


Theorem sge0sn

Description: A sum of a nonnegative extended real is the term. (Contributed by Glauco Siliprandi, 17-Aug-2020)

Ref Expression
Hypotheses sge0sn.1 φ A V
sge0sn.2 φ F : A 0 +∞
Assertion sge0sn φ sum^ F = F A

Proof

Step Hyp Ref Expression
1 sge0sn.1 φ A V
2 sge0sn.2 φ F : A 0 +∞
3 snex A V
4 3 a1i φ F A = +∞ A V
5 2 adantr φ F A = +∞ F : A 0 +∞
6 id F A = +∞ F A = +∞
7 6 eqcomd F A = +∞ +∞ = F A
8 7 adantl φ F A = +∞ +∞ = F A
9 2 ffund φ Fun F
10 9 adantr φ F A = +∞ Fun F
11 snidg A V A A
12 1 11 syl φ A A
13 2 fdmd φ dom F = A
14 13 eqcomd φ A = dom F
15 12 14 eleqtrd φ A dom F
16 15 adantr φ F A = +∞ A dom F
17 fvelrn Fun F A dom F F A ran F
18 10 16 17 syl2anc φ F A = +∞ F A ran F
19 8 18 eqeltrd φ F A = +∞ +∞ ran F
20 4 5 19 sge0pnfval φ F A = +∞ sum^ F = +∞
21 simpr φ F A = +∞ F A = +∞
22 20 21 eqtr4d φ F A = +∞ sum^ F = F A
23 3 a1i φ ¬ F A = +∞ A V
24 2 adantr φ ¬ F A = +∞ F : A 0 +∞
25 elsni +∞ F A +∞ = F A
26 25 eqcomd +∞ F A F A = +∞
27 26 con3i ¬ F A = +∞ ¬ +∞ F A
28 27 adantl φ ¬ F A = +∞ ¬ +∞ F A
29 1 2 rnsnf φ ran F = F A
30 29 eqcomd φ F A = ran F
31 30 adantr φ ¬ F A = +∞ F A = ran F
32 28 31 neleqtrd φ ¬ F A = +∞ ¬ +∞ ran F
33 24 32 fge0iccico φ ¬ F A = +∞ F : A 0 +∞
34 23 33 sge0reval φ ¬ F A = +∞ sum^ F = sup ran x 𝒫 A Fin y x F y * <
35 sum0 y F y = 0
36 35 eqcomi 0 = y F y
37 36 a1i φ ¬ F A = +∞ 0 = y F y
38 nfcvd φ ¬ F A = +∞ _ y F A
39 nfv y φ ¬ F A = +∞
40 fveq2 y = A F y = F A
41 40 adantl φ ¬ F A = +∞ y = A F y = F A
42 1 adantr φ ¬ F A = +∞ A V
43 rge0ssre 0 +∞
44 ax-resscn
45 43 44 sstri 0 +∞
46 42 11 syl φ ¬ F A = +∞ A A
47 33 46 ffvelrnd φ ¬ F A = +∞ F A 0 +∞
48 45 47 sselid φ ¬ F A = +∞ F A
49 38 39 41 42 48 sumsnd φ ¬ F A = +∞ y A F y = F A
50 49 eqcomd φ ¬ F A = +∞ F A = y A F y
51 37 50 preq12d φ ¬ F A = +∞ 0 F A = y F y y A F y
52 51 supeq1d φ ¬ F A = +∞ sup 0 F A * < = sup y F y y A F y * <
53 xrltso < Or *
54 53 a1i φ < Or *
55 0xr 0 *
56 55 a1i φ 0 *
57 iccssxr 0 +∞ *
58 2 12 ffvelrnd φ F A 0 +∞
59 57 58 sselid φ F A *
60 suppr < Or * 0 * F A * sup 0 F A * < = if F A < 0 0 F A
61 54 56 59 60 syl3anc φ sup 0 F A * < = if F A < 0 0 F A
62 pnfxr +∞ *
63 62 a1i φ +∞ *
64 56 63 58 3jca φ 0 * +∞ * F A 0 +∞
65 iccgelb 0 * +∞ * F A 0 +∞ 0 F A
66 64 65 syl φ 0 F A
67 56 59 xrlenltd φ 0 F A ¬ F A < 0
68 66 67 mpbid φ ¬ F A < 0
69 68 iffalsed φ if F A < 0 0 F A = F A
70 61 69 eqtr2d φ F A = sup 0 F A * <
71 70 adantr φ ¬ F A = +∞ F A = sup 0 F A * <
72 pwsn 𝒫 A = A
73 72 ineq1i 𝒫 A Fin = A Fin
74 0fin Fin
75 snfi A Fin
76 prssi Fin A Fin A Fin
77 74 75 76 mp2an A Fin
78 df-ss A Fin A Fin = A
79 78 biimpi A Fin A Fin = A
80 77 79 ax-mp A Fin = A
81 73 80 eqtri 𝒫 A Fin = A
82 mpteq1 𝒫 A Fin = A x 𝒫 A Fin y x F y = x A y x F y
83 81 82 ax-mp x 𝒫 A Fin y x F y = x A y x F y
84 0ex V
85 84 a1i V
86 3 a1i A V
87 sumex y F y V
88 87 a1i y F y V
89 sumex y A F y V
90 89 a1i y A F y V
91 sumeq1 x = y x F y = y F y
92 91 adantl x = y x F y = y F y
93 sumeq1 x = A y x F y = y A F y
94 93 adantl x = A y x F y = y A F y
95 85 86 88 90 92 94 fmptpr y F y A y A F y = x A y x F y
96 95 mptru y F y A y A F y = x A y x F y
97 96 eqcomi x A y x F y = y F y A y A F y
98 83 97 eqtri x 𝒫 A Fin y x F y = y F y A y A F y
99 98 rneqi ran x 𝒫 A Fin y x F y = ran y F y A y A F y
100 rnpropg V A V ran y F y A y A F y = y F y y A F y
101 84 3 100 mp2an ran y F y A y A F y = y F y y A F y
102 99 101 eqtri ran x 𝒫 A Fin y x F y = y F y y A F y
103 102 supeq1i sup ran x 𝒫 A Fin y x F y * < = sup y F y y A F y * <
104 103 a1i φ ¬ F A = +∞ sup ran x 𝒫 A Fin y x F y * < = sup y F y y A F y * <
105 52 71 104 3eqtr4d φ ¬ F A = +∞ F A = sup ran x 𝒫 A Fin y x F y * <
106 34 105 eqtr4d φ ¬ F A = +∞ sum^ F = F A
107 22 106 pm2.61dan φ sum^ F = F A