[英]how do I prove forall P Q : Prop, ((((P -> Q) -> P) -> P) -> Q) ->Q. in coq?
[英]How can I prove excluded middle with the given hypothesis (forall P Q : Prop, (P -> Q) -> (~P \/ Q))?
我目前對如何證明以下定理感到困惑:
Theorem excluded_middle2 :
(forall P Q : Prop, (P -> Q) -> (~P \/ Q)) -> (forall P, P \/ ~P).
我被困在這里:
Theorem excluded_middle2 :
(forall P Q : Prop, (P -> Q) -> (~P \/ Q)) -> (forall P, P \/ ~P).
Proof.
intros.
evar (Q : Prop).
specialize H with (P : Prop) (Q : Prop).
我知道不可能簡單地證明 coq 中的排中律,但我真的很想知道用這個給定的定理是否可以證明排中律?
是的你可以。 一種使用 ssreflect 的方法如下(可能有更短的方法):
Lemma orC P Q : P \/ Q -> Q \/ P.
Proof. by case; [right | left]. Qed.
Theorem excluded_middle2 :
(forall P Q : Prop, (P -> Q) -> (~ P \/ Q)) -> (forall P, P \/ ~ P).
Proof.
move=> orasimply P.
have pp : P -> P by [].
move: (orasimply P P pp).
exact: orC.
Qed.
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.