Skip to content

[release] 9.3 backports#22247

Draft
gares wants to merge 33 commits into
rocq-prover:v9.3from
gares:9.3-backports
Draft

[release] 9.3 backports#22247
gares wants to merge 33 commits into
rocq-prover:v9.3from
gares:9.3-backports

Conversation

@gares

@gares gares commented Jul 9, 2026

Copy link
Copy Markdown
Member

No description provided.

@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 Jul 9, 2026
@gares gares changed the title 9.3 backports [release] 9.3 backports Jul 9, 2026
@gares

gares commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

@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 Jul 9, 2026
shilangyu and others added 21 commits July 10, 2026 13:10
This makes it easier to track what values we store for each object kind.

(cherry picked from commit 9f730cc)
(cherry picked from commit bb20170)
(cherry picked from commit 02a9f7a)
This makes sure to avoid conflicts with SUB which works only whenever there are two consecutive underscores. But in return things like `setoid_rewrite` will be seen as a single token (as it should).

(cherry picked from commit 2a6c43f)
(cherry picked from commit a511e40)
…schemes

The scheme builders in tactics/eqschemes.ml (Scheme Rewriting and the
congr scheme) substituted the default template levels (e.g. eq.u0) into
the contexts copied from the inductive declaration, so the types of
eq_sym, eq_sym_involutive and eq_rew_r_dep mentioned Type@{eq.u0}.
Using these constants at any fresh universe would then constrain the
global template universe, which is flagged by bad-template-constraint;
with Set Warnings "+bad-template-constraint", even eta-expanding
eq_sym failed:

    Check (fun x => @eq_sym x).
    (* Error: Adding constraints involving global template univs:
       test.22 <= eq.u0 *)

Instead, instantiate the template context with fresh levels declared as
universes of the scheme: eq_sym now gets its own eq_sym.u0, consistent
with eq_ind/eq_rect (whose generation already goes through the standard
case-analysis machinery) and with what a manually stated lemma gets.

Since the schemes of a family no longer share their universes,
hand-computed context sets would miss cross-scheme constraints (the
l2r rewriting scheme applies sym at the fresh universes, requiring
fresh <= sym.u0). Rather than computing those by hand, type-check the
built terms once with Typing.type_of and declare the resulting ustate.
Without this, the kernel rejection was silently swallowed by the
ignore_error in declare_rewriting_schemes, making eq_rew_r_dep vanish.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019ttctspSoVoquHLQtbPVZw
(cherry picked from commit 2829830)
Address review: instead of re-typechecking the hand-built schemes with
Typing.type_of to recover the universe constraints missing from the
hand-computed context sets, compute them explicitly.  Since the
schemes of an inductive type no longer share the universes standing
for its template universes, the builders that apply a previously
declared scheme (sym_involutive and l2r_rew, via const_of_scheme) must
enforce the sorts of the parameters of the scheme being built to fit
in the sorts of the corresponding binders of the applied constant,
e.g. eq_rew_r_dep.u0 <= eq_sym.u0.  These constraints were previously
invisible because all schemes shared the default template levels
(eq.u0 <= eq.u0).  The other builders' context sets are
self-contained: in particular, applications of template inductives
(the inductive itself, and eq) need no constraints since the kernel
instantiates them at application time; bugs/bug_22220.v now also
tests this with a Type-sorted equality.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019ttctspSoVoquHLQtbPVZw
(cherry picked from commit c93c0b4)
…schemes their own universes instead of the template defaults
The "_pos" fields are accurate even when running with positions disabled.

(cherry picked from commit 970c226)
This requires rereading the file to get line number counts.

(cherry picked from commit 9ae0258)
(cherry picked from commit 7192787)
It's not fully ideal as we print `if _ is $ctor` with the ctor name
instead of any notation and without any needed hole arguments but
better than nothing IMO.

(cherry picked from commit 68ff0a7)
@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 Jul 10, 2026
@gares

gares commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

@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 Jul 10, 2026
@gares

gares commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

@coqbot run full ci

@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 Jul 14, 2026
@gares

gares commented Jul 14, 2026

Copy link
Copy Markdown
Member Author

@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 Jul 14, 2026
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.

5 participants