Sage 3.4 released
Sage 3.4 was released on March 11, 2009. The release of Sage 3.4 can be described as a sleeping beauty that has woken up after a long nap in the development wilderness. I’d sum up this release as the “drop-dead gorgeous” release. For a starter, the standard Sage documentation now uses the Sphinx documentation generator to bring you this
Examples are clearly highlighted and maths expressions in the HTML version are, dare I say it, publication quality. Don’t take my words for it; have a look here:
The main artist who did most of the conversion to the new documentation format is Mike Hansen. A near complete list of artists can be found on sage-devel.
Sage 3.4 closed 110 tickets, with an overall weighted documentation coverage of 65.3%. The total number of functions increased by 0.8% to 22,424. All tickets in the 3.4 milestone can be found on the trac server. Here’s a summary of features in this release, categorized under various headings.
- Rewrite the quaternion algebra module (Jonathan Bober, William Stein, Gonzalo Tornaria, John Voight, Michael Abshoff) — The quaternion algebra module is completely rewritten to enhance its performance. Note that a number of functions have been removed in the new version.
- Testing for graph isomorphism (Robert L. Miller) — Enhanced performance of the graph isomorphism test is_isomorphic(). The improved performance can be up to 3x faster than previously.
- Arrowheads in multi-edge digraphs (Emily Kirkman) — This feature has been in Sage even before this release. However, in version 3.4, Emily worked on enhancing the visualization of multi-edge digraphs. In a multi-edge digraph, the arrowheads pointing to a vertex are now clearly displayed. The following multi-edge digraph with arrowheads to indicate edge direction
can be produced using the code:
sage: S = SupersingularModule(389) sage: D = DiGraph(S.hecke_matrix(2)) sage: D.plot(vertex_size=50).show(figsize=10)
- Optimize transpose and antitranspose for dense matrices (Rob Beezer, Yann Laigle-Chapuy) — A rewrite of sections of the method transpose() in the class sage.matrix.matrix_dense.Matrix_dense, resulting in an improvement of up to 5x, depending on the computer architecture. For a system with architecture
CPU: Intel(R) Core(TM)2 Duo CPU T5450 @ 1.66GHz RAM: 2066004 KB Linux kernel: 2.6.24-23
one would obtain the following timing and memory statistics for a 3000×3000 identity matrix:
# BEFORE sage: m=identity_matrix(3000) sage: time m2=m.transpose(); m3=m.antitranspose() CPU times: user 14.13 s, sys: 1.11 s, total: 15.44 s Wall time: 15.44 s sage: get_memory_usage() 1254.28125 # AFTER sage: m=identity_matrix(3000) sage: time m2=m.transpose(); m3=m.antitranspose() CPU times: user 2.92 s, sys: 0.46 s, total: 3.38 s Wall time: 3.38 s sage: get_memory_usage() 835.6171875
Furthermore, on KUbuntu 8.10 with architecture
CPU: Intel(R) Core(TM)2 Duo CPU E8500 @ 3.16GHz RAM: 8 GB
for a 5000×5000 identity matrix, the previous time was 11.94s and the new improved time would be about 2.46s.
- Optimize transpose for integer and rational dense matrices (Yann Laigle-Chapuy) — New methods transpose() and antitranspose() for the classes sage.matrix.matrix_integer_dense.Matrix_integer_dense and sage.matrix.matrix_rational_dense.Matrix_rational_dense. The new method transpose() returns the transpose of an integer (respectively rational) dense matrix without changing the original matrix itself. In addition, the new method antitranspose() returns the antitranspose of an integer (respectively rational) matrix, leaving the original matrix unchanged.
- Update the libgcrypt spkg to libgcrypt-1.4.3.p0.spkg (Michael Abshoff) — Originally based on Gnu Privacy Guard (GnuPG), libgcrypt is a general purpose library of cryptographic primitives. As such, it does not provide an implementation of any cryptographic protocols, but rather serves as a collection of cryptographic building blocks.
- Update the Python spkg to python-2.5.2.p9.spkg (Michael Abshoff) — Python is a general purpose, object oriented programming language. Together with various other open source components, Python serves as a fundamental tool that unify the components of Sage under a common interface.
- Upgrade MPFR to version 2.4.1 upstream release (Michael Abshoff) — Version 2.4.1 of MPFR fixes critical security vulnerabilities in mpfr_snprintf() and mpfr_vsnprintf(), in particular, buffer overflow or off-by-one vulnerabilities. These vulnerabilities have been reported in previous versions of MPFR, and they can be exploited to compromise an application that uses the MPFR library. Users are advised to upgrade to the new MPFR spkg mpfr-2.4.1.spkg. A Secunia security advisory can be found here and a SecurityFocus security advisory is also available.
- Upgrade PyCrypto to version 2.0.1 upstream release (Michael Abshoff) — Version 2.0.1 fixes a buffer overflow vulnerability in the hash functions SHA256 and RIPEMD, which previously failed to adequately verify user-supplied input. The affected module is ARC2, an implementation of the RC2 block cipher. A successful exploit may allow an attacker to execute arbitrary code in the context of applications that uses the previously vulnerable ARC2 module. Furthermore, a failed attempt may lead to a denial-of-service attack. Users are advised to upgrade to the new PyCrypto spkg pycrypto-2.0.1.p3.spkg. A SecurityFocus security advisory can be found here.
- Merge Jon Hanke’s quadratic forms code (Gonzalo Tornaria, Michael Abshoff) — John Hanke has written a substantial amount of Sage code for working with quadratic forms. Hanke’s code can serve as base for further enhancement to the case of binary quadratic forms, which are quadratic forms involving two variables. There are currently a number of patches on the trac server for enhancing the functionalities of binary quadratic forms.
- Clifford invariant and Clifford conductor (Gonzalo Tornaria) — New functions clifford_invariant() and clifford_conductor() for computing Clifford invariants and conductors. The Clifford invariant is the class in the Brauer group of the Clifford algebra for even dimension. The new function clifford_invariant() computes the Clifford invariant of the even Clifford algebra for odd dimension. The new function clifford_conductor() computes the Clifford conductor, i.e. the product of all primes where the Clifford invariant is -1. See the following text for the definition of the Clifford invariant and p.119 for the formula relating it to the Hasse invariant:
- T.Y. Lam. “Introduction to Quadratic Forms over Fields”. Graduate Studies in Mathematics, vol.67. American Mathematical Society, 2005.
A big thank you to all the Sage bug report/patch authors who made my life as a release tour author easier through your comprehensive and concise documentation. A release tour can also be found on the Sage wiki.