Skip to content

commalg · ProjectiveSpace

9 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.ProjectiveSpace

Projective space over Q or a finite field.

ProjectiveSpace(base: C, dimension: int, *, names: Sequence[str] | None=None)

noether::commalg::ProjectiveSpace · Direct Rust declaration

pub struct ProjectiveSpace<R: CommutativeRing> { /* 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/ProjectiveSpace@1

Executable usage: validation/unit/commalg/test_acceptance_workload.py:130 · validation/unit/commalg/test_acceptance_workload.py:16 · validation/unit/commalg/test_acceptance_workload.py:92 · validation/unit/commalg/test_base_change.py:12 · validation/unit/commalg/test_base_change.py:61 · validation/unit/commalg/test_scheme_facade.py:131

commalg.ProjectiveSpace.base

Return the base recorded by this ProjectiveSpace.

Detailed contract

Base coefficient context.

(self) -> C

noether::commalg::ProjectiveSpace::base · Direct Rust declaration

pub fn base(&self) -> &R
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/ProjectiveSpace@1

Executable usage: validation/unit/commalg/test_acceptance_workload.py:59 · validation/unit/commalg/test_acceptance_workload.py:60 · validation/unit/commalg/test_base_change.py:112 · validation/unit/commalg/test_base_change.py:113 · validation/unit/commalg/test_polynomial_ideal_facade.py:398 · validation/unit/commalg/test_polynomial_ideal_facade.py:399

commalg.ProjectiveSpace.base_change

Extend a finite-field projective presentation along a checked embedding.

Detailed contract

Extend the base while preserving the exact homogeneous coordinate-ring presentation.

(self: ProjectiveSpace[FiniteField], map: PrimeSubfieldEmbedding | FiniteFieldEmbedding) -> ProjectiveSpace[FiniteField]

noether::commalg::ProjectiveSpace::base_change · Direct Rust declaration

pub fn base_change<M>( &self, map: &M, ) -> Result<ProjectiveSpace<M::Target>, BaseChangeError>where M: CoefficientMap<Source = R>,
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/ProjectiveSpace@1

Executable usage: validation/unit/commalg/test_base_change.py:108 · validation/unit/commalg/test_base_change.py:110 · validation/unit/commalg/test_base_change.py:111 · validation/unit/commalg/test_base_change.py:112 · validation/unit/commalg/test_base_change.py:113 · validation/unit/commalg/test_base_change.py:114

commalg.ProjectiveSpace.closed_subscheme

Compute closed subscheme for this ProjectiveSpace.

Detailed contract

Construct a homogeneous closed subscheme in this projective space.

(self, ideal: Ideal[PolynomialRing[C]]) -> Scheme[C]

noether::commalg::ProjectiveSpace::closed_subscheme · Direct Rust declaration

pub fn closed_subscheme( &self, ideal: Ideal<PolynomialRing<RationalField>>, ) -> Result<Scheme<RationalField>, SchemeError>
pub fn closed_subscheme( &self, ideal: Ideal<PolynomialRing<FiniteField>>, ) -> Result<Scheme<FiniteField>, SchemeError>
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/ProjectiveSpace@1

Executable usage: examples/18_finite_field_schemes.py:13 · validation/unit/commalg/test_acceptance_workload.py:133 · validation/unit/commalg/test_acceptance_workload.py:148 · validation/unit/commalg/test_acceptance_workload.py:95 · validation/unit/commalg/test_base_change.py:105 · validation/unit/commalg/test_base_change.py:46

commalg.ProjectiveSpace.coordinate_ring

Return the coordinate ring recorded by this ProjectiveSpace.

Detailed contract

Exact homogeneous coordinate ring.

(self) -> PolynomialRing[C]

noether::commalg::ProjectiveSpace::coordinate_ring · Direct Rust declaration

pub fn coordinate_ring(&self) -> &PolynomialRing<R>
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/ProjectiveSpace@1

Executable usage: examples/18_finite_field_schemes.py:12 · examples/18_finite_field_schemes.py:13 · validation/unit/commalg/test_acceptance_workload.py:106 · validation/unit/commalg/test_acceptance_workload.py:107 · validation/unit/commalg/test_acceptance_workload.py:113 · validation/unit/commalg/test_acceptance_workload.py:114

commalg.ProjectiveSpace.coordinates

Return the coordinates recorded by this ProjectiveSpace.

Detailed contract

Ordered homogeneous coordinate names.

(self) -> list[str]

noether::commalg::ProjectiveSpace::coordinates · Direct Rust declaration

pub fn coordinates(&self) -> &[String]
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/ProjectiveSpace@1

Executable usage: validation/unit/commalg/test_base_change.py:114 · validation/unit/commalg/test_base_change.py:54 · validation/unit/commalg/test_base_change.py:62 · validation/unit/commalg/test_kahler_differentials.py:131 · validation/unit/commalg/test_polynomial_ideal_facade.py:171 · validation/unit/commalg/test_quotient_facade.py:142

commalg.ProjectiveSpace.dimension

Return the dimension recorded by this ProjectiveSpace.

Detailed contract

Projective dimension.

(self) -> int

noether::commalg::ProjectiveSpace::dimension · Direct Rust declaration

pub fn dimension(&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/ProjectiveSpace@1

Executable usage: examples/03_exact_linear_systems.py:15 · examples/03_exact_linear_systems.py:16 · examples/15_groebner_twisted_cubic.py:14 · examples/15_groebner_twisted_cubic.py:28 · examples/27_weight_characters.py:25 · examples/34_finite_group_cohomology.py:13

commalg.ProjectiveSpace.from_json

Deserialize and revalidate a ProjectiveSpace from typed JSON.

Detailed contract

Restore and validate this ambient context.

(cls, value: str) -> ProjectiveSpace[SchemeBase]

noether::commalg::ProjectiveSpace::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/ProjectiveSpace@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.ProjectiveSpace.to_json

Serialize this ProjectiveSpace to its canonical typed JSON representation.

Detailed contract

Serialize this ambient context.

(self) -> str

noether::commalg::ProjectiveSpace::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/ProjectiveSpace@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