forall m : binnat, toR m = toR_vianat m. Proof. equiv_intro binary n. induction n as [|n IHn]. - reflexivity. - induction n as [|n _]. + change ((1 + 1) * 0 + 1 = 1). rewrite mult_0_r. apply plus_0_l. + rewrite f_suc. rewrite IHn. assert (L : (toR_fromnat ∘ binary^-1) (binary n.+1) + 1 = toR_fromnat ((binary^-1 (binary n.+1)).+1)%nat). { simpl rewrite (plus_comm _ 1). simpl rewrite unarysucc. reflexivity. } rewrite L; clear L. rewrite <- unarysucc. rewrite <- binarysucc. reflexivity. Qed.
Require Import Require Import Require Import