How can I get Idris to automatically prove that the two values ββare not equal?
p : Not (Int = String) p = \Refl impossible
How can I get Idris to automatically generate this evidence? auto does not seem to be able to prove statements involving Not . My ultimate goal is to force Idris to automatically prove that all elements in the vector are unique and that the two vectors do not intersect.
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]
I am rewarded with a prize of 100 for an answer that allows you to call f, as in q (without specifying p1, p2 and p3).
proof idris
2426021684
source share