Macaulay2 / Macaulay2/M2

symmetricPower of a matrix ignores relations, disagreeing with the module version

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

Description

This issue was triaged from [`bugs/dan/0-symmetricPower`](https://github.com/Macaulay2/M2/blob/388c1ff0ce30d83751dea7bc7eac77fdc1305dd7/bugs/dan/0-symmetricPower), 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
-*- M2 -*-

a formative attempt:

symmetricPower(ZZ, Matrix) := Matrix => (i,m) -> map(ring m, rawSymmetricPower(i, raw m))

symmetricPower(ZZ, Module) := (d,M) -> (
-- written by David Eisenbud
-- modified by Dan Grayson
SM := symmetricAlgebra(M,Degrees => toList (numgens M : 1));
B := basis(d, SM);
md := presentation image B;
prune cokernel ((map(ring M, SM)) md))
symmetricPower(ZZ,Matrix) := (i,m) -> (
if true and numRows m != 1 then (
-- written by David Eisenbud
-- modified by Dan Grayson
Ssource := symmetricAlgebra(source m, Degrees => toList (numgens source m : 1));
Starget := symmetricAlgebra(target m, Degrees => toList (numgens target m : 1));
Sm := map(Starget, Ssource, vars Starget * promote(m, Starget));
(map(ring m, Starget))(Sm basis (i, Ssource) // basis (i, Starget)))
else (
-- old code, probably not right now, because we need agreement with the symmetric power module, which might have relations
map(ring m, rawSymmetricPower(i, raw m))
))
```

### Where it stands today

Half of the file's concern has been addressed, and the two halves now disagree with each other, which
is worse than the original state.

### What landed

The `Module` case handles relations, via `coimage basis(p, symmetricAlgebra M)` at
`Core/multilin.m2:90` — essentially the approach sketched in the file.

### What did not

The `Matrix` case is still the raw call the file itself calls a "formative attempt" and suspects is
wrong:

```m2
symmetricPower(ZZ, Matrix) := Matrix => (i,m) -> map(ring m, rawSymmetricPower(i, raw m))
```

And the two disagree: `symmetricPower(2, m)` on a map of cokernels returns `R^1 <-- R^1`, forgetting
the relations that the module version respects.

### Why this matters more than it looks

`symmetricPower` of a map is supposed to be functorial with `symmetricPower` of its source and target.
When the module version quotients by relations and the matrix version does not, the map returned is not
a map between the modules the module version would produce — so composing the two operations gives
inconsistent answers rather than merely imprecise ones.

`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

Research direction

Start in Core/multilin.m2:90, where the Module case handles relations, and compare it with the raw symmetricPower Matrix definition shown in the issue. Reproduce the map-of-cokernels example and compare the matrix result with the symmetric powers of its source and target modules. Done means the Matrix case respects relations and agrees functorially with the Module case.

Written by the indexing model from the issue text.

Assessment

Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.