Sage 4.3.1 Release Tour

Major features

Algebra

Basic arithmetic

Combinatorics

Elliptic curves

For elliptic curves over QQ we can find the complete isogeny class (previously this functionality was provided by the eclib library, but now it is native in Sage, which avoids the precision problems of the library version). The list of isogenous curves is returned, as well as a matrix of the degrees of the isogenies between them:

sage: EllipticCurve('14a1').isogeny_class()
([Elliptic Curve defined by y^2 + x*y + y = x^3 + 4*x - 6 over Rational Field, Elliptic Curve defined by y^2 + x*y + y = x^3 - 36*x - 70 over Rational Field, Elliptic Curve defined by y^2 + x*y + y = x^3 - x over Rational Field, Elliptic Curve defined by y^2 + x*y + y = x^3 - 171*x - 874 over Rational Field, Elliptic Curve defined by y^2 + x*y + y = x^3 - 11*x + 12 over Rational Field, Elliptic Curve defined by y^2 + x*y + y = x^3 - 2731*x - 55146 over Rational Field], [ 1  2  3  3  6  6]
[ 2  1  6  6  3  3]
[ 3  6  1  9  2 18]
[ 3  6  9  1 18  2]
[ 6  3  2 18  1  9]
[ 6  3 18  2  9  1])

sage: EllipticCurve(j=-640320^3).isogeny_class()
([Elliptic Curve defined by y^2 + y = x^3 - 2174420*x + 1234136692 over Rational Field, Elliptic Curve defined by y^2 + y = x^3 - 57772164980*x - 5344733777551611 over Rational Field], [  1 163]
[163   1])

Graph theory

Linear algebra

Miscellaneous

# File p.sage
def h(s):
    sleep(1)
    return s*s

def f(n1, n2, cores=24):
    @parallel(cores)
    def g(n):
        return h(n)*h(n)
    return [a for _, a in g([n1..n2])]

#------

sage: load p.sage
sage: time f(1,24)
CPU times: user 0.03 s, sys: 0.22 s, total: 0.25 s
Wall time: 2.28 s
[1, 16, 81, 256, 625, 1296, 2401, 4096, 6561, 10000, 14641, 28561, 20736,
 38416, 50625, 65536, 83521, 104976, 130321, 160000, 194481, 234256, 279841, 331776]

This rewrite involves replacing the old implementation, which used multiprocessing (or Dsage), by a new one which uses the fork system call (it's about 2 pages of code written using only basic Python).

Number theory

Packages