]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/cic_proof_checking/cicReductionMachine.ml
Universes introduction
[helm.git] / helm / ocaml / cic_proof_checking / cicReductionMachine.ml
index 4ef3ce9401fba300d6c1c366b663808682eec209..e963ddce9b5062a941a45ff2b6e3cf44c89b8707 100644 (file)
@@ -802,10 +802,17 @@ let are_convertible =
                   | _,None  -> true
                   | Some t1',Some t2' -> aux test_equality_only context t1' t2'
               ) true l1 l2
-        | (C.Sort s1, C.Sort s2) when
-             s1 = s2 || (not test_equality_only) && s2 = C.Type
-           -> true
-        | (C.Prod (name1,s1,t1), C.Prod(_,s2,t2)) ->
+         (* TASSI: CONSTRAINTS *)
+       | (C.Sort (C.Type t1), C.Sort (C.Type t2)) when test_equality_only ->
+           CicUniv.add_eq t2 t1
+         (* TASSI: CONSTRAINTS *)
+       | (C.Sort (C.Type t1), C.Sort (C.Type t2)) ->
+           CicUniv.add_ge t2 t1
+         (* TASSI: CONSTRAINTS *)
+       | (C.Sort s1, C.Sort (C.Type _)) -> not test_equality_only
+         (* TASSI: CONSTRAINTS *)
+        | (C.Sort s1, C.Sort s2) -> s1 = s2
+       | (C.Prod (name1,s1,t1), C.Prod(_,s2,t2)) ->
            aux true context s1 s2 &&
             aux test_equality_only ((Some (name1, (C.Decl s1)))::context) t1 t2
         | (C.Lambda (name1,s1,t1), C.Lambda(_,s2,t2)) ->