commalg · Curve¶
14 accepted declarations. Python and Rust forms, contracts, evidence, failure boundaries, and checked usages are kept together below.
Worked example¶
The complete checked program Lift a simple square root from F_5 to fixed-precision Z_5 uses this API directly.
# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Lift a simple square root from F_5 to fixed-precision Z_5."""
from noether.commalg import PolynomialRing
from noether.numthy import PadicRing
def main() -> None:
integers = PadicRing(5, absolute_precision=6)
polynomials = PolynomialRing(integers, ["x"])
x = polynomials.generator("x")
equation = x**2 - 6
root = integers.hensel_lift(equation, integers.residue_field(1))
assert equation.evaluate([root]) == integers.zero()
print(f"sqrt(6) in Z_5 mod 5^6 is represented by {int(root)}")
if __name__ == "__main__":
main()
Run it with .venv/bin/python examples/10_padic_hensel_lifting.py.
commalg.Curve¶
A checked smooth projective plane or Weierstrass curve.
noether::commalg::Curve · 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/Curve@1 |
Executable usage: validation/unit/commalg/test_curve_facade.py:108 · validation/unit/commalg/test_curve_facade.py:131 · validation/unit/commalg/test_curve_facade.py:146 · validation/unit/commalg/test_curve_facade.py:22 · validation/unit/commalg/test_curve_facade.py:29 · validation/unit/commalg/test_curve_facade.py:8
commalg.Curve.base¶
Return the base recorded by this Curve.
Detailed contract
Base coefficient field.
noether::commalg::Curve::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/Curve@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.Curve.equation¶
Return the equation recorded by this Curve.
Detailed contract
Canonical homogeneous plane equation.
noether::commalg::Curve::equation · 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/Curve@1 |
Executable usage: examples/10_padic_hensel_lifting.py:13 · examples/10_padic_hensel_lifting.py:14 · examples/10_padic_hensel_lifting.py:15 · validation/unit/commalg/test_curve_facade.py:53 · validation/unit/commalg/test_curve_facade.py:94 · validation/unit/numthy/test_number_field_facade.py:156
commalg.Curve.from_json¶
Deserialize and revalidate a Curve from typed JSON.
Detailed contract
Restore and recheck a serialized smooth projective curve.
noether::commalg::Curve::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/Curve@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.Curve.function_field¶
Compute function field for this Curve.
Detailed contract
Construct the canonical algebraic function field in a deterministic affine chart.
noether::commalg::Curve::function_field · 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/Curve@1 |
Executable usage: validation/unit/commalg/test_acceptance_workload.py:60 · validation/unit/commalg/test_acceptance_workload.py:61 · validation/unit/commalg/test_acceptance_workload.py:65 · validation/unit/commalg/test_acceptance_workload.py:66 · validation/unit/commalg/test_curve_facade.py:117 · validation/unit/commalg/test_curve_facade.py:132
commalg.Curve.point¶
Compute point for this Curve.
Detailed contract
Validate one rational point on this curve.
noether::commalg::Curve::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/Curve@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.Curve.presentation_kind¶
Return the presentation kind recorded by this Curve.
Detailed contract
Admitted presentation class.
noether::commalg::Curve::presentation_kind · 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/Curve@1 |
Executable usage: validation/unit/commalg/test_curve_facade.py:32
commalg.Curve.quotient_dimension¶
Return the quotient dimension recorded by this Curve.
noether::commalg::Curve · 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/Curve@1 |
Executable usage: validation/unit/commalg/test_curve_facade.py:34 · validation/unit/commalg/test_kahler_differentials.py:99 · validation/unit/commalg/test_polynomial_ideal_facade.py:101 · validation/unit/commalg/test_polynomial_ideal_facade.py:113 · validation/unit/commalg/test_polynomial_ideal_facade.py:1178 · validation/unit/commalg/test_polynomial_ideal_facade.py:454
commalg.Curve.singular_cone_dimension¶
Return the singular cone dimension recorded by this Curve.
noether::commalg::Curve · 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/Curve@1 |
Executable usage: validation/unit/commalg/test_curve_facade.py:35
commalg.Curve.smooth_projective_plane¶
Construct a Curve using smooth projective plane.
Detailed contract
Check one homogeneous plane equation by exact dimension and Jacobian tests.
noether::commalg::Curve::smooth_projective_plane · 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/Curve@1 |
commalg.Curve.to_json¶
Serialize this Curve to its canonical typed JSON representation.
Detailed contract
Serialize the checked presentation and its exact coefficient context.
noether::commalg::Curve::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/Curve@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.Curve.verify¶
Replay and verify the mathematical evidence carried by this Curve.
Detailed contract
Recompute the checked presentation and compare its canonical equation and evidence.
noether::commalg::Curve::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/Curve@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
commalg.Curve.weierstrass¶
Construct a Curve using weierstrass.
noether::commalg::Curve · 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/Curve@1 |
Executable usage: validation/unit/commalg/test_curve_facade.py:108 · validation/unit/commalg/test_curve_facade.py:131 · validation/unit/commalg/test_curve_facade.py:146 · validation/unit/commalg/test_curve_facade.py:22
commalg.Curve.weierstrass_coefficients¶
Return the weierstrass coefficients recorded by this Curve.
Detailed contract
Generalized Weierstrass coefficients (a1,a2,a3,a4,a6), when distinguished.
noether::commalg::Curve::weierstrass_coefficients · 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/Curve@1 |
Executable usage: validation/unit/commalg/test_curve_facade.py:33