X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=inline;f=helm%2Fsoftware%2Fcomponents%2Fng_kernel%2FnCicTypeChecker.ml;h=4b00edd05b2878ccea79ea6712540c2cfaf7db2a;hb=fcdc755773839176c7206b579b6dd1ff665ed8f5;hp=690cd59005f8334a9789b58d4e019102cd64786f;hpb=3ddad84e0daa6e9552168f7a8ecb101e23c33476;p=helm.git diff --git a/helm/software/components/ng_kernel/nCicTypeChecker.ml b/helm/software/components/ng_kernel/nCicTypeChecker.ml index 690cd5900..4b00edd05 100644 --- a/helm/software/components/ng_kernel/nCicTypeChecker.ml +++ b/helm/software/components/ng_kernel/nCicTypeChecker.ml @@ -1013,17 +1013,12 @@ and split_prods ~subst context n te = and is_really_smaller ~subst ~metasenv (context, recfuns, x, safes as k) te = match R.whd ~subst context te with | C.Rel m when List.mem m safes -> true - | C.Rel _ -> false - | C.LetIn _ -> raise (AssertFailure (lazy "letin after whd")) - | C.Sort _ | C.Implicit _ | C.Prod _ | C.Lambda _ - | C.Const (Ref.Ref (_,_,(Ref.Decl | Ref.Def | Ref.Ind _ | Ref.CoFix _))) -> - raise (AssertFailure (lazy "not a constructor")) - | C.Appl ([]|[_]) -> raise (AssertFailure (lazy "empty/unary appl")) + | C.Lambda (name, s, t) -> + is_really_smaller ~subst ~metasenv (shift_k (name, C.Decl s) k) t | C.Appl (he::_) -> - (*CSC: sulla coda ci vogliono dei controlli? secondo noi no, ma *) - (*CSC: solo perche' non abbiamo trovato controesempi *) - (*TASSI: da capire soprattutto se he è un altro fix che non ha ridotto...*) - is_really_smaller ~subst ~metasenv k he + is_really_smaller ~subst ~metasenv k he + | C.Appl _ + | C.Rel _ | C.Const (Ref.Ref (_,_,Ref.Con _)) -> false | C.Const (Ref.Ref (_,_,Ref.Fix _)) -> assert false (*| C.Fix (_, fl) -> @@ -1044,9 +1039,7 @@ and is_really_smaller ~subst ~metasenv (context, recfuns, x, safes as k) te = is_really_smaller ~subst (tys@context) n_plus_len nn_plus_len kl x_plus_len safes' bo ) fl true*) - | C.Meta _ -> - true (* XXX if this check is repeated when the user completes the - definition *) + | C.Meta _ -> true | C.Match (Ref.Ref (_,uri,_) as ref,outtype,term,pl) -> (match term with | C.Rel m | C.Appl (C.Rel m :: _ ) when List.mem m safes || m = x -> @@ -1062,6 +1055,7 @@ and is_really_smaller ~subst ~metasenv (context, recfuns, x, safes as k) te = is_really_smaller ~subst ~metasenv k e) pl cl | _ -> List.for_all (is_really_smaller ~subst ~metasenv k) pl) + | _ -> assert false and returns_a_coinductive ~subst context ty = match R.whd ~subst context ty with