]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/lambda-delta/src/basic_rg/brgSubstitution.ml
- initial support for abstractions with explicit levels
[helm.git] / helm / software / lambda-delta / src / basic_rg / brgSubstitution.ml
index 5c9d91a8bdd14009ffb14b0c256ffe2dc480c95b..4e5eb481f17fd5fc3b762846ad3dfbff8b27f556 100644 (file)
@@ -15,18 +15,18 @@ module B = Brg
 let rec icm a = function
    | B.Sort _
    | B.LRef _
-   | B.GRef _                -> succ a
-   | B.Bind (_, B.Void, t)   -> icm (succ a) t
-   | B.Cast (_, u, t)        -> icm (icm a u) t
+   | B.GRef _                     -> succ a
+   | B.Bind (_, B.Void, t)        -> icm (succ a) t
+   | B.Cast (_, u, t)             -> icm (icm a u) t
    | B.Appl (_, u, t)
-   | B.Bind (_, B.Abst u, t)
-   | B.Bind (_, B.Abbr u, t) -> icm (icm (succ a) u) t
+   | B.Bind (_, B.Abst (_, u), t)
+   | B.Bind (_, B.Abbr u, t)      -> icm (icm (succ a) u) t
 
 let iter map d =
    let rec iter_bind d = function
-      | B.Void   -> B.Void
-      | B.Abst w -> B.Abst (iter_term d w)
-      | B.Abbr v -> B.Abbr (iter_term d v)
+      | B.Void        -> B.Void
+      | B.Abst (n, w) -> B.Abst (n, iter_term d w)
+      | B.Abbr v      -> B.Abbr (iter_term d v)
    and iter_term d = function
       | B.Sort _ as t      -> t
       | B.GRef _ as t      -> t