comparison lib/ur/incl.urs @ 1180:ac3dbbc85c6e

Standard library moduls Incl and Mem; tweaks to Especialize and Unpoly
author Adam Chlipala <adamc@hcoop.net>
date Sat, 06 Mar 2010 16:15:26 -0500
parents
children 618f9f458da9
comparison
equal deleted inserted replaced
1179:c58453683bbb 1180:ac3dbbc85c6e
1 con incl :: K --> {K} -> {K} -> Type
2
3 val incl : K --> r1 :: {K} -> r2 :: {K} -> [r1 ~ r2] => incl r1 (r1 ++ r2)
4 val proj : r1 ::: {Type} -> r2 ::: {Type} -> incl r1 r2 -> $r2 -> $r1
5
6 val inv1 : K --> nm :: Name -> t ::: K -> r :: {K} -> r' :: {K}
7 -> [[nm] ~ r] =>
8 f :: (Name -> K -> {K} -> Type)
9 -> incl ([nm = t] ++ r) r'
10 -> (nm :: Name -> t :: K -> r :: {K} -> [[nm] ~ r] => f nm t ([nm = t] ++ r))
11 -> f nm t r'
12 val inv2 : K --> nm :: Name -> t ::: K -> r :: {K} -> r' :: {K}
13 -> [[nm] ~ r] =>
14 incl ([nm = t] ++ r) r' -> incl r r'
15
16 val fold : K --> tf :: ({K} -> Type) -> r ::: {K}
17 -> (nm :: Name -> v :: K -> r' :: {K}
18 -> [[nm] ~ r'] => incl ([nm = v] ++ r') r -> tf r' -> tf ([nm = v] ++ r'))
19 -> tf []
20 -> folder r -> tf r