基于forall证明较弱的存在
Lemma one_bigger' : forall n h,
n = S (double h) -> (exists k, S n = double k).
Proof.
intros n h H. rewrite H. exists (S h). reflexivity.
Qed.
Lemma one_bigger : forall n,
(exists k, n = S (double k)) -> (exists k, S n = double k).
Admitted.
在我看来,考虑到第一个引理,第二个引理应该是可以轻易证明的,但我似乎无法理解如何使用第一个引理来证明第二个引理。
Lemma one_bigger' : forall n h,
n = S (double h) -> (exists k, S n = double k).
Proof.
intros n h H. rewrite H. exists (S h). reflexivity.
Qed.
Lemma one_bigger : forall n,
(exists k, n = S (double k)) -> (exists k, S n = double k).
Admitted.
It seems to me that the second lemma should be trivially provable given the first, but I can't seem to wrap my head around how to use the first lemma to prove the second one.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
case H
似乎是我找不到的魔法:case H
seems to be the magic I couldn't find:事实上,你的例子是一个等价的实例(引理
L
)Indeed, your example is an instance of an equivalence (Lemma
L
)如果您使用 SSReflect,您可以按如下方式编写证明。
move
构造与intros
相同,只是您的H
在这里直接解构为见证人k
,以及存在性平等的证明。最后一个证明通过/
表示法直接传递给one_bigger'
,从而产生预期的结果。另一个更明确的证明是
If you use SSReflect, you can write your proof as follows.
The
move
construct does the same asintros
, except that yourH
is here directly destructured into a witness,k
, and a proof of the equality in the existential. This last proof is directly passed toone_bigger'
via the/
notation, thus yielding the expected result.Another, more explicit proof would be