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
BooleanPolynomialRing.remove_var(...) does not return a BooleanPolynomialRing #13965
Comments
Author: Charles Bouillaguet |
comment:2
The patch looks good, but what about the ordering? |
comment:3
I mimicked what existed in multi_polynomial_ring_generic.pyx, and it ignored the order (my intuition would be that sometimes it must not be possible to carry on the order, when it is a block order for instance). I think that we could let the user optionally provide an order for the "reduced" ring, and not try to do anything automatically... Do you agree ? |
comment:4
Replying to @sagetrac-Bouillaguet:
For block orders you just have to make the blocks smaller. That' not a oneliner, but something like blks=R.term_order().blocks()
max_idx = len(blks[0])
if idx < max_idx:
if nlen > 0:
new_order = TermOrder(bl, len(bl)-1)
else:
new_order = bl
for bl in blks[1:]:
nlen = len(bl)
max_idx += nlen
if idx < max_idx:
if nlen > 0:
new_order += TermOrder(bl, nlen-1)
else:
new_order += bl
should do.
It the line above do not work out for some case, it would be an acceptable alternative. |
comment:5
Attachment: 13965_boolean_remove_var.patch.gz I implemented a compromise solution, and for good measure I also adapted it to generic polynomial rings. AlexanderDreyer, do you like it? |
comment:6
Replying to @sagetrac-Bouillaguet:
Yeah, that indeed a good comprise: it works out of the box in typical use cases and is not to hard in the remaining cases (where people probably know their way thru). So this is a positive review, if patchbot agrees. |
Reviewer: Alexander Dreyer |
comment:7
Patchbot agrees :) |
Merged: sage-5.7.beta1 |
and :
CC: @malb @alexanderdreyer @sagetrac-PolyBoRi
Component: commutative algebra
Author: Charles Bouillaguet
Reviewer: Alexander Dreyer
Merged: sage-5.7.beta1
Issue created by migration from https://trac.sagemath.org/ticket/13965
The text was updated successfully, but these errors were encountered: