我试图解决常数不是通过COQ汇总

发布于 2025-01-17 18:54:16 字数 626 浏览 2 评论 0原文

这是我迄今为止所做的工作。而我似乎被困在这里了。如果有人有任何想法,我将不胜感激。

Definition relation (X Y : Type) := X -> Y -> Prop.
Definition surjective {X Y : Type} (R: relation X Y) := 
forall y : Y, exists x : X, R x y.
Definition constant {X:Type} (c:X) := fun x y : X => y = c.
Definition injective {X Y : Type} (R: relation X Y) := forall x1 x2: X, forall y : Y, (R x1 y) -> (R x2 y) -> x1 = x2.

Theorem const_not_sur : forall c:nat, ~surjective (constant c).
Proof.
unfold not.
unfold surjective.
unfold constant.
intros.
destruct (H c) as [x H1].
destruct x.

据说这个问题可以使用n_Sn方法来解决。如果你觉得可以用这样的方法,会用在哪里呢?

This is the work I have so far. And I'm seemed to be stuck here. If anyone has any idea I would appreciate the help.

Definition relation (X Y : Type) := X -> Y -> Prop.
Definition surjective {X Y : Type} (R: relation X Y) := 
forall y : Y, exists x : X, R x y.
Definition constant {X:Type} (c:X) := fun x y : X => y = c.
Definition injective {X Y : Type} (R: relation X Y) := forall x1 x2: X, forall y : Y, (R x1 y) -> (R x2 y) -> x1 = x2.

Theorem const_not_sur : forall c:nat, ~surjective (constant c).
Proof.
unfold not.
unfold surjective.
unfold constant.
intros.
destruct (H c) as [x H1].
destruct x.

Supposedly this problem can be solved using n_Sn method. If you think such method can be used, where would it be?

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

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

发布评论

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

评论(2

你的背包 2025-01-24 18:54:16

为了找到矛盾,您应该尝试解构 H (S c) 而不是 H c,给出假设 S c = c

In order to find a contradiction, you should try to destruct H (S c)instead of H c, giving a hypothesis S c = c.

亢潮 2025-01-24 18:54:16

正如 Pierre 所建议的,与 Sc 的矛盾确实有效。但请注意,您不必使用 n_Sn 引理,因为归纳证明也可以。在 SSReflect 中,这将产生:

Theorem const_not_sur : forall c:nat, ~surjective (constant c).
Proof. by move=> c /(_ (S c)) [x /eqP]; elim: c. Qed.

请注意,/eqP 允许您移动到布尔域,从而可以直接使用归纳法(通过 elim),这也是如何实现的n_Sn 引理可以被证明。另外,在 SSReflect 中,Sc 可以表示为 c.+1

As suggested by Pierre, a contradiction with S c indeed works. Note though that you don't have to use the n_Sn lemma, since a proof by induction would also work. In SSReflect, this would yield:

Theorem const_not_sur : forall c:nat, ~surjective (constant c).
Proof. by move=> c /(_ (S c)) [x /eqP]; elim: c. Qed.

Note that /eqP allows you to move to the boolean domain, thus enabling a direct use of induction (via elim), which is also how the n_Sn lemma could be proved. Also, S c can be notated c.+1, in SSReflect.

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