commalg · Scheme¶
23 accepted declarations. Python and Rust forms, contracts, evidence, failure boundaries, and checked usages are kept together below.
Worked example¶
The complete checked program Reduce a module element and certify a minimal free resolution uses this API directly.
# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Reduce a module element and certify a minimal free resolution."""
from noether import Q
from noether.commalg import Degree, MonomialOrder, PolynomialRing
from noether.homalg import (
FreeModule,
ModuleElement,
ModuleHomomorphism,
ModuleMonomialOrder,
PresentedModule,
Submodule,
)
from noether.linalg import Matrix, Vector
def main() -> None:
ring = PolynomialRing(Q, ["x", "y", "z", "w"])
x, y, z, w = ring.generators()
order = ModuleMonomialOrder.term_over_position(MonomialOrder.GREVLEX)
ambient = FreeModule(ring, 2)
first = ModuleElement(ambient, Vector.from_values(ring, [x, y]))
second = ModuleElement(ambient, Vector.from_values(ring, [y, 1]))
submodule = Submodule.from_generators(ambient, [first, second])
basis = submodule.groebner_basis(order)
reduction = basis.reduce(first + second * x)
basis.verify()
reduction.verify()
assert reduction.is_member()
target = FreeModule(ring, 1, grading_rank=1, degree_shifts=[Degree([0])])
source = FreeModule(ring, 3, grading_rank=1, degree_shifts=[Degree([-2])] * 3)
twisted_cubic = PresentedModule(
ModuleHomomorphism(
source,
target,
Matrix.from_rows(ring, [[x * z - y**2, x * w - y * z, y * w - z**2]]),
)
)
resolution = twisted_cubic.minimal_free_resolution(order)
resolution.verify()
betti = resolution.graded_betti_table()
betti.verify()
assert betti.entries == [
(0, Degree([0]), 1),
(1, Degree([2]), 3),
(2, Degree([3]), 2),
]
print(f"module member certified; minimal Betti entries={betti.entries}")
if __name__ == "__main__":
main()
Run it with .venv/bin/python examples/30_modules_and_resolutions.py.
commalg.Scheme¶
A closed affine or projective scheme with a canonical defining ideal.
noether::commalg::Scheme · 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/Scheme@1 |
Executable usage: validation/unit/commalg/test_scheme_facade.py:17 · validation/unit/commalg/test_scheme_facade.py:176 · validation/unit/commalg/test_scheme_facade.py:179 · validation/unit/commalg/test_scheme_facade.py:185 · validation/unit/infra/test_discovery.py:130 · validation/unit/infra/test_discovery.py:95
commalg.Scheme.ambient¶
Return the ambient recorded by this Scheme.
noether::commalg::Scheme · Python projection
| 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/Scheme@1 |
Executable usage: examples/30_modules_and_resolutions.py:23 · examples/30_modules_and_resolutions.py:24 · examples/30_modules_and_resolutions.py:25 · examples/30_modules_and_resolutions.py:26 · examples/38_exact_linear_systems.py:49 · examples/38_exact_linear_systems.py:53
commalg.Scheme.base¶
Return the base recorded by this Scheme.
Detailed contract
Base field context.
noether::commalg::Scheme::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/Scheme@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.Scheme.base_change¶
Extend a finite-field scheme presentation and recanonicalize its defining ideal over the target field.
Detailed contract
Extend a finite-field scheme presentation and recanonicalize its defining ideal over the target field.
Extend a closed affine or projective presentation along a checked field map, preserving its ambient kind and presentation data.
noether::commalg::Scheme::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/Scheme@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.Scheme.blow_up_at¶
Verified local charts of the blow-up at one finite-field rational point.
Detailed contract
Construct verified affine charts for the blow-up at one rational point.
noether::commalg::Scheme::blow_up_at · 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/Scheme@1 |
Executable usage: validation/unit/commalg/test_acceptance_workload.py:98 · validation/unit/commalg/test_scheme_facade.py:225
commalg.Scheme.closed_points¶
Solve a zero-dimensional affine scheme into closed points without enumerating the base field.
Detailed contract
Solve a zero-dimensional affine scheme into closed points without enumerating the base field.
Solve a zero-dimensional affine scheme into closed points using a rational univariate representation and exact finite-field factorization. This path never enumerates the base field. Proper residue extensions use deterministic Conway presentations when the current word- characteristic finite-field backend admits them.
noether::commalg::Scheme::closed_points · 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 | released |
| Semantic ID | noether/commalg/Scheme@1 |
Executable usage: validation/unit/commalg/test_scheme_facade.py:119 · validation/unit/commalg/test_scheme_facade.py:99 · validation/unit/infra/test_discovery.py:130
commalg.Scheme.completion¶
Fixed-order completed local quotient presentation at one rational point.
Detailed contract
Complete at a rational point to one explicit finite monomial order.
noether::commalg::Scheme::completion · 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/Scheme@1 |
Executable usage: examples/29_integral_line_configurations.py:20 · examples/29_integral_line_configurations.py:21 · examples/29_integral_line_configurations.py:22 · examples/29_integral_line_configurations.py:23 · examples/29_integral_line_configurations.py:29 · examples/34_finite_group_cohomology.py:21
commalg.Scheme.coordinate_ring¶
Return the coordinate ring recorded by this Scheme.
Detailed contract
Exact coordinate ring of the chosen ambient presentation.
noether::commalg::Scheme::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/Scheme@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.Scheme.defining_ideal¶
Return the defining ideal recorded by this Scheme.
Detailed contract
Canonical defining ideal.
noether::commalg::Scheme::defining_ideal · 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/Scheme@1 |
Executable usage: validation/unit/commalg/test_acceptance_workload.py:107 · validation/unit/commalg/test_acceptance_workload.py:114 · validation/unit/commalg/test_affine_normalization_facade.py:108 · validation/unit/commalg/test_affine_normalization_facade.py:163 · validation/unit/commalg/test_affine_normalization_facade.py:182 · validation/unit/commalg/test_affine_normalization_facade.py:89
commalg.Scheme.degree¶
Standard-graded degree (multiplicity) of the scheme.
Detailed contract
Standard-graded degree (multiplicity) of this presentation.
noether::commalg::Scheme::degree · 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/Scheme@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.Scheme.dimension¶
Dimension of the affine or projective scheme (-1 for the empty scheme).
Detailed contract
Dimension of this affine or projective presentation.
noether::commalg::Scheme::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/Scheme@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.Scheme.from_json¶
Deserialize and revalidate a Scheme from typed JSON.
Detailed contract
Restore and revalidate this scheme presentation.
noether::commalg::Scheme::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/Scheme@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.Scheme.hilbert_polynomial¶
Standard Hilbert polynomial in the canonical variable m.
Detailed contract
Standard Hilbert polynomial of the homogeneous/filtered coordinate ring.
noether::commalg::Scheme::hilbert_polynomial · 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/Scheme@1 |
Executable usage: validation/unit/commalg/test_monomial_ideal_facade.py:54 · validation/unit/commalg/test_polynomial_ideal_facade.py:212 · validation/unit/commalg/test_polynomial_ideal_facade.py:223 · validation/unit/commalg/test_polynomial_ideal_facade.py:246 · validation/unit/commalg/test_quotient_facade.py:129 · validation/unit/commalg/test_scheme_facade.py:38
commalg.Scheme.is_affine¶
Test whether this Scheme is affine.
Detailed contract
Whether this presentation has an affine ambient space.
noether::commalg::Scheme::is_affine · 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/Scheme@1 |
Executable usage: validation/unit/commalg/test_scheme_facade.py:174 · validation/unit/commalg/test_scheme_facade.py:227
commalg.Scheme.is_projective¶
Test whether this Scheme is projective.
Detailed contract
Whether this presentation has a projective ambient space.
noether::commalg::Scheme::is_projective · 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/Scheme@1 |
Executable usage: validation/unit/commalg/test_scheme_facade.py:175
commalg.Scheme.is_smooth¶
Decide smoothness when the exact complete-intersection criterion applies.
Detailed contract
Decide smoothness when the exact complete-intersection Jacobian criterion applies.
noether::commalg::Scheme::is_smooth · 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/Scheme@1 |
Executable usage: validation/unit/commalg/test_acceptance_workload.py:110 · validation/unit/commalg/test_scheme_facade.py:202 · validation/unit/commalg/test_scheme_facade.py:213 · validation/unit/commalg/test_scheme_facade.py:240 · validation/unit/commalg/test_scheme_facade.py:39 · validation/unit/commalg/test_surface_facade.py:42
commalg.Scheme.jacobian_subscheme¶
Expected-codimension Jacobian rank-defect subscheme.
Detailed contract
Rank-defect subscheme cut out by the expected-codimension Jacobian minors of the canonical defining basis.
noether::commalg::Scheme::jacobian_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/Scheme@1 |
Executable usage: validation/unit/commalg/test_scheme_facade.py:201 · validation/unit/commalg/test_scheme_facade.py:208
commalg.Scheme.point¶
Compute point for this Scheme.
Detailed contract
Validate one rational point and normalize projective coordinates.
noether::commalg::Scheme::point · 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/Scheme@1 |
Executable usage: examples/26_elliptic_descent_functions.py:17 · examples/26_elliptic_descent_functions.py:18 · examples/26_elliptic_descent_functions.py:20 · examples/26_elliptic_descent_functions.py:25 · examples/26_elliptic_descent_functions.py:31 · examples/26_elliptic_descent_functions.py:32
commalg.Scheme.point_count¶
Count finite-field rational points and return a partition certificate.
Detailed contract
Count rational points with one deterministic compiled Rust pass.
noether::commalg::Scheme::point_count · 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 | released |
| Semantic ID | noether/commalg/Scheme@1 |
| Evidence | PointCountCertificate.verify |
Executable usage: examples/18_finite_field_schemes.py:14 · validation/unit/commalg/test_acceptance_workload.py:135 · validation/unit/commalg/test_acceptance_workload.py:149 · validation/unit/commalg/test_scheme_facade.py:137 · validation/unit/commalg/test_scheme_facade.py:138 · validation/unit/commalg/test_scheme_facade.py:178
commalg.Scheme.rational_points¶
Compute rational points for this Scheme.
Detailed contract
Stream all rational points in canonical order.
noether::commalg::Scheme::rational_points · 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/Scheme@1 |
Executable usage: examples/18_finite_field_schemes.py:17 · validation/unit/commalg/test_acceptance_workload.py:136 · validation/unit/commalg/test_scheme_facade.py:136 · validation/unit/commalg/test_scheme_facade.py:150 · validation/unit/commalg/test_scheme_facade.py:152 · validation/unit/commalg/test_scheme_facade.py:159
commalg.Scheme.singular_subscheme¶
Scheme-theoretic singular locus for an established complete intersection.
Detailed contract
Scheme-theoretic singular locus for an established complete- intersection presentation over this perfect field.
noether::commalg::Scheme::singular_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/Scheme@1 |
Executable usage: validation/unit/commalg/test_scheme_facade.py:198 · validation/unit/commalg/test_scheme_facade.py:210 · validation/unit/commalg/test_scheme_facade.py:40
commalg.Scheme.tangent_cone¶
Exact tangent cone at one finite-field rational point.
Detailed contract
Form the tangent cone from a degree-compatible Mora standard basis.
noether::commalg::Scheme::tangent_cone · 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/Scheme@1 |
Executable usage: validation/unit/commalg/test_acceptance_workload.py:112 · validation/unit/commalg/test_scheme_facade.py:253
commalg.Scheme.to_json¶
Serialize this Scheme to its canonical typed JSON representation.
Detailed contract
Serialize this scheme presentation and canonical defining ideal.
noether::commalg::Scheme::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/Scheme@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