Skip to content

commalg · QuotientElement

16 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.QuotientElement

An exact quotient element retaining its canonical ambient lift.

class QuotientElement

noether::commalg::QuotientElement · Direct Rust declaration

pub struct QuotientElement<S: CommutativeRing> { /* 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/QuotientElement@1

Executable usage: validation/unit/commalg/test_quotient_facade.py:13 · validation/unit/commalg/test_quotient_facade.py:42 · validation/unit/commalg/test_quotient_facade.py:61 · validation/unit/commalg/test_quotient_facade.py:70 · validation/unit/infra/test_discovery.py:42 · validation/unit/infra/test_public_api_index.py:119

commalg.QuotientElement.__add__

Add another compatible value to this value.

Detailed contract

Returns the argument unchanged.

(self, other: QuotientElement[C]) -> QuotientElement[C]

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

fn add(self, rhs: &QuotientElement<PolynomialRing<R>>) -> 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 attached / bounded
Semantic ID noether/commalg/QuotientElement@1

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

commalg.QuotientElement.__mul__

Multiply this value by another compatible value.

(self, other: QuotientElement[C]) -> QuotientElement[C]

noether::commalg::QuotientElement::mul · Direct Rust declaration

fn mul(self, rhs: &QuotientElement<PolynomialRing<R>>) -> 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 attached / bounded
Semantic ID noether/commalg/QuotientElement@1

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

commalg.QuotientElement.__neg__

Return the additive inverse of this value.

(self) -> QuotientElement[C]

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

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 attached / bounded
Semantic ID noether/commalg/QuotientElement@1

commalg.QuotientElement.__pow__

Raise this value to the supplied power.

(self, exponent: int, modulus: None=None) -> QuotientElement[C]

noether::commalg::QuotientElement · 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/QuotientElement@1

commalg.QuotientElement.__sub__

Subtract another compatible value from this value.

(self, other: QuotientElement[C]) -> QuotientElement[C]

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

fn sub(self, rhs: &QuotientElement<PolynomialRing<R>>) -> 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 attached / bounded
Semantic ID noether/commalg/QuotientElement@1

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

commalg.QuotientElement.__truediv__

Divide this value by another compatible value.

(self, other: QuotientElement[C]) -> QuotientElement[C]

noether::commalg::QuotientElement · 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/QuotientElement@1

commalg.QuotientElement.from_json

Deserialize and revalidate a QuotientElement from typed JSON.

Detailed contract

Deserialize and reject a noncanonical or context-incompatible lift.

(cls, value: str) -> QuotientElement[CoefficientRing]

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

pub fn from_json(value: &str) -> Result<Self, NoetherError>where R: for<'de> Deserialize<'de>, R::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 attached / bounded
Semantic ID noether/commalg/QuotientElement@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.QuotientElement.inverse

Compute inverse for this QuotientElement.

Detailed contract

Return the multiplicative inverse when exact ideal evidence proves it exists.

(self) -> QuotientElement[C]

noether::commalg::QuotientElement::inverse · Direct Rust declaration

pub fn inverse(&self) -> Result<Self, QuotientError>
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/QuotientElement@1

Executable usage: examples/distributed/f2_linear_algebra.py:37 · examples/distributed/f2_linear_algebra.py:39 · validation/unit/commalg/test_context_tower_workload.py:121 · validation/unit/commalg/test_context_tower_workload.py:122 · validation/unit/commalg/test_context_tower_workload.py:75 · validation/unit/commalg/test_context_tower_workload.py:77

commalg.QuotientElement.is_one

Test whether this QuotientElement is one.

Detailed contract

Whether this is the multiplicative identity of its quotient context.

(self) -> bool

noether::commalg::QuotientElement::is_one · Direct Rust declaration

pub fn is_one(&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/QuotientElement@1

Executable usage: validation/unit/commalg/test_rational_function_facade.py:31 · validation/unit/commalg/test_residue_ring_facade.py:25 · validation/unit/numthy/test_number_field_facade.py:29 · validation/corpus/commalg/evolution-algebra-isomorphism.py:34 · validation/corpus/numthy/diagonal-quadric-local-density-sums.py:36

commalg.QuotientElement.is_unit

Test whether this QuotientElement is unit.

Detailed contract

Decide whether this element is a unit using exact ideal evidence.

(self) -> bool

noether::commalg::QuotientElement::is_unit · Direct Rust declaration

pub fn is_unit(&self) -> Result<bool, QuotientError>
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/QuotientElement@1

Executable usage: validation/unit/commalg/test_local_algebra.py:44 · validation/unit/commalg/test_local_algebra.py:59 · validation/unit/commalg/test_prime_localization.py:25 · validation/unit/commalg/test_prime_localization.py:26 · validation/unit/commalg/test_prime_localization.py:47 · validation/unit/commalg/test_quotient_facade.py:51

commalg.QuotientElement.is_zero

Test whether this QuotientElement is zero.

Detailed contract

Whether this is the additive identity of its quotient context.

(self) -> bool

noether::commalg::QuotientElement::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/QuotientElement@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.QuotientElement.lift

Return the lift recorded by this QuotientElement.

Detailed contract

Explicit canonical normal-form lift to the ambient polynomial ring.

(self) -> Polynomial[C]

noether::commalg::QuotientElement::lift · Direct Rust declaration

pub fn lift(&self) -> &Polynomial<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
Semantic ID noether/commalg/QuotientElement@1

Executable usage: examples/11_qadic_witt_vectors.py:12 · examples/11_qadic_witt_vectors.py:13 · examples/11_qadic_witt_vectors.py:14 · examples/11_qadic_witt_vectors.py:15 · validation/unit/commalg/test_acceptance_workload.py:33 · validation/unit/commalg/test_acceptance_workload.py:34

commalg.QuotientElement.multihomogeneous_degree

Compute multihomogeneous degree for this QuotientElement.

Detailed contract

Degree of a homogeneous element in the complete quotient grading.

(self) -> Degree | None

noether::commalg::QuotientElement::multihomogeneous_degree · Direct Rust declaration

pub fn multihomogeneous_degree(&self) -> Result<Option<Degree>, QuotientError>
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/QuotientElement@1

Executable usage: validation/unit/commalg/test_polynomial_facade.py:333 · validation/unit/commalg/test_quotient_facade.py:141 · validation/unit/commalg/test_quotient_facade.py:148 · validation/unit/commalg/test_quotient_facade.py:39

commalg.QuotientElement.ring

Return the ring recorded by this QuotientElement.

Detailed contract

Exact quotient context containing this element.

(self) -> QuotientRing[C]

noether::commalg::QuotientElement::ring · Direct Rust declaration

pub fn ring(&self) -> &QuotientRing<PolynomialRing<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
Semantic ID noether/commalg/QuotientElement@1

Executable usage: examples/11_qadic_witt_vectors.py:3 · examples/13_chinese_remainder_theorem.py:10 · examples/13_chinese_remainder_theorem.py:12 · examples/13_chinese_remainder_theorem.py:9 · examples/14_weighted_polynomials.py:10 · examples/14_weighted_polynomials.py:11

commalg.QuotientElement.to_json

Serialize this QuotientElement to its canonical typed JSON representation.

Detailed contract

Serialize the quotient context and canonical normal-form lift.

(self) -> str

noether::commalg::QuotientElement::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
Semantic ID noether/commalg/QuotientElement@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