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