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

Add ABCs CommutativePolynomial, MPolynomial_libsingular, InfinitePolynomial; deprecate is_Polynomial, is_MPolynomial #35076

Conversation

mkoeppe
Copy link
Contributor

@mkoeppe mkoeppe commented Feb 11, 2023

📚 Description

Closes #32709

📝 Checklist

  • I have made sure that the title is self-explanatory and the description concisely explains the PR.
  • I have linked an issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 11, 2023

PR fixes merge conflict in positively reviewed ticket #32709, setting to positive review.

@codecov-commenter
Copy link

codecov-commenter commented Feb 11, 2023

Codecov Report

Base: 88.59% // Head: 88.58% // Decreases project coverage by -0.02% ⚠️

Coverage data is based on head (ffb4647) compared to base (05329f6).
Patch coverage: 78.78% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #35076      +/-   ##
===========================================
- Coverage    88.59%   88.58%   -0.02%     
===========================================
  Files         2140     2140              
  Lines       396998   397001       +3     
===========================================
- Hits        351740   351677      -63     
- Misses       45258    45324      +66     
Impacted Files Coverage Δ
...l/padics/polynomial_padic_capped_relative_dense.py 67.97% <ø> (ø)
.../sage/rings/polynomial/infinite_polynomial_ring.py 87.46% <62.50%> (+0.13%) ⬆️
...ge/rings/polynomial/infinite_polynomial_element.py 83.15% <72.72%> (ø)
src/sage/combinat/kazhdan_lusztig.py 79.01% <100.00%> (ø)
src/sage/combinat/schubert_polynomial.py 92.30% <100.00%> (ø)
src/sage/combinat/sf/sfa.py 96.31% <100.00%> (ø)
src/sage/crypto/mq/rijndael_gf.py 80.14% <100.00%> (ø)
src/sage/crypto/stream.py 74.73% <100.00%> (ø)
src/sage/groups/affine_gps/group_element.py 94.69% <100.00%> (ø)
.../differentiable/characteristic_cohomology_class.py 81.40% <100.00%> (ø)
... and 47 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

…ial__mpolynomial_for_isinstance_testing

SageMath version 9.8, Release Date: 2023-02-11
@mkoeppe mkoeppe force-pushed the t/32709/sage_structure_element__add_abcs_polynomial__mpolynomial_for_isinstance_testing branch from d4a46aa to f7e9f41 Compare February 12, 2023 00:12
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 12, 2023

Failures in sage/rings/polynomial/infinite_polynomial_element.py https://github.com/sagemath/sage/actions/runs/4153778889/jobs/7185627677#step:11:7560

…ePolynomial in isinstance tests, not InfinitePolynomial_sparse
@mkoeppe mkoeppe self-assigned this Feb 12, 2023
@mkoeppe mkoeppe requested a review from tscrim February 12, 2023 22:03
Matthias Koeppe added 3 commits February 12, 2023 16:23
…polynomial__mpolynomial_for_isinstance_testing

SageMath version 10.0.beta0, Release Date: 2023-02-12

# Conflicts:
#	src/sage/combinat/schubert_polynomial.py
…polynomial__mpolynomial_for_isinstance_testing
@mkoeppe mkoeppe added this to the sage-10.0 milestone Feb 13, 2023
…polynomial__mpolynomial_for_isinstance_testing
Copy link
Collaborator

@tscrim tscrim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let it be so, but I am still a bit worried about the continued increase in maintenance burden with the lack of specifications.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 17, 2023

A more positive take would be that the new class CommutativePolynomial now is a clear place where we can put abstract methods to specify an API common to single- and multivariate polynomials.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 17, 2023

Thanks for the review!

@tscrim
Copy link
Collaborator

tscrim commented Feb 17, 2023

A more positive take would be that the new class CommutativePolynomial now is a clear place where we can put abstract methods to specify an API common to single- and multivariate polynomials.

Indeed, this I am very happy about (a long time wish-list item from me). However, I am still not clear what makes the infinite polynomials deserving of an ABCDEFIT.

@tscrim
Copy link
Collaborator

tscrim commented Feb 17, 2023

Also, could you change the PR description to "Fixes #32709" instead of "Closes #32709" for the automatic closing of the issue?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 17, 2023

"Fixes", "Closes", and "Resolves" all have the same magic effect.

@tscrim
Copy link
Collaborator

tscrim commented Feb 17, 2023

I see. Thanks.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 17, 2023

A more positive take would be that the new class CommutativePolynomial now is a clear place where we can put abstract methods to specify an API common to single- and multivariate polynomials.

Indeed, this I am very happy about (a long time wish-list item from me).

I have opened #35149 for keeping track of follow-ups in this direction.

@tscrim
Copy link
Collaborator

tscrim commented Feb 17, 2023

Thank you.

Matthias Köppe added 4 commits February 19, 2023 14:28
@github-actions
Copy link

github-actions bot commented Mar 3, 2023

Documentation preview for this PR is ready! 🎉
Built with commit: 3b65350

@vbraun vbraun merged commit 2a7b4c9 into sagemath:develop Mar 13, 2023
@@ -20,6 +20,9 @@ from itertools import chain, islice
from sage.misc.misc_c import prod

def is_MPolynomial(x):
from sage.misc.superseded import deprecation
deprecation(32709, "the function is_MPolynomial is deprecated; use isinstance(x, sage.structure.element.MPolynomial) instead")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the deprecation message is wrong:
it should be sage.rings.polynomial.multi_polynomial.MPolynomial, no?

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