commalg · RealRootIsolation¶
16 accepted declarations. Python and Rust forms, contracts, evidence, failure boundaries, and checked usages are kept together below.
Worked example¶
The complete checked program Factor an integer and construct a cyclotomic polynomial uses this API directly.
# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Factor an integer and construct a cyclotomic polynomial."""
from noether.numthy import cyclotomic_polynomial, factor, is_prime
def main() -> None:
integer = 2**20 * 3**7 * 101
factorization = factor(integer)
assert factorization.verify(integer)
assert all(is_prime(prime) for prime, _ in factorization.factors)
phi = cyclotomic_polynomial(12)
assert phi.terms() == [([4], 1), ([2], -1), ([0], 1)]
print(f"{integer} = {factorization}; Phi_12 = {phi}")
if __name__ == "__main__":
main()
Run it with .venv/bin/python examples/07_integer_factorization.py.
commalg.RealRootIsolation¶
One exact real root isolated between rational endpoints.
noether::commalg::RealRootIsolation · 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/RealRootIsolation@1 |
Executable usage: validation/unit/commalg/test_polynomial_facade.py:104 · validation/unit/commalg/test_polynomial_facade.py:18 · validation/unit/commalg/test_polynomial_facade.py:95
commalg.RealRootIsolation.ball¶
Convert an exact refinement into a rigorous Arb enclosure.
Detailed contract
Return an Arb enclosure after exact rational refinement. Exact Sturm refinement is performed to eight guard bits beyond the Arb working precision. Arb then encloses both rational endpoints; it is an accelerator and representation layer, not the source of the isolation proof.
noether::commalg::RealRootIsolation::ball · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | rigorous enclosure |
| 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/RealRootIsolation@1 |
Executable usage: validation/unit/commalg/test_polynomial_facade.py:102 · validation/corpus/commalg/k3-univariate-certificates.py:109
commalg.RealRootIsolation.ceiling¶
Least integer not smaller than this root.
Detailed contract
Least integer not smaller than this exact root.
noether::commalg::RealRootIsolation::ceiling · 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/RealRootIsolation@1 |
Executable usage: validation/unit/commalg/test_polynomial_facade.py:106 · validation/unit/commalg/test_polynomial_facade.py:108 · validation/unit/infra/test_slurm_handoff.py:344
commalg.RealRootIsolation.compare¶
Exact comparison with another isolated root.
Detailed contract
Compare two exact isolated roots, recognizing equal algebraic values.
noether::commalg::RealRootIsolation::compare · 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/RealRootIsolation@1 |
Executable usage: validation/unit/commalg/test_polynomial_facade.py:109 · validation/backends/graph/invariants.py:67 · validation/bench/_macaulay2.py:5 · validation/bench/groebner_compare.py:457 · validation/bench/sage_exterior_algebra.py:5 · validation/harness/parity.py:20
commalg.RealRootIsolation.compare_rational¶
Exact comparison with a rational, returned as -1, 0, or 1.
Detailed contract
Compare this exact root with a rational number.
noether::commalg::RealRootIsolation::compare_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/RealRootIsolation@1 |
Executable usage: validation/unit/commalg/test_polynomial_facade.py:110
commalg.RealRootIsolation.defining_factor¶
Monic square-free defining factor carrying this root.
Detailed contract
Monic square-free defining factor carrying the isolated root.
noether::commalg::RealRootIsolation::defining_factor · 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/RealRootIsolation@1 |
Executable usage: validation/unit/commalg/test_polynomial_facade.py:97
commalg.RealRootIsolation.floor¶
Greatest integer not exceeding this root.
Detailed contract
Greatest integer not exceeding this exact root.
noether::commalg::RealRootIsolation::floor · 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/RealRootIsolation@1 |
Executable usage: validation/unit/commalg/test_polynomial_facade.py:106 · validation/unit/commalg/test_polynomial_facade.py:108
commalg.RealRootIsolation.from_json¶
Deserialize and revalidate a RealRootIsolation from typed JSON.
Detailed contract
Deserialize and exactly verify a typed certificate.
noether::commalg::RealRootIsolation::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/RealRootIsolation@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.RealRootIsolation.lower¶
Strict lower rational endpoint.
noether::commalg::RealRootIsolation::lower · 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/RealRootIsolation@1 |
Executable usage: validation/unit/commalg/test_polynomial_facade.py:101 · validation/unit/commalg/test_polynomial_facade.py:98 · validation/unit/commalg/test_polynomial_facade.py:99 · validation/unit/commalg/test_surface_facade.py:72 · validation/unit/commalg/test_surface_facade.py:74 · validation/unit/commalg/test_surface_facade.py:76
commalg.RealRootIsolation.multiplicity¶
Exact root multiplicity.
Detailed contract
Multiplicity in the stored polynomial.
noether::commalg::RealRootIsolation::multiplicity · 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/RealRootIsolation@1 |
Executable usage: validation/unit/combin/test_acceptance_workload.py:64 · validation/unit/commalg/test_local_algebra.py:65 · validation/unit/commalg/test_local_algebra.py:82 · validation/unit/commalg/test_polynomial_facade.py:126 · validation/unit/commalg/test_polynomial_facade.py:158 · validation/unit/commalg/test_polynomial_facade.py:96
commalg.RealRootIsolation.polynomial¶
Exact rational polynomial whose root is isolated.
Detailed contract
Original rational polynomial whose root is isolated.
noether::commalg::RealRootIsolation::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/RealRootIsolation@1 |
Executable usage: examples/07_integer_factorization.py:3 · examples/14_weighted_polynomials.py:13 · examples/14_weighted_polynomials.py:15 · examples/14_weighted_polynomials.py:3 · examples/22_matroids_and_tutte.py:3 · examples/27_weight_characters.py:3
commalg.RealRootIsolation.refine¶
Refine to an interval of width at most 2^-bits.
Detailed contract
Refine the exact interval to width at most 2^-bits.
noether::commalg::RealRootIsolation::refine · 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/RealRootIsolation@1 |
Executable usage: validation/unit/commalg/test_polynomial_facade.py:100 · validation/corpus/commalg/k3-univariate-certificates.py:108
commalg.RealRootIsolation.sign¶
Exact sign, -1, 0, or 1.
Detailed contract
Sign of this exact root: -1, 0, or 1.
noether::commalg::RealRootIsolation::sign · 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/RealRootIsolation@1 |
Executable usage: validation/unit/commalg/test_polynomial_facade.py:105 · validation/unit/commalg/test_polynomial_facade.py:107 · validation/parity/commalg/test_intersection_theory_sage_parity.py:146 · validation/parity/commalg/test_intersection_theory_sage_parity.py:149 · validation/parity/commalg/test_intersection_theory_sage_parity.py:151 · validation/corpus/commalg/k3-univariate-certificates.py:107
commalg.RealRootIsolation.to_json¶
Serialize this RealRootIsolation to its canonical typed JSON representation.
Detailed contract
Serialize this exact certificate as typed JSON.
noether::commalg::RealRootIsolation::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/RealRootIsolation@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.RealRootIsolation.upper¶
Strict upper rational endpoint.
noether::commalg::RealRootIsolation::upper · 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/RealRootIsolation@1 |
Executable usage: validation/unit/commalg/test_polynomial_facade.py:101 · validation/unit/commalg/test_polynomial_facade.py:98 · validation/unit/commalg/test_polynomial_facade.py:99 · validation/unit/commalg/test_surface_facade.py:73 · validation/unit/commalg/test_surface_facade.py:75 · validation/unit/commalg/test_surface_facade.py:76
commalg.RealRootIsolation.verify¶
Verify the exact Sturm and multiplicity certificate.
Detailed contract
Verify the Sturm root count and exact multiplicity certificate.
noether::commalg::RealRootIsolation::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 | attached / bounded |
| Semantic ID | noether/commalg/RealRootIsolation@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