(** seq_step *)

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

(* Specifications: *)
Lemma seq_step_ge_0 x : (0 <= seq_step x).
Lemma seq_step_cat (x y : seq R) : (0 < size x)%nat -> (0 < size y)%nat -> last 0 x = head 0 y -> seq_step (cat x (behead y)) = Rmax (seq_step x) (seq_step y).
Lemma seq_step_rev (l : seq R) : seq_step (rev l) = seq_step l.
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.