Now with (draft) PR

https://github.com/sagemath/sage/pull/36592

the ask.sagemath problem is solved by

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()
K = kC.gen().differential().divisor()  # canonical divisor
basis = (-K).basis_function_space()
Basis = [C._pull_from_function_field(f) for f in basis]
phi = C.hom(Basis, P2)
D = phi.image()  # conic
assert D.degree() == 2
D

On Monday, October 30, 2023 at 8:11:05 AM UTC+9 Kwankyu wrote:

> This is simpler
>
> sage: psi = C.hom(liftedbasis, P2)
> sage: psi.image()
> Closed subscheme of Projective Space of dimension 2 over Rational Field 
> defined by:
>   x^2 + x*y + 2*y*z
>
>
> On Monday, October 30, 2023 at 5:45:27 AM UTC+9 Nils Bruin wrote:
>
>
>
> 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/79431f03-f623-4654-a4c6-cbfe8425c49bn%40googlegroups.com.

Reply via email to