开发者

Discarding tautological premises in Coq

开发者 https://www.devze.com 2023-04-01 01:27 出处:网络
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?

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

精彩评论

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