X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fcomponents%2Fng_refiner%2FnCicUnification.ml;h=7d8a45d0e6d9b660ca9f618e7dc25e7b3e858a24;hb=df0dc72bccac82b3dd69108b5996d7008d007601;hp=6dfa7afee01c328cdbfa01d0e314fabee8d070f4;hpb=6120c5ba6c24eeeb2f932ba7e247a751c4216134;p=helm.git diff --git a/matita/components/ng_refiner/nCicUnification.ml b/matita/components/ng_refiner/nCicUnification.ml index 6dfa7afee..7d8a45d0e 100644 --- a/matita/components/ng_refiner/nCicUnification.ml +++ b/matita/components/ng_refiner/nCicUnification.ml @@ -140,7 +140,7 @@ let rec could_reduce status ~subst context = | C.Appl (C.Const (Ref.Ref (_,Ref.Fix (_,recno,_)))::args) when List.length args > recno -> let t = NCicReduction.whd status ~subst context (List.nth args recno) in - could_reduce status subst context t + could_reduce status ~subst context t | C.Match (_,_,he,_) -> let he = NCicReduction.whd status ~subst context he in could_reduce status ~subst context he @@ -233,6 +233,31 @@ let rec sortfy status exc metasenv subst context t = in metasenv,subst,t +let indfy status exc metasenv subst context t = + let t = NCicReduction.whd status ~subst context t in + let metasenv,subst = + match t with + | NCic.Const (Ref.Ref (_, Ref.Ind _)) + | NCic.Appl (NCic.Const (Ref.Ref (_, Ref.Ind _))::_) -> metasenv, subst +(* + | NCic.Meta (n,_) -> + let attrs, context, ty = NCicUtils.lookup_meta n metasenv in + let kind = NCicUntrusted.kind_of_meta attrs in + if kind = `IsSort then + metasenv,subst + else + (match ty with + | NCic.Implicit (`Typeof _) -> + metasenv_to_subst n (`IsSort,[],ty) metasenv subst + | ty -> + let metasenv,subst,ty = sortfy status exc metasenv subst context ty in + metasenv_to_subst n (`IsSort,[],ty) metasenv subst) +*) + | NCic.Implicit _ -> assert false + | _ -> raise exc + in + metasenv,subst,t + let tipify status exc metasenv subst context t ty = let is_type attrs = match NCicUntrusted.kind_of_meta attrs with