Skip to content
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

Fix for module ordering conversion #4312

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Syz-MS
Copy link
Contributor

@Syz-MS Syz-MS commented Nov 14, 2024

Fixes #4303.
According to the Oscar documentation and Singular manual the module orderings should be converted as followed:
:lex -> Singular.ordering_c
:invlex -> Singular.ordering_C
This was swapped in the code.

@Syz-MS Syz-MS marked this pull request as draft November 14, 2024 10:10
@Syz-MS
Copy link
Contributor Author

Syz-MS commented Nov 14, 2024

Marked as draft for breaking every test and doctest that relies on module orderings for objects being ordered and displayed in a certain way.

@afkafkafk13
Copy link
Collaborator

I fear that the problem is significantly larger than just exchanging the positions of c and C in the translation.

Several people obviously stumbled into this in the past when debugging their own code, but were unaware of the underlying translation problem leading them to the conclusion that they had chosen the wrong Oscar-ordering for their purpose and then using the other one.

@Syz-MS
Copy link
Contributor Author

Syz-MS commented Nov 22, 2024

@afkafkafk13 are we allowed to change the default ordering for modules on the Oscar side to match the default ordering on the Singular side?
This would fix the conversion problem for module related objects when the ordering is ignored. With some small code changes the tests (except book test) and doctests are now working.

@afkafkafk13
Copy link
Collaborator

@afkafkafk13 are we allowed to change the default ordering for modules on the Oscar side to match the default ordering on the Singular side? This would fix the conversion problem for module related objects when the ordering is ignored. With some small code changes the tests (except book test) and doctests are now working.

Changing the default ordering (as ordering, not as symbol) would be a major change and cannot be done without thorough discussion with @ederc and @jankoboehm and others. On the other hand, you are NOT changing the default ordering, but correcting it back to the ordering (not the symbol) that is currently being used, whereas the correct default ordering was changed by correcting the translation table for the symbols to match the definition, right?

@Syz-MS
Copy link
Contributor Author

Syz-MS commented Nov 22, 2024

On the other hand, you are NOT changing the default ordering, but correcting it back to the ordering (not the symbol) that is currently being used, whereas the correct default ordering was changed by correcting the translation table for the symbols to match the definition, right?

You are partially correct. For every computation that happens on the Singular side I am just correcting it to the ordering currently being used. Some examples for this would be using groebner_basis and leading_module without a specified ordering.

Wheras if the computation happens purely in Oscar I have changed the ordering from current default ordering e.g. when using leading_term, terms without a specified ordering. This is actually the reason for the failing book test.

@afkafkafk13
Copy link
Collaborator

No. We are not free to change the default ordering in Oscar. There were reasons for this choice and it is used in the Oscar-book.

Instead, we need to look at the lowlevel methods for preparing data for Singular and add the means to pass an ordering to the corresponding Singular objects. (Just (C,...), (c,...),(...,C) and (...,c) -- nothing fancy, which cannot be represented on the Singular side anyway. The fancy staff, which also includes ways to translate more elaborate module orderings in suitable ways, is not as urgent, but the core functionality on module orderings in Singular should be accessible from Oscar in a clean way. Can we talk about this on Wednesday morning?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gröbner basis for modules
2 participants