Repository navigation
Conversation
With rocq-prover/rocq#22789, canonical structure inference and unification treat all forms of a primitive projection alike, so that the records declared with #[primitive] can be used as the other ones: - the terms HB declares use folded primitive projections, as the ones elaborated by Rocq (fold-projections, applied in log.coq.env.add-const*); - clean-op-ty also rewrites operations used as primitive projections; - parametrized mixin-src clauses typecheck the mixin argument; - mixin-for, the non-forgetful inheritance check and HB.pack recognize a sort projection in its primitive form. Records are still non-primitive unless #[primitive] is given. Assisted by GenAI tools
Records are now primitive unless #[primitive=no] is given. tests/hnf: the parameter of the primitive projection f.y is printed as "_". Requires rocq-prover/rocq#22789. Assisted by GenAI tools
CohenCyril
marked this pull request as ready for review
December 4, 2026 08:01
CohenCyril
marked this pull request as draft
December 4, 2026 08:02
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.
Declare structures, mixins and factories as primitive records by default. Records are primitive unless
#[primitive=no]is given.Stacked on #612: the first commit is the one of #612; only the last commit is new here.
tests/hnf.v.outchanges because the parameter of the primitive projectionf.yis now printed as_.Do not merge yet: this is incompatible with the released versions of Rocq and rocq-elpi.
Projnode, application of its compatibility constant, projection on a reduction stack) as different terms. So the structures HB declares as primitive records would not behave as the current ones. That is why Support structures, mixins and factories declared as primitive records #612 keeps records non-primitive unless#[primitive]is given.As a result, this PR's CI on the docker images of Rocq 9.1, 9.2 and 9.3 is expected to fail. It can be merged once HB requires a Rocq version with rocq-prover/rocq#22789 and a rocq-elpi release with LPCIC/coq-elpi#1143.
The proof scripts that depended on the non-primitive records in math-comp (math-comp/math-comp#1691) and analysis (math-comp/analysis#2181) are already adapted and work with both.