Keep track of which variables are section variables and use this info to fix bugs#21987
Open
SkySkimmer wants to merge 12 commits into
Open
Keep track of which variables are section variables and use this info to fix bugs#21987SkySkimmer wants to merge 12 commits into
SkySkimmer wants to merge 12 commits into
Conversation
b3a9eeb to
38aca30
Compare
38aca30 to
7551c70
Compare
Contributor
Author
|
hott failure is because they workaround #18858 by explcitly clearing |
Contributor
Author
|
@coqbot ci minimize ci-stdlib |
Alizter
added a commit
to HoTT/Coq-HoTT
that referenced
this pull request
May 19, 2026
Adapt to rocq-prover/rocq#21987 (destruct clears non section variable even when reusing a section variable's name)
Contributor
Note that there are proofs where you want to do |
SkySkimmer
added a commit
to SkySkimmer/Equations
that referenced
this pull request
May 20, 2026
SkySkimmer
added a commit
to SkySkimmer/Equations
that referenced
this pull request
May 20, 2026
SkySkimmer
added a commit
to SkySkimmer/coq-elpi
that referenced
this pull request
May 20, 2026
This lets us detect if a variable is some unrelated variable which got renamed to the name of a previously cleared section variable. It's also cheaper than conversion but that's not really the point of this patch. Fix rocq-prover#11487
This is accessible through Ltac2 Std.clear which doesn't check the ids before sending to Tactics.clear, and through ltac1 by abusing bound values eg `Ltac foo := match goal with H : _ |- _ => clear H; clear H end`
Termops.is_section_variable is deprecated and a new API Termops.is_section_variable' is added because their types are the same but they need different env arguments so changing in place would be too footgunny. ssr still uses the old "is it in global env" because IDK what it is doing. Fix rocq-prover#18858
when this invariant is broken secvar checking produces another assert failure later
caa8bff to
4175bc3
Compare
This was referenced May 20, 2026
Contributor
Author
|
@coqbot bench |
Contributor
Author
|
bug_4095 is failing because we push an already used name in Line 1821 in f018a77 IDK WTF is going on here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Named declarations now contain an extra field
status = SecVar | ProofVar. SecVar means it is a section variable.To work this requires the invariant that if a variable is marked SecVar in an evar's context then that evar is always instantiated with that section variable.
Fix #18858
Fix #12304
Fix #11487
Fix #6773
Overlays (.v):
Overlays (.ml):