diff options
-rw-r--r-- | library/universes.ml | 19 | ||||
-rw-r--r-- | tactics/tactics.ml | 3 |
2 files changed, 13 insertions, 9 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 diff --git a/tactics/tactics.ml b/tactics/tactics.ml index 0fbb511a7..2db58978d 100644 --- a/tactics/tactics.ml +++ b/tactics/tactics.ml @@ -435,7 +435,8 @@ let id_of_name_with_default id = function let hid = Id.of_string "H" let xid = Id.of_string "X" -let default_id_of_sort = function Prop _ -> hid | Type _ -> xid +let default_id_of_sort s = + if Sorts.is_small s then hid else xid let default_id env sigma = function | (name,None,t) -> |