src/Util/ZUtil/Opp.v
raw| 1 | From Coq Require Import ZArith. |
| 2 | From Coq Require Import Lia. |
| 3 | Require Import Crypto.Util.ZUtil.Hints.Core. |
| 4 | Require Import Crypto.Util.ZUtil.ZSimplify.Core. |
| 5 | Local Open Scope Z_scope. |
| 6 | |
| 7 | Module Z. |
| 8 | Lemma opp_eq_0_iff a : -a = 0 <-> a = 0. |
| 9 | Proof. lia. Qed. |
| 10 | #[global] |
| 11 | Hint Rewrite opp_eq_0_iff : zsimplify. |
| 12 | |
| 13 | Lemma opp_sub n m : - n - m = - (n + m). |
| 14 | Proof. lia. Qed. |
| 15 | End Z. |