proposition: Lemma bitsEq_nat n {b1 b2: BITS n} : (b1 == b2) = (toNat b1 == toNat b2).
proof: Proof. suff: b1 == b2 <-> (toNat b1 == toNat b2). move => H. assert (H' := iffBool H). apply (eqP H'). split. move => H. rewrite (eqP H). done. move => H. assert (EQ:toNat b1 = toNat b2) by apply (eqP H). by rewrite (toNat_inj EQ). Qed.
imports: Coq(ZArith.ZArith) mathcomp.ssreflect.ssreflect mathcomp(ssrfun ssrbool eqtype ssrnat seq fintype tuple div zmodp ssralg) ssrextra.nat ssrextra.tuple spec.spec