(** 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 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).