gnu: tzdata: Update to 2020a.
[jackhill/guix/guix.git] / gnu / packages / algebra.scm
index c1cbaca..8682ecd 100644 (file)
@@ -1,13 +1,14 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2013, 2015, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2016, 2017, 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2016, 2017, 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2014, 2018 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2017, 2019 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -91,7 +92,7 @@ implement the floating point approach to complex multiplication are
 implemented.  On the other hand, these comprise asymptotically fast
 multiplication routines such as Toom–Cook and the FFT.")
    (license license:lgpl3+)
-   (home-page "http://mpfrcx.multiprecision.org/")))
+   (home-page "http://www.multiprecision.org/mpfrcx/")))
 
 (define-public gf2x
   (package
@@ -140,7 +141,7 @@ multiplication via floating point approximations.  It consists of libraries
 that can be called from within a C program and of executable command
 line applications.")
    (license license:gpl3+)
-   (home-page "http://cm.multiprecision.org/")))
+   (home-page "http://www.multiprecision.org/cm/")))
 
 (define-public fplll
   (package
@@ -201,6 +202,7 @@ the real span of the lattice.")
        (uri (git-reference
              (url "https://github.com/fplll/fpylll.git")
              (commit (string-append version "dev"))))
+       (file-name (git-file-name name version))
        (sha256
         (base32
          "01x2sqdv0sbjj4g4waj0hj4rcn4bq7h17442xaqwbznym9azmn9w"))))
@@ -224,7 +226,7 @@ the real span of the lattice.")
 (define-public pari-gp
   (package
     (name "pari-gp")
-    (version "2.11.1")
+    (version "2.11.2")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -232,12 +234,11 @@ the real span of the lattice.")
                     version ".tar.gz"))
               (sha256
                (base32
-                "1jfax92jpydjd02fwl30r6b8kfzqqd6sm4yx94gidyz9lqjb7a94"))))
+                "0fck8ssmirl8fy7s4mspgrxjs5sag76xbshqlqzkcl3kqyrk4raa"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("texlive" ,(texlive-union
-                    (list texlive-fonts-amsfonts
-                          texlive-latex-amsfonts)))))
+                    (list texlive-amsfonts)))))
     (inputs `(("gmp" ,gmp)
               ("libx11" ,libx11)
               ("perl" ,perl)
@@ -267,7 +268,7 @@ PARI is also available as a C library to allow for faster computations.")
 (define-public gp2c
   (package
    (name "gp2c")
-   (version "0.0.11pl1")
+   (version "0.0.11pl2")
    (source (origin
             (method url-fetch)
             (uri (string-append
@@ -275,7 +276,7 @@ PARI is also available as a C library to allow for faster computations.")
                   version ".tar.gz"))
             (sha256
               (base32
-                "1c6f6vmncw032kfzrfyr8bynw6yd3faxpy2285r009fmr0zxfs5s"))))
+                "0wqsf05wgkqvmmsx7jinvzdqav6rl56sr8haibgs31nzz4x9xz9g"))))
    (build-system gnu-build-system)
    (native-inputs `(("perl" ,perl)))
    (inputs `(("pari-gp" ,pari-gp)))
@@ -298,6 +299,20 @@ GP2C, the GP to C compiler, translates GP scripts to PARI programs.")
    (license license:gpl2)
    (home-page "https://pari.math.u-bordeaux.fr/")))
 
+(define fplll-4-cmh
+  (package
+    (inherit fplll)
+    (name "fplll")
+    (version "4.0.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "http://perso.ens-lyon.fr/damien.stehle/fplll/libfplll-"
+             version ".tar.gz"))
+       (sha256
+        (base32 "1cbiby7ykis4z84swclpysrljmqhfcllpkcbll1m08rzskgb1a6b"))))))
+
 (define-public cmh
   (package
    (name "cmh")
@@ -316,7 +331,7 @@ GP2C, the GP to C compiler, translates GP scripts to PARI programs.")
        ("mpfr" ,mpfr)
        ("mpc" ,mpc)
        ("mpfrcx" ,mpfrcx)
-       ("fplll" ,fplll)
+       ("fplll" ,fplll-4-cmh)
        ("pari-gp"  ,pari-gp)))
    (synopsis "Igusa class polynomial computations")
    (description
@@ -331,19 +346,19 @@ precision.")
 (define-public giac
   (package
     (name "giac")
-    (version "1.5.0-57")
-    (source (origin
-              (method url-fetch)
-              ;; "~parisse/giac" is not used because the maintainer regularly
-              ;; overwrites the release tarball there, introducing a checksum
-              ;; mismatch every time.  See
-              ;; <https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/README>
-              (uri (string-append "https://www-fourier.ujf-grenoble.fr/"
-                                  "~parisse/debian/dists/stable/main/"
-                                  "source/giac_" version ".tar.gz"))
-              (sha256
-               (base32
-                "08c93knsisbk9dkyyrignw0wvqbr1sa5czlvk5l307ahxbbmqncf"))))
+    (version "1.5.0-87")
+    (source
+     (origin
+       (method url-fetch)
+       ;; "~parisse/giac" is not used because the maintainer regularly
+       ;; overwrites the release tarball there, introducing a checksum
+       ;; mismatch every time.  See
+       ;; <https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/README>
+       (uri (string-append "https://www-fourier.ujf-grenoble.fr/"
+                           "~parisse/debian/dists/stable/main/source/"
+                           "giac_" version ".tar.gz"))
+       (sha256
+        (base32 "1d0h1yb7qvh9x7wwv9yrzmcp712f49w1iljkxp4y6g9pzsmg1mmv"))))
     (build-system gnu-build-system)
     (arguments
      `(#:modules ((ice-9 ftw)
@@ -470,7 +485,7 @@ fast arithmetic.")
 (define-public arb
   (package
     (name "arb")
-    (version "2.16.0")
+    (version "2.17.0")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -479,7 +494,7 @@ fast arithmetic.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0478671wfwy3gl26sbxh1jq1ih36z4k72waa8y2y2lvn649gb7cd"))))
+                "05lpy3hkl5f8ik19aw40cqydrb932xaf2n8hbq9ib5dnk7f010p1"))))
     (build-system gnu-build-system)
     (propagated-inputs
      `(("flint" ,flint)))               ; flint.h is included by arf.h
@@ -495,8 +510,8 @@ fast arithmetic.")
                    (flint (assoc-ref inputs "flint"))
                    (gmp (assoc-ref inputs "gmp"))
                    (mpfr (assoc-ref inputs "mpfr")))
-               ;; do not pass "--enable-fast-install", which makes the
-               ;; homebrew configure process fail
+               ;; Do not pass "--enable-fast-install", which makes the
+               ;; homebrew configure process fail.
                (invoke "./configure"
                        (string-append "--prefix=" out)
                        (string-append "--with-flint=" flint)
@@ -509,7 +524,7 @@ arithmetic.  It supports efficient high-precision computation with
 polynomials, power series, matrices and special functions over the
 real and complex numbers, with automatic, rigorous error control.")
     (license license:lgpl2.1+)
-    (home-page "http://fredrikj.net/arb/")))
+    (home-page "http://arblib.org")))
 
 (define-public python-flint
   (package
@@ -843,8 +858,8 @@ the la4j library are:
     (version "1.6")
     (source (origin
               (method url-fetch)
-              (uri (string-append "http://search.maven.org/remotecontent?"
-                                  "filepath=pl/edu/icm/JLargeArrays/"
+              (uri (string-append "https://repo1.maven.org/maven2/"
+                                  "pl/edu/icm/JLargeArrays/"
                                   version "/JLargeArrays-" version
                                   "-sources.jar"))
               (file-name (string-append name "-" version ".jar"))
@@ -870,8 +885,8 @@ that can store up to 263 elements.")
     (version "3.1")
     (source (origin
               (method url-fetch)
-              (uri (string-append "http://search.maven.org/remotecontent?"
-                                  "filepath=com/github/wendykierp/JTransforms/"
+              (uri (string-append "https://repo1.maven.org/maven2/"
+                                  "com/github/wendykierp/JTransforms/"
                                   version "/JTransforms-" version "-sources.jar"))
               (sha256
                (base32
@@ -895,15 +910,16 @@ Sine Transform} (DST) and @dfn{Discrete Hartley Transform} (DHT).")
 (define-public eigen
   (package
     (name "eigen")
-    (version "3.3.5")
+    (version "3.3.7")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://bitbucket.org/eigen/eigen/get/"
                                   version ".tar.bz2"))
               (sha256
                (base32
-                "1qh3yrwn78ms5yhwbpl5wvblk4gbz02cacdygxylr7i9xbrvylkk"))
+                "1km3fyfzyqfdvmnl79drps3fjwnz3zbh0c7l34mfbqyvvs8cy4wz"))
               (file-name (string-append name "-" version ".tar.bz2"))
+              (patches (search-patches "eigen-stabilise-sparseqr-test.patch"))
               (modules '((guix build utils)))
               (snippet
                ;; There are 3 test failures in the "unsupported" directory,
@@ -974,7 +990,7 @@ features, and more.")
 (define-public xtensor
   (package
     (name "xtensor")
-    (version "0.20.5")
+    (version "0.20.10")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -982,7 +998,7 @@ features, and more.")
                     (commit version)))
               (sha256
                (base32
-                "0kkc4ar7p2d94jnclmrh46dwv7ldy9lx630vm9gci3pp4hnhbj9f"))
+                "1fmv2hpx610xwhxrndfsfvlbqfyk4l3gi5q5d7pa9m82kblxjj9l"))
               (file-name (git-file-name name version))))
     (build-system cmake-build-system)
     (native-inputs
@@ -992,7 +1008,7 @@ features, and more.")
      `(#:configure-flags
        '("-DBUILD_TESTS=ON")
        #:test-target "xtest"))
-    (home-page "http://quantstack.net/xtensor")
+    (home-page "https://quantstack.net/xtensor")
     (synopsis "C++ tensors with broadcasting and lazy computing")
     (description "xtensor is a C++ library meant for numerical analysis with
 multi-dimensional array expressions.
@@ -1008,7 +1024,7 @@ xtensor provides:
 (define-public gap
   (package
     (name "gap")
-    (version "4.10.1")
+    (version "4.10.2")
     (source
      (origin
        (method url-fetch)
@@ -1018,8 +1034,7 @@ xtensor provides:
                            version
                            ".tar.bz2"))
        (sha256
-        (base32
-         "136s0zvhcw41fshj5zgsrjcy2kd58cdh2m3ddp5rdizi4rx54f10"))
+        (base32 "0cp6ddk0469zzv1m1vair6gm27ic6c5m77ri8rn0znq3gaps6x94"))
        (modules '((guix build utils) (ice-9 ftw) (srfi srfi-1)))
        (snippet
         '(begin
@@ -1333,47 +1348,6 @@ multiplication algorithm.")
     (license license:gpl2+)
     (home-page "https://bitbucket.org/malb/m4ri/")))
 
-(define-public ratpoints
-  (package
-    (name "ratpoints")
-    (version "2.1.3")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append
-                    "http://www.mathe2.uni-bayreuth.de/stoll/programs/"
-                    "ratpoints-" version ".tar.gz"))
-              (sha256
-               (base32
-                "0zhad84sfds7izyksbqjmwpfw4rvyqk63yzdjd3ysd32zss5bgf4"))
-              (patches
-               ;; Taken from
-               ;; <https://git.sagemath.org/sage.git/plain/build/pkgs/ratpoints/patches/>
-               (search-patches "ratpoints-sturm_and_rp_private.patch"))))
-    (build-system gnu-build-system)
-    (arguments
-     `(#:test-target "test"
-       #:make-flags
-       (list (string-append "INSTALL_DIR=" (assoc-ref %outputs "out")))
-       #:phases
-       (modify-phases %standard-phases
-         (delete 'configure)            ;no configure script
-         (add-before 'install 'create-install-directories
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
-               (mkdir-p out)
-               (with-directory-excursion out
-                 (for-each (lambda (d) (mkdir-p d))
-                           '("bin" "include" "lib"))))
-             #t)))))
-    (inputs
-     `(("gmp" ,gmp)))
-    (home-page "http://www.mathe2.uni-bayreuth.de/stoll/programs/")
-    (synopsis "Find rational points on hyperelliptic curves")
-    (description "Ratpoints tries to find all rational points within
-a given height bound on a hyperelliptic curve in a very efficient way,
-by using an optimized quadratic sieve algorithm.")
-    (license license:gpl2+)))
-
 (define-public symmetrica
   (package
     (name "symmetrica")
@@ -1400,7 +1374,7 @@ by using an optimized quadratic sieve algorithm.")
          (add-after 'unpack 'fix-makefile
            (lambda _
              (substitute* "makefile"
-               (("cc -c") "gcc -c"))
+               (("cc -c") "gcc -c -fPIC"))
              #t))
          (add-after 'fix-makefile 'turn-off-banner
            (lambda _
@@ -1460,3 +1434,127 @@ over finite fields of characteristic 2.  So it extends the functionality
 of M4RI from F_2 to F_{2^e}.")
     (license license:gpl2+)
     (home-page "https://bitbucket.org/malb/m4rie/")))
+
+(define-public eclib
+  (package
+    (name "eclib")
+    (version "20190909")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/JohnCremona/eclib/")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1gw27lqc3f525n8qdcmr2nyn16y9g10z9f6dnmckyyxcdzvhq35n"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)))
+    (inputs
+     `(("gmp" ,gmp)
+       ("ntl" ,ntl)
+       ("pari-gp" ,pari-gp)))
+    (synopsis "Ranks of elliptic curves and modular symbols")
+    (description "The eclib package includes mwrank (for 2-descent on
+elliptic curves over Q) and modular symbol code; it has been written by
+John Cremona to compute his elliptic curve database.")
+    (license license:gpl2+)
+    (home-page (string-append "http://homepages.warwick.ac.uk/staff/"
+                              "J.E.Cremona/mwrank/index.html"))))
+
+(define-public lrcalc
+  (package
+    (name "lrcalc")
+    (version "1.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://bitbucket.org/asbuch/lrcalc")
+                    (commit (string-append "lrcalc-" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1c12d04jdyxkkav4ak8d1aqrv594gzihwhpxvc6p9js0ry1fahss"))
+              (patches (search-patches "lrcalc-includes.patch"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'fix-permission
+           (lambda _
+             (chmod "lrcalc.maple.src" #o644)
+             #t)))))
+    (synopsis "Littlewood-Richardson calculator in algebraic combinatorics")
+    (description "The Littlewood-Richardson Calculator (lrcalc) is a
+program designed to compute Littlewood-Richardson coefficients.  It computes
+single Littlewood-Richardson coefficients, products of Schur functions, or
+skew Schur functions.  In addition it computes products in the small quantum
+cohomology ring of a Grassmann variety.  The software package also includes
+a program that performs fast computation of the more general multiplicative
+structure constants of Schubert polynomials.")
+    (license license:gpl2+)
+    (home-page "https://sites.math.rutgers.edu/~asbuch/lrcalc/")))
+
+(define-public iml
+  (package
+    (name "iml")
+    (version "1.0.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://www.cs.uwaterloo.ca/~astorjoh/iml-"
+                           version ".tar.bz2"))
+       (sha256
+        (base32
+         "0akwhhz9b40bz6lrfxpamp7r7wkk48p455qbn04mfnl9a1l6db8x"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("gmp", gmp)
+       ("cblas" ,openblas))) ; or any other BLAS library; the documentation
+                             ; mentions ATLAS in particular
+    (arguments
+     `(#:configure-flags
+       (list
+        "--enable-shared"
+        (string-append "--with-gmp-include="
+                       (assoc-ref %build-inputs "gmp") "/include")
+        (string-append "--with-gmp-lib="
+                       (assoc-ref %build-inputs "gmp") "/lib")
+        "--with-cblas=-lopenblas"
+        (string-append "--with-cblas-include="
+                       (assoc-ref %build-inputs "cblas") "/include")
+        (string-append "--with-cblas-lib="
+                       (assoc-ref %build-inputs "cblas") "/lib"))))
+    (home-page "https://cs.uwaterloo.ca/~astorjoh/iml.html")
+    (synopsis
+     "Solver for systems of linear equations over the integers")
+    (description
+     "IML is a C library implementing algorithms for computing exact
+solutions to dense systems of linear equations over the integers.
+Currently, IML provides the following functionality:
+
+@itemize
+@item Nonsingular rational system solving:
+compute the unique rational solution X to the system AX=B, where A and B
+are integer matrices, A nonsingular.
+@item Compute the right nullspace or kernel of an integer matrix.
+@item Certified linear system solving:
+compute a minimal denominator solution x to a system Ax=b, where b is an
+integer vector and A is an integer matrix with arbitrary shape and
+rank profile.
+@end itemize
+
+In addition, IML provides some low level routines for a variety of mod p
+matrix operations: computing the row-echelon form, determinant, rank
+profile, and inverse of a mod p matrix. These mod p routines are not
+general purpose; they require that p satisfy some preconditions based on
+the dimension of the input matrix (usually p should be prime and should be
+no more than about 20 bits long).")
+    (license license:bsd-3)))