(* please use the tactics:
intros destruct constructor left right apply assumption absurd
to proof the following theorem
Remove "Admitted." and complete the proof.
the tactics auto tauto are forbidden!
*)
Parameters p q r s t : Prop.
Example Ex : ~ p -> (p -> (p -> q)).
Proof.
intros.
absurd p.
assumption.
apply H1.
Qed.
Example Ex1 : (p \/ q) -> r -> (p \/ q) /\ r.
Proof.
intros.
destruct H.
- constructor.
+ left. apply H.
+ apply H0.
- constructor.
+ right. apply H.
+ apply H0.
Qed.
Example Ex2 : (p -> q) /\ (r -> s) -> ((p \/ r) -> (q \/ s)) .
Proof.
intros.
destruct H.
- destruct H0.
constructor.
apply H.
apply H0.
+ right.
apply H1.
apply H0.
Qed.
Axiom LEM : forall A, A \/ ~A.
Example Ex3 : q -> (p /\ q) \/ (~p /\ q).
Proof.
intros.
destruct (LEM p).
constructor.
+ constructor.
apply H0.
apply H.
+right. constructor.
apply H0.
apply H.
Qed.
Example Ex4: (~p \/ q) -> (p -> q).
Proof.
intros.
destruct H.
+ absurd p.
- apply H; assumption.
- apply H0;assumption.
+ apply H;assumption.
Qed.
Example Ex4': (p -> q) -> (~p \/ q).
Proof.
intros.
destruct (LEM p).
- right.
apply H; assumption.
- left. assumption.
Qed.
Example Ex5: ((p/\q) -> r) -> (r -> s) -> (q /\ ~s) -> ~p.
Proof.
intros.
intro.
destruct H1.
absurd s.
- apply H3.
- apply H0.
apply H.
+ constructor.
apply H2.
apply H1.
Qed.
Example Ex6: ~~(p \/ ~p).
Proof.
intro.
absurd (p\/~p).
- apply H.
- right.
intro.
absurd (p\/~p).
+ apply H.
+ left. assumption.
Qed.
Example Ex7: ((s -> p) \/ (t -> q)) -> (s -> q) \/ (t -> p).
Proof.
intros.
destruct H.
- destruct (LEM s).
+ right.
intro. apply H. apply H0.
+ left.
intro. absurd s. apply H0. apply H1.
- destruct (LEM t).
+ left.
intro. apply H. apply H0.
+ right.
intro. absurd t. apply H0. apply H1.
Qed.
Example Ex8: (forall A, A \/ ~A) -> (forall A B, ~(~A /\ ~B) -> (A \/ B)).
Proof.
intros.
destruct (H A).
- left. apply H1.
- right.
destruct (H B).
+ assumption.
+ destruct H0.
constructor.
assumption.
assumption.
Qed.
Example Ex9: (forall A B, ~(~A /\ ~B) -> (A \/ B)) -> (forall A, A \/ ~A).
Proof.
intros.
destruct (LEM A).
- left. apply H0.
- right. apply H0.
Qed.
Lemma PBC: forall A, ~~ A -> A.
Proof.
intros.
destruct (LEM A).
- assumption.
- absurd (~A); assumption.
Qed.
Example Ex10: ((~p\/~q)->(r/\s)) -> (r->t) -> ~t -> p.
Proof.
intros.
destruct (LEM p). apply H2.
absurd t. apply H1. apply H0. destruct H. left. apply H2. apply H.
Qed.