-
-
Notifications
You must be signed in to change notification settings - Fork 517
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
Factoring and Irreducibility Related Methods in Skew Polynomials #21264
Comments
Changed branch from u/arpitdm/irreducibility_factoring_skew_polynomials to none |
Author: Xavier Caruso |
comment:4
Where is the code of this ticket? Should I copy it from https://github.com/sagemath/sage-prod/files/10655943/trac_13215_skew_polynomials.patch.gz or can I find it somewhere on git? |
comment:6
OK, I found it. Last 10 new commits:
|
Commit: |
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
|
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
This comment has been minimized.
This comment has been minimized.
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:15
Can you rebase the branch off #21262 so the commits/changes specific to this ticket are easier to review? Also there are added functions in
|
comment:21
I think I addressed all your remarks. |
comment:22
Thank you. So I have gotten a look at the C code and did another pass, and I have a few more comments. I think this will be the last batch. Could you separate the main part of Instead of calling I think this could be simplified in -i = [ n for n,_ in self._norm_factor ].index(N)
-m = self._norm_factor[i][1]
+m = -1
+for n, mp in self._norm_factor:
+ if n == N:
+ m = mp
+ break This way you don't create a whole new list and have to iterate through the entire It would be nice to put the imports
at the top-level. I guess this is the import loop we had on the other ticket? I still need to fix that... I guess we don't know anything about the type of In this line, do you really need to create a new list?
If so, then I think it is better to do I still think the lM = [None] * e**2
for j in range(e):
for i in range(e):
coeffs = [skew_ring._retraction(X[t*r+i]) for t in range(d)]
value = E(coeffs)
lM[i*e+j] = value -xx = PE(W.list() + [E(-1)])
+xx = PE((<list> W.list()) + [E(-1)]) I think instead of This is impossible: I am not 100% sure that this is safe:
Is it possible to have something over a commutative base ring that whose elements are not a Take advantage of the caching: -skew_ring(1)
+skew_ring.one() So you don't have to create an intermediate object: -cdef list indices = list(Permutations(len(factorsN)).random_element())
+from sage.misc.prandom import sample # Do this import at the top level\
+m = len(factorsN)
+cdef list indices = <list> sample(range(1,m+1), m)) Missed one: -maxcount = q_jordan(Partition(maxtype),cardE)
+maxcount = q_jordan(maxtype, cardE) |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:24
Replying to @tscrim:
It's done, I think. Please tell me if I've implemented correctly what you had in mind. I tried to call the methods
I don't know why exactly.
Yes, it creates import errors. And indeed, it would be nice to fix it.
Well, it's a polynomial. So probably an instance of the generic class Another point: From time to time, I got errors with
So, I've removed them and added a call to |
comment:25
Replying to @xcaruso:
So I think it is because Cython doesn't know that those should be function pointers and will have the same signature. You might be able to make them actual function pointers since you know everything is the correct type. However, I am not sure exactly how to do this as Cython tutorials don't seem to talk much about how to do function pointers, much less with cdef methods.
This is now #29561, which fixes the import loop when I tested it.
That's fine. I just wanted to ask to see if I was missing something.
I am pretty certain that is okay. Although I am not such a Cython expert to say it is surely correct. |
comment:26
Replying to @xcaruso:
It's really weird. It really looks like a bug in a cython compiler. For instance,
sometimes works... but not always. (And I couldn't figure out on what it depends.) |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:28
Replying to @xcaruso:
That is strange. Well, I think that can be a mystery for another day for additional optimization. I have done everything I can see is natural to do. Thank you for caring care of all of those changes. |
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:
|
comment:32
Conflict resolved. |
comment:33
Hi Volker, is there some reason this hasn't yet been merged in? All of the dependency tickets were closed (I removed them in case that is causing some issues with your scripts). |
Changed branch from u/caruso/skew_polynomial_finite_field_rebased to |
This ticket implements the following methods (all related to factorization and irreducible divisors) for skew polynomials over finite fields
is_irreducible
right_irreducible_divisor
,left_irreducible_divisor
(return a divisor)right_irreducible_divisors
,left_irreducible_divisors
(return an iterator over all divisors)count_irreducible_divisors
factor
(return a factorization)factorizations
(return an iterator over all factorizations)count_factorizations
CC: @tscrim @xcaruso @johanrosenkilde @sagetrac-dlucas @vbraun
Component: algebra
Author: Xavier Caruso
Branch/Commit:
d107cce
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/21264
The text was updated successfully, but these errors were encountered: