theorem
sum_le_integral_of_le
{a b : ℕ}
{f g : ℝ → ℝ}
(hab : a ≤ b)
(h : ∀ i ∈ Set.Ico a b, ∀ x ∈ Set.Ico ↑i ↑(i + 1), f ↑i ≤ g x)
(hg : MeasureTheory.IntegrableOn g (Set.Ico ↑a ↑b) MeasureTheory.volume)
:
∑ i ∈ Finset.Ico a b, f ↑i ≤ ∫ (x : ℝ) in ↑a..↑b, g x