不能专注于COQ中剩余的未关注目标
我试图证明抽水引理(这是逻辑基础书的练习之一)。我以为我已经完成了mstarapp
案例,但解释器告诉我,仍然存在未加注的目标。只有我不能将剩余的目标带到前面。我尝试了每个子弹级级别,但是每次我得到[focus]错误的子弹:不再是目标。
我不知道我的证明是否有问题,还是解释器中的错误。任何帮助都将不胜感激。
- (* MStarApp *)
intros.
destruct s1.
-- replace ([ ] ++ s2) with s2 in *. apply (IH2 H).
reflexivity.
-- pose proof (lt_ge_cases (length (x::s1)) (pumping_constant re)) as [
Hs1lt | Hs1ge].
--- exists [ ], (x::s1), s2. repeat split.
+ unfold not. intro. inversion H0.
+ simpl. simpl in Hs1lt.
apply n_lt_m__n_le_m in Hs1lt.
apply Hs1lt.
+ simpl. intro m.
apply (napp_star T m (x::s1) s2 re Hmatch1 Hmatch2).
--- unfold ge in Hs1ge. pose proof (IH1 Hs1ge) as [
s2' [s3' [s4' [Hxs1Eq [Hs3notEmpty [
Hlens2's3' Hnapp]]]]]].
exists s2', s3', (s4' ++ s2). repeat split.
+ rewrite Hxs1Eq. repeat rewrite <- app_assoc.
reflexivity.
+ assumption.
+ simpl. assumption.
+ intro m. pose proof Hnapp m.
replace (s2' ++ napp m s3' ++ s4' ++ s2) with
((s2' ++ napp m s3' ++ s4') ++ s2).
constructor.
++ assumption.
++ assumption.
++ repeat rewrite <- app_assoc. reflexivity.
(* 'There are unfocused goals.' *)
edit :我不知道这是否相关,但在我的证明中更高(在mapp
案例中)我有一个servert
其关闭卷曲支架以不寻常的方式突出显示(以黄色而不是绿色 - 我正在使用VSCODE中的COQ语言支持扩展)。
I am trying to prove the pumping Lemma (which is one of the exercises of the Logical Foundations book). I thought I had completed the MStarApp
case but the interpreter tells me that there are still unfocused goals remaining. Only I can't bring this remaining goal to the front. I tried every bullet level but each time I get [Focus] Wrong bullet: No more goals.
I don't know if something is wrong with my proof or if it's a bug in the interpreter. Any help would be much appreciated.
- (* MStarApp *)
intros.
destruct s1.
-- replace ([ ] ++ s2) with s2 in *. apply (IH2 H).
reflexivity.
-- pose proof (lt_ge_cases (length (x::s1)) (pumping_constant re)) as [
Hs1lt | Hs1ge].
--- exists [ ], (x::s1), s2. repeat split.
+ unfold not. intro. inversion H0.
+ simpl. simpl in Hs1lt.
apply n_lt_m__n_le_m in Hs1lt.
apply Hs1lt.
+ simpl. intro m.
apply (napp_star T m (x::s1) s2 re Hmatch1 Hmatch2).
--- unfold ge in Hs1ge. pose proof (IH1 Hs1ge) as [
s2' [s3' [s4' [Hxs1Eq [Hs3notEmpty [
Hlens2's3' Hnapp]]]]]].
exists s2', s3', (s4' ++ s2). repeat split.
+ rewrite Hxs1Eq. repeat rewrite <- app_assoc.
reflexivity.
+ assumption.
+ simpl. assumption.
+ intro m. pose proof Hnapp m.
replace (s2' ++ napp m s3' ++ s4' ++ s2) with
((s2' ++ napp m s3' ++ s4') ++ s2).
constructor.
++ assumption.
++ assumption.
++ repeat rewrite <- app_assoc. reflexivity.
(* 'There are unfocused goals.' *)
Edit: I don't know if this is relevant, but higher in my proof (in the MApp
case) I have an assert
whose closing curly bracket is highlighted in an unusual way (in yellow instead of green -- I am using the Coq language support extension in VSCode).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您在一些早期的证明分支机构中没有完成业务。您提供的一个目标没有任何未完成的目标。您已经将未完成或
录取
提出了一些较早的目标。或者可能您没有正确完成断言
。如果您需要帮助,则需要显示证明的一部分。这是您的证明开始的证明状态,并由您的解决方案解决
证明脚本。
You have unfinished business in some of the earlier proof branches. The one you are providing does not have any unfinished goals. You have left unfinished or
admit
ed some of the earlier goals. Or probably you didn't finish theassert
properly. You need to show that part of the proof if you want help with that.This is the proof state where your proof begins, and it is solved by your
proof script.