[英]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.