又是一个结果出乎意料的小例子。
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
当我尝试运行大锤时,我得到:
"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.
这是因为我弄乱了==吗?还是我需要为我的公理设置一些其他类型的限制?
跟进:
显然我不应该玩equals :P 所以我需要定义我自己的关系。
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 => 'a => bool 使它通用
现在我将继续定义我的更多关系。继续举例:
axiomatization
plus :: "test⇒ test⇒ test" (infixl "+" 35)
where
commutative: "x + y = y + x" and
idemo: "x + x = x"
a)到目前为止这是正确的 b)如何从这里开始到目前为止,我认为这不会取代引理中的子项,这有点等同于等价点。