aboutsummaryrefslogtreecommitdiffhomepage
path: root/library/universes.ml
diff options
context:
space:
mode:
authorGravatar Matthieu Sozeau <mattam@mattam.org>2014-04-14 17:20:22 +0200
committerGravatar Matthieu Sozeau <mattam@mattam.org>2014-05-06 09:59:00 +0200
commitda88175778d6055d1ecf40c8f429cf855a4304cb (patch)
tree174c3039927f12b3404d9a5215bc91512200e634 /library/universes.ml
parent3869ffab2021b076054280f5eb4226ecda8caf75 (diff)
Avoid u+k <= v constraints, don't take the sup of an algebraic universe during
minimization.
Diffstat (limited to 'library/universes.ml')
-rw-r--r--library/universes.ml19
1 files changed, 11 insertions, 8 deletions
diff --git a/library/universes.ml b/library/universes.ml
index b0a610700..6799a99e5 100644
--- a/library/universes.ml
+++ b/library/universes.ml
@@ -463,16 +463,19 @@ exception Stays
let compute_lbound left =
(** The universe variable was not fixed yet.
Compute its level using its lower bound. *)
- if CList.is_empty left then None
- else
- let lbound = List.fold_left (fun lbound (d, l) ->
- if d == Le (* l <= ?u *) then (Universe.sup l lbound)
+ let sup l lbound =
+ match lbound with
+ | None -> Some l
+ | Some l' -> Some (Universe.sup l l')
+ in
+ List.fold_left (fun lbound (d, l) ->
+ if d == Le (* l <= ?u *) then sup l lbound
else (* l < ?u *)
(assert (d == Lt);
- (Universe.sup (Universe.super l) lbound)))
- Universe.type0m left
- in
- Some lbound
+ if not (Universe.level l == None) then
+ sup (Universe.super l) lbound
+ else None))
+ None left
let maybe_enforce_leq lbound u cstrs =
match lbound with