Section F2.
Variable b : Fbound.
Variable precision : nat.
Let radix := 2%Z.
Let FtoRradix := FtoR radix.
Local Coercion FtoRradix : float >-> R.
red in |- *; simpl in |- *; auto.
Qed.
Hint Resolve TwoMoreThanOne.
Hypothesis precisionNotZero : 1 < precision.
Hypothesis pGivesBound : Zpos (vNum b) = Zpower_nat radix precision.
intros P H' p q pq H'0 H'1 H'2.
rewrite <- (Rabs_right radix); auto with real zarith.
rewrite <- RmaxRmult; auto with real.
repeat rewrite <- Rabs_mult.
case (Rle_or_lt p q); intros Rltp.
apply RmaxAbs; auto.
apply (RoundedModeMultLess b radix) with (P := P) (r := (p + q)%R); auto.
replace (radix * FtoR radix p)%R with (p + p)%R;
[ auto with real | unfold radix at 1; fold FtoRradix; ring].
unfold FtoRradix in |- *;
apply (RoundedModeMult b radix) with (P := P) (r := (p + q)%R);
auto.
replace (radix * FtoR radix q)%R with (q + q)%R;
[ auto with real | unfold radix at 1; fold FtoRradix; ring ].
rewrite RmaxSym.
apply RmaxAbs; auto.
apply (RoundedModeMultLess b radix) with (P := P) (r := (p + q)%R); auto.
replace (radix * FtoR radix q)%R with (q + q)%R;
[ auto with real | unfold radix at 1; fold FtoRradix; ring ].
unfold FtoRradix in |- *;
apply (RoundedModeMult b radix) with (P := P) (r := (p + q)%R);
auto.
replace (radix * FtoR radix p)%R with (p + p)%R;
[ auto with real zarith | unfold radix at 1; fold FtoRradix; ring].
Qed.
intros p q r H' H'0 H'1 H'2.
apply
Rlt_le_trans
with (Rabs (FtoR radix r) * / radix * (radix * / pPred (vNum b)))%R;
auto.
unfold FtoRradix in |- *; apply plusErrorBound1 with (precision := precision);
auto with arith.
replace (Rabs (FtoR radix r) * / radix * (radix * / pPred (vNum b)))%R with
(radix * / pPred (vNum b) * (Rabs r * / radix))%R;
[ idtac | fold FtoRradix; ring ].
apply Rmult_le_compat_l; auto.
replace 0%R with (radix * 0)%R; [ apply Rmult_le_compat_l | ring ].
cut (0 <= radix)%Z; auto with real zarith.
apply Rlt_le; apply Rinv_0_lt_compat; cut (0 < pPred (vNum b))%Z;
auto with real zarith.
unfold pPred in |- *; apply Zlt_succ_pred; simpl in |- *.
apply vNumbMoreThanOne with (radix := radix) (precision := precision);
auto with real arith.
apply Rmult_le_reg_l with (r := IZR radix); auto with real.
rewrite (Rmult_comm (Rabs r)); rewrite <- Rmult_assoc; rewrite Rinv_r;
auto with real zarith; rewrite Rmult_1_l.
apply plusUpperBound with (P := Closest b radix); auto.
apply ClosestRoundedModeP with (precision := precision); auto.
Qed.

Theorem plusClosestLowerBoundAux1 :
forall p q pq : float,
(Rabs q <= p)%R ->
Closest b radix (p + q) pq ->
Fbounded b p -> Fbounded b q -> pq <> (p + q)%R :>R -> (/ radix * p <= pq)%R.