Skip to content

Commit

Permalink
sagemathgh-39150: Fix a bug in Khuri-Makdisi small model of Jacobian
Browse files Browse the repository at this point in the history
    
<!-- ^ 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 sagemath#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 sagemath#12345". -->

Fixes sagemath#39148.

### 📝 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,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39150
Reported by: Kwankyu Lee
Reviewer(s): Kwankyu Lee, Vincent Macri
  • Loading branch information
Release Manager committed Dec 20, 2024
2 parents bb3505c + ecaa89b commit 4e3005d
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/sage/rings/function_field/khuri_makdisi.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -871,13 +871,31 @@ cdef class KhuriMakdisi_small(KhuriMakdisi_base):
sage: p2 = G.point(pl2 - b)
sage: -(-p1) == p1 # indirect doctest
True
Check that :issue:`39148` is fixed::
sage: # long time
sage: k.<x> = FunctionField(GF(17)); t = polygen(k)
sage: F.<y> = k.extension(t^4 + (14*x + 14)*t^3 + 9*t^2 + (10*x^2 + 15*x + 8)*t
....: + 7*x^3 + 15*x^2 + 6*x + 16)
sage: infty1, infty2 = F.places_infinite()
sage: O = F.maximal_order()
sage: P = O.ideal((x + 1, y + 7)).divisor()
sage: D1 = 3*infty2 + infty1 - 4*P
sage: D2 = F.divisor_group().zero()
sage: J = F.jacobian(model='km-small', base_div=4*P)
sage: J(D1) + J(D2) == J(D1)
True
"""
cdef int d0 = self.d0
cdef int g = self.g
cdef Matrix w1, w2, w3, w4

w1 = self.mu_image(self.wV2, wd, self.mu_mat23, 4*d0 - g + 1)
w2 = self.mu_preimage(self.wV3, w1, self.mu_mat23, d0)
# The row space of w2 represents H^0(O(2D_0 - D)), whose dimension is
# at least d0 - g + 1, and hence the codimension is at most d0. Thus,
# we cannot provide an expected_codim argument for mu_preimage.
w2 = self.mu_preimage(self.wV3, w1, self.mu_mat23)
# efficient than
# wf = matrix(w2[0])
# w3 = self.mu_image(wf, self.wV4, self.mu_mat24, 4*d0 - g + 1)
Expand Down

0 comments on commit 4e3005d

Please sign in to comment.