proposition: Lemma toZp_ones n : toZp (ones n.+1) = (-1)%R.
proof: Proof. rewrite /toZp toNat_ones. apply val_inj. rewrite /= Zp_cast; last apply pow2_gt1. rewrite -subn1. replace (1 %% 2^n.+1) with 1 => //. by rewrite modn_small; last apply pow2_gt1. 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