Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multivariate polynomial ring ideal reduce() method does not work on integer #38560

Open
2 tasks done
user202729 opened this issue Aug 25, 2024 · 3 comments
Open
2 tasks done

Comments

@user202729
Copy link
Contributor

Steps To Reproduce

sage: R.<x, y> = QQ[]
sage: R.ideal(x, y).reduce(1)

Expected Behavior

Returns 1.

Actual Behavior

AttributeError: 'sage.rings.integer.Integer' object has no attribute 'reduce'

Additional Information

No response

Environment

- **OS**: Linux
- **Sage Version**: `'SageMath version 10.4, Release Date: 2024-07-19'`

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide
@maxale
Copy link
Contributor

maxale commented Aug 25, 2024

It's not a bug since reduce() here expects a polynomial not a number. Use R(1) or R.one() instead of 1.

@user202729
Copy link
Contributor Author

But 1 can be naturally converted to R(1). Besides, it does work with univariate polynomial ring

sage: R.<x> = QQ[]
sage: R.ideal(x).reduce(1)
1

In any case I see no harm converting the argument to an element of R inside .reduce() if it isn't already one. Would make it more convenient to use.

@maxale
Copy link
Contributor

maxale commented Aug 26, 2024

Then it should be RFE not a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants