Skip to main content

A package for groebner basis over prime 2 written implemented in python

Project description

pygroebner

This is a package for Groebner basis over prime 2.

The pygroebner module can be used to

  • create an algebra/DGA over F2 by generators and relations;
  • calculate the generators of an ideal of annihilators;
  • calculate the subalgebra generated by some elements;
  • export the algebra/DGA to latex;
  • save the algebra/DGA in a sqlite3 database;
  • load the algebra/DGA from a sqlite3 database.

In the release version of the package, the module will be able to

  • compute the homology of a DGA;
  • export the algebra to an HTML file so that you can visualize and interact with it.

The sqlite3 database is intended to be used as a compact form to be shared among people. It also serve as the interface to my C++ groebner basis project, which runs much faster but is not suitable for a casual use when the computation is not super heavy.

Usage

>>> from pygroebner import new_alg, load_alg
>>> A = new_alg(key_mo="Lex")
>>> x = A.add_gen("x", (1, 1))
>>> y = A.add_gen("y", (1, 1))
>>> A.add_rel(x * x + y * y)
>>> A.add_rel(y ** 3)
>>> x ** 2
y^2
>>> print(A.latex_alg())
\section{Gens}

$x$ (1, 1)

$y$ (1, 1)


\section{Relations}

$x^2 = y^2$

$y^3 = 0$

>>> A.save_alg("tmp.db", "A")
>>> B = load_alg("tmp.db", "A")
>>> B.gen['x'] * B.gen['y']
xy
>>> B.gens == A.gens
True

Project details


Download files

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

Source Distribution

pygroebner-0.0.2.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

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

pygroebner-0.0.2-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file pygroebner-0.0.2.tar.gz.

File metadata

  • Download URL: pygroebner-0.0.2.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for pygroebner-0.0.2.tar.gz
Algorithm Hash digest
SHA256 984eb0a2b3bf86f1f04e8883e707edbe0730309a7c414ff82060feac72fde5bb
MD5 2c8b731991c8f73f1a103e6ed3b31e41
BLAKE2b-256 e834bde0c6caeee14e8824e1ed4a206ce9231b844d6260737fd4c5d6b5d21baf

See more details on using hashes here.

File details

Details for the file pygroebner-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: pygroebner-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for pygroebner-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 46fa683c77b054cf1be74f5ddfe91e8476f14bb8ee917c765b4f6da10872d904
MD5 d524d33845951d89ef2938159c4c879e
BLAKE2b-256 aa9f8a476fbaeb8c728eeff8415daf4edc62732e308a59e6101c896dce03826a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page