Open
Conversation
CohenCyril
commented
Mar 2, 2026
7f1dfca to
3986afe
Compare
Member
Author
|
All good, I can compile |
affeldt-aist
approved these changes
Mar 3, 2026
Member
affeldt-aist
left a comment
There was a problem hiding this comment.
This is great! And I know that I am asking too much, but, since the Elpi code is so short, would it be possible to have a few lines of prose commentary? I'm sure readers more literate than me could make a good use of it. 🐱
CohenCyril
commented
Mar 3, 2026
Comment on lines
+595
to
+627
| (* We provide local notations for parsing and printing of particular *) | ||
| (* instances of generic notations. *) | ||
| Local Notation add_parsingde := (@GRing.add (\bar^d _)). | ||
| Local Notation add_rcde := (@GRing.add (@reverse_coercion _ _ _ (\bar^d _))). | ||
| Local Notation add_cande := (@GRing.add dual_extended_nmodType). | ||
| Local Notation add_parsinge := (@GRing.add (\bar _)). | ||
| Local Notation add_rce := (@GRing.add (@reverse_coercion _ _ _ (\bar _))). | ||
| Local Notation add_cane := (@GRing.add extended_nmodType). | ||
|
|
||
| Notation "+%dE" := add_parsingde (only parsing). | ||
| Notation "+%dE" := add_rcde (only printing). | ||
| Notation "+%dE" := add_cande (only printing). | ||
| Notation "+%E" := add_parsinge (only parsing). | ||
| Notation "+%E" := add_rce (only printing). | ||
| Notation "+%E" := add_cane (only printing). | ||
| Notation "-%E" := oppe. | ||
| Notation "x + y" := (add_parsingde x%dE y%dE) (only parsing) : ereal_dual_scope. | ||
| Notation "x + y" := (add_rcde x%dE y%dE) (only printing) : ereal_dual_scope. | ||
| Notation "x + y" := (add_cande x%dE y%dE) (only printing) : ereal_dual_scope. | ||
| Notation "x + y" := (add_parsinge x%E y%E) (only parsing) : ereal_scope. | ||
| Notation "x + y" := (add_rce x%E y%E) (only printing) : ereal_scope. | ||
| Notation "x + y" := (add_cane x%E y%E) (only printing) : ereal_scope. | ||
| Notation "x - y" := (add_parsingde x%dE (oppe (y%dE : \bar^d _))%dE) | ||
| (only parsing) : ereal_dual_scope. | ||
| Notation "x - y" := (add_rcde x%dE (oppe y%dE)) | ||
| (only printing) : ereal_dual_scope. | ||
| Notation "x - y" := (add_cande x%dE (oppe y%dE)) | ||
| (only printing) : ereal_dual_scope. | ||
| Notation "x - y" := (add_parsinge x%E (oppe y%E)) (only parsing) : ereal_scope. | ||
| Notation "x - y" := (add_rce x%E (oppe y%E)) (only printing) : ereal_scope. | ||
| Notation "x - y" := (add_cane x%E (oppe y%E)) (only printing) : ereal_scope. | ||
| (* All previous notations should ideal by generated too, *) | ||
| (* but elpi lacks support for string notations. *) |
Member
Author
There was a problem hiding this comment.
Actually the issue should be this and on coq-elpi
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.
Motivation for this change
Fixes #1476
Checklist
CHANGELOG_UNRELEASED.mdadded corresponding documentation in the headersReference: How to document
Merge policy
As a rule of thumb:
all compile are preferentially merged into master.
Reminder to reviewers