proposition: Lemma wordToN_wnot: forall (n : nat) (w : word n), wordToN (wnot w) = Npow2 n - 1 - wordToN w.
proof: Proof. destruct n; intros. - shatter_word w; reflexivity. - destruct (shatter_word_S w) as (b & [ w' ? ]); subst. revert b; induction w'. + destruct b; reflexivity. + intros; simpl in *; rewrite IHw'; destruct b0; simpl; [ lia | ]; destruct b; pose proof (wordToN_bound w'); lia. Qed.
imports: Fiat.Common.Coq__8_4__8_5__Compat List Bedrock.Word Coq.ZArith.ZArith Coq.micromega.Psatz NArith NArithRing