Definition SF_fun (s : SF_seq) (y0 : T) (x : R) :=
  SF_fun_aux (SF_h s,y0) (SF_t s) y0 x.

Lemma SF_fun_incr (s : SF_seq) (y0 : T) (x : R) Hs Hx : SF_fun s y0 x = match (sorted_dec (SF_lx s) 0 x Hs Hx) with | inleft H => nth y0 (SF_ly s) (proj1_sig H) | inright _ => nth y0 (SF_ly s) (SF_size s -1)%nat end.