[英]Can destruct used in implication in Coq?
destruct可用於拆分和 或在Coq中。 但是似乎還可以暗示使用嗎? 例如,我想證明~~(~~P -> P)
Lemma test P : ~~(~~P -> P).
Proof.
unfold not.
intro pffpf.
apply pffpf.
intro pff.
destruct pff.
intro p.
apply pffpf.
intro pff.
exact p.
Qed.
destruct pff.
它工作正常,但我不知道為什么? 誰能為我解釋一下?
如果暗示的結論是歸納(或共歸納)類型,則destruct
策略將對暗示起作用。 因此,它適用於您的示例,因為False
是歸納定義的。 但是,如果我們提出了False
的不同定義,則不一定有效。 例如,以下腳本在destruct pff
行失敗:
Definition False : Prop := forall A : Prop, A.
Definition not (P : Prop) : Prop := P -> False.
Lemma test P : not (not (not (not P) -> P)).
unfold not.
intro pffpf.
apply pffpf.
intro pff.
destruct pff. (* Fails here *)
intro p.
apply pffpf.
intro pff.
exact p.
Qed.
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.