(** seq_step *)

Definition seq_step (s : seq R) :=
  foldr Rmax 0 (pairmap (fun x y => Rabs (Rminus y x)) (head 0 s) (behead s)).

Lemma nth_le_seq_step x0 (l : seq R) (i : nat) : (S i < size l)%nat -> Rabs (nth x0 l (S i) - nth x0 l i) <= seq_step l.