proposition: Lemma float2_of_pos_correct : forall x, float2R (float2_of_pos x) = IZR (Zpos x).
proof: Proof. intros x. unfold float2_of_pos. rewrite <- (Rmult_1_r (IZR (Zpos x))). change (IZR (Zpos x) * 1)%R with (float2R (Float2 (Zpos x) 0%Z)). generalize 0%Z. induction x ; intros e ; try apply refl_equal. rewrite IHx. unfold float2R. simpl. replace (Zpos (xO x)) with (Zpos x * 2)%Z. exact (Gappa_round_aux.float2_shift_p1 _ _). now rewrite Zmult_comm. Qed.
imports: Coq(ZArith Reals List Lia) Flocq(Core) Gappa_library