aboutsummaryrefslogtreecommitdiffhomepage
path: root/proofs/proof_global.ml
diff options
context:
space:
mode:
authorGravatar Matthieu Sozeau <mattam@mattam.org>2015-10-14 18:18:01 +0200
committerGravatar Matthieu Sozeau <mattam@mattam.org>2015-10-14 18:18:01 +0200
commitbf0499bc507d5a39c3d5e3bf1f69191339270729 (patch)
tree8773229c69d01878b1407337f5a4ddc3c0af5572 /proofs/proof_global.ml
parent26af31cb46c7baf92325dd22bf6ee33aaa2172d2 (diff)
Fix LemmaOverloading
Do not normalize the type of a proof according to the final universes when keep_body_ucst_separate is true, otherwise the type might not be retypable in the initial context...
Diffstat (limited to 'proofs/proof_global.ml')
-rw-r--r--proofs/proof_global.ml7
1 files changed, 6 insertions, 1 deletions
diff --git a/proofs/proof_global.ml b/proofs/proof_global.ml
index 3e06294e6..a0ead42ef 100644
--- a/proofs/proof_global.ml
+++ b/proofs/proof_global.ml
@@ -313,7 +313,12 @@ let close_proof ~keep_body_ucst_separate ?feedback_id ~now fpl =
if poly || now then
let make_body t (c, eff) =
let open Universes in
- let body = c and typ = nf t in
+ let body = c in
+ let typ =
+ if not (keep_body_ucst_separate || not (Declareops.side_effects_is_empty eff)) then
+ nf t
+ else t
+ in
let used_univs_body = Universes.universes_of_constr body in
let used_univs_typ = Universes.universes_of_constr typ in
if keep_body_ucst_separate || not (Declareops.side_effects_is_empty eff) then