Finite sequence bounded by last value plus positive increments
ProvedFin.apply_le_last_add_sum_max_subalgebrareal-analysis
Let be a natural number and a real-valued sequence on . Write for the final index. Then for every index ,\n\n
\n\nEach term bounds the positive backward increment; the sum telescopes to control the drop from the endpoint. This discrete Gronwall-type estimate is reused in polygon height bounds.\n\nFormalization Note Drift repair: upstream imports Mathlib.Basic.Real.Basic (present in v4.35, absent in the supported rev); here replaced by Mathlib.Data.Real.Basic with identical content.
Preamble
import Mathlib.Algebra.BigOperators.Fin import Mathlib.Data.Real.Basic import Mathlib.Tactic.FinCases import Mathlib.Tactic.Linarith open Fin
Formal statement
namespace Fin
theorem apply_le_last_add_sum_max_sub {n : ℕ} (f : Fin (n + 1) → ℝ) (i : Fin (n + 1)) : f i ≤ f (Fin.last n) + ∑ j : Fin n, max (f j.castSucc - f j.succ) 0 := by sorry
end FinSource