Macaulay2 / Macaulay2/M2

GLex after a Lex block produces incorrect weights

Open
#4,672 2 comments 0 reactions 0 assignees View on GitHub
Core Documentation
Dominant language
Macaulay2
Stars
435
Forks
297
Avg merge
4d 20h
Merged PRs (30d)
11

Description

On Macaulay2 1.26.06, defining a polynomial ring with `{Lex => 1, GLex}` produces incorrect weights:

```macaulay2
i1 : U = QQ[a];

i2 : R = U[x,y,z, MonomialOrder => {Lex => 1, GLex}];

i3 : toList (options R).MonomialOrder

o3 = {MonomialSize => 32, Lex => 1, Weights => {1, 1, 1}, Lex => 2, Position => Up}

o3 : List
```

One would expect `Weights => {1, 1}` here as the second block has two variables. What's worse, the additional weight seems to be assigned to the coefficient variable in the polynomial tower:

```macaulay2
i4 : leadTerm(a^3 + y*z)

3
o4 = a

o4 : R

i5 : leadMonomial(a^3 + y*z)

o5 = 1

o5 : R
```

Also, this might warrant a separate issue, but the [documentation of GLex](https://macaulay2.com/doc/Macaulay2/share/doc/Macaulay2/Macaulay2Doc/html/___G__Lex.html) describes `GLex => n`, while passing `GLex => 2` produces

```macaulay2
i6 : R = U[x,y,z, MonomialOrder => {Lex => 1, GLex => 2}];
stdio:6:5:(3):[1]: error: unrecognized ordering item keyword : GLex
```

So one has to pass `{Lex => 1, Weights => {1, 1}, Lex => 2}` instead...

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue with the two Macaulay2 polynomial-ring definitions and inspect the handling of Lex, GLex, and Weights in monomial-order construction. Done means the first example reports Weights = {1, 1}, leadTerm and leadMonomial rank the terms correctly, and the documented GLex = > 2 form is accepted or its documentation is corrected.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.