-
-
Notifications
You must be signed in to change notification settings - Fork 568
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
factorization of non-squarefree polynomials over the p-adics #15422
Comments
This comment has been minimized.
This comment has been minimized.
Dependencies: #9640 |
comment:4
Marc, do you agree with the change in the "polynomes" chapter? Paul |
comment:5
Replying to @zimmermann6:
I certainly do! I have made the change in the book. |
Author: Jeroen Demeyer |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:11
Replying to @mezzarobba:
Maybe that's a bit too quick, this is still only "needs_review". |
comment:12
Replying to @jdemeyer:
Yes. In particular, I disagree with the change to 1. I'm looking at the code now and writing some more comments. |
comment:13
Replying to @roed314:
No problem: I only changed the version in our private repository. I'll keep updating it in case the output changes again, and of course test everything before we release a new version. But thanks for mentioning it! |
comment:14
Replying to @roed314:
If you do, please explain what you think Sage should answer to
and
|
comment:15
David: do you agree with part 2 of the patch? Would you review it if I separated it into a different ticket? |
comment:16
Replying to @jdemeyer:
Sorry that I didn't manage to review this ticket yet. I'll work on it now and make some suggestions. |
comment:17
polynomial_padic.py
This patch changes the behavior of content for p-adic polynomials, from returning an element to returning an ideal. I have no problem with that change, but I thought that it should be remarked. Other than these comments, I'm happy with the changes. |
comment:18
Replying to @roed314:
Why should we do that? My point of view is that we should warn people that they do something which is not mathematically well-defined. And as explained in the ticket description, |
comment:19
In other words: I think it is wrong to claim that |
comment:20
Replying to @jdemeyer:
You can never say that a p-adic polynomial has a root. The subvariety of irreducible polynomials is open (in either the Zariski or the p-adic topology), and any ball will intersect it. So for a given p-adic polynomial with finite precision, it is either definitely irreducible, or has unknown status. Rather than always raising an In particular, the only thing special about polynomials whose discriminant is indistinguishable from zero is that they have the maximum precision loss among reducible polynomials. Among the reducible polynomials in the ball |
comment:21
Replying to @roed314:
That can't be true (or I am misunderstanding you). Using Hensel's Lemma, you can be certain that polynomials factor in a certain way. For example, any polynomial over |
comment:22
Hensel's Lemma is exactly the reason why p-adic factoring (and root finding) makes sense: because it can give if and only if statements between factoring over |
comment:24
Replying to @roed314:
Really? Can you give an example of a result which changed? The following happens both before and after my patch:
(one could argue that this should be changed, but that's unrelated to this ticket) |
Reviewer: Robert Bradshaw |
comment:26
There is a precedent:
This is exactly the same as factoring (I didn't know about |
comment:27
Attachment: 15422_factorpadic.patch.gz Replying to @jdemeyer:
You're right. I need to go to sleep now, but I'll think about this more and get back to you tomorrow. Perhaps we can add an option to pass to As for the |
comment:28
Sorry for the delay again. You are right that original claim is invalidated by Hensel lifting. But I still believe that we should factor Consider the problem of finding the kernel of a matrix
for example). But other times we don't know if the dimension is 0 or 1:
or even if the dimension is 0, 1 or 2:
We often design algorithms so that they produce a matrix with non-trivial kernel, and rely on being able to find it. I don't want Sage to raise a Of course, if the matrix does have a kernel then we can find it, and we can determine the precision to which we know that kernel. I would argue that that is the more useful answer. In the same way, if a user actually has a polynomial that is not squarefree, it's more useful to tell them that the polynomial factors in a certain way, assuming that it's reducible in the first place. I think it's a question of how we warn the user that the result is uncertain in this way: include a warning in the documentation of |
comment:29
Replying to @roed314:
I would say it is more useful to tell them that their question is not well-defined. Because, in this case, it is possible to make the question well-defined by either increasing the precision of the given polynomial or by starting with a polynomial over
I could live with this, if the default is to raise the exception. |
comment:30
Given that implementing that additional keyword for "best-effort factoring" (factor |
comment:31
Replying to @jdemeyer:
I definitely think that implementing best-effort factoring should be saved for another ticket. I'm giving this a positive review, since I think that a keyword argument is a good compromise. I would like to e-mail |
Changed reviewer from Robert Bradshaw to Robert Bradshaw, David Roe |
Merged: sage-5.13.rc0 |
ArithmeticError
since whether or not the polynomial factors depends on theO(3^20)
error term (t^2 - 3^20
factors whilet^2 - 3^21
does not):factorpadic
without coercing the coefficients toQp
first:The attached patch also does some clean-up of the various p-adic polynomial classes, now
_repr()
andfactor()
are implemented in exactly one place. One consequence of this is that_repr()
for polynomials overZp
has changed: non-exact zeros are now printed.Apply attachment: 15422_factorpadic.patch
Depends on #864
Depends on #9640
Depends on #10018
Depends on #11868
CC: @zimmermann6 @mezzarobba @roed314 @rharron
Component: padics
Author: Jeroen Demeyer
Reviewer: Robert Bradshaw, David Roe
Merged: sage-5.13.rc0
Issue created by migration from https://trac.sagemath.org/ticket/15422
The text was updated successfully, but these errors were encountered: