Last active
April 18, 2021 06:43
-
-
Save prozacchiwawa/6051f323e5530a3fb7bb29689ad084d7 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
module DecBool | |
-- Given a contra on bool equality (a = b) -> Void, produce a proof of the opposite (that (not a) = b) | |
public export | |
invertContraBool : (a : Bool) -> (b : Bool) -> (a = b -> Void) -> (not a = b) | |
invertContraBool a b contra = invertContraBool_ a b contra | |
where | |
fEf : False = False | |
fEf = Refl | |
tEt : True = True | |
tEt = Refl | |
invertContraBool_ : (a : Bool) -> (b : Bool) -> (a = b -> Void) -> (not a = b) | |
invertContraBool_ False False contra = absurd (contra fEf) | |
invertContraBool_ False True contra = Refl | |
invertContraBool_ True False contra = Refl | |
invertContraBool_ True True contra = absurd (contra tEt) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment