Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove most references to Arb as an independent library #37406

Merged
merged 1 commit into from
Mar 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion COPYING.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ the licenses of the components of Sage are included below as well.

SOFTWARE LICENSE
-----------------------------------------------------------------------
arb GPLv2+
boehm_gc MIT-like license (see below)
backports_ssl_match_hostname Python License
boost_cropped Boost Software License (see below)
Expand Down
1 change: 0 additions & 1 deletion build/bin/sage-package
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#
# $ sage-package list
# 4ti2
# arb
# autotools
# [...]
# zlib
Expand Down
10 changes: 5 additions & 5 deletions build/sage_bootstrap/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,18 @@ def list_cls(self, *package_classes, **filters):

$ sage --package list
4ti2
arb
autotools
_bootstrap
_develop
[...]
zlib

$ sage -package list --has-file=spkg-configure.m4 :experimental:
perl_term_readline_gnu

$ sage -package list --has-file=spkg-configure.m4 --has-file=distros/debian.txt
arb
boost_cropped
brial
4ti2
_develop
_prereq
[...]
zlib
"""
Expand Down
5 changes: 1 addition & 4 deletions build/sage_bootstrap/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,11 @@

$ sage --package list
4ti2
arb
autotools
[...]
zlib

$ sage --package list :standard:
arb
backports_ssl_match_hostname
_prereq
[...]
zlib
"""
Expand Down
17 changes: 9 additions & 8 deletions src/doc/en/developer/portability_testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -243,21 +243,22 @@ At the end of the ``./configure`` run, Sage issued a message like the
following::

configure: notice: the following SPKGs did not find equivalent system packages:
arb boost_cropped bzip2 ... zeromq zlib
boost_cropped bzip2 ... zeromq zlib
checking for the package system in use... debian
configure: hint: installing the following system packages is recommended and
may avoid building some of the above SPKGs from source:
configure: $ sudo apt-get install libflint-arb-dev ... libzmq3-dev libz-dev
configure: $ sudo apt-get install ... libzmq3-dev libz-dev
configure: After installation, re-run configure using:
configure: $ make reconfigure

This information comes from Sage's database of equivalent system
packages. For example::

root@39d693b2a75d:/sage# ls build/pkgs/arb/distros/
arch.txt conda.txt debian.txt gentoo.txt
root@39d693b2a75d:/sage# cat build/pkgs/arb/distros/debian.txt
libflint-arb-dev
$ ls build/pkgs/flint/distros/
alpine.txt cygwin.txt fedora.txt gentoo.txt macports.txt opensuse.txt void.txt
conda.txt debian.txt freebsd.txt homebrew.txt nix.txt repology.txt
$ cat build/pkgs/flint/distros/debian.txt
libflint-dev

Note that these package equivalencies are based on a current stable or
testing version of the distribution; the packages are not guaranteed
Expand Down Expand Up @@ -885,7 +886,7 @@ an isolated copy of Homebrew with all prerequisites for bootstrapping::
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
...
configure: notice: the following SPKGs did not find equivalent system packages: arb cbc cliquer ... tachyon xz zeromq
configure: notice: the following SPKGs did not find equivalent system packages: cbc cliquer ... tachyon xz zeromq
checking for the package system in use... homebrew
configure: hint: installing the following system packages is recommended and may avoid building some of the above SPKGs from source:
configure: $ brew install cmake gcc gsl mpfi ninja openblas gpatch r readline xz zeromq
Expand Down Expand Up @@ -1085,7 +1086,7 @@ Scrolling down in the right pane shows "Annotations":

docker (fedora-31, standard)
artifacts/logs-commit-8ca1c2df8f1fb4c6d54b44b34b4d8320ebecb164-tox-docker-fedora-31-standard/config.log#L1
configure: notice: the following SPKGs did not find equivalent system packages: arb cbc cddlib cmake eclib ecm fflas_ffpack flint fplll givaro gp
configure: notice: the following SPKGs did not find equivalent system packages: cbc cddlib cmake eclib ecm fflas_ffpack flint fplll givaro gp

Clicking on the annotations does not take you to a very useful
place. To view details, click on one of the items in the pane. This
Expand Down
2 changes: 1 addition & 1 deletion src/doc/en/reference/rings_numerical/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Interval Arithmetic
-------------------

Sage implements real and complex interval arithmetic using MPFI
(RealIntervalField, ComplexIntervalField) and arb (RealBallField,
(RealIntervalField, ComplexIntervalField) and FLINT (RealBallField,
ComplexBallField).

.. toctree::
Expand Down
6 changes: 4 additions & 2 deletions src/sage/arith/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,10 @@ def bernoulli(n, algorithm='default', num_threads=1):
- ``'default'`` -- use 'flint' for n <= 20000, then 'arb' for n <= 300000
and 'bernmm' for larger values (this is just a heuristic, and not guaranteed
to be optimal on all hardware)
- ``'arb'`` -- use the arb library
- ``'flint'`` -- use the FLINT library
- ``'arb'`` -- use the ``bernoulli_fmpq_ui`` function (formerly part of
Arb) of the FLINT library
- ``'flint'`` -- use the ``arith_bernoulli_number`` function of the FLINT
library
- ``'pari'`` -- use the PARI C library
- ``'gap'`` -- use GAP
- ``'gp'`` -- use PARI/GP interpreter
Expand Down
2 changes: 1 addition & 1 deletion src/sage/features/sagemath.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def __init__(self):
class sage__libs__flint(JoinFeature):
r"""
A :class:`sage.features.Feature` describing the presence of :mod:`sage.libs.flint`
and other modules depending on FLINT and arb.
and other modules depending on FLINT.

In addition to the modularization purposes that this tag serves, it also provides attribution
to the upstream project.
Expand Down
2 changes: 1 addition & 1 deletion src/sage/matrix/matrix_complex_ball_dense.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from sage.libs.arb.types cimport acb_mat_t
from sage.libs.flint.types cimport acb_mat_t
from sage.matrix.matrix_dense cimport Matrix_dense
from sage.matrix.matrix_generic_dense cimport Matrix_generic_dense
from sage.structure.parent cimport Parent
Expand Down
26 changes: 13 additions & 13 deletions src/sage/matrix/matrix_complex_ball_dense.pyx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# distutils: libraries = flint
r"""
Arbitrary precision complex ball matrices using Arb
Arbitrary precision complex ball matrices

AUTHORS:

- Clemens Heuberger (2014-10-25): Initial version.

This is a rudimentary binding to the `Arb library
<http://arblib.org>`_; it may be useful to refer to its
documentation for more details.
This is an incomplete interface to the `acb_mat module
<https://flintlib.org/doc/acb_mat.html>`_ of FLINT; it may be useful to refer
to its documentation for more details.

TESTS::

Expand Down Expand Up @@ -36,8 +36,8 @@ from cpython.object cimport Py_EQ, Py_NE
from cysignals.signals cimport sig_on, sig_str, sig_off

from sage.arith.power cimport generic_power_pos
from sage.libs.arb.acb cimport *
from sage.libs.arb.acb_mat cimport *
from sage.libs.flint.acb cimport *
from sage.libs.flint.acb_mat cimport *
from sage.libs.gmp.mpz cimport mpz_fits_ulong_p, mpz_get_ui
from sage.matrix.constructor import matrix
from sage.matrix.args cimport SparseEntry, MatrixArgs_init
Expand Down Expand Up @@ -120,7 +120,7 @@ cdef inline long prec(Matrix_complex_ball_dense mat) noexcept:
cdef class Matrix_complex_ball_dense(Matrix_dense):
"""
Matrix over a complex ball field. Implemented using the
``acb_mat`` type of the Arb library.
``acb_mat`` type of the FLINT library.

EXAMPLES::

Expand All @@ -143,7 +143,7 @@ cdef class Matrix_complex_ball_dense(Matrix_dense):
sage: type(a)
<class 'sage.matrix.matrix_complex_ball_dense.Matrix_complex_ball_dense'>
"""
sig_str("Arb exception")
sig_str("FLINT exception")
acb_mat_init(self.value, self._nrows, self._ncols)
sig_off()

Expand Down Expand Up @@ -695,7 +695,7 @@ cdef class Matrix_complex_ball_dense(Matrix_dense):
There is currently no guarantee that the algorithm converges as the
working precision is increased.

See the `Arb documentation <http://arblib.org/acb_mat.html#c.acb_mat_eig_multiple>`__
See the `FLINT documentation <https://flintlib.org/doc/acb_mat.html#c.acb_mat_eig_multiple>`__
for more information.

EXAMPLES::
Expand Down Expand Up @@ -764,7 +764,7 @@ cdef class Matrix_complex_ball_dense(Matrix_dense):

No guarantees are made about the accuracy of the output.

See the `Arb documentation <http://arblib.org/acb_mat.html#c.acb_mat_approx_eig_qr>`__
See the `FLINT documentation <https://flintlib.org/doc/acb_mat.html#c.acb_mat_approx_eig_qr>`__
for more information.

EXAMPLES::
Expand Down Expand Up @@ -822,7 +822,7 @@ cdef class Matrix_complex_ball_dense(Matrix_dense):
Additionally, there is currently no guarantee that the algorithm
converges as the working precision is increased.

See the `Arb documentation <http://arblib.org/acb_mat.html#c.acb_mat_eig_simple>`__
See the `FLINT documentation <https://flintlib.org/doc/acb_mat.html#c.acb_mat_eig_simple>`__
for more information.

EXAMPLES::
Expand Down Expand Up @@ -882,7 +882,7 @@ cdef class Matrix_complex_ball_dense(Matrix_dense):

No guarantees are made about the accuracy of the output.

See the `Arb documentation <http://arblib.org/acb_mat.html#c.acb_mat_approx_eig_qr>`__
See the `FLINT documentation <https://flintlib.org/doc/acb_mat.html#c.acb_mat_approx_eig_qr>`__
for more information.

EXAMPLES::
Expand Down Expand Up @@ -921,7 +921,7 @@ cdef class Matrix_complex_ball_dense(Matrix_dense):
Additionally, there is currently no guarantee that the algorithm
converges as the working precision is increased.

See the `Arb documentation <http://arblib.org/acb_mat.html#c.acb_mat_eig_simple>`__
See the `FLINT documentation <https://flintlib.org/doc/acb_mat.html#c.acb_mat_eig_simple>`__
for more information.

EXAMPLES::
Expand Down
2 changes: 0 additions & 2 deletions src/sage/misc/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
sage: sorted(pkgs.keys()) # optional - sage_spkg, random
['4ti2',
'alabaster',
'arb',
...
'zlib']

Expand Down Expand Up @@ -299,7 +298,6 @@ def list_packages(*pkg_types: str, pkg_sources: List[str] = ['normal', 'pip', 's
sage: L = list_packages('standard')
sage: sorted(L.keys()) # random
['alabaster',
'arb',
'babel',
...
'zlib']
Expand Down
4 changes: 2 additions & 2 deletions src/sage/numerical/gauss_legendre.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ def nodes_uncached(degree, prec):

.. TODO::

It may be worth testing if using the Arb algorithm for finding the
nodes and weights in ``arb/acb_calc/integrate_gl_auto_deg.c`` has better
It may be worth testing if using the FLINT/Arb algorithm for finding the
nodes and weights in ``src/acb_calc/integrate_gl_auto_deg.c`` has better
performance.
"""
cdef long j,j1,n
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/complex_arb.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from sage.libs.arb.acb cimport acb_t
from sage.libs.flint.acb cimport acb_t
from sage.rings.complex_interval cimport ComplexIntervalFieldElement
from sage.rings.real_arb cimport RealBall
from sage.structure.element cimport RingElement
Expand Down
53 changes: 26 additions & 27 deletions src/sage/rings/complex_arb.pyx
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# -*- coding: utf-8
r"""
Arbitrary precision complex balls using Arb
Arbitrary precision complex balls

This is a binding to the `Arb library <http://arblib.org>`_; it
may be useful to refer to its documentation for more details.
This is an incomplete interface to the `acb module of FLINT <https://flintlib.org/doc/acb.html>`_;
it may be useful to refer to its documentation for more details.

Parts of the documentation for this module are copied or adapted from
Arb's own documentation, licenced under the GNU General Public License
version 2, or later.
Parts of the documentation for this module are copied or adapted from Arb's
(now FLINT's) own documentation, licenced at the time under the GNU General
Public License version 2, or later.

.. SEEALSO::

- :mod:`Real balls using Arb <sage.rings.real_arb>`
- :mod:`Real balls <sage.rings.real_arb>`
- :mod:`Complex interval field (using MPFI) <sage.rings.complex_interval_field>`
- :mod:`Complex intervals (using MPFI) <sage.rings.complex_interval>`

Data Structure
==============

A :class:`ComplexBall` represents a complex number with error bounds. It wraps
an Arb object of type ``acb_t``, which consists of a pair of real number balls
an object of type ``acb_t``, which consists of a pair of real number balls
representing the real and imaginary part with separate error bounds. (See the
documentation of :mod:`sage.rings.real_arb` for more information.)

A :class:`ComplexBall` thus represents a rectangle `[m_1-r_1, m_1+r_1] +
[m_2-r_2, m_2+r_2] i` in the complex plane. This is used in Arb instead of a
[m_2-r_2, m_2+r_2] i` in the complex plane. This is used instead of a
disk or square representation (consisting of a complex floating-point midpoint
with a single radius), since it allows implementing many operations more
conveniently by splitting into ball operations on the real and imaginary parts.
Expand All @@ -43,7 +43,7 @@ Comparison

.. WARNING::

In accordance with the semantics of Arb, identical :class:`ComplexBall`
In accordance with the semantics of FLINT/Arb, identical :class:`ComplexBall`
objects are understood to give permission for algebraic simplification.
This assumption is made to improve performance. For example, setting ``z =
x*x`` sets `z` to a ball enclosing the set `\{t^2 : t \in x\}` and not the
Expand Down Expand Up @@ -161,16 +161,16 @@ from cpython.complex cimport PyComplex_FromDoubles
from sage.ext.stdsage cimport PY_NEW

from sage.libs.mpfr cimport MPFR_RNDU, MPFR_RNDD, MPFR_PREC_MIN, mpfr_get_d_2exp
from sage.libs.arb.types cimport ARF_RND_NEAR, arf_t, mag_t
from sage.libs.arb.arb cimport *
from sage.libs.arb.acb cimport *
from sage.libs.arb.acb_calc cimport *
from sage.libs.arb.acb_hypgeom cimport *
from sage.libs.arb.acb_elliptic cimport *
from sage.libs.arb.acb_modular cimport *
from sage.libs.arb.acb_poly cimport *
from sage.libs.arb.arf cimport arf_init, arf_get_d, arf_get_mpfr, arf_clear, arf_set, arf_is_nan
from sage.libs.arb.mag cimport (mag_init, mag_clear, mag_set_d,
from sage.libs.flint.types cimport ARF_RND_NEAR, arf_t, mag_t
from sage.libs.flint.arb cimport *
from sage.libs.flint.acb cimport *
from sage.libs.flint.acb_calc cimport *
from sage.libs.flint.acb_hypgeom cimport *
from sage.libs.flint.acb_elliptic cimport *
from sage.libs.flint.acb_modular cimport *
from sage.libs.flint.acb_poly cimport *
from sage.libs.flint.arf cimport arf_init, arf_get_d, arf_get_mpfr, arf_clear, arf_set, arf_is_nan
from sage.libs.flint.mag cimport (mag_init, mag_clear, mag_set_d,
MAG_BITS, mag_zero, mag_set_ui_2exp_si,
mag_mul_2exp_si)
from sage.libs.flint.fmpz cimport fmpz_t, fmpz_init, fmpz_get_mpz, fmpz_set_mpz, fmpz_clear
Expand Down Expand Up @@ -371,7 +371,7 @@ class ComplexBallField(UniqueRepresentation, sage.rings.abc.ComplexBallField):
sage: CBF.base_ring()
Real ball field with 53 bits of precision

There are direct coercions from ZZ and QQ (for which arb provides
There are direct coercions from ZZ and QQ (for which FLINT provides
construction functions)::

sage: CBF.coerce_map_from(ZZ)
Expand Down Expand Up @@ -1029,7 +1029,7 @@ class ComplexBallField(UniqueRepresentation, sage.rings.abc.ComplexBallField):
the ball field) -- absolute accuracy goal

Additionally, the following optional parameters can be used to control
the integration algorithm. See the `Arb documentation <http://arblib.org/acb_calc.html>`_
the integration algorithm. See the `FLINT documentation <https://flintlib.org/doc/acb_calc.html>`_
for more information.

- ``deg_limit`` -- maximum quadrature degree for each
Expand Down Expand Up @@ -1150,8 +1150,8 @@ class ComplexBallField(UniqueRepresentation, sage.rings.abc.ComplexBallField):

ALGORITHM:

Uses the `acb_calc <http://arblib.org/acb_calc.html>`_ module of the Arb
library.
Uses the `acb_calc <https://flintlib.org/doc/acb_calc.html>`_ module of
the FLINT library.

TESTS::

Expand Down Expand Up @@ -1256,7 +1256,7 @@ class ComplexBallField(UniqueRepresentation, sage.rings.abc.ComplexBallField):

cdef inline bint _do_sig(long prec) noexcept:
"""
Whether signal handlers should be installed for calls to arb.
Whether signal handlers should be installed for calls to FLINT.
"""
return (prec > 1000)

Expand Down Expand Up @@ -1298,8 +1298,7 @@ cdef inline real_ball_field(ComplexBall ball) noexcept:

cdef class ComplexBall(RingElement):
"""
Hold one ``acb_t`` of the `Arb library
<http://arblib.org>`_
Hold one ``acb_t`` of the `FLINT library <https://flintlib.org>`_

EXAMPLES::

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from sage.libs.gmp.types cimport mpz_t
from sage.libs.arb.types cimport arb_t
from sage.libs.flint.types cimport arb_t
from sage.rings.integer cimport Integer
from sage.rings.rational cimport Rational
from sage.rings.number_field.number_field_element cimport NumberFieldElement, NumberFieldElement_absolute
Expand Down
Loading
Loading