Coq : Admit assert

て烟熏妆下的殇ゞ 提交于 2020-02-24 09:05:14

问题


Is there a way to admit asserts in Coq ?

Suppose I have a theorem like this:

Theorem test : forall m n : nat,
    m * n = n * m.
Proof.
  intros n m.
  assert (H1: m + m * n = m * S n). { Admitted. }
Abort.

The above assert doesn't seem to work for me.

The error I receive is:

Error: No focused proof (No proof-editing in progress).

What I want is something like undefined in Haskell. Baiscally, I will come back to this later and prove it. Is there something like that in Coq to achieve it ?


回答1:


In general the tactic admit (lower-case first letter) admits the current subgoal. Thus assert <your assertion>. admit. should work in your case.

Or in its full glory as follows.

Theorem test : forall m n : nat,
  m * n = n * m.
Proof.
  intros n m.
  assert (H1: m + m * n = m * S n). admit.
Abort.

Edit: The version with ; is nonsense, because you do not want to admit all subgoals.



来源:https://stackoverflow.com/questions/42791453/coq-admit-assert

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!