Proof with auto with typeclass_instances.
intros c x (g,(Hg1,Hg2)).
exists (Float beta
(Fnum g*Z.pow (radix_val beta) (Fexp g - c (ln_beta beta x)))
(c (ln_beta beta x))).
assert (F2R (Float beta
(Fnum g*Z.pow (radix_val beta) (Fexp g - c (ln_beta beta x)))
(c (ln_beta beta x))) = x).
unfold F2R; simpl.
rewrite Z2R_mult, Z2R_Zpower.
rewrite Rmult_assoc, <- bpow_plus.
rewrite <- Hg1; unfold F2R.
apply f_equal, f_equal.
ring.
omega.
split; trivial.
split.
unfold canonic, canonic_exp.
now rewrite H.
simpl.
rewrite Zeven_mult.
rewrite Zeven_Zpower.
rewrite Even_beta.
apply Bool.orb_true_intro.
now right.
omega.
Qed.
Variable choice:Z->bool.
Variable x:R.
Variable d u: float beta.
Hypothesis Hd: Rnd_DN_pt (generic_format beta fexp) x (F2R d).
Hypothesis Cd: canonic beta fexp d.
Hypothesis Hu: Rnd_UP_pt (generic_format beta fexp) x (F2R u).
Hypothesis Cu: canonic beta fexp u.
Hypothesis xPos: (0 < x)%R.
Let m:= ((F2R d+F2R u)/2)%R.

Lemma d_eq: F2R d= round beta fexp Zfloor x.
Proof with auto with typeclass_instances.