-
Notifications
You must be signed in to change notification settings - Fork 718
Open
Labels
kind: bugAn error, flaw, fault or unintended behaviour.An error, flaw, fault or unintended behaviour.part: unificationThe unification mechanism.The unification mechanism.
Description
Description of the problem
I am writing (the beginning of) a library that is supposed to help make Rocq's primitive arrays more usable. I am using Rocq 9.1. I have run into situations where eapply fails with a unification error that involves universe levels, yet simple eapply succeeds.
I have asked for help in this Zulip thread. @Janno has been able to simplify my problem into this minimal example:
Require Import Corelib.Array.PrimArray.
Axiom P : forall A t i (a:A), get t i = a.
Axiom Q : forall A a i, @length@{length.u0} A a = i.
Lemma test : forall A a i, @length@{P.u0} A a = i.
Proof.
intros A a i.
Succeed refine (Q _ _ _).
Succeed simple eapply Q.
Fail eapply Q.
Constraint P.u0 = length.u0.
Succeed eapply Q.
Abort.Apparently eapply should introduce a universe constraint but does not (and fails). This seems to be a bug.
A separate question is whether primitive arrays should be universe-polymorphic.
Small Rocq / Coq file to reproduce the bug
Version of Rocq / Coq where this bug occurs
No response
Interface of Rocq / Coq where this bug occurs
No response
Last version of Rocq / Coq where the bug did not occur
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kind: bugAn error, flaw, fault or unintended behaviour.An error, flaw, fault or unintended behaviour.part: unificationThe unification mechanism.The unification mechanism.