End Bool.
Section cond_Ropp.
Definition cond_Ropp (b : bool) m := if b then Ropp m else m.

(* Specifications: *)
Theorem Z2R_cond_Zopp :
forall b m,
Z2R (cond_Zopp b m) = cond_Ropp b (Z2R m).
Theorem abs_cond_Ropp :
forall b m,
Rabs (cond_Ropp b m) = Rabs m.
Theorem cond_Ropp_Rlt_bool :
forall m,
cond_Ropp (Rlt_bool m 0) m = Rabs m.
Theorem cond_Ropp_involutive :
forall b x,
cond_Ropp b (cond_Ropp b x) = x.
Theorem cond_Ropp_even_function :
forall {A : Type} (f : R -> A),
(forall x, f (Ropp x) = f x) ->
forall b x, f (cond_Ropp b x) = f x.
Theorem cond_Ropp_odd_function :
forall (f : R -> R),
(forall x, f (Ropp x) = Ropp (f x)) ->
forall b x, f (cond_Ropp b x) = cond_Ropp b (f x).
Theorem cond_Ropp_inj :
forall b x y,
cond_Ropp b x = cond_Ropp b y -> x = y.
Theorem cond_Ropp_mult_l :
forall b x y,
cond_Ropp b (x * y) = (cond_Ropp b x * y)%R.
Theorem cond_Ropp_mult_r :
forall b x y,
cond_Ropp b (x * y) = (x * cond_Ropp b y)%R.
Theorem cond_Ropp_plus :
forall b x y,
cond_Ropp b (x + y) = (cond_Ropp b x + cond_Ropp b y)%R.