]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/cic_acic/doubleTypeInference.ml
CProp hierarchy is there!
[helm.git] / helm / software / components / cic_acic / doubleTypeInference.ml
index 6fa7cce5ad03827939c836564b5b037da4646eb6..1671b98d25321ca6492f8565715ba99d5ddfedba 100644 (file)
@@ -608,15 +608,10 @@ let rec type_of_aux' subterms_to_types metasenv context t expectedty =
    let t1' = CicReduction.whd context t1 in
    let t2' = CicReduction.whd ((Some (name,C.Decl s))::context) t2 in
    match (t1', t2') with
-      (C.Sort _, C.Sort s2)
-        when (s2 = C.Prop or s2 = C.Set or s2 = C.CProp) -> 
-        (* different from Coq manual!!! *)
-         C.Sort s2
-    | (C.Sort (C.Type t1), C.Sort (C.Type t2)) -> 
-       C.Sort (C.Type (CicUniv.fresh()))
-    | (C.Sort _,C.Sort (C.Type t1)) -> 
-        (* TASSI: CONSRTAINTS: the same in cictypechecker,cicrefine *)
-       C.Sort (C.Type t1) (* c'e' bisogno di un fresh? *)
+    | (C.Sort _, C.Sort s2) when (s2 = C.Prop || s2 = C.Set) -> C.Sort s2
+    | (C.Sort (C.Type t1), C.Sort (C.Type t2)) ->C.Sort(C.Type(CicUniv.fresh()))
+    | (C.Sort _,C.Sort (C.Type t1)) -> C.Sort (C.Type t1)
+    | (C.Sort _,C.Sort (C.CProp t1)) -> C.Sort (C.CProp t1)
     | (C.Meta _, C.Sort _) -> t2'
     | (C.Meta _, (C.Meta (_,_) as t))
     | (C.Sort _, (C.Meta (_,_) as t)) when CicUtil.is_closed t ->