Skip to content

If ; is not provided, then + applies both for qualities and univlevels - #22802

Closed
alex44119 wants to merge 1 commit into
rocq-prover:masterfrom
alex44119:meaning_univlevel_plus
Closed

alex44119 wants to merge 1 commit into
rocq-prover:masterfrom
alex44119:meaning_univlevel_plus

Conversation

@alex44119

@alex44119 alex44119 commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

During universe annotation or universe declaration, if no ; is provided, then the presence or absence of + applies to both qualities and universe levels. For example:

  • @{+} is equivalent to @{+;+}
  • @{} is equivalent to @{;}
  • @{u +} is equivalent to @{+;u +}

Changes made to the parsing of univ_annot, univ_decl, cumul_univ_decl and univ_name_list.

The grammar remains unchanged.

Tests and documentation

  • Updated test-suite. File success/extensive_univ_annot.v modified.
  • Documentation changed.
  • Test-suite runs without error.
  • Changes appended in changelog.
  • Added overlays.

@alex44119
alex44119 requested review from a team as code owners November 12, 2026 11:33
@coqbot-app coqbot-app Bot added the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label Nov 12, 2026
@alex44119
alex44119 force-pushed the meaning_univlevel_plus branch 2 times, most recently from d56277c to f6f44ed Compare November 12, 2026 11:38
@SkySkimmer SkySkimmer added the needs: discussion Further discussion is needed. label Nov 12, 2026
@mattam82 mattam82 self-assigned this Dec 3, 2026

@mattam82 mattam82 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appart from the spaces, the implementation is simple and the test-suite file seems to cover every case.

From Corelib Require Import Array.PrimArray.

#[universes(polymorphic=no)]Universe a b.
#[universes(polymorphic=no)]Universe a b.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spaces here seem spurious.

@mattam82

mattam82 commented Dec 3, 2026

Copy link
Copy Markdown
Member

It needs a small changelog entry

@mattam82

mattam82 commented Dec 3, 2026

Copy link
Copy Markdown
Member

@coqbot run full ci

@coqbot-app coqbot-app Bot removed the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label Dec 3, 2026

@SkySkimmer SkySkimmer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is not clear to me that we actually want this

@mattam82

mattam82 commented Dec 4, 2026

Copy link
Copy Markdown
Member

You don't like the syntactic sugar?

@mattam82

mattam82 commented Dec 4, 2026

Copy link
Copy Markdown
Member

Do you think it's misleading somehow?

@alex44119
alex44119 requested review from a team as code owners December 4, 2026 13:11
@SkySkimmer
SkySkimmer removed request for a team December 4, 2026 13:16
@alex44119
alex44119 force-pushed the meaning_univlevel_plus branch from f1a75cc to 041ec58 Compare December 4, 2026 15:22
… `cumul_univ_decl` and `univ_name_list`

Co-authored-by: Yann Leray <yann.leray@inria.fr>
@alex44119
alex44119 force-pushed the meaning_univlevel_plus branch from 041ec58 to 5debac9 Compare December 4, 2026 15:27
@alex44119

alex44119 commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor Author

I removed the spaces I fixed test-suite and I added a changelog.

I don't know if the + symbol also applies to the constraints when no | is provided.

PS: Sorry for the requested review from a team as code owners I think it was a missclick

@SkySkimmer

Copy link
Copy Markdown
Contributor

In particular "@{u +} is equivalent to @{+;u +}" looks wrong to me.

@SkySkimmer

Copy link
Copy Markdown
Contributor

and @{+} is pretty useless if it's equivalent to no annotation

@alex44119

alex44119 commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor Author

Yes I agree with you @SkySkimmer, I made this PR because I found it useful in the moment, but after having used sort-polymorphism for a moment, I have to admit I have never felt the need for it.

Should I draft the PR in case we change (again) our minds ?

@SkySkimmer

Copy link
Copy Markdown
Contributor

Let's just close

@SkySkimmer SkySkimmer closed this Dec 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs: discussion Further discussion is needed. needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants