Macaulay2 / Macaulay2/M2

The GroupRevLex documentation says the feature is not implemented yet, but it works

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

Description

---

This issue was triaged from one request inside `bugs/dan/0-bugs-iswanson.m2`, one of the 857 files removed from the pre-GitHub `bugs/` tree by [`d2c8d27826`](https://github.com/Macaulay2/M2/commit/d2c8d27826) and catalogued in [#36](https://github.com/Macaulay2/M2/issues/36). That file is a wishlist holding several unrelated requests, so its asks were split apart and filed separately rather than as one issue nobody could close. **The commentary below was written by Claude (Claude Opus 5, via Claude Code)**, not by @d-torrance, whose account posted it -- please weigh it accordingly.

### The request, verbatim

> GroupRevLex does not seem to be installed; then uncomment the lines in monomorderings.m2 in the manual for GroupRevLex

The rest of the file is unrelated to this request; it is linked in the footer below.

### Where it stands today

The documentation for `GroupRevLex` ends with

```m2
Caveat => { "This feature has not been implemented yet."}
```

at [`ov_monomial_orderings.m2:616`](https://github.com/Macaulay2/M2/blob/development/M2/Macaulay2/packages/Macaulay2Doc/ov_monomial_orderings.m2#L608-L617),
but the feature works. Running that node's own example verbatim:

```m2
i1 : R = QQ[a..d, MonomialOrder=>GroupRevLex=>2, Global=>false];

i2 : (monoid R).Options.MonomialOrder
o2 = {MonomialSize => 32, GroupRevLex => 2, GRevLex => {1, 1}, Position => Up}

i3 : a^-1
-1
o3 = a

i4 : a^-1 * a
o4 = 1

i5 : a^-2 * a^3
o5 = a

i6 : b^-1
-1
o6 = b

i7 : try c^(-1) else "failed"
o7 = failed
```

That is exactly what the node's prose promises — "inverts the first `n` variables in the polynomial ring. In the
following example, `a^-1` is in the ring, but `c^-1` is not." The inverted variables behave as units, and the boundary
falls where documented.

### Why this is worth a moment rather than a one-line deletion

A caveat saying a feature is unimplemented is self-fulfilling: a reader deciding whether `GroupRevLex` is usable reads it
and stops. So the order may well have gone unused for years while working.

But I would not simply delete the line, because these caveats are not boilerplate. The sibling `GroupLex` node, twelve
lines below, carries a substantive one:

> The element `a/b` is in the fraction ring, while `a*b^(-1)` belongs to `R`.

— a real distinction a user needs. Whoever knows how complete `GroupRevLex` is should decide what belongs in its place.

**One genuine limitation I did find:** Gröbner bases fail over such a ring.

```m2
i8 : gens gb ideal(a*c-b)
-- error
```

so a caveat scoped to Gröbner bases may be warranted where the blanket one is now. I have not probed further than ring
construction, arithmetic and `gb`, so there may be other gaps; that is precisely why this is filed as a question about
the documentation rather than as a patch.

### Provenance

One request from `bugs/dan/0-bugs-iswanson.m2`, which reads:

```text
GroupRevLex does not seem to be installed
Then uncomment the lines in monomorderings.m2 in the manual
for GroupRevLex.
```

The situation has inverted since. The manual lines are no longer commented out — `monomorderings.m2` is now
`ov_monomial_orderings.m2` and documents `GroupRevLex` at `:608`, with cross-references at `:93`, `:114`, `:168` and
`:684` — so that half of the request is done. What remains is the opposite of what was reported: the feature is
installed and the documentation says it isn't.

For the record, my own first attempt reproduced the 2005 report, because I wrote `MonomialOrder=>{GroupRevLex=>4}` over
all four variables without `Global => false` and read the resulting error as the feature being absent. The documented
form works.

The other seven requests in that file were triaged in the same pass and are recorded in the catalogue: six are met —
including the exponent limits, which now cap at exactly the `2^15-1` and `2^7-1` the file asked for, erroring instead of
wrapping silently — and one is a duplicate of [#3449](https://github.com/Macaulay2/M2/issues/3449).

Searched titles for `GroupRevLex`, `GroupLex`, `Laurent`, `invert`, `MonomialSize` and "inverse of a variable", bodies for
`GroupRevLex`, and comments for `GroupRevLex`, `GroupLex` and "not been implemented yet". Nothing tracks this; the
`Laurent` and `invert` hits are unrelated ([#598](https://github.com/Macaulay2/M2/issues/598) Laurent *series*, [#4357](https://github.com/Macaulay2/M2/issues/4357) denominators, [#2718](https://github.com/Macaulay2/M2/issues/2718) matrices, [#3973](https://github.com/Macaulay2/M2/issues/3973) tower rings
via `toField`).

`open` · disposition `issue` · ask 8 of [`bugs/dan/0-bugs-iswanson.m2`](https://github.com/Macaulay2/M2/blob/388c1ff0ce30d83751dea7bc7eac77fdc1305dd7/bugs/dan/0-bugs-iswanson.m2) · source of truth: [`bug-triage/asks.tsv`](https://github.com/d-torrance/M2/blob/bug-triage/bug-triage/asks.tsv)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in M2/Macaulay2/packages/Macaulay2Doc/ov_monomial_orderings.m2 around lines 608-617 and compare the GroupRevLex caveat with the documented examples and sibling GroupLex entry. Reproduce the ring, arithmetic, and Gröbner-basis examples described in the issue; done means the documentation no longer incorrectly says the feature is unimplemented and accurately records any confirmed limitation.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.