geometry · Polytope¶
17 accepted declarations. Python and Rust forms, contracts, evidence, failure boundaries, and checked usages are kept together below.
Worked example¶
The complete checked program Solve an underdetermined rational system and verify its affine space uses this API directly.
# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Solve an underdetermined rational system and verify its affine space."""
from noether import Q
from noether.linalg import Matrix, Vector
def main() -> None:
matrix = Matrix.from_rows(Q, [[1, 2, 3], [2, 4, 6]])
right_hand_side = Vector.from_values(Q, [1, 2])
solutions = matrix.solve(right_hand_side)
solutions.verify()
assert matrix @ solutions.particular == right_hand_side
assert solutions.dimension == 2
print(f"particular={solutions.particular}; nullity={solutions.dimension}")
if __name__ == "__main__":
main()
Run it with .venv/bin/python examples/03_exact_linear_systems.py.
geometry.Polytope¶
A nonempty bounded convex polytope with exact rational coordinates.
noether::geometry::Polytope · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, geom-core, convex-hull |
| GIL | attached / bounded |
| Semantic ID | noether/geometry/Polytope@1 |
Executable usage: validation/unit/geometry/test_acceptance_workload.py:61 · validation/unit/geometry/test_acceptance_workload.py:62 · validation/unit/geometry/test_acceptance_workload.py:63 · validation/unit/geometry/test_acceptance_workload.py:66 · validation/unit/geometry/test_acceptance_workload.py:9 · validation/unit/geometry/test_polytope_facade.py:10
geometry.Polytope.ambient_dimension¶
Ambient coordinate dimension.
noether::geometry::Polytope::ambient_dimension · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, geom-core, convex-hull |
| GIL | attached / bounded |
| Semantic ID | noether/geometry/Polytope@1 |
Executable usage: validation/unit/commalg/test_kahler_differentials.py:98 · validation/unit/geometry/test_geometry_facade.py:23 · validation/unit/geometry/test_geometry_facade.py:46 · validation/unit/geometry/test_polytope_facade.py:30 · validation/unit/linalg/test_exact_linear_algebra_facade.py:152 · validation/unit/linalg/test_exact_linear_algebra_facade.py:153
geometry.Polytope.dimension¶
Affine dimension.
Detailed contract
Affine dimension of the polytope.
noether::geometry::Polytope::dimension · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, geom-core, convex-hull |
| GIL | attached / bounded |
| Semantic ID | noether/geometry/Polytope@1 |
Executable usage: examples/03_exact_linear_systems.py:15 · examples/03_exact_linear_systems.py:16 · examples/15_groebner_twisted_cubic.py:14 · examples/15_groebner_twisted_cubic.py:28 · examples/27_weight_characters.py:25 · examples/34_finite_group_cohomology.py:13
geometry.Polytope.f_vector¶
Face counts (f_-1, f_0, ..., f_dimension).
Detailed contract
Face counts (f_-1, f_0, ..., f_dimension).
noether::geometry::Polytope::f_vector · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, geom-core, convex-hull |
| GIL | attached / bounded |
| Semantic ID | noether/geometry/Polytope@1 |
Executable usage: examples/25_exact_geometry.py:13 · examples/25_exact_geometry.py:15 · validation/unit/geometry/test_polytope_facade.py:38 · validation/unit/geometry/test_polytope_facade.py:79 · validation/parity/polyhedral/test_convex_hull_parity.py:11 · validation/parity/polyhedral/test_convex_hull_parity.py:154
geometry.Polytope.face_lattice¶
Faces as (dimension, vertex_indices), including the empty face.
Detailed contract
Complete face lattice and its Hasse covering relation.
noether::geometry::Polytope::face_lattice · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, geom-core, convex-hull |
| GIL | released |
| Semantic ID | noether/geometry/Polytope@1 |
Executable usage: validation/unit/geometry/test_acceptance_workload.py:86 · validation/unit/geometry/test_polytope_facade.py:80 · validation/parity/polyhedral/test_convex_hull_parity.py:11 · validation/parity/polyhedral/test_convex_hull_parity.py:213 · validation/parity/polyhedral/test_convex_hull_parity.py:224 · validation/corpus/geometry/order-four-permutahedron.py:19
geometry.Polytope.face_lattice_covers¶
Hasse covering pairs indexing face_lattice().
noether::geometry::Polytope · Python projection
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, geom-core, convex-hull |
| GIL | released |
| Semantic ID | noether/geometry/Polytope@1 |
Executable usage: validation/unit/geometry/test_acceptance_workload.py:87 · validation/parity/polyhedral/test_convex_hull_parity.py:232 · validation/corpus/geometry/order-three-permutahedron.py:25
geometry.Polytope.facets¶
Exact ambient inequalities (normal, rhs).
Detailed contract
Exact ambient facet inequalities. The kernel’s inequalities for a lower-dimensional polytope live in a deterministic affine coordinate frame, not the original ambient coordinates. This method fails in that case instead of mislabelling them; incidence and the face lattice remain available.
noether::geometry::Polytope::facets · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, geom-core, convex-hull |
| GIL | attached / bounded |
| Semantic ID | noether/geometry/Polytope@1 |
Executable usage: validation/unit/combinatorics/test_poset.py:132 · validation/unit/geometry/test_acceptance_workload.py:60 · validation/unit/geometry/test_acceptance_workload.py:79 · validation/unit/geometry/test_polytope_facade.py:39 · validation/unit/geometry/test_polytope_facade.py:82 · validation/unit/topology/test_simplicial_complex_facade.py:59
geometry.Polytope.from_halfspaces¶
Construct a bounded polytope from normal_i · x <= rhs_i.
Detailed contract
Construct a bounded polytope from inequalities normal_i · x <= rhs_i. Empty, infeasible, and unbounded regions fail rather than being represented by a bounded type.
noether::geometry::Polytope::from_halfspaces · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, geom-core, convex-hull |
| GIL | released |
| Semantic ID | noether/geometry/Polytope@1 |
Executable usage: validation/unit/geometry/test_acceptance_workload.py:61 · validation/unit/geometry/test_acceptance_workload.py:62 · validation/unit/geometry/test_polytope_facade.py:48 · validation/unit/geometry/test_polytope_facade.py:69 · validation/unit/geometry/test_polytope_facade.py:71 · validation/unit/geometry/test_polytope_facade.py:73
geometry.Polytope.from_json¶
Deserialize and recompute every derived invariant.
Detailed contract
Deserialize and recompute every derived polytope invariant.
noether::geometry::Polytope::from_json · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, geom-core, convex-hull |
| GIL | attached / bounded |
| Semantic ID | noether/geometry/Polytope@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
geometry.Polytope.from_vertices¶
Construct the exact convex hull of rational vertices.
Detailed contract
Construct the convex hull of exact rational points.
noether::geometry::Polytope::from_vertices · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, geom-core, convex-hull |
| GIL | released |
| Semantic ID | noether/geometry/Polytope@1 |
Executable usage: validation/unit/geometry/test_acceptance_workload.py:62 · validation/unit/geometry/test_acceptance_workload.py:63 · validation/unit/geometry/test_acceptance_workload.py:85 · validation/unit/geometry/test_acceptance_workload.py:86 · validation/unit/geometry/test_acceptance_workload.py:87 · validation/unit/geometry/test_polytope_facade.py:54
geometry.Polytope.is_facet¶
Whether an exact ambient inequality defines a facet.
Detailed contract
Whether an ambient inequality defines a facet.
noether::geometry::Polytope::is_facet · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, geom-core, convex-hull |
| GIL | attached / bounded |
| Semantic ID | noether/geometry/Polytope@1 |
Executable usage: validation/unit/geometry/test_polytope_facade.py:43 · validation/parity/polyhedral/test_convex_hull_parity.py:12 · validation/parity/polyhedral/test_convex_hull_parity.py:213 · validation/parity/polyhedral/test_convex_hull_parity.py:221 · validation/parity/polyhedral/test_convex_hull_parity.py:222 · validation/corpus/geometry/antichain-probability-polytope.py:28
geometry.Polytope.is_full_dimensional¶
Whether the affine hull is the whole ambient space.
noether::geometry::Polytope::is_full_dimensional · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, geom-core, convex-hull |
| GIL | attached / bounded |
| Semantic ID | noether/geometry/Polytope@1 |
Executable usage: validation/unit/geometry/test_polytope_facade.py:31 · validation/corpus/geometry/order-three-permutahedron.py:16 · validation/corpus/geometry/oscar-pentagon-face-structure.py:31
geometry.Polytope.is_vertex¶
Whether an exact ambient point is a vertex.
Detailed contract
Whether an ambient rational point is a vertex.
noether::geometry::Polytope::is_vertex · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, geom-core, convex-hull |
| GIL | attached / bounded |
| Semantic ID | noether/geometry/Polytope@1 |
Executable usage: examples/25_exact_geometry.py:14 · validation/unit/geometry/test_polytope_facade.py:41 · validation/unit/geometry/test_polytope_facade.py:42 · validation/parity/polyhedral/test_convex_hull_parity.py:12 · validation/parity/polyhedral/test_convex_hull_parity.py:213 · validation/parity/polyhedral/test_convex_hull_parity.py:216
geometry.Polytope.to_json¶
Serialize exact defining vertices and semantic identity.
Detailed contract
Serialize the type identity and exact defining vertices.
noether::geometry::Polytope::to_json · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, geom-core, convex-hull |
| GIL | attached / bounded |
| Semantic ID | noether/geometry/Polytope@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
geometry.Polytope.verify¶
Recompute the exact hull and all derived combinatorics.
Detailed contract
Reconstruct from the defining vertices and compare every derived value.
noether::geometry::Polytope::verify · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, geom-core, convex-hull |
| GIL | released |
| Semantic ID | noether/geometry/Polytope@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
geometry.Polytope.vertex_facet_incidence¶
Vertex indices lying on each facet.
noether::geometry::Polytope::vertex_facet_incidence · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, geom-core, convex-hull |
| GIL | attached / bounded |
| Semantic ID | noether/geometry/Polytope@1 |
Executable usage: validation/unit/geometry/test_acceptance_workload.py:79 · validation/unit/geometry/test_acceptance_workload.py:85 · validation/unit/geometry/test_polytope_facade.py:40 · validation/parity/polyhedral/test_convex_hull_parity.py:193 · validation/corpus/geometry/order-three-permutahedron.py:20 · validation/corpus/geometry/oscar-pentagon-face-structure.py:35
geometry.Polytope.vertices¶
Exact vertices as fractions.Fraction values.
Detailed contract
Lexicographically ordered vertices in ambient coordinates.
noether::geometry::Polytope::vertices · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, geom-core, convex-hull |
| GIL | attached / bounded |
| Semantic ID | noether/geometry/Polytope@1 |
Executable usage: examples/25_exact_geometry.py:15 · validation/unit/geometry/test_acceptance_workload.py:62 · validation/unit/geometry/test_acceptance_workload.py:76 · validation/unit/geometry/test_polytope_facade.py:32 · validation/unit/geometry/test_polytope_facade.py:54 · validation/unit/infra/test_magma_release_protocol.py:256