proposition: Lemma Npos_Npow2_wzero: forall sz p1 p2, N.pos (p1 + p2) = Npow2 sz -> posToWord sz p1 ^+ posToWord sz p2 = wzero sz.
proof: Proof. intros. do 2 rewrite posToWord_nat. assert (Pos.to_nat p1 + Pos.to_nat p2 = pow2 sz). { rewrite <-Pos2Nat.inj_add, <-Npow2_nat. rewrite <-positive_N_nat. rewrite H; reflexivity. } apply nat_add_pow2_wzero; auto. Qed.
imports: Coq.Classes.Morphisms Coq.Classes.Morphisms_Prop Coq.Classes.Equivalence Coq.Arith.PeanoNat Coq.ZArith.BinInt  Coq.Arith.Arith Coq.NArith.NArith Coq.Bool.Bool Coq.ZArith.ZArith Coq.Logic.Eqdep_dec Coq.Logic.EqdepFacts Coq.Program.Tactics Coq.Program.Equality Coq.setoid_ring.Ring Coq.setoid_ring.Ring_polynom bbv.Nomega bbv.ZLib bbv.NatLib bbv.NLib bbv.N_Z_nat_conversions bbv.DepEq bbv.DepEqNat bbv.ReservedNotations Coq.micromega.Lia