Qed.

(* Specifications: *)
Theorem SF2Prim_inj : forall x y, SF2Prim x = SF2Prim y -> valid_binary x = true -> valid_binary y = true -> x = y.
intros. rewrite <- Prim2SF_SF2Prim by assumption. symmetry. rewrite <- Prim2SF_SF2Prim by assumption. rewrite H. reflexivity.
Axiom opp_spec : forall x, Prim2SF (-x)%float = SFopp (Prim2SF x).
Axiom abs_spec : forall x, Prim2SF (abs x) = SFabs (Prim2SF x).
Axiom eqb_spec : forall x y, (x =? y)%float = SFeqb (Prim2SF x) (Prim2SF y).
Axiom ltb_spec : forall x y, (x <? y)%float = SFltb (Prim2SF x) (Prim2SF y).
Axiom leb_spec : forall x y, (x <=? y)%float = SFleb (Prim2SF x) (Prim2SF y).
Definition flatten_cmp_opt c :=
match c with
| None => FNotComparable
| Some Eq => FEq
| Some Lt => FLt
| Some Gt => FGt
end.
Axiom compare_spec : forall x y, (x ?= y)%float = flatten_cmp_opt (SFcompare (Prim2SF x) (Prim2SF y)).
Module Leibniz.
Axiom eqb_spec : forall x y, Leibniz.eqb x y = true <-> x = y.
End Leibniz.
Axiom classify_spec : forall x, classify x = SF64classify (Prim2SF x).
Axiom mul_spec : forall x y, Prim2SF (x * y)%float = SF64mul (Prim2SF x) (Prim2SF y).
Axiom add_spec : forall x y, Prim2SF (x + y)%float = SF64add (Prim2SF x) (Prim2SF y).
Axiom sub_spec : forall x y, Prim2SF (x - y)%float = SF64sub (Prim2SF x) (Prim2SF y).
Axiom div_spec : forall x y, Prim2SF (x / y)%float = SF64div (Prim2SF x) (Prim2SF y).
Axiom sqrt_spec : forall x, Prim2SF (sqrt x) = SF64sqrt (Prim2SF x).
Axiom of_uint63_spec : forall n, Prim2SF (of_uint63 n) = binary_normalize prec emax (to_Z n) Z0 false.
Axiom normfr_mantissa_spec : forall f, to_Z (normfr_mantissa f) = Z.of_N (SFnormfr_mantissa prec (Prim2SF f)).
Axiom frshiftexp_spec : forall f,
let (m,e) := frshiftexp f in
(Prim2SF m, Z.sub (to_Z e) shift) = SFfrexp prec emax (Prim2SF f).
Axiom ldshiftexp_spec : forall f e,
Prim2SF (ldshiftexp f e) = SFldexp prec emax (Prim2SF f) (Z.sub (to_Z e) shift).
Axiom next_up_spec : forall x, Prim2SF (next_up x) = SF64succ (Prim2SF x).
Axiom next_down_spec : forall x, Prim2SF (next_down x) = SF64pred (Prim2SF x).
Lemma pow2_sqrt x : 0 <= x -> sqrt x ^ 2 = x.
Lemma Rsqr_sqrt : forall x:R, 0 <= x -> Rsqr (sqrt x) = x.
Lemma sqrt_mult_alt :
forall x y : R, 0 <= x -> sqrt (x * y) = sqrt x * sqrt y.
Lemma sqrt_mult :
forall x y:R, 0 <= x -> 0 <= y -> sqrt (x * y) = sqrt x * sqrt y.
Lemma sqrt_lt_R0 : forall x:R, 0 < x -> 0 < sqrt x.
Lemma Rlt_mult_inv_pos : forall x y:R, 0 < x -> 0 < y -> 0 < x * / y.
intros x y H H0; try assumption.
(**********)
Lemma cos_minus : forall x y:R, cos (x - y) = cos x * cos y + sin x * sin y.
(**********)
Lemma sin2_cos2 : forall x:R, Rsqr (sin x) + Rsqr (cos x) = 1.
Lemma cos2 : forall x:R, Rsqr (cos x) = 1 - Rsqr (sin x).
Lemma sin2 : forall x:R, Rsqr (sin x) = 1 - Rsqr (cos x).
(**********)
Lemma cos_PI2 : cos (PI / 2) = 0.
Lemma sin_pos_tech : forall x, 0 < x < 2 -> 0 < sin x.
intros x [int1 int2].
Theorem Tget_Tadd: forall i j a T,
Tget i (Tadd j a T) =
match (i ?= j) with
Eq => PSome a
| Lt => Tget i T
| Gt => Tget i T
end.
Lemma Acc_clos_trans : forall x:A, Acc R x -> Acc trans_clos x.
induction 1 as [x0 _ H1].
Theorem Union_increases_r : forall a b:Ensemble U, Included U b (Union U a b).
auto with sets.
Theorem Intersection_decreases_l :
forall a b:Ensemble U, Included U (Intersection U a b) a.
Lemma IfProp_sum : forall (A B:Prop) (b:bool), IfProp A B b -> {A} + {B}.
intros A B b; destruct b; intro H.
Lemma nsatzR_diff: forall x y:R, not (x == y) -> not (x - y == 0).
intros.