Isabelle:Axiomatization和Quickcheck vs auto solve_direct

时间:2016-01-10 21:14:17

标签: isabelle quickcheck axiom

这是一个意想不到的结果的小例子。

.then()

现在我收到以下消息:

theory Scratch
imports Main
begin

datatype test = aa | bb | plus test test

axiomatization where
   testIdemo : "x == plus x x"

lemma test1 : "y == plus y y"

当我尝试运行大锤时,我得到:

Auto solve_direct: The current goal can be solved directly with
  Scratch.testIdemo: ?x ≡ test.plus ?x ?x 
Auto Quickcheck found a counterexample:
  y = aa
Evaluated terms:
  test.plus y y = test.plus aa aa

这是因为我搞乱了==? 或者我是否需要为我的公理设置一些其他的限制?

跟进:

显然我不应该玩平等:P 所以我需要定义自己的关系。

"remote_vampire": Try this: using testIdemo by auto (0.0 ms). 
"spass": The prover derived "False" from "test.distinct(5)" and "testIdemo". 
This could be due to inconsistent axioms (including "sorry"s) or to a bug in Sledgehammer. 
If the problem persists, please contact the Isabelle developers.

所以我想我必须定义我的基本属性。反身性,替代性和对称性似乎很好。我可以通过'a =>使它变得通用'a =>布尔

现在我将继续定义更多我的关系。留下这个例子:

axiomatization
testEQ ::  "test ⇒ test ⇒ bool" (infixl "=" 1)
  where
reflexive [intro]: "x = x" and
substitution [elim]: "x = y ⟹ B x = B y" and
symmetric : "x = y ⟹ y = x"

a)这到目前为止是否正确 b)如何从这里开始 到目前为止,我认为这不会取代lemmas中的subterms,这有点等同。

1 个答案:

答案 0 :(得分:2)

你的公理意味着,例如(defn wrap-content-json [h] (fn [req] (assoc-in (h req) [:headers "Content-Type"] "application/json"))) ,这是假的,因为数据类型的构造函数总是不同,通过构造。 (参见aa = plus aa aa

事实上,如果你使用thm test.distinct,你应该真正知道自己在做什么 - 以这种方式引入不一致很容易。 (显然)

如果您想要具有某些属性的类型,则必须构造它。例如,您可以定义类型的表示类型(例如,作为数据类型),然后在其上定义一些相等关系(即哪些值应该等于其他值),然后将“实际”类型定义为商类型您的代表类型与该关系的关系。

相关问题