numthy · PadicLocalFractionalIdeal¶
17 accepted declarations. Python and Rust forms, contracts, evidence, failure boundaries, and checked usages are kept together below.
Worked example¶
The complete checked program Reproduce Fisher's order-five elliptic-function normalization uses this API directly.
# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Reproduce Fisher's order-five elliptic-function normalization."""
from noether import Q
from noether.commalg import RationalFunctionField, WeilDivisor
from noether.numthy import EllipticCurve, NthPowerClassGroup
def main() -> None:
coefficients = RationalFunctionField(Q, "lambda")
parameter = coefficients.generator()
curve = EllipticCurve(
coefficients,
[1 - parameter, -parameter, -parameter, 0, 0],
)
point = curve.point(0, 0)
point.verify_exact_order(5)
miller = curve.miller_function(point, 5)
divisor = WeilDivisor(
curve.underlying_curve,
[
(curve.origin().underlying_curve_point.as_closed_point(), 5),
(point.underlying_curve_point.as_closed_point(), -5),
],
)
function = divisor.riemann_roch_space().basis[0]
assert (function / miller.function).as_constant() is not None
evaluation_at_two = function.evaluate_at((2 * point).underlying_curve_point)
evaluation_at_four = function.evaluate_at((4 * point).underlying_curve_point)
assert evaluation_at_two.value is not None
assert evaluation_at_four.value is not None
classes = NthPowerClassGroup(coefficients, 5)
normalization = classes.class_of(evaluation_at_two.value) ** -2 * classes.class_of(
evaluation_at_four.value
)
assert normalization.is_identity()
print("order 5 verified; Riemann--Roch and Miller agree; normalization is trivial")
if __name__ == "__main__":
main()
Run it with .venv/bin/python examples/26_elliptic_descent_functions.py.
numthy.PadicLocalFractionalIdeal¶
A nonzero certified fractional lattice over a p-adic local order.
noether::numthy::PadicLocalFractionalIdeal · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/PadicLocalFractionalIdeal@1 |
Executable usage: validation/unit/infra/test_discovery.py:246 · validation/unit/numthy/test_padic_local_field_facade.py:18 · validation/unit/numthy/test_padic_local_field_facade.py:224 · validation/unit/numthy/test_padic_local_field_facade.py:239
numthy.PadicLocalFractionalIdeal.__add__¶
Add another compatible value to this value.
Detailed contract
Sum of two fractional ideals of the same certified order. Returns the argument unchanged.
noether::numthy::PadicLocalFractionalIdeal::add · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/PadicLocalFractionalIdeal@1 |
Executable usage: validation/unit/infra/test_discovery.py:211 · validation/unit/infra/test_public_api_index.py:293
numthy.PadicLocalFractionalIdeal.__contains__¶
Test whether the supplied value belongs to this object.
Detailed contract
Whether an ambient value lies in this fractional lattice.
noether::numthy::PadicLocalFractionalIdeal::contains · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/PadicLocalFractionalIdeal@1 |
Executable usage: validation/unit/infra/test_discovery.py:200
numthy.PadicLocalFractionalIdeal.__mul__¶
Multiply this value by another compatible value.
Detailed contract
Product of two fractional ideals of the same certified order.
noether::numthy::PadicLocalFractionalIdeal::mul · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/PadicLocalFractionalIdeal@1 |
Executable usage: validation/unit/infra/test_public_api_index.py:214
numthy.PadicLocalFractionalIdeal.add¶
Compute add for this PadicLocalFractionalIdeal.
Detailed contract
Sum of two fractional ideals of the same certified order. Returns the argument unchanged.
noether::numthy::PadicLocalFractionalIdeal::add · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/PadicLocalFractionalIdeal@1 |
Executable usage: validation/unit/infra/test_corpus_acceptance.py:119 · validation/unit/infra/test_macaulay2_benchmark_protocol.py:1009 · validation/unit/infra/test_macaulay2_benchmark_protocol.py:1044 · validation/unit/infra/test_macaulay2_benchmark_protocol.py:1046 · validation/unit/infra/test_macaulay2_benchmark_protocol.py:323 · validation/unit/infra/test_macaulay2_benchmark_protocol.py:957
numthy.PadicLocalFractionalIdeal.basis¶
Return the basis recorded by this PadicLocalFractionalIdeal.
Detailed contract
Canonical certified Z_p-basis of this fractional lattice.
noether::numthy::PadicLocalFractionalIdeal::basis · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/PadicLocalFractionalIdeal@1 |
Executable usage: examples/26_elliptic_descent_functions.py:28 · examples/30_modules_and_resolutions.py:27 · examples/30_modules_and_resolutions.py:28 · examples/30_modules_and_resolutions.py:29 · examples/33_simplicial_cohomology_operations.py:26 · examples/33_simplicial_cohomology_operations.py:27
numthy.PadicLocalFractionalIdeal.certified_precision¶
Return the certified precision recorded by this PadicLocalFractionalIdeal.
Detailed contract
Uniform p-adic coefficient cap at which this fractional lattice is certified.
noether::numthy::PadicLocalFractionalIdeal::certified_precision · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/PadicLocalFractionalIdeal@1 |
Executable usage: validation/unit/numthy/test_padic_local_field_facade.py:179 · validation/unit/numthy/test_padic_local_field_facade.py:238
numthy.PadicLocalFractionalIdeal.from_json¶
Deserialize and revalidate a PadicLocalFractionalIdeal from typed JSON.
Detailed contract
Restore and revalidate the fractional lattice and order action.
noether::numthy::PadicLocalFractionalIdeal::from_json · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/PadicLocalFractionalIdeal@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
numthy.PadicLocalFractionalIdeal.inverse¶
Compute inverse for this PadicLocalFractionalIdeal.
Detailed contract
Inverse fractional ideal, when the coefficient order is the maximal DVR.
noether::numthy::PadicLocalFractionalIdeal::inverse · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/PadicLocalFractionalIdeal@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
numthy.PadicLocalFractionalIdeal.is_integral¶
Test whether this PadicLocalFractionalIdeal is integral.
Detailed contract
Whether the fractional lattice is contained in its coefficient order.
noether::numthy::PadicLocalFractionalIdeal::is_integral · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/PadicLocalFractionalIdeal@1 |
Executable usage: validation/unit/numthy/test_number_field_facade.py:181 · validation/unit/numthy/test_number_field_facade.py:193 · validation/unit/numthy/test_padic_local_field_facade.py:225 · validation/unit/numthy/test_padic_local_field_facade.py:245 · validation/corpus/numthy/quadratic-field-arithmetic.py:40
numthy.PadicLocalFractionalIdeal.is_subset_of¶
Test whether this PadicLocalFractionalIdeal is subset of.
Detailed contract
Whether this ideal is contained in another ideal of the same order.
noether::numthy::PadicLocalFractionalIdeal::is_subset_of · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/PadicLocalFractionalIdeal@1 |
Executable usage: validation/unit/homalg/test_exact_submodules.py:63 · validation/unit/homalg/test_module_facade.py:117 · validation/unit/homalg/test_module_facade.py:118 · validation/unit/homalg/test_module_facade.py:119 · validation/bench/macaulay2_derived.py:560 · validation/bench/macaulay2_derived.py:602
numthy.PadicLocalFractionalIdeal.maximal_ideal_exponent¶
Compute maximal ideal exponent for this PadicLocalFractionalIdeal.
Detailed contract
Signed exponent of the unique maximal ideal, for the maximal order.
noether::numthy::PadicLocalFractionalIdeal::maximal_ideal_exponent · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/PadicLocalFractionalIdeal@1 |
Executable usage: validation/unit/numthy/test_padic_local_field_facade.py:227 · validation/unit/numthy/test_padic_local_field_facade.py:231 · validation/unit/numthy/test_padic_local_field_facade.py:234 · validation/unit/numthy/test_padic_local_field_facade.py:236
numthy.PadicLocalFractionalIdeal.mul¶
Compute mul for this PadicLocalFractionalIdeal.
Detailed contract
Product of two fractional ideals of the same certified order.
noether::numthy::PadicLocalFractionalIdeal::mul · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/PadicLocalFractionalIdeal@1 |
Executable usage: validation/parity/m1_bsgs.py:163 · validation/parity/m1_bsgs.py:164
numthy.PadicLocalFractionalIdeal.norm_valuation¶
Compute norm valuation for this PadicLocalFractionalIdeal.
Detailed contract
Signed p-valuation of the lattice norm relative to its coefficient order.
noether::numthy::PadicLocalFractionalIdeal::norm_valuation · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/PadicLocalFractionalIdeal@1 |
Executable usage: validation/unit/numthy/test_padic_local_field_facade.py:226 · validation/unit/numthy/test_padic_local_field_facade.py:246
numthy.PadicLocalFractionalIdeal.order¶
Return the order recorded by this PadicLocalFractionalIdeal.
Detailed contract
Coefficient order.
noether::numthy::PadicLocalFractionalIdeal::order · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/PadicLocalFractionalIdeal@1 |
Executable usage: examples/11_qadic_witt_vectors.py:14 · examples/12_number_field_ideals.py:13 · examples/12_number_field_ideals.py:14 · examples/12_number_field_ideals.py:17 · examples/15_groebner_twisted_cubic.py:18 · examples/19_permutation_groups.py:13
numthy.PadicLocalFractionalIdeal.scale¶
Compute scale for this PadicLocalFractionalIdeal.
Detailed contract
Scale by one nonzero ambient field element.
noether::numthy::PadicLocalFractionalIdeal::scale · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/PadicLocalFractionalIdeal@1 |
Executable usage: validation/unit/infra/test_mpi_scale_report.py:13 · validation/bench/macaulay2_normalization.py:332 · validation/bench/macaulay2_normalization.py:333 · validation/bench/macaulay2_normalization.py:337 · validation/bench/macaulay2_normalization.py:339
numthy.PadicLocalFractionalIdeal.to_json¶
Serialize this PadicLocalFractionalIdeal to its canonical typed JSON representation.
Detailed contract
Canonical typed JSON with full order identity and a revalidated basis.
noether::numthy::PadicLocalFractionalIdeal::to_json · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, flint-core |
| GIL | attached / bounded |
| Semantic ID | noether/numthy/PadicLocalFractionalIdeal@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