Skip to content

commalg · CurveMorphism

9 accepted declarations. Python and Rust forms, contracts, evidence, failure boundaries, and checked usages are kept together below.

Worked example

The complete checked program Normalize the cusp y^2=x^3 with exact conductor evidence uses this API directly.

# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Normalize the cusp y^2=x^3 with exact conductor evidence."""

from noether import Q
from noether.commalg import PolynomialRing


def main() -> None:
    ring = PolynomialRing(Q, ["x", "y"])
    x, y = ring.generators()
    cusp = ring.ideal([y**2 - x**3])
    normalization = cusp.normalization()
    normalization.verify()

    target = normalization.normal_algebra.base_ring
    t = target.generator(0)
    assert normalization.coordinate_images == [t**2, t**3]
    assert normalization.source_conductor == ring.ideal([x, y])
    assert not normalization.is_normal
    print(
        f"cusp normalization: x -> t^2, y -> t^3; proof={normalization.proof_kind}, conductor=(x,y)"
    )


if __name__ == "__main__":
    main()

Run it with .venv/bin/python examples/36_affine_normalization.py.

commalg.CurveMorphism

A checked projective morphism between curves.

CurveMorphism(source: Curve[C], target: Curve[C], images: Iterable[Polynomial[C]])

noether::commalg::CurveMorphism · Direct Rust declaration

pub struct CurveMorphism<R: Field> { /* private fields */ }
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

Executable usage: validation/unit/commalg/test_curve_facade.py:13 · validation/unit/commalg/test_curve_facade.py:66 · validation/unit/commalg/test_curve_facade.py:88

commalg.CurveMorphism.coordinate_degree

Return the coordinate degree recorded by this CurveMorphism.

Detailed contract

Common degree of the coordinate sections.

(self) -> int

noether::commalg::CurveMorphism::coordinate_degree · Direct Rust declaration

pub fn coordinate_degree(&self) -> &Integer
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

Executable usage: validation/unit/commalg/test_curve_facade.py:68

commalg.CurveMorphism.coordinate_images

Return the coordinate images recorded by this CurveMorphism.

Detailed contract

Target homogeneous coordinates as source sections.

(self) -> list[Polynomial[C]]

noether::commalg::CurveMorphism::coordinate_images · Direct Rust declaration

pub fn coordinate_images(&self) -> &[Polynomial<R>; 3]
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

Executable usage: examples/36_affine_normalization.py:18 · validation/unit/commalg/test_affine_normalization_facade.py:33 · validation/unit/commalg/test_affine_normalization_facade.py:69 · validation/bench/macaulay2_normalization.py:218 · validation/bench/macaulay2_normalization.py:219 · validation/corpus/commalg/cusp-normalization-conductor.py:18

commalg.CurveMorphism.from_json

Deserialize and revalidate a CurveMorphism from typed JSON.

Detailed contract

Restore and recheck a serialized curve morphism.

(cls, value: str) -> CurveMorphism[CurveBase]

noether::commalg::CurveMorphism::from_json · Direct Rust declaration

pub fn from_json(value: &str) -> Result<Self, NoetherError>where R: DeserializeOwned, R::Element: DeserializeOwned,
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

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.CurveMorphism.identity

Construct a CurveMorphism using identity.

Detailed contract

Identity morphism.

(curve: Curve[C]) -> CurveMorphism[C]

noether::commalg::CurveMorphism::identity · Direct Rust declaration

pub fn identity(curve: Curve<R>) -> Result<Self, CurveError>
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

Executable usage: examples/01_bezout_certificates.py:10 · examples/01_bezout_certificates.py:12 · examples/01_bezout_certificates.py:14 · examples/01_bezout_certificates.py:9 · examples/02_ball_arithmetic.py:3 · examples/distributed/f2_linear_algebra.py:20

commalg.CurveMorphism.source

Return the source recorded by this CurveMorphism.

Detailed contract

Source curve.

(self) -> Curve[C]

noether::commalg::CurveMorphism::source · Direct Rust declaration

pub fn source(&self) -> &Curve<R>
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

Executable usage: examples/09_finite_field_isomorphisms.py:11 · examples/09_finite_field_isomorphisms.py:13 · examples/09_finite_field_isomorphisms.py:9 · examples/30_modules_and_resolutions.py:34 · examples/30_modules_and_resolutions.py:37 · validation/unit/category/test_acceptance_workload.py:25

commalg.CurveMorphism.target

Return the target recorded by this CurveMorphism.

Detailed contract

Target curve.

(self) -> Curve[C]

noether::commalg::CurveMorphism::target · Direct Rust declaration

pub fn target(&self) -> &Curve<R>
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

Executable usage: examples/09_finite_field_isomorphisms.py:10 · examples/09_finite_field_isomorphisms.py:11 · examples/30_modules_and_resolutions.py:33 · examples/30_modules_and_resolutions.py:38 · examples/31_local_fields_and_precision.py:27 · examples/36_affine_normalization.py:16

commalg.CurveMorphism.to_json

Serialize this CurveMorphism to its canonical typed JSON representation.

Detailed contract

Serialize both endpoint curves and the checked homogeneous sections.

(self) -> str

noether::commalg::CurveMorphism::to_json · Direct Rust declaration

pub fn to_json(&self) -> Result<String, NoetherError>where R: Serialize, R::Element: Serialize,
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

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.CurveMorphism.verify

Replay and verify the mathematical evidence carried by this CurveMorphism.

Detailed contract

Recheck base-point freeness and target incidence.

(self) -> None

noether::commalg::CurveMorphism::verify · Direct Rust declaration

pub fn verify(&self) -> Result<(), VerificationError>
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

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