Skip to content

commalg · StrongGroebnerBasis

8 accepted declarations. Python and Rust forms, contracts, evidence, failure boundaries, and checked usages are kept together below.

Worked example

The complete checked program Reproduce Fisher's order-five elliptic-function normalization uses this API directly.

# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Reproduce Fisher's order-five elliptic-function normalization."""

from noether import Q
from noether.commalg import RationalFunctionField, WeilDivisor
from noether.numthy import EllipticCurve, NthPowerClassGroup


def main() -> None:
    coefficients = RationalFunctionField(Q, "lambda")
    parameter = coefficients.generator()
    curve = EllipticCurve(
        coefficients,
        [1 - parameter, -parameter, -parameter, 0, 0],
    )
    point = curve.point(0, 0)
    point.verify_exact_order(5)

    miller = curve.miller_function(point, 5)
    divisor = WeilDivisor(
        curve.underlying_curve,
        [
            (curve.origin().underlying_curve_point.as_closed_point(), 5),
            (point.underlying_curve_point.as_closed_point(), -5),
        ],
    )
    function = divisor.riemann_roch_space().basis[0]
    assert (function / miller.function).as_constant() is not None

    evaluation_at_two = function.evaluate_at((2 * point).underlying_curve_point)
    evaluation_at_four = function.evaluate_at((4 * point).underlying_curve_point)
    assert evaluation_at_two.value is not None
    assert evaluation_at_four.value is not None
    classes = NthPowerClassGroup(coefficients, 5)
    normalization = classes.class_of(evaluation_at_two.value) ** -2 * classes.class_of(
        evaluation_at_four.value
    )
    assert normalization.is_identity()
    print("order 5 verified; Riemann--Roch and Miller agree; normalization is trivial")


if __name__ == "__main__":
    main()

Run it with .venv/bin/python examples/26_elliptic_descent_functions.py.

commalg.StrongGroebnerBasis

A verified normalized strong Groebner basis over Z.

class StrongGroebnerBasis

noether::commalg::StrongGroebnerBasis · Direct Rust declaration

pub struct StrongGroebnerBasis { /* private fields */ }
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel
GIL attached / bounded
Semantic ID noether/commalg/StrongGroebnerBasis@1

Executable usage: validation/unit/commalg/test_integer_groebner_facade.py:13 · validation/unit/commalg/test_integer_groebner_facade.py:19 · validation/unit/commalg/test_integer_groebner_facade.py:5

commalg.StrongGroebnerBasis.__contains__

Return bool(key in self).

Detailed contract

Decide exact membership in the represented integral polynomial ideal.

(self, value: Polynomial[IntegerRing]) -> bool

noether::commalg::StrongGroebnerBasis::contains · Direct Rust declaration

pub fn contains( &self, value: &Polynomial<IntegerRing>, ) -> Result<bool, GroebnerError>
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel
GIL attached / bounded
Semantic ID noether/commalg/StrongGroebnerBasis@1

Executable usage: validation/unit/infra/test_discovery.py:200

commalg.StrongGroebnerBasis.basis

Deterministically normalized strong basis.

Detailed contract

Positive-leading-coefficient strong basis in deterministic order.

(self) -> list[Polynomial[IntegerRing]]

noether::commalg::StrongGroebnerBasis::basis · Direct Rust declaration

pub fn basis(&self) -> &[Polynomial<IntegerRing>]
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel
GIL attached / bounded
Semantic ID noether/commalg/StrongGroebnerBasis@1

Executable usage: examples/26_elliptic_descent_functions.py:28 · examples/30_modules_and_resolutions.py:27 · examples/30_modules_and_resolutions.py:28 · examples/30_modules_and_resolutions.py:29 · examples/33_simplicial_cohomology_operations.py:26 · examples/33_simplicial_cohomology_operations.py:27

commalg.StrongGroebnerBasis.from_json

Deserialize and revalidate a typed strong basis.

(cls, value: str) -> StrongGroebnerBasis

noether::commalg::StrongGroebnerBasis::from_json · Direct Rust declaration

pub fn from_json(value: &str) -> Result<Self, NoetherError>
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel
GIL attached / bounded
Semantic ID noether/commalg/StrongGroebnerBasis@1

Executable usage: validation/unit/category/test_category.py:14 · validation/unit/combin/test_acceptance_workload.py:65 · validation/unit/combin/test_acceptance_workload.py:86 · validation/unit/combin/test_graph_facade.py:106 · validation/unit/combin/test_graph_facade.py:25 · validation/unit/combinatorics/test_kashiwara_crystal.py:32

commalg.StrongGroebnerBasis.normal_form

Euclidean strong normal form.

Detailed contract

Euclidean strong normal form modulo the represented integral ideal.

(self, value: Polynomial[IntegerRing]) -> Polynomial[IntegerRing]

noether::commalg::StrongGroebnerBasis::normal_form · Direct Rust declaration

pub fn normal_form( &self, value: &Polynomial<IntegerRing>, ) -> Result<Polynomial<IntegerRing>, GroebnerError>
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel
GIL attached / bounded
Semantic ID noether/commalg/StrongGroebnerBasis@1

Executable usage: validation/unit/commalg/test_graded_commutative_facade.py:26 · validation/unit/commalg/test_integer_groebner_facade.py:17 · validation/unit/commalg/test_polynomial_ideal_facade.py:194 · validation/unit/commalg/test_polynomial_ideal_facade.py:409 · validation/unit/commalg/test_polynomial_ideal_facade.py:441 · validation/unit/commalg/test_polynomial_ideal_facade.py:52

commalg.StrongGroebnerBasis.ring

Integral polynomial-ring context.

Detailed contract

Polynomial-ring context over the integers.

(self) -> PolynomialRing[IntegerRing]

noether::commalg::StrongGroebnerBasis::ring · Direct Rust declaration

pub fn ring(&self) -> &PolynomialRing<IntegerRing>
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel
GIL attached / bounded
Semantic ID noether/commalg/StrongGroebnerBasis@1

Executable usage: examples/11_qadic_witt_vectors.py:3 · examples/13_chinese_remainder_theorem.py:10 · examples/13_chinese_remainder_theorem.py:12 · examples/13_chinese_remainder_theorem.py:9 · examples/14_weighted_polynomials.py:10 · examples/14_weighted_polynomials.py:11

commalg.StrongGroebnerBasis.to_json

Serialize the context and strong basis as typed JSON.

Detailed contract

Serialize the context and verified strong basis as typed JSON.

(self) -> str

noether::commalg::StrongGroebnerBasis::to_json · Direct Rust declaration

pub fn to_json(&self) -> Result<String, NoetherError>
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel
GIL attached / bounded
Semantic ID noether/commalg/StrongGroebnerBasis@1

Executable usage: validation/unit/category/test_category.py:14 · validation/unit/category/test_category.py:15 · validation/unit/combin/test_acceptance_workload.py:30 · validation/unit/combin/test_acceptance_workload.py:65 · validation/unit/combin/test_acceptance_workload.py:86 · validation/unit/combin/test_graph_facade.py:106

commalg.StrongGroebnerBasis.verify

Recompute and verify the normalized strong basis.

Detailed contract

Recompute the strong basis and check deterministic normalized identity.

(self) -> None

noether::commalg::StrongGroebnerBasis::verify · Direct Rust declaration

pub fn verify(&self) -> Result<(), GroebnerError>
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel
GIL attached / bounded
Semantic ID noether/commalg/StrongGroebnerBasis@1

Executable usage: examples/01_bezout_certificates.py:10 · examples/01_bezout_certificates.py:3 · examples/03_exact_linear_systems.py:13 · examples/03_exact_linear_systems.py:3 · examples/04_smith_normal_form.py:12 · examples/06_shortest_lattice_vectors.py:12