Definition CReal_mult (x y : CReal) : CReal :=
{|
seq := CReal_mult_seq x y;
scale := CReal_mult_scale x y;
cauchy := CReal_mult_cauchy x y;
bound := CReal_mult_bound x y
|}.
Infix "*" := CReal_mult : CReal_scope.

(* Specifications: *)
Lemma CReal_mult_comm : forall x y : CReal, x * y == y * x.
(* ToDo: make a tactic for this *)
Lemma CReal_red_scale: forall (a : Z -> Q) (b : Z) (c : QCauchySeq a) (d : QBound a b),
scale (mkCReal a b c d) = b.
Lemma CReal_mult_proper_0_l : forall x y : CReal,
y == 0 -> x * y == 0.
Lemma CReal_mult_0_r : forall r, r * 0 == 0.
Lemma CReal_mult_0_l : forall r, 0 * r == 0.
Lemma CReal_scale_sep0_limit : forall (x : CReal) (n : Z),
(2 * (2^n)%Q < seq x n)%Q
-> (n <= scale x - 2)%Z.
(* Correctness lemma for the Definition CReal_mult_lt_0_compat below. *)
Lemma CReal_mult_lt_0_compat_correct
: forall (x y : CReal) (Hx : 0 < x) (Hy : 0 < y),
(2 * 2^(proj1_sig Hx + proj1_sig Hy - 1)%Z <
seq (x * y)%CReal (proj1_sig Hx + proj1_sig Hy - 1)%Z -
seq (inject_Q 0) (proj1_sig Hx + proj1_sig Hy - 1)%Z)%Q.