Best way to perform universal instantiation in Coq

谁说胖子不能爱 提交于 2019-12-02 02:59:49

问题


Suppose I have an hypothesis H : forall ( x : X ), P x and a variable x : X in the context. I want to perform universal instantiation and obtain a new hypothesis H' : P x. What is the most painless way to do this? Apparently apply H in x does not work. assert ( P x ) followed by apply H does, but it can get very messy if P is complex.

There's a similar question that seems somewhat related. Not sure if it can be applied here, though.


回答1:


pose proof (H x) as H'.

The parentheses are optional.




回答2:


If you want new hypothesis you can use @Ptival's answer, or

assert (H' := H x).

If it is ok to substitute existing hypothesis

specialize (H x).



回答3:


You can use something like generalize (H x); intros Hx: generalize will add (H x) as a new implication in front of the current goal, and intros will put it in your hypotheses.



来源:https://stackoverflow.com/questions/25687981/best-way-to-perform-universal-instantiation-in-coq

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