diff options
author | Matthieu Sozeau <mattam@mattam.org> | 2015-10-14 18:18:01 +0200 |
---|---|---|
committer | Matthieu Sozeau <mattam@mattam.org> | 2015-10-14 18:18:01 +0200 |
commit | bf0499bc507d5a39c3d5e3bf1f69191339270729 (patch) | |
tree | 8773229c69d01878b1407337f5a4ddc3c0af5572 | |
parent | 26af31cb46c7baf92325dd22bf6ee33aaa2172d2 (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...
-rw-r--r-- | proofs/proof_global.ml | 7 |
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 |