Skip to main content

abakus

Sparse, vectorized algebra over countably infinite bases.

Many algebras in mathematics have a countable basis: polynomials in infinitely many variables, symmetric functions, Clifford and exterior algebras, Weyl algebras, class algebras of symmetric groups. abakus computes in such algebras directly in a chosen basis, with numpy arrays and Numba-compiled kernels.

Ideas

Vectors and bases. An element of an algebra is a Vector: a finite linear combination of basis elements, stored as an integer index array and a coefficient array. A basis is a class that knows what its indices mean. It defines multiplication, comultiplication and changes of basis on whole arrays of indices at once. Tensor products, smash products and linear maps are built uniformly on top of this.

Countably infinite bases. Most bases are infinite: all partitions, all monomials in infinitely many variables. Each vector touches only finitely many basis elements, and indices grow as needed. Beyond the int64 range, indices turn into exact Python integers on their own.

Tensor products are built uniformly: index rows are placed side by side, a @ b is a⊗b, and Koszul signs appear when two factors are superalgebras. Smash products such as Weyl algebras are tensor products with a twisted multiplication.

Partitions as integers. An integer partition is encoded by the boundary of its Ferrers diagram: a step up is a 1 bit, a step right is a 0 bit. The partition (8, 5, 2, 2) becomes 0b10001000110 == 1094. Partitions are then plain integers that can live in numpy arrays. Containment of diagrams implies x <= y. Horizontal and vertical strips, rim hooks, and transposition become bit operations. So do the Pieri, Littlewood–Richardson and Murnaghan–Nakayama rules (see docs/BinaryPartitions.md).

Example

>>> from abakus.symm import s, h, p
>>> s(2, 1) * s(1)              # Littlewood–Richardson rule
s{2,2} + s{3,1} + s{2,1,1}
>>> h(s(2, 1))                  # Jacobi–Trudi
-h{3} + h{2,1}
>>> s(p(3))                     # Murnaghan–Nakayama
s{3} - s{2,1} + s{1,1,1}
>>> s(100) * s(100) == s(h(100, 100))
True

>>> from abakus import bpart
>>> x = bpart.from_lambda([8, 5, 2, 2])
>>> x
1094
>>> bpart.to_lambda(bpart.transpose(x))
[4, 4, 2, 2, 2, 1, 1, 1]

>>> from abakus.clifford import CliffordAlgebraBasis, ExteriorAlgebraBasis as E
>>> C = CliffordAlgebraBasis[3, 0]
>>> C.u * C.v, C.v * C.u, (C.u + C.v) ** 2
(uv, -uv, 2)

>>> from abakus.polynomial import PolynomialBasis
>>> from abakus.weyl import polynomial_weyl_basis
>>> W = polynomial_weyl_basis(PolynomialBasis["x"])
>>> W.dx * W.x
1 + x∂

>>> s(2) @ E.u
s{2}⊗u

More in the tutorial, in docs/SymmetricFunctions.md and in docs/TensorProducts.md.

Modules

Module Contents
abakus.vector Vector, VectorBasis, tensor products, linear and bilinear maps
abakus.bpart integer partitions encoded as ints, scalar and array versions
abakus.polynomial (Laurent) polynomials in finitely many variables
abakus.infpoly polynomial rings with bases indexed by partitions
abakus.clifford Clifford and exterior algebras
abakus.symm symmetric functions (e, h, p, m, Schur), class algebras, Ivanov–Kerov algebra
abakus.weyl Weyl algebras as smash products

Installation

pip install abakus

Requires Python 3.14 or later, numpy and Numba.

For development:

pip install -e ".[dev]"
pytest

License

MIT, see LICENSE.

Metadata

Release files for abakus 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for abakus 0.1.0
File Size Uploaded
abakus-0.1.0.tar.gz 79.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for abakus 0.1.0
File Interpreter ABI Platform
abakus-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 145.6 kB

Release files / abakus-0.1.0.tar.gz

Download URL abakus-0.1.0.tar.gz
Size 79.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a3bbebba72716b67fc6524c44aa64feb9a1f4d36945a5ee6c660ce1e3c68d261
BLAKE2b-256 checksum
How to use checksums
43c7d14cfa2a61e9d521a4616b1aca3703bb16908a668773e1986feffafcb70c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release files / abakus-0.1.0-py3-none-any.whl

Download URL abakus-0.1.0-py3-none-any.whl
Size 65.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a10a05df5ce40ba772b4742997f0de8d3c770baf2c3768e1ddc6ab917c1b004b
BLAKE2b-256 checksum
How to use checksums
e02b72896a69a6300feb965977be4ef66dd5acf337c3aa3c992ecdf5df4d1107
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page