COQ中的姿势证明
我试图在COQ中证明定理。我当前的上下文是:
1 subgoal
s, x : Entity
Pssx : Ps s x
Fxs : F x s
IPssx : F x s /\ Ps s x
t : Entity
Ctss : C t s s
Pstx : Ps t x
Fxt : F x t
______________________________________(1/1)
C s s s
f
,ps
和c
是理论的关系。我也是Axiom 4:
Axiom A4 : forall x s t,
Ps s x /\ F x s /\ Ps t x /\ F x t -> s = t.
我想做的是在证明中使用A4,因为这将帮助我说S和T是平等的。因此,我已经测试了:姿势证明(A4 XST)。< /code>添加了一个新的假设:
h:ps sx /\ f xs /\ ps tx /\ f xt-&gt; s = t
。我知道我可以破坏假设H,证明前提并使用结论。但是我也知道我可以直接在姿势证明
命令中给出前提。我想做姿势证明(A4 XST前提)之类的事情。
,但我不知道该放置什么而不是premisses
。
我尝试了几种解决方案:
- 用 /组成假设,例如
姿势证明(A4 XST(pssx /\ fxs /\ pstx /\ fxt))。 S X”类型,而预计将具有“ PS SX /\ F XS /\ PS TX /\ F X T”。
- PSSX“具有“ PS >姿势证明(A4 XST H1)。:
assert(h1:=(ps sx) /\(f xs) /\(ps tx) /\(f xt))。< /code>,但我得到了
一词“ h1”具有类型的“ Prop”,而期望具有类型为“ PS SX /\ F XS /\ PS TX /\ F X T”。< /code> < /li>
assert(h1:=(pssx) /\(fxs) /\(pstx) /\(fxt))。< /code>但我得到
术语“ pssx”具有“ ps” ps' s x“虽然预计将具有“ prop”。
所以我的问题是以下:我应该放置什么而不是premisses
让我的代码工作?是否有命令基于其他假设来创建新假设?我知道如何将假设摧毁两个较小的假设,但我不知道如何构成假设以创建较大的假设。
I’m trying to prove a theorem in Coq. My current context is:
1 subgoal
s, x : Entity
Pssx : Ps s x
Fxs : F x s
IPssx : F x s /\ Ps s x
t : Entity
Ctss : C t s s
Pstx : Ps t x
Fxt : F x t
______________________________________(1/1)
C s s s
F
, Ps
and C
are relations of the theory. I’ve also Axiom 4:
Axiom A4 : forall x s t,
Ps s x /\ F x s /\ Ps t x /\ F x t -> s = t.
What I want to do, is to use A4 in the proof, as it will help me to say that s and t are equals. So I’ve tested: pose proof (A4 x s t).
A new hypothesis is added : H : Ps s x /\ F x s /\ Ps t x /\ F x t -> s = t
. I know I can destruct the hypothesis H, prove the premisses and use the conclusion. But I also know that I can give the premisses directly in the pose proof
command. I want to do something like pose proof (A4 x s t Premisses).
But I don’t know what to put instead of Premisses
.
I tried several solutions:
- composing the hypothesis with /, such as
pose proof (A4 x s t (Pssx /\ Fxs /\ Pstx /\ Fxt)).
but I got the errorThe term "Pssx" has type "Ps s x" while it is expected to have type "Ps s x /\ F x s /\ Ps t x /\ F x t".
- using the
assert
command andpose proof (A4 x s t H1).
:assert (H1 := (Ps s x) /\ (F x s) /\ (Ps t x) /\ (F x t)).
but I gotThe term "H1" has type "Prop" while it is expected to have type "Ps s x /\ F x s /\ Ps t x /\ F x t".
assert (H1 := (Pssx) /\ (Fxs) /\ (Pstx) /\ (Fxt)).
but I gotThe term "Pssx" has type "Ps s x" while it is expected to have type "Prop".
So my question is the following: what should I put instead of Premisses
for my code to work? Is there a command to create new hypothesis based on other ones? I know how to destruct an hypothesis into two smaller hypothesis, but I don't know how to compose hypothesis to create bigger ones.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Coq 中的标准是咖喱你的
A4
,这样接收一个大连词作为前提时,它接收几个不同的前提:那么你可以这样做:
如果你绝对需要
A4
与连词,你可以使用conj
(你可以使用A4
来连接连词)可以通过Print "_ 找到/\ _"
):The standard in Coq would be to curry your
A4
so that instead of receiving one large conjunction as a premise, it receives several different premises:Then you can do:
If you absolutely need
A4
with the conjunctions, you can useconj
(which you can find withPrint "_ /\ _"
):