proposition: Theorem truncate_correct_partial : forall x m e l, (0 < x)%R -> inbetween_float beta m e x l -> (e <= fexp (Zdigits beta m + e))%Z -> let '(m', e', l') := truncate (m, e, l) in inbetween_float beta m' e' x l' /\ e' = cexp beta fexp x.
proof: Proof. intros x m e l Hx H1 H2. apply truncate_correct_partial' with (1 := Hx) (2 := H1). rewrite cexp_inbetween_float with (1 := Hx) (2 := H1). exact H2. now right. Qed.
imports: Coq(ZArith Reals Lia) Core Digits Float_prop Bracket