proposition: Lemma sub_0_eq : forall sz (a b : word sz), a ^- b = wzero _ -> a = b.
proof: Proof. intros sz a b H. destruct (weq (wneg b) (wneg a)) as [e|n]. transitivity (a ^+ (^~ b ^+ b)). rewrite (wplus_comm (^~ b)). rewrite wminus_inv. rewrite wplus_comm. rewrite wplus_unit. auto. rewrite e. rewrite wplus_assoc. rewrite wminus_inv. rewrite wplus_unit. auto. unfold wminus in H. generalize (unique_inverse a (wneg a) (^~ b)). intro H0. exfalso. apply n. symmetry; apply H0. apply wminus_inv. auto. 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