Skip to content

Commit 4da0923

Browse files
committed
new syntax for local and global directives
1 parent 1bd63d0 commit 4da0923

40 files changed

+141
-141
lines changed

theories/additions/Dichotomy.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Proof.
128128
discriminate.
129129
Qed.
130130

131-
Global Hint Resolve dicho_aux_le_xOXO dicho_aux_le_xOXI
131+
#[global] Hint Resolve dicho_aux_le_xOXO dicho_aux_le_xOXI
132132
dicho_aux_le_xIXO dicho_aux_le_xIXI : chains.
133133

134134
Lemma dicho_aux_lt : forall p, 3 < p ->

theories/additions/Euclidean_Chains.v

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ $2^k.3^p$, using Fcompose and previous lemmas.
489489
Let us look at a simple example *)
490490

491491
(* begin snippet F144 *)
492-
Global Hint Resolve F1_correct F1_proper
492+
#[global] Hint Resolve F1_correct F1_proper
493493
F3_correct F3_proper Fcompose_correct Fcompose_proper
494494
Fexp2_correct Fexp2_proper : chains.
495495

@@ -858,7 +858,7 @@ Lemma KFK_proper : Kchain_proper (KFK kbr fq).
858858
* rewrite H2, H3;reflexivity.
859859
Qed.
860860

861-
Global Instance KFF_proper : Fchain_proper (KFF kbr fq).
861+
#[global] Instance KFF_proper : Fchain_proper (KFF kbr fq).
862862
Proof.
863863
intros until M; intros k k' Hk Hk' H x y Hxy;
864864
unfold KFF; simpl.
@@ -1042,7 +1042,7 @@ Proof.
10421042
Qed.
10431043

10441044
(* begin snippet HintKchains *)
1045-
Global Hint Resolve KFF_correct KFF_proper KFK_correct KFK_proper : chains.
1045+
#[global] Hint Resolve KFF_correct KFF_proper KFK_correct KFK_proper : chains.
10461046
(* end snippet HintKchains *)
10471047

10481048
Lemma k3_1_correct : Kchain_correct 3 1 k3_1.
@@ -1059,7 +1059,7 @@ Proof.
10591059
add_op_proper M H3; rewrite H2; reflexivity.
10601060
Qed.
10611061

1062-
Global Hint Resolve k3_1_correct k3_1_proper : chains.
1062+
#[global] Hint Resolve k3_1_correct k3_1_proper : chains.
10631063

10641064
(** an example of correct chain construction *)
10651065

@@ -1185,7 +1185,7 @@ Definition OK (s: signature)
11851185

11861186
(* end snippet dependentlyTypedFuns *)
11871187

1188-
Global Hint Resolve pos_gt_3 : chains.
1188+
#[global] Hint Resolve pos_gt_3 : chains.
11891189

11901190
(* begin snippet GammaContext *)
11911191
Section Gamma.

theories/additions/FirstSteps.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Section Definitions.
1414
(mult : A -> A -> A)
1515
(one : A).
1616

17-
Local Infix "*" := mult.
18-
Local Notation "1" := one.
17+
#[local] Infix "*" := mult.
18+
#[local] Notation "1" := one.
1919

2020
(** Naive (linear) implementation *)
2121

theories/additions/Monoid_def.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,9 @@ Every instance of class [Monoid] can be transformed into an instance of
178178
*)
179179

180180
(* begin snippet Coerciona:: no-out *)
181-
Global Instance eq_equiv {A} : Equiv A := eq.
181+
#[global] Instance eq_equiv {A} : Equiv A := eq.
182182

183-
Global Instance Monoid_EMonoid `(M:@Monoid A op one) :
183+
#[global] Instance Monoid_EMonoid `(M:@Monoid A op one) :
184184
EMonoid op one eq_equiv.
185185
Proof.
186186
split; unfold eq_equiv, equiv in *.

theories/additions/Monoid_instances.v

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ Qed.
194194

195195
(* begin snippet M2Defsb:: no-out *)
196196

197-
Global Instance M2_op : Mult_op M2 := M2_mult.
197+
#[global] Instance M2_op : Mult_op M2 := M2_mult.
198198

199-
Global Instance M2_Monoid : Monoid M2_op Id2.
199+
#[global] Instance M2_Monoid : Monoid M2_op Id2.
200200
(* ... *)
201201
(* end snippet M2Defsb *)
202202
Proof.
@@ -236,7 +236,7 @@ Section Nmodulo.
236236
intro H;subst m. discriminate.
237237
Qed.
238238

239-
Local Hint Resolve m_neq_0 : chains.
239+
#[local] Hint Resolve m_neq_0 : chains.
240240

241241
(* begin snippet Nmodulob:: no-out *)
242242
Definition mult_mod (x y : N) := (x * y) mod m.
@@ -256,7 +256,7 @@ Section Nmodulo.
256256
Qed.
257257

258258
(* begin snippet Nmoduloc:: no-out *)
259-
Global Instance mult_mod_proper :
259+
#[global] Instance mult_mod_proper :
260260
Proper (mod_equiv ==> mod_equiv ==> mod_equiv) mod_op.
261261
(* end snippet Nmoduloc *)
262262
Proof.
@@ -269,7 +269,7 @@ Section Nmodulo.
269269
Qed.
270270

271271
(* begin snippet Nmodulod:: no-out *)
272-
Local Open Scope M_scope.
272+
#[local] Open Scope M_scope.
273273

274274
Lemma mult_mod_associative : forall x y z,
275275
x * (y * z) = x * y * z.
@@ -299,7 +299,7 @@ Section Nmodulo.
299299

300300

301301
(* begin snippet Nmodulog:: no-out *)
302-
Global Instance Nmod_Monoid : EMonoid mod_op 1 mod_equiv.
302+
#[global] Instance Nmod_Monoid : EMonoid mod_op 1 mod_equiv.
303303
(* end snippet Nmodulog *)
304304
Proof.
305305
unfold equiv, mod_equiv, mod_eq, mult_op, mod_op, mult_mod.
@@ -318,7 +318,7 @@ Section S256.
318318

319319
Let mod256 := mod_op 256.
320320

321-
Local Existing Instance mod256 | 1.
321+
#[local] Existing Instance mod256 | 1.
322322

323323
Compute (211 * 67)%M.
324324

theories/additions/More_on_positive.v

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Proof.
2323
discriminate.
2424
Qed.
2525

26-
Global Hint Resolve Pos_to_nat_neq_0 : chains.
26+
#[global] Hint Resolve Pos_to_nat_neq_0 : chains.
2727

2828

2929
(** ** Relationship with [nat] and [N]
@@ -34,7 +34,7 @@ Proof. discriminate. Qed.
3434
Lemma Npos_gt_0 : forall p, (0 < N.pos p)%N.
3535
Proof. reflexivity. Qed.
3636

37-
Global Hint Resolve Npos_diff_zero Npos_gt_0 : chains.
37+
#[global] Hint Resolve Npos_diff_zero Npos_gt_0 : chains.
3838

3939

4040
Lemma pos2N_inj_lt : forall n p, (n < p)%positive <-> (N.pos n < N.pos p)%N.
@@ -87,7 +87,7 @@ Proof.
8787
apply Pos2Nat.inj_le; apply pos_le_mul.
8888
Qed.
8989

90-
Global Hint Resolve Pos2Nat_le_1_p : chains.
90+
#[global] Hint Resolve Pos2Nat_le_1_p : chains.
9191

9292
(** ** Surjection from [N] into [positive]
9393
*)
@@ -239,7 +239,7 @@ Proof.
239239
- split; intros; now compute.
240240
Qed.
241241

242-
Global Hint Resolve pos_gt_3 : chains.
242+
#[global] Hint Resolve pos_gt_3 : chains.
243243

244244
(** ** Lemmas on Euclidean division
245245
N.pos_div_eucl (a:positive) (b:N) : N * N

theories/additions/Naive.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ is still of type [nat].
6464
*)
6565

6666
Module N_mod.
67-
Local Open Scope N_scope.
67+
#[local] Open Scope N_scope.
6868

6969
Section m_fixed.
7070

theories/additions/Pow.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Section M_given.
140140
(M:EMonoid E_op E_one E_eq).
141141
(* end snippet MGiven *)
142142

143-
Global Instance Eop_proper : Proper (equiv ==> equiv ==> equiv) E_op.
143+
#[global] Instance Eop_proper : Proper (equiv ==> equiv ==> equiv) E_op.
144144
Proof.
145145
apply Eop_proper.
146146
Qed.
@@ -157,7 +157,7 @@ Ltac monoid_simpl := repeat monoid_rw.
157157
(* *** Properties of the classical exponentiation *)
158158

159159
(* begin snippet powerProper:: no-out *)
160-
Global Instance power_proper :
160+
#[global] Instance power_proper :
161161
Proper (equiv ==> eq ==> equiv) power.
162162
(* end snippet powerProper *)
163163
Proof.
@@ -284,7 +284,7 @@ Proof.
284284
now monoid_rw.
285285
Qed.
286286

287-
Global Instance Pos_bpow_proper :
287+
#[global] Instance Pos_bpow_proper :
288288
Proper (equiv ==> eq ==> equiv) Pos_bpow.
289289
Proof.
290290
intros x y Hxy n p Hnp. subst n. revert x y Hxy.

theories/additions/Pow_variant.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Section M_given.
127127
Context (M:EMonoid E_op E_one E_eq).
128128

129129

130-
Global Instance Eop_proper : Proper (equiv ==> equiv ==> equiv) E_op.
130+
#[global] Instance Eop_proper : Proper (equiv ==> equiv ==> equiv) E_op.
131131
apply Eop_proper.
132132
Qed.
133133

@@ -143,7 +143,7 @@ Ltac monoid_simpl := repeat monoid_rw.
143143

144144
Section About_power.
145145

146-
Global Instance power_proper : Proper (equiv ==> eq ==> equiv) power.
146+
#[global] Instance power_proper : Proper (equiv ==> eq ==> equiv) power.
147147
Proof.
148148
intros x y Hxy n p Hnp; subst p; induction n.
149149
- reflexivity.

theories/ordinals/Ackermann/misc.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Require Import Eqdep_dec.
22

3-
Global Set Asymmetric Patterns.
3+
#[global] Set Asymmetric Patterns.
44

55
Lemma inj_right_pair2 :
66
forall A : Set,

0 commit comments

Comments
 (0)