Skip to content

Commit 9deea7b

Browse files
author
Release Manager
committed
gh-36791: Improve the headings of the databases section of the reference manual <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> This part of the reference manual is in poor state. We improve the look of the part. <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [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 accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - #12345: short description why this is a dependency - #34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: #36791 Reported by: Kwankyu Lee Reviewer(s): Kwankyu Lee, Martin Rubey, Matthias Köppe
2 parents 77cf3e6 + a4c3007 commit 9deea7b

File tree

14 files changed

+248
-182
lines changed

14 files changed

+248
-182
lines changed
Lines changed: 20 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,40 @@
11
Databases
22
=========
33

4-
There are numerous specific mathematical databases either included
5-
in Sage or available as optional packages. Also, Sage includes two
6-
powerful general database packages.
4+
Sage includes mathematical databases as standard or optional packages,
5+
and provides convenient interfaces for easy access to the databases.
76

8-
Sage includes the ZOPE object oriented database ZODB, which
9-
"is a Python object persistence system. It provides transparent object-oriented persistency."
7+
Standard databases
8+
------------------
109

11-
Sage also includes the powerful relational database SQLite, along
12-
with a Python interface to SQLite. SQlite is a small C library that
13-
implements a self-contained, embeddable, zero-configuration SQL
14-
database engine.
10+
These databases are available in the standard install of Sage or if Sage can access
11+
Internet.
1512

13+
.. toctree::
14+
:maxdepth: 1
1615

17-
- Transactions are atomic, consistent, isolated, and durable
18-
(ACID) even after system crashes and power failures.
19-
20-
- Zero-configuration - no setup or administration needed.
21-
22-
- Implements most of SQL92. (Features not supported)
23-
24-
- A complete database is stored in a single disk file.
25-
26-
- Database files can be freely shared between machines with
27-
different byte orders.
28-
29-
- Supports databases up to 2 tebibytes (2^41 bytes) in size.
30-
31-
- Strings and BLOBs up to 2 gibibytes (2^31 bytes) in size.
32-
33-
- Small code footprint: less than 250KiB fully configured or less
34-
than 150KiB with optional features omitted.
35-
36-
- Faster than popular client/server database engines for most
37-
common operations.
38-
39-
- Simple, easy to use API.
40-
41-
- TCL bindings included. Bindings for many other languages
42-
available separately.
43-
44-
- Well-commented source code with over 95% test coverage.
16+
sage/databases/conway
17+
sage/databases/oeis
18+
sage/databases/sloane
19+
sage/databases/findstat
4520

46-
- Self-contained: no external dependencies.
21+
Optional databases
22+
------------------
4723

48-
- Sources are in the public domain. Use for any purpose.
24+
The following databases require you to install optional packages before full access.
4925

5026
.. toctree::
5127
:maxdepth: 1
5228

29+
sage/databases/cunningham_tables
30+
sage/databases/knotinfo_db
31+
sage/databases/cubic_hecke_db
32+
sage/databases/symbolic_data
5333
sage/databases/cremona
5434
sage/databases/stein_watkins
5535
sage/databases/jones
56-
sage/databases/oeis
57-
sage/databases/sloane
58-
sage/databases/findstat
59-
sage/databases/conway
60-
sage/databases/odlyzko
61-
sage/databases/symbolic_data
62-
sage/databases/cunningham_tables
6336
sage/databases/db_class_polynomials
6437
sage/databases/db_modular_polynomials
65-
sage/databases/knotinfo_db
66-
sage/databases/cubic_hecke_db
38+
sage/databases/odlyzko
6739

6840
.. include:: ../footer.txt

src/sage/databases/cremona.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
is included by default with Sage. It contains Weierstrass equations,
1010
rank, and torsion for curves up to conductor 10000.
1111
12-
The large database includes all curves in John Cremona's tables. It
13-
also includes data related to the BSD conjecture and modular degrees
14-
for all of these curves, and generators for the Mordell-Weil
15-
groups. To install it, run the following in the shell::
12+
The large database includes all curves in John Cremona's tables. It also
13+
includes data related to the BSD conjecture and modular degrees for all of
14+
these curves, and generators for the Mordell-Weil groups. To install it via the
15+
optional :ref:`database_cremona_ellcurve <spkg_database_cremona_ellcurve>`
16+
package, run the following command in the shell ::
1617
1718
sage -i database_cremona_ellcurve
1819

src/sage/databases/cubic_hecke_db.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
r"""
3-
Cubic Hecke Database
3+
Cubic Hecke database
44
55
This module contains the class :class:`CubicHeckeDataBase` which serves as an
66
interface to `Ivan Marin's data files
@@ -31,10 +31,25 @@
3131
of linear forms on the cubic Hecke algebra on at most four strands
3232
satisfying the Markov trace condition for its cubic Hecke subalgebras.
3333
34+
To use the database, you need to install the optional
35+
:ref:`database_cubic_hecke <spkg_database_cubic_hecke>` package by the Sage
36+
command ::
37+
38+
sage -i database_cubic_hecke
39+
40+
EXAMPLES::
41+
42+
sage: # optional - database_cubic_hecke
43+
sage: from sage.databases.cubic_hecke_db import CubicHeckeDataBase
44+
sage: cha_db = CubicHeckeDataBase()
45+
sage: cha_db
46+
<sage.databases.cubic_hecke_db.CubicHeckeDataBase object at ...>
47+
3448
AUTHORS:
3549
36-
- Sebastian Oehms (May 2020): initial version
37-
- Sebastian Oehms (March 2022): PyPi version and Markov trace functionality
50+
- Sebastian Oehms (2020-05): initial version
51+
- Sebastian Oehms (2022-03): PyPi version and Markov trace functionality
52+
3853
"""
3954

4055
##############################################################################

src/sage/databases/cunningham_tables.py

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
r"""
2-
Cunningham table
2+
Cunningham tables
3+
4+
This module provides :func:`cunningham_prime_factors`, which lists the prime
5+
numbers occurring in the factorization of numbers of type `b^n+1` or `b^n-1`
6+
with `b \in \{2,3,5,6,7,10,11,12\}`. For an introduction to Cunningham prime
7+
factors, see :wikipedia:`Cunningham_Project`. The data becomes available if you
8+
install the optional :ref:`cunningham_tables <spkg_cunningham_tables>` package by
9+
the command ::
10+
11+
sage -i cunningham_tables
12+
13+
AUTHORS:
14+
15+
- Yann Laigle-Chapuy (2009-10-18): initial version
16+
317
"""
418

519
import os
@@ -16,12 +30,25 @@ def cunningham_prime_factors():
1630
1731
They occur in the factorization of numbers of type `b^n+1` or `b^n-1` with `b \in \{2,3,5,6,7,10,11,12\}`.
1832
19-
Data from http://cage.ugent.be/~jdemeyer/cunningham/
33+
EXAMPLES::
34+
35+
sage: # optional - cunningham_tables
36+
sage: from sage.databases.cunningham_tables import cunningham_prime_factors
37+
sage: cunningham_prime_factors()
38+
[2,
39+
3,
40+
5,
41+
7,
42+
11,
43+
13,
44+
17,
45+
...
2046
"""
2147
file = os.path.join(SAGE_SHARE,'cunningham_tables','cunningham_prime_factors.sobj')
2248
if os.path.exists(file):
2349
return [Integer(_) for _ in load(file)]
2450
else:
2551
from warnings import warn
26-
warn("You might consider installing the optional package for factoring Cunningham numbers with the following command: ``sage -i cunningham_tables``")
52+
warn("You might consider installing the optional package for factoring Cunningham numbers"
53+
" with the following command: ``sage -i cunningham_tables``")
2754
return []

src/sage/databases/db_class_polynomials.py

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
"""
2-
Database of Hilbert Polynomials
2+
Database of Hilbert polynomials
3+
4+
This module gives access to the database of Hilbert class polynomials. To use
5+
the database, you need to install the optional :ref:`database_kohel
6+
<spkg_database_kohel>` package by the Sage command ::
7+
8+
sage -i database_kohel
9+
10+
EXAMPLES::
11+
12+
sage: # optional - database_kohel
13+
sage: db = HilbertClassPolynomialDatabase()
14+
sage: db[32]
15+
x^2 - 52250000*x + 12167000000
16+
17+
AUTHORS:
18+
19+
- David Kohel (2006-08-04): initial version
20+
321
"""
422
# ****************************************************************************
523
# Copyright (C) 2006 David Kohel <[email protected]>
@@ -45,8 +63,9 @@ def __getitem__(self, disc):
4563
r"""
4664
TESTS::
4765
66+
sage: # optional - database_kohel
4867
sage: db = HilbertClassPolynomialDatabase()
49-
sage: db[32] # optional - database_kohel
68+
sage: db[32]
5069
x^2 - 52250000*x + 12167000000
5170
sage: db[123913912]
5271
Traceback (most recent call last):
@@ -66,16 +85,17 @@ class HilbertClassPolynomialDatabase(ClassPolynomialDatabase):
6685
6786
EXAMPLES::
6887
88+
sage: # optional - database_kohel
6989
sage: db = HilbertClassPolynomialDatabase()
70-
sage: db[-4] # optional - database_kohel
90+
sage: db[-4]
7191
x - 1728
72-
sage: db[-7] # optional - database_kohel
92+
sage: db[-7]
7393
x + 3375
74-
sage: f = db[-23]; f # optional - database_kohel
94+
sage: f = db[-23]; f
7595
x^3 + 3491750*x^2 - 5151296875*x + 12771880859375
76-
sage: f.discriminant().factor() # optional - database_kohel
96+
sage: f.discriminant().factor()
7797
-1 * 5^18 * 7^12 * 11^4 * 17^2 * 19^2 * 23
78-
sage: db[-23] # optional - database_kohel
98+
sage: db[-23]
7999
x^3 + 3491750*x^2 - 5151296875*x + 12771880859375
80100
"""
81101
model = "Cls"

src/sage/databases/db_modular_polynomials.py

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
"""
2-
Database of Modular Polynomials
2+
Database of modular polynomials
3+
4+
This module gives access to the database of modular polynomials. To use the
5+
database, you need to install the optional :ref:`database_kohel
6+
<spkg_database_kohel>` package by the Sage command ::
7+
8+
sage -i database_kohel
9+
10+
EXAMPLES::
11+
12+
sage: # optional - database_kohel
13+
sage: DBMP = ClassicalModularPolynomialDatabase()
14+
sage: f = DBMP[29]
15+
sage: f.degree()
16+
58
17+
sage: f.coefficient([28,28])
18+
400152899204646997840260839128
19+
20+
AUTHORS:
21+
22+
- David Kohel (2006-08-04): initial version
23+
324
"""
425
# ****************************************************************************
526
# Copyright (C) 2006 William Stein <[email protected]>
@@ -48,8 +69,9 @@ def _dbz_to_integer_list(name):
4869
r"""
4970
TESTS::
5071
72+
sage: # optional - database_kohel
5173
sage: from sage.databases.db_modular_polynomials import _dbz_to_integer_list
52-
sage: _dbz_to_integer_list('PolMod/Atk/pol.002.dbz') # optional - database_kohel
74+
sage: _dbz_to_integer_list('PolMod/Atk/pol.002.dbz')
5375
[[3, 0, 1],
5476
[2, 1, -1],
5577
[2, 0, 744],
@@ -58,9 +80,9 @@ def _dbz_to_integer_list(name):
5880
[0, 2, 1],
5981
[0, 1, 7256],
6082
[0, 0, 15252992]]
61-
sage: _dbz_to_integer_list('PolMod/Cls/pol.001.dbz') # optional - database_kohel
83+
sage: _dbz_to_integer_list('PolMod/Cls/pol.001.dbz')
6284
[[1, 0, 1]]
63-
sage: _dbz_to_integer_list('PolMod/Eta/pol.002.dbz') # optional - database_kohel
85+
sage: _dbz_to_integer_list('PolMod/Eta/pol.002.dbz')
6486
[[3, 0, 1], [2, 0, 48], [1, 1, -1], [1, 0, 768], [0, 0, 4096]]
6587
"""
6688
from sage.rings.integer import Integer
@@ -130,14 +152,14 @@ def __getitem__(self, level):
130152
131153
EXAMPLES::
132154
155+
sage: # optional - database_kohel
133156
sage: DBMP = ClassicalModularPolynomialDatabase()
134-
sage: f = DBMP[29] # optional - database_kohel
135-
sage: f.degree() # optional - database_kohel
157+
sage: f = DBMP[29]
158+
sage: f.degree()
136159
58
137-
sage: f.coefficient([28,28]) # optional - database_kohel
160+
sage: f.coefficient([28,28])
138161
400152899204646997840260839128
139-
140-
sage: DBMP[50] # optional - database_kohel
162+
sage: DBMP[50]
141163
Traceback (most recent call last):
142164
...
143165
ValueError: file not found in the Kohel database

0 commit comments

Comments
 (0)