Skip to main content

qqideal

Exact ideals over QQ: python-flint for arithmetic, msolve for Gröbner bases, verdicts that refuse to guess. Emptiness, dimension, and 0-dimensional degree from grevlex leading ideals. No solver-mode I/O.

Install

pip install qqideal

That pulls msolveio and python-flint from PyPI. You also need a system msolve 0.10.x binary on PATH.

Usage

from qqideal import Ideal, Kind, Ring, ideal_verdict

R = Ring("x", "y")
I = Ideal(["x^2-1", "y-x"], ring=R)

verdict = ideal_verdict(I)
print(verdict.kind)       # Kind.NONEMPTY
print(verdict.dim)        # 0
print(verdict.degree)     # 2
print(verdict.certainty)  # Certainty.PROVEN

if verdict.kind is Kind.NONEMPTY:   # never `if verdict:` -- that raises
    print(I.groebner())             # (Poly('x - y', ...), Poly('y^2 - 1', ...))

Verdict.__bool__ raises TypeError. TIMEOUT and ERROR are not answers, and a truthiness test would silently fold them into one of the two that are.

opens= saturates before the test, so you can ask about the complement of a hypersurface:

ideal_verdict(["x*y", "x"], ring=R, opens=["x"]).kind   # Kind.EMPTY
Ideal(["x^2"], ring=R).radical_member("x").kind         # Kind.EMPTY: x is in the radical

Certainty

A unit ideal over Q from msolve -g is Certainty.MODULAR, not PROVEN: msolve 0.10.1 returns after its first modular prime and still prints characteristic 0. A nonempty result over Q uses a lifted -g 2 basis and is Certainty.PROVEN, as is any result over a prime field.

Saturation

I.saturate(f) is Rabinowitsch: it returns I + (u*f - 1) in the ring extended by one slack variable. Its variety is V(I) \ V(f), so emptiness, dimension, and degree are those of I : f^∞ -- but its generators are not that ideal written back in R, which would need an elimination order msolve's Gröbner mode does not offer. colon is an alias, and in v0.1 the colon is the saturation.

Not in v0.1

Primary decomposition, positive-dimensional radicals, radical computation of any kind (membership only), solver mode / -P, Macaulay2. These raise NotImplementedError rather than returning an approximation.

License

MIT © 2026 DC Posch — https://github.com/dcposch/qqideal

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qqideal-0.1.0.tar.gz (23.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qqideal-0.1.0-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file qqideal-0.1.0.tar.gz.

File metadata

  • Download URL: qqideal-0.1.0.tar.gz
  • Upload date:
  • Size: 23.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.9

File hashes

Hashes for qqideal-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6af447e88e1aed152bea3648f88be5810a0fc7e6d135360c741e64b33c8db204
MD5 d713d904beddfef489e37d61729c2ef7
BLAKE2b-256 e86b1df1f92089f71dd86c33c6416e971dc22c132ec8c448de7931e6fe65d281

See more details on using hashes here.

File details

Details for the file qqideal-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: qqideal-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.9

File hashes

Hashes for qqideal-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 48f5b2a8cc4d1553308251e8b46c450c614f95ae141a8fc016a0166c6417b62e
MD5 74197aa1728ed1fb23740af8144c410d
BLAKE2b-256 deb5ca55057e3e792ae8ee48c938fad48d8d64afce6848ad91bdd69fda19e228

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.0

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page