proposition: Lemma wmsb_split2: forall sz (w: word (sz + 1)) b, wmsb w b = if weq (split2 _ 1 w) (natToWord _ 0) then false else true.
proof: Proof. intros. pose proof (@wmsb_split2' sz). specialize (H (nat_cast _ (Nat.add_1_r sz) w) b). simpl in H. rewrite nat_cast_fuse in H. rewrite <- (nat_cast_proof_irrel word _ _ eq_refl) in H. rewrite nat_cast_same in H. destruct (weq (split2 sz 1 w) $ (0)). - rewrite e in H. simpl in H. rewrite <- H. clear. apply wmsb_nat_cast. - simpl in n. apply weqb_ne in n. rewrite n in H. simpl in H. rewrite <- H. clear. apply wmsb_nat_cast. 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