Skip to content

homalg · ExteriorAlgebra

15 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.ExteriorAlgebra

The exact exterior-algebra parent of a finite based free module.

ExteriorAlgebra(source: FreeModule[_BasicModuleRing])

noether::homalg::ExteriorAlgebra · Direct Rust declaration

pub struct ExteriorAlgebra<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/ExteriorAlgebra@1

Executable usage: validation/unit/homalg/test_exterior_algebra.py:18 · validation/unit/homalg/test_exterior_algebra.py:201 · validation/unit/homalg/test_exterior_algebra.py:221 · validation/unit/homalg/test_exterior_algebra.py:392 · validation/unit/homalg/test_exterior_algebra.py:405 · validation/unit/homalg/test_exterior_algebra.py:411

homalg.ExteriorAlgebra.alternating_product

Universal alternating product of degree-one module vectors.

Detailed contract

Universal alternating product of vectors in the exact source module. The empty product is one and a repeated input vector maps to zero, including in characteristic two. Over a field, every linearly dependent list also maps to zero. That stronger statement is not made over an arbitrary commutative ring with zero divisors.

(self, vectors: Sequence[ModuleElement[_BasicModuleRing]]) -> ExteriorElement[_BasicModuleRing]

noether::homalg::ExteriorAlgebra::alternating_product · Direct Rust declaration

pub fn alternating_product<'a, I>( &self, vectors: I, ) -> Result<ExteriorElement<R>, ExteriorAlgebraError>where I: IntoIterator<Item = &'a ModuleElement<R>>, R: 'a,
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/ExteriorAlgebra@1

Executable usage: examples/40_exterior_algebra.py:18 · validation/unit/homalg/test_exterior_algebra.py:105 · validation/unit/homalg/test_exterior_algebra.py:107

homalg.ExteriorAlgebra.basis

Increasing basis-position sequences in canonical coordinate order.

(self, degree: int) -> list[list[int]]

noether::homalg::ExteriorAlgebra::basis · Direct Rust declaration

pub fn basis( &self, degree: usize, ) -> Result<Vec<Vec<usize>>, ExteriorAlgebraError>
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/ExteriorAlgebra@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

homalg.ExteriorAlgebra.basis_element

Exterior basis element for a strictly increasing position sequence.

Detailed contract

Unit-coefficient monomial in a strictly increasing sequence of basis positions.

(self, basis: Sequence[int]) -> ExteriorElement[_BasicModuleRing]

noether::homalg::ExteriorAlgebra::basis_element · Direct Rust declaration

pub fn basis_element<I>( &self, basis: I, ) -> Result<ExteriorElement<R>, ExteriorAlgebraError>where I: IntoIterator<Item = 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/ExteriorAlgebra@1

Executable usage: validation/unit/homalg/test_exact_submodules.py:98 · validation/unit/homalg/test_exterior_algebra.py:355 · validation/unit/homalg/test_exterior_algebra.py:357 · validation/unit/homalg/test_module_facade.py:133 · validation/unit/homalg/test_module_facade.py:251 · validation/unit/homalg/test_module_facade.py:253

homalg.ExteriorAlgebra.from_json

Restore and validate an exterior-algebra parent from faithful typed JSON.

Detailed contract

Deserialize and validate an exterior-algebra parent.

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

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

pub fn from_json(value: &str) -> Result<Self, NoetherError>where R: 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/ExteriorAlgebra@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.ExteriorAlgebra.from_power_element

Embed a coordinate vector from one canonical homogeneous exterior power.

Detailed contract

Restore an exterior element from one exact exterior-power coordinate module.

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

noether::homalg::ExteriorAlgebra::from_power_element · Direct Rust declaration

pub fn from_power_element( &self, degree: usize, element: &ModuleElement<R>, ) -> Result<ExteriorElement<R>, ExteriorAlgebraError>
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/ExteriorAlgebra@1

Executable usage: validation/unit/homalg/test_exterior_algebra.py:220 · validation/unit/homalg/test_exterior_algebra.py:361

homalg.ExteriorAlgebra.from_terms

Construct and canonicalize sparse (basis, coefficient) terms.

Detailed contract

Construct an element and canonicalize duplicate and zero terms. Every basis sequence must be strictly increasing. Repeated generators therefore fail closed instead of being silently assigned a sign; use ExteriorElement::wedge to multiply arbitrary exterior elements.

(self, terms: Sequence[tuple[Sequence[int], ModuleScalar]]) -> ExteriorElement[_BasicModuleRing]

noether::homalg::ExteriorAlgebra::from_terms · Direct Rust declaration

pub fn from_terms<I, B>( &self, terms: I, ) -> Result<ExteriorElement<R>, ExteriorAlgebraError>where I: IntoIterator<Item = (B, R::Element)>, B: IntoIterator<Item = 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 released
Semantic ID noether/homalg/ExteriorAlgebra@1

Executable usage: examples/14_weighted_polynomials.py:12 · validation/unit/commalg/test_groebner_verification_budget.py:48 · validation/unit/commalg/test_intersection_theory.py:34 · validation/unit/commalg/test_kahler_differentials.py:172 · validation/unit/commalg/test_polynomial_facade.py:226 · validation/unit/commalg/test_polynomial_facade.py:233

homalg.ExteriorAlgebra.generator

Degree-one element at a zero-based source-basis position.

Detailed contract

Degree-one generator at position in the ordered source basis.

(self, position: int) -> ExteriorElement[_BasicModuleRing]

noether::homalg::ExteriorAlgebra::generator · Direct Rust declaration

pub fn generator( &self, position: usize, ) -> Result<ExteriorElement<R>, ExteriorAlgebraError>
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/ExteriorAlgebra@1

Executable usage: examples/08_finite_field_extensions.py:10 · examples/08_finite_field_extensions.py:11 · examples/08_finite_field_extensions.py:12 · examples/08_finite_field_extensions.py:13 · examples/08_finite_field_extensions.py:14 · examples/10_padic_hensel_lifting.py:12

homalg.ExteriorAlgebra.one

Multiplicative identity in exterior degree zero.

(self) -> ExteriorElement[_BasicModuleRing]

noether::homalg::ExteriorAlgebra::one · Direct Rust declaration

pub fn one(&self) -> ExteriorElement<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/ExteriorAlgebra@1

Executable usage: examples/02_ball_arithmetic.py:13 · examples/11_qadic_witt_vectors.py:11 · examples/24_homology_and_persistence.py:3 · examples/31_local_fields_and_precision.py:27 · validation/unit/combinatorics/test_poset.py:3 · validation/unit/commalg/test_acceptance_workload.py:37

homalg.ExteriorAlgebra.power

Canonical coordinate module for one homogeneous exterior degree.

Detailed contract

Canonical coordinate module for exterior degree degree.

(self, degree: int) -> FreeModulePower[_BasicModuleRing]

noether::homalg::ExteriorAlgebra::power · Direct Rust declaration

pub fn power( &self, degree: usize, ) -> Result<FreeModulePower<R>, ExteriorAlgebraError>
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/ExteriorAlgebra@1

Executable usage: examples/17_weighted_power_series.py:3 · validation/unit/combinatorics/test_partition_types.py:35 · validation/unit/combinatorics/test_partition_types.py:36 · validation/unit/combinatorics/test_partition_types.py:40 · validation/unit/combinatorics/test_partition_types.py:56 · validation/unit/commalg/test_polynomial_facade.py:278

homalg.ExteriorAlgebra.rank

Rank of the degree-one source module.

Detailed contract

Rank of the degree-one generating module.

(self) -> int

noether::homalg::ExteriorAlgebra::rank · Direct Rust declaration

pub fn rank(&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/ExteriorAlgebra@1

Executable usage: examples/38_exact_linear_systems.py:78 · examples/distributed/f2_linear_algebra.py:34 · examples/distributed/f2_linear_algebra.py:54 · examples/distributed/f2_linear_algebra.py:55 · examples/distributed/f2_linear_algebra.py:60 · validation/unit/combin/test_acceptance_workload.py:74

homalg.ExteriorAlgebra.ring

The exact coefficient context.

Detailed contract

Exact coefficient context.

(self) -> _BasicModuleRing

noether::homalg::ExteriorAlgebra::ring · Direct Rust declaration

pub fn ring(&self) -> &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/ExteriorAlgebra@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

homalg.ExteriorAlgebra.source

The ordered degree-one source module.

Detailed contract

Source based free module whose vectors generate the algebra.

(self) -> FreeModule[_BasicModuleRing]

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

pub fn source(&self) -> &FreeModule<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/ExteriorAlgebra@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.ExteriorAlgebra.to_json

Serialize the parent context as faithful typed JSON.

Detailed contract

Serialize this complete exterior-algebra parent.

(self) -> str

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

pub fn to_json(&self) -> Result<String, NoetherError>where R: 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/ExteriorAlgebra@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.ExteriorAlgebra.zero

Additive identity, represented by an empty canonical sparse table.

Detailed contract

Additive identity, shared by every homogeneous degree.

(self) -> ExteriorElement[_BasicModuleRing]

noether::homalg::ExteriorAlgebra::zero · Direct Rust declaration

pub fn zero(&self) -> ExteriorElement<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/ExteriorAlgebra@1

Executable usage: examples/08_finite_field_extensions.py:11 · examples/10_padic_hensel_lifting.py:15 · examples/40_exterior_algebra.py:26 · examples/distributed/f2_linear_algebra.py:28 · examples/distributed/f2_linear_algebra.py:29 · examples/distributed/f2_linear_algebra.py:30