| 1 |
(* coq-prog-args: ("-top" "Arguments") *) |
| 2 |
Arguments Nat.sub n m : simpl nomatch. |
| 3 |
About Nat.sub. |
| 4 |
Arguments Nat.sub n / m : simpl nomatch. |
| 5 |
About Nat.sub. |
| 6 |
Arguments Nat.sub !n / m : simpl nomatch. |
| 7 |
About Nat.sub. |
| 8 |
Arguments Nat.sub !n !m /. |
| 9 |
About Nat.sub. |
| 10 |
Arguments Nat.sub !n !m. |
| 11 |
About Nat.sub. |
| 12 |
Definition pf (D1 C1 : Type) (f : D1 -> C1) (D2 C2 : Type) (g : D2 -> C2) := |
| 13 |
fun x => (f (fst x), g (snd x)). |
| 14 |
Declare Scope foo_scope. |
| 15 |
Declare Scope bar_scope. |
| 16 |
Delimit Scope foo_scope with F. |
| 17 |
Arguments pf {D1%_F C1%_type} f [D2 C2] g x : simpl never. |
| 18 |
About pf. |
| 19 |
Definition fcomp A B C f (g : A -> B) (x : A) : C := f (g x). |
| 20 |
Arguments fcomp {_ _ _}%_type_scope f g x /. |
| 21 |
About fcomp. |
| 22 |
Definition volatile := fun x : nat => x. |
| 23 |
Arguments volatile / _. |
| 24 |
About volatile. |
| 25 |
Set Implicit Arguments. |
| 26 |
Section S1. |
| 27 |
Variable T1 : Type. |
| 28 |
Section S2. |
| 29 |
Variable T2 : Type. |
| 30 |
Fixpoint f (x : T1) (y : T2) n (v : unit) m {struct n} : nat := |
| 31 |
match n, m with |
| 32 |
| 0,_ => 0 |
| 33 |
| S _, 0 => n |
| 34 |
| S n', S m' => f x y n' v m' end. |
| 35 |
About f. |
| 36 |
Global Arguments f x y !n !v !m. |
| 37 |
About f. |
| 38 |
End S2. |
| 39 |
About f. |
| 40 |
End S1. |
| 41 |
About f. |
| 42 |
Eval cbn in forall v, f 0 0 5 v 3 = 2. |
| 43 |
Eval cbn in f 0 0 5 tt 3 = 2. |
| 44 |
Arguments f : clear implicits and scopes. |
| 45 |
About f. |
| 46 |
Record r := { pi :> nat -> bool -> unit }. |
| 47 |
Notation "$" := 3 (only parsing) : foo_scope. |
| 48 |
Notation "$" := true (only parsing) : bar_scope. |
| 49 |
Delimit Scope bar_scope with B. |
| 50 |
Arguments pi _ _%_F _%_B. |
| 51 |
Check (forall w : r, pi w $ $ = tt). |
| 52 |
Fail Check (forall w : r, w $ $ = tt). |
| 53 |
Axiom w : r. |
| 54 |
Arguments w x%_F y%_B : extra scopes. |
| 55 |
Check (w $ $ = tt). |
| 56 |
Fail Arguments w _%_F _%_B. |
| 57 |
|
| 58 |
Definition volatilematch (n : nat) := |
| 59 |
match n with |
| 60 |
| O => O |
| 61 |
| S p => p |
| 62 |
end. |
| 63 |
|
| 64 |
Arguments volatilematch / n : simpl nomatch. |
| 65 |
About volatilematch. |
| 66 |
Eval simpl in fun n => volatilematch n. |
| 67 |
|
| 68 |
Module Formatting. |
| 69 |
|
| 70 |
Parameter A : Type. |
| 71 |
Parameter f : forall (xxxxxxxxxxxxxx : A) (xxxxxxxxxxxxxx' : nat) (xxxxxxxxxxxxxx'' : nat) (xxxxxxxxxxxxxx''' : nat), xxxxxxxxxxxxxx' + xxxxxxxxxxxxxx' + xxxxxxxxxxxxxx'' = 0. |
| 72 |
Print f. |
| 73 |
|
| 74 |
End Formatting. |