Alexander dual of a monomial ideal returns the zero ideal over a tower ring, where the flat ring gives the right answer
Nobody has claimed this yet.
- Dominant language
- Macaulay2
- Stars
- 435
- Forks
- 297
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 11
Description
This issue was triaged from [`bugs/mike/0-rawAlexanderDual`](https://github.com/Macaulay2/M2/blob/388c1ff0ce30d83751dea7bc7eac77fdc1305dd7/bugs/mike/0-rawAlexanderDual), 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). **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 original file, verbatim
```text
perhaps rawAlexanderDual is giving bad data to frobby that makes it crash:
i2 : R=QQ[x][y];
i3 : I=monomialIdeal(x*y);
i4 : dual I
Program received signal SIGSEGV, Segmentation fault.
0x40adb9ac in __gmpz_set () from /usr/lib/libgmp.so.3
(gdb) up
#1 0x0843c11b in Frobby::alexanderDual (ideal=@0xbfffd9b8, exponentVector=0xb8a75d8, consumer=@0xbfffd9a0) at src/frobby.cpp:225
Current language: auto; currently c++
(gdb)
#2 0x0821dad1 in rawAlexanderDual (I=0x9a31ea8, top=0x9ea2ce0, strategy=0) at /home/dan/src/M2/trunk/BUILD/dan/../../Macaulay2/e/x-monideal.cpp:380
```
### Where it stands today
The Alexander dual of a monomial ideal comes back empty over a tower ring, where the same ideal over a
flat ring gives the right answer:
```m2
i1 : R = QQ[x][y];
i2 : I = monomialIdeal(x*y)
o2 = monomialIdeal(x*y)
o2 : MonomialIdeal of R
i3 : dual I
o3 = monomialIdeal ()
o3 : MonomialIdeal of R
i4 : S = QQ[x,y];
i5 : J = monomialIdeal(x*y)
o5 = monomialIdeal(x*y)
o5 : MonomialIdeal of S
i6 : dual J
o6 = monomialIdeal (x, y)
o6 : MonomialIdeal of S
```
`o3` should be `(x, y)` as `o6` is. Flattening the tower's own ideal confirms it — `dual monomialIdeal p I`
for `(R', p) = flattenRing R` gives `monomialIdeal (y, x)` — so the two routes to the same
mathematical object disagree, and the tower route returns the zero ideal.
Nothing signals a problem: `monomialIdeal(x*y)` is accepted, prints back unchanged, and reports
itself as a `MonomialIdeal of R`. A caller receives an empty ideal with no error.
If a monomial ideal in `QQ[x][y]` is not a meaningful object — `x` lives in the coefficient ring, so
`x*y` is arguably not a monomial of `R` at all — then the right behaviour is to refuse it at
construction rather than to accept it and return nothing.
### Where this came from
Cataloguing the `bugs/` directory removed in d2c8d27826 (#36). `bugs/mike/0-rawAlexanderDual` reports
this same input crashing:
```
i4 : dual I
Program received signal SIGSEGV, Segmentation fault.
0x40adb9ac in __gmpz_set () from /usr/lib/libgmp.so.3
(gdb) up
#1 0x0843c11b in Frobby::alexanderDual (...) at src/frobby.cpp:225
#2 0x0821dad1 in rawAlexanderDual (...) at .../e/x-monideal.cpp:380
```
with the guess *"perhaps rawAlexanderDual is giving bad data to frobby that makes it crash"*. The
crash is gone; what replaced it is the silent empty answer above.
Structurally the same shape as [#3389](https://github.com/Macaulay2/M2/issues/3389), where
`coefficients` over `QQ[x][y]` returned nonsense while the flat ring was fine — a different function,
the same tower-versus-flat divergence. That one was closed; this one is separate.
`open` · disposition `issue` · source of truth: [`bug-triage/catalog.tsv`](https://github.com/d-torrance/M2/blob/bug-triage/bug-triage/catalog.tsv)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the tower-ring example in rawAlexanderDual, then inspect e/x-monideal.cpp around rawAlexanderDual and src/frobby.cpp around Frobby::alexanderDual. Compare the tower result with the flattened and flat-ring cases; done means the operation returns the expected dual ideal or clearly rejects the invalid construction instead of silently returning the zero ideal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100