comparison mem.urs @ 5:943410267fad

Import Incl and Mem
author Adam Chlipala <adam@chlipala.net>
date Tue, 14 Dec 2010 09:49:10 -0500
parents
children
comparison
equal deleted inserted replaced
4:8f7396495045 5:943410267fad
1 (** A record membership predicate *)
2
3 con mem :: K --> Name -> K -> {K} -> Type
4
5 val mem : K --> nm :: Name -> t :: K -> r :: {K} -> [[nm] ~ r] => mem nm t ([nm = t] ++ r)
6 val mp : K --> K2 --> f :: (K -> K2) -> nm ::: Name -> t ::: K -> r ::: {K} -> mem nm t r -> mem nm (f t) (map f r)
7
8 val proj : nm ::: Name -> t ::: Type -> r ::: {Type} -> mem nm t r -> $r -> t
9 val replace : nm ::: Name -> t ::: Type -> r ::: {Type} -> mem nm t r -> $r -> t -> $r
10
11 val fold : K --> tf :: ({K} -> Type) -> r ::: {K}
12 -> (nm :: Name -> v :: K -> r' :: {K} -> [[nm] ~ r']
13 => mem nm v r -> tf r' -> tf ([nm = v] ++ r'))
14 -> tf []
15 -> folder r -> tf r