aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/sphinx/addendum/micromega.rst2
-rw-r--r--kernel/uGraph.ml6
-rw-r--r--test-suite/bugs/closed/bug_12909.v8
3 files changed, 15 insertions, 1 deletions
diff --git a/doc/sphinx/addendum/micromega.rst b/doc/sphinx/addendum/micromega.rst
index d7e4c9c804..070e899c9d 100644
--- a/doc/sphinx/addendum/micromega.rst
+++ b/doc/sphinx/addendum/micromega.rst
@@ -180,7 +180,7 @@ are a way to take into account the discreteness of :math:`\mathbb{Z}` by roundin
Let :math:`p` be an integer and :math:`c` a rational constant. Then
:math:`p \ge c \rightarrow p \ge \lceil{c}\rceil`.
-For instance, from 2 x = 1 we can deduce
+For instance, from :math:`2 x = 1` we can deduce
+ :math:`x \ge 1/2` whose cut plane is :math:`x \ge \lceil{1/2}\rceil = 1`;
+ :math:`x \le 1/2` whose cut plane is :math:`x \le \lfloor{1/2}\rfloor = 0`.
diff --git a/kernel/uGraph.ml b/kernel/uGraph.ml
index 927db9e9e6..52e93a9e22 100644
--- a/kernel/uGraph.ml
+++ b/kernel/uGraph.ml
@@ -142,6 +142,12 @@ let enforce_leq_alg u v g =
| Inl x -> x
| Inr e -> raise e
+let enforce_leq_alg u v g =
+ match Universe.is_sprop u, Universe.is_sprop v with
+ | true, true -> Constraint.empty, g
+ | true, false | false, true -> raise (UniverseInconsistency (Le, u, v, None))
+ | false, false -> enforce_leq_alg u v g
+
(* sanity check wrapper *)
let enforce_leq_alg u v g =
let _,g as cg = enforce_leq_alg u v g in
diff --git a/test-suite/bugs/closed/bug_12909.v b/test-suite/bugs/closed/bug_12909.v
new file mode 100644
index 0000000000..fafb6a418f
--- /dev/null
+++ b/test-suite/bugs/closed/bug_12909.v
@@ -0,0 +1,8 @@
+Module Type T.
+Axiom A : Type.
+End T.
+
+Module M.
+ Axiom A : SProp.
+End M.
+Fail Module N <: T := M.