Skip to content

Do not redeclare universes. - #751

Merged
ppedrot merged 2 commits into
rocq-prover:mainfrom
ppedrot:no-univ-redeclare
Nov 14, 2026
Merged

ppedrot merged 2 commits into
rocq-prover:mainfrom
ppedrot:no-univ-redeclare

Conversation

@ppedrot

@ppedrot ppedrot commented Nov 13, 2026

Copy link
Copy Markdown
Member

Overlay for rocq-prover/rocq#22795, which makes universe redeclaration an error.

  • declare_constant returned an evar map in which the universes it had just declared were still local (monomorphic case), so the next declaration from it (e.g. in Derive Signature) redeclared them.
  • The program definition hook is called with an evar map whose universes may already have been declared by the obligation machinery; we now demote those that are already global.

This is backwards compatible.

🤖 Generated with Claude Code

ppedrot and others added 2 commits November 13, 2026 10:05
In the monomorphic case, declare_constant returned an evar map where the
universes it just declared were still local, so a subsequent declaration
from that evar map would declare them again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The hook is called with an evar map whose universes may already have been
declared globally by the obligation machinery, so we demote them first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ppedrot
ppedrot merged commit 2538ee8 into rocq-prover:main Nov 14, 2026
16 checks passed
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 this pull request may close these issues.

1 participant