Metamath Proof Explorer


Theorem fsumlessf

Description: A shorter sum of nonnegative terms is smaller than a longer one. (Contributed by Glauco Siliprandi, 21-Nov-2020)

Ref Expression
Hypotheses fsumlessf.k 𝑘 𝜑
fsumge0.a ( 𝜑𝐴 ∈ Fin )
fsumge0.b ( ( 𝜑𝑘𝐴 ) → 𝐵 ∈ ℝ )
fsumge0.l ( ( 𝜑𝑘𝐴 ) → 0 ≤ 𝐵 )
fsumless.c ( 𝜑𝐶𝐴 )
Assertion fsumlessf ( 𝜑 → Σ 𝑘𝐶 𝐵 ≤ Σ 𝑘𝐴 𝐵 )

Proof

Step Hyp Ref Expression
1 fsumlessf.k 𝑘 𝜑
2 fsumge0.a ( 𝜑𝐴 ∈ Fin )
3 fsumge0.b ( ( 𝜑𝑘𝐴 ) → 𝐵 ∈ ℝ )
4 fsumge0.l ( ( 𝜑𝑘𝐴 ) → 0 ≤ 𝐵 )
5 fsumless.c ( 𝜑𝐶𝐴 )
6 nfv 𝑘 𝑗𝐴
7 1 6 nfan 𝑘 ( 𝜑𝑗𝐴 )
8 nfcsb1v 𝑘 𝑗 / 𝑘 𝐵
9 8 nfel1 𝑘 𝑗 / 𝑘 𝐵 ∈ ℝ
10 7 9 nfim 𝑘 ( ( 𝜑𝑗𝐴 ) → 𝑗 / 𝑘 𝐵 ∈ ℝ )
11 eleq1w ( 𝑘 = 𝑗 → ( 𝑘𝐴𝑗𝐴 ) )
12 11 anbi2d ( 𝑘 = 𝑗 → ( ( 𝜑𝑘𝐴 ) ↔ ( 𝜑𝑗𝐴 ) ) )
13 csbeq1a ( 𝑘 = 𝑗𝐵 = 𝑗 / 𝑘 𝐵 )
14 13 eleq1d ( 𝑘 = 𝑗 → ( 𝐵 ∈ ℝ ↔ 𝑗 / 𝑘 𝐵 ∈ ℝ ) )
15 12 14 imbi12d ( 𝑘 = 𝑗 → ( ( ( 𝜑𝑘𝐴 ) → 𝐵 ∈ ℝ ) ↔ ( ( 𝜑𝑗𝐴 ) → 𝑗 / 𝑘 𝐵 ∈ ℝ ) ) )
16 10 15 3 chvarfv ( ( 𝜑𝑗𝐴 ) → 𝑗 / 𝑘 𝐵 ∈ ℝ )
17 nfcv 𝑘 0
18 nfcv 𝑘
19 17 18 8 nfbr 𝑘 0 ≤ 𝑗 / 𝑘 𝐵
20 7 19 nfim 𝑘 ( ( 𝜑𝑗𝐴 ) → 0 ≤ 𝑗 / 𝑘 𝐵 )
21 13 breq2d ( 𝑘 = 𝑗 → ( 0 ≤ 𝐵 ↔ 0 ≤ 𝑗 / 𝑘 𝐵 ) )
22 12 21 imbi12d ( 𝑘 = 𝑗 → ( ( ( 𝜑𝑘𝐴 ) → 0 ≤ 𝐵 ) ↔ ( ( 𝜑𝑗𝐴 ) → 0 ≤ 𝑗 / 𝑘 𝐵 ) ) )
23 20 22 4 chvarfv ( ( 𝜑𝑗𝐴 ) → 0 ≤ 𝑗 / 𝑘 𝐵 )
24 2 16 23 5 fsumless ( 𝜑 → Σ 𝑗𝐶 𝑗 / 𝑘 𝐵 ≤ Σ 𝑗𝐴 𝑗 / 𝑘 𝐵 )
25 nfcv 𝑗 𝐶
26 nfcv 𝑘 𝐶
27 nfcv 𝑗 𝐵
28 13 25 26 27 8 cbvsum Σ 𝑘𝐶 𝐵 = Σ 𝑗𝐶 𝑗 / 𝑘 𝐵
29 nfcv 𝑗 𝐴
30 nfcv 𝑘 𝐴
31 13 29 30 27 8 cbvsum Σ 𝑘𝐴 𝐵 = Σ 𝑗𝐴 𝑗 / 𝑘 𝐵
32 28 31 breq12i ( Σ 𝑘𝐶 𝐵 ≤ Σ 𝑘𝐴 𝐵 ↔ Σ 𝑗𝐶 𝑗 / 𝑘 𝐵 ≤ Σ 𝑗𝐴 𝑗 / 𝑘 𝐵 )
33 24 32 sylibr ( 𝜑 → Σ 𝑘𝐶 𝐵 ≤ Σ 𝑘𝐴 𝐵 )