Skip to content

Sage 10.1 Release Tour

Matthias Köppe edited this page Aug 29, 2024 · 47 revisions

Sage 10.1 was released on Aug 20, 2023.

Here is an overview of some of the main changes in this version.

Graph Theory

After a period of deprecation (#22349 and #27408), graph vertices and edges are no longer sorted by default. #36073

sage: G = Graph([(20, 21, 1), (4, 5, 2)])
sage: G.vertices()
[20, 21, 4, 5]
sage: G.vertices(sort=True)
[4, 5, 20, 21]
sage: G.vertices(sort=True, key=lambda x: -x)
[21, 20, 5, 4]
sage: G.edges()
[(20, 21, 1), (4, 5, 2)]
sage: G.edges(sort=True)
[(4, 5, 2), (20, 21, 1)]
sage: G.edges(sort=True, key=lambda e: e[2])
[(20, 21, 1), (4, 5, 2)]

Algebra

Sage now provides implementations of the following algebras:

  • Octonions #35630
  • The 27 dimensional exceptional Jordan algebra #35629
  • Twisted affine Lie algebras #35591
  • Casimir elements of the universal enveloping algebras of finite dimensional Lie algebras #35590
  • Down-up algebras and their Verma modules #35484

There were some bug fixes for Specht modules of the symmetric group. #35432.

Elliptic curves

  • .lift_x() is now deterministic. #35644
  • Composite isogenies of prime-power degree are now computed using faster "sparse strategies". #34965
  • Comparison of elliptic-curve morphisms is now much faster in some specific cases. #35494
  • .set_order() on elliptic-curve points now supports an optional multiple= keyword argument. #35935

Hyperplane arrangements

A type B version of the Ish arrangement was added as an example based on a recent preprint of Tran and Tsujie. #35757

Recognisable Series and k-Regular Sequences

Recognisable Series and k-regular sequences have been implemented in the last releases; as of 10.1, the support is no longer considered to be experimental. #21202

Drinfeld Modules

  • Several improvements in the computation of morphisms between two Drinfeld modules. See #35527 for more details
  • The logarithm and the exponential of Drinfeld modules over fields of generic characteristics are now implemented #35260
  • It is now possible to compute the set of basic $J$-invariants #35057

Symplectic manifolds

New operations regarding symplectic forms have been added #35354

Knot theory

We have changed the convention of how PD codes should be read from clockwise to counterclockwise as this is the most commonly used method (see #35665).

Package upgrades

mpmath has been upgraded to 1.3.0. #35929

NetworkX has been upgraded from 2.8.x to 3.1 (release notes 3.0, 3.1). #35671

The optional package igraph and its Python bindings have been upgraded to 0.10.4 (release notes 0.10.3, 0.10.4). #35671

The optional package SymEngine and its Python bindings have been upgraded to 0.10.x. #35713

The optional package barvinok has been upgraded to 0.41.7. #35839

OpenBLAS has been upgraded to 0.3.23. #35371

For a list of all packages and their versions, see

New developer tools, modularization, deprecations

Block-scoped # optional doctest tags

Doctests can now be conditionalized on the presence of optional packages or other features using block-scoped doctest tags. This fills the gap between doctest tags on individual doctest lines and file-scoped doctest tags. #35749

Examples in src/sage/numerical/backends/cvxpy_backend.pyx:

  • A file-scoped doctest tag
    # sage.doctest: optional - cvxpy
    r"""
    CVXPY Backend
    ...
  • Tags in individual doctest lines
    sage: p = MixedIntegerLinearProgram(solver="CVXPY/GLPK"); p.solve()            # optional - cvxopt
    0.0
    sage: p = MixedIntegerLinearProgram(solver="CVXPY/GLPK_MI"); p.solve()         # optional - cvxopt
    0.0
    sage: p = MixedIntegerLinearProgram(solver="CVXPY/CVXOPT"); p.solve()          # optional - cvxopt
    0.0
    sage: p = MixedIntegerLinearProgram(solver="CVXPY/GLOP"); p.solve()            # optional - ortools
    0.0
    sage: p = MixedIntegerLinearProgram(solver="CVXPY/PDLP"); p.solve()            # optional - ortools
    0.0
    sage: p = MixedIntegerLinearProgram(solver="CVXPY/CBC"); p.solve()             # optional - cylp
    0.0     
  • Using block-scoped tags, the above could be written
    sage: # optional - cvxopt
    sage: p = MixedIntegerLinearProgram(solver="CVXPY/GLPK"); p.solve()            
    0.0
    sage: p = MixedIntegerLinearProgram(solver="CVXPY/GLPK_MI"); p.solve()         
    0.0
    sage: p = MixedIntegerLinearProgram(solver="CVXPY/CVXOPT"); p.solve()          
    0.0
    sage: # optional - ortools
    sage: p = MixedIntegerLinearProgram(solver="CVXPY/GLOP"); p.solve()            
    0.0
    sage: p = MixedIntegerLinearProgram(solver="CVXPY/PDLP"); p.solve()            
    0.0
    sage: # optional - cylp
    sage: p = MixedIntegerLinearProgram(solver="CVXPY/CBC"); p.solve()            
    0.0     

# needs doctest tags for modularized doctesting

Doctest tags for standard packages and features, enabling the separate testing of the distribution packages of the modularized Sage library, are now marked # needs instead of # optional. #35749

Examples in src/sage/combinat/cluster_algebra_quiver/cluster_seed.py:

  • A file-scoped doctest tag
    # sage.doctest: needs sage.graphs sage.modules
    r"""
    ClusterSeed               
    ...
  • Tags in individual doctest lines
    sage: S = ClusterSeed(['A',5])
    sage: S.plot()                                                              # needs sage.plot sage.symbolic
    Graphics object consisting of 15 graphics primitives
    sage: S.plot(circular=True)                                                 # needs sage.plot sage.symbolic
    Graphics object consisting of 15 graphics primitives
    sage: S.plot(circular=True, mark=1)                                         # needs sage.plot sage.symbolic
    Graphics object consisting of 15 graphics primitives    
  • Using block-scoped tags, the above could be written
    sage: # needs sage.plot sage.symbolic
    sage: S = ClusterSeed(['A',5])
    sage: S.plot()                                                             
    Graphics object consisting of 15 graphics primitives
    sage: S.plot(circular=True)                                                 
    Graphics object consisting of 15 graphics primitives
    sage: S.plot(circular=True, mark=1)                                        
    Graphics object consisting of 15 graphics primitives     

sage -fixdoctests

Sage provides a development tool that assists with updating doctests, sage -fixdoctests. It has now been documented and expanded to assist with modularization tasks. #35749, #36024, #36034

When a file uses a file-level # sage.doctest: optional/needs FEATURE directive, the doctest fixer automatically removes the redundant # optional/needs FEATURE tags from all sage: lines. Likewise, when a block-scoped doctest tag sage: # optional/needs FEATURE is used, then the doctest fixer removes redundant tags from all doctests in this scope. For example:

# sage.doctest: optional - sirocco sage.rings.number_field
r"""
...

EXAMPLES::

    sage: # needs sage.modules sage.rings.number_field
    sage: Q5 = QuadraticField(5)
    sage: V = Q5^42                                 # optional - sage.modules
    sage: T = transmogrify(V)           # optional - bliss sirocco

is automatically transformed to:

# sage.doctest: optional - sirocco, needs sage.rings.number_field
r"""
...

EXAMPLES::

    sage: # needs sage.modules
    sage: Q5 = QuadraticField(5)
    sage: V = Q5^42
    sage: T = transmogrify(V)               # optional - bliss

The doctest fixer also aligns the # optional/needs FEATURE tags on individual doctests at a fixed set of tab stops.

The doctester may issue style warnings when # optional/needs tags are repeated on a whole block of doctests, suggesting to use a block-scoped tag instead. The doctest fixer makes these changes automatically.

New doctest option --hide

We have a new option for sage -t to detect doctests that need to be marked as # optional but are missing the tag (see #35668 and #34185). If an optional package is installed, the new option pretends that it is not available during the test run.

New distribution packages sagemath-{bliss,coxeter3,mcqd,meataxe,sirocco,tdlib}

These distribution packages ship Cython modules with compile-time dependencies on optional packages. #35661, #36003, #36015

Downstream packagers are encouraged to create corresponding packages for their distributions. The downstream package information should as usual be placed in the distros/ directories.

Bootstrapping individual SPKGs

The bootstrap script now accepts names of SPKGs to bootstrap; this can save time compared to running the full bootstrapping process. #35950

Deprecations

The functions is_SymbolicVariable, is_SymbolicEquation have been deprecated. #35505

Availability of Sage 10.1 and installation help

Sources

The Sage 10.1 source code is available in the Sage GitHub repository.

Sage builds successfully on the following platforms:

  • Linux 64-bit (x86_64), see CI Linux
  • Linux 32-bit (i386/i686)
    • ubuntu-bionic-gcc_8
    • debian-buster
    • debian-bullseye
  • macOS (Intel) (x86_64) - with Homebrew or without
    • macOS 11.x (Big Sur)
    • macOS 12.x (Monterey)
    • macOS 13.x (Ventura)
  • macOS (Apple Silicon, M1/M2) - with Homebrew or without
    • Make sure that /usr/local does not contain an old copy of homebrew (or other software) for x86_64 that you may have copied from an old machine. Homebrew for the M1/M2 is installed in /opt/homebrew, not /usr/local.
    • Be sure to follow the README and the instructions that the ./configure command issues regarding the installation of system packages from Homebrew or conda.

You can also build Sage on top of conda-forge on Linux and macOS.

Sage 10.x does not support Cygwin; use Windows Subsystem for Linux instead. Because of unresolved problems with standard packages GIAC (#34269), ECL (#34127), Maxima (#30796), and the rebasing facility (#34223), Sage 10.x does not support Cygwin. Users on Windows 10 and 11 can migrate to using WSL as described in our installation guide. A convenient way to use such an installation of Sage is via VS Code's WSL remote. #34301, #30484

Known problems and workarounds

The Singular package shipped by Homebrew is not suitable for Sage and can lead to crashes. Workaround: Configure Sage to build its own Singular package (./configure --without-system-singular). #35934

The latest version of ECL (23.9.9) is not suitable for Sage. Workaround: Configure Sage to build its own ECL package (./configure --without-system-ecl). #36235

On macOS, the SciPy package may fail to build when the Xcode command-line tools version 15.0 are used together with gfortran from Homebrew's GCC package. Workaround: Configure Sage to build its own gfortran (./configure --without-system-gfortran). #36342

On macOS, when the Xcode command-line tools version 15.0 are used, also ECM may fail to build. Workaround: Downgrade the Xcode command-line tools to an earlier version. #36345

Help

See README.md in the source distribution for installation instructions.

Visit sage-support for installation help.

More details

Clone this wiki locally