Skip to content

homalg · ModulePowerHomomorphism

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

Worked example

The complete checked program Compute in an exterior algebra and induce a linear map on two-forms uses this API directly.

# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Compute in an exterior algebra and induce a linear map on two-forms."""

from noether import Q
from noether.commalg import PolynomialRing
from noether.homalg import FreeModule, ModuleElement, ModuleHomomorphism
from noether.linalg import Matrix, Vector


def main() -> None:
    ring = PolynomialRing(Q, ["t"])
    module = FreeModule(ring, 3, basis_labels=["e0", "e1", "e2"])
    exterior = module.exterior_algebra()
    e0, e1, e2 = [exterior.generator(position) for position in range(3)]

    volume = e0 * e1 * e2
    assert volume == exterior.alternating_product(
        [
            ModuleElement(module, Vector.from_values(ring, [1, 0, 0])),
            ModuleElement(module, Vector.from_values(ring, [0, 1, 0])),
            ModuleElement(module, Vector.from_values(ring, [0, 0, 1])),
        ]
    )
    assert e1 * e0 == -(e0 * e1)
    assert e0 * e0 == exterior.zero()

    e0_dual = ModuleElement(module.dual(), Vector.from_values(ring, [1, 0, 0]))
    assert volume.contract(e0_dual) == e1 * e2

    linear_map = ModuleHomomorphism(
        module,
        module,
        Matrix.from_rows(ring, [[1, 1, 0], [0, 1, 0], [0, 0, 2]]),
    )
    on_two_forms = linear_map.exterior_power(2)
    on_two_forms.verify()
    assert on_two_forms.apply_exterior(e1 * e2) == 2 * (e0 * e2 + e1 * e2)
    print(
        "Λ² has basis",
        exterior.basis(2),
        "and the induced map sends e1∧e2 to",
        on_two_forms.apply_exterior(e1 * e2).terms,
    )


if __name__ == "__main__":
    main()

Run it with .venv/bin/python examples/40_exterior_algebra.py.

homalg.ModulePowerHomomorphism

A replay-verifiable map induced on a symmetric or exterior power.

class ModulePowerHomomorphism

noether::homalg::ModulePowerHomomorphism · Direct Rust declaration

pub struct ModulePowerHomomorphism<R: CommutativeRing> { /* 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/ModulePowerHomomorphism@1

Executable usage: validation/unit/homalg/test_exterior_algebra.py:24 · validation/unit/homalg/test_exterior_algebra.py:252 · validation/unit/homalg/test_exterior_algebra.py:258 · validation/unit/homalg/test_exterior_algebra.py:385 · validation/unit/homalg/test_exterior_algebra.py:407 · validation/unit/homalg/test_exterior_algebra.py:413

homalg.ModulePowerHomomorphism.apply_exterior

Apply exterior-power evidence to the matching homogeneous component.

Detailed contract

Apply an exterior-power map directly to a homogeneous exterior element. The zero element is admitted in every degree. Nonzero elements must be homogeneous of the map’s exact degree and belong to the source algebra.

(self, element: ExteriorElement[_BasicModuleRing]) -> ExteriorElement[_BasicModuleRing]

noether::homalg::ModulePowerHomomorphism::apply_exterior · Direct Rust declaration

pub fn apply_exterior( &self, element: &ExteriorElement<R>, ) -> Result<ExteriorElement<R>, 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/ModulePowerHomomorphism@1

Executable usage: examples/40_exterior_algebra.py:38 · examples/40_exterior_algebra.py:43 · validation/unit/homalg/test_exterior_algebra.py:174 · validation/unit/homalg/test_exterior_algebra.py:250 · validation/parity/homalg/test_exterior_algebra_sage_parity.py:103

homalg.ModulePowerHomomorphism.compose

Compose compatible induced maps and replay functoriality evidence.

Detailed contract

Compose two induced maps of the same construction and degree. The original free-module maps are composed and the power map is reconstructed. The result is checked against composition of the two retained induced maps, making functoriality an executable invariant.

(self, inner: ModulePowerHomomorphism[_BasicModuleRing]) -> ModulePowerHomomorphism[_BasicModuleRing]

noether::homalg::ModulePowerHomomorphism::compose · Direct Rust declaration

pub fn compose(&self, inner: &Self) -> Result<Self, 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/ModulePowerHomomorphism@1

Executable usage: validation/unit/commalg/test_context_tower_workload.py:3 · validation/unit/commalg/test_polynomial_facade.py:200 · validation/unit/commalg/test_power_series_facade.py:151 · validation/unit/commalg/test_power_series_facade.py:245 · validation/unit/commalg/test_power_series_facade.py:248 · validation/unit/groups/test_permutation_group_facade.py:41

homalg.ModulePowerHomomorphism.degree

Homogeneous power degree.

Detailed contract

Nonnegative power degree.

(self) -> int

noether::homalg::ModulePowerHomomorphism::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/ModulePowerHomomorphism@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.ModulePowerHomomorphism.from_json

Restore and replay-verify induced-map evidence from faithful typed JSON.

Detailed contract

Deserialize and replay the complete induced-map evidence.

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

noether::homalg::ModulePowerHomomorphism::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/ModulePowerHomomorphism@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.ModulePowerHomomorphism.induced

Fully materialized induced coordinate map.

Detailed contract

Exact induced homomorphism between the two power modules.

(self) -> ModuleHomomorphism[_BasicModuleRing]

noether::homalg::ModulePowerHomomorphism::induced · Direct Rust declaration

pub fn induced(&self) -> &ModuleHomomorphism<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 attached / bounded
Semantic ID noether/homalg/ModulePowerHomomorphism@1

Executable usage: examples/40_exterior_algebra.py:42 · validation/unit/commalg/test_rational_function_facade.py:123 · validation/unit/commalg/test_rational_function_facade.py:127 · validation/unit/commalg/test_rational_function_facade.py:128 · validation/unit/commalg/test_rational_function_facade.py:129 · validation/unit/commalg/test_rational_function_facade.py:130

homalg.ModulePowerHomomorphism.kind

Whether this is symmetric- or exterior-power evidence.

Detailed contract

Symmetric or exterior construction.

(self) -> ModulePowerKind

noether::homalg::ModulePowerHomomorphism::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/ModulePowerHomomorphism@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.ModulePowerHomomorphism.source_map

Degree-one linear map from which this evidence was computed.

Detailed contract

Original based free-module homomorphism.

(self) -> ModuleHomomorphism[_BasicModuleRing]

noether::homalg::ModulePowerHomomorphism::source_map · Direct Rust declaration

pub fn source_map(&self) -> &ModuleHomomorphism<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 attached / bounded
Semantic ID noether/homalg/ModulePowerHomomorphism@1

homalg.ModulePowerHomomorphism.source_power

Canonical source power and its ordered coordinate basis.

Detailed contract

Canonical power of the source based module.

(self) -> FreeModulePower[_BasicModuleRing]

noether::homalg::ModulePowerHomomorphism::source_power · Direct Rust declaration

pub fn source_power(&self) -> &FreeModulePower<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/ModulePowerHomomorphism@1

Executable usage: validation/unit/homalg/test_exterior_algebra.py:167 · validation/unit/homalg/test_exterior_algebra.py:248 · validation/unit/homalg/test_exterior_algebra.py:291 · validation/unit/homalg/test_exterior_algebra.py:329 · validation/unit/homalg/test_exterior_algebra.py:414

homalg.ModulePowerHomomorphism.target_power

Canonical target power and its ordered coordinate basis.

Detailed contract

Canonical power of the target based module.

(self) -> FreeModulePower[_BasicModuleRing]

noether::homalg::ModulePowerHomomorphism::target_power · Direct Rust declaration

pub fn target_power(&self) -> &FreeModulePower<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/ModulePowerHomomorphism@1

Executable usage: validation/unit/homalg/test_exterior_algebra.py:168 · validation/unit/homalg/test_exterior_algebra.py:330

homalg.ModulePowerHomomorphism.to_json

Serialize replay-verifiable evidence as faithful typed JSON.

Detailed contract

Serialize the source map, power contexts, and exact induced map.

(self) -> str

noether::homalg::ModulePowerHomomorphism::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/ModulePowerHomomorphism@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.ModulePowerHomomorphism.verify

Recompute the induced matrix and reject stale or tampered evidence.

Detailed contract

Reconstruct the complete result and independently check exterior minors.

(self) -> None

noether::homalg::ModulePowerHomomorphism::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/ModulePowerHomomorphism@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