Minors with prescribed rows or columns
Nobody has claimed this yet.
- Dominant language
- Macaulay2
- Stars
- 435
- Forks
- 297
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 11
Description
Is there an easy way to compute the ideal of minors that include a specific set of rows or columns? I tried to think of a way to do this incrementally; e.g. exclude those rows and columns, find the minors, then add in one row or column and update the minors. Perhaps there's a smart way to do this, but I couldn't think of it, so I wrote this piece of code that I think should become a part of the `minors` command if there isn't a better way to do it:
```m2
minors' = method(Options => options minors ++ {Prefix => null})
minors'(ZZ, Matrix) := opts -> (n, m) -> (
if opts.Prefix === null then return minors(n, m, opts);
-- rows and columns to force in the minors
-- TODO: implement general type checking, e.g. instance({2:{ZZ}}, opts.Prefix)
(rows, cols) := (set opts.Prefix#0, set opts.Prefix#1);
rowsets := apply(subsets(set(0..numrows m - 1) - rows, n - #rows), r -> toList(r + rows));
colsets := apply(subsets(set(0..numcols m - 1) - cols, n - #cols), c -> toList(c + cols));
ideal apply(rowsets ** colsets, coords -> det submatrix(m, coords#0, coords#1)))
```
Example:
```m2
i2 : R = QQ[a..z];
i3 : m = genericMatrix(R, 2, 4)
o3 = | a c e g |
| b d f h |
2 4
o3 : Matrix R <--- R
i4 : minors'(2, m, Prefix => {{}, {0}})
o4 = ideal (- b*c + a*d, - b*e + a*f, - b*g + a*h)
```
It doesn't take advantage of the engine's `rawMinors` routine, but still might be useful. It is likely also implemented by others, which is why I'm asking here to see if there is a better implementation.
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
Start by reading the existing `minors` command and comparing it with the engine's `rawMinors` routine. The proposed `minors'` example shows the desired prescribed-row or prescribed-column behavior; done should provide that capability without losing the expected ideal-of-minors result.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100