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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

Supported by

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