proposition: Lemma CReal_max_r : forall x y : CReal, y <= CReal_max x y.
proof: Proof. intros. unfold CReal_max. apply (CReal_mult_le_reg_r 2). - apply inject_Q_lt; reflexivity. - rewrite CReal_mult_assoc, <- inject_Q_mult. setoid_replace ((1 # 2) * 2)%Q with 1%Q. 2: reflexivity. rewrite CReal_mult_1_r. rewrite CReal_mult_comm, CReal_double. rewrite (CReal_plus_comm x). rewrite CReal_plus_assoc. apply CReal_plus_le_compat_l. apply (CReal_plus_le_reg_l (-x)). rewrite <- CReal_plus_assoc, CReal_plus_opp_l, CReal_plus_0_l. rewrite CReal_plus_comm. apply CReal_le_abs. Qed.
imports: QArith Qabs Qpower ConstructiveCauchyReals ConstructiveCauchyRealsMult Lia Lqa QExtra