proposition: Lemma nondecreasing_variation a b f s : {in `[a, b] &, nondecreasing_fun f} -> itv_partition a b s -> variation a b f s = f b - f a.
proof: Proof. move=> ndf abs; rewrite /variation; set F : nat -> R := f \o nth _ (a :: s). transitivity (\sum_(0 <= n < size s) (F n.+1 - F n)). rewrite !big_nat; apply: eq_bigr => k; rewrite leq0n/= => ks. by rewrite ger0_norm// subr_ge0; exact: nondecreasing_fun_itv_partition. by rewrite telescope_sumr// /F/= (itv_partition_nth_size _ abs). Qed.
imports: mathcomp(all_ssreflect ssralg ssrint ssrnum finmap) mathcomp(matrix interval zmodp vector fieldext falgebra) mathcomp(mathcomp_extra boolp classical_sets functions) mathcomp(cardinality) ereal reals signed topology prodnormedzmodule normedtype derive sequences real_interval HB(structures)