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

factor_absolute sometimes fails to fully factorize #2081

Closed
fingolfin opened this issue Mar 18, 2023 · 2 comments
Closed

factor_absolute sometimes fails to fully factorize #2081

fingolfin opened this issue Mar 18, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@fingolfin
Copy link
Member

Noticed by @benlorenz when the CI for PR #2077 failed. But I can also reproduce this locally, by re-invoking it a couple of times:

julia> Qa, a = polynomial_ring(QQ, :a=>1:2);

julia> R, X = polynomial_ring(fraction_field(Qa), :X=>1:2);

julia> f = factor_absolute((X[1]^2+a[1]*X[2]^2)*(X[1]+2*X[2]+3*a[1]+4*a[2]))
3-element Vector{Any}:
 1
 (X[1] + 2*X[2] + 3*a[1] + 4*a[2], 1)
 (X[1] + t*X[2], X[1] - t*X[2], 1)

[... repeat last command ...]

julia> f = factor_absolute((X[1]^2+a[1]*X[2]^2)*(X[1]+2*X[2]+3*a[1]+4*a[2]))
3-element Vector{Any}:
 1
 (X[1] + 2*X[2] + 3*a[1] + 4*a[2], 1)
 (X[1] + t*X[2], X[1] - t*X[2], 1)

julia> f = factor_absolute((X[1]^2+a[1]*X[2]^2)*(X[1]+2*X[2]+3*a[1]+4*a[2]))
3-element Vector{Any}:
 1
 (X[1] + 2*X[2] + 3*a[1] + 4*a[2], 1)
 (X[1]^2 + a[1]*X[2]^2, 1)

According to the docstring, this last return value indicates that X[1]^2 + a[1]*X[2]^2 is absolutely irreducible. But it isn't.

Oh, and the docstring is slightly incomplete, too: it claims the return value is a vector with one coefficient, and then tuples containing one or two polynomials. Which is technically correct, but it omits the information that those tuples have one extra member, which I think is a multiplicity, maybe?

@fieker
Copy link
Contributor

fieker commented Mar 24, 2023

The current doc string (for this signature) mentiones the signature - but the sentence is hard to parse...

fieker added a commit that referenced this issue Mar 24, 2023
@fingolfin
Copy link
Member Author

This has been fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants