commalg · AffineSpace¶
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.AffineSpace¶
Affine space over Q or a finite field.
noether::commalg::AffineSpace · Direct Rust declaration
| 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/AffineSpace@1 |
Executable usage: examples/18_finite_field_schemes.py:11 · examples/18_finite_field_schemes.py:5 · validation/unit/commalg/test_acceptance_workload.py:11 · validation/unit/commalg/test_acceptance_workload.py:147 · validation/unit/commalg/test_base_change.py:102 · validation/unit/commalg/test_base_change.py:43
commalg.AffineSpace.base¶
Return the base recorded by this AffineSpace.
Detailed contract
Base coefficient context.
noether::commalg::AffineSpace::base · Direct Rust declaration
| 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/AffineSpace@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.AffineSpace.base_change¶
Extend a finite-field affine presentation along a checked embedding.
Detailed contract
Extend the base while preserving the exact affine coordinate-ring presentation.
noether::commalg::AffineSpace::base_change · Direct Rust declaration
| 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/AffineSpace@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.AffineSpace.closed_subscheme¶
Compute closed subscheme for this AffineSpace.
Detailed contract
Construct a closed subscheme from an ideal in this coordinate ring.
noether::commalg::AffineSpace::closed_subscheme · Direct Rust declaration
| 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/AffineSpace@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.AffineSpace.coordinate_ring¶
Return the coordinate ring recorded by this AffineSpace.
Detailed contract
Exact polynomial coordinate ring.
noether::commalg::AffineSpace::coordinate_ring · Direct Rust declaration
| 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/AffineSpace@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.AffineSpace.coordinates¶
Return the coordinates recorded by this AffineSpace.
Detailed contract
Ordered coordinate names.
noether::commalg::AffineSpace::coordinates · Direct Rust declaration
| 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/AffineSpace@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.AffineSpace.dimension¶
Return the dimension recorded by this AffineSpace.
Detailed contract
Affine dimension.
noether::commalg::AffineSpace::dimension · Direct Rust declaration
| 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/AffineSpace@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.AffineSpace.from_json¶
Deserialize and revalidate a AffineSpace from typed JSON.
Detailed contract
Restore and validate this ambient context.
noether::commalg::AffineSpace::from_json · Direct Rust declaration
| 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/AffineSpace@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.AffineSpace.to_json¶
Serialize this AffineSpace to its canonical typed JSON representation.
Detailed contract
Serialize this ambient context.
noether::commalg::AffineSpace::to_json · Direct Rust declaration
| 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/AffineSpace@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