Skip to content

Commit 3182fb5

Browse files
committed
Add a test
1 parent af7d348 commit 3182fb5

File tree

1 file changed

+25
-5
lines changed

1 file changed

+25
-5
lines changed

src/sage/rings/function_field/khuri_makdisi.pyx

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -838,15 +838,35 @@ cdef class KhuriMakdisi_small(KhuriMakdisi_base):
838838
sage: q2 = G.point(pl2 - b)
839839
sage: G.point(af.divisor()) == q1.addflip(p2)
840840
True
841+
842+
Check that :issue:`40237` is fixed::
843+
844+
sage: K = GF(2)
845+
sage: F.<x> = FunctionField(K)
846+
sage: t = polygen(F)
847+
sage: E.<y> = F.extension(t^3 + (x^2 + x + 1)*t^2 + (x^3 + x + 1)*t + x^5 + x^4)
848+
sage: O = E.maximal_order()
849+
sage: Oinf = E.maximal_order_infinite()
850+
sage: D1 = -5 * O.ideal(x, y).divisor() + O.ideal(x + 1, y^2 + y + 1).divisor() \
851+
....: + O.ideal(x^3 + x^2 + 1, y + x + 1).divisor()
852+
sage: D2 = Oinf.ideal(1/x, y/x^2 + 1).divisor() - 5 * O.ideal(x, y).divisor() \
853+
....: + O.ideal(x^4 + x^3 + 1, y + x).divisor()
854+
sage: assert D1.degree() == 0
855+
sage: assert D2.degree() == 0
856+
sage: J = E.jacobian('km_small')
857+
sage: JD1 = J(D1)
858+
sage: JD2 = J(D2)
859+
sage: JD1 + JD2 == JD2 + JD1
860+
True
841861
"""
842862
cdef int d0 = self.d0
843863
cdef int g = self.g
844864
cdef Matrix w1, w2, w3, w4, w5
845865

846866
w1 = self.mu_image(wd1, wd2, self.mu_mat33, 4*d0 - g + 1)
847-
# The row space of w2 represents H^0(O(3D_0 - D1 - D2)), whose dimension is
848-
# at least d0 - g + 1, and hence the codimension is at most 2*d0. Thus,
849-
# we cannot provide an expected_codim argument for mu_preimage.
867+
# The row space of w2 represents H^0(O(3D_0 - D1 - D2)), whose
868+
# dimension is at least d0 - g + 1. Hence the codimension is at most
869+
# 2*d0, and we cannot provide an expected_codim argument for mu_preimage.
850870
w2 = self.mu_preimage(self.wV3, w1, self.mu_mat33)
851871
w3 = self.mu_preimage(self.wV2, w1, self.mu_mat42, 2*d0)
852872
# efficient than
@@ -896,8 +916,8 @@ cdef class KhuriMakdisi_small(KhuriMakdisi_base):
896916

897917
w1 = self.mu_image(self.wV2, wd, self.mu_mat23, 4*d0 - g + 1)
898918
# The row space of w2 represents H^0(O(2D_0 - D)), whose dimension is
899-
# at least d0 - g + 1, and hence the codimension is at most d0. Thus,
900-
# we cannot provide an expected_codim argument for mu_preimage.
919+
# at least d0 - g + 1. Hence the codimension is at most d0, and we
920+
# cannot provide an expected_codim argument for mu_preimage.
901921
w2 = self.mu_preimage(self.wV3, w1, self.mu_mat23)
902922
# efficient than
903923
# wf = matrix(w2[0])

0 commit comments

Comments
 (0)