存在主义假设的策略

发布于 2025-01-10 22:31:50 字数 450 浏览 7 评论 0原文

假设我们有一个命题P1 n,并且它成立存在n。此外,我们有一个命题P2,其中P1 n对于任何n意味着P2。我们如何证明P2

Parameter P1 : nat -> Prop.
Axiom some_p1 : exists n, P1 n.

Parameter P2 : Prop.
Axiom p1_implies_p2 : forall n, P1 n -> P2.

Theorem p2 : P2.

我尝试了

Proof.
  eapply p1_implies_p2.

这给了我目标 P1 ?n,但我不确定如何从那里继续。

Say we have a proposition P1 n, and there exists n for which it holds. Furthermore we have a proposition P2, where P1 n implies P2 for any n. How do we prove P2?

Parameter P1 : nat -> Prop.
Axiom some_p1 : exists n, P1 n.

Parameter P2 : Prop.
Axiom p1_implies_p2 : forall n, P1 n -> P2.

Theorem p2 : P2.

I tried

Proof.
  eapply p1_implies_p2.

which gives me the goal P1 ?n, but I'm not sure how to proceed from there.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

久光 2025-01-17 22:31:50

您可以消除some_p1以获得证人n和假设Hn

Theorem p2 : P2.
  case some_p1 ; intros n Hn.  apply (p1_implies_p2 _ Hn).
Qed.

You may eliminate some_p1to get a witness nand a hypothesis Hn.

Theorem p2 : P2.
  case some_p1 ; intros n Hn.  apply (p1_implies_p2 _ Hn).
Qed.
谎言 2025-01-17 22:31:50

为了完整起见,如果您使用 SSReflect 证明语言,Pierre 的证明思路将如下所示:

Theorem p2 : P2.
Proof. move: some_p1 => [n p1n]. exact: (p1_implies_p2 p1n). Qed.

请注意,为 p1_implies_p2 提供第二个参数 p1n 就足够了,因为省略了第一个参数一,n,可以由 Coq 推断。

Just for completeness, if you use the SSReflect proof language, Pierre's proof idea would look like this:

Theorem p2 : P2.
Proof. move: some_p1 => [n p1n]. exact: (p1_implies_p2 p1n). Qed.

Note that providing the second argument p1n to p1_implies_p2 is enough, since the omitted first one, n, can be inferred by Coq.

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