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

PolyBoRi monomial orders are wrong #2148

Closed
malb opened this issue Feb 13, 2008 · 9 comments
Closed

PolyBoRi monomial orders are wrong #2148

malb opened this issue Feb 13, 2008 · 9 comments

Comments

@malb
Copy link
Member

malb commented Feb 13, 2008

sage: P.<x,y> = PolynomialRing(GF(2),2,order='degrevlex')
sage: x > y
True

sage: P.<x,y> = BooleanPolynomialRing(2,order='degrevlex')
sage: x > y
False

This should be changed because it leads to funny performance figures.

CC: @malb

Component: commutative algebra

Keywords: polybori

Issue created by migration from https://trac.sagemath.org/ticket/2148

@malb malb added this to the sage-2.11 milestone Feb 13, 2008
@malb malb self-assigned this Feb 13, 2008
@burcin
Copy link

burcin commented Feb 17, 2008

Attachment: 2148-polybori_monomial_order_keywords.patch.gz

fix monomial order keywords in polybori wrapper

@burcin
Copy link

burcin commented Feb 17, 2008

comment:1

attachment: 2148-polybori_monomial_order_keywords.patch corrects the monomial order keywords in the PolyBoRi wrapper.

@burcin burcin assigned burcin and unassigned malb Feb 17, 2008
@burcin burcin changed the title PolyBoRi inconsistency PolyBoRi monomial orders are wrong Feb 17, 2008
@malb
Copy link
Member Author

malb commented Feb 17, 2008

comment:2

I am not convinced the patch fixes the issue:

'dp' and 'Dp' refer to degrevlex and deglex respectively and in neither of those x < y.

sage: P.<x,y> = PolynomialRing(GF(2),order='degrevlex')
sage: x > y
True
sage: P.<x,y> = PolynomialRing(GF(2),order='deglex')
sage: x > y
True

However, there is a deglex with variables inverted ordering ib PolyBoRi which has no Singular/Sage equivalent AFAIK:

sage: B.<x,y> = BooleanPolynomialRing(2,order='deglex')
sage: x > y
True
sage: B.<x,y> = BooleanPolynomialRing(2,order='degrevlex')
sage: x > y
False

@burcin
Copy link

burcin commented Feb 17, 2008

comment:3

You're right, it's not so simple. I'll look at it a bit more.

@burcin
Copy link

burcin commented Feb 27, 2008

comment:4
On Wed, 20 Feb 2008 10:40:09 +0100
Alexander Dreyer <alexander.dreyer@itwm.fraunhofer.de> wrote:

> PolyBoRi does not implement degrevlex (dp), but a variant, which we
> called dp_asc. It is adp (not a dlex, as Martin states), but with
> variables reversed. The reason for this was, that this can be
> implemented more efficiently on our ZDD-based data structure. So, for
> correcting the command
> 
> B.<x,y> = BooleanPolynomialRing(2,order='degrevlex')
> 
> you have to reverse the variable vector before it is returned to <x, y>.
> (If there's something like BooleanVariable(idx), it has to be mapped to
> BooleVariable(n-idx).)

@burcin
Copy link

burcin commented Mar 8, 2008

reverse variables for degrevlex to dp_asc conversion

@burcin
Copy link

burcin commented Mar 8, 2008

comment:5

Attachment: 2148-polybori-fix_degrevlex.patch.gz

attachment: 2148-polybori-fix_degrevlex.patch arranges the variable indexes in the Sage - PolyBoRi interface to handle the difference between degrevlex and dp_asc orders.

Note that with this patch, printing is reversed when using dp_asc orders:

sage: P.<x,y,z> = BooleanPolynomialRing(3,order='degrevlex')
sage: x*y*z
z*y*x
sage: P.<x,y,z> = BooleanPolynomialRing(3,order='lex')
sage: x*y*z
x*y*z

@rlmill rlmill mannequin modified the milestones: sage-2.11, sage-2.10.4 Mar 12, 2008
@mwhansen
Copy link
Contributor

comment:7

Looks good to me.

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Mar 18, 2008

comment:8

Merged 2148-polybori-fix_degrevlex.patch in Sage 2.11.alpha0

@sagetrac-mabshoff sagetrac-mabshoff mannequin closed this as completed Mar 18, 2008
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants