Bug in integration on a Riemann surface

125 views
Skip to first unread message

Linden Disney

unread,
Jan 22, 2024, 6:03:20 AM1/22/24
to sage-devel
In Sage 9.8 I ran the following code:

    R.<z,x> = QQ[]
    f = x*(1^5+z^5) + (x*1*z)^2 - x^4*1*z - 2*1^3*z^3
    S = Curve(f).riemann_surface()
    S.riemann_matrix()

and got a ValueError occurring inside rigorous_line_integral. This error doesn't occur if instead for the first line I used "R.<x,z> = QQ[]" (swapping the order of x and z). Can anyone replicate the error? If so please let me know and I will open a ticket about this and have a look, as I wrote the rigorous_line_integral code. 

Dima Pasechnik

unread,
Jan 22, 2024, 6:33:34 AM1/22/24
to sage-...@googlegroups.com
yes, also can be seen on Sage 10.3.beta4

HTH
Dima

Nils Bruin

unread,
Jan 22, 2024, 12:57:50 PM1/22/24
to sage-devel
More importantly, the error also doesn't occur with

S = Curve(f).riemann_surface(integration_method="heuristic")

so it's indeed in the newer code. The fact that swapping x,z makes the error disappear is also unsurprising: entirely different path integrals are executed.

As an indication for what is likely happening, on line 2211:

delta_z and rho_z seem to be indistinguishable, forcing Delta and M to be +infinity. Path splitting should definitely happen here. I think delta_z should have been smaller than rho_z when you reach this point, so I think the code should have bailed before.

Linden Disney

unread,
Feb 23, 2024, 6:30:44 AM2/23/24
to sage-devel
As a note, I have now raised an issue https://github.com/sagemath/sage/issues/37438 about this on github. 
Reply all
Reply to author
Forward
0 new messages