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.
Theorem LPO_min : forall P : nat -> Prop, (forall n, P n \/ ~ P n) -> {n : nat | P n /\ forall i, (i < n)%nat -> ~ P i} + {forall n, ~ P n}.
Theorem LPO : forall P : nat -> Prop, (forall n, P n \/ ~ P n) -> {n : nat | P n} + {forall n, ~ P n}.
Lemma LPO_Z : forall P : Z -> Prop, (forall n, P n \/ ~P n) -> {n : Z| P n} + {forall n, ~ P n}.
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.
Theorem LPO_min : forall P : nat -> Prop, (forall n, P n \/ ~ P n) -> {n : nat | P n /\ forall i, (i < n)%nat -> ~ P i} + {forall n, ~ P n}.
Theorem LPO : forall P : nat -> Prop, (forall n, P n \/ ~ P n) -> {n : nat | P n} + {forall n, ~ P n}.
Lemma LPO_Z : forall P : Z -> Prop, (forall n, P n \/ ~P n) -> {n : Z| P n} + {forall n, ~ P n}.