proposition: Lemma natplus1_wordplus1_eq: forall sz (a bound : word sz), (0 < sz)%nat -> (a < bound)%word -> (wordToNat a) + 1 = wordToNat (a ^+ (natToWord sz 1)).
proof: Proof. intros. rewrite wplus_alt. unfold wplusN, wordBinN. simpl. assert ((1 < pow2 sz)%nat). inversion H. simpl; auto. apply one_lt_pow2. erewrite wordToNat_natToWord_bound. rewrite wordToNat_natToWord_idempotent' by auto. reflexivity. apply wlt_lt in H0. rewrite wordToNat_natToWord_idempotent' by auto. instantiate (1:=bound). lia. 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