]> matita.cs.unibo.it Git - helm.git/commitdiff
subst_vars optimized for the explicit_named_subst=[] case (the most common
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 17 Jan 2006 16:49:04 +0000 (16:49 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 17 Jan 2006 16:49:04 +0000 (16:49 +0000)
one)

helm/ocaml/cic_proof_checking/cicSubstitution.ml

index 372c66fb8599d6d2178def9e77517ae9bd84d22f..a30a036cb42dc7726c1720906d706f903b0fcf30 100644 (file)
@@ -191,7 +191,7 @@ let subst arg =
 (*CSC: dovrebbe diventare da sinistra verso destra:                      *)
 (*CSC: t{a=a/A;b/a} ==> \H:a=a.H{b/a} ==> \H:b=b.H                       *)
 (*CSC: per la roba che proviene da Coq questo non serve!                 *)
-let subst_vars exp_named_subst =
+let subst_vars exp_named_subst =
 (*
 debug_print (lazy ("@@@POSSIBLE BUG: SUBSTITUTION IS NOT SIMULTANEOUS")) ;
 *)
@@ -344,7 +344,8 @@ if List.mem uri params then debug_print (lazy "---- OK2") ;
    List.map (function (uri,t) -> (uri,substaux k t)) exp_named_subst' @
     (filter_and_lift exp_named_subst)
  in
-  substaux 1
+  if exp_named_subst = [] then t
+  else substaux 1 t
 ;;
 
 (* subst_meta [t_1 ; ... ; t_n] t                                *)