On Monday, 30 October 2023 at 00:19:47 UTC+13 Kwankyu wrote:
What is your code? P2.<x,y,z> = 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() D = kC(kC.base_field().gen(0)).differential().divisor() L,m,s = (-D).function_space() #the routine below is a bit of a shortcut based on how the affine patch for kC #is chosen. In more general code this would need to be a little more sophisticated def liftkC(u): return sum([(m.numerator()(y/x))/(m.denominator()(y/x))*(z/x)^i for i,m in enumerate(u.list())]) liftedbasis = [liftkC(m(b)) for b in L.basis()] den = lcm([b.denominator() for b in liftedbasis]) liftedbasis = [parent(x)(b*den) for b in liftedbasis] phi = P2.hom(liftedbasis,P2) phi(C) # this fails C._forward_image(phi,check=False) #this seems to work! Of course, one could also do some linear algebra with (-D).function_space() and (-2*D).function_space() to figure out this image. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/41cd62ea-4707-4ebc-bc5c-f37427a0f0c6n%40googlegroups.com.