【发布时间】:2017-12-15 19:37:08
【问题描述】:
在以下示例中,统一(不出所料)不会推断出规范结构:
Structure Pn := sr {gs: nat}.
Canonical Structure Pn_1: Pn := sr 1.
Canonical Structure Pn_2: Pn := sr 2.
Check ltac:(tryif unify 2 (gs _) then idtac "success" else idtac "fail"). (*fail*)
Check ltac:(tryif unify 2 (gs Pn_2) then idtac "success" else idtac "fail"). (*success*)
是否有可能使第一个统一成功,例如w/unify ... with ...?或者有没有更好的策略来代替unify 来测试2 和(gs _) 的部分可兑换性?随意使用,例如输入类而不是规范结构来完成这项工作
【问题讨论】:
标签: type-conversion type-inference coq unification