Skip to content
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

Anomaly "File "kernel/constr.ml", line 1483, characters 28-34: Assertion failed." with sort poly #18339

Closed
SkySkimmer opened this issue Nov 20, 2023 · 1 comment · Fixed by #18340
Milestone

Comments

@SkySkimmer
Copy link
Contributor

  Inductive Box@{s|u|} (A:Type@{s|u}) := box (_:A).

  Definition t1@{s|u|} (A:Type@{s|u}) (x y : A) := box _ x.
  Definition t2@{s|u|} (A:Type@{s|u}) (x y : A) := box _ y.

  Definition ignore@{s|u|} {A:Type@{s|u}} (x:A) := tt.
  Definition unfold_ignore@{s|u|} (A:Type@{s|u}) : ignore (t1 A) = ignore (t2 A) := eq_refl.

The kernel first tries first conversion t1 A == t2 A so looks at the relevance of t1, it's a (bound) qvar so assert false in the kernel default_evar_handler.

@SkySkimmer
Copy link
Contributor Author

also

Set Universe Polymorphism.

Inductive Box (A:SProp) : Prop := box (_:A).
Arguments box {_} _.

Definition t1'@{s|u|} (A:Type@{s|u}) (x y : A) := x.
Definition t2'@{s|u|} (A:Type@{s|u}) (x y : A) := y.

Check fun A:SProp => eq_refl : box (t1' A) = box (t2' A).
(* fails with anomaly instead of succeeding *)

because we don't store the right relevance in constr_relevance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant