Metamath Proof Explorer


Theorem isumless

Description: A finite sum of nonnegative numbers is less than or equal to its limit. (Contributed by Mario Carneiro, 24-Apr-2014)

Ref Expression
Hypotheses isumless.1 𝑍 = ( ℤ𝑀 )
isumless.2 ( 𝜑𝑀 ∈ ℤ )
isumless.3 ( 𝜑𝐴 ∈ Fin )
isumless.4 ( 𝜑𝐴𝑍 )
isumless.5 ( ( 𝜑𝑘𝑍 ) → ( 𝐹𝑘 ) = 𝐵 )
isumless.6 ( ( 𝜑𝑘𝑍 ) → 𝐵 ∈ ℝ )
isumless.7 ( ( 𝜑𝑘𝑍 ) → 0 ≤ 𝐵 )
isumless.8 ( 𝜑 → seq 𝑀 ( + , 𝐹 ) ∈ dom ⇝ )
Assertion isumless ( 𝜑 → Σ 𝑘𝐴 𝐵 ≤ Σ 𝑘𝑍 𝐵 )

Proof

Step Hyp Ref Expression
1 isumless.1 𝑍 = ( ℤ𝑀 )
2 isumless.2 ( 𝜑𝑀 ∈ ℤ )
3 isumless.3 ( 𝜑𝐴 ∈ Fin )
4 isumless.4 ( 𝜑𝐴𝑍 )
5 isumless.5 ( ( 𝜑𝑘𝑍 ) → ( 𝐹𝑘 ) = 𝐵 )
6 isumless.6 ( ( 𝜑𝑘𝑍 ) → 𝐵 ∈ ℝ )
7 isumless.7 ( ( 𝜑𝑘𝑍 ) → 0 ≤ 𝐵 )
8 isumless.8 ( 𝜑 → seq 𝑀 ( + , 𝐹 ) ∈ dom ⇝ )
9 4 sselda ( ( 𝜑𝑘𝐴 ) → 𝑘𝑍 )
10 6 recnd ( ( 𝜑𝑘𝑍 ) → 𝐵 ∈ ℂ )
11 9 10 syldan ( ( 𝜑𝑘𝐴 ) → 𝐵 ∈ ℂ )
12 11 ralrimiva ( 𝜑 → ∀ 𝑘𝐴 𝐵 ∈ ℂ )
13 1 eqimssi 𝑍 ⊆ ( ℤ𝑀 )
14 13 orci ( 𝑍 ⊆ ( ℤ𝑀 ) ∨ 𝑍 ∈ Fin )
15 14 a1i ( 𝜑 → ( 𝑍 ⊆ ( ℤ𝑀 ) ∨ 𝑍 ∈ Fin ) )
16 sumss2 ( ( ( 𝐴𝑍 ∧ ∀ 𝑘𝐴 𝐵 ∈ ℂ ) ∧ ( 𝑍 ⊆ ( ℤ𝑀 ) ∨ 𝑍 ∈ Fin ) ) → Σ 𝑘𝐴 𝐵 = Σ 𝑘𝑍 if ( 𝑘𝐴 , 𝐵 , 0 ) )
17 4 12 15 16 syl21anc ( 𝜑 → Σ 𝑘𝐴 𝐵 = Σ 𝑘𝑍 if ( 𝑘𝐴 , 𝐵 , 0 ) )
18 eleq1w ( 𝑗 = 𝑘 → ( 𝑗𝐴𝑘𝐴 ) )
19 fveq2 ( 𝑗 = 𝑘 → ( 𝐹𝑗 ) = ( 𝐹𝑘 ) )
20 18 19 ifbieq1d ( 𝑗 = 𝑘 → if ( 𝑗𝐴 , ( 𝐹𝑗 ) , 0 ) = if ( 𝑘𝐴 , ( 𝐹𝑘 ) , 0 ) )
21 eqid ( 𝑗𝑍 ↦ if ( 𝑗𝐴 , ( 𝐹𝑗 ) , 0 ) ) = ( 𝑗𝑍 ↦ if ( 𝑗𝐴 , ( 𝐹𝑗 ) , 0 ) )
22 fvex ( 𝐹𝑘 ) ∈ V
23 c0ex 0 ∈ V
24 22 23 ifex if ( 𝑘𝐴 , ( 𝐹𝑘 ) , 0 ) ∈ V
25 20 21 24 fvmpt ( 𝑘𝑍 → ( ( 𝑗𝑍 ↦ if ( 𝑗𝐴 , ( 𝐹𝑗 ) , 0 ) ) ‘ 𝑘 ) = if ( 𝑘𝐴 , ( 𝐹𝑘 ) , 0 ) )
26 25 adantl ( ( 𝜑𝑘𝑍 ) → ( ( 𝑗𝑍 ↦ if ( 𝑗𝐴 , ( 𝐹𝑗 ) , 0 ) ) ‘ 𝑘 ) = if ( 𝑘𝐴 , ( 𝐹𝑘 ) , 0 ) )
27 5 ifeq1d ( ( 𝜑𝑘𝑍 ) → if ( 𝑘𝐴 , ( 𝐹𝑘 ) , 0 ) = if ( 𝑘𝐴 , 𝐵 , 0 ) )
28 26 27 eqtrd ( ( 𝜑𝑘𝑍 ) → ( ( 𝑗𝑍 ↦ if ( 𝑗𝐴 , ( 𝐹𝑗 ) , 0 ) ) ‘ 𝑘 ) = if ( 𝑘𝐴 , 𝐵 , 0 ) )
29 0re 0 ∈ ℝ
30 ifcl ( ( 𝐵 ∈ ℝ ∧ 0 ∈ ℝ ) → if ( 𝑘𝐴 , 𝐵 , 0 ) ∈ ℝ )
31 6 29 30 sylancl ( ( 𝜑𝑘𝑍 ) → if ( 𝑘𝐴 , 𝐵 , 0 ) ∈ ℝ )
32 leid ( 𝐵 ∈ ℝ → 𝐵𝐵 )
33 breq1 ( 𝐵 = if ( 𝑘𝐴 , 𝐵 , 0 ) → ( 𝐵𝐵 ↔ if ( 𝑘𝐴 , 𝐵 , 0 ) ≤ 𝐵 ) )
34 breq1 ( 0 = if ( 𝑘𝐴 , 𝐵 , 0 ) → ( 0 ≤ 𝐵 ↔ if ( 𝑘𝐴 , 𝐵 , 0 ) ≤ 𝐵 ) )
35 33 34 ifboth ( ( 𝐵𝐵 ∧ 0 ≤ 𝐵 ) → if ( 𝑘𝐴 , 𝐵 , 0 ) ≤ 𝐵 )
36 32 35 sylan ( ( 𝐵 ∈ ℝ ∧ 0 ≤ 𝐵 ) → if ( 𝑘𝐴 , 𝐵 , 0 ) ≤ 𝐵 )
37 6 7 36 syl2anc ( ( 𝜑𝑘𝑍 ) → if ( 𝑘𝐴 , 𝐵 , 0 ) ≤ 𝐵 )
38 1 2 3 4 28 11 fsumcvg3 ( 𝜑 → seq 𝑀 ( + , ( 𝑗𝑍 ↦ if ( 𝑗𝐴 , ( 𝐹𝑗 ) , 0 ) ) ) ∈ dom ⇝ )
39 1 2 28 31 5 6 37 38 8 isumle ( 𝜑 → Σ 𝑘𝑍 if ( 𝑘𝐴 , 𝐵 , 0 ) ≤ Σ 𝑘𝑍 𝐵 )
40 17 39 eqbrtrd ( 𝜑 → Σ 𝑘𝐴 𝐵 ≤ Σ 𝑘𝑍 𝐵 )