X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FgTopLevel%2FproofEngineReduction.ml;h=9771b7d821d023e861144e34b71234739d9feb8f;hb=cbf6c7edd81459a9f22a5a8b5377b4f53297fd60;hp=52f07e4dc2411d8b8aa63a75fcb290c3ebefe044;hpb=5b2c666a48028daeba3fe6692e6ad3e14cad0a42;p=helm.git diff --git a/helm/gTopLevel/proofEngineReduction.ml b/helm/gTopLevel/proofEngineReduction.ml index 52f07e4dc..9771b7d82 100644 --- a/helm/gTopLevel/proofEngineReduction.ml +++ b/helm/gTopLevel/proofEngineReduction.ml @@ -59,7 +59,11 @@ let replace ~what ~with_what ~where = | C.Prod (n,s,t) -> C.Prod (n, aux s, aux t) | C.Lambda (n,s,t) -> C.Lambda (n, aux s, aux t) | C.LetIn (n,s,t) -> C.LetIn (n, aux s, aux t) - | C.Appl l -> C.Appl (List.map aux l) + | C.Appl l -> + (* Invariant enforced: no application of an application *) + (match List.map aux l with + (C.Appl l')::tl -> C.Appl (l'@tl) + | l' -> C.Appl l') | C.Const _ as t -> t | C.Abst _ as t -> t | C.MutInd _ as t -> t