]> matita.cs.unibo.it Git - helm.git/blobdiff - components/cic_proof_checking/freshNamesGenerator.ml
a. uniform mangement for context and library
[helm.git] / components / cic_proof_checking / freshNamesGenerator.ml
index 99c9e4d76c9d93f51e070fce5aca31487c6099af..1edb35b0420656b16f728623aadfd9f4d7e29098 100755 (executable)
@@ -60,8 +60,10 @@ let rec guess_a_name context ty =
   | Cic.Implicit _ -> assert false
   | Cic.Cast (t1,t2) -> guess_a_name context t1
   | Cic.Prod (na_,_,t) -> higher_name 1 t
-  | Cic.Lambda _ -> assert false                   
-  | Cic.LetIn (_,s,t) -> guess_a_name context (CicSubstitution.subst s t)
+(* warning: on appl we should beta reduce before the recursive call
+  | Cic.Lambda _ -> assert false   
+*)
+  | Cic.LetIn (_,s,t) -> guess_a_name context (CicSubstitution.subst ~avoid_beta_redexes:true s t)
   | Cic.Appl [] -> assert false
   | Cic.Appl (he::_) -> guess_a_name context he 
   | Cic.Const (uri,_)