Skip to content

homalg · PadicModuleInvariants

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

Worked example

The complete checked program Compose cells, compute polygraphic homology, and inspect the Street model uses this API directly.

# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Compose cells, compute polygraphic homology, and inspect the Street model."""

from noether.category import AtomId, SteinerCategory


def main() -> None:
    triangle = SteinerCategory.oriental(2)
    first = triangle.atom(AtomId(1, 0))
    second = triangle.atom(AtomId(1, 2))
    long_path = first.compose_at(second, 0)

    assert long_path.top_atoms == [0, 2]
    assert triangle.exact_cell_counts() == [3, 4, 1]
    assert triangle.polygraphic_homology_invariants()[0].free_rank == 1

    categorical = triangle.categorical_homology()
    nerve = categorical.skeleton(2)
    assert nerve.verify()
    assert categorical.component_poset_slice(2).poset.order == 6
    print(
        "2-oriental:",
        f"cells={triangle.exact_cell_counts()}",
        f"Street simplices={nerve.simplex_counts}",
        "stable hPos_0 weight 2 has 6 elements",
    )


if __name__ == "__main__":
    main()

Run it with .venv/bin/python examples/28_steiner_categories.py.

homalg.PadicModuleInvariants

P-primary invariants shared by every compatible finite free Z_p lift.

class PadicModuleInvariants

noether::homalg::PadicModuleInvariants · Direct Rust declaration

pub struct PadicModuleInvariants { /* 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/PadicModuleInvariants@1

Executable usage: validation/unit/homalg/test_padic_homology_facade.py:158 · validation/unit/homalg/test_padic_homology_facade.py:16 · validation/unit/homalg/test_padic_homology_facade.py:163 · validation/unit/homalg/test_padic_homology_facade.py:29 · validation/unit/homalg/test_padic_homology_facade.py:30 · validation/unit/homalg/test_padic_homology_facade.py:42

homalg.PadicModuleInvariants.cyclic_summands

Return the cyclic summands recorded by this PadicModuleInvariants.

Detailed contract

Exact and unresolved p-primary cyclic relations.

(self) -> list[PadicCyclicSummand]

noether::homalg::PadicModuleInvariants::cyclic_summands · Direct Rust declaration

pub fn cyclic_summands(&self) -> &[PadicCyclicSummand]
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/PadicModuleInvariants@1

Executable usage: validation/unit/homalg/test_padic_homology_facade.py:109 · validation/unit/homalg/test_padic_homology_facade.py:131 · validation/unit/homalg/test_padic_homology_facade.py:156 · validation/unit/homalg/test_padic_homology_facade.py:167 · validation/unit/homalg/test_padic_homology_facade.py:222 · validation/unit/homalg/test_padic_homology_facade.py:38

homalg.PadicModuleInvariants.free_rank

Return the free rank recorded by this PadicModuleInvariants.

Detailed contract

Inclusive bounds for the free Z_p rank.

(self) -> RankBounds

noether::homalg::PadicModuleInvariants::free_rank · Direct Rust declaration

pub fn free_rank(&self) -> &RankBounds
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/PadicModuleInvariants@1

Executable usage: examples/28_steiner_categories.py:16 · examples/32_poset_core_and_morse.py:19 · examples/35_eilenberg_maclane_spaces.py:14 · examples/35_eilenberg_maclane_spaces.py:21 · validation/unit/category/test_acceptance_workload.py:15 · validation/unit/combinatorics/test_poset.py:107

homalg.PadicModuleInvariants.from_json

Deserialize and revalidate a PadicModuleInvariants from typed JSON.

Detailed contract

Deserialize and revalidate canonical typed JSON.

(cls, value: str) -> PadicModuleInvariants

noether::homalg::PadicModuleInvariants::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, m4rst, m4rste, module-core, resolution-kernel, sparla
GIL released
Semantic ID noether/homalg/PadicModuleInvariants@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.PadicModuleInvariants.precision

Return the precision recorded by this PadicModuleInvariants.

Detailed contract

Absolute p-adic precision cap.

(self) -> int

noether::homalg::PadicModuleInvariants::precision · Direct Rust declaration

pub fn precision(&self) -> u64
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/PadicModuleInvariants@1

Executable usage: examples/10_padic_hensel_lifting.py:3 · examples/11_qadic_witt_vectors.py:3 · examples/31_local_fields_and_precision.py:3 · examples/31_local_fields_and_precision.py:34 · examples/31_local_fields_and_precision.py:38 · validation/unit/commalg/test_polynomial_facade.py:102

homalg.PadicModuleInvariants.prime

Return the prime recorded by this PadicModuleInvariants.

Detailed contract

Residue characteristic.

(self) -> int

noether::homalg::PadicModuleInvariants::prime · Direct Rust declaration

pub fn prime(&self) -> &Integer
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/PadicModuleInvariants@1

Executable usage: examples/07_integer_factorization.py:12 · examples/12_number_field_ideals.py:16 · examples/12_number_field_ideals.py:19 · examples/18_finite_field_schemes.py:10 · examples/24_homology_and_persistence.py:22 · examples/33_simplicial_cohomology_operations.py:24

homalg.PadicModuleInvariants.to_json

Serialize this PadicModuleInvariants to its canonical typed JSON representation.

Detailed contract

Canonical typed JSON.

(self) -> str

noether::homalg::PadicModuleInvariants::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, m4rst, m4rste, module-core, resolution-kernel, sparla
GIL released
Semantic ID noether/homalg/PadicModuleInvariants@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.PadicModuleInvariants.validity

Return the validity recorded by this PadicModuleInvariants.

Detailed contract

Logical hypothesis under which the capped matrices describe a Z_p complex.

(self) -> MathematicalValidity

noether::homalg::PadicModuleInvariants::validity · Direct Rust declaration

pub fn validity(&self) -> &MathematicalValidity
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/PadicModuleInvariants@1

Executable usage: validation/unit/commalg/test_intersection_theory.py:48 · validation/unit/commalg/test_intersection_theory.py:83 · validation/unit/homalg/test_chain_complex.py:42 · validation/unit/homalg/test_padic_homology_facade.py:157 · validation/unit/homalg/test_padic_homology_facade.py:168 · validation/unit/homalg/test_padic_homology_facade.py:172

homalg.PadicModuleInvariants.verify

Replay and verify the mathematical evidence carried by this PadicModuleInvariants.

Detailed contract

Recompute the capped Smith data and replay retained rank evidence.

(self) -> None

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

pub fn verify(&self) -> Result<(), VerificationError>
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/PadicModuleInvariants@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