开发者

Discarding tautological premises in Coq

I have a hypothesis in the local context, let's call it H which is of the form true=true -> conclusion. Which tactic can I use to discard the p开发者_如何学Goremise and retain only the conclusion?


This asserts the premise as a subgoal and then tries to prove both it, and the original goal with the conclusion of H prepended, using the trivial tactic.

lapply H; trivial.


Use the specialize tactic: http://coq.inria.fr/doc/Reference-Manual011.html#@tactic35

specialize (H (eq_refl true)).


I came up with the following. Either of these works:

assert (H2 : conclusion). apply H. reflexivity.

assert (H2 : true->true). reflexivity. apply H in H2.

assert (H2 := H (eq_refl true)). also works. I would still like to know about cleaner solutions.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜