Ltac用于automating proofs and modifying proof environment,outputting strings和defining complex notations。它也可以用于Coq环境的“智能”修改吗?这里有两个失败的尝试:智能修改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的工作,也许有另一种方式?
我无法理解片段试图完成什么;你能详细说明一下吗? –
如果条件得到满足,他们试图释放变量'Phy' – jaam