Skip to content

linalg · LatticeEnumeration

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

Worked example

The complete checked program Certify a complete presentation of the mod-two cohomology of C2 uses this API directly.

# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Certify a complete presentation of the mod-two cohomology of C2."""

from noether.groups import Permutation, PermutationGroup


def main() -> None:
    transposition = Permutation.from_images([1, 0])
    cyclic_two = PermutationGroup.from_generators(2, [transposition])
    truncation = cyclic_two.modular_cohomology(2, 2)
    truncation.verify()
    assert [truncation.dimension(degree) for degree in range(3)] == [1, 1, 1]

    complete = truncation.algebra_truncation().certify_symonds_universal_bound()
    complete.verify()
    assert complete.completion_strategy == "symonds_universal_bound"
    print(
        f"H^0..2(C2; F2) dimensions="
        f"{[truncation.dimension(degree) for degree in range(3)]}; "
        f"completion={complete.completion_strategy}"
    )


if __name__ == "__main__":
    main()

Run it with .venv/bin/python examples/34_finite_group_cohomology.py.

linalg.LatticeEnumeration

Exact short-vector enumeration with canonical ±-pair representatives.

class LatticeEnumeration

noether::linalg::LatticeEnumeration · Direct Rust declaration

pub struct LatticeEnumeration { /* private fields */ }
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, m4rst, m4rst-distributed, m4rste, mzs, pwvla, spar-core, sparla, sparb, lattice-enum
GIL attached / bounded
Semantic ID noether/linalg/LatticeEnumeration@1

Executable usage: validation/unit/linalg/test_lattice_facade.py:15 · validation/unit/linalg/test_lattice_facade.py:30

linalg.LatticeEnumeration.bound

Return the bound recorded by this LatticeEnumeration.

Detailed contract

Requested norm bound, or None for the minimum shell.

(self) -> int | None

noether::linalg::LatticeEnumeration::bound · Direct Rust declaration

pub fn bound(&self) -> Option<&Integer>
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, m4rst, m4rst-distributed, m4rste, mzs, pwvla, spar-core, sparla, sparb, lattice-enum
GIL attached / bounded
Semantic ID noether/linalg/LatticeEnumeration@1

Executable usage: validation/unit/commalg/test_power_series_facade.py:223 · validation/unit/commalg/test_power_series_facade.py:25 · validation/unit/commalg/test_power_series_facade.py:55 · validation/unit/commalg/test_scheme_facade.py:264 · validation/unit/groups/test_weight_characters.py:65 · validation/unit/infra/test_concurrency.py:83

linalg.LatticeEnumeration.complete

Return the complete recorded by this LatticeEnumeration.

(self) -> bool

noether::linalg::LatticeEnumeration · Python projection

Python projection convenience over this Rust mathematical type
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, m4rst, m4rst-distributed, m4rste, mzs, pwvla, spar-core, sparla, sparb, lattice-enum
GIL attached / bounded
Semantic ID noether/linalg/LatticeEnumeration@1

Executable usage: examples/34_finite_group_cohomology.py:15 · examples/34_finite_group_cohomology.py:16 · examples/34_finite_group_cohomology.py:17 · examples/34_finite_group_cohomology.py:21 · examples/34_finite_group_cohomology.py:3 · examples/37_complete_intersection_theory.py:3

linalg.LatticeEnumeration.max_norm

Return the max norm recorded by this LatticeEnumeration.

Detailed contract

Largest exact norm attained by a retained vector.

(self) -> int

noether::linalg::LatticeEnumeration::max_norm · Direct Rust declaration

pub fn max_norm(&self) -> &Integer
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, m4rst, m4rst-distributed, m4rste, mzs, pwvla, spar-core, sparla, sparb, lattice-enum
GIL attached / bounded
Semantic ID noether/linalg/LatticeEnumeration@1

Executable usage: examples/06_shortest_lattice_vectors.py:14 · examples/06_shortest_lattice_vectors.py:15 · validation/unit/linalg/test_lattice_facade.py:36

linalg.LatticeEnumeration.pair_count

Return the pair count recorded by this LatticeEnumeration.

Detailed contract

Number of canonical ±-pair representatives retained in this result.

(self) -> int

noether::linalg::LatticeEnumeration::pair_count · Direct Rust declaration

pub fn pair_count(&self) -> usize
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, m4rst, m4rst-distributed, m4rste, mzs, pwvla, spar-core, sparla, sparb, lattice-enum
GIL attached / bounded
Semantic ID noether/linalg/LatticeEnumeration@1

Executable usage: validation/unit/infra/test_concurrency.py:84 · validation/unit/linalg/test_lattice_facade.py:35 · validation/parity/linalg/test_lattice_enumeration_parity.py:111

linalg.LatticeEnumeration.signed_count

Return the signed count recorded by this LatticeEnumeration.

Detailed contract

Total number of signed vectors, including both members of every ± pair.

(self) -> int

noether::linalg::LatticeEnumeration::signed_count · Direct Rust declaration

pub fn signed_count(&self) -> &Integer
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, m4rst, m4rst-distributed, m4rste, mzs, pwvla, spar-core, sparla, sparb, lattice-enum
GIL attached / bounded
Semantic ID noether/linalg/LatticeEnumeration@1

Executable usage: examples/06_shortest_lattice_vectors.py:13 · examples/06_shortest_lattice_vectors.py:15 · validation/unit/linalg/test_lattice_facade.py:34 · validation/parity/linalg/test_lattice_enumeration_parity.py:112

linalg.LatticeEnumeration.vectors

Return the vectors recorded by this LatticeEnumeration.

Detailed contract

Canonically signed coordinate vectors in deterministic order.

(self) -> list[list[int]]

noether::linalg::LatticeEnumeration::vectors · Direct Rust declaration

pub fn vectors(&self) -> &[Vec<i64>]
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, m4rst, m4rst-distributed, m4rste, mzs, pwvla, spar-core, sparla, sparb, lattice-enum
GIL attached / bounded
Semantic ID noether/linalg/LatticeEnumeration@1

Executable usage: examples/06_shortest_lattice_vectors.py:15 · examples/06_shortest_lattice_vectors.py:3 · examples/29_integral_line_configurations.py:29 · validation/unit/linalg/test_lattice_facade.py:110 · validation/unit/linalg/test_lattice_facade.py:112 · validation/unit/linalg/test_lattice_facade.py:116

linalg.LatticeEnumeration.verify

Replay and verify the mathematical evidence carried by this LatticeEnumeration.

Detailed contract

Recheck counts, dimensions, signs and exact norms against a lattice.

(self, lattice: Lattice) -> None

noether::linalg::LatticeEnumeration::verify · Direct Rust declaration

pub fn verify(&self, lattice: &Lattice) -> Result<(), LatticeError>
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, m4rst, m4rst-distributed, m4rste, mzs, pwvla, spar-core, sparla, sparb, lattice-enum
GIL released
Semantic ID noether/linalg/LatticeEnumeration@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