Skip to content

homalg · PresentedModulePower

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

Worked example

The complete checked program Decompose a polynomial by a nonstandard positive grading uses this API directly.

# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Decompose a polynomial by a nonstandard positive grading."""

from noether import Z
from noether.commalg import PolynomialRing, WeightedGrading


def main() -> None:
    ring = PolynomialRing(Z, ["x", "y", "z"], grading=WeightedGrading([1, 2, 3]))
    x, y, z = ring.generators()
    sparse = ring.from_terms([([0, 0, 0], 1), ([2, 0, 0], 1), ([0, 1, 0], 1)])
    polynomial = sparse + z
    assert sparse * (x + y) == (1 + x**2 + y) * (x + y)
    components = polynomial.homogeneous_components()
    assert [degree for degree, _ in components] == [0, 2, 3]
    assert x**2 + y == components[1][1]
    print(f"weighted homogeneous degrees: {[degree for degree, _ in components]}")


if __name__ == "__main__":
    main()

Run it with .venv/bin/python examples/14_weighted_polynomials.py.

homalg.PresentedModulePower

A canonical symmetric or exterior power presentation.

class PresentedModulePower

noether::homalg::PresentedModulePower · Direct Rust declaration

pub struct PresentedModulePower<R: Ring> { /* private fields */ }
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, m4rst, m4rste, module-core, resolution-kernel, sparla
GIL attached / bounded
Semantic ID noether/homalg/PresentedModulePower@1

Executable usage: validation/unit/homalg/test_exterior_algebra.py:27 · validation/unit/homalg/test_exterior_algebra.py:288 · validation/unit/homalg/test_module_powers.py:14 · validation/unit/homalg/test_module_powers.py:160 · validation/unit/homalg/test_module_powers.py:83

homalg.PresentedModulePower.degree

Return the degree recorded by this PresentedModulePower.

Detailed contract

Nonnegative power degree.

(self) -> int

noether::homalg::PresentedModulePower::degree · Direct Rust declaration

pub const fn degree(&self) -> usize
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, m4rst, m4rste, module-core, resolution-kernel, sparla
GIL attached / bounded
Semantic ID noether/homalg/PresentedModulePower@1

Executable usage: examples/14_weighted_polynomials.py:16 · examples/14_weighted_polynomials.py:18 · examples/15_groebner_twisted_cubic.py:15 · examples/15_groebner_twisted_cubic.py:28 · examples/31_local_fields_and_precision.py:37 · examples/33_simplicial_cohomology_operations.py:26

homalg.PresentedModulePower.from_json

Deserialize and revalidate a PresentedModulePower from typed JSON.

Detailed contract

Deserialize and independently revalidate the induced presentation.

(cls, value: str) -> PresentedModulePower[_BasicModuleRing]

noether::homalg::PresentedModulePower::from_json · Direct Rust declaration

pub fn from_json(value: &str) -> Result<Self, NoetherError>where R: for<'de> Deserialize<'de>, R::Element: for<'de> Deserialize<'de>,
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, m4rst, m4rste, module-core, resolution-kernel, sparla
GIL released
Semantic ID noether/homalg/PresentedModulePower@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

homalg.PresentedModulePower.kind

Return the kind recorded by this PresentedModulePower.

Detailed contract

Symmetric or exterior construction.

(self) -> ModulePowerKind

noether::homalg::PresentedModulePower::kind · Direct Rust declaration

pub const fn kind(&self) -> ModulePowerKind
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, m4rst, m4rste, module-core, resolution-kernel, sparla
GIL attached / bounded
Semantic ID noether/homalg/PresentedModulePower@1

Executable usage: validation/unit/combinatorics/test_poset.py:95 · validation/unit/commalg/test_curve_facade.py:137 · validation/unit/commalg/test_curve_facade.py:43 · validation/unit/commalg/test_curve_facade.py:44 · validation/unit/commalg/test_curve_facade.py:45 · validation/unit/commalg/test_curve_facade.py:80

homalg.PresentedModulePower.module

Return the module recorded by this PresentedModulePower.

Detailed contract

Resulting finitely presented module.

(self) -> PresentedModule[_BasicModuleRing]

noether::homalg::PresentedModulePower::module · Direct Rust declaration

pub fn module(&self) -> &PresentedModule<R>
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, m4rst, m4rste, module-core, resolution-kernel, sparla
GIL released
Semantic ID noether/homalg/PresentedModulePower@1

Executable usage: examples/30_modules_and_resolutions.py:3 · examples/30_modules_and_resolutions.py:51 · examples/40_exterior_algebra.py:13 · examples/40_exterior_algebra.py:14 · examples/40_exterior_algebra.py:20 · examples/40_exterior_algebra.py:21

homalg.PresentedModulePower.source

Return the source recorded by this PresentedModulePower.

Detailed contract

Source presented module.

(self) -> PresentedModule[_BasicModuleRing]

noether::homalg::PresentedModulePower::source · Direct Rust declaration

pub fn source(&self) -> &PresentedModule<R>
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, m4rst, m4rste, module-core, resolution-kernel, sparla
GIL released
Semantic ID noether/homalg/PresentedModulePower@1

Executable usage: examples/09_finite_field_isomorphisms.py:11 · examples/09_finite_field_isomorphisms.py:13 · examples/09_finite_field_isomorphisms.py:9 · examples/30_modules_and_resolutions.py:34 · examples/30_modules_and_resolutions.py:37 · validation/unit/category/test_acceptance_workload.py:25

homalg.PresentedModulePower.to_json

Serialize this PresentedModulePower to its canonical typed JSON representation.

Detailed contract

Serialize the complete induced presentation.

(self) -> str

noether::homalg::PresentedModulePower::to_json · Direct Rust declaration

pub fn to_json(&self) -> Result<String, NoetherError>where R: Serialize, R::Element: Serialize,
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, m4rst, m4rste, module-core, resolution-kernel, sparla
GIL released
Semantic ID noether/homalg/PresentedModulePower@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

homalg.PresentedModulePower.verify

Replay and verify the mathematical evidence carried by this PresentedModulePower.

Detailed contract

Recompute the complete induced presentation.

(self) -> None

noether::homalg::PresentedModulePower::verify · Direct Rust declaration

pub fn verify(&self) -> Result<(), ModulePowerError>
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, m4rst, m4rste, module-core, resolution-kernel, sparla
GIL released
Semantic ID noether/homalg/PresentedModulePower@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