(****************************************************************************  IEEE754  :  FPred  Laurent Thery  ******************************************************************************)
Require Export FSucc.
Section pred.
Variable b : Fbound.
Variable radix : Z.
Variable precision : nat.
Let FtoRradix := FtoR radix.
Local Coercion FtoRradix : float >-> R.
Hypothesis radixMoreThanOne : (1 < radix)%Z.
Hypothesis precisionNotZero : precision <> 0.
Hypothesis pGivesBound : Zpos (vNum b) = Zpower_nat radix precision.
Definition FPred (x : float) :=
match Z_eq_bool (Fnum x) (- pPred (vNum b)) with
| true => Float (- nNormMin radix precision) (Zsucc (Fexp x))
| false =>
match Z_eq_bool (Fnum x) (nNormMin radix precision) with
| true =>
match Z_eq_bool (Fexp x) (- dExp b) with
| true => Float (Zpred (Fnum x)) (Fexp x)
| false => Float (pPred (vNum b)) (Zpred (Fexp x))
end
| false => Float (Zpred (Fnum x)) (Fexp x)
end
end.

(* Specifications: *)
Theorem FPredSimpl1 :
forall x : float,
Fnum x = (- pPred (vNum b))%Z ->
FPred x = Float (- nNormMin radix precision) (Zsucc (Fexp x)).