Skip to content

Commit 63b5554

Browse files
author
Release Manager
committed
gh-40240: Fix a bug in khuri-makdisi small model <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes #12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes #12345". --> Fixes #40237. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [x] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - #12345: short description why this is a dependency --> <!-- - #34567: ... --> URL: #40240 Reported by: Kwankyu Lee Reviewer(s): Kwankyu Lee, Vincent Macri
2 parents c81c2ab + 2d2592d commit 63b5554

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

src/sage/rings/function_field/khuri_makdisi.pyx

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -819,13 +819,34 @@ cdef class KhuriMakdisi_small(KhuriMakdisi_base):
819819
sage: q2 = G.point(pl2 - b)
820820
sage: G.point(af.divisor()) == q1.addflip(p2)
821821
True
822+
823+
Check that :issue:`40237` is fixed::
824+
825+
sage: K = GF(2)
826+
sage: F.<x> = FunctionField(K)
827+
sage: t = polygen(F)
828+
sage: E.<y> = F.extension(t^3 + (x^2 + x + 1)*t^2 + (x^3 + x + 1)*t + x^5 + x^4)
829+
sage: O = E.maximal_order()
830+
sage: Oinf = E.maximal_order_infinite()
831+
sage: D1 = (-5*O.ideal(x, y).divisor() + O.ideal(x + 1, y^2 + y + 1).divisor()
832+
....: + O.ideal(x^3 + x^2 + 1, y + x + 1).divisor())
833+
sage: D2 = (Oinf.ideal(1/x, y/x^2 + 1).divisor() - 5*O.ideal(x, y).divisor()
834+
....: + O.ideal(x^4 + x^3 + 1, y + x).divisor())
835+
sage: J = E.jacobian('km_small', base_div=5*O.ideal(x, y).divisor())
836+
sage: JD1 = J(D1)
837+
sage: JD2 = J(D2)
838+
sage: JD1 + JD2 == JD2 + JD1
839+
True
822840
"""
823841
cdef int d0 = self.d0
824842
cdef int g = self.g
825843
cdef Matrix w1, w2, w3, w4, w5
826844

827845
w1 = self.mu_image(wd1, wd2, self.mu_mat33, 4*d0 - g + 1)
828-
w2 = self.mu_preimage(self.wV3, w1, self.mu_mat33, 2*d0)
846+
# The row space of w2 represents H^0(O(3D_0 - D1 - D2)), whose
847+
# dimension is at least d0 - g + 1. Hence the codimension is at most
848+
# 2*d0, and we cannot provide an expected_codim argument for mu_preimage.
849+
w2 = self.mu_preimage(self.wV3, w1, self.mu_mat33)
829850
w3 = self.mu_preimage(self.wV2, w1, self.mu_mat42, 2*d0)
830851
# efficient than
831852
# wf = matrix(w2[0])
@@ -872,8 +893,8 @@ cdef class KhuriMakdisi_small(KhuriMakdisi_base):
872893

873894
w1 = self.mu_image(self.wV2, wd, self.mu_mat23, 4*d0 - g + 1)
874895
# The row space of w2 represents H^0(O(2D_0 - D)), whose dimension is
875-
# at least d0 - g + 1, and hence the codimension is at most d0. Thus,
876-
# we cannot provide an expected_codim argument for mu_preimage.
896+
# at least d0 - g + 1. Hence the codimension is at most d0, and we
897+
# cannot provide an expected_codim argument for mu_preimage.
877898
w2 = self.mu_preimage(self.wV3, w1, self.mu_mat23)
878899
# efficient than
879900
# wf = matrix(w2[0])

0 commit comments

Comments
 (0)