我们是 coq 的初学者。以下是 Basic.v 中的代码
1 Set Implicit Arguments.
2
3 (* Pretty-print for if-then-else expressions on informative types *)
4
5 Notation "'If' c1 'then' c2 'else' c3" :=
6 match c1 with
7 | left _ => c2
8 | right _ => c3
9 end (at level 200).
10
11 Notation "'IF' c1 'THEN' c2 'ELSE' c3" :=
12 (IF c1 then c2 else c3)(at level 200, v ident).
13
14 Definition IFEXTHENELSE (A : Set) (P1 P2 : A -> Prop)
15 (P3 : Prop) := (exists2 x : A, P1 x & P2 x) \/ ~ (exists x : A, P1 x) /\ P3.
16
17 Notation "'IFEX' v | c1 'THEN' c2 'ELSE' c3" :=
18 (IFEXTHENELSE (fun v => c1) (fun v => c2) c3) (at level 200, v ident).
我们在编译一些现有文件时遇到了以下警告。
coqc -noglob -q -R . K Lib\Basic
Warning: File ".\Lib\Basic" has been implicitly expanded to ".\Lib\Basic.v"
[file-no-extension,filesystem]
File ".\Lib\Basic.v", line 11, characters 0-91:
Warning: grammar entry "ident" permitted "_" in addition to proper
identifiers; this use is deprecated and its meaning will change in the
future; use "name" instead. [deprecated-ident-entry,deprecated]
File ".\Lib\Basic.v", line 11, characters 0-91:
Error: v is unbound in the notation.
有两个警告和一个错误。
[文件无扩展名,文件系统]。
如果你能解释一下,你能告诉我们警告的含义吗?警告:语法条目“ident”允许“_”我们无法理解上述语法警告的含义。你能告诉我们意思吗?
错误。无界。
非常感谢您提前