简体   繁体   English

如何在Coq中证明(p-> q)->(〜p \\ / q)

[英]How to prove (p -> q) -> (~ p \/ q) in Coq

I am trying to prove (p -> q) -> (~ p / q) in Coq using the Axiom: 我正在尝试使用公理在Coq中证明(p-> q)->(〜p / q):

Axiom tautology : forall P:Prop, P \/ ~ P.

I am trying to convert ~ p / q into ~ p / p by applying p -> q. 我试图通过应用p-> q将〜p / q转换为〜p / p。 So do something like this: 所以做这样的事情:

Theorem Conversion: forall (p q: Prop),(p -> q) -> (~ p \/ q).
Proof.
  intros p q.
  intros p_implies_q.
  (do something here, change ~p\/q into ~p\/p)
  apply tautology...

But I don't know how can I do this. 但是我不知道该怎么办。 And if there is a better way to do this, please tell me. 如果有更好的方法,请告诉我。 Thanks!. 谢谢!。

One way to use your tautology is with the tactic destruct . 使用tautology一种方法是destruct策略。 This allows you reduce to the cases where p is true and where p is not true. 这使您可以简化为p为true和p为非true的情况。

Axiom tautology : forall P:Prop, P \/ ~ P.

Theorem Conversion: forall (p q: Prop),(p -> q) -> (~ p \/ q).
Proof.
  intros p q.
  intros p_implies_q.
  destruct (tautology p) as [p_true | p_not_true].
  - (* prove ~p \/ q using p *)
  - (* prove ~p \/ q using ~p *)
Qed.

Can you see how to prove ~p \\/ q in each of those cases? 您能看到在每种情况下如何证明~p \\/ q吗?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Coq 中证明 (~Q -&gt; ~P) - &gt; (P -&gt; Q) - How to prove (~Q -> ~P) - > (P -> 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? 如何在coq中证明引理“(P \\ / Q)/ \\ ~P - &gt; Q.” - How to prove the lemma “(P \/ Q) /\ ~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 Coq 证明 p <q or p>=q</q> - Coq proof that p<q or p>=q 如何用给定的假设证明排除中间(forall PQ: Prop, (P -&gt; Q) -&gt; (~P \/ Q))? - How can I prove excluded middle with the given hypothesis (forall P Q : Prop, (P -> Q) -> (~P \/ Q))? 如何在 Coq 中证明 ~~(P \/ ~P) - How to prove in Coq ~~(P \/ ~P) Coq:在没有 `contradiction` 策略的情况下证明 `P -&gt; ~P -&gt; Q`? - Coq: proving `P -> ~P -> Q` without `contradiction` tactic? 如何证明从典型类型到“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;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