X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Flambda-delta%2Fsrc%2Fbasic_rg%2FbrgSubstitution.ml;fp=helm%2Fsoftware%2Flambda-delta%2Fsrc%2Fbasic_rg%2FbrgSubstitution.ml;h=0000000000000000000000000000000000000000;hb=95872555aaa040a22ad2d93cb1278f79e20da70c;hp=152b8c0691dfdca94068003d6a5e5bbca8db2aea;hpb=4025c3f5b36025380dcad84bb7a97045d08652f6;p=helm.git diff --git a/helm/software/lambda-delta/src/basic_rg/brgSubstitution.ml b/helm/software/lambda-delta/src/basic_rg/brgSubstitution.ml deleted file mode 100644 index 152b8c069..000000000 --- a/helm/software/lambda-delta/src/basic_rg/brgSubstitution.ml +++ /dev/null @@ -1,50 +0,0 @@ -(* - ||M|| This file is part of HELM, an Hypertextual, Electronic - ||A|| Library of Mathematics, developed at the Computer Science - ||T|| Department, University of Bologna, Italy. - ||I|| - ||T|| HELM is free software; you can redistribute it and/or - ||A|| modify it under the terms of the GNU General Public License - \ / version 2 or (at your option) any later version. - \ / This software is distributed as is, NO WARRANTY. - V_______________________________________________________________ *) - -module G = Options -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.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 (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 - | 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) - in - iter_term d - -let lift_map h _ a i = - if i + h >= 0 then B.LRef (a, i + h) else assert false - -let lift h d t = - if h = 0 then t else begin -(* - G.icm := succ !G.icm; - G.icm := icm !G.icm t; -*) - iter (lift_map h) d t - end