proposition: Lemma toNat_addBn n : forall (p: BITS n) m, toNat (p +# m) = (toNat p + m) %% 2^n.
proof: Proof. move => p m. rewrite /adcB adcBmain_nat add0n. rewrite splitmsb_fromNat. rewrite !toNat_fromNat. by rewrite modnDmr. Qed.
imports: HB(structures) mathcomp.ssreflect.ssreflect mathcomp(ssrfun ssrbool eqtype ssrnat seq fintype tuple zmodp div) ssrextra.tuple ssrextra.nat spec spec.properties operations mathcomp(ssralg)