]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/helena/src/basic_rg/brgSubstitution.ml
new options activated
[helm.git] / helm / software / helena / src / basic_rg / brgSubstitution.ml
index fe5915f74ac5aa99644b0161ee6fd87642cca8e2..5661982a3b8101db11d69b4249577303e2135823 100644 (file)
@@ -18,22 +18,22 @@ let rec icm a = function
    | 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.Appl (_, _, 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 (x, n, w) -> B.Abst (x, n, iter_term d w)
+      | B.Abst (r, n, w) -> B.Abst (r, 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
+      | 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 (a, b, u)   -> B.Bind (a, iter_bind d b, iter_term (succ d) u)
+      | B.Cast (a, w, v)    -> B.Cast (a, iter_term d w, iter_term d v)
+      | B.Appl (a, x, w, u) -> B.Appl (a, x, iter_term d w, iter_term d u)
+      | B.Bind (a, b, u)    -> B.Bind (a, iter_bind d b, iter_term (succ d) u)
    in
    iter_term d