Sage 9.5 Release Tour

current development cycle (2021)

Symbolics

Changes to symbolic expressions

Interface to Mathics, a free implementation of the Wolfram language

Sage now has an optional package providing Mathics, a free (open-source) general-purpose computer algebra system featuring Mathematica-compatible syntax and functions, and an interface to it.#31778

Linear Algebra

Manifolds

Number theory

Elliptic curves and isogenies

Bugfixes:

Modular and quasimodular forms

David Ayotte's project in the 2021 Google Summer of Code has brought major new features and improvements to modular forms:

Also a conversion bug between spaces of modular forms was fixed. See Meta-ticket #31560 for an overview of tickets.

Algebra

New lazy Laurent series backend

The lazy Laurent series has been nearly completely rewritten using a new backend coefficient stream with a cache has both sparse and dense formatted input. This has been designed to increase speed and be very flexible. This has also been extensively doctested to make sure the code is robust. This constituted Tejavsi Chebrolu's 2021 GSoC project (metaticket). This is meant to be the eventual replacement of the coefficient streams used in the species code (including for lazy power series), which is known to be buggy (see, e.g., #15673). This also extends the functionality to include:

Lazy Dirichlet series

As a demonstration of the flexibility for the coefficient stream framework for lazy Laurent series, we also implement lazy Dirichlet series. We also give this a structure of a valuation ring by using the log of degree of the lowest nonzero coefficient.

Deprecated and removed functionality

Package upgrades

Configuration changes

Separate virtual environment for Python packages

In non-incremental builds from source, Sage now defaults to setting up the virtual environment for the Python packages in a directory separate from SAGE_ROOT/local. #32442

At the end of a run of ./configure, you will see messages like the following:

config.status: executing links commands
config.status: creating convenience symlink prefix -> local
config.status: creating convenience symlink venv -> local/var/lib/sage/venv-python3.9

The symbolic link SAGE_ROOT/venv points to the location of the virtual environment. It depends on the version of Python that is in use. The symbolic link is not needed for build or runtime; it is only provided for convenience.

The previous behavior can be restored by using ./configure --without-sage-venv.

New default: configure --with-system-gcc=force

The Sage distribution no longer attempts to build its own gcc if no suitable C/C++ compilers can be found. Instead, configure will exit with an error in this situation. #32060

The previous behavior can be restored by using ./configure --with-system-gcc=yes; alternatively, you can use ./configure --with-system-gcc=no.

Packages atlas and mpir removed

The package atlas, which could be used as an alternative to openblas, and the corresponding configure options have been removed. #30350

The package mpir, which could be used as an alternative to gmp, and the corresponding configure options have been removed. #32549

Modularization and packaging changes

Sage 9.5 contains many changes that were made as part of the modularization project described in #29705.

New distribution package: sage-setup

The build system of the Sage library, sage_setup, is now provided by a separate distribution package sage-setup. The source tree is the subdirectory pkgs/sage-setup/ of the Sage git repository. #29847

Pynac merged into the Sage library

The core of the symbolic expressions subsystem of Sage, an adaptation of the GiNaC library to Python known as Pynac, has been merged into the Sage library source code as src/sage/symbolic/ginac/; all future development of Pynac is intended to happen here. #32386, #32387

Doctest annotation "# optional - FEATURE" for portions of the Sage library

In the Sage doctesting framework, a line of tests can be conditionalized on the presence of a feature, such as an installed optional package, using a comment of the form # optional - FEATURE.

In Sage 9.5, doctests can also be conditionalized on the presence of certain parts of the Sage library. #32614

For example, doctests that depend on the Symbolic Ring can be marked # optional - sage.symbolic, and doctests that need number fields can be marked # optional - sage.rings.number_field.

Module-level annotation "# sage.doctest: optional - FEATURE"

Moreover, Sage 9.5 extends this mechanism by allowing developers to mark all doctests in a Python file as conditional on a feature. #30778

These module-level directives go to the top of the source file and take the form

# sage.doctest: optional - FEATURE

Abstract base classes for "isinstance" testing

The new module sage.rings.abc defines a number of abstract base classes that can be used for isinstance testing with parent classes instead of importing is_... functions from various implementation modules. #32566, #32600, #32606, #32610, #32612, #32660, #32665, #32719, #32742, #32750

In a similar way, sage.geometry.abc defines abstract base classes Polyhedron, ConvexRationalPolyhedralCone, etc. #32637

Likewise, sage.structure.element now defines an abstract base class Expression that can be used for isinstance testing, instead of importing is_Expression or the implementation class Expression from sage.symbolic.expression. #32638, #32730

See also Meta-ticket #32414.

Availability of Sage 9.5 and installation help

The first beta release in the 9.5 development series was tagged on 2021-08-31. The current development release is 9.5.beta8, tagged 2021-12-12.

As of 9.5.beta8, Sage does not yet support building on recent Linux distributions that use glibc >= 2.34 (fedora-35, ubuntu-impish etc.) #32756

As of 9.5.beta8, support for system python is still limited to 3.7 to 3.9; work to support system python 3.10 is ongoing. #30766

Sage 9.5 has dropped support for debian-jessie with the default compiler, GCC 4.9.x. This has allowed us to upgrade the package primecount to the latest version, which requires support for C++ 11, and to make it a standard package. (Sage 9.5 still supports distributions with compilers from the GCC 4.8.x series, such as ubuntu-trusty.) #25009

Building Sage 9.5 from source on Apple Silicon (M1) requires the use of Homebrew. Be sure to follow the README and the instructions that the ./configure command issues regarding the installation of system packages from Homebrew.

More details