@@ -1,17 +1,38 @@
1module Decidable.Decidable
1module Decidable.Decidable
3+import Data.VectFun -- FIXME let's see if this is needed
3%access public
6%access public
5--------------------------------------------------------------------------------
8--------------------------------------------------------------------------------
6-- Typeclass for decidable n-ary Relations
9-- Typeclass for decidable n-ary Relations
7--------------------------------------------------------------------------------
10--------------------------------------------------------------------------------
12+--DecProc : (ts : Vect k Type) -> (p : Rel ts) -> Type
13+--DecProc [] p = Dec p
14+--DecProc (t::ts) p = (x : t) -> DecProc ts (p x)
15+--DecProc : (ts : Vect k Type) -> (p : VectFun ts Type) -> Type
16+--DecProc [] p = Dec p
17+--DecProc (t::ts) p = (x : t) -> DecProc ts (p x)
19+--class Decidable (ts : Vect k Type) (p : VectFun ts Type) where
20+-- total decide : DecProc ts p
21+--class Decidable (ts : Vect k Type) (p : Rel ts) where
22+-- total decide : DecProc ts p
23+--class Decidable (ts : Vect k Type) (p : VectFun ts Type) where
24+-- total decide : liftRel ts p Dec
25+class Decidable (ts : Vect k Type) (p : Rel ts) where
26+ total decide : liftRel ts p Dec
9using (t : Type)
29using (t : Type)
10 class Rel (p : t) where
30 class Rel (p : t) where
11 total liftRel : (Type -> Type) -> Type
31 total liftRel : (Type -> Type) -> Type
13 class (Rel p) => Decidable (p : t) where
33 class (Rel p) => Decidable (p : t) where
14 total decide : liftRel {p} Dec
34 total decide : liftRel {p} Dec
16using (P : Type, p : P)
37using (P : Type, p : P)
17 data Given : Dec P -> Type where
38 data Given : Dec P -> Type where