Skip to content

LR Calculator by @asbuch, C library and Python bindings. Repository imported from https://bitbucket.org/asbuch/lrcalc; branch "wheels" adds GH Actions workflow for building binary wheels for https://pypi.org/project/lrcalc/

License

Unknown, GPL-3.0 licenses found

Licenses found

Unknown
LICENSE
GPL-3.0
COPYING
Notifications You must be signed in to change notification settings

passagemath/upstream-lrcalc

Repository files navigation

# Littlewood-Richardson Calculator version 2.1

Copyright (C) 1999- Anders S. Buch (`asbuch` at `math` `rutgers` `edu`)

---------------------------------------------------------------

INSTALLATION
------------

This file explains how to install and use the programs. See the file `ChangeLog`
for a list of bug-fixes, enhancements, and contributors.

This project uses the standard installation procedure:

    ./configure
    make
    sudo make install

The last step installs the programs `lrcalc` and `schubmult` in the directory
`/usr/local/bin`, as well as the maple interface `lrcalc.maple` in
`/usr/local/share/lrcalc`. It also installs the `lrcalc` library and header
files. (The prefix `/usr/local` can be changed, see the file `INSTALL` for
details.)

On some Linux distributions you need to set the environment variable
`LD_LIBRARY_PATH` to load shared libraries installed in `/usr/local/lib`. If you
use Bash, then this can be done by adding the following line to the file
`$HOME/.bashrc` and starting a new shell:

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

Notice also that the Littlewood-Richardson Calculator is now integrated in the
`SAGE` open-source mathematics system. You may prefer to use `lrcalc` from
`SAGE` to take advantage of the additional functions in this system. It is also
possible to use the Littlewood-Richardson Calculator functions from Python, see
the section about Python bindings below.


USAGE
-----

We give a very brief description of the programs.

The program `lrcalc` can perform various operations on symmetric functions, and
its first argument must specify the operation to be used. There are five of
these operations:


## `lrcalc coef`

*Compute a single Littlewood-Richardson coefficient.*

The command `lrcalc coef z - x - y` computes the Littlewood-Richardson
coefficient c^z_{x,y} which is the coefficient of the Schur function s_z in the
product s_x * s_y.

### Example:

    lrcalc coef 3 2 1 - 2 1 - 2 1
    2


## `lrcalc skew`

*Expand a skew Schur function in the basis of Schur functions.*

The command `lrcalc skew z / x` lists all partitions y for which the
Littlewood-Richardson coefficient c^z_{x,y} is non-zero, with that coefficient
in front.

### Example:

    lrcalc skew 3 2 1 / 2 1
    2  (2,1)
    1  (1,1,1)
    1  (3)


## `lrcalc mult`

*Expand a product of two Schur functions in the basis of Schur functions.*

The command `lrcalc mult x - y` lists all partitions z for which the
Littlewood-Richardson coefficient c^z_{x,y} is non-zero, with that coefficient
in front.

### Example:

    lrcalc mult 2 1 - 2 1
    2  (3,2,1)
    1  (4,2)
    1  (3,1,1,1)
    1  (3,3)
    1  (2,2,1,1)
    1  (2,2,2)
    1  (4,1,1)

The option `-r <rows>` can be used to limit the partitions in the output to a
given number of rows.

The command `lrcalc mult` can also compute products in the small quantum
cohomology ring of a Grassmann variety.  The option `-q m,k` will use the
quantum ring of the Grassmannian Gr(m,m+k).  If `-q` is replaced with `-f`, then
the same product is computed, but the output is given in fusion ring notation.

### Example:

    lrcalc mult -q 3,2 3 2 1 - 3 2 1
    1  (2)
    1  (1,1)

    lrcalc mult -f 3,2 3 2 1 - 3 2 1
    1  (4,4,4)
    1  (5,4,3)


## `lrcalc coprod`

*Calculate coproducts in the ring of symmetric functions.*

The command `lrcalc coprod z` lists all pairs of partitions x and y for which
the Littlewood-Richardson coefficient c^z_{x,y} is non-zero, with that
coefficient in front.

### Example:

    lrcalc coprod 3 2 1
    1  (2,1,1)  (1,1)
    1  (3,2,1)  ()
    1  (3,1,1)  (1)
    1  (2,2)  (1,1)
    2  (2,1)  (2,1)
    1  (3,2)  (1)
    1  (3,1)  (2)
    1  (1,1,1)  (2,1)
    1  (2,2,1)  (1)
    1  (2,1,1)  (2)
    1  (2,2)  (2)
    1  (2,1)  (3)
    1  (3,1)  (1,1)


## `schubmult`

*Expand a product of two Schubert polynomials in the basis of Schubert polynomials.*

### Example:

    schubmult 1 3 2 - 1 3 2
    1  (2,3,1)
    1  (1,4,2,3)

The option `-s` tells `schubmult` to use *string* notation:

    schubmult -s 0 1 0 2 1 - 1 0 1 0 2
    1  (1,1,0,2,0)
    1  (1,2,0,0,1)
    1  (1,0,2,1,0)


PYTHON BINDINGS
---------------

The Littlewood-Richardson's functions can be called from Python by using the
Python bindings supplied with the package. The files required for this can be
found in the `python` subdirectory. However, these bindings are also available
at PyPI and can be installed with a single command:

    pip install lrcalc

### Example:

    >>> import lrcalc
    >>> lrcalc.mult([2,1], [2])
    {(2, 2, 1): 1, (4, 1): 1, (3, 1, 1): 1, (3, 2): 1}
    >>> lrcalc.skew([3,2,1], [2,1])
    {(2, 1): 2, (1, 1, 1): 1, (3,): 1}


MAPLE INTERFACE
---------------

The file `lrcalc.maple` in the directory `/usr/local/share/lrcalc` provides an
interface between the above C programs and Maple. To use the interface, simply
type

    read "/usr/local/share/lrcalc/lrcalc.maple";

after starting Maple.

You can copy the file `lrcalc.maple` to a more convenient directory to avoid
typing the full path every time you wish to load it.

The notation used by the Maple interface is the same as in John Stembridge's
`SF` Maple package for computing with symmetric functions.  I hope this will
make it easier to use `SF` with the Maple interface.

The Maple interface defines three Maple functions, `tos`, `skew`, and `lrcoef`.

### Example:

    maple
        |\^/|     Maple V Release 4 (WMI Campus Wide License)
    ._|\|   |/|_. Copyright (c) 1981-1996 by Waterloo Maple Inc. All rights
    \  MAPLE  /  reserved. Maple and Maple V are registered trademarks of
    <____ ____>  Waterloo Maple Inc.
        |       Type ? for help.
    > read "/usr/local/share/lrcalc/lrcalc.maple";
    > lrcoef([3,2,1], [2,1], [2,1]);
                                        2

    > skew(s[3,2,1], s[2,1]);
                            s[3] + 2 s[2, 1] + s[1, 1, 1]

    > tos(s[2,1] * s[2,1]);
    s[3, 3] + s[4, 2] + s[2, 2, 1, 1] + s[2, 2, 2] + 2 s[3, 2, 1] + s[4, 1, 1]

        + s[3, 1, 1, 1]

    > lrcoef( s[12,11,10,9,8,7,6,5,4,3,2,1],\
    s[8,7,6,5,4,3,2,1], s[8,7,6,6,5,4,3,2,1]);
                                        7869992


LICENSE
-------

This package is distributed under the terms of the GNU General Public License
(GPL) published by the Free Software Foundation; either version 3 of the
License, or (at your option) any later version. See
http://www.gnu.org/licenses/.


Enjoy!

Anders S. Buch  (September 20, 2021)

About

LR Calculator by @asbuch, C library and Python bindings. Repository imported from https://bitbucket.org/asbuch/lrcalc; branch "wheels" adds GH Actions workflow for building binary wheels for https://pypi.org/project/lrcalc/

Resources

License

Unknown, GPL-3.0 licenses found

Licenses found

Unknown
LICENSE
GPL-3.0
COPYING

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •