Skip to content

Instantly share code, notes, and snippets.

@ghulette
Created November 8, 2017 05:46
Show Gist options
  • Save ghulette/7c409fb904731f0f4a72376136f2d001 to your computer and use it in GitHub Desktop.
Save ghulette/7c409fb904731f0f4a72376136f2d001 to your computer and use it in GitHub Desktop.
P /\ Q <-> ~(P -> ~Q)
Require Import Coq.Logic.Classical.
Theorem conj_iff :
forall P Q, P /\ Q <-> ~(P -> ~Q).
Proof.
split.
unfold not.
intros (HP,HQ) H.
apply H.
apply HP.
apply HQ.
intros H.
assert (P \/ ~P) as HP by apply classic.
destruct HP as [HP|HNP].
split.
assumption.
assert (Q \/ ~Q) as HQ by apply classic.
destruct HQ as [HQ|HNQ].
assumption.
exfalso.
apply H.
intros.
assumption.
exfalso.
apply H.
intros.
contradiction.
Qed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment