Ltac 用于自动证明和修改证明环境、输出字符串和定义复杂的符号。它也可以用于 Coq 环境的“智能”修改吗?以下是两次失败的尝试:
Variable Phy: Set.
Fail Let pp (x:Type) := ltac: (match type of x with
| Set => constr: (Reset Phy)
| _ => idtac end).
(*Cannot infer an internal placeholder of type "Type" in environment: x : Type*)
Fail Ltac pp x := match type of x with
| Set => constr: (Reset Phy)
| _ => idtac end.
(*The reference Reset was not found in the current environment.*)
另外,如果这不是 Ltac 的工作,也许还有另一种方法?