Section SF_map.
Context {T T0 : Type}.
Definition SF_map  (f : T -> T0) (s : SF_seq) : SF_seq :=
mkSF_seq (SF_h s) (map (fun x => (fst x,f (snd x))) (SF_t s)).
End SF_map.
(** * Pointed subvivision *)
Definition pointed_subdiv (ptd : @SF_seq R) :=
forall i : nat, (i < SF_size ptd)%nat ->
nth 0 (SF_lx ptd) i <= nth 0 (SF_ly ptd) i <= nth 0 (SF_lx ptd) (S i).

Lemma ptd_cons h s : pointed_subdiv (SF_cons h s) -> pointed_subdiv s.
Lemma ptd_sort ptd :
pointed_subdiv ptd -> SF_sorted Rle ptd.