-
Notifications
You must be signed in to change notification settings - Fork 632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply the early check of the universe declaration and the monomorphic universe fixing to all interactive declarations #18960
base: master
Are you sure you want to change the base?
Conversation
8e573bc
to
330d02f
Compare
330d02f
to
4e12d77
Compare
4e12d77
to
1d98f3a
Compare
1d98f3a
to
63cb197
Compare
63cb197
to
e9f0806
Compare
In two cases, let check_univ_decl_early ~poly sigma udecl terms =
let vars = List.fold_left (fun acc b -> Univ.Level.Set.union acc (Vars.universes_of_constr b)) Univ.Level.Set.empty terms in
let uctx = Evd.evar_universe_context sigma in
let uctx = UState.collapse_sort_variables uctx in
let uctx = UState.restrict uctx vars in
UState.check_univ_decl ~poly uctx udecl But in |
The examples probably just don't generate free qvars. |
I'm asking because I found sometimes free qsort in the absence of minimization. Now, I also realize that |
e9f0806
to
1774b5c
Compare
1774b5c
to
12fbfa9
Compare
Finally, I used collapse_sort_variable since I saw it is already called by minimization and that, since the result is thrown away after checking, an (a priori) faster function is better. |
… proofs. Initially, this was only for "Theorem"-like statements. With the PR, it is also for interactive Co/Fixpoint and Definition. We also add in all cases a fix_undefined_universes (it is told to be needed for asynchronous evaluation).
12fbfa9
to
959ce8a
Compare
Formerly, the early check (at
Definition
time) of the universe declaration and the monomorphic universe fixing (for asynchronous evaluation) were done only forTheorem
andDefinition
without body (inpost_check_evd
). We do it also for interactive [Co
]Fixpoint
and forProgram Fixpoint
andProgram Definition
.To anticipate what is done when proofs are completed, we apply
UState.collapse_sort_variables
andUState.restrict
in some cases (this is needed for the test-suite to pass). But maybe should these be applied in all four cases, together withUState.normalize_variables
andUState.minimize
, as done at the end of proofs in general???This gives an alternative solution to #15410 which allows to remove the forbidding for extensible universes introduced in #15424.
This remark at #15410 still hold though: "non extensible universe declarations don't make a lot of sense in universe monomorphic definitions", so maybe it can also be a failure.
Depends on #18915 (merged)