X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fsoftware%2Flambda-delta%2Fbasic_rg%2FbrgSubstitution.ml;h=5c9d91a8bdd14009ffb14b0c256ffe2dc480c95b;hb=2b1375e4b44e2ef351a6341a5bb0a4823e8daae5;hp=40859b2d5e54f75a97eb1a31f179f8e8bbc7e908;hpb=a22628e5de37d3ffe9de056d7683f2ebdf7226fb;p=helm.git diff --git a/helm/software/lambda-delta/basic_rg/brgSubstitution.ml b/helm/software/lambda-delta/basic_rg/brgSubstitution.ml index 40859b2d5..5c9d91a8b 100644 --- a/helm/software/lambda-delta/basic_rg/brgSubstitution.ml +++ b/helm/software/lambda-delta/basic_rg/brgSubstitution.ml @@ -10,6 +10,17 @@ V_______________________________________________________________ *) module B = Brg +(* module O = Output *) + +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 @@ -30,4 +41,6 @@ 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 iter (lift_map h) d t + if h = 0 then t else begin +(* O.icm := succ (* icm *) !O.icm (*t*); *) iter (lift_map h) d t + end