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

Fix is_homogeneous weight bug #38575

Merged
merged 1 commit into from
Sep 15, 2024
Merged

Conversation

grhkm21
Copy link
Contributor

@grhkm21 grhkm21 commented Aug 28, 2024

PoC:

term_order = TermOrder("wdegrevlex", [1, 3])
R.<x, y> = PolynomialRing(Qp(5), order=term_order)
assert not (x + y).is_homogeneous()
assert (x^3 + y).is_homogeneous()

Copy link

Documentation preview for this PR (built with commit 8fa25d9; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@grhkm21
Copy link
Contributor Author

grhkm21 commented Aug 28, 2024

CI Failure reported at #38579 and is irrelevant

@GiacomoPope
Copy link
Contributor

This seems like a sensible fix, but I don't know what the best thing to do with the weighted polynomials is generally. This could be merged and then a whole new class could be refactored at a later date?

@grhkm21
Copy link
Contributor Author

grhkm21 commented Sep 4, 2024

AFAIK there's basically no support for weighted polynomials in the Sage implementation (not Singular) of multivariate polynomial rings with the polydict things. It's possible to fix them all at once by going through the 11k lines of code, but for me I prefer fixing these bugs as I discover and need them. Thanks for the review!

vbraun pushed a commit to vbraun/sage that referenced this pull request Sep 5, 2024
    
PoC:

```sage
term_order = TermOrder("wdegrevlex", [1, 3])
R.<x, y> = PolynomialRing(Qp(5), order=term_order)
assert not (x + y).is_homogeneous()
assert (x^3 + y).is_homogeneous()
```
    
URL: sagemath#38575
Reported by: grhkm21
Reviewer(s):
vbraun pushed a commit to vbraun/sage that referenced this pull request Sep 6, 2024
    
PoC:

```sage
term_order = TermOrder("wdegrevlex", [1, 3])
R.<x, y> = PolynomialRing(Qp(5), order=term_order)
assert not (x + y).is_homogeneous()
assert (x^3 + y).is_homogeneous()
```
    
URL: sagemath#38575
Reported by: grhkm21
Reviewer(s):
vbraun pushed a commit to vbraun/sage that referenced this pull request Sep 8, 2024
    
PoC:

```sage
term_order = TermOrder("wdegrevlex", [1, 3])
R.<x, y> = PolynomialRing(Qp(5), order=term_order)
assert not (x + y).is_homogeneous()
assert (x^3 + y).is_homogeneous()
```
    
URL: sagemath#38575
Reported by: grhkm21
Reviewer(s):
vbraun pushed a commit to vbraun/sage that referenced this pull request Sep 8, 2024
    
PoC:

```sage
term_order = TermOrder("wdegrevlex", [1, 3])
R.<x, y> = PolynomialRing(Qp(5), order=term_order)
assert not (x + y).is_homogeneous()
assert (x^3 + y).is_homogeneous()
```
    
URL: sagemath#38575
Reported by: grhkm21
Reviewer(s):
vbraun pushed a commit to vbraun/sage that referenced this pull request Sep 10, 2024
    
PoC:

```sage
term_order = TermOrder("wdegrevlex", [1, 3])
R.<x, y> = PolynomialRing(Qp(5), order=term_order)
assert not (x + y).is_homogeneous()
assert (x^3 + y).is_homogeneous()
```
    
URL: sagemath#38575
Reported by: grhkm21
Reviewer(s):
vbraun pushed a commit to vbraun/sage that referenced this pull request Sep 12, 2024
    
PoC:

```sage
term_order = TermOrder("wdegrevlex", [1, 3])
R.<x, y> = PolynomialRing(Qp(5), order=term_order)
assert not (x + y).is_homogeneous()
assert (x^3 + y).is_homogeneous()
```
    
URL: sagemath#38575
Reported by: grhkm21
Reviewer(s):
@vbraun vbraun merged commit 4835911 into sagemath:develop Sep 15, 2024
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants