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
mattam82
marked this pull request as draft
December 4, 2026 10:55
mattam82
marked this pull request as ready for review
December 4, 2026 10:55
mattam82
marked this pull request as draft
December 4, 2026 17:47
mattam82
marked this pull request as ready for review
December 4, 2026 17:47
CohenCyril
marked this pull request as draft
December 4, 2026 21:15
CohenCyril
marked this pull request as ready for review
December 4, 2026 21:15
CohenCyril
marked this pull request as draft
December 4, 2026 21:19
CohenCyril
marked this pull request as ready for review
December 4, 2026 21:19
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.
Supersedes #610
Support structures, mixins and factories declared as primitive records. Records are still non-primitive unless #[primitive] is given; this makes the ones declared with it usable as the others:
the terms HB declares use folded primitive projections, like the ones elaborated by Rocq (fold-projections, applied in log.coq.env.add-const*) (unfolded projections come from applying a delta step to a folded one);
parametrized mixin-src clauses typecheck the mixin argument which is necessary to fill in the types of primitive projections;
mixin-for, the non-forgetful inheritance check and HB.pack recognize a sort projection in its primitive form and not only as a constant.
This is the overlay for rocq-prover/rocq#22789, which makes canonical structure inference and unification treat all forms of a primitive projection alike. It does not activate #[primitive] which would otherwise break compatibility.