X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fhelena%2Fsrc%2Fbasic_rg%2FbrgSubstitution.ml;h=727524ca70a2088231d7101e6e46e7300a24cecd;hb=88977b2d546e547e23b046792fe2ad8f6ff192a4;hp=152b8c0691dfdca94068003d6a5e5bbca8db2aea;hpb=95872555aaa040a22ad2d93cb1278f79e20da70c;p=helm.git diff --git a/helm/software/helena/src/basic_rg/brgSubstitution.ml b/helm/software/helena/src/basic_rg/brgSubstitution.ml index 152b8c069..727524ca7 100644 --- a/helm/software/helena/src/basic_rg/brgSubstitution.ml +++ b/helm/software/helena/src/basic_rg/brgSubstitution.ml @@ -12,28 +12,30 @@ module G = Options module B = Brg +IFDEF TYPE THEN + 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 (n, w) -> B.Abst (n, iter_term d w) - | B.Abbr v -> B.Abbr (iter_term d v) + | B.Void -> B.Void + | 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.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.Cast (w, v) -> B.Cast (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.Bind (y, b, u) -> B.Bind (y, iter_bind d b, iter_term (succ d) u) in iter_term d @@ -48,3 +50,5 @@ let lift h d t = *) iter (lift_map h) d t end + +END