Skip to content

commalg · ExtensionPointCount

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

Worked example

The complete checked program Enumerate and certify rational points on a finite-field hyperbola uses this API directly.

# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Enumerate and certify rational points on a finite-field hyperbola."""

from noether.commalg import AffineSpace
from noether.numthy import FiniteField


def main() -> None:
    field = FiniteField.prime(5)
    plane = AffineSpace(field, 2, names=["x", "y"])
    x, y = plane.coordinate_ring.generators()
    hyperbola = plane.closed_subscheme(plane.coordinate_ring.ideal([x * y - 1]))
    count, certificate = hyperbola.point_count(shards=3)
    certificate.verify(hyperbola)
    assert count == 4
    assert len(list(hyperbola.rational_points())) == count
    print(f"xy=1 over F_5 has {count} rational points")


if __name__ == "__main__":
    main()

Run it with .venv/bin/python examples/18_finite_field_schemes.py.

commalg.ExtensionPointCount

One exact point count over a finite extension.

class ExtensionPointCount

noether::commalg::ExtensionPointCount · Direct Rust declaration

pub struct ExtensionPointCount { /* 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

commalg.ExtensionPointCount.count

Return the count recorded by this ExtensionPointCount.

Detailed contract

Exact number of rational points over that extension.

(self) -> int

noether::commalg::ExtensionPointCount::count · Direct Rust declaration

pub fn count(&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

Executable usage: examples/18_finite_field_schemes.py:14 · examples/18_finite_field_schemes.py:16 · examples/18_finite_field_schemes.py:17 · examples/18_finite_field_schemes.py:18 · validation/unit/combin/test_graph_facade.py:34 · validation/unit/combinatorics/test_poset.py:142

commalg.ExtensionPointCount.degree

Return the degree recorded by this ExtensionPointCount.

Detailed contract

Degree over the declared finite base field.

(self) -> int

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

pub fn degree(&self) -> u64
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

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.ExtensionPointCount.evidence

Return the evidence recorded by this ExtensionPointCount.

Detailed contract

Replayable method-specific evidence.

(self) -> PointCountEvidence

noether::commalg::ExtensionPointCount::evidence · Direct Rust declaration

pub fn evidence(&self) -> &PointCountEvidence
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

Executable usage: examples/32_poset_core_and_morse.py:3 · examples/36_affine_normalization.py:3 · validation/unit/commalg/test_affine_normalization_facade.py:3 · validation/unit/commalg/test_kahler_differentials.py:3 · validation/unit/commalg/test_kahler_differentials.py:62 · validation/unit/commalg/test_kahler_differentials.py:63