-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathArguments_renaming.v
59 lines (44 loc) · 1.17 KB
/
Arguments_renaming.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
(* coq-prog-args: ("-top" "Arguments_renaming") *)
Fail Arguments eq_refl {B y}, [B] y.
Arguments eq A _ _.
Arguments eq_refl A x : assert.
Arguments eq_refl {B y}, [B] y : rename.
Check @eq_refl.
Check (eq_refl (B := nat)).
Print eq_refl.
About eq_refl.
Goal 3 = 3.
Succeed apply @eq_refl with (B := nat).
Succeed apply @eq_refl with (y := 3).
pose (y := nat).
apply (@eq_refl y) with (y := 3).
Qed.
Section Test1.
Variable A : Type.
Inductive myEq B (x : A) : A -> Prop := myrefl : B -> myEq B x x.
Global Arguments myrefl {C} x _ : rename.
Print myrefl.
About myrefl.
Fixpoint myplus T (t : T) (n m : nat) {struct n} :=
match n with O => m | S n' => S (myplus T t n' m) end.
Global Arguments myplus {Z} !t !n m : rename.
Print myplus.
About myplus.
Check @myplus.
End Test1.
Print myrefl.
About myrefl.
Check myrefl.
Print myplus.
About myplus.
Check @myplus.
Fail Arguments eq_refl {F g}, [H] k.
Fail Arguments eq_refl {F}, [F] : rename.
Fail Arguments eq {A} x [_] : rename.
Fail Arguments eq {A} x [z] : rename.
Fail Arguments eq {F} x z y.
Fail Arguments eq {R} s t.
Section RenameVar.
Variable allTrue : forall P, P.
Fail Arguments allTrue Q : rename.
End RenameVar.