(** RInt_val *)
Section RInt_val.
Context {V : ModuleSpace R_Ring}.
Definition RInt_val (f : R -> V) (a b : R) (n : nat) :=
Riemann_sum f (SF_seq_f2 (fun x y => (x + y) / 2) (unif_part a b n)).

(* Specifications: *)
Lemma RInt_val_point (f : R -> V) (a : R) (n : nat) :
RInt_val f a a n = zero.
Lemma RInt_val_swap :
forall (f : R -> V) (a b : R) (n : nat),
RInt_val f a b n = opp (RInt_val f b a n).
Lemma RInt_val_ext (f g : R -> V) (a b : R) (n : nat) :
(forall x, Rmin a b <= x <= Rmax a b -> f x = g x)
-> RInt_val g a b n = RInt_val f a b n.
Lemma RInt_val_comp_opp (f : R -> V) (a b : R) (n : nat) :
RInt_val (fun x => f (- x)) a b n = opp (RInt_val f (- a) (- b) n).
Lemma RInt_val_comp_lin (f : R -> V) (u v : R) (a b : R) (n : nat) :
scal u (RInt_val (fun x => f (u * x + v)) a b n) = RInt_val f (u * a + v) (u * b + v) n.