Skip to content

Commit

Permalink
gh-37915: Replace doctests from jacobian_khuri_makdisi.py taking too …
Browse files Browse the repository at this point in the history
…long time

<!-- ^ 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". -->

We replace doctest examples in  the module
`sage.rings.function_field.jacobian_khuri_makdisi` that are taking too
long time with smaller examples.

Before:
```
sage -t --warn-long 112.9 --random-
seed=138126942635581110821969675305757234065
src/sage/rings/function_field/jacobian_khuri_makdisi.py
    [273 tests, 162.67 s]
```
After:
```
sage -t --warn-long 113.1 --random-
seed=197118826408466343693096609510579001704
src/sage/rings/function_field/jacobian_khuri_makdisi.py
    [272 tests, 122.30 s]
```

### 📝 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.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] 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: #37915
Reported by: Kwankyu Lee
Reviewer(s): Matthias Köppe
  • Loading branch information
Release Manager committed May 2, 2024
2 parents 422c59e + 37c3622 commit e77b3df
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 30 deletions.
6 changes: 3 additions & 3 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=configure-VERSION.tar.gz
sha1=2d6779beb2e69f0f7bddc2edc44ad275442ffd29
md5=789344e03a6b57ba1538c0c760449720
cksum=3806733369
sha1=5da9946e7249ffdf12d17f3b6230c86682c93363
md5=3d3d50c0aabe221a52c8d0aab3504d2d
cksum=3205922382
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0a7b2513287af1124a358c2494b8bef4668a1882
e81131a046308b700e862adabf9d4231447805ac
52 changes: 26 additions & 26 deletions src/sage/rings/function_field/jacobian_khuri_makdisi.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,36 +496,36 @@ class JacobianGroupEmbedding(Map):
EXAMPLES::
sage: k = GF(7)
sage: k = GF(5)
sage: P2.<x,y,z> = ProjectiveSpace(k, 2)
sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
sage: C = Curve(x^3 + z^3 - y^2*z, P2)
sage: h = C.function(y/x).divisor_of_poles()
sage: J = C.jacobian(model='km_large', base_div=h)
sage: G1 = J.group()
sage: K = k.extension(3)
sage: G3 = J.group(K)
sage: G3.coerce_map_from(G1)
sage: K = k.extension(2)
sage: G2 = J.group(K)
sage: G2.coerce_map_from(G1)
Jacobian group embedding map:
From: Group of rational points of Jacobian
over Finite Field of size 7 (Khuri-Makdisi large model)
over Finite Field of size 5 (Khuri-Makdisi large model)
To: Group of rational points of Jacobian
over Finite Field in z3 of size 7^3 (Khuri-Makdisi large model)
over Finite Field in z2 of size 5^2 (Khuri-Makdisi large model)
"""
def __init__(self, base_group, extension_group):
"""
Initialize.
TESTS::
sage: k = GF(7)
sage: k = GF(5)
sage: P2.<x,y,z> = ProjectiveSpace(k, 2)
sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
sage: C = Curve(x^3 + z^3 - y^2*z, P2)
sage: h = C.function(y/x).divisor_of_poles()
sage: J = C.jacobian(model='km_large', base_div=h)
sage: G1 = J.group()
sage: K = k.extension(3)
sage: G3 = J.group(K)
sage: map = G3.coerce_map_from(G1)
sage: K = k.extension(2)
sage: G2 = J.group(K)
sage: map = G2.coerce_map_from(G1)
sage: TestSuite(map).run(skip=['_test_category', '_test_pickling'])
"""
F_ext = extension_group._function_field
Expand All @@ -541,20 +541,20 @@ def _repr_type(self):
TESTS::
sage: k = GF(7)
sage: k = GF(5)
sage: P2.<x,y,z> = ProjectiveSpace(k, 2)
sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
sage: C = Curve(x^3 + z^3 - y^2*z, P2)
sage: h = C.function(y/x).divisor_of_poles()
sage: J = C.jacobian(model='km_large', base_div=h)
sage: G1 = J.group()
sage: K = k.extension(3)
sage: G3 = J.group(K)
sage: G3.coerce_map_from(G1) # indirect doctest
sage: K = k.extension(2)
sage: G2 = J.group(K)
sage: G2.coerce_map_from(G1) # indirect doctest
Jacobian group embedding map:
From: Group of rational points of Jacobian
over Finite Field of size 7 (Khuri-Makdisi large model)
over Finite Field of size 5 (Khuri-Makdisi large model)
To: Group of rational points of Jacobian
over Finite Field in z3 of size 7^3 (Khuri-Makdisi large model)
over Finite Field in z2 of size 5^2 (Khuri-Makdisi large model)
"""
return 'Jacobian group embedding'

Expand All @@ -564,16 +564,16 @@ def _call_(self, x):
TESTS::
sage: k = GF(7)
sage: k = GF(5)
sage: P2.<x,y,z> = ProjectiveSpace(k, 2)
sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
sage: C = Curve(x^3 + z^3 - y^2*z, P2)
sage: h = C.function(y/x).divisor_of_poles()
sage: J = C.jacobian(model='km_large', base_div=h)
sage: G1 = J.group()
sage: K = k.extension(3)
sage: G3 = J.group(K)
sage: m = G3.coerce_map_from(G1)
sage: m(G1.zero()) == G3.zero()
sage: K = k.extension(2)
sage: G2 = J.group(K)
sage: m = G2.coerce_map_from(G1)
sage: m(G1.zero()) == G2.zero()
True
"""
w = (x._w).change_ring(self._K_ext)
Expand Down Expand Up @@ -895,7 +895,7 @@ def __iter__(self):
sage: b = C([0,0,1]).place()
sage: J = C.jacobian(model='km_large', base_div=3*b)
sage: G = J.group()
sage: len([pt for pt in G])
sage: len([pt for pt in G]) # long time
11
"""
d0 = self._base_div.degree()
Expand Down

0 comments on commit e77b3df

Please sign in to comment.