Created
September 25, 2022 11:55
-
-
Save yoshihiro503/bc7229f5d4792249055da01a346b7444 to your computer and use it in GitHub Desktop.
This file contains 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 contrapositive_bool : forall (p q : bool), | |
(p = true -> q = true) -> (q = false -> p = false). | |
Proof. | |
intros p q H Hq. | |
destruct p. (* pで場合分け*) | |
- (* pがtrueのとき *) | |
rewrite H in Hq. | |
+ discriminate Hq. | |
+ reflexivity. | |
- (* pがfalseのとき*) | |
reflexivity. | |
Qed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment