Re: [sage-support] help debugging latex() printing with trace()

2023-10-27 Thread Dima Pasechnik
On Fri, Oct 27, 2023 at 1:03 AM Eric Majzoub wrote: > > I would like to debug the latex printing of an expression that ambiguous. > > To reproduce it: > t = var('t') > x = function('x')(t) > latex( diff(x,t)^2 ) > > This produces ambiguous output, essentially: > > partial_t x^2 > > instead of > >

[sage-support] How do I compute the Green function of a differential operator?

2023-10-27 Thread Kostas Koudas
In Mathematica, you write: GreenFunction[{-u''[x], u[0] == 0, u[1] == 0}, u[x], {x, 0, 1}, y] and it gives you the Green function of the operator *L=-d^2/dx^2* (the first argument, -u''[x]). I want a corresponding function in SageMath. Thanks in advance! -- You received this message because

[sage-support] Re: Canonical divisor help

2023-10-27 Thread Nils Bruin
On Friday, 27 October 2023 at 15:42:24 UTC-7 Nils Bruin wrote: It doesn't look like we quite have computation of Riemann-Roch spaces natively in sage yet Correction, that DOES seem to be implemented as well: sage: kC=C.function_field() sage:

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

2023-10-27 Thread Dima Pasechnik
On Sat, Oct 28, 2023 at 1:02 AM John H Palmieri wrote: > Yes, I noticed that, too. It also fails to provide any information about what > ``v`` should be (beyond saying that it should be a "valid object"): there is > no INPUT block. I've left a comment here:

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

2023-10-27 Thread John H Palmieri
Hi Dima, Yes, I noticed that, too. It also fails to provide any information about what ``v`` should be (beyond saying that it should be a "valid object"): there is no INPUT block. On Friday, October 27, 2023 at 3:51:10 PM UTC-7 Dima Pasechnik wrote: > By the way, the docstring of divisor()

[sage-support] Re: help debugging latex() printing with trace()

2023-10-27 Thread Nils Bruin
On Thursday, 26 October 2023 at 16:03:27 UTC-7 Eric Majzoub wrote: I would like to debug the latex printing of an expression that ambiguous. To reproduce it: t = var('t') x = function('x')(t) latex( diff(x,t)^2 ) This produces ambiguous output, essentially: partial_t x^2 instead of

[sage-support] Canonical divisor help

2023-10-27 Thread John H Palmieri
If anyone here knows anything about canonical divisors and their implementation in Sage, please see https://ask.sagemath.org/question/74034/converting-algebraic-geometry-magmas-code-to-sage/. The setup: 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 +

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

2023-10-27 Thread Dima Pasechnik
By the way, the docstring of divisor() misses an example, it's def divisor(self, v, base_ring=None, check=True, reduce=True): r""" Return the divisor specified by ``v``. .. WARNING:: The coefficients of the divisor must be in the base ring and

[sage-support] Re: Canonical divisor help

2023-10-27 Thread Nils Bruin
A canonical divisor is the divisor of any differential on C so the following does the trick: sage: kC=C.function_field() sage: kC(kC.base_field().gen(0)).differential().divisor() It doesn't look like we quite have computation of Riemann-Roch spaces natively in sage yet, so finding effective