Skip to main content

alggeom

alggeom is a Python package for exact computational algebraic geometry over supported coefficient fields. Its main interfaces cover polynomial ideals and coordinate rings, affine and projective schemes, components, local invariants, normalization, finite projections, modules and graded resolutions. You could use it to turn parametrizations into equations, retain multiplicity in fibers, analyze singularities, compute finite projections and normalize affine models.

Parameter calculations include constructible images, supported fiber strata, specialization-aware Gröbner bases and replayable certificates. Function decomposition exposes rational and algebraic intermediate functions. The optional real profile verifies domains and selected branches through the semialg package.

Gröbner construction uses the verified native algroots backend by default. Explicit SymPy selection supports portable ideal and quotient construction.

Installation

Python 3.11 or later is required. Install the core package from PyPI:

python -m pip install alggeom

For real inequalities, selected branches and semialgebraic graph verification, install the optional real-geometry extra:

python -m pip install "alggeom[real]"

The core package requires algroots 0.4.0 or newer, SymPy 1.14, and python-flint 0.9. The real (real geometry) extra additionally requires semialg 1.5.0 or newer. Core algebraic geometry works without semialg.

The default Gröbner backend requires a native algroots installation. Compatible algroots wheels include the compiled kernels and their numerical libraries. If pip installs a portable algroots distribution, select the SymPy backend explicitly for ideal and quotient construction as shown below. See backend installation and selection for source builds and dependency profiles.

Quick start

import sympy as sp
from alggeom.ideals import PolynomialRing
from alggeom.schemes import AffineScheme
from alggeom.normalization import integral_closure

x, y = sp.symbols("x y")
S = PolynomialRing((x, y))
cusp = AffineScheme(S.ideal(y**2 - x**3))
assert cusp.coordinate_ring.krull_dimension == 1
assert cusp.multiplicity((0, 0)) == 2
assert not cusp.is_smooth((0, 0))
closure = integral_closure(cusp)
assert closure.mapping.is_injective and closure.verify()
assert closure.conductor == S.ideal(x, y)

The cusp has one-dimensional local geometry and a two-dimensional tangent space at the origin. Its normalization adds the integral function y/x. This is different from Noetherian normalization, which finds a polynomial subring over which the existing ring is finite.

Package boundaries

algroots supplies Gröbner-basis construction, finite quotient and coefficient-field arithmetic. semialg supplies exact real decisions and branch conditions. alggeom owns general coordinate rings, schemes, normalization and decomposition workflows. See package ownership.

Capabilities and limits

Task Result Scope
Ideals and coordinate rings Exact normal forms, ideal operations, elements and homomorphisms Supported exact fields; Krull dimension is distinct from finite vector-space dimension
Schemes and maps Affine/projective points, fibers, constructible sets, and exact existential images Exact locally closed images of arbitrary affine polynomial and rational maps over QQ (the rationals ℚ), with an explicit branch budget
Components and local geometry Radicals, primary factors, absolute primary factors of hypersurfaces, selected finite algebras, separated complete intersections, and polynomial-graph prime ideals, tangent cones and local intersection multiplicity Field-relative primary decomposition and certified QQ hypersurface absolute splitting; isolated proper local intersections
Modules and resolutions Kernel/image/cokernel, tensor, Hom, Fitting ideals and Betti tables Finite presentations; standard-graded polynomial resolutions
Noether normalization Certified finite projection and monic integral relations Spanning module generators need not be a free basis
Normalization Affine finite birational maps, projective normalization patches and domain conductors Reduced characteristic-zero affine algebras; regular projective-chart transitions and co-cycle verification; no single global projective embedding
Finite-field points Complete field-valued enumeration Candidate budgets bound the ambient enumeration
Parameter families and morphisms Univariate, hypersurface, affine-linear, and coupled nonlinear parameter strata; generic degree of affine maps Exact constructible dimension and bounded geometric-point strata over QQ (the rationals ℚ); specialization-aware Gröbner bases on supported parameter branches, including recursively split algebraic exceptional graphs; generic degrees for characteristic-zero affine-space targets; finiteness and relative-differential branch loci for finite affine morphisms
Function decomposition Rational components, implicit reconstructions and chains Declared characteristic-zero constants and documented completeness boundaries
Real verification Domains, poles, selectors and graph conditions Optional semialg extra; algebraic equality alone does not preserve real branches

Choose the declared coefficient field before computing: a result over the rationals ℚ, written QQ in the API, need not remain valid after specialization or a change of field. A bounded rational-point search cannot prove that a variety has no rational points. Resource exhaustion raises or returns the incomplete search record documented by the interface.

The capability matrix and mathematical scope, coefficient-field matrix and input limitations describe supported inputs, completeness boundaries and explicit refusals.

Gröbner bases and exact verification

Ideals and coordinate rings delegate Gröbner-basis construction to the algroots package, using groebner_backend="native" by default. Prime-field calculations preserve the characteristic, and rational calculations use rational reconstruction. Accelerated bases pass independent exact verification before use in normal forms. Public timing includes that verification.

Use ring.ideal(..., groebner_backend="sympy") or ring.quotient(..., groebner_backend="sympy") for portable construction. Higher-level workflows such as function decomposition can also invoke native algroots operations and require the compiled kernels.

For a portable ideal calculation:

import sympy as sp
from alggeom.ideals import PolynomialRing

x, y = sp.symbols("x y")
ring = PolynomialRing((x, y))
ideal = ring.ideal(x**2 - y, y**2 - 1, groebner_backend="sympy")
assert ideal.normal_form(x**4 - 1) == 0

Use ideal.groebner_basis_from("native", limits=...) for an explicitly requested calculation, or pass groebner_limits to the ideal or quotient factory. Availability errors, verification failures, exhausted budgets, etc are reported to the caller. See quotients and Gröbner backends and the algroots Gröbner guide for field support and limit semantics.

Applications

Problem Executable application
Normalize a cusp, take a finite fiber and select its upper real branch Cusp and real branch
Separate quadratic, linear, empty and entire-line fibers Quadratic fibers
Count points over prime and extension fields Finite-field points
Derive the reachable disk of a planar two-link arm Linkage workspace
Compare finite projection with integral closure Affine normalization
Compute kernels, Hom and tensor of torsion modules Module arithmetic

The application tutorials state the expected answers and assumptions. The example catalog has the complete set of runnable scripts.

Documentation

Start with getting started, then choose a mathematical task in the documentation index. The API reference gives signatures and result types.

Topic Guides
Geometric objects and conventions Geometry, schemes, conventions
Exact images and parameter fibers Constructible images, nonlinear families, coupled fibers
Polynomial bases and parameter arithmetic Gröbner covers, prime parameter ideals, quotient localizations
Algebraic extensions and geometric components Constant fields, absolute factorization, geometric constructions
Function decomposition and real domains Decomposition guide, worked applications

The mathematical references and bibliography explain the algorithms and conventions behind these interfaces.

Development and testing

From a source checkout with matching backends installed:

python -m pip install ".[test,real]"
python -m pytest
ruff check .
ruff format --check .
python tools/generate_api.py --check

Use python tools/install_backends.py --profile real to install matching sibling backend checkouts when available, or add --published to test the declared released dependencies. For the core profile, install ".[test]" and run python -m pytest --without-real.

The testing guide covers installed-wheel examples, source-distribution rebuilding, optional dependency isolation and certificate checks. The benchmark guide separates performance measurements from correctness tests. Use the release checks before publication.

License

alggeom is licensed under the GNU General Public License, version 3 only (GPL-3.0-only). See LICENSE.

Metadata

Release files for alggeom 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 alggeom 0.1.0
File Size Uploaded Provenance Actions
alggeom-0.1.0.tar.gz 378.1 kB With provenance Details for alggeom-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 557.3 kB

Release files / alggeom-0.1.0.tar.gz

Download URL alggeom-0.1.0.tar.gz
Size 378.1 kB
Tags Source
SHA-256 checksum
How to use checksums
fdacfbeda4b04684029f6755e50a8923f194151f90d6e76bc69c36346b59f12a
BLAKE2b-256 checksum
How to use checksums
c22577100a6705152897cca9cf2a0f0c49afcee52f40cee5c9b835364620dbb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 12, 2026.

Transparency log

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

Download URL alggeom-0.1.0-py3-none-any.whl
Size 179.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b069b0f866436ed5ae037dbbe4bca645b5848c1ea6c076b50e621c7638ade935
BLAKE2b-256 checksum
How to use checksums
5a43e9a07873fee6f14da029851e887ad035cccde5d10a4ed860f406d871ba4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 12, 2026.

Transparency log

Security for alggeom 0.1.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for alggeom-0.1.0.tar.gz

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 Nov 12, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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