commalg · ChowRing¶
15 accepted declarations. Python and Rust forms, contracts, evidence, failure boundaries, and checked usages are kept together below.
Worked example¶
The complete checked program Compute characteristic numbers of a smooth complete intersection uses this API directly.
# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Compute characteristic numbers of a smooth complete intersection."""
from fractions import Fraction
from noether.commalg import ChowRing, ProjectiveCompleteIntersection
def main() -> None:
# The Chow ring of P^1 x P^2 is Z[h1,h2]/(h1^2,h2^3).
chow = ChowRing([1, 2])
h1, h2 = chow.generators()
assert chow.integrate(h1 * h2**2) == 1
# A smooth (1,1),(1,2) complete intersection is a curve. Smoothness is an
# explicit hypothesis here.
variety = ProjectiveCompleteIntersection.assuming_smooth(chow, [[1, 1], [1, 2]])
assert variety.dimension == 1
assert variety.integrate_restriction(h1) == 2
assert variety.integrate_restriction(h2) == 3
euler = variety.line_bundle_euler_characteristic([2, -1])
euler.verify()
assert euler.hrr_integral == Fraction(euler.koszul_value)
print(
f"smooth (1,1),(1,2) curve in P^1 x P^2: chi(O(2,-1))={euler.value}; HRR and Koszul agree"
)
if __name__ == "__main__":
main()
Run it with .venv/bin/python examples/37_complete_intersection_theory.py.
commalg.ChowRing¶
The exact integral Chow ring of a product of projective spaces.
noether::commalg::ChowRing · 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/ChowRing@1 |
Executable usage: examples/37_complete_intersection_theory.py:12 · examples/37_complete_intersection_theory.py:7 · validation/unit/commalg/test_intersection_theory.py:107 · validation/unit/commalg/test_intersection_theory.py:108 · validation/unit/commalg/test_intersection_theory.py:110 · validation/unit/commalg/test_intersection_theory.py:12
commalg.ChowRing.__eq__¶
Test mathematical equality with another value.
noether::commalg::ChowRing · 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/ChowRing@1 |
commalg.ChowRing.dimension¶
Return the dimension recorded by this ChowRing.
Detailed contract
Dimension of the ambient product.
noether::commalg::ChowRing::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/ChowRing@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.ChowRing.factor_count¶
Return the factor count recorded by this ChowRing.
Detailed contract
Number of projective-space factors.
noether::commalg::ChowRing::factor_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 | attached / bounded |
| Semantic ID | noether/commalg/ChowRing@1 |
Executable usage: validation/unit/commalg/test_intersection_theory.py:25
commalg.ChowRing.from_json¶
Deserialize and revalidate a ChowRing from typed JSON.
Detailed contract
Deserialize and validate a Chow ring from canonical JSON.
noether::commalg::ChowRing::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 | released |
| Semantic ID | noether/commalg/ChowRing@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.ChowRing.from_rational_terms¶
Construct a ChowRing using rational terms.
Detailed contract
Construct and canonicalize a rational class from sparse terms.
noether::commalg::ChowRing::from_rational_terms · 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/ChowRing@1 |
commalg.ChowRing.from_terms¶
Construct a ChowRing using terms.
Detailed contract
Construct and canonicalize an integral class from sparse terms.
noether::commalg::ChowRing::from_terms · 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/ChowRing@1 |
Executable usage: examples/14_weighted_polynomials.py:12 · validation/unit/commalg/test_groebner_verification_budget.py:48 · validation/unit/commalg/test_intersection_theory.py:34 · validation/unit/commalg/test_kahler_differentials.py:172 · validation/unit/commalg/test_polynomial_facade.py:226 · validation/unit/commalg/test_polynomial_facade.py:233
commalg.ChowRing.generator¶
Compute generator for this ChowRing.
Detailed contract
Hyperplane class pulled back from one projective-space factor.
noether::commalg::ChowRing::generator · 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/ChowRing@1 |
Executable usage: examples/08_finite_field_extensions.py:10 · examples/08_finite_field_extensions.py:11 · examples/08_finite_field_extensions.py:12 · examples/08_finite_field_extensions.py:13 · examples/08_finite_field_extensions.py:14 · examples/10_padic_hensel_lifting.py:12
commalg.ChowRing.generators¶
Compute generators for this ChowRing.
Detailed contract
All hyperplane generators in factor order.
noether::commalg::ChowRing::generators · 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/ChowRing@1 |
Executable usage: examples/14_weighted_polynomials.py:11 · examples/15_groebner_twisted_cubic.py:11 · examples/15_groebner_twisted_cubic.py:19 · examples/17_weighted_power_series.py:15 · examples/18_finite_field_schemes.py:12 · examples/30_modules_and_resolutions.py:20
commalg.ChowRing.integrate¶
Compute integrate for this ChowRing.
Detailed contract
Integrate the top-degree component of an integral ambient class.
noether::commalg::ChowRing::integrate · 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/ChowRing@1 |
Executable usage: examples/37_complete_intersection_theory.py:14 · validation/unit/commalg/test_intersection_theory.py:29 · validation/unit/commalg/test_intersection_theory.py:30
commalg.ChowRing.integrate_rational¶
Compute integrate rational for this ChowRing.
Detailed contract
Integrate the top-degree component of a rational ambient class.
noether::commalg::ChowRing::integrate_rational · 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/ChowRing@1 |
commalg.ChowRing.one¶
Compute one for this ChowRing.
Detailed contract
Multiplicative unit.
noether::commalg::ChowRing::one · 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/ChowRing@1 |
Executable usage: examples/02_ball_arithmetic.py:13 · examples/11_qadic_witt_vectors.py:11 · examples/24_homology_and_persistence.py:3 · examples/31_local_fields_and_precision.py:27 · validation/unit/combinatorics/test_poset.py:3 · validation/unit/commalg/test_acceptance_workload.py:37
commalg.ChowRing.projective_dimensions¶
Return the projective dimensions recorded by this ChowRing.
Detailed contract
Dimensions of the projective-space factors.
noether::commalg::ChowRing::projective_dimensions · 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/ChowRing@1 |
Executable usage: validation/unit/commalg/test_intersection_theory.py:24
commalg.ChowRing.to_json¶
Serialize this ChowRing to its canonical typed JSON representation.
Detailed contract
Serialize this ring to canonical typed JSON.
noether::commalg::ChowRing::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/ChowRing@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.ChowRing.zero¶
Compute zero for this ChowRing.
Detailed contract
Additive zero.
noether::commalg::ChowRing::zero · 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/ChowRing@1 |
Executable usage: examples/08_finite_field_extensions.py:11 · examples/10_padic_hensel_lifting.py:15 · examples/40_exterior_algebra.py:26 · examples/distributed/f2_linear_algebra.py:28 · examples/distributed/f2_linear_algebra.py:29 · examples/distributed/f2_linear_algebra.py:30