Skip to content

commalg · WeightedProjectiveHypersurface

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

Worked example

The complete checked program Reduce a module element and certify a minimal free resolution uses this API directly.

# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Reduce a module element and certify a minimal free resolution."""

from noether import Q
from noether.commalg import Degree, MonomialOrder, PolynomialRing
from noether.homalg import (
    FreeModule,
    ModuleElement,
    ModuleHomomorphism,
    ModuleMonomialOrder,
    PresentedModule,
    Submodule,
)
from noether.linalg import Matrix, Vector


def main() -> None:
    ring = PolynomialRing(Q, ["x", "y", "z", "w"])
    x, y, z, w = ring.generators()
    order = ModuleMonomialOrder.term_over_position(MonomialOrder.GREVLEX)

    ambient = FreeModule(ring, 2)
    first = ModuleElement(ambient, Vector.from_values(ring, [x, y]))
    second = ModuleElement(ambient, Vector.from_values(ring, [y, 1]))
    submodule = Submodule.from_generators(ambient, [first, second])
    basis = submodule.groebner_basis(order)
    reduction = basis.reduce(first + second * x)
    basis.verify()
    reduction.verify()
    assert reduction.is_member()

    target = FreeModule(ring, 1, grading_rank=1, degree_shifts=[Degree([0])])
    source = FreeModule(ring, 3, grading_rank=1, degree_shifts=[Degree([-2])] * 3)
    twisted_cubic = PresentedModule(
        ModuleHomomorphism(
            source,
            target,
            Matrix.from_rows(ring, [[x * z - y**2, x * w - y * z, y * w - z**2]]),
        )
    )
    resolution = twisted_cubic.minimal_free_resolution(order)
    resolution.verify()
    betti = resolution.graded_betti_table()
    betti.verify()
    assert betti.entries == [
        (0, Degree([0]), 1),
        (1, Degree([2]), 3),
        (2, Degree([3]), 2),
    ]
    print(f"module member certified; minimal Betti entries={betti.entries}")


if __name__ == "__main__":
    main()

Run it with .venv/bin/python examples/30_modules_and_resolutions.py.

commalg.WeightedProjectiveHypersurface

A single weighted-homogeneous hypersurface.

class WeightedProjectiveHypersurface

noether::commalg::WeightedProjectiveHypersurface · Direct Rust declaration

pub struct WeightedProjectiveHypersurface<R: 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/WeightedProjectiveHypersurface@1

commalg.WeightedProjectiveHypersurface.ambient

Return the ambient recorded by this WeightedProjectiveHypersurface.

Detailed contract

Ambient weighted projective space.

(self) -> WeightedProjectiveSpace[C]

noether::commalg::WeightedProjectiveHypersurface::ambient · Direct Rust declaration

pub fn ambient(&self) -> &WeightedProjectiveSpace<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/WeightedProjectiveHypersurface@1

Executable usage: examples/30_modules_and_resolutions.py:23 · examples/30_modules_and_resolutions.py:24 · examples/30_modules_and_resolutions.py:25 · examples/30_modules_and_resolutions.py:26 · examples/38_exact_linear_systems.py:49 · examples/38_exact_linear_systems.py:53

commalg.WeightedProjectiveHypersurface.degree

Return the degree recorded by this WeightedProjectiveHypersurface.

Detailed contract

Weighted degree of the equation.

(self) -> int

noether::commalg::WeightedProjectiveHypersurface::degree · Direct Rust declaration

pub fn 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
Semantic ID noether/commalg/WeightedProjectiveHypersurface@1

Executable usage: examples/14_weighted_polynomials.py:16 · examples/14_weighted_polynomials.py:18 · examples/15_groebner_twisted_cubic.py:15 · examples/15_groebner_twisted_cubic.py:28 · examples/31_local_fields_and_precision.py:37 · examples/33_simplicial_cohomology_operations.py:26

commalg.WeightedProjectiveHypersurface.equation

Return the equation recorded by this WeightedProjectiveHypersurface.

Detailed contract

Canonical defining equation as supplied in the ambient ring.

(self) -> Polynomial[C]

noether::commalg::WeightedProjectiveHypersurface::equation · Direct Rust declaration

pub fn equation(&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/WeightedProjectiveHypersurface@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.WeightedProjectiveHypersurface.from_json

Deserialize and revalidate a WeightedProjectiveHypersurface from typed JSON.

Detailed contract

Restore and revalidate this weighted-projective hypersurface.

(cls, value: str) -> WeightedProjectiveHypersurface[SchemeBase]

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

pub fn from_json(value: &str) -> Result<Self, NoetherError>
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/WeightedProjectiveHypersurface@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.WeightedProjectiveHypersurface.is_quasismooth

Test whether this WeightedProjectiveHypersurface is quasismooth.

Detailed contract

Whether the affine cone is smooth away from its vertex.

(self) -> bool

noether::commalg::WeightedProjectiveHypersurface::is_quasismooth · Direct Rust declaration

pub fn is_quasismooth(&self) -> Result<bool, WeightedProjectiveError>
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/WeightedProjectiveHypersurface@1

commalg.WeightedProjectiveHypersurface.jacobian_evidence

Compute jacobian evidence for this WeightedProjectiveHypersurface.

Detailed contract

Prove or disprove quasismoothness by the affine-cone Jacobian criterion. The critical ideal is saturated by the irrelevant ideal. Hence a true result says that the affine cone is smooth away from its vertex. It does not claim the coarse weighted-projective variety avoids ambient quotient singularities; those are recorded separately.

(self) -> WeightedHypersurfaceJacobianEvidence[C]

noether::commalg::WeightedProjectiveHypersurface::jacobian_evidence · Direct Rust declaration

pub fn jacobian_evidence( &self, ) -> Result<WeightedHypersurfaceJacobianEvidence<R>, WeightedProjectiveError>
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/WeightedProjectiveHypersurface@1

commalg.WeightedProjectiveHypersurface.scheme

Return the scheme recorded by this WeightedProjectiveHypersurface.

Detailed contract

Underlying weighted-projective closed subscheme.

(self) -> WeightedProjectiveScheme[C]

noether::commalg::WeightedProjectiveHypersurface::scheme · Direct Rust declaration

pub fn scheme(&self) -> &WeightedProjectiveScheme<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/WeightedProjectiveHypersurface@1

Executable usage: validation/unit/commalg/test_base_change.py:105 · validation/unit/commalg/test_base_change.py:106 · validation/unit/commalg/test_base_change.py:113 · validation/unit/commalg/test_base_change.py:3 · validation/unit/commalg/test_base_change.py:57 · validation/unit/commalg/test_scheme_facade.py:101

commalg.WeightedProjectiveHypersurface.to_json

Serialize this WeightedProjectiveHypersurface to its canonical typed JSON representation.

Detailed contract

Serialize this weighted-projective hypersurface.

(self) -> str

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

pub fn to_json(&self) -> Result<String, NoetherError>
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/WeightedProjectiveHypersurface@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