Debian Codegraph @

test-suite/success/RegisterScheme.v

raw
1 Set Universe Polymorphism.
2
3 Definition paths_rew_r_dep (A : Type) (x y : A) (P : forall y0 : A, y0 = y -> Type)
4 (u : P y eq_refl) (H : x = y)
5 : P x H.
6 Proof. destruct H;assumption. Defined.
7
8 Module TestLocal.
9 Local Register Scheme paths_rew_r_dep as rew_r_dep for eq.
10
11 Section GenMem.
12 Variable A : Type.
13
14 Theorem upd_nop (a : A) (x : A) (e : a = x) (H: e = e)
15 : eq_refl a = eq_refl.
16 Proof.
17 subst.
18 exact H.
19 Qed.
20 End GenMem.
21 End TestLocal.
22
23 Module TestExport.
24 #[export] Register Scheme paths_rew_r_dep as rew_r_dep for eq.
25
26 Section GenMem.
27 Variable A : Type.
28
29 Theorem upd_nop (a : A) (x : A) (e : a = x) (H: e = e)
30 : eq_refl a = eq_refl.
31 Proof.
32 subst.
33 exact H.
34 Qed.
35 End GenMem.
36 End TestExport.
37
38 Module Test1.
39 Section GenMem.
40 Variable A : Type.
41
42 Theorem upd_nop (a : A) (x : A) (e : a = x) (H: e = e)
43 : eq_refl a = eq_refl.
44 Proof.
45 (* The problem does not appear anymore *)
46 (* neither TestLocal or TestExport registered the scheme *)
47 subst.
48 exact H.
49 Qed.
50 End GenMem.
51 End Test1.
52
53 Section GenMem.
54 Variable A : Type.
55
56 Theorem upd_nop (a : A) (x : A) (e : a = x) (H: e = e)
57 : eq_refl a = eq_refl.
58 Proof.
59 (* The problem does not appear anymore *)
60 (* Export reverted by section end *)
61 subst.
62 Abort.
63 End GenMem.
64
65
66 Module TestGlobal.
67 Global Register Scheme paths_rew_r_dep as rew_r_dep for eq.
68
69 Section GenMem.
70 Variable A : Type.
71
72 Theorem upd_nop (a : A) (x : A) (e : a = x) (H: e = e)
73 : eq_refl a = eq_refl.
74 Proof.
75 subst.
76 exact H.
77 Qed.
78 End GenMem.
79 End TestGlobal.
80
81 Section GenMem.
82 Variable A : Type.
83
84 Theorem upd_nop (a : A) (x : A) (e : a = x) (H: e = e)
85 : eq_refl a = eq_refl.
86 Proof.
87 subst.
88 exact H.
89 Qed.
90 End GenMem.