annotate mem.urs @ 18:6cd839818393
Adjust to name change for [Top.id]
author |
Adam Chlipala <adam@chlipala.net> |
date |
Thu, 29 Dec 2011 14:15:02 -0500 |
parents |
943410267fad |
children |
|
rev |
line source |
adam@5
|
1 (** A record membership predicate *)
|
adam@5
|
2
|
adam@5
|
3 con mem :: K --> Name -> K -> {K} -> Type
|
adam@5
|
4
|
adam@5
|
5 val mem : K --> nm :: Name -> t :: K -> r :: {K} -> [[nm] ~ r] => mem nm t ([nm = t] ++ r)
|
adam@5
|
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)
|
adam@5
|
7
|
adam@5
|
8 val proj : nm ::: Name -> t ::: Type -> r ::: {Type} -> mem nm t r -> $r -> t
|
adam@5
|
9 val replace : nm ::: Name -> t ::: Type -> r ::: {Type} -> mem nm t r -> $r -> t -> $r
|
adam@5
|
10
|
adam@5
|
11 val fold : K --> tf :: ({K} -> Type) -> r ::: {K}
|
adam@5
|
12 -> (nm :: Name -> v :: K -> r' :: {K} -> [[nm] ~ r']
|
adam@5
|
13 => mem nm v r -> tf r' -> tf ([nm = v] ++ r'))
|
adam@5
|
14 -> tf []
|
adam@5
|
15 -> folder r -> tf r
|