(** * The sign function *)
Definition sign (x : R) :=
match total_order_T 0 x with
| inleft (left _) => 1
| inleft (right _) => 0
| inright _ => -1
end.

Lemma sum_INR : forall n, sum_f_R0 INR n = INR n * (INR n + 1) / 2.