Skip to content

commalg · KahlerDifferential

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

Worked example

The complete checked program Calculate in a fixed-cap multivariate weighted power-series ring uses this API directly.

# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Calculate in a fixed-cap multivariate weighted power-series ring."""

from noether import Z
from noether.commalg import PowerSeriesRing, SeriesTruncation


def main() -> None:
    ring = PowerSeriesRing(
        Z,
        ["x", "y", "z"],
        SeriesTruncation.weighted_degree([1, 2, 3], 6),
    )
    x, y, z = ring.generators()
    assert (x**6).is_zero()
    assert not (x**2 * z + y * z).is_zero()
    value = (1 + x + y).pow(4)
    print(f"{value}; coefficient capacity <= {ring.coefficient_capacity_bound()}")


if __name__ == "__main__":
    main()

Run it with .venv/bin/python examples/17_weighted_power_series.py.

commalg.KahlerDifferential

One canonical element of an exact Kähler differential module.

class KahlerDifferential

noether::commalg::KahlerDifferential · Direct Rust declaration

pub struct KahlerDifferential<C: 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
Semantic ID noether/commalg/KahlerDifferential@1

Executable usage: validation/unit/commalg/test_kahler_differentials.py:143 · validation/unit/commalg/test_kahler_differentials.py:19 · validation/unit/commalg/test_kahler_differentials.py:34

commalg.KahlerDifferential.__add__

Add another compatible value to this value.

Detailed contract

Add two classes in the same Kähler module. Returns the argument unchanged.

(self, rhs: KahlerDifferential[D]) -> KahlerDifferential[D]

noether::commalg::KahlerDifferential::add · Direct Rust declaration

pub fn add(&self, rhs: &Self) -> Result<Self, KahlerDifferentialError>
fn add(self, rhs: &KahlerDifferential<C>) -> Self::Output
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/KahlerDifferential@1

Executable usage: validation/unit/infra/test_discovery.py:211 · validation/unit/infra/test_public_api_index.py:293

commalg.KahlerDifferential.__mul__

Multiply this value by another compatible value.

(self, scalar: QuotientElement[D]) -> KahlerDifferential[D]

noether::commalg::KahlerDifferential · Python projection

Python projection convenience over this Rust mathematical type
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/KahlerDifferential@1

Executable usage: validation/unit/infra/test_public_api_index.py:214

commalg.KahlerDifferential.__neg__

Return the additive inverse of this value.

Detailed contract

Negate this differential class.

(self) -> KahlerDifferential[D]

noether::commalg::KahlerDifferential::neg · Direct Rust declaration

pub fn neg(&self) -> Result<Self, KahlerDifferentialError>
fn neg(self) -> Self::Output
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/KahlerDifferential@1

commalg.KahlerDifferential.__rmul__

Multiply this value by a compatible value on its left.

(self, scalar: QuotientElement[D]) -> KahlerDifferential[D]

noether::commalg::KahlerDifferential · Python projection

Python projection convenience over this Rust mathematical type
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/KahlerDifferential@1

commalg.KahlerDifferential.__sub__

Subtract another compatible value from this value.

Detailed contract

Subtract another class in the same Kähler module.

(self, rhs: KahlerDifferential[D]) -> KahlerDifferential[D]

noether::commalg::KahlerDifferential::sub · Direct Rust declaration

pub fn sub(&self, rhs: &Self) -> Result<Self, KahlerDifferentialError>
fn sub(self, rhs: &KahlerDifferential<C>) -> Self::Output
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/KahlerDifferential@1

Executable usage: validation/unit/infra/test_discovery.py:212

commalg.KahlerDifferential.coordinates

Canonical coordinates modulo the Jacobian relations.

Detailed contract

Canonical normal-form coordinates in the ordered dx_i basis.

(self) -> ModuleElement[QuotientRing[RationalField]] | ModuleElement[QuotientRing[FiniteField]]

noether::commalg::KahlerDifferential::coordinates · Direct Rust declaration

pub fn coordinates(&self) -> &ModuleElement<QuotientRing<PolynomialRing<C>>>
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/KahlerDifferential@1

Executable usage: validation/unit/commalg/test_base_change.py:114 · validation/unit/commalg/test_base_change.py:54 · validation/unit/commalg/test_base_change.py:62 · validation/unit/commalg/test_kahler_differentials.py:131 · validation/unit/commalg/test_polynomial_ideal_facade.py:171 · validation/unit/commalg/test_quotient_facade.py:142

commalg.KahlerDifferential.differentials

The differential module containing this element.

Detailed contract

Module of Kähler differentials containing this class.

(self) -> KahlerDifferentials[D]

noether::commalg::KahlerDifferential::differentials · Direct Rust declaration

pub fn differentials(&self) -> &KahlerDifferentials<C>
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/KahlerDifferential@1

Executable usage: validation/unit/commalg/test_kahler_differentials.py:3 · validation/bench/macaulay2_core.py:1548 · validation/bench/macaulay2_core.py:1557 · validation/bench/macaulay2_core.py:1560 · validation/bench/macaulay2_core.py:1563

commalg.KahlerDifferential.from_json

Deserialize and verify a differential over Q or a finite field.

Detailed contract

Deserialize and reject a noncanonical or mismatched representative.

(cls, value: str) -> KahlerDifferential[RationalField] | KahlerDifferential[FiniteField]

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

pub fn from_json(value: &str) -> Result<Self, NoetherError>where C: for<'de> Deserialize<'de>, C::Element: for<'de> Deserialize<'de>,
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/KahlerDifferential@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.KahlerDifferential.is_zero

Whether this differential is zero in Omega_{A/k}.

Detailed contract

Whether this class is zero in Omega_{A/C}.

(self) -> bool

noether::commalg::KahlerDifferential::is_zero · Direct Rust declaration

pub fn is_zero(&self) -> bool
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/KahlerDifferential@1

Executable usage: examples/17_weighted_power_series.py:16 · examples/17_weighted_power_series.py:17 · examples/39_kahler_differentials.py:20 · validation/unit/commalg/test_graded_commutative_facade.py:26 · validation/unit/commalg/test_kahler_differentials.py:113 · validation/unit/commalg/test_kahler_differentials.py:38

commalg.KahlerDifferential.scalar_mul

Multiply this differential by a class in A.

Detailed contract

Multiply this class by one element of its affine algebra.

(self, scalar: QuotientElement[D]) -> KahlerDifferential[D]

noether::commalg::KahlerDifferential::scalar_mul · Direct Rust declaration

pub fn scalar_mul( &self, scalar: &QuotientElement<PolynomialRing<C>>, ) -> Result<Self, KahlerDifferentialError>
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/KahlerDifferential@1

Executable usage: validation/unit/commalg/test_intersection_theory.py:30 · validation/unit/commalg/test_intersection_theory.py:37 · validation/unit/commalg/test_intersection_theory.py:51 · validation/unit/commalg/test_power_series_facade.py:152 · validation/unit/numthy/test_elliptic_curve_facade.py:36 · validation/bench/macaulay2_derived.py:693

commalg.KahlerDifferential.to_json

Serialize this differential and its exact context as typed JSON.

Detailed contract

Serialize the module and canonical representative.

(self) -> str

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

pub fn to_json(&self) -> Result<String, NoetherError>where C: Serialize, C::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
Semantic ID noether/commalg/KahlerDifferential@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.KahlerDifferential.verify

Verify the containing module and the canonical coordinate representative.

Detailed contract

Reverify the ambient Kähler module and replay this canonical class.

(self) -> None

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

pub fn verify(&self) -> Result<(), KahlerDifferentialError>
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/KahlerDifferential@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