proposition: Lemma wmsb_split1_sext: forall sz (w: word (sz + 1)), wmsb w false = wmsb (split1 _ 1 w) false -> exists sw, sext sw 1 = w.
proof: Proof. unfold sext; intros. pose proof (combine_split _ _ w) as Hw. rewrite <-Hw; rewrite <-Hw in H at 2; clear Hw. rewrite split1_combine in H. exists (split1 sz 1 w). destruct (wmsb (split1 sz 1 w) false). - rewrite <-wmsb_true_split2_wones with (b:= false) by assumption. reflexivity. - rewrite <-wmsb_false_split2_wzero with (b:= false) by assumption. reflexivity. 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