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
Spurious universe inconsistencies in Coq 8.19 with abstracted proofs. #18636
Comments
Here is a reduced testcase. Polymorphic Axiom array@{u} : Type@{u} -> Type@{u}.
Polymorphic Axiom get : forall {A} (t : array A), A.
Lemma foo (t: array nat): True.
Proof.
assert True by abstract exact I.
assert (v := get t).
abstract exact I. (* Universe inconsistency. Cannot enforce Top.5 = Set because Set < Top.5. *)
Qed. |
Probably a side-effect of #17745, cc @SkySkimmer |
The reason the first abstract changes the behaviour is that it changes which branch we take in Line 1826 in 3d86c1d
Why we have this code is not clear but removing it (so it becomes just coq/test-suite/success/rewrite.v Line 50 in 3d86c1d
In any case with this code and fea5fcc (indeed from #17745) we use an unminimized initial_euctx which has I guess short term we should revert fea5fcc and long term we should look into not checking is_empty_private_constants. |
Fixed by reverting fea5fcc The reason the first abstract changes the behaviour is that it changes which branch we take in https://github.com/coq/coq/blob/3d86c1d4569b0a25a00677833b9f47c3059a8345/vernac/declare.ml#L1826 Why we have this code is not clear but removing it (so it becomes just `if not poly && keep_body_ucst_separate`) causes undefined universe anomaly at https://github.com/coq/coq/blob/3d86c1d4569b0a25a00677833b9f47c3059a8345/test-suite/success/rewrite.v#L50 In any case with this code and fea5fcc (indeed from coq#17745) we use an unminimized initial_euctx which has `{foo.5} |= Set = foo.5` which is added to the global env (we are in univ monomorphic mode), and since monomorphic universes are declared `> Set` we get the error. I guess short term we should revert fea5fcc and long term we should look into not checking is_empty_private_constants.
revert at #18640 |
Fixed by reverting fea5fcc The reason the first abstract changes the behaviour is that it changes which branch we take in https://github.com/coq/coq/blob/3d86c1d4569b0a25a00677833b9f47c3059a8345/vernac/declare.ml#L1826 Why we have this code is not clear but removing it (so it becomes just `if not poly && keep_body_ucst_separate`) causes undefined universe anomaly at https://github.com/coq/coq/blob/3d86c1d4569b0a25a00677833b9f47c3059a8345/test-suite/success/rewrite.v#L50 In any case with this code and fea5fcc (indeed from coq#17745) we use an unminimized initial_euctx which has `{foo.5} |= Set = foo.5` which is added to the global env (we are in univ monomorphic mode), and since monomorphic universes are declared `> Set` we get the error. I guess short term we should revert fea5fcc and long term we should look into not checking is_empty_private_constants.
Fixed by reverting fea5fcc The reason the first abstract changes the behaviour is that it changes which branch we take in https://github.com/coq/coq/blob/3d86c1d4569b0a25a00677833b9f47c3059a8345/vernac/declare.ml#L1826 Why we have this code is not clear but removing it (so it becomes just `if not poly && keep_body_ucst_separate`) causes undefined universe anomaly at https://github.com/coq/coq/blob/3d86c1d4569b0a25a00677833b9f47c3059a8345/test-suite/success/rewrite.v#L50 In any case with this code and fea5fcc (indeed from coq#17745) we use an unminimized initial_euctx which has `{foo.5} |= Set = foo.5` which is added to the global env (we are in univ monomorphic mode), and since monomorphic universes are declared `> Set` we get the error. I guess short term we should revert fea5fcc and long term we should look into not checking is_empty_private_constants.
Fixed by reverting fea5fcc The reason the first abstract changes the behaviour is that it changes which branch we take in https://github.com/coq/coq/blob/3d86c1d4569b0a25a00677833b9f47c3059a8345/vernac/declare.ml#L1826 Why we have this code is not clear but removing it (so it becomes just `if not poly && keep_body_ucst_separate`) causes undefined universe anomaly at https://github.com/coq/coq/blob/3d86c1d4569b0a25a00677833b9f47c3059a8345/test-suite/success/rewrite.v#L50 In any case with this code and fea5fcc (indeed from coq#17745) we use an unminimized initial_euctx which has `{foo.5} |= Set = foo.5` which is added to the global env (we are in univ monomorphic mode), and since monomorphic universes are declared `> Set` we get the error. I guess short term we should revert fea5fcc and long term we should look into not checking is_empty_private_constants. (cherry picked from commit 14685d5)
Fixed by reverting fea5fcc The reason the first abstract changes the behaviour is that it changes which branch we take in https://github.com/coq/coq/blob/3d86c1d4569b0a25a00677833b9f47c3059a8345/vernac/declare.ml#L1826 Why we have this code is not clear but removing it (so it becomes just `if not poly && keep_body_ucst_separate`) causes undefined universe anomaly at https://github.com/coq/coq/blob/3d86c1d4569b0a25a00677833b9f47c3059a8345/test-suite/success/rewrite.v#L50 In any case with this code and fea5fcc (indeed from coq#17745) we use an unminimized initial_euctx which has `{foo.5} |= Set = foo.5` which is added to the global env (we are in univ monomorphic mode), and since monomorphic universes are declared `> Set` we get the error. I guess short term we should revert fea5fcc and long term we should look into not checking is_empty_private_constants.
Some of my large proofs break in Coq 8.19. Inserting the following command at the failure point
gives
Forcefully ending the proof with
apply FALSE. Qed.
succeeds without triggering an universe inconsistency. So, the inconsistency does not seem to be present in the current proof term, but instead to be in the proof term created byabstract
(or in its application to the current goal).Unfortunately, I do not have a small reproducer. (This can be triggered by compiling the
master
branch of CoqInterval.)The text was updated successfully, but these errors were encountered: