Isabelle 如何定义类型的线性排序?
我正在努力定义。在我的例子中,连词相当于线性顺序上的Isabelle 如何定义类型的线性排序?,isabelle,Isabelle,我正在努力定义。在我的例子中,连词相当于线性顺序上的min函数false
min
函数false
datatype bool4 = JF | JT | BN | BE
instantiation bool4 :: linear_order
begin
fun leq_bool4 :: "bool4 ⇒ bool4 ⇒ bool" where
"leq_bool4 JF b = True"
| "leq_bool4 BE b = (b = BE ∨ b = BN ∨ b = JT)"
| "leq_bool4 BN b = (b = BN ∨ b = JT)"
| "leq_bool4 JT b = (b = JT)"
instance proof
fix x y z :: bool4
show "x ⊑ x"
by (induct x) simp_all
show "x ⊑ y ⟹ y ⊑ z ⟹ x ⊑ z"
by (induct x; induct y) simp_all
show "x ⊑ y ⟹ y ⊑ x ⟹ x = y"
by (induct x; induct y) simp_all
show "x ⊑ y ∨ y ⊑ x"
by (induct x; induct y) simp_all
qed
end
definition and4 :: "bool4 ⇒ bool4 ⇒ bool4" where
"and4 a b ≡ minimum a b"
我想一定有更简单的方法来定义伊莎贝尔·霍尔的线性顺序。你能建议简化这个理论吗?你可以使用
然后,只需导入“$AFP/Datatype\u Order\u Generator/Order\u Generator”
并声明派生linorder“bool4”
。请注意,在定义数据类型时,必须按照所需的顺序声明构造函数
有关如何在本地下载和使用AFP的详细信息,请参见。您可以使用
然后,只需导入“$AFP/Datatype\u Order\u Generator/Order\u Generator”
并声明派生linorder“bool4”
。请注意,在定义数据类型时,必须按照所需的顺序声明构造函数
有关如何在本地下载和使用AFP的详细信息,请参见。谢谢!它起作用了。也许这对某些人会有帮助。无:
最小值
函数必须替换为(如果≤ b然后a另外b)
在和4的定义中。你对最小值的意思是什么min
应该可以工作。是的,min
可以工作!在我的原始版本的和4
中,我使用HOL\Lattice\Lattice
中的minimum
,谢谢!它起作用了。也许这对某些人会有帮助。无:最小值
函数必须替换为(如果≤ b然后a另外b)
在和4的定义中。你对最小值的意思是什么min
应该可以工作。是的,min
可以工作!在我的原始版本的和4
中,我使用HOL\Lattice\Lattice