trim Ideal doesn't trim all the way
Nobody has claimed this yet.
- Dominant language
- Macaulay2
- Stars
- 435
- Forks
- 297
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 11
Description
From Nick Addington via Google groups:
I ran this code:
R = QQ[x,y,X,Y,Z, Degrees=>{1,1,0,0,0}] I = ideal(y*X-x*Z,x*Y-y*Z,x^2,y^2,x*y,Z-1,X*Y-Z^2,X-1,Y-1) trim IThe output was
ideal(Z-1,Y-1,X-1,x-y,y^2,x*y,x^2)when I would have expected
ideal(Z-1,Y-1,X-1,x-y,y^2)Bizarrely, if I run
J = ideal(Z-1,Y-1,X-1,x-y,y^2,x*y,x^2) trim Jthen I do get the expected output.
Is this a bug, or should I tweak my input somehow?
I believe this is a bug, both in the graded and non-graded case:
i1 : R = QQ[x,y,X,Y,Z];
i2 : I = ideal(y*X-x*Z,x*Y-y*Z,x^2,y^2,x*y,Z-1,X*Y-Z^2,X-1,Y-1);
i3 : trim oo
2 2
o3 = ideal (Z - 1, Y - 1, X - 1, x - y, y , x*y, x )
i4 : trim oo
2
o4 = ideal (Z - 1, Y - 1, X - 1, x - y, y )
i5 : isHomogeneous I
o5 = false
i6 : R = QQ[x,y,X,Y,Z, Degrees=>{1,1,0,0,0}];
i7 : I = ideal(y*X-x*Z,x*Y-y*Z,x^2,y^2,x*y,Z-1,X*Y-Z^2,X-1,Y-1);
i8 : trim oo
2 2
o8 = ideal (Z - 1, Y - 1, X - 1, x - y, y , x*y, x )
i9 : trim oo
2
o9 = ideal (Z - 1, Y - 1, X - 1, x - y, y )
i10 : isHomogeneous I
o10 = true
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 two trim examples from the issue in Macaulay2, including both the graded and non-graded rings. Then locate the implementation of trim and determine why the first invocation retains redundant generators. Done means both examples produce the reduced ideal on the first invocation, with regression coverage for the reported inputs.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100