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

2023-10-28 Thread John H Palmieri
Thanks for all of your posts, Kwankyu. Helpful and informative. John On Saturday, October 28, 2023 at 6:19:48 AM UTC-7 Kwankyu wrote: > To answer John's question: > > sage: P2. = ProjectiveSpace(QQ, 2) > sage: 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 > sage: C =

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

2023-10-28 Thread G. M.-S.
Thanks, Nils. My question was motivated by using SageMath in my teachings. Do you think it would be difficult/worthwhile taking care of this? I mean, ideals in euclidean rings (or at least in ZZ). Guillermo On Sat, 28 Oct 2023 at 18:44, Nils Bruin wrote: > I'm sure its omission is just an

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

2023-10-28 Thread John H Palmieri
Nils, thanks to you, too, for your responses. On Saturday, October 28, 2023 at 11:16:39 AM UTC-7 Nils Bruin wrote: > On Saturday, 28 October 2023 at 05:39:26 UTC-7 Kwankyu wrote: > > I looked the Magma code in ask.sagemath. There's no problem in computing a > canonical divisor for the curve

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

2023-10-28 Thread Nils Bruin
On Saturday, 28 October 2023 at 10:22:15 UTC-7 G. M.-S. wrote: Thanks, Nils. My question was motivated by using SageMath in my teachings. Do you think it would be difficult/worthwhile taking care of this? I mean, ideals in euclidean rings (or at least in ZZ). Mathematically or

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

2023-10-28 Thread Nils Bruin
On Saturday, 28 October 2023 at 15:26:35 UTC-7 Kwankyu wrote: f1, f2, f3 are univariate polynomials (say in y) over rational function field (say in x). Then x and y are not always the variables X and Y of the coordinate ring of the affine plane. Things are more complicated if the curve is in

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

2023-10-28 Thread Nils Bruin
On Saturday, 28 October 2023 at 05:39:26 UTC-7 Kwankyu wrote: I looked the Magma code in ask.sagemath. There's no problem in computing a canonical divisor for the curve (through the attached function field). Computing a basis of the Riemann-Roch space is no problem as well. Actually the hard

[sage-support] Re: ideal intersection in ZZ

2023-10-28 Thread Nils Bruin
I'm sure its omission is just an oversight. For fractional ideals in number fields it is defined: sage: K.=QuadraticField(7) sage: I=K.fractional_ideal(5) sage: J=K.fractional_ideal(3) sage: I.intersection(J) Fractional ideal (15) I doubt that just knowing a ring is a PID makes computing

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

2023-10-28 Thread Kwankyu
That's actually trivially simple: if [f1,f2,f3] is the basis of your Riemann-Roch space, you just consider the map defined by [f1:f2:f3]. So you lift f1,f2,f3 to rational functions on the affine space that contains your curve: you just take the rational function representation and forget the

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

2023-10-28 Thread Nils Bruin
On Saturday, 28 October 2023 at 18:50:12 UTC-7 Nils Bruin wrote: On Saturday, 28 October 2023 at 15:26:35 UTC-7 Kwankyu wrote: f1, f2, f3 are univariate polynomials (say in y) over rational function field (say in x). Then x and y are not always the variables X and Y of the coordinate ring of

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

2023-10-28 Thread Kwankyu
To answer John's question: sage: P2. = ProjectiveSpace(QQ, 2) sage: 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 sage: C = P2.curve(f) sage: F = C.function_field() sage: z, = F.gens() sage: K = z.differential().divisor() # canonical divisor sage: (-K).dimension() 3 sage: f1,

[sage-support] ideal intersection in ZZ

2023-10-28 Thread G. M.-S.
I wonder why SageMath cannot compute the intersection of 2 ideals in ZZ. Is this due to the fact that ZZ would "only" be a PID? Guillermo ┌┐ │ SageMath version 10.1, Release Date: 2023-08-20│ │ Using

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

2023-10-28 Thread Kwankyu
Hi, I replied to Dima's comment in https://github.com/sagemath/sage/commit/977ace651af9b99689f7b6507f91f8b4e2588ae9#r131138149. Note that the "divisor" method of a curve had existed long before I added function field machinery and attached function fields to curves. Hence actually there are

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

2023-10-28 Thread Kwankyu
Let me mention also the related PR https://github.com/sagemath/sage/pull/35467 which implements Jacobian groups of curves (again via function field), referencing Nils' old code. The PR is long sleeping in draft state. If anyone finds it useful, I may wake it up. On Saturday, October 28,