syngular

A Python Interface & Extension to Singular

https://github.com/gdelaurentis/syngular

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org, zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.8%) to scientific vocabulary

Keywords

algebraic-geometry ideal polynomial-equations polynomials ring singular
Last synced: 6 months ago · JSON representation ·

Repository

A Python Interface & Extension to Singular

Basic Info
Statistics
  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 12
Topics
algebraic-geometry ideal polynomial-equations polynomials ring singular
Created over 4 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License Citation

README.md

A Python Interface & Extension to Singular

CI Lint CI Test Coverage Docs PyPI PyPI Downloads Binder DOI Python

The syngular library is a Python 3 package for algebraic geometry computations. It provides an intuitive and object-oriented interface to Singular. Furthermore, it extends the numerical capabilities of Singular, providing a numerical solver for arbitrary systems of polynomial equations in tandem with pyadic, and its applicaibility to physics computations, where generic algorithms may be insufficient.

Interface

Python classes for 'Ideal', 'Ring' and 'QuotientRing'. Several related functions accessible as attributes or methods. Intuitive operations through magic methods, e.g. Ideal addition '+' and intersection '&'.

Extension

Multivariate solver - i.e. points on varieties over $\mathbb{F}p$, $\mathbb{Q}p$ and $\mathbb{C}$.

The function ideal.point_on_variety allows to obtain numerical solutions to arbirary systems of polynomial equations in arbitrary polynomial (quotient) rings, over any of the three above mentioned fields. The system of equations may be underconstrained, i.e. the ideal may have any dimension. The $p$-adic and complex solutions can be requested as not exact, meaning the point may lie close to but not exactly on the associated variety. This is essential for numerical computations where otherwise division-by-zero erros may occur when using exact solutions. The limitation is that Singular must be able to compute an indepednent set for the semi-numerical ideals of low dimension.

Primality test (lighter than a primary decomposition).

The function ideal.test_primality allows to test whether an ideal is prime, primary or neither, without performing a full primary decomposition. The algorithm can run also with successively looser degree bounds. It returns True if the idea is prime, False if it is not, or raises an Inconclusive exception if it cannot decide. If astuple is True, then it will return two booleans: (is_primary, is_prime). Inconclusive cases should now only happen with a Timeout on the computation.

Requirements

numpy, sympy, Singular

Installation

bash pip install -e path/to/repo

Testing

pytest --cov syngular/ --cov-report html tests/ --verbose

Quick Start

Define an ideal over a ring in two variables python from syngular import Ideal, Ring I = Ideal(Ring('0', ('x1', 'x2'), 'dp'), ['x1*x2']) You can now inspect I to see what methods and attributes are available.

Solving arbitrary systems of polynomial equations

Generate a $p$-adic solution to a system of 2 polynomial equations in 3 variables, controlling the precision to which they are solved. python field = Field("padic", 2 ** 31 - 1, 8) ring = Ring('0', ('x', 'y', 'z', ), 'dp') I = Ideal(ring, ['x*y^2+y^3-z^2', 'x^3+y^3-z^2', ])

The variety associated to I has 3 branches. In other words, the system of equations has 3 types of solutions. python (Q1, P1), (Q2, P2), (Q3, P3) = I.primary_decomposition

Generate a solution on the first branch python numerical_point = Q1.point_on_variety(field=field, directions=I.generators, valuations=(1, 1, ), ) is a dictionary of numerical values for each variable in the ring.

These are small with valuations (1, 1) python list(map(lambda string: Polynomial(string, field).subs(numerical_point), Q1.generators))

while these are O(1) with valuations (0, 0) python list(map(lambda string: Polynomial(string, field).subs(numerical_point), Q2.generators))

See arXiv:2207.10125 Fig. 1 for a graphical depiction.

Citation

If you found this library useful, please consider citing it and Singular

bibtex @inproceedings{DeLaurentis:2023qhd, author = "De Laurentis, Giuseppe", title = "{Lips: $p$-adic and singular phase space}", booktitle = "{21th International Workshop on Advanced Computing and Analysis Techniques in Physics Research}: {AI meets Reality}", eprint = "2305.14075", archivePrefix = "arXiv", primaryClass = "hep-th", reportNumber = "PSI-PR-23-14", month = "5", year = "2023" }

bibtex @misc {DGPS, title = {{\sc Singular} {4-3-0} --- {A} computer algebra system for polynomial computations}, author = {Decker, Wolfram and Greuel, Gert-Martin and Pfister, Gerhard and Sch\"onemann, Hans}, year = {2022}, howpublished = {\url{http://www.singular.uni-kl.de}}, }

Owner

  • Name: Giuseppe DeLaurentis
  • Login: GDeLaurentis
  • Kind: user
  • Location: Villigen, CH
  • Company: Paul Scherrer Institut (PSI)

Citation (CITATION.bib)

@inproceedings{DeLaurentis:2023qhd,
    author = "De Laurentis, Giuseppe",
    title = "{Lips: $p$-adic and singular phase space}",
    booktitle = "{21th International Workshop on Advanced Computing and Analysis Techniques in Physics Research}: {AI meets Reality}",
    eprint = "2305.14075",
    archivePrefix = "arXiv",
    primaryClass = "hep-th",
    reportNumber = "PSI-PR-23-14",
    month = "5",
    year = "2023"
}

@misc {DGPS,
 title = {{\sc Singular} {4-3-0} --- {A} computer algebra system for polynomial computations},
 author = {Decker, Wolfram and Greuel, Gert-Martin and Pfister, Gerhard and Sch\"onemann, Hans},
 year = {2022},
 howpublished = {\url{http://www.singular.uni-kl.de}},
}

GitHub Events

Total
  • Release event: 6
  • Push event: 91
  • Create event: 6
Last Year
  • Release event: 6
  • Push event: 91
  • Create event: 6

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 37
  • Total Committers: 2
  • Avg Commits per committer: 18.5
  • Development Distribution Score (DDS): 0.135
Top Committers
Name Email Commits
Giuseppe De Laurentis g****l@h****t 32
GDeLaurentis G****s@u****m 5
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 288 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 17
  • Total maintainers: 1
pypi.org: syngular

An Object-Oriented Python Interface and Extension to Singular

  • Versions: 17
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 288 Last month
Rankings
Dependent packages count: 10.1%
Dependent repos count: 21.5%
Average: 24.2%
Stargazers count: 25.1%
Forks count: 29.8%
Downloads: 34.4%
Maintainers (1)
Last synced: 6 months ago

Dependencies

setup.py pypi
  • mutableint *
  • numpy *
  • sympy *
.github/workflows/continuous_integration.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • stefanzweifel/git-auto-commit-action v4 composite