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