Definition sf_SF_val_fun (f : R -> R) (a b : R) (n : nat) : StepFun a b.

(* Specifications: *)
Lemma SF_val_subdiv_val (f : R -> R) (a b : R) (n : nat) :
subdivision_val (sf_SF_val_fun f a b n) =
match (Rle_dec a b) with
| left _ => seq2Rlist (SF_val_ly f a b n)
| right _ => seq2Rlist (SF_val_ly f b a n)
end.
Lemma SF_val_fun_rw (f : R -> R) (a b : R) (n : nat) (x : R) (Hx : a <= x <= b) :
SF_val_fun f a b n x =
match (unif_part_nat a b n x Hx) with
| inleft H => f (a + (INR (proj1_sig H) + /2) * (b-a) / (INR n + 1))
| inright _ => f (a + (INR n + /2) * (b-a) / (INR n + 1))
end.
Lemma RInt_val_Reals (f : R -> R) (a b : R) (n : nat) :
RInt_val f a b n = RiemannInt_SF (sf_SF_val_fun f a b n).