diff options
author | Matthieu Sozeau <mattam@mattam.org> | 2016-05-09 18:31:01 +0200 |
---|---|---|
committer | Matthieu Sozeau <mattam@mattam.org> | 2016-07-04 15:55:12 +0200 |
commit | 71d4c435e42c24c21ae43f0ddcc7a71bee1009f5 (patch) | |
tree | e59d18f6e134deb95f2a1b4e00c21ae287784e15 /pretyping | |
parent | ee8009e05d3e782ee6333d0054ee2fce5cda89a4 (diff) |
congruence: Restrict refreshing to Set
Because refreshing Prop is not semantics-preserving,
the new universe is >= Set, so cannot be minimized to Prop
afterwards.
Diffstat (limited to 'pretyping')
-rw-r--r-- | pretyping/evarsolve.ml | 4 | ||||
-rw-r--r-- | pretyping/evarsolve.mli | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/pretyping/evarsolve.ml b/pretyping/evarsolve.ml index c2d47790d..0db309f94 100644 --- a/pretyping/evarsolve.ml +++ b/pretyping/evarsolve.ml @@ -47,7 +47,7 @@ let refresh_level evd s = | None -> true | Some l -> not (Evd.is_flexible_level evd l) -let refresh_universes ?(status=univ_rigid) ?(onlyalg=false) ?(propset=false) +let refresh_universes ?(status=univ_rigid) ?(onlyalg=false) ?(refreshset=false) pbty env evd t = let evdref = ref evd in let modified = ref false in @@ -63,7 +63,7 @@ let refresh_universes ?(status=univ_rigid) ?(onlyalg=false) ?(propset=false) else set_leq_sort env !evdref s s' in modified := true; evdref := evd; mkSort s' - | Sort (Prop _ as s) when propset && not dir -> + | Sort (Prop Pos as s) when refreshset && not dir -> let s' = evd_comb0 (new_sort_variable status) evdref in let evd = set_leq_sort env !evdref s s' in modified := true; evdref := evd; mkSort s' diff --git a/pretyping/evarsolve.mli b/pretyping/evarsolve.mli index 9ee815ebc..f94c83b6d 100644 --- a/pretyping/evarsolve.mli +++ b/pretyping/evarsolve.mli @@ -37,7 +37,7 @@ val evar_define : conv_fun -> ?choose:bool -> env -> evar_map -> val refresh_universes : ?status:Evd.rigid -> ?onlyalg:bool (* Only algebraic universes *) -> - ?propset:bool -> + ?refreshset:bool -> (* Also refresh Prop and Set universes, so that the returned type can be any supertype of the original type *) bool option (* direction: true for levels lower than the existing levels *) -> |