diff options
| author | Matthieu Sozeau | 2015-09-30 18:33:27 +0200 |
|---|---|---|
| committer | Matthieu Sozeau | 2015-10-02 15:54:12 +0200 |
| commit | b8a85b65432a974d6a6f1fe5165e05d7196c9321 (patch) | |
| tree | 50e9bc9152e258c0dc42d3c8f7c85cd0e5cba2dc | |
| parent | 62e6f7e37512e523eafe65e6a58369361e74d4d5 (diff) | |
Univs: fix semantics of Type in proof mode in universe-polymorphic mode
Allowing universes to be instantiated if the body of the proof
requires it (the levels stay flexible). Not allowed for non-polymorphic
cases, to be compatible with the stm's invariant that the type should
not change.
| -rw-r--r-- | stm/lemmas.ml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/stm/lemmas.ml b/stm/lemmas.ml index 16444fda05..5cbe152b55 100644 --- a/stm/lemmas.ml +++ b/stm/lemmas.ml @@ -449,8 +449,12 @@ let start_proof_com kind thms hook = let recguard,thms,snl = look_for_possibly_mutual_statements thms in let evd, nf = Evarutil.nf_evars_and_universes !evdref in let thms = List.map (fun (n, (t, info)) -> (n, (nf t, info))) thms in - start_proof_with_initialization kind (Evd.fix_undefined_variables evd) - recguard thms snl hook + let evd = + if pi2 kind then evd + else (* We fix the variables to ensure they won't be lowered to Set *) + Evd.fix_undefined_variables evd + in + start_proof_with_initialization kind evd recguard thms snl hook (* Saving a proof *) |
