Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion test-suite/bugs/bug_18951.v
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ Proof.
Fail Admitted. (* Has still evars *)
Unshelve.
3:exact nat.
Admitted.
Fail Admitted.
Abort.
7 changes: 7 additions & 0 deletions test-suite/bugs/bug_19566.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

Universes u v.
Lemma foo : Type@{v}.
exact Type@{u}.
Comment thread
SkySkimmer marked this conversation as resolved.
Admitted.

Check Type@{v} : Type@{u}.
13 changes: 4 additions & 9 deletions vernac/declare.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2246,7 +2246,7 @@ let check_type_evars_solved env sigma typ =
let evars = Evar.Set.elements (Evarutil.undefined_evars_of_term sigma typ) in
match evars with
| [] -> ()
| evk::_ -> CErrors.user_err (str "Cannot admit: the statement has still unresolved existential variables.")
| evk::_ -> CErrors.user_err (str "Cannot admit: the statement has unresolved existential variables.")

let finish_admitted ~pm ~pinfo ~uctx ~sec_vars typs =
(* If the constant was an obligation we need to update the program map *)
Expand All @@ -2261,17 +2261,12 @@ let finish_admitted ~pm ~pinfo ~uctx ~sec_vars typs =
pm

let save_admitted ~pm ~proof =
let Proof.{ entry; sigma } = Proof.data (get proof) in
let typs = List.map pi3 (Proofview.initial_goals entry) in
List.iter (check_type_evars_solved (Global.env()) sigma) typs;
let iproof = get proof in
let Proof.{ entry } = Proof.data iproof in
let typs = List.map pi3 (Proofview.initial_goals entry) in
let sigma = Evd.from_ctx proof.initial_euctx in
List.iter (check_type_evars_solved (Global.env()) sigma) typs;
let sec_vars = compute_proof_using_for_admitted proof.pinfo proof typs iproof in
(* We have the choice of taking CInfo.typ and initial_euctx or or
the typs and uctx from the type. By uniformity we would like to
do the same as in save_lemma_admitted_delayed, but we would need
for that that fixpoints are represented with multi-statements; so
we take the initial types *)
let sigma = Evd.minimize_universes sigma in
let typs = List.map (EConstr.to_constr sigma) typs in
let uctx = Evd.ustate sigma in
Expand Down