Documentation for `isHomogeneous(Matrix)` unclear
- Dominant language
- Macaulay2
- Stars
- 435
- Forks
- 297
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 11
Description
The documentation for `isHomogeneous` states that:
> A matrix is homogeneous if each entry is homogeneous of such a degree that the matrix has a well-defined degree.
Consider the following example:
``` M2
k = GF(3);
R = k[x];
foo = map(R^{0}, R^{0}, x);
bar = map(R^{0}, R^{-1}, x);
baz = map(R^{0}, R^{0}, matrix x);
qux = map(R^{0}, R^{-1}, matrix x);
print("foo: " | toString isHomogeneous foo);
print("bar: " | toString isHomogeneous bar);
print("baz: " | toString isHomogeneous baz);
print("qux: " | toString isHomogeneous qux);
```
I expect all of these matrices to be homogeneous: `foo` and `baz` of degree 1, `bar` and `qux` of degree 0.
Instead, I get the output
``` M2
foo: true
bar: true
baz: false
qux: true
```
Can anybody explain what causes this behavior? I would be happy to add some clarification to the documentation, but I am not sure (a) why I am seeing this behavior and (b) whether it is intended.
EDIT: I should also add the following:
```
i11 : foo == baz
o11 = true
i12 : bar == qux
o12 = true
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the isHomogeneous documentation and reproduce the issue's M2 example, including the equality checks for foo and baz and for bar and qux. Trace the behavior of isHomogeneous for these matrix representations and determine whether the result is intended. Done means documenting the cause and expected behavior clearly, with the example outputs explained.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100