isabelle - Isabelle/Simpl:使用 hoarestate 类型统一失败
问题描述
我开始使用 Isabelle/Simpl 并根据用户指南编写以下理论:
theory Scratch
imports Simpl.Simpl
begin
hoarestate newvars =
N :: nat
lemma (in newvars) "Γ ⊢ {} ´N :== ´N + 1 {}"
sorry
end
但 Isabelle 抱怨类型统一失败:
Type unification failed
Type error in application: operator not of function type
Operator: N_' :: 'a
Operand: s :: ??'a
Simpl 本身(包括其用户指南)成功编译。我怎样才能让它通过?
解决方案
正如Javier Díaz指出的那样,只导入Simpl.Vcg
而不是解决问题Simpl.Simpl
。
错误的原因似乎是与Simpl.SyntaxTest
. 它包含以下记录定义:
record 'g vars = "'g state" +
A_' :: "nat list"
AA_' :: "nat list list"
I_' :: nat
M_' :: nat
N_' :: nat
R_' :: int
S_' :: int
B_' :: bool
Abr_':: string
p_' :: ref
q_' :: ref
Isabelle 似乎更喜欢N_'
在记录N
中而不是在 hoarestate 中,尽管 hoarestate 是稍后定义的。我不知道为什么会这样。
推荐阅读
- javascript - VSCode Intellisense 对 Javascript 代码进行奇怪的自动完成
- javascript - 将变量列表作为参数动态包含到 Jquery 函数中
- regex - Get-ChildItem 后的快速过滤
- javafx - 使用 JavaFX 3D 创建坐标网格的最实用方法是什么?
- javascript - 关于 mongoose 方法的回调函数中的错误的文档
- octave - 八度 -inf 和 NaN
- javascript - 使用 JavascriptCore 和 JSContext 从 javascript 调用本机 Swift 代码
- angularjs - 使用angularjs动态创建excel文件
- sql - 如何使 SQL 查询结果显示为 2 个小数
- ruby-on-rails - 使用 Elastic Search gem 运行 jruby 应用程序。