commalg · HirzebruchRiemannRochResult¶
11 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.HirzebruchRiemannRochResult¶
Exact HRR result with independent Koszul evidence.
noether::commalg::HirzebruchRiemannRochResult · 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/HirzebruchRiemannRochResult@1 |
Executable usage: validation/unit/commalg/test_intersection_theory.py:14 · validation/unit/commalg/test_intersection_theory.py:61
commalg.HirzebruchRiemannRochResult.__eq__¶
Test mathematical equality with another value.
noether::commalg::HirzebruchRiemannRochResult · 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/HirzebruchRiemannRochResult@1 |
commalg.HirzebruchRiemannRochResult.complete_intersection¶
Return the complete intersection recorded by this HirzebruchRiemannRochResult.
Detailed contract
Complete-intersection input.
noether::commalg::HirzebruchRiemannRochResult::complete_intersection · 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/HirzebruchRiemannRochResult@1 |
Executable usage: validation/unit/commalg/test_intersection_theory.py:78 · validation/unit/commalg/test_intersection_theory.py:82 · validation/unit/commalg/test_intersection_theory.py:83 · validation/unit/commalg/test_intersection_theory.py:84 · validation/unit/commalg/test_intersection_theory.py:85 · validation/unit/commalg/test_intersection_theory.py:86
commalg.HirzebruchRiemannRochResult.from_json¶
Deserialize and revalidate a HirzebruchRiemannRochResult from typed JSON.
Detailed contract
Deserialize and verify a canonical HRR result.
noether::commalg::HirzebruchRiemannRochResult::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/HirzebruchRiemannRochResult@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.HirzebruchRiemannRochResult.hrr_integral¶
Return the hrr integral recorded by this HirzebruchRiemannRochResult.
Detailed contract
Exact rational HRR integral before its integrality check.
noether::commalg::HirzebruchRiemannRochResult::hrr_integral · 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/HirzebruchRiemannRochResult@1 |
Executable usage: examples/37_complete_intersection_theory.py:25 · validation/unit/commalg/test_intersection_theory.py:58
commalg.HirzebruchRiemannRochResult.koszul_value¶
Return the koszul value recorded by this HirzebruchRiemannRochResult.
Detailed contract
Independent Koszul inclusion–exclusion value.
noether::commalg::HirzebruchRiemannRochResult::koszul_value · 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/HirzebruchRiemannRochResult@1 |
Executable usage: examples/37_complete_intersection_theory.py:25 · validation/unit/commalg/test_intersection_theory.py:57 · validation/unit/commalg/test_intersection_theory.py:59
commalg.HirzebruchRiemannRochResult.line_bundle_multidegree¶
Return the line bundle multidegree recorded by this HirzebruchRiemannRochResult.
Detailed contract
Multidegree of the line bundle.
noether::commalg::HirzebruchRiemannRochResult::line_bundle_multidegree · 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/HirzebruchRiemannRochResult@1 |
commalg.HirzebruchRiemannRochResult.to_json¶
Serialize this HirzebruchRiemannRochResult to its canonical typed JSON representation.
Detailed contract
Serialize this result to canonical typed JSON.
noether::commalg::HirzebruchRiemannRochResult::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/HirzebruchRiemannRochResult@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.HirzebruchRiemannRochResult.validity¶
Return the validity recorded by this HirzebruchRiemannRochResult.
Detailed contract
Logical validity inherited from the complete-intersection hypothesis.
noether::commalg::HirzebruchRiemannRochResult::validity · 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/HirzebruchRiemannRochResult@1 |
Executable usage: validation/unit/commalg/test_intersection_theory.py:48 · validation/unit/commalg/test_intersection_theory.py:83 · validation/unit/homalg/test_chain_complex.py:42 · validation/unit/homalg/test_padic_homology_facade.py:157 · validation/unit/homalg/test_padic_homology_facade.py:168 · validation/unit/homalg/test_padic_homology_facade.py:172
commalg.HirzebruchRiemannRochResult.value¶
Return the value recorded by this HirzebruchRiemannRochResult.
Detailed contract
Exact Euler characteristic.
noether::commalg::HirzebruchRiemannRochResult::value · 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/HirzebruchRiemannRochResult@1 |
Executable usage: examples/09_finite_field_isomorphisms.py:13 · examples/09_finite_field_isomorphisms.py:14 · examples/13_chinese_remainder_theorem.py:12 · examples/13_chinese_remainder_theorem.py:13 · examples/13_chinese_remainder_theorem.py:14 · examples/17_weighted_power_series.py:18
commalg.HirzebruchRiemannRochResult.verify¶
Replay and verify the mathematical evidence carried by this HirzebruchRiemannRochResult.
Detailed contract
Replay HRR and Koszul calculations from retained inputs.
noether::commalg::HirzebruchRiemannRochResult::verify · 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/HirzebruchRiemannRochResult@1 |
Executable usage: examples/01_bezout_certificates.py:10 · examples/01_bezout_certificates.py:3 · examples/03_exact_linear_systems.py:13 · examples/03_exact_linear_systems.py:3 · examples/04_smith_normal_form.py:12 · examples/06_shortest_lattice_vectors.py:12