commalg · WeightedProjectiveSpace¶
13 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.WeightedProjectiveSpace¶
A weighted projective space with an explicit base and primitive weights.
noether::commalg::WeightedProjectiveSpace · 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/WeightedProjectiveSpace@1 |
Executable usage: validation/unit/commalg/test_surface_facade.py:17 · validation/unit/commalg/test_surface_facade.py:24 · validation/unit/commalg/test_surface_facade.py:31
commalg.WeightedProjectiveSpace.base¶
Return the base recorded by this WeightedProjectiveSpace.
Detailed contract
Base coefficient context.
noether::commalg::WeightedProjectiveSpace::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/WeightedProjectiveSpace@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.WeightedProjectiveSpace.chart¶
Compute chart for this WeightedProjectiveSpace.
Detailed contract
One standard quotient chart x_index != 0. It is an affine-space chart exactly when the indexed weight is one. Otherwise it records A^n / mu_weight and the diagonal action weights; no false affine-space identification is made.
noether::commalg::WeightedProjectiveSpace::chart · 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/WeightedProjectiveSpace@1 |
Executable usage: validation/unit/commalg/test_acceptance_workload.py:105 · validation/unit/commalg/test_acceptance_workload.py:106 · validation/unit/commalg/test_acceptance_workload.py:107 · validation/unit/commalg/test_acceptance_workload.py:110 · validation/unit/commalg/test_acceptance_workload.py:117 · validation/unit/commalg/test_acceptance_workload.py:118
commalg.WeightedProjectiveSpace.closed_subscheme¶
Compute closed subscheme for this WeightedProjectiveSpace.
Detailed contract
Construct a weighted-homogeneous closed subscheme.
noether::commalg::WeightedProjectiveSpace::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/WeightedProjectiveSpace@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.WeightedProjectiveSpace.coordinate_ring¶
Return the coordinate ring recorded by this WeightedProjectiveSpace.
Detailed contract
Exact weighted homogeneous coordinate ring.
noether::commalg::WeightedProjectiveSpace::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/WeightedProjectiveSpace@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.WeightedProjectiveSpace.coordinates¶
Return the coordinates recorded by this WeightedProjectiveSpace.
Detailed contract
Ordered homogeneous coordinate names.
noether::commalg::WeightedProjectiveSpace::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/WeightedProjectiveSpace@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.WeightedProjectiveSpace.dimension¶
Return the dimension recorded by this WeightedProjectiveSpace.
Detailed contract
Dimension of the ambient weighted projective space.
noether::commalg::WeightedProjectiveSpace::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/WeightedProjectiveSpace@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.WeightedProjectiveSpace.from_json¶
Deserialize and revalidate a WeightedProjectiveSpace from typed JSON.
Detailed contract
Restore and revalidate this weighted-projective context.
noether::commalg::WeightedProjectiveSpace::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/WeightedProjectiveSpace@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.WeightedProjectiveSpace.hypersurface¶
Compute hypersurface for this WeightedProjectiveSpace.
Detailed contract
Construct a single weighted-projective hypersurface.
noether::commalg::WeightedProjectiveSpace::hypersurface · 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/WeightedProjectiveSpace@1 |
Executable usage: validation/unit/infra/test_macaulay2_benchmark_protocol.py:1041 · validation/unit/infra/test_macaulay2_benchmark_protocol.py:935 · validation/bench/macaulay2_decomposition.py:263 · validation/bench/macaulay2_quotient.py:161 · validation/bench/macaulay2_quotient.py:162 · validation/bench/macaulay2_quotient.py:209
commalg.WeightedProjectiveSpace.is_well_formed¶
Test whether this WeightedProjectiveSpace is well formed.
Detailed contract
Whether the primitive weight vector is well formed. This is the usual condition that omitting any one weight leaves gcd one. It is distinct from primitivity of the complete vector.
noether::commalg::WeightedProjectiveSpace::is_well_formed · 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/WeightedProjectiveSpace@1 |
Executable usage: validation/unit/commalg/test_surface_facade.py:27
commalg.WeightedProjectiveSpace.quotient_strata¶
Compute quotient strata for this WeightedProjectiveSpace.
Detailed contract
Coordinate strata carrying a nontrivial generic quotient stabilizer. Only maximal support sets are returned. These are quotient strata, not automatically singular strata of the coarse space; the distinction is intentional (for example in dimension one).
noether::commalg::WeightedProjectiveSpace::quotient_strata · 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/WeightedProjectiveSpace@1 |
commalg.WeightedProjectiveSpace.to_json¶
Serialize this WeightedProjectiveSpace to its canonical typed JSON representation.
Detailed contract
Serialize this weighted-projective context.
noether::commalg::WeightedProjectiveSpace::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/WeightedProjectiveSpace@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.WeightedProjectiveSpace.weights¶
Return the weights recorded by this WeightedProjectiveSpace.
Detailed contract
Primitive positive weights in coordinate order.
noether::commalg::WeightedProjectiveSpace::weights · 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/WeightedProjectiveSpace@1 |
Executable usage: examples/23_kashiwara_crystals.py:16 · validation/unit/commalg/test_polynomial_facade.py:330 · validation/unit/commalg/test_polynomial_facade.py:435 · validation/unit/commalg/test_power_series_facade.py:111 · validation/unit/commalg/test_power_series_facade.py:115 · validation/unit/commalg/test_power_series_facade.py:221