Skip to content

commalg · FrobeniusPolynomial

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

Worked example

The complete checked program Compute the mod-two cohomology ring of RP2 and its Steenrod square uses this API directly.

# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Compute the mod-two cohomology ring of RP2 and its Steenrod square."""

from noether.numthy import FiniteField
from noether.topology import AdmissibleCohomologyOperation, SimplicialComplex


def main() -> None:
    projective_plane = SimplicialComplex(
        [
            [0, 1, 2],
            [0, 1, 4],
            [0, 2, 3],
            [0, 3, 5],
            [0, 4, 5],
            [1, 2, 5],
            [1, 3, 4],
            [1, 3, 5],
            [2, 3, 4],
            [2, 4, 5],
        ]
    )
    cohomology = projective_plane.cohomology_ring(FiniteField.prime(2))
    cohomology.verify()
    assert [basis.degree for basis in cohomology.basis] == [0, 1, 2]
    assert cohomology.product(1, 1)[0].basis == 2

    square = AdmissibleCohomologyOperation.steenrod_square(1)
    image = cohomology.apply_operation(square, 1)
    assert image[0].basis == 2 and int(image[0].coefficient) == 1
    print(f"H*(RP2; F2) degrees={[basis.degree for basis in cohomology.basis]}; Sq^1(h)=h^2")


if __name__ == "__main__":
    main()

Run it with .venv/bin/python examples/33_simplicial_cohomology_operations.py.

commalg.FrobeniusPolynomial

Exact characteristic polynomial of Frobenius on surface H^2.

class FrobeniusPolynomial

noether::commalg::FrobeniusPolynomial · Direct Rust declaration

pub struct FrobeniusPolynomial { /* private fields */ }
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel
GIL attached / bounded
Semantic ID noether/commalg/FrobeniusPolynomial@1

Executable usage: validation/unit/commalg/test_surface_facade.py:10 · validation/unit/commalg/test_surface_facade.py:65

commalg.FrobeniusPolynomial.cohomological_degree

Return the cohomological degree recorded by this FrobeniusPolynomial.

Detailed contract

Cohomological degree on which Frobenius acts.

(self) -> int

noether::commalg::FrobeniusPolynomial::cohomological_degree · Direct Rust declaration

pub fn cohomological_degree(&self) -> u32
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel
GIL attached / bounded
Semantic ID noether/commalg/FrobeniusPolynomial@1

commalg.FrobeniusPolynomial.cohomological_weight

Return the cohomological weight recorded by this FrobeniusPolynomial.

Detailed contract

Weil weight certified for the eigenvalues.

(self) -> int

noether::commalg::FrobeniusPolynomial::cohomological_weight · Direct Rust declaration

pub fn cohomological_weight(&self) -> u32
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel
GIL attached / bounded
Semantic ID noether/commalg/FrobeniusPolynomial@1

commalg.FrobeniusPolynomial.cohomology

Return the cohomology recorded by this FrobeniusPolynomial.

Detailed contract

Geometric evidence fixing the required polynomial degree.

(self) -> SmoothProjectiveSurfaceCohomology

noether::commalg::FrobeniusPolynomial::cohomology · Direct Rust declaration

pub fn cohomology(&self) -> &SmoothProjectiveSurfaceCohomology
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel
GIL attached / bounded
Semantic ID noether/commalg/FrobeniusPolynomial@1

Executable usage: examples/33_simplicial_cohomology_operations.py:24 · examples/33_simplicial_cohomology_operations.py:25 · examples/33_simplicial_cohomology_operations.py:26 · examples/33_simplicial_cohomology_operations.py:27 · examples/33_simplicial_cohomology_operations.py:3 · examples/33_simplicial_cohomology_operations.py:30

commalg.FrobeniusPolynomial.degree

Return the degree recorded by this FrobeniusPolynomial.

Detailed contract

Degree of the characteristic polynomial.

(self) -> int

noether::commalg::FrobeniusPolynomial::degree · Direct Rust declaration

pub fn degree(&self) -> usize
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel
GIL attached / bounded
Semantic ID noether/commalg/FrobeniusPolynomial@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

commalg.FrobeniusPolynomial.field_order

Return the field order recorded by this FrobeniusPolynomial.

Detailed contract

Order of the explicit finite base field.

(self) -> int

noether::commalg::FrobeniusPolynomial::field_order · Direct Rust declaration

pub fn field_order(&self) -> &Integer
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel
GIL attached / bounded
Semantic ID noether/commalg/FrobeniusPolynomial@1

Executable usage: validation/bench/magma_release.py:1018 · validation/bench/magma_release.py:1022 · validation/bench/magma_release.py:2456 · validation/bench/magma_release.py:2463

commalg.FrobeniusPolynomial.from_json

Deserialize and revalidate a FrobeniusPolynomial from typed JSON.

Detailed contract

Restore and fully reverify a Frobenius polynomial.

(cls, value: str) -> FrobeniusPolynomial

noether::commalg::FrobeniusPolynomial::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, module-core, poly-core, resolution-kernel
GIL attached / bounded
Semantic ID noether/commalg/FrobeniusPolynomial@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

commalg.FrobeniusPolynomial.geometric_divisor_rank_upper_bound

Compute geometric divisor rank upper bound for this FrobeniusPolynomial.

Detailed contract

Compute the Tate-style geometric divisor-rank upper bound.

(self) -> GeometricDivisorRankUpperBound

noether::commalg::FrobeniusPolynomial::geometric_divisor_rank_upper_bound · Direct Rust declaration

pub fn geometric_divisor_rank_upper_bound( &self, ) -> Result<GeometricDivisorRankUpperBound, FrobeniusError>
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel
GIL attached / bounded
Semantic ID noether/commalg/FrobeniusPolynomial@1

Executable usage: validation/unit/commalg/test_surface_facade.py:73 · validation/bench/surface_frobenius.py:92

commalg.FrobeniusPolynomial.point_counts

Return the point counts recorded by this FrobeniusPolynomial.

Detailed contract

Exact point counts used by Newton reconstruction.

(self) -> PointCountSequence

noether::commalg::FrobeniusPolynomial::point_counts · Direct Rust declaration

pub fn point_counts(&self) -> &PointCountSequence
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel
GIL attached / bounded
Semantic ID noether/commalg/FrobeniusPolynomial@1

Executable usage: validation/unit/commalg/test_surface_facade.py:45 · validation/unit/commalg/test_surface_facade.py:87 · validation/parity/commalg/test_surface_magma_parity.py:65 · validation/bench/surface_frobenius.py:87

commalg.FrobeniusPolynomial.polynomial

Return the polynomial recorded by this FrobeniusPolynomial.

Detailed contract

Monic polynomial det(T-F | H^i) over the integers.

(self) -> Polynomial[IntegerRing]

noether::commalg::FrobeniusPolynomial::polynomial · Direct Rust declaration

pub fn polynomial(&self) -> &Polynomial<IntegerRing>
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel
GIL attached / bounded
Semantic ID noether/commalg/FrobeniusPolynomial@1

Executable usage: examples/07_integer_factorization.py:3 · examples/14_weighted_polynomials.py:13 · examples/14_weighted_polynomials.py:15 · examples/14_weighted_polynomials.py:3 · examples/22_matroids_and_tutte.py:3 · examples/27_weight_characters.py:3

commalg.FrobeniusPolynomial.to_json

Serialize this FrobeniusPolynomial to its canonical typed JSON representation.

Detailed contract

Serialize polynomial, geometry, and reconstruction transcript.

(self) -> str

noether::commalg::FrobeniusPolynomial::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, module-core, poly-core, resolution-kernel
GIL attached / bounded
Semantic ID noether/commalg/FrobeniusPolynomial@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

commalg.FrobeniusPolynomial.trace

Compute trace for this FrobeniusPolynomial.

Detailed contract

Exact trace of the requested positive Frobenius power.

(self, power: int) -> int

noether::commalg::FrobeniusPolynomial::trace · Direct Rust declaration

pub fn trace(&self, power: u64) -> Result<Integer, FrobeniusError>
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel
GIL attached / bounded
Semantic ID noether/commalg/FrobeniusPolynomial@1

Executable usage: examples/08_finite_field_extensions.py:12 · examples/08_finite_field_extensions.py:14 · examples/08_finite_field_extensions.py:3 · validation/unit/commalg/test_acceptance_workload.py:41 · validation/unit/commalg/test_context_tower_workload.py:116 · validation/unit/commalg/test_context_tower_workload.py:96

commalg.FrobeniusPolynomial.verify

Replay and verify the mathematical evidence carried by this FrobeniusPolynomial.

Detailed contract

Verify geometry, Newton identities, all recorded counts, and duality.

(self) -> None

noether::commalg::FrobeniusPolynomial::verify · Direct Rust declaration

pub fn verify(&self) -> Result<(), FrobeniusError>
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel
GIL attached / bounded
Semantic ID noether/commalg/FrobeniusPolynomial@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

commalg.FrobeniusPolynomial.zeta_function

Compute zeta function for this FrobeniusPolynomial.

Detailed contract

Canonical zeta function of the supported smooth projective surface.

(self) -> ZetaFunction

noether::commalg::FrobeniusPolynomial::zeta_function · Direct Rust declaration

pub fn zeta_function(&self) -> Result<ZetaFunction, FrobeniusError>
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, flint-core, groebner-kernel, module-core, poly-core, resolution-kernel
GIL attached / bounded
Semantic ID noether/commalg/FrobeniusPolynomial@1

Executable usage: validation/unit/commalg/test_surface_facade.py:66