How can I have Idris automatically prove that two values are not equal?
p : Not (Int = String)
p = \Refl impossible
How can I have Idris automatically generate this proof? auto does not appear to be capable of proving statements involving Not. My end goal is to have Idris automatically prove that all elements in a vector are unique and that two vectors are disjoint.
namespace IsSet
data IsSet : List t -> Type where
Nil : IsSet []
(::) : All (\a => Not (a = x)) xs -> IsSet xs -> IsSet (x :: xs)
namespace Disjoint
data Disjoint : List t -> List t -> Type where
Nil : Disjoint [] ys
(::) : All (\a => Not (a = x)) ys -> Disjoint xs ys -> Disjoint (x :: xs) ys
f : (xs : List Type) -> (ys: List Type) -> {p1 : IsSet xs} -> {p2 : IsSet ys} -> {p3 : Disjoint xs ys} -> ()
f _ _ = ()
q : ()
q = f ['f1, 'f2] ['f3, 'f4]