Created
October 10, 2017 00:24
-
-
Save msmorgan/2bceae10d8d21cb2d8e70e8ece95340b to your computer and use it in GitHub Desktop.
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
module NotElem | |
import Data.Vect | |
%default Total | |
NotElem : (x : a) -> Vect n a -> Type | |
NotElem x ys = Not (Elem x ys) | |
notElem : DecEq a => (x : a) -> (ys : Vect n a) -> Dec (NotElem x ys) | |
notElem x ys with (isElem x ys) | |
notElem x ys | (Yes prf) = No ((\a, f => f a) prf) | |
notElem x ys | (No contra) = Yes contra |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment