passagemath-sympow 10.6.43__cp312-abi3-musllinux_1_2_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. passagemath_sympow/__init__.py +3 -0
  2. passagemath_sympow-10.6.43.dist-info/METADATA +114 -0
  3. passagemath_sympow-10.6.43.dist-info/RECORD +43 -0
  4. passagemath_sympow-10.6.43.dist-info/WHEEL +5 -0
  5. passagemath_sympow-10.6.43.dist-info/top_level.txt +3 -0
  6. sage/all__sagemath_sympow.py +17 -0
  7. sage/lfunctions/all__sagemath_sympow.py +7 -0
  8. sage/lfunctions/sympow.py +424 -0
  9. sage/libs/all__sagemath_sympow.py +1 -0
  10. sage/libs/sympow.abi3.so +0 -0
  11. sage/libs/sympow.pyx +1 -0
  12. sage_wheels/bin/sympow +0 -0
  13. sage_wheels/libexec/sympow/new_data +43 -0
  14. sage_wheels/share/sympow/datafiles/A012M.txt +1 -0
  15. sage_wheels/share/sympow/datafiles/A012S.txt +1 -0
  16. sage_wheels/share/sympow/datafiles/A013M.txt +1 -0
  17. sage_wheels/share/sympow/datafiles/A013S.txt +1 -0
  18. sage_wheels/share/sympow/datafiles/A014M.txt +1 -0
  19. sage_wheels/share/sympow/datafiles/A014S.txt +1 -0
  20. sage_wheels/share/sympow/datafiles/A015M.txt +1 -0
  21. sage_wheels/share/sympow/datafiles/A015S.txt +1 -0
  22. sage_wheels/share/sympow/datafiles/A016M.txt +1 -0
  23. sage_wheels/share/sympow/datafiles/A016S.txt +1 -0
  24. sage_wheels/share/sympow/datafiles/A017M.txt +1 -0
  25. sage_wheels/share/sympow/datafiles/A017S.txt +1 -0
  26. sage_wheels/share/sympow/datafiles/A018M.txt +1 -0
  27. sage_wheels/share/sympow/datafiles/A018S.txt +1 -0
  28. sage_wheels/share/sympow/datafiles/A019M.txt +1 -0
  29. sage_wheels/share/sympow/datafiles/A019S.txt +1 -0
  30. sage_wheels/share/sympow/datafiles/A01OM.txt +1 -0
  31. sage_wheels/share/sympow/datafiles/A01OS.txt +1 -0
  32. sage_wheels/share/sympow/datafiles/M02HM.txt +1 -0
  33. sage_wheels/share/sympow/datafiles/M02HS.txt +1 -0
  34. sage_wheels/share/sympow/datafiles/M02LM.txt +1 -0
  35. sage_wheels/share/sympow/datafiles/M02LS.txt +1 -0
  36. sage_wheels/share/sympow/datafiles/m01EM.txt +1 -0
  37. sage_wheels/share/sympow/datafiles/m01ES.txt +1 -0
  38. sage_wheels/share/sympow/datafiles/m02EM.txt +1 -0
  39. sage_wheels/share/sympow/datafiles/m02ES.txt +1 -0
  40. sage_wheels/share/sympow/datafiles/param_data +13 -0
  41. sage_wheels/share/sympow/standard1.gp +24 -0
  42. sage_wheels/share/sympow/standard2.gp +24 -0
  43. sage_wheels/share/sympow/standard3.gp +7 -0
@@ -0,0 +1,3 @@
1
+ # sage_setup: distribution = sagemath-sympow
2
+
3
+ from sage.all__sagemath_sympow import *
@@ -0,0 +1,114 @@
1
+ Metadata-Version: 2.4
2
+ Name: passagemath-sympow
3
+ Version: 10.6.43
4
+ Summary: passagemath: Special values of symmetric power elliptic curve L-functions with sympow
5
+ Author-email: The Sage Developers <sage-support@googlegroups.com>
6
+ Maintainer: Matthias Köppe, passagemath contributors
7
+ License-Expression: GPL-2.0-or-later
8
+ Project-URL: release notes, https://github.com/passagemath/passagemath/releases
9
+ Project-URL: repo (upstream), https://github.com/sagemath/sage
10
+ Project-URL: repo, https://github.com/passagemath/passagemath
11
+ Project-URL: documentation, https://passagemath.org/docs/latest
12
+ Project-URL: homepage (upstream), https://www.sagemath.org
13
+ Project-URL: discourse, https://passagemath.discourse.group
14
+ Project-URL: tracker (upstream), https://github.com/sagemath/sage/issues
15
+ Project-URL: tracker, https://github.com/passagemath/passagemath/issues
16
+ Classifier: Development Status :: 6 - Mature
17
+ Classifier: Intended Audience :: Education
18
+ Classifier: Intended Audience :: Science/Research
19
+ Classifier: Operating System :: POSIX
20
+ Classifier: Operating System :: POSIX :: Linux
21
+ Classifier: Operating System :: MacOS :: MacOS X
22
+ Classifier: Programming Language :: Python :: 3 :: Only
23
+ Classifier: Programming Language :: Python :: 3.10
24
+ Classifier: Programming Language :: Python :: 3.11
25
+ Classifier: Programming Language :: Python :: 3.12
26
+ Classifier: Programming Language :: Python :: 3.13
27
+ Classifier: Programming Language :: Python :: 3.14
28
+ Classifier: Programming Language :: Python :: Implementation :: CPython
29
+ Classifier: Topic :: Scientific/Engineering :: Mathematics
30
+ Requires-Python: <3.15,>=3.10
31
+ Description-Content-Type: text/x-rst
32
+ Provides-Extra: test
33
+ Requires-Dist: passagemath-schemes; extra == "test"
34
+ Requires-Dist: passagemath-linbox; extra == "test"
35
+ Requires-Dist: passagemath-repl; extra == "test"
36
+
37
+ =====================================================================================
38
+ passagemath: Special values of symmetric power elliptic curve L-functions with sympow
39
+ =====================================================================================
40
+
41
+ `passagemath <https://github.com/passagemath/passagemath>`__ is open
42
+ source mathematical software in Python, released under the GNU General
43
+ Public Licence GPLv2+.
44
+
45
+ It is a fork of `SageMath <https://www.sagemath.org/>`__, which has been
46
+ developed 2005-2025 under the motto “Creating a Viable Open Source
47
+ Alternative to Magma, Maple, Mathematica, and MATLAB”.
48
+
49
+ The passagemath fork uses the motto "Creating a Free Passage Between the
50
+ Scientific Python Ecosystem and Mathematical Software Communities."
51
+ It was created in October 2024 with the following goals:
52
+
53
+ - providing modularized installation with pip,
54
+ - establishing first-class membership in the scientific Python
55
+ ecosystem,
56
+ - giving `clear attribution of upstream
57
+ projects <https://groups.google.com/g/sage-devel/c/6HO1HEtL1Fs/m/G002rPGpAAAJ>`__,
58
+ - providing independently usable Python interfaces to upstream
59
+ libraries,
60
+ - offering `platform portability and integration testing
61
+ services <https://github.com/passagemath/passagemath/issues/704>`__
62
+ to upstream projects,
63
+ - inviting collaborations with upstream projects,
64
+ - `building a professional, respectful, inclusive
65
+ community <https://groups.google.com/g/sage-devel/c/xBzaINHWwUQ>`__,
66
+ - `empowering Sage users to participate in the scientific Python ecosystem
67
+ <https://github.com/passagemath/passagemath/issues/248>`__ by publishing packages,
68
+ - developing a port to `Pyodide <https://pyodide.org/en/stable/>`__ for
69
+ serverless deployment with Javascript,
70
+ - developing a native Windows port.
71
+
72
+ `Full documentation <https://passagemath.org/docs/latest/html/en/index.html>`__ is
73
+ available online.
74
+
75
+ passagemath attempts to support and provides binary wheels suitable for
76
+ all major Linux distributions and recent versions of macOS.
77
+
78
+ Binary wheels for native Windows (x86_64) are are available for a subset of
79
+ the passagemath distributions. Use of the full functionality of passagemath
80
+ on Windows currently requires the use of Windows Subsystem for Linux (WSL)
81
+ or virtualization.
82
+
83
+ The supported Python versions in the passagemath 10.6.x series are 3.10.x-3.14.x.
84
+
85
+
86
+ About this pip-installable distribution package
87
+ -----------------------------------------------
88
+
89
+ This pip-installable distribution ``passagemath-sympow`` provides an interface
90
+ to sympow.
91
+
92
+
93
+ What is included
94
+ ----------------
95
+
96
+ * Binary wheels on PyPI contain prebuilt copies of the sympow executable and data files.
97
+
98
+
99
+ Examples
100
+ --------
101
+
102
+ Using the sympow program on the command line::
103
+
104
+ $ pipx run --pip-args="--prefer-binary" --spec "passagemath-sympow" sage -sh -c sympow
105
+
106
+
107
+ Finding the installation location of the sympow executable::
108
+
109
+ $ pipx run --pip-args="--prefer-binary" --spec "passagemath-sympow[test]" ipython
110
+
111
+ In [1]: from sage.features.lrs import LrsNash
112
+
113
+ In [2]: LrsNash().absolute_filename()
114
+ Out[2]: '/Users/mkoeppe/.local/pipx/.cache/db3f5a0e2996f81/lib/python3.11/site-packages/sage_wheels/bin/lrsnash'
@@ -0,0 +1,43 @@
1
+ passagemath_sympow/__init__.py,sha256=Ep7K0DFxKu4rwSXyseeKjelZQvQtrpA6_dkGULuQ5ng,86
2
+ sage/all__sagemath_sympow.py,sha256=Cuovg0JqrDrWSwP2h2LMIErEH7QID2ijfGScMFWyr1g,356
3
+ sage/lfunctions/all__sagemath_sympow.py,sha256=obBm1i3iPXkic7eZmtkG3qlsOo6EgKwOwMHTzQG51Xw,158
4
+ sage/lfunctions/sympow.py,sha256=ZMX6wQsXTS0i93PGx39NA0y1Pi49FTcmJOl5aWjtie0,14187
5
+ sage/libs/all__sagemath_sympow.py,sha256=xt-4MuDOFRKo25LAAglALz7ESIBIiQv_7l8VzVYw4Zc,45
6
+ sage/libs/sympow.abi3.so,sha256=lpPjUTD-L518yHdvGINLazTHXQlAbahkdiCjD4K65SA,46368
7
+ sage/libs/sympow.pyx,sha256=xt-4MuDOFRKo25LAAglALz7ESIBIiQv_7l8VzVYw4Zc,45
8
+ sage_wheels/bin/sympow,sha256=nnTKUADRyEXIxvhM0oHfPzIqJYXc76nmRyr2K2AKj0Q,1323872
9
+ sage_wheels/libexec/sympow/new_data,sha256=F060BmFoGkihyUptBAfw0DpwFYZUemhykIaHKfHE4Ns,957
10
+ sage_wheels/share/sympow/standard1.gp,sha256=kdsKt-9UqXcJN-XWlz9a5NXlgO88tmRWbZyh-903MmM,838
11
+ sage_wheels/share/sympow/standard2.gp,sha256=2Ejuk9vr9Ot1UAjlI8f-DSaJyeD8wnGc8ii3Rx8XniY,1036
12
+ sage_wheels/share/sympow/standard3.gp,sha256=qh9UOhtfsVTzd-5zKYOmacC0E0foJnidizC6HB0zqYs,341
13
+ sage_wheels/share/sympow/datafiles/A012M.txt,sha256=jRCcDINHJOEm37KbjEXyCZQKMg9VSR_83_K5VmsWhq8,4
14
+ sage_wheels/share/sympow/datafiles/A012S.txt,sha256=jRCcDINHJOEm37KbjEXyCZQKMg9VSR_83_K5VmsWhq8,4
15
+ sage_wheels/share/sympow/datafiles/A013M.txt,sha256=jRCcDINHJOEm37KbjEXyCZQKMg9VSR_83_K5VmsWhq8,4
16
+ sage_wheels/share/sympow/datafiles/A013S.txt,sha256=jRCcDINHJOEm37KbjEXyCZQKMg9VSR_83_K5VmsWhq8,4
17
+ sage_wheels/share/sympow/datafiles/A014M.txt,sha256=jRCcDINHJOEm37KbjEXyCZQKMg9VSR_83_K5VmsWhq8,4
18
+ sage_wheels/share/sympow/datafiles/A014S.txt,sha256=jRCcDINHJOEm37KbjEXyCZQKMg9VSR_83_K5VmsWhq8,4
19
+ sage_wheels/share/sympow/datafiles/A015M.txt,sha256=jRCcDINHJOEm37KbjEXyCZQKMg9VSR_83_K5VmsWhq8,4
20
+ sage_wheels/share/sympow/datafiles/A015S.txt,sha256=jRCcDINHJOEm37KbjEXyCZQKMg9VSR_83_K5VmsWhq8,4
21
+ sage_wheels/share/sympow/datafiles/A016M.txt,sha256=jRCcDINHJOEm37KbjEXyCZQKMg9VSR_83_K5VmsWhq8,4
22
+ sage_wheels/share/sympow/datafiles/A016S.txt,sha256=jRCcDINHJOEm37KbjEXyCZQKMg9VSR_83_K5VmsWhq8,4
23
+ sage_wheels/share/sympow/datafiles/A017M.txt,sha256=jRCcDINHJOEm37KbjEXyCZQKMg9VSR_83_K5VmsWhq8,4
24
+ sage_wheels/share/sympow/datafiles/A017S.txt,sha256=jRCcDINHJOEm37KbjEXyCZQKMg9VSR_83_K5VmsWhq8,4
25
+ sage_wheels/share/sympow/datafiles/A018M.txt,sha256=jRCcDINHJOEm37KbjEXyCZQKMg9VSR_83_K5VmsWhq8,4
26
+ sage_wheels/share/sympow/datafiles/A018S.txt,sha256=jRCcDINHJOEm37KbjEXyCZQKMg9VSR_83_K5VmsWhq8,4
27
+ sage_wheels/share/sympow/datafiles/A019M.txt,sha256=jRCcDINHJOEm37KbjEXyCZQKMg9VSR_83_K5VmsWhq8,4
28
+ sage_wheels/share/sympow/datafiles/A019S.txt,sha256=jRCcDINHJOEm37KbjEXyCZQKMg9VSR_83_K5VmsWhq8,4
29
+ sage_wheels/share/sympow/datafiles/A01OM.txt,sha256=jRCcDINHJOEm37KbjEXyCZQKMg9VSR_83_K5VmsWhq8,4
30
+ sage_wheels/share/sympow/datafiles/A01OS.txt,sha256=jRCcDINHJOEm37KbjEXyCZQKMg9VSR_83_K5VmsWhq8,4
31
+ sage_wheels/share/sympow/datafiles/M02HM.txt,sha256=jRCcDINHJOEm37KbjEXyCZQKMg9VSR_83_K5VmsWhq8,4
32
+ sage_wheels/share/sympow/datafiles/M02HS.txt,sha256=jRCcDINHJOEm37KbjEXyCZQKMg9VSR_83_K5VmsWhq8,4
33
+ sage_wheels/share/sympow/datafiles/M02LM.txt,sha256=jRCcDINHJOEm37KbjEXyCZQKMg9VSR_83_K5VmsWhq8,4
34
+ sage_wheels/share/sympow/datafiles/M02LS.txt,sha256=jRCcDINHJOEm37KbjEXyCZQKMg9VSR_83_K5VmsWhq8,4
35
+ sage_wheels/share/sympow/datafiles/m01EM.txt,sha256=jRCcDINHJOEm37KbjEXyCZQKMg9VSR_83_K5VmsWhq8,4
36
+ sage_wheels/share/sympow/datafiles/m01ES.txt,sha256=jRCcDINHJOEm37KbjEXyCZQKMg9VSR_83_K5VmsWhq8,4
37
+ sage_wheels/share/sympow/datafiles/m02EM.txt,sha256=jRCcDINHJOEm37KbjEXyCZQKMg9VSR_83_K5VmsWhq8,4
38
+ sage_wheels/share/sympow/datafiles/m02ES.txt,sha256=jRCcDINHJOEm37KbjEXyCZQKMg9VSR_83_K5VmsWhq8,4
39
+ sage_wheels/share/sympow/datafiles/param_data,sha256=oOlJ7C7GhQ7E2UKlRE0trCjjqegX4Ry3b_95AbzZatg,415
40
+ passagemath_sympow-10.6.43.dist-info/METADATA,sha256=mHtDLsG5DZl6B_9WAWANi2vKot750DBeDTePwAkUAi8,5000
41
+ passagemath_sympow-10.6.43.dist-info/WHEEL,sha256=GIYi8yqodGXJf5_lS9HYm_ZYguPz6DgSMeewkgTvr7Y,111
42
+ passagemath_sympow-10.6.43.dist-info/top_level.txt,sha256=yOw8rysl7aCoXLPBoTF0f7_yKUZYLXke4oXL76kAarc,25
43
+ passagemath_sympow-10.6.43.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: false
4
+ Tag: cp312-abi3-musllinux_1_2_x86_64
5
+
@@ -0,0 +1,3 @@
1
+
2
+ passagemath_sympow
3
+ sage
@@ -0,0 +1,17 @@
1
+ # sage_setup: distribution = sagemath-sympow
2
+ # delvewheel: patch
3
+
4
+ try:
5
+ from sage.all__sagemath_repl import *
6
+ except ImportError:
7
+ pass
8
+
9
+ from sage.all__sagemath_modules import *
10
+ from sage.all__sagemath_linbox import *
11
+
12
+ try:
13
+ from sage.all__sagemath_schemes import *
14
+ except ImportError:
15
+ pass
16
+
17
+ from sage.lfunctions.all__sagemath_sympow import *
@@ -0,0 +1,7 @@
1
+ # sage_setup: distribution = sagemath-sympow
2
+
3
+ from sage.misc.lazy_import import lazy_import
4
+
5
+ lazy_import("sage.lfunctions.sympow", "sympow")
6
+
7
+ del lazy_import
@@ -0,0 +1,424 @@
1
+ # sage_setup: distribution = sagemath-sympow
2
+ r"""
3
+ Watkins symmetric power `L`-function calculator
4
+
5
+ SYMPOW is a package to compute special values of symmetric power
6
+ elliptic curve `L`-functions. It can compute up to about 64 digits of
7
+ precision. This interface provides complete access to sympow, which
8
+ is a standard part of Sage (and includes the extra data files).
9
+
10
+ .. NOTE::
11
+
12
+ Each call to ``sympow`` runs a complete
13
+ ``sympow`` process. This incurs about 0.2 seconds
14
+ overhead.
15
+
16
+ AUTHORS:
17
+
18
+ - Mark Watkins (2005-2006): wrote and released sympow
19
+
20
+ - William Stein (2006-03-05): wrote Sage interface
21
+
22
+ ACKNOWLEDGEMENT (from sympow readme):
23
+
24
+ - The quad-double package was modified from David Bailey's
25
+ package: http://crd.lbl.gov/~dhbailey/mpdist/
26
+
27
+ - The ``squfof`` implementation was modified from
28
+ Allan Steel's version of Arjen Lenstra's original LIP-based code.
29
+
30
+ - The ``ec_ap`` code was originally written for the
31
+ kernel of MAGMA, but was modified to use small integers when
32
+ possible.
33
+
34
+ - SYMPOW was originally developed using PARI, but due to licensing
35
+ difficulties, this was eliminated. SYMPOW also does not use the
36
+ standard math libraries unless Configure is run with the -lm
37
+ option. SYMPOW still uses GP to compute the meshes of inverse
38
+ Mellin transforms (this is done when a new symmetric power is added
39
+ to datafiles).
40
+ """
41
+
42
+ ########################################################################
43
+ # Copyright (C) 2006 William Stein <wstein@gmail.com>
44
+ #
45
+ # Distributed under the terms of the GNU General Public License (GPL)
46
+ #
47
+ # https://www.gnu.org/licenses/
48
+ ########################################################################
49
+
50
+ import os
51
+ import shlex
52
+
53
+ from sage.features.sympow import Sympow as sympow_executable
54
+ from sage.structure.sage_object import SageObject
55
+ from sage.misc.pager import pager
56
+ from sage.misc.verbose import verbose
57
+ from sage.rings.integer import Integer
58
+
59
+
60
+ class Sympow(SageObject):
61
+ r"""
62
+ Watkins Symmetric Power `L`-function Calculator.
63
+
64
+ Type ``sympow.[tab]`` for a list of useful commands
65
+ that are implemented using the command line interface, but return
66
+ objects that make sense in Sage.
67
+
68
+ You can also use the complete command-line interface of sympow via
69
+ this class. Type ``sympow.help()`` for a list of
70
+ commands and how to call them.
71
+ """
72
+ def _repr_(self):
73
+ """
74
+ Return a string describing this calculator module
75
+ """
76
+ return "Watkins Symmetric Power L-function Calculator"
77
+
78
+ def __call__(self, args):
79
+ """
80
+ Used to call sympow with given args
81
+ """
82
+ cmd = f'{shlex.quote(sympow_executable().absolute_filename())} {args}'
83
+ with os.popen(cmd) as f:
84
+ v = f.read().strip()
85
+ verbose(v, level=2)
86
+ return v
87
+
88
+ def _fix_err(self, err):
89
+ w = err
90
+ j = w.rfind('./sympow')
91
+ if j != -1:
92
+ w = w[:j - 1] + "sympow('" + w[j + 9:] + ')'
93
+ return w
94
+
95
+ def _curve_str(self, E):
96
+ return '-curve "%s"' % (str(list(E.minimal_model().a_invariants())).replace(' ', ''))
97
+
98
+ def L(self, E, n, prec):
99
+ r"""
100
+ Return `L(\mathrm{Sym}^{(n)}(E, \text{edge}))` to prec digits of
101
+ precision, where edge is the *right* edge. Here `n` must be
102
+ even.
103
+
104
+ INPUT:
105
+
106
+ - ``E`` -- elliptic curve
107
+
108
+ - ``n`` -- even integer
109
+
110
+ - ``prec`` -- integer
111
+
112
+ OUTPUT: real number to prec digits of precision as a string
113
+
114
+ .. NOTE::
115
+
116
+ Before using this function for the first time for a given
117
+ `n`, you may have to type ``sympow('-new_data n')``,
118
+ where ``n`` is replaced by your value of `n`.
119
+
120
+ If you would like to see the extensive output sympow prints when
121
+ running this function, just type ``set_verbose(2)``.
122
+
123
+ EXAMPLES:
124
+
125
+ These examples only work if you run ``sympow -new_data 2`` in a
126
+ Sage shell first. Alternatively, within Sage, execute::
127
+
128
+ sage: sympow('-new_data 2') # not tested
129
+
130
+ This command precomputes some data needed for the following
131
+ examples. ::
132
+
133
+ sage: a = sympow.L(EllipticCurve('11a'), 2, 16) # not tested
134
+ sage: a # not tested
135
+ '1.057599244590958E+00'
136
+ sage: RR(a) # not tested
137
+ 1.05759924459096
138
+ """
139
+ if n % 2 == 1:
140
+ raise ValueError("n (=%s) must be even" % n)
141
+ if prec > 64:
142
+ raise ValueError("prec (=%s) must be at most 64" % prec)
143
+ if prec < 1:
144
+ raise ValueError("prec (=%s) must be at least 1" % prec)
145
+ v = self('-sp %sp%s %s' % (n, prec, self._curve_str(E)))
146
+ i = v.rfind(': ')
147
+ if i == -1:
148
+ print(self._fix_err(v))
149
+ raise RuntimeError("failed to compute symmetric power")
150
+ x = v[i + 2:]
151
+ return x
152
+
153
+ def Lderivs(self, E, n, prec, d):
154
+ r"""
155
+ Return `0`-th to `d`-th derivatives of
156
+ `L(\mathrm{Sym}^{(n)}(E,s)` to prec digits of precision, where
157
+ `s` is the right edge if `n` is even and the center
158
+ if `n` is odd.
159
+
160
+ INPUT:
161
+
162
+ - ``E`` -- elliptic curve
163
+
164
+ - ``n`` -- integer (even or odd)
165
+
166
+ - ``prec`` -- integer
167
+
168
+ - ``d`` -- integer
169
+
170
+ OUTPUT: string, exactly as output by sympow
171
+
172
+ .. NOTE::
173
+
174
+ To use this function you may have to run a few commands
175
+ like ``sympow('-new_data 1d2')``, each which takes a
176
+ few minutes. If this function fails it will indicate what commands
177
+ have to be run.
178
+
179
+ EXAMPLES::
180
+
181
+ sage: print(sympow.Lderivs(EllipticCurve('11a'), 1, 16, 2)) # not tested
182
+ ...
183
+ 1n0: 2.538418608559107E-01
184
+ 1w0: 2.538418608559108E-01
185
+ 1n1: 1.032321840884568E-01
186
+ 1w1: 1.059251499158892E-01
187
+ 1n2: 3.238743180659171E-02
188
+ 1w2: 3.414818600982502E-02
189
+ """
190
+ if prec > 64:
191
+ raise ValueError("prec (=%s) must be at most 64" % prec)
192
+ if prec < 1:
193
+ raise ValueError("prec (=%s) must be at least 1" % prec)
194
+ v = self('-sp %sp%sd%s %s' % (n, prec, d, self._curve_str(E)))
195
+ return self._fix_err(v)
196
+
197
+ def modular_degree(self, E):
198
+ """
199
+ Return the modular degree of the elliptic curve E, assuming the
200
+ Stevens conjecture.
201
+
202
+ INPUT:
203
+
204
+ - ``E`` -- elliptic curve over Q
205
+
206
+ OUTPUT:
207
+
208
+ - ``integer`` -- modular degree
209
+
210
+ EXAMPLES: We compute the modular degrees of the lowest known
211
+ conductor curves of the first few ranks::
212
+
213
+ sage: sympow.modular_degree(EllipticCurve('11a'))
214
+ 1
215
+ sage: sympow.modular_degree(EllipticCurve('37a'))
216
+ 2
217
+ sage: sympow.modular_degree(EllipticCurve('389a'))
218
+ 40
219
+ sage: sympow.modular_degree(EllipticCurve('5077a'))
220
+ 1984
221
+ sage: sympow.modular_degree(EllipticCurve([1, -1, 0, -79, 289]))
222
+ 334976
223
+ """
224
+ v = self('%s -moddeg' % self._curve_str(E))
225
+ s = 'Modular Degree is '
226
+ i = v.find(s)
227
+ if i == -1:
228
+ print(self._fix_err(v))
229
+ raise RuntimeError("failed to compute modular degree")
230
+ return Integer(v[i + len(s):])
231
+
232
+ def analytic_rank(self, E):
233
+ r"""
234
+ Return the analytic rank and leading `L`-value of the
235
+ elliptic curve `E`.
236
+
237
+ INPUT:
238
+
239
+ - ``E`` -- elliptic curve over Q
240
+
241
+ OUTPUT:
242
+
243
+ - ``integer`` -- analytic rank
244
+
245
+ - ``string`` -- leading coefficient (as string)
246
+
247
+
248
+ .. NOTE::
249
+
250
+ The analytic rank is *not* computed provably correctly in general.
251
+
252
+ .. NOTE::
253
+
254
+ In computing the analytic rank we consider
255
+ `L^{(r)}(E,1)` to be `0` if
256
+ `L^{(r)}(E,1)/\Omega_E > 0.0001`.
257
+
258
+ EXAMPLES: We compute the analytic ranks of the lowest known
259
+ conductor curves of the first few ranks::
260
+
261
+ sage: sympow.analytic_rank(EllipticCurve('11a'))
262
+ (0, '2.53842e-01')
263
+ sage: sympow.analytic_rank(EllipticCurve('37a'))
264
+ (1, '3.06000e-01')
265
+ sage: sympow.analytic_rank(EllipticCurve('389a'))
266
+ (2, '7.59317e-01')
267
+ sage: sympow.analytic_rank(EllipticCurve('5077a'))
268
+ (3, '1.73185e+00')
269
+ sage: sympow.analytic_rank(EllipticCurve([1, -1, 0, -79, 289]))
270
+ (4, '8.94385e+00')
271
+ sage: sympow.analytic_rank(EllipticCurve([0, 0, 1, -79, 342])) # long time
272
+ (5, '3.02857e+01')
273
+ sage: sympow.analytic_rank(EllipticCurve([1, 1, 0, -2582, 48720])) # long time
274
+ (6, '3.20781e+02')
275
+ sage: sympow.analytic_rank(EllipticCurve([0, 0, 0, -10012, 346900])) # long time
276
+ (7, '1.32517e+03')
277
+ """
278
+ v = self('%s -analrank' % self._curve_str(E))
279
+ s = 'Analytic Rank is '
280
+ i = v.rfind(s)
281
+ if i == -1:
282
+ print(self._fix_err(v))
283
+ raise RuntimeError("failed to compute analytic rank")
284
+ j = v.rfind(':')
285
+ r = Integer(v[i + len(s):j])
286
+ i = v.rfind(' ')
287
+ L = v[i + 1:]
288
+ return r, L
289
+
290
+ def new_data(self, n):
291
+ """
292
+ Pre-compute data files needed for computation of `n`-th symmetric
293
+ powers.
294
+ """
295
+ print(self('-new_data %s' % n))
296
+
297
+ def help(self):
298
+ h = """
299
+ sympow('-sp 2p16 -curve "[1,2,3,4,5]"')
300
+ will compute L(Sym^2 E,edge) for E=[1,2,3,4,5] to 16 digits of precision
301
+ The result
302
+ 2n0: 8.370510845377639E-01
303
+ 2w0: 8.370510845377586E-01
304
+ consists of two calculations using different parameters to test the
305
+ functional equation (to see if these are sufficiently close).
306
+
307
+ sympow('-sp 3p12d2,4p8 -curve "[1,2,3,4,5]"')
308
+ will compute the 0th-2nd derivatives of L(Sym^3 E,center) to 12 digits
309
+ and L(Sym^4 E,edge) to 8 digits
310
+
311
+ Special cases: When a curve has CM, Hecke power can be used instead
312
+
313
+ sympow('-sp 7p12d1 -hecke -curve "[0,0,1,-16758,835805]"')
314
+
315
+ will compute the 0th-1st derivatives of L(Sym^7 psi,special) to 12 digits.
316
+
317
+ Bloch-Kato numbers can be obtained for powers not congruent to 0 mod 4:
318
+
319
+ sympow('-sp 2bp16 -curve "[1,2,3,4,5]"')
320
+
321
+ should return
322
+ 2n0: 4.640000000000006E+02
323
+ 2w0: 4.639999999999976E+02
324
+ which can be seen to be very close to the integer 464.
325
+
326
+ Modular degrees can be computed with the -moddeg option.
327
+
328
+ sympow('-curve "[1,2,3,4,5]" -moddeg')
329
+
330
+ should return
331
+ Modular Degree is 464
332
+
333
+ Analytic ranks can be computed with the -analrank option.
334
+
335
+ sympow('-curve "[1,2,3,4,5]" -analrank')
336
+
337
+ should return
338
+ Analytic Rank is 1 : L'-value 3.51873e+00
339
+
340
+ and (if the mesh file for the fifth derivative is present)
341
+
342
+ sympow('-curve "[0,0,1,-79,342]" -analrank')
343
+
344
+ should return
345
+ Analytic Rank is 5 : leading L-term 3.02857e+01
346
+
347
+ ========================================================================
348
+
349
+ Adding new symmetric powers:
350
+
351
+ SYMPOW keeps data for symmetric powers in the directory datafiles
352
+ If a pre-computed mesh of inverse Mellin transform values is not
353
+ available for a given symmetric power, SYMPOW will fail. The command
354
+
355
+ sympow('-new_data 2')
356
+
357
+ will add the data the 2nd symmetric power, while
358
+
359
+ sympow('-new_data 3d2')
360
+
361
+ will add the data for the 2nd derivative and 3rd symmetric power,
362
+
363
+ sympow('-new_data 6d0h')
364
+
365
+ will add the data for the `0`-th derivative of the `6`-th Hecke power, and
366
+
367
+ sympow('-new_data 4c')
368
+
369
+ will add data for the `4`-th symmetric power for curves with CM
370
+ (these need to be done separately for powers divisible by 4).
371
+
372
+ The mesh files are stored in binary form, and thus endian-ness is a
373
+ worry when moving from one platform to another.
374
+
375
+ To enable modular degree computations, the 2nd symmetric power must
376
+ be extant, and analytic rank requires derivatives of the 1st power.
377
+
378
+ ===================================================================
379
+
380
+ Output of "!sympow -help":
381
+
382
+ -bound # an upper BOUND for how many ap to compute
383
+ -help print the help message and exit
384
+ -info [] [] only report local information for primes/sympows
385
+ 1st argument is prime range, 2nd is sympow range
386
+ -local only report local information (bad primes)
387
+ -curve [] input a curve in [a1,a2,a3,a4,a6] form
388
+ -label [] label the given curve
389
+ -quiet turn off some messages
390
+ -verbose turn on some messages
391
+ -rootno # compute the root number of the #th symmetric power
392
+ -moddeg compute the modular degree
393
+ -analrank compute the analytic rank
394
+ -sloppy [] for use with -analrank; have X sloppy digits
395
+ -nocm abort if curve has complex multiplication
396
+ -noqt ignore even powers of non-minimal quad twists
397
+ -hecke compute Hecke symmetric powers for a CM curve
398
+ -maxtable set the max size of factor tables: 2^27 default
399
+ -sp [] argument to specify which powers
400
+ this is a comma separated list
401
+ in each entry, the 1st datum is the sympow
402
+ then could come b which turns Bloch-Kato on
403
+ then could come w# which specifies how many tests
404
+ then could come s# which says # sloppy digits
405
+ then must come p# which specifies the precision
406
+ or P# which says ignore BOUND for this power
407
+ then must come d# which says the derivative bound
408
+ or D# which says do only this derivative
409
+ (neither need be indicated for even powers)
410
+ default is 2w3s1p32,3bp16d1,4p8
411
+ -new_data [] will compute inverse Mellin transform mesh for
412
+ the given data: the format is [sp]d[dv]{h,c}
413
+ sp is the symmetric power, dv is the derivative,
414
+ h indicates Hecke powers, and c indicates CM case
415
+ d[dv] is given only for odd or Hecke powers
416
+ Examples: 1d3 2 2d1h 3d2 4 4c 5d0 6 7d0h 11d1 12c
417
+ NOTE: new_data runs a shell script that uses GP
418
+ Other options are used internally/recursively by -new_data
419
+ """
420
+ pager()(h)
421
+
422
+
423
+ # An instance
424
+ sympow = Sympow()
@@ -0,0 +1 @@
1
+ # sage_setup: distribution = sagemath-sympow
Binary file
sage/libs/sympow.pyx ADDED
@@ -0,0 +1 @@
1
+ # sage_setup: distribution = sagemath-sympow
sage_wheels/bin/sympow ADDED
Binary file
@@ -0,0 +1,43 @@
1
+ #! /bin/sh
2
+ #
3
+ # This script should not need to be run directly,
4
+ # but will be automatically executed via "sympow -new_data []"
5
+ #
6
+ # example direct usages
7
+ # sh new_data /bin/sh /usr/bin/gp '-sp 3 -dv 2'
8
+ # sh new_data /bin/sh /usr/bin/gp '-cm -sp 4'
9
+ # sh new_data /bin/sh /usr/bin/gp '-sp 2'
10
+ # sh new_data /bin/sh /usr/bin/gp '-hecke -sp 3 -dv 1'
11
+
12
+ set -e
13
+
14
+ if [ -z $SYMPOW_INVOCATIONNAME ];
15
+ then
16
+ echo "**ERROR**: unset environment variable SYMPOW_INVOCATIONNAME"; exit;
17
+ fi
18
+
19
+ if [ $# != 3 ];
20
+ then
21
+ echo "**ERROR**: Wrong number of input parameters"; exit;
22
+ fi
23
+
24
+ SYMPOW="$SYMPOW_INVOCATIONNAME ${SYMPOW_OPTS_VERBOSITY:--quiet}"
25
+
26
+ echo "Running the new_data script for $3"
27
+
28
+ SH=$1
29
+ GP="$2 ${SYMPOW_OPTS_GP--D debugmem=0}"
30
+
31
+ echo "Making the datafiles for $3"
32
+ echo ""
33
+ $SYMPOW -rewarp
34
+ $SYMPOW -shell1 "$3" | $SH
35
+ echo "Running the gp script"
36
+ echo ""
37
+ $SYMPOW -pari "$3" | $GP -f -q > /dev/null
38
+ echo ""
39
+ $SYMPOW -shell2 "$3" | $SH
40
+ $SYMPOW -rewarp
41
+ echo "Finished with $3"
42
+
43
+ exit 0
@@ -0,0 +1 @@
1
+ END
@@ -0,0 +1 @@
1
+ END
@@ -0,0 +1 @@
1
+ END
@@ -0,0 +1 @@
1
+ END
@@ -0,0 +1 @@
1
+ END
@@ -0,0 +1 @@
1
+ END
@@ -0,0 +1 @@
1
+ END
@@ -0,0 +1 @@
1
+ END
@@ -0,0 +1 @@
1
+ END
@@ -0,0 +1 @@
1
+ END
@@ -0,0 +1 @@
1
+ END
@@ -0,0 +1 @@
1
+ END
@@ -0,0 +1 @@
1
+ END
@@ -0,0 +1 @@
1
+ END
@@ -0,0 +1 @@
1
+ END
@@ -0,0 +1 @@
1
+ END
@@ -0,0 +1 @@
1
+ END
@@ -0,0 +1 @@
1
+ END
@@ -0,0 +1 @@
1
+ END
@@ -0,0 +1 @@
1
+ END
@@ -0,0 +1 @@
1
+ END
@@ -0,0 +1 @@
1
+ END
@@ -0,0 +1 @@
1
+ END
@@ -0,0 +1 @@
1
+ END
@@ -0,0 +1 @@
1
+ END
@@ -0,0 +1 @@
1
+ END
@@ -0,0 +1,13 @@
1
+ M02H,285.3116706110000109,-7,11
2
+ M02L,259.3742460099999789,-7,11
3
+ m01E,75.13148009015777973,-8,10
4
+ m02E,82.64462809917355912,-8,10
5
+ A01O,35.04938994813925035,-5,6
6
+ A012,31.863081771035680844,-5,6
7
+ A013,28.966437973668799800,-4,4
8
+ A014,26.333125430607999818,-4,4
9
+ A015,21.762913579014877996,-4,4
10
+ A016,19.784466890013526096,-4,4
11
+ A017,16.350799082655804284,-4,4
12
+ A018,14.864362802414369469,-3,2
13
+ A019,12.284597357367246673,-3,2
@@ -0,0 +1,24 @@
1
+ allocatemem(2^28); \\ need 2^28 for 64-bit machines; else 2^27
2
+ L; X;
3
+ SP=mx+2;
4
+ default(seriesprecision,SP+1);
5
+ H=vector(SP);
6
+ {for(i=1,SP,H[i]=vector(N);
7
+ for(j=1,N,if(i==1,if(j==1,H[1][1]=1,H[i][j]=H[i][j-1]+1.0/j),
8
+ if(j==1,H[i][1]=H[i-1][1],H[i][j]=H[i][j-1]+H[i-1][j]/j*1.0))));}
9
+ Hf(n,k)=if(k==0,0,H[n][k])
10
+ ZETA(n)=if(n==1,Euler,zeta(n))
11
+ J(k,v)=if(k<0,(v-k-1)*J(k+1,v),\
12
+ 1.0*(-1)^k/k!/v*\
13
+ exp(sum(n=1,SP,(-1)^n*(ZETA(n)/n)*v^n))*\
14
+ (1+sum(n=1,SP,Hf(n,k)*v^n)))
15
+ sinv(k,v)=if(k==0,1/v,-1/k-sum(l=1,SP,v^l/k^(l+1)))
16
+ two1ms(k,v)=2^(1+k)*sum(l=0,SP,log(1/2)^l/l!*v^l)
17
+
18
+ {DERIV(M)=
19
+ sum(i=0,poldegree(M,L),
20
+ (deriv(polcoeff(M,i,L),X)+(i+1)*polcoeff(M,i+1,L)/X)*L^i)}
21
+
22
+ {ev(T,v,C)=U=0;
23
+ for(i=0,mx,U+=(truncate(polcoeff(T,i,L)+O(X^C))*L^i));
24
+ subst(subst(U,L,log(v)),X,v);}
@@ -0,0 +1,24 @@
1
+
2
+ P=sum(k=0,N,sum(l=1,mx+1,-(-1)^l/(l-1)!*polcoeff(F(k),-l,X)*L^(l-1))*X^k);
3
+ K=40; Ds=vector(K); Ds[1]=DERIV(P); for(i=2,K,Ds[i]=DERIV(Ds[i-1]));
4
+
5
+ ieee(x)=(round(x<<53)*1.0)>>53
6
+ {IEEE(x)=if(x==0,return(0));if(length(x)<2,return(0));
7
+ y=ceil(log(abs(x))/log(2));ieee(x/2^y)*2^y;}
8
+ {QD(x)=local(A);A=[IEEE(x),0,0,0];A[2]=IEEE(x-A[1]);A[3]=IEEE(x-A[1]-A[2]);
9
+ A[4]=IEEE(x-A[1]-A[2]-A[3]); A=precision(A,18);
10
+ print(A[1]); print(A[2]); print(A[3]); print(A[4]);}
11
+
12
+
13
+ {doit(x,C)=print("AT ",x); QD(ev(P,x,C));
14
+ for(d=1,35,print("DERIV ",d); QD(ev(Ds[d]/d!,x,C)));}
15
+ ch(x,C)=ev(P,x,C)-ev(P,x,C+20)
16
+
17
+ setup(a,b)=for(i=0,31,doit(2^a+2^a*i/32,b));
18
+ print("About to find TOO_BIG"); \\ ends up in /dev/null
19
+ MM=100; while(log(10^(-70)+abs(ev(P,MM,N)))>-148,MM*=1.1);
20
+ write1(PARAMDATAFILE,STR,",",precision(IEEE(MM),18));
21
+ print("Now working backwards..."); \\ ends up in /dev/null
22
+ l=-10; while(log(10^(-70)+abs(ch(2^l,20)))<-148,l+=1); l-=1; s=l;
23
+ write1(PARAMDATAFILE,",",l-5); n=20;
24
+ print("Starting to write mesh files"); \\ ends up in /dev/null
@@ -0,0 +1,7 @@
1
+ while(2^l<MM,while(log(10^(-70)+abs(ch(2*2^l,n)))>-148,n+=5);setup(l,n);l+=1);
2
+ write(PARAMDATAFILE,",",l-s);
3
+ coeffs(j)=for(i=0,19,print("PS ",i);QD(polcoeff(polcoeff(P,j,L),i,X)));
4
+ coeffO(j)=\
5
+ for(i=0,9,print("PSL ",2*i+1);QD(polcoeff(polcoeff(P,j,L),2*i+1,X)));
6
+ coeffE(j)=\
7
+ for(i=0,9,print("PSL ",2*i);QD(polcoeff(polcoeff(P,j,L),2*i,X)));