Created
January 15, 2015 16:59
-
-
Save relrod/faff823451a848bd03bb to your computer and use it in GitHub Desktop.
Proving de Morgan's laws in Coq because I have no life.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Theorem de_morgan_1 : forall b1 b2 : bool, | |
negb (orb b1 b2) = andb (negb b1) (negb b2). | |
Proof. | |
intros. | |
destruct b1. | |
simpl. | |
reflexivity. | |
simpl. | |
reflexivity. | |
Qed. | |
Theorem de_morgan_2 : forall b1 b2 : bool, | |
negb (andb b1 b2) = orb (negb b1) (negb b2). | |
Proof. | |
intros. | |
destruct b1. | |
simpl. | |
reflexivity. | |
simpl. | |
reflexivity. | |
Qed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment