proposition: Lemma rem_two_prop2 m i: (m.*2.+1) %% (2 ^(i.+1)) = (m %% 2^i).*2.+1.
proof: Proof. rewrite {1}(divn_eq m (2^i)) doubleD doubleMr -expn2S - addnS modnMDl. by rewrite modn_small // expn2S ltn_Sdouble ltn_pmod // expn_gt0. Qed.
imports: mathcomp(ssreflect ssrfun ssrbool eqtype ssrnat) mathcomp(seq path fintype div bigop binomial) mathcomp(prime finset ssralg ssrnum ssrint)