Skip to content

Instantly share code, notes, and snippets.

@kitayuta
Last active August 29, 2015 13:59
Show Gist options
  • Save kitayuta/10582838 to your computer and use it in GitHub Desktop.
Save kitayuta/10582838 to your computer and use it in GitHub Desktop.
coqex_1
Coq演習 第1回
Theorem Modus_ponens : forall P Q : Prop, P -> (P -> Q) -> Q.
Proof.
intros.
apply H0.
assumption.
Qed.
Theorem Modus_tollens : forall P Q : Prop, ~Q /\ (P -> Q) -> ~P.
Proof.
intros.
intro.
destruct H.
apply H.
apply H1.
assumption.
Qed.
Theorem Disjunctive_syllogism : forall P Q : Prop, (P \/ Q) -> ~P -> Q.
Proof.
intros.
destruct H.
contradiction.
assumption.
Qed.
Theorem DeMorgan1 : forall P Q : Prop, ~P \/ ~Q -> ~(P /\ Q).
Proof.
intros.
intro.
destruct H.
apply H.
destruct H0.
assumption.
apply H.
destruct H0.
assumption.
Qed.
Theorem DeMorgan2 : forall P Q : Prop, ~P /\ ~Q -> ~(P \/ Q).
Proof.
intros.
intro.
destruct H.
destruct H0.
apply (H H0).
apply (H1 H0).
Qed.
Theorem DeMorgan3 : forall P Q : Prop, ~(P \/ Q) -> ~P /\ ~Q.
Proof.
intros.
split.
intro.
apply H.
left.
assumption.
intro.
apply H.
right.
assumption.
Qed.
Theorem NotNot_LEM : forall P : Prop, ~ ~(P \/ ~P).
Proof.
intros.
intro.
apply H.
right.
intro.
apply H.
left.
assumption.
Qed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment