Skip to main content

passagemath: Lattice points in polyhedra with LattE integrale and 4ti2

Project description

passagemath is open source mathematical software in Python, released under the GNU General Public Licence GPLv2+.

It is a fork of SageMath, which has been developed 2005-2026 under the motto “Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, and MATLAB”.

The passagemath fork uses the motto “Creating a Free Passage Between the Scientific Python Ecosystem and Mathematical Software Communities.” It was created in October 2024 with the following goals:

Moreover, the passagemath project:

  • provides a stable, frequently updated version of the Sage distribution,

  • integrates additional mathematical software, notably Macaulay2, a full set of GAP packages, and the Combinatorial Matrix Recognition library,

  • curates a library of Sage user packages.

Full documentation is available online.

passagemath attempts to support and provides binary wheels suitable for all major Linux distributions and recent versions of macOS.

Binary wheels for native Windows (x86_64, ARM) are are available for a subset of the passagemath distributions. Use of the full functionality of passagemath on Windows currently requires the use of Windows Subsystem for Linux (WSL) or virtualization.

The supported Python versions in the passagemath-10.8.x series are 3.11.x-3.14.x; the passagemath-10.6.x series (EOL 2026-10) still supports Python 3.10.x.

About this pip-installable distribution package

This pip-installable source distribution passagemath-latte-4ti2 provides an interface to LattE integrale (for the problems of counting lattice points in and integration over convex polytopes) and 4ti2 (for algebraic, geometric and combinatorial problems on linear spaces).

What is included

Examples

Using LattE integrale and 4ti2 programs on the command line:

$ pipx run --pip-args="--prefer-binary" --spec "passagemath-latte-4ti2" sage -sh -c 'ppi 5'
...
### This makes 47 PPI up to sign
### Writing data file ppi5.gra and matrix file ppi5.mat done.

Finding the installation location of a LattE integrale or 4ti2 program in Python:

$ pipx run --pip-args="--prefer-binary" --spec "passagemath-latte-4ti2[test]" ipython

In [1]: from sage.features.latte import Latte_count

In [2]: Latte_count().absolute_filename()
Out[2]: '/Users/mkoeppe/.local/pipx/.cache/2dc147a5e4863b4/lib/python3.11/site-packages/sage_wheels/bin/count'

In [3]: from sage.features.four_ti_2 import FourTi2Executable

In [4]: FourTi2Executable('ppi').absolute_filename()
Out[2]: '/Users/mkoeppe/.local/pipx/.cache/2dc147a5e4863b4/lib/python3.11/site-packages/sage_wheels/bin/ppi'

Using the low-level Python interfaces:

$ pipx run --pip-args="--prefer-binary" --spec "passagemath-latte-4ti2[test]" ipython

In [1]: from sage.interfaces.latte import count

In [2]: cdd_Hrep = 'H-representation\nbegin\n 6 4 rational\n 2 -1 0 0\n 2 0 -1 0\n 2 0 0 -1\n 2 1 0 0\n 2 0 0 1\n 2 0 1 0\nend\n'

In [3]: count(cdd_Hrep, cdd=True)
Out[3]: 125

Use with sage.geometry.polyhedron:

$ pipx run --pip-args="--prefer-binary" --spec "passagemath-latte-4ti2[test]" ipython

In [1]: from passagemath_polyhedra import *

In [2]: P = Polyhedron(vertices=[[1,0,0], [0,0,1], [-1,1,1], [-1,2,0]])

In [3]: P.volume(measure='induced_lattice', engine='latte')
Out[3]: 3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

passagemath_latte_4ti2-10.8.5rc1-cp314-cp314t-macosx_13_0_x86_64.whl (8.5 MB view details)

Uploaded CPython 3.14tmacOS 13.0+ x86-64

passagemath_latte_4ti2-10.8.5rc1-cp314-cp314t-macosx_13_0_arm64.whl (7.7 MB view details)

Uploaded CPython 3.14tmacOS 13.0+ ARM64

passagemath_latte_4ti2-10.8.5rc1-cp312-abi3-macosx_13_0_x86_64.whl (8.5 MB view details)

Uploaded CPython 3.12+macOS 13.0+ x86-64

passagemath_latte_4ti2-10.8.5rc1-cp312-abi3-macosx_13_0_arm64.whl (7.7 MB view details)

Uploaded CPython 3.12+macOS 13.0+ ARM64

passagemath_latte_4ti2-10.8.5rc1-cp311-cp311-macosx_13_0_x86_64.whl (8.5 MB view details)

Uploaded CPython 3.11macOS 13.0+ x86-64

passagemath_latte_4ti2-10.8.5rc1-cp311-cp311-macosx_13_0_arm64.whl (7.7 MB view details)

Uploaded CPython 3.11macOS 13.0+ ARM64

File details

Details for the file passagemath_latte_4ti2-10.8.5rc1-cp314-cp314t-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for passagemath_latte_4ti2-10.8.5rc1-cp314-cp314t-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 99d9ec6cbe5d0c35b373eeead95a637c31cd2c697a24c391a8ecb3557c6d2489
MD5 5e569dbf89f472216151d89748db6a88
BLAKE2b-256 2c641bc8428232cfe4b8c3a008490c480e48099e27a4e203e3aa15c1dc63dcc7

See more details on using hashes here.

File details

Details for the file passagemath_latte_4ti2-10.8.5rc1-cp314-cp314t-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for passagemath_latte_4ti2-10.8.5rc1-cp314-cp314t-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 de76ac4680e5e222235c65556513bf4a4ba42ccb895f287982d54724ab5f63ff
MD5 f49248e26be586cc5dc77e752035f362
BLAKE2b-256 e978ebf94152a537b6f503a7b4a02c40ce1ee6d9a8bb4e099c765b86fcbd0d0e

See more details on using hashes here.

File details

Details for the file passagemath_latte_4ti2-10.8.5rc1-cp312-abi3-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for passagemath_latte_4ti2-10.8.5rc1-cp312-abi3-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 38bf0ce6ed15a81339bee746d99c103b4abb3c5ec875e40e4833661cf7b0907c
MD5 31150302fe129a3b33d64892bcf4b19b
BLAKE2b-256 8a2feb9eb509ea67031c9ae04405dbd7e0f7d32c6bb65dbe9758bcd021f94b11

See more details on using hashes here.

File details

Details for the file passagemath_latte_4ti2-10.8.5rc1-cp312-abi3-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for passagemath_latte_4ti2-10.8.5rc1-cp312-abi3-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 77d109d6dd77efa827a490830b8c834e2c72c7256dc448146606978073c9433c
MD5 b639d24482728cb0481e486921b5d014
BLAKE2b-256 2ff78588970f25368257208192f35c89fddc61021c9af8272c499118f28da8c6

See more details on using hashes here.

File details

Details for the file passagemath_latte_4ti2-10.8.5rc1-cp311-cp311-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for passagemath_latte_4ti2-10.8.5rc1-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 268492d29379725cb2a1fbf3945988d52ff1ffc0e99686c7ee86f52164356cc2
MD5 ea79d7d2be7a37fe06aedb5c674e6227
BLAKE2b-256 72474cfbf15309b646a0e74704651561d4ee2721fcce3c3526297b588c19ca43

See more details on using hashes here.

File details

Details for the file passagemath_latte_4ti2-10.8.5rc1-cp311-cp311-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for passagemath_latte_4ti2-10.8.5rc1-cp311-cp311-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 e5b71ba4cac0882466679a1006350cfa7da4805fdbdccecfe7a5d503690045fb
MD5 362bfa274a52c35cb1d9489384a564af
BLAKE2b-256 2bd55a93e5bea19682dd9b86bc0cfa126cca7d11b112fbb91be8166b440a9ebe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page