proposition: Lemma zext_size_1: forall sz (w: word (sz + 1)), wmsb w false = false -> exists sw, w = zext sw 1.
proof: Proof. intros. apply zext_size; auto. generalize dependent w. replace (sz + 1) with (S sz) by lia. intros. unfold wordToZ. rewrite H. apply wmsb_false_bound in H. remember (wordToN w) as n; destruct n; simpl. - split. + lia. + pose proof (pow2_zero sz); lia. - rewrite <-N2Z.inj_pos. rewrite <-N_nat_Z. split; [lia|]. apply inj_lt. rewrite <-Npow2_nat. apply Nlt_out; 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