proposition: Lemma wmsb_1: forall sz (m: word (S sz)) default, pow2 sz <= # m < 2 * pow2 sz -> @wmsb (S sz) m default = true.
proof: Proof. induction sz; intros. - simpl in *. assert (#m = 1) as N by lia. rewrite <- (roundTrip_1 1) in N. apply (wordToNat_inj m ($ 1)) in N. subst m. simpl. reflexivity. - pose proof (shatter_word_S m) as P. destruct P as [b [m0 E]]. subst. unfold wmsb. fold wmsb. apply IHsz. simpl in H. destruct b; 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