COQ中的姿势证明

发布于 2025-01-19 08:13:16 字数 1457 浏览 3 评论 0原文

我试图在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

fpsc是理论的关系。我也是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 error The 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 and pose proof (A4 x s t H1).:
    • assert (H1 := (Ps s x) /\ (F x s) /\ (Ps t x) /\ (F x t)). but I got The 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 got The 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一向肩并 2025-01-26 08:13:16

Coq 中的标准是咖喱你的A4,这样接收一个大连词作为前提时,它接收几个不同的前提:

Axiom A4' : forall x s t,
  Ps s x -> F x s -> Ps t x -> F x t -> s = t.

那么你可以这样做:

pose proof (A4' x s t Pssx Fxs Pstx Fxt).

如果你绝对需要 A4 与连词,你可以使用 conj (你可以使用 A4 来连接连词)可以通过 Print "_ 找到/\ _"):

pose proof (A4 x s t (conj Pssx (conj Fxs (conj Pstx Fxt)))).

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:

Axiom A4' : forall x s t,
  Ps s x -> F x s -> Ps t x -> F x t -> s = t.

Then you can do:

pose proof (A4' x s t Pssx Fxs Pstx Fxt).

If you absolutely need A4 with the conjunctions, you can use conj (which you can find with Print "_ /\ _"):

pose proof (A4 x s t (conj Pssx (conj Fxs (conj Pstx Fxt)))).
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文