summaryrefslogtreecommitdiff
path: root/lib/ur/incl.urs
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2010-03-06 16:15:26 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2010-03-06 16:15:26 -0500
commit049d85f6ec161c8df0461550549ded12be9e44e8 (patch)
treeb422a4c17510b07702c1e16492d87680928a517f /lib/ur/incl.urs
parente59684b553e4e30e7290c7a589cdb582e8f46907 (diff)
Standard library moduls Incl and Mem; tweaks to Especialize and Unpoly
Diffstat (limited to 'lib/ur/incl.urs')
-rw-r--r--lib/ur/incl.urs20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/ur/incl.urs b/lib/ur/incl.urs
new file mode 100644
index 00000000..d0d78b36
--- /dev/null
+++ b/lib/ur/incl.urs
@@ -0,0 +1,20 @@
+con incl :: K --> {K} -> {K} -> Type
+
+val incl : K --> r1 :: {K} -> r2 :: {K} -> [r1 ~ r2] => incl r1 (r1 ++ r2)
+val proj : r1 ::: {Type} -> r2 ::: {Type} -> incl r1 r2 -> $r2 -> $r1
+
+val inv1 : K --> nm :: Name -> t ::: K -> r :: {K} -> r' :: {K}
+ -> [[nm] ~ r] =>
+ f :: (Name -> K -> {K} -> Type)
+ -> incl ([nm = t] ++ r) r'
+ -> (nm :: Name -> t :: K -> r :: {K} -> [[nm] ~ r] => f nm t ([nm = t] ++ r))
+ -> f nm t r'
+val inv2 : K --> nm :: Name -> t ::: K -> r :: {K} -> r' :: {K}
+ -> [[nm] ~ r] =>
+ incl ([nm = t] ++ r) r' -> incl r r'
+
+val fold : K --> tf :: ({K} -> Type) -> r ::: {K}
+ -> (nm :: Name -> v :: K -> r' :: {K}
+ -> [[nm] ~ r'] => incl ([nm = v] ++ r') r -> tf r' -> tf ([nm = v] ++ r'))
+ -> tf []
+ -> folder r -> tf r