I am trying to prove (p -> q) -> (~ p / q) in Coq using the Axiom:
Axiom tautology : forall P:Prop, P \/ ~ P.
I am trying to convert ~ p / q into ~ p / p by applying p -> q. 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
. This allows you reduce to the cases where p
is true and where p
is not 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?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.