Section Fbounded_Def.
Variable radix : Z.
Hypothesis radixMoreThanOne : (1 < radix)%Z.
Let radixMoreThanZERO := Zlt_1_O _ (Zlt_le_weak _ _ radixMoreThanOne).
Hint Resolve radixMoreThanZERO: zarith.
Let FtoRradix := FtoR radix.
Local Coercion FtoRradix : float >-> R.
Coercion Z_of_N: N >-> Z.
Record Fbound : Set := Bound {vNum : positive; dExp : N}.
Definition Fbounded (b : Fbound) (d : float) :=
(Z.abs (Fnum d) < Zpos (vNum b))%Z /\ (- dExp b <= Fexp d)%Z.
intros b p H; case H; intros H1 H2; case H1; auto.
Qed.
intros b p H; case H; auto.
Qed.
Hint Resolve FboundedNum FboundedExp: float.
intros b p; case (Z_le_gt_dec (Zpos (vNum b)) (Z.abs (Fnum p)));
intros H'.
right; red in |- *; intros H'3; Contradict H'; auto with float zarith.
case (Z_le_gt_dec (- dExp b) (Fexp p)); intros H'1.
left; repeat split; auto with zarith.
right; red in |- *; intros H'3; Contradict H'1; auto with float zarith.
Qed.
intros b; unfold FtoRradix, FtoR in |- *; simpl in |- *; auto with real.
Qed.
intros b; repeat (split; simpl in |- *).
replace 0%Z with (- 0%nat)%Z; [ idtac | simpl in |- *; auto ].
apply Zeq_le; auto with arith.
Qed.
Hint Unfold Fbounded.
intros b p H'; (repeat split; simpl in |- *; auto with float zarith).
Qed.
intros b p n H'; repeat split; simpl in |- *; auto with float.
apply Z.le_trans with (Fexp p); auto with float.
pattern (Fexp p) at 1 in |- *;
(replace (Fexp p) with (Fexp p + 0%nat)%Z; [ idtac | simpl in |- *; ring ]).
apply Zplus_le_compat_l.
apply inj_le; auto with arith.
Qed.
intros b p n; unfold FtoRradix, FtoR in |- *; simpl in |- *.
rewrite powerRZ_add; auto with real zarith.
ring.
Qed.
intros b x H'; repeat split; simpl in |- *; auto with float zarith.
replace (Z.abs (- Fnum x)) with (Z.abs (Fnum x)); auto with float.
case (Fnum x); simpl in |- *; auto.
Qed.
intros b x H'; rewrite <- (Fopp_Fopp x).
apply oppBounded; auto.
Qed.
intros b z p H'; elim H'; intros r E; elim E; intros H'0 H'1; elim H'1;
intros H'2 H'3; clear H'1 E H'.
exists (Fopp r); split; auto.
rewrite <- (Ropp_involutive p).
rewrite <- H'0; auto.
unfold FtoRradix in |- *; apply Fopp_correct; auto.
split.
apply oppBounded; auto.
simpl in |- *; auto.
Qed.

Theorem absFBounded :
forall (b : Fbound) (f : float), Fbounded b f -> Fbounded b (Fabs f).