简体   繁体   English

如何用给定的假设证明排除中间(forall PQ: Prop, (P -> Q) -> (~P \/ Q))?

[英]How can I prove excluded middle with the given hypothesis (forall P Q : Prop, (P -> Q) -> (~P \/ Q))?

I am currently confused about how to prove the following theorem:我目前对如何证明以下定理感到困惑:

Theorem excluded_middle2 : 
 (forall P Q : Prop, (P -> Q) -> (~P \/ Q)) -> (forall P, P \/ ~P).

I am stuck here:我被困在这里:

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).

I know that it's impossible to simply prove the law of excluded middle in coq, but I really want to know with this given theorem is it possible to prove the law of excluded middle?我知道不可能简单地证明 coq 中的排中律,但我真的很想知道用这个给定的定理是否可以证明排中律?

Yes, you can.是的你可以。 One way, using ssreflect, is as follows (there are probably shorter ways):一种使用 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.

相关问题 我如何证明所有 PQ:Prop, ((((P -> Q) -> P) -> P) -> Q) ->Q。 在考克? - how do I prove forall P Q : Prop, ((((P -> Q) -> P) -> P) -> Q) ->Q. in coq? 在 Coq 中如何证明或证伪 `forall (PQ : Prop), (P -&gt; Q) -&gt; (Q -&gt; P) -&gt; P = Q.`? - How or is that possible to prove or falsify `forall (P Q : Prop), (P -> Q) -> (Q -> P) -> P = Q.` in Coq? 如何证明所有人(pq:Prop),〜p-&gt;〜((p-&gt; q)-&gt; p) 使用coq - How to prove forall (p q:Prop), ~p->~((p ->q) ->p). using coq 如何证明从典型类型到“Prop”的所有函数 P、Q,“forall a, b, P(a) or Q(b) 成立”当且仅当“forall a, P(a), or, forall b, Q (b),持有”? - How to prove for all functions P, Q from typical type to `Prop`, “forall a, b, P(a) or Q(b) holds” iff “forall a, P(a), or, forall b, Q(b), holds”? 如何在Coq中证明(p-&gt; q)-&gt;(〜p \\ / q) - How to prove (p -> q) -> (~ p \/ q) in Coq 如何在 Coq 中证明 (~Q -&gt; ~P) - &gt; (P -&gt; Q) - How to prove (~Q -> ~P) - > (P -> Q) in Coq 如何证明 (forall x, P x /\\ Q x) -&gt; (forall x, P x) - How to prove (forall x, P x /\ Q x) -> (forall x, P x) 如何在coq中证明引理“(P \\ / Q)/ \\ ~P - &gt; Q.” - How to prove the lemma “(P \/ Q) /\ ~P -> Q.” in coq? Coq 证明 p <q or p>=q</q> - Coq proof that p<q or p>=q 如何在 Coq 中将 P-&gt;Q-&gt;R 形式的命题同时应用于两个假设 P 和 Q? - How do I apply the proposition of the form P->Q->R to two hypotheses P and Q simultaneously in Coq?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM