aboutsummaryrefslogtreecommitdiff
path: root/theories/Numbers/NatInt
diff options
context:
space:
mode:
authorGaëtan Gilbert2021-01-07 13:55:23 +0100
committerGaëtan Gilbert2021-01-18 13:08:17 +0100
commit4419a101a4f5a108be90cf4e420f0b6961e6caac (patch)
treec3a3dcede7a5901685d28da3d540451e39c4b6f1 /theories/Numbers/NatInt
parent58a4f645ee6d306cb824c2ac2dfa21e460b9692a (diff)
Support locality attributes for Hint Rewrite (including export)
We deprecate unspecified locality as was done for Hint. Close #13724
Diffstat (limited to 'theories/Numbers/NatInt')
-rw-r--r--theories/Numbers/NatInt/NZAdd.v10
-rw-r--r--theories/Numbers/NatInt/NZMul.v4
-rw-r--r--theories/Numbers/NatInt/NZPow.v6
3 files changed, 10 insertions, 10 deletions
diff --git a/theories/Numbers/NatInt/NZAdd.v b/theories/Numbers/NatInt/NZAdd.v
index 66cbba9e08..2ad8dfcedb 100644
--- a/theories/Numbers/NatInt/NZAdd.v
+++ b/theories/Numbers/NatInt/NZAdd.v
@@ -14,9 +14,9 @@ Require Import NZAxioms NZBase.
Module Type NZAddProp (Import NZ : NZAxiomsSig')(Import NZBase : NZBaseProp NZ).
-Hint Rewrite
+Global Hint Rewrite
pred_succ add_0_l add_succ_l mul_0_l mul_succ_l sub_0_r sub_succ_r : nz.
-Hint Rewrite one_succ two_succ : nz'.
+Global Hint Rewrite one_succ two_succ : nz'.
Ltac nzsimpl := autorewrite with nz.
Ltac nzsimpl' := autorewrite with nz nz'.
@@ -39,7 +39,7 @@ Proof.
intros n m. now rewrite add_succ_r, add_succ_l.
Qed.
-Hint Rewrite add_0_r add_succ_r : nz.
+Global Hint Rewrite add_0_r add_succ_r : nz.
Theorem add_comm : forall n m, n + m == m + n.
Proof.
@@ -58,7 +58,7 @@ Proof.
intro n; now nzsimpl'.
Qed.
-Hint Rewrite add_1_l add_1_r : nz.
+Global Hint Rewrite add_1_l add_1_r : nz.
Theorem add_assoc : forall n m p, n + (m + p) == (n + m) + p.
Proof.
@@ -104,6 +104,6 @@ Proof.
intro n; now nzsimpl'.
Qed.
-Hint Rewrite sub_1_r : nz.
+Global Hint Rewrite sub_1_r : nz.
End NZAddProp.
diff --git a/theories/Numbers/NatInt/NZMul.v b/theories/Numbers/NatInt/NZMul.v
index 3d6465191d..14728eaf40 100644
--- a/theories/Numbers/NatInt/NZMul.v
+++ b/theories/Numbers/NatInt/NZMul.v
@@ -28,7 +28,7 @@ Proof.
now rewrite add_cancel_r.
Qed.
-Hint Rewrite mul_0_r mul_succ_r : nz.
+Global Hint Rewrite mul_0_r mul_succ_r : nz.
Theorem mul_comm : forall n m, n * m == m * n.
Proof.
@@ -69,7 +69,7 @@ Proof.
intro n. now nzsimpl'.
Qed.
-Hint Rewrite mul_1_l mul_1_r : nz.
+Global Hint Rewrite mul_1_l mul_1_r : nz.
Theorem mul_shuffle0 : forall n m p, n*m*p == n*p*m.
Proof.
diff --git a/theories/Numbers/NatInt/NZPow.v b/theories/Numbers/NatInt/NZPow.v
index 3b2a496229..00edcd641f 100644
--- a/theories/Numbers/NatInt/NZPow.v
+++ b/theories/Numbers/NatInt/NZPow.v
@@ -45,7 +45,7 @@ Module Type NZPowProp
(Import B : NZPow' A)
(Import C : NZMulOrderProp A).
-Hint Rewrite pow_0_r pow_succ_r : nz.
+Global Hint Rewrite pow_0_r pow_succ_r : nz.
(** Power and basic constants *)
@@ -76,14 +76,14 @@ Proof.
- now nzsimpl.
Qed.
-Hint Rewrite pow_1_r pow_1_l : nz.
+Global Hint Rewrite pow_1_r pow_1_l : nz.
Lemma pow_2_r : forall a, a^2 == a*a.
Proof.
intros. rewrite two_succ. nzsimpl; order'.
Qed.
-Hint Rewrite pow_2_r : nz.
+Global Hint Rewrite pow_2_r : nz.
(** Power and nullity *)