proposition: Lemma wmsb_wneg_true: forall sz (w: word (S sz)), w <> wpow2 sz -> forall b1 b2, wmsb w b1 = true -> wmsb (wneg w) b2 = false.
proof: Proof. apply (induct_word_S (fun sz w => w <> wpow2 sz -> forall b1 b2, wmsb w b1 = true -> wmsb (^~ w) b2 = false)); intros; [simpl in *; subst; elim H; reflexivity|]. destruct b. - rewrite wneg_WS_1. rewrite wmsb_ws. rewrite wmsb_wnot with (b2:= false). simpl; apply negb_false_iff; assumption. - rewrite wneg_WS_0. eapply H with (b1 := false); eauto. intro Hx. elim H0. clear -Hx. simpl; rewrite Hx; 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