-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Monomial orderings revlex
and degrevlex
unintuitive
#2950
Comments
I can relate to the confusion, but I am not sure I would consider this a bug, since it is already covered in the documentation. Also I think SageMath, Magma, Macaulay2, Singular all use these definitions. Adding the dozens of textbooks and articles, I don't think it would be a good idea to change it. I guess for people that were in contact with those materials, there would be nothing unintuitive about the current Oscar behaviour. PS: I was wrong. Everything is inconsistent, even among the systems, see #2950 (comment). |
I agree with both of you. It is unintuitive, but that's just how things are. The root problem is that |
The definition of |
@wdecker I think you are right. Renaming |
Hm, if we were consistent with Macaulay2, I guess it would still be unintuitive? By it I mean the observation of @lgoettgens and @gfourier. Even with the Macaulay2 convention, degree reverse lexicographical ordering is not degree comparison followed by "reverse lexicographical ordering":
For whatever reason, "reverse" seems to have different meanings depending on what substantive is following. Using the language of https://oeis.org/wiki/Orderings#Reverse_lexicographic_order, here is a small summary:
Macaulay2:
Magma:
SageMath:
There seems to be no rhyme or reason to the usage of the word "reverse". |
If I remember correctly SageMath calls Singular's |
Suppressing the inconsistent and ambiguous identifier revlex completely would be fine with me. With the crucial difference between Macaulay and Singular, it will be a constant source of confusion between the communities anyway. But I am opposed to not prepending a local ordering by @ederc : Indeed, Singular's revlex is called invlex in sage and another revlex is not present in the documentation. |
Regarding how this is defined in books: in e.g. Cox, Little, O'Shea they justify their choices by requiring that "standard" orderings they describe all satisfy that So all in all, I think we should remove the current By the way, I also think that the docstring for |
@thofma I believe "revlex" in Singular and M2 is called "reverse colexicographic" in oeis. See for example how the following monomials are ordered in Singular:
Anyways, I think we should just add a warning and leave things as they are. At least Singular / M2 / OSCAR are consistent with each other and with the Greuel-Pfister / Cox-Little-OShea book. |
I didn't expect this thread to blow up like this 😅
Furthermore, I noticed that almost all definitions of graded orderings are wrong in the documentation (https://docs.oscar-system.org/dev/CommutativeAlgebra/GroebnerBases/orderings/), as they are missing the |
revlex in Singular is used to construct monomial orderings for the opposite algebra (of a PBW algebra) |
@lgoettgens In order to avoid confusion:
|
I'll list all 4 combinations here and name them each with their OSCAR name, if they exist.
Please note that both 1 and 4, and 2 and 3 just differ by the direction of a single |
Here is a plan people here seem to be OK with:
|
No, I disagree. I will make a more detailed suggestion later on today. |
@thofma I think the definition of https://macaulay2.com/doc/Macaulay2/share/doc/Macaulay2/Macaulay2Doc/html/___Rev__Lex.html |
@fingolfin I will move the (corrected) definitions of monomial orderings from the .md files to the .jl files. |
@YueRen Are you saying that both are equal? According to the documentation, they are not if I understand correctly. https://docs.oscar-system.org/dev/CommutativeAlgebra/GroebnerBases/orderings/#The-Reverse-Lexicographical-Ordering and https://macaulay2.com/doc/Macaulay2/share/doc/Macaulay2/Macaulay2Doc/html/___Rev__Lex.html look different. For example, @wdecker: I am not sure I follow. |
@wdecker Sorry, I was actually looking at this link of the manual when I started to type: So they probably changed this at some time. |
I summarize the discussion, using 1-4 as done by @lgoettgens:
|
Names of non-global orderings should start with neg |
I could live with the proposal by @wdecker but so far everyone I talked to was concerned that using the name Worse, if we just change its meaning, that means we will potentially break code by people currently using it in their Oscar code outside of this repository. I'd be very wary about tusch a move. A compromise could be to turn |
O.k., how about the following: |
Sounds good to me. |
I think that this can be closed now due to the changes in #3038. |
Yes, this resolved the confusion. |
@gfourier found this today while trying around with #2936.
Describe the bug
We expect that a degree-graded ordering behaves exactly as the non-graded ordering on same-degree monomials.
So
revlex
anddegrevlex
should behave exactly the same incmp
when both input monomials have the same total degree.The behavior is consistent with the documentation (revlex and degrevlex), but nonetheless, we find it extremely unintuitive.
To Reproduce
System (please complete the following information):
Please paste the output of
Oscar.versioninfo(full=true)
below. If this doesnot work, please paste the output of Julia's
versioninfo()
and your Oscarversion.
The text was updated successfully, but these errors were encountered: