Ideals in LaurentPolynomialRing

100 views
Skip to first unread message

enriqu...@gmail.com

unread,
May 29, 2023, 12:07:07 PM5/29/23
to sage-devel
Some time ago I had some computations on ideals in Laurent polynomial rings, namely looking for minimal associated primes. Basically, I converted any generator into a polynomial, study the ideal in the polynomial ring, and forget the prime ideals containing monomials. From some time ago, it is much easier since it can be done directly in the ring of Laurent polynomials. 
Yesterday these computations on an ideal with 80 generators were really slow, but for some reason I checked that if the generators were converted to elements in the associated polynomial ring, and then the ideal in the Laurent polynomial ring is constructed, then those computations were solved really fast. 
I checked the code but I was not able to isolate the reason. Best, Enrique.

Nils Bruin

unread,
May 29, 2023, 2:28:39 PM5/29/23
to sage-devel
Dear Enrique,

From what you write I get the impression you may be talking about a regression in performance relative to earlier versions of sage. If you want to make an actionable item out of this, you'll probably have to file a ticket with explicit code on it that can be profiled; preferably with an indication why you think the performance could be significantly improved. That doesn't guarantee someone will work on it but it at least gives them a place to start if they want to, including you yourself! You could file it as an "enhancement" or even as a "bug" if you can convincingly show it's a regression. In the latter case you would probably end up identifying a version in which performance was significantly better. A git diff on some of the relevant files could then perhaps very quickly show what's happening.

Travis Scrimshaw

unread,
May 29, 2023, 11:53:59 PM5/29/23
to sage-devel
Dear Enrique,
   I am having a bit of trouble understanding exactly what computations are slow and fast from your description. As Nils said, can you give us some explicit code (with some comments about which parts are slow)?

Best,
Travis

Kiran Kedlaya

unread,
May 31, 2023, 9:24:46 AM5/31/23
to sage-devel
I wrote that code into the Sage library and it is supposed to be doing exactly what you proposed (clear denominators and do the computation in the polynomial ring). It is possible the regression was triggered by an update to Singular; it would indeed be helpful to identify a minimal example of the problem and then post it to a ticket.

I believe there are also some upstream bugs with minimal associated primes, e.g., https://github.com/sagemath/sage/issues/29671.

Kiran

enriqu...@gmail.com

unread,
May 31, 2023, 4:20:43 PM5/31/23
to sage-devel
I guess it can be possible to get a smaller example and it may be possible that this code has other problems. My goal is to compute the Fitting ideals of the "abelian" Alexander matrix of a finitely presented group. If you execute and hold the two last paragraphs, for me the execution time of the first of those paragraphs is quite fast while the last one takes really long (I have no patience to say how long if it ends).
I try to provide you a shorter code starting directly with the matrix (print out the list of coefficients and recreate it) but in that case both codes were fast.
So maybe the problem is not on Laurent polynomials but I still share it just in case.
Thanks, Enrique.

LaurentExample.sage

enriqu...@gmail.com

unread,
May 31, 2023, 5:13:32 PM5/31/23
to sage-devel
I tried to compute associated_primes and it works, maybe it is related to the bug.
Reply all
Reply to author
Forward
0 new messages