Macaulay2 / Macaulay2/M2

multiple isCM and isCohenMacaulay methods

Open
#4,201 3 comments 0 reactions 0 assignees View on GitHub
package issue
Dominant language
Macaulay2
Stars
435
Forks
297
Avg merge
4d 20h
Merged PRs (30d)
11

Description

Packages `Depth`, `EdgeIdeals`, `Graphs`, and `LexIdeals` all export the `isCM` method, making it impossible to use more than one at a time. Also, there is `isCohenMacaulay` from `TestIdeals` which seems to conflict with `isCM` from `Depth`, and a random `isCohenMacaulayMA` in `MonomialAlgebras`.
```m2
i2 : headlines about "isCM|isCohenMacaulay"
-- warning: symbol "isCM" in User#"private dictionary" is shadowed by a symbol in Depth.Dictionary
-- use the synonym isCM$0

o2 = 0. "Depth :: isCM" -- whether a ring or module is Cohen-Macaulay
1. "Depth :: isCM(Module)" -- whether a ring or module is Cohen-Macaulay
2. "Depth :: isCM(Ring)" -- whether a ring or module is Cohen-Macaulay
3. "EdgeIdeals :: isCM" -- determines if a (hyper)graph is Cohen-Macaulay
4. "EdgeIdeals :: isCM(HyperGraph)" -- determines if a (hyper)graph is Cohen-Macaulay
5. "Graphs :: isCM" -- determines if a graph is Cohen-Macaulay
6. "Graphs :: isCM(Graph)" -- determines if a graph is Cohen-Macaulay
7. "LexIdeals :: isCM" -- test whether a polynomial ring modulo a homogeneous ideal is Cohen-Macaulay
8. "LexIdeals :: isCM(Ideal)" -- test whether a polynomial ring modulo a homogeneous ideal is Cohen-Macaulay
9. "MonomialAlgebras :: isCohenMacaulayMA" -- Test whether a simplicial monomial algebra is Cohen-Macaulay.
10. "MonomialAlgebras :: isCohenMacaulayMA(List)" -- Test whether a simplicial monomial algebra is Cohen-Macaulay.
11. "MonomialAlgebras :: isCohenMacaulayMA(MonomialAlgebra)" -- Test whether a simplicial monomial algebra is Cohen-Macaulay.
12. "MonomialAlgebras :: isCohenMacaulayMA(PolynomialRing)" -- Test whether a simplicial monomial algebra is Cohen-Macaulay.
13. "TestIdeals :: isCohenMacaulay" -- whether a ring is Cohen-Macaulay
14. "TestIdeals :: isCohenMacaulay(...,AtOrigin=>...)" -- whether a ring is Cohen-Macaulay
15. "TestIdeals :: isCohenMacaulay(Ring)" -- whether a ring is Cohen-Macaulay
```
I can define `isCohenMacaulay` in `m2/shared.m2` with `isCM` as a synonym, but I'm not sure how to resolve `isCM(Ring)` from `Depth` and `isCohenMacaulay(Ring)` from `TestIdeals`. @eisenbud @kschwede should the latter be added as a hook for positive characteristic case, overriding the simple method from `Depth`?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing m2/shared.m2 and the exported isCM and isCohenMacaulay entries from Depth, EdgeIdeals, Graphs, LexIdeals, TestIdeals, and MonomialAlgebras. The issue is done when the package naming and hook behavior are agreed and the overlapping methods no longer cause ambiguous exports.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.