intros sz a b c H.
apply (f_equal (fun x => x ^+ ^~ c)) in H.
repeat rewrite <- wplus_assoc in H.
rewrite wminus_inv in H.
repeat rewrite (wplus_comm _ (wzero sz)) in H.
repeat rewrite wplus_unit in H.
assumption.
Qed.

(* Specifications: *)
Lemma wminus_plus_distr:
forall {sz} (x y z: word sz), x ^- (y ^+ z) = x ^- y ^- z.
Lemma wminus_wplus_undo: forall sz (a b: word sz),
a ^- b ^+ b = a.
Lemma wneg_zero:
forall {sz} (w: word sz), ^~ w = (natToWord sz 0) -> w = natToWord sz 0.
Lemma wneg_idempotent:
forall {sz} (w: word sz), ^~ (^~ w) = w.
Lemma wneg_zero': forall sz,
wneg (natToWord sz 0) = natToWord sz 0.
Lemma wplus_one_neq: forall {sz} (w: word (S sz)), w ^+ (natToWord (S sz) 1) <> w.
Lemma wneg_one_pow2_minus_one: forall {sz}, wordToNat (^~ (natToWord sz 1)) = pow2 sz - 1.
Lemma wones_pow2_minus_one: forall {sz}, wordToNat (wones sz) = pow2 sz - 1.
Lemma pow2_minus_one_wones: forall {sz} (w: word sz),
wordToNat w = pow2 sz - 1 -> w = wones sz.
Lemma wones_natToWord: forall sz,
wones sz = $ (pow2 sz - 1).
Lemma wones_wneg_one: forall {sz}, wones sz = ^~ (natToWord sz 1).
Lemma wordToNat_natToWord_pred:
forall {sz} (w: word sz), w <> wzero sz ->
pred (wordToNat w) =
wordToNat (w ^- (natToWord sz 1)).
Lemma natToWord_mult : forall sz n m, natToWord sz (n * m) = natToWord _ n ^* natToWord _ m.
Lemma wlt_lt: forall sz (a b : word sz), a < b ->
(wordToNat a < wordToNat b)%nat.
Lemma wle_le: forall sz (a b : word sz), (a <= b)%word ->
(wordToNat a <= wordToNat b)%nat.
Lemma wlt_lt': forall sz a b, (a < pow2 sz)%nat
-> natToWord sz a < b
-> (wordToNat (natToWord sz a) < wordToNat b)%nat.
Lemma lt_word_lt_nat : forall (sz:nat) (n:word sz) (m:nat),
(n < (natToWord sz m))%word ->
(wordToNat n < m)%nat.
Lemma le_word_le_nat : forall (sz:nat) (n:word sz) (m:nat),
(n <= (natToWord sz m))%word ->
(wordToNat n <= m)%nat.
(* Chain [lt_word_lt_nat] and [Nat.lt_le_incl] Avoids using [Hint Resolve Nat.lt_le_incl] for this specific lemma, though this may be a premature optimization. *)
Lemma lt_word_le_nat : forall (sz:nat) (n:word sz) (m:nat),
(n < (natToWord sz m))%word ->
(wordToNat n <= m)%nat.