Re: [sage-support] Computing the kernel of a map between polynomial algebras

2023-10-30 Thread John H Palmieri
Thanks, Dima. That works for me, too, and it's much faster than Sage was. Now I'm trying some bigger examples... On Monday, October 30, 2023 at 3:56:00 PM UTC-7 Dima Pasechnik wrote: > Hi John, > I tried running msolve on your input (more precisely, converting it > into the problem of >

Re: [sage-support] Re: ideal intersection in ZZ

2023-10-30 Thread G. M.-S.
Nils, Thanks for your patience and sorry for my ignorance. Guillermo On Sun, 29 Oct 2023 at 21:31, Nils Bruin wrote: > On Monday, 30 October 2023 at 00:26:55 UTC+13 G. M.-S. wrote: > > If I understand you correctly, SageMath is a bit loose at the moment about > its categories. > > > That's

Re: [sage-support] Computing the kernel of a map between polynomial algebras

2023-10-30 Thread Dima Pasechnik
Hi John, I tried running msolve on your input (more precisely, converting it into the problem of finding the Grobner basis w.r.t. to the elimination order, as I explained), and I see that it's an injective map. Computation takes about 3 minutes on an old laptop. Specifically, I merely run msolve

Re: [sage-support] Computing the kernel of a map between polynomial algebras

2023-10-30 Thread Dima Pasechnik
On Mon, 30 Oct 2023, 20:50 Dima Pasechnik, wrote: > > > On Mon, 30 Oct 2023, 20:25 John H Palmieri, > wrote: > >> >> >> On Monday, October 30, 2023 at 12:28:18 PM UTC-7 Dima Pasechnik wrote: >> >> On Mon, Oct 30, 2023 at 5:04 PM John H Palmieri >> wrote: >> > >> > Are endomorphisms better to

Re: [sage-support] Computing the kernel of a map between polynomial algebras

2023-10-30 Thread Dima Pasechnik
On Mon, 30 Oct 2023, 20:25 John H Palmieri, wrote: > > > On Monday, October 30, 2023 at 12:28:18 PM UTC-7 Dima Pasechnik wrote: > > On Mon, Oct 30, 2023 at 5:04 PM John H Palmieri > wrote: > > > > Are endomorphisms better to work with? I might be able to extend my map > to an endomorphism of

Re: [sage-support] Computing the kernel of a map between polynomial algebras

2023-10-30 Thread John H Palmieri
On Monday, October 30, 2023 at 12:28:18 PM UTC-7 Dima Pasechnik wrote: On Mon, Oct 30, 2023 at 5:04 PM John H Palmieri wrote: > > Are endomorphisms better to work with? I might be able to extend my map to an endomorphism of the larger ring, if that would make the computation easier.

Re: [sage-support] Computing the kernel of a map between polynomial algebras

2023-10-30 Thread Dima Pasechnik
On Mon, Oct 30, 2023 at 5:04 PM John H Palmieri wrote: > > Are endomorphisms better to work with? I might be able to extend my map to an > endomorphism of the larger ring, if that would make the computation easier. > Probably just send xi1 -> xi1, xi2 -> xi2, etc. these are "already there",

Re: [sage-support] Computing the kernel of a map between polynomial algebras

2023-10-30 Thread Dima Pasechnik
On Mon, Oct 30, 2023 at 5:02 PM John H Palmieri wrote: > > So Sage doesn't already use Gröbner bases when computing kernels of such > maps? Okay, I'll try that. yes, it certainly does. I just thought that using a non-default Gröbner basis backend would help. (and you can only do this if you

Re: [sage-support] Computing the kernel of a map between polynomial algebras

2023-10-30 Thread John H Palmieri
Are endomorphisms better to work with? I might be able to extend my map to an endomorphism of the larger ring, if that would make the computation easier. Probably just send xi1 -> xi1, xi2 -> xi2, etc. On Monday, October 30, 2023 at 7:14:16 AM UTC-7 Dima Pasechnik wrote: > On Mon, Oct 30, 2023

Re: [sage-support] Computing the kernel of a map between polynomial algebras

2023-10-30 Thread John H Palmieri
So Sage doesn't already use Gröbner bases when computing kernels of such maps? Okay, I'll try that. Now that I've looked at the code a little bit, I see that `phi.is_injective()` just calls `phi.kernel()` and checks whether it's zero. I was hoping that there was something more clever: if I

Re: [sage-support] Re: Canonical divisor help

2023-10-30 Thread Kwankyu
Now with (draft) PR https://github.com/sagemath/sage/pull/36592 the ask.sagemath problem is solved by P2. = ProjectiveSpace(QQ, 2) f = 2*x^5 - 4*x^3*y*z + x^2*y*z^2 + 2*x*y^3*z + 2*x*y^2*z^2+ y^5 C = Curve(f) kC = C.function_field() K = kC.gen().differential().divisor() # canonical divisor

Re: [sage-support] Computing the kernel of a map between polynomial algebras

2023-10-30 Thread Dima Pasechnik
On Mon, Oct 30, 2023 at 12:54 PM Kwankyu wrote: > > Isn't this what you want? > > sage: R. = QQ[] > sage: phi = R.hom([x,x]) > sage: phi > Ring endomorphism of Multivariate Polynomial Ring in x, y over Rational Field > Defn: x |--> x > y |--> x > sage: phi.kernel() > Ideal (x - y) of

Re: [sage-support] Computing the kernel of a map between polynomial algebras

2023-10-30 Thread Kwankyu
Isn't this what you want? sage: R. = QQ[] sage: phi = R.hom([x,x]) sage: phi Ring endomorphism of Multivariate Polynomial Ring in x, y over Rational Field Defn: x |--> x y |--> x sage: phi.kernel() Ideal (x - y) of Multivariate Polynomial Ring in x, y over Rational Field On Monday,

Re: [sage-support] Computing the kernel of a map between polynomial algebras

2023-10-30 Thread Dima Pasechnik
On Mon, 30 Oct 2023, 05:57 John H Palmieri, wrote: > Does anyone have any tips for how to compute the kernel of a map between > polynomial algebras, or for checking whether the map is injective? I have > families of such maps involving algebras with many generators. I'm working > over GF(2), if