proposition: Lemma toNat_addBn_wrap n : forall (p: BITS n) m, m<2^n -> toNat p + m >= 2^n -> toNat (p +# m) + 2^n = toNat p + m.
proof: Proof. move => p m BOUND H. rewrite /adcB adcBmain_nat splitmsb_fromNat add0n. rewrite toNat_fromNat. rewrite toNat_fromNat. rewrite modnDmr. apply modn_sub. + apply expn_gt0. + apply toNatBounded. + done. + done. 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)