passagemath-standard-no-symbolics 10.6.45__cp313-cp313-macosx_13_0_arm64.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.
- passagemath_standard_no_symbolics/__init__.py +1 -0
- passagemath_standard_no_symbolics-10.6.45.data/scripts/sage-grep +5 -0
- passagemath_standard_no_symbolics-10.6.45.data/scripts/sage-grepdoc +5 -0
- passagemath_standard_no_symbolics-10.6.45.data/scripts/sage-list-packages +103 -0
- passagemath_standard_no_symbolics-10.6.45.dist-info/METADATA +150 -0
- passagemath_standard_no_symbolics-10.6.45.dist-info/RECORD +83 -0
- passagemath_standard_no_symbolics-10.6.45.dist-info/WHEEL +6 -0
- passagemath_standard_no_symbolics-10.6.45.dist-info/top_level.txt +2 -0
- sage/all.py +207 -0
- sage/all_cmdline.py +36 -0
- sage/cli/__init__.py +61 -0
- sage/cli/__main__.py +5 -0
- sage/cli/eval_cmd.py +45 -0
- sage/cli/eval_cmd_test.py +25 -0
- sage/cli/interactive_shell_cmd.py +28 -0
- sage/cli/notebook_cmd.py +51 -0
- sage/cli/notebook_cmd_test.py +39 -0
- sage/cli/options.py +26 -0
- sage/cli/run_file_cmd.py +50 -0
- sage/cli/version_cmd.py +26 -0
- sage/databases/all.py +83 -0
- sage/databases/cubic_hecke_db.py +1527 -0
- sage/dynamics/all.py +31 -0
- sage/dynamics/surface_dynamics_deprecation.py +32 -0
- sage/ext_data/kenzo/CP2.txt +45 -0
- sage/ext_data/kenzo/CP3.txt +349 -0
- sage/ext_data/kenzo/CP4.txt +4774 -0
- sage/ext_data/kenzo/README.txt +49 -0
- sage/ext_data/kenzo/S4.txt +20 -0
- sage/ext_data/mwrank/PRIMES +1 -0
- sage/ext_data/nbconvert/postprocess.py +48 -0
- sage/ext_data/nbconvert/rst_sage.tpl +99 -0
- sage/ext_data/nodoctest +0 -0
- sage/ext_data/notebook-ipython/kernel.json.in +11 -0
- sage/ext_data/notebook-ipython/logo-64x64.png +0 -0
- sage/ext_data/notebook-ipython/logo.svg +352 -0
- sage/ext_data/valgrind/pyalloc.supp +58 -0
- sage/ext_data/valgrind/sage-additional.supp +417 -0
- sage/ext_data/valgrind/sage.supp +43 -0
- sage/ext_data/valgrind/valgrind-python.supp +480 -0
- sage/geometry/all.py +12 -0
- sage/groups/matrix_gps/pickling_overrides.py +110 -0
- sage/homology/tests.py +66 -0
- sage/interacts/algebra.py +20 -0
- sage/interacts/all.py +25 -0
- sage/interacts/calculus.py +24 -0
- sage/interacts/fractals.py +18 -0
- sage/interacts/geometry.py +19 -0
- sage/interacts/library.py +1950 -0
- sage/interacts/library_cython.cpython-313-darwin.so +0 -0
- sage/interacts/statistics.py +19 -0
- sage/interfaces/axiom.py +1002 -0
- sage/interfaces/kash.py +834 -0
- sage/interfaces/lie.py +950 -0
- sage/interfaces/matlab.py +413 -0
- sage/interfaces/mupad.py +686 -0
- sage/interfaces/octave.py +858 -0
- sage/interfaces/phc.py +943 -0
- sage/interfaces/psage.py +189 -0
- sage/interfaces/qsieve.py +4 -0
- sage/interfaces/r.py +2096 -0
- sage/interfaces/read_data.py +46 -0
- sage/interfaces/scilab.py +576 -0
- sage/interfaces/tests.py +81 -0
- sage/libs/all.py +11 -0
- sage/libs/cremona/__init__.py +0 -0
- sage/libs/mwrank/__init__.py +0 -0
- sage/logic/all.py +3 -0
- sage/logic/booleval.py +160 -0
- sage/logic/boolformula.py +1490 -0
- sage/logic/logic.py +856 -0
- sage/logic/logicparser.py +696 -0
- sage/logic/logictable.py +272 -0
- sage/logic/propcalc.py +311 -0
- sage/misc/all.py +28 -0
- sage/misc/lazy_attribute.pyi +11 -0
- sage/rings/all.py +48 -0
- sage/rings/commutative_algebra.py +38 -0
- sage/rings/finite_rings/all.py +21 -0
- sage/rings/numbers_abc.py +58 -0
- sage/rings/polynomial/all.py +22 -0
- sage/rings/polynomial/convolution.py +421 -0
- sage/symbolic/all__sagemath_standard_no_symbolics.py +0 -0
sage/cli/eval_cmd.py
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import argparse
|
|
2
|
+
|
|
3
|
+
from sage.cli.options import CliOptions
|
|
4
|
+
from sage.repl.preparse import preparse
|
|
5
|
+
from sage.all import sage_globals
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class EvalCmd:
|
|
9
|
+
@staticmethod
|
|
10
|
+
def extend_parser(parser: argparse.ArgumentParser):
|
|
11
|
+
r"""
|
|
12
|
+
Extend the parser with the "run" command.
|
|
13
|
+
|
|
14
|
+
INPUT:
|
|
15
|
+
|
|
16
|
+
- ``parsers`` -- the parsers to extend.
|
|
17
|
+
|
|
18
|
+
OUTPUT:
|
|
19
|
+
|
|
20
|
+
- the extended parser.
|
|
21
|
+
"""
|
|
22
|
+
parser.add_argument(
|
|
23
|
+
"-c",
|
|
24
|
+
"--command",
|
|
25
|
+
nargs="?",
|
|
26
|
+
help="execute the given command as sage code",
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
def __init__(self, options: CliOptions):
|
|
30
|
+
r"""
|
|
31
|
+
Initialize the command.
|
|
32
|
+
"""
|
|
33
|
+
self.options = options
|
|
34
|
+
|
|
35
|
+
def run(self) -> int:
|
|
36
|
+
r"""
|
|
37
|
+
Execute the given command.
|
|
38
|
+
"""
|
|
39
|
+
code = preparse(self.options.command)
|
|
40
|
+
try:
|
|
41
|
+
eval(compile(code, "<cmdline>", "exec"), sage_globals())
|
|
42
|
+
except Exception as e:
|
|
43
|
+
print(f"An error occurred while executing the command: {e}")
|
|
44
|
+
return 1
|
|
45
|
+
return 0
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from sage.cli.eval_cmd import EvalCmd
|
|
2
|
+
from sage.cli.options import CliOptions
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def test_eval_cmd_print(capsys):
|
|
6
|
+
options = CliOptions(command="print(3^33)")
|
|
7
|
+
eval_cmd = EvalCmd(options)
|
|
8
|
+
|
|
9
|
+
result = eval_cmd.run()
|
|
10
|
+
captured = capsys.readouterr()
|
|
11
|
+
assert captured.out == "5559060566555523\n"
|
|
12
|
+
assert result == 0
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def test_eval_cmd_invalid_command(capsys):
|
|
16
|
+
options = CliOptions(command="invalid_command")
|
|
17
|
+
eval_cmd = EvalCmd(options)
|
|
18
|
+
|
|
19
|
+
result = eval_cmd.run()
|
|
20
|
+
captured = capsys.readouterr()
|
|
21
|
+
assert (
|
|
22
|
+
"An error occurred while executing the command: name 'invalid_command' is not defined"
|
|
23
|
+
in captured.out
|
|
24
|
+
)
|
|
25
|
+
assert result == 1
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
from sage.cli.options import CliOptions
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class InteractiveShellCmd:
|
|
5
|
+
def __init__(self, options: CliOptions):
|
|
6
|
+
r"""
|
|
7
|
+
Initialize the command.
|
|
8
|
+
"""
|
|
9
|
+
self.options = options
|
|
10
|
+
|
|
11
|
+
def run(self) -> int:
|
|
12
|
+
r"""
|
|
13
|
+
Start the interactive shell.
|
|
14
|
+
"""
|
|
15
|
+
# Display startup banner. Do this before anything else to give the user
|
|
16
|
+
# early feedback that Sage is starting.
|
|
17
|
+
if not self.options.quiet:
|
|
18
|
+
from sage.misc.banner import banner
|
|
19
|
+
banner()
|
|
20
|
+
|
|
21
|
+
from sage.repl.interpreter import SageTerminalApp
|
|
22
|
+
|
|
23
|
+
app = SageTerminalApp.instance()
|
|
24
|
+
if self.options.simple_prompt:
|
|
25
|
+
app.config['InteractiveShell']['simple_prompt'] = True
|
|
26
|
+
app.config['InteractiveShell']['colors'] = 'nocolor'
|
|
27
|
+
app.initialize([])
|
|
28
|
+
return app.start() # type: ignore
|
sage/cli/notebook_cmd.py
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import argparse
|
|
2
|
+
|
|
3
|
+
from sage.cli.options import CliOptions
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class JupyterNotebookCmd:
|
|
7
|
+
@staticmethod
|
|
8
|
+
def extend_parser(parser: argparse.ArgumentParser):
|
|
9
|
+
r"""
|
|
10
|
+
Extend the parser with the Jupyter notebook command.
|
|
11
|
+
|
|
12
|
+
INPUT:
|
|
13
|
+
|
|
14
|
+
- ``parsers`` -- the parsers to extend.
|
|
15
|
+
|
|
16
|
+
OUTPUT:
|
|
17
|
+
|
|
18
|
+
- the extended parser.
|
|
19
|
+
"""
|
|
20
|
+
parser.add_argument(
|
|
21
|
+
"-n",
|
|
22
|
+
"--notebook",
|
|
23
|
+
nargs="?",
|
|
24
|
+
const="jupyter",
|
|
25
|
+
choices=["jupyter", "jupyterlab"],
|
|
26
|
+
help="start the Jupyter notebook server (default: jupyter)",
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
def __init__(self, options: CliOptions):
|
|
30
|
+
r"""
|
|
31
|
+
Initialize the command.
|
|
32
|
+
"""
|
|
33
|
+
self.options = options
|
|
34
|
+
|
|
35
|
+
def run(self) -> int:
|
|
36
|
+
r"""
|
|
37
|
+
Start the Jupyter notebook server.
|
|
38
|
+
"""
|
|
39
|
+
if self.options.notebook == "jupyter":
|
|
40
|
+
try:
|
|
41
|
+
# notebook 6
|
|
42
|
+
from notebook.notebookapp import main
|
|
43
|
+
except ImportError:
|
|
44
|
+
# notebook 7
|
|
45
|
+
from notebook.app import main
|
|
46
|
+
elif self.options.notebook == "jupyterlab":
|
|
47
|
+
from jupyterlab.labapp import main
|
|
48
|
+
else:
|
|
49
|
+
raise ValueError(f"Unknown notebook type: {self.options.notebook}")
|
|
50
|
+
|
|
51
|
+
return main([])
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import argparse
|
|
2
|
+
|
|
3
|
+
import pytest
|
|
4
|
+
|
|
5
|
+
from sage.cli.notebook_cmd import JupyterNotebookCmd
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def test_jupyter_as_default():
|
|
9
|
+
parser = argparse.ArgumentParser()
|
|
10
|
+
JupyterNotebookCmd.extend_parser(parser)
|
|
11
|
+
args = parser.parse_args(["--notebook"])
|
|
12
|
+
assert args.notebook == "jupyter"
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def test_jupyter_explicitly():
|
|
16
|
+
parser = argparse.ArgumentParser()
|
|
17
|
+
JupyterNotebookCmd.extend_parser(parser)
|
|
18
|
+
args = parser.parse_args(["--notebook", "jupyter"])
|
|
19
|
+
assert args.notebook == "jupyter"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def test_jupyterlab_explicitly():
|
|
23
|
+
parser = argparse.ArgumentParser()
|
|
24
|
+
JupyterNotebookCmd.extend_parser(parser)
|
|
25
|
+
args = parser.parse_args(["--notebook", "jupyterlab"])
|
|
26
|
+
assert args.notebook == "jupyterlab"
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def test_invalid_notebook_choice():
|
|
30
|
+
parser = argparse.ArgumentParser()
|
|
31
|
+
JupyterNotebookCmd.extend_parser(parser)
|
|
32
|
+
with pytest.raises(SystemExit):
|
|
33
|
+
parser.parse_args(["--notebook", "invalid"])
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def test_help():
|
|
37
|
+
parser = argparse.ArgumentParser()
|
|
38
|
+
JupyterNotebookCmd.extend_parser(parser)
|
|
39
|
+
assert parser.format_usage() == "usage: pytest [-h] [-n [{jupyter,jupyterlab}]]\n"
|
sage/cli/options.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
@dataclass
|
|
5
|
+
class CliOptions:
|
|
6
|
+
"""
|
|
7
|
+
A TypedDict for command-line interface options.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
"""Indicates whether verbose output is enabled."""
|
|
11
|
+
verbose: bool = False
|
|
12
|
+
|
|
13
|
+
"""Indicates whether the banner should be displayed."""
|
|
14
|
+
quiet: bool = False
|
|
15
|
+
|
|
16
|
+
"""Indicates whether the IPython simple prompt should be used."""
|
|
17
|
+
simple_prompt: bool = False
|
|
18
|
+
|
|
19
|
+
"""The notebook type to start."""
|
|
20
|
+
notebook: str = "jupyter"
|
|
21
|
+
|
|
22
|
+
"""The command to execute."""
|
|
23
|
+
command: str | None = None
|
|
24
|
+
|
|
25
|
+
"""The file to execute."""
|
|
26
|
+
file: str | None = None
|
sage/cli/run_file_cmd.py
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import argparse
|
|
2
|
+
|
|
3
|
+
from sage.cli.options import CliOptions
|
|
4
|
+
from sage.repl.preparse import preparse_file_named
|
|
5
|
+
from sage.repl.load import load_cython
|
|
6
|
+
from sage.misc.temporary_file import tmp_filename
|
|
7
|
+
from sage.all import sage_globals
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class RunFileCmd:
|
|
11
|
+
@staticmethod
|
|
12
|
+
def extend_parser(parser: argparse.ArgumentParser):
|
|
13
|
+
r"""
|
|
14
|
+
Extend the parser with the "run file" command.
|
|
15
|
+
|
|
16
|
+
INPUT:
|
|
17
|
+
|
|
18
|
+
- ``parsers`` -- the parsers to extend.
|
|
19
|
+
|
|
20
|
+
OUTPUT:
|
|
21
|
+
|
|
22
|
+
- the extended parser.
|
|
23
|
+
"""
|
|
24
|
+
parser.add_argument(
|
|
25
|
+
"file",
|
|
26
|
+
nargs="?",
|
|
27
|
+
help="execute the given file as sage code",
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
def __init__(self, options: CliOptions):
|
|
31
|
+
r"""
|
|
32
|
+
Initialize the command.
|
|
33
|
+
"""
|
|
34
|
+
self.options = options
|
|
35
|
+
|
|
36
|
+
def run(self) -> int:
|
|
37
|
+
r"""
|
|
38
|
+
Execute the given command.
|
|
39
|
+
"""
|
|
40
|
+
input_file = preparse_file_named(self.options.file) if self.options.file.endswith('.sage') else self.options.file
|
|
41
|
+
try:
|
|
42
|
+
if self.options.file.endswith('.pyx') or self.options.file.endswith('.spyx'):
|
|
43
|
+
s = load_cython(input_file)
|
|
44
|
+
eval(compile(s, tmp_filename(), 'exec'), sage_globals())
|
|
45
|
+
else:
|
|
46
|
+
eval(compile(open(input_file, 'rb').read(), input_file, 'exec'), sage_globals())
|
|
47
|
+
except Exception as e:
|
|
48
|
+
print(f"An error occurred while executing the file: {e}")
|
|
49
|
+
return 1
|
|
50
|
+
return 0
|
sage/cli/version_cmd.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import argparse
|
|
2
|
+
|
|
3
|
+
from sage.version import version
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class VersionCmd:
|
|
7
|
+
@staticmethod
|
|
8
|
+
def extend_parser(parser: argparse.ArgumentParser):
|
|
9
|
+
r"""
|
|
10
|
+
Extend the parser with the version command.
|
|
11
|
+
|
|
12
|
+
INPUT:
|
|
13
|
+
|
|
14
|
+
- ``parsers`` -- the parsers to extend.
|
|
15
|
+
|
|
16
|
+
OUTPUT:
|
|
17
|
+
|
|
18
|
+
- the extended parser.
|
|
19
|
+
"""
|
|
20
|
+
parser.add_argument(
|
|
21
|
+
"-V",
|
|
22
|
+
"--version",
|
|
23
|
+
action="version",
|
|
24
|
+
version=version,
|
|
25
|
+
help="print the version number and exit",
|
|
26
|
+
)
|
sage/databases/all.py
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"""
|
|
2
|
+
This file gathers together all the tables in Sage.
|
|
3
|
+
|
|
4
|
+
* ConwayPolynomials() -- database of selected Conway polynomials.
|
|
5
|
+
|
|
6
|
+
* CremonaDatabase() - Cremona's tables of elliptic curves and related data.
|
|
7
|
+
|
|
8
|
+
* findstat -- The FindStat database (https://www.findstat.org/).
|
|
9
|
+
|
|
10
|
+
* JonesDatabase() -- returns the John Jones table of number fields
|
|
11
|
+
with bounded ramification and degree <= 6.
|
|
12
|
+
|
|
13
|
+
* oeis -- The On-Line Encyclopedia of Integer Sequences (https://oeis.org/).
|
|
14
|
+
|
|
15
|
+
* SloaneEncyclopedia -- Local copy of Sloane On-Line Encyclopedia of
|
|
16
|
+
Integer Sequences.
|
|
17
|
+
|
|
18
|
+
* SteinWatkinsAllData() and SteinWatkinsPrimeData() - The
|
|
19
|
+
Stein-Watkins tables of elliptic curves and related data.
|
|
20
|
+
|
|
21
|
+
* SymbolicData() -- many benchmark and testing ideals
|
|
22
|
+
|
|
23
|
+
EXAMPLES::
|
|
24
|
+
|
|
25
|
+
sage: ConwayPolynomials()
|
|
26
|
+
Frank Lübeck's database of Conway polynomials
|
|
27
|
+
|
|
28
|
+
sage: CremonaDatabase()
|
|
29
|
+
Cremona's database of elliptic curves with conductor...
|
|
30
|
+
|
|
31
|
+
sage: JonesDatabase() # optional - database_jones_numfield
|
|
32
|
+
John Jones's table of number fields with bounded ramification and degree <= 6
|
|
33
|
+
|
|
34
|
+
sage: oeis
|
|
35
|
+
The On-Line Encyclopedia of Integer Sequences (https://oeis.org/)
|
|
36
|
+
|
|
37
|
+
sage: SymbolicData() # optional - database_symbolic_data
|
|
38
|
+
SymbolicData with ... ideals
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
# ****************************************************************************
|
|
42
|
+
# Copyright (C) 2005 William Stein <wstein@gmail.com>
|
|
43
|
+
#
|
|
44
|
+
# Distributed under the terms of the GNU General Public License (GPL)
|
|
45
|
+
# as published by the Free Software Foundation; either version 2 of
|
|
46
|
+
# the License, or (at your option) any later version.
|
|
47
|
+
# https://www.gnu.org/licenses/
|
|
48
|
+
# ****************************************************************************
|
|
49
|
+
|
|
50
|
+
from sage.databases.all__sagemath_combinat import *
|
|
51
|
+
from sage.databases.all__sagemath_graphs import *
|
|
52
|
+
from sage.databases.all__sagemath_pari import *
|
|
53
|
+
from sage.databases.all__sagemath_schemes import *
|
|
54
|
+
|
|
55
|
+
try:
|
|
56
|
+
from sage.databases.all__sagemath_database_cunningham import *
|
|
57
|
+
except ImportError:
|
|
58
|
+
pass
|
|
59
|
+
|
|
60
|
+
try:
|
|
61
|
+
from sage.databases.all__sagemath_database_kohel import *
|
|
62
|
+
except ImportError:
|
|
63
|
+
pass
|
|
64
|
+
|
|
65
|
+
try:
|
|
66
|
+
from sage.databases.all__sagemath_database_jones_numfield import *
|
|
67
|
+
except ImportError:
|
|
68
|
+
pass
|
|
69
|
+
|
|
70
|
+
try:
|
|
71
|
+
from sage.databases.all__sagemath_database_odlyzko_zeta import *
|
|
72
|
+
except ImportError:
|
|
73
|
+
pass
|
|
74
|
+
|
|
75
|
+
try:
|
|
76
|
+
from sage.databases.all__sagemath_database_stein_watkins_mini import *
|
|
77
|
+
except ImportError:
|
|
78
|
+
pass
|
|
79
|
+
|
|
80
|
+
try:
|
|
81
|
+
from sage.databases.all__sagemath_database_symbolic_data import *
|
|
82
|
+
except ImportError:
|
|
83
|
+
pass
|