简体   繁体   中英

How to prove in Coq ~~(P \/ ~P)

I want to prove ~~(P \/ ~P) in Coq, which sounds somehow trivial... However I do not know where to go since there is not any single hypothesis. I have written the following code which is not working, since it is giving the following exception [ltac_use_default] expected after [tactic] (in [tactic_command]).

Parameter P: Prop.

Section r20.
Lemma regra1: ~~(P \/ ~P).
Proof.
  intro.
   - cut P.
   - cut ~P
Qed.
End r20.

It is little tricky one. Here is one way to prove it.

Parameter P : Prop.

Section r20.
Lemma regra1: ~~(P \/ ~P).
Proof.
  unfold not. intros H1.
  apply H1. right.
  intros H2.
  apply H1. left.
  exact H2.
Qed.
End r20.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM