Macaulay2 / Macaulay2/M2

fix, document, or remove storefuns

Open
#1,980 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Core Documentation
Dominant language
Macaulay2
Stars
435
Forks
297
Avg merge
4d 20h
Merged PRs (30d)
11

Description

This is an undocumented feature:
https://github.com/Macaulay2/M2/blob/f0ce581750dfd94336883695d3552671410f32f5/M2/Macaulay2/m2/methods.m2#L640-L649
Used probably only here for manually implanting a resolution on an object:
https://github.com/Macaulay2/M2/blob/f0ce581750dfd94336883695d3552671410f32f5/M2/Macaulay2/m2/res.m2#L208-L209

I suppose this is somewhat similar to the `forceGB` function, but much more trusting of the user and hacky:
```m2
i1 : R = kk[x];

i2 : I = ideal x;

o2 : Ideal of R

i3 : res I = 5

o3 = 5

i4 : res I

1 1
o4 = R <-- R <-- 0

0 1 2

o4 : ChainComplex

i5 : M = module R;

i6 : res M = 5

o6 = 5

i7 : res M

o7 = 5
```

It should either be removed, or fixed and documented. Once #1918 is merged, it is also possible to do something like this by manually storing a value in cache, similar to this:
https://github.com/Macaulay2/M2/blob/f0ce581750dfd94336883695d3552671410f32f5/M2/Macaulay2/packages/PrimaryDecomposition.m2#L165-L169
Though I'm not a fan of this syntax, and would be open to a general suggestion.

I think it would be good to support such functionality beyong `gb` and `res`, for instance `syz`, `quotient`, `saturate`, `intersect`, etc.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the storefuns definitions in M2/Macaulay2/m2/methods.m2 around lines 640-649 and its use in M2/Macaulay2/m2/res.m2 around lines 208-209. Compare the cache approach in M2/Macaulay2/packages/PrimaryDecomposition.m2 around lines 165-169 and the related forceGB behavior; done requires a decided, consistent outcome for fixing, documenting, removing, or generalizing storefuns.

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
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.