]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/lambda-delta/basic_rg/brgSubstitution.ml
brg: change in the representation of binders
[helm.git] / helm / software / lambda-delta / basic_rg / brgSubstitution.ml
index 4355376e85f26c17011ed29e80a0b15397bb865e..40859b2d5e54f75a97eb1a31f179f8e8bbc7e908 100644 (file)
@@ -13,16 +13,16 @@ module B = Brg
 
 let iter map d =
    let rec iter_bind d = function
-      | B.Void _ as b -> b
-      | B.Abst (a, w) -> B.Abst (a, iter_term d w)
-      | B.Abbr (a, v) -> B.Abbr (a, iter_term d v)
+      | B.Void   -> B.Void
+      | B.Abst w -> B.Abst (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
       | B.LRef (a, i) as t -> if i < d then t else map d a i
       | B.Cast (a, w, v)   -> B.Cast (a, iter_term d w, iter_term d v)
       | B.Appl (a, w, u)   -> B.Appl (a, iter_term d w, iter_term d u)
-      | B.Bind (b, u)      -> B.Bind (iter_bind d b, iter_term (succ d) u)
+      | B.Bind (a, b, u)   -> B.Bind (a, iter_bind d b, iter_term (succ d) u)
    in
    iter_term d
 
@@ -31,8 +31,3 @@ let lift_map h _ a i =
 
 let lift h d t =
    if h = 0 then t else iter (lift_map h) d t
-
-let lift_bind h d = function
-   | B.Void _ as b -> b
-   | B.Abst (a, w) -> B.abst a (lift h d w)
-   | B.Abbr (a, v) -> B.abbr a (lift h d v)