PySymmPol - Symmetric Polynomials

PySymmPol - Symmetric Polynomials - Published in JOSS (2024)

https://github.com/thraraujo/pysymmpol

Science Score: 98.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 6 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: arxiv.org, springer.com, joss.theoj.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

combinatorics jupyerlab physics python

Scientific Fields

Mathematics Computer Science - 37% confidence
Last synced: 4 months ago · JSON representation ·

Repository

A Python package for calculating and performing basic manipulations on symmetric polynomials.

Basic Info
Statistics
  • Stars: 4
  • Watchers: 1
  • Forks: 1
  • Open Issues: 2
  • Releases: 3
Topics
combinatorics jupyerlab physics python
Created almost 2 years ago · Last pushed over 1 year ago
Metadata Files
Readme Contributing License Citation

README.md

pySymmPol: Symmetric Polynomials

DOI

Static Badge Static Badge Static Badge Static Badge Static Badge License: GPLv3

This Python package is designed for the manipulation of various symmetric polynomials or functions. It includes the following types:

1. Complete homogeneous Symmetric Functions
2. Elementary symmetric polynomials
3. Monomial symmetric polynomials 
4. Schur polynomials
5. Hall-Littlewood polynomials

Additionally, the package contains a module with basic functionalities for manipulating integer partitions and Young diagrams.

Read our Statement of need here.

Tutorials can be found in the documentation page.

Dependencies

This package has been tested with the following versions: - Python >= 3.11 - SymPy >= 1.11 - NumPy >= 1.26.2

Installation

The package can be installed with pip: bash $ pip install pysymmpol

Basic Usage

The PySymmPol package has seven main classes for manipulating various symmetric polynomials.

YoungDiagram and ConjugacyClass

For the construction and manipulation of Young diagrams, we need to import the YoungDiagram and the ConjugacyClass classes. python from pysymmpol import YoungDiagram, ConjugacyClass The distinction between these two classes lies in the representations of the diagrams they handle. The YoungDiagram class represents diagrams using a monotonic decreasing sequence, while the ConjugacyClass class represents them as a sequence representing the cycle of the symmetric group SnSn​. For example, let's consider the partition (3,2,1), which is represented as a tuple in the YoungDiagram class and as a dictionary in the ConjugacyClass class {1: 1, 2: 1, 3: 1}, respectively. python young = YoungDiagram((3,2,1)) conjugacy = ConjugacyClass({1: 1, 2: 1, 3: 1}) Both objects describe the same mathematical entity, the partition 6=3+2+1. In fact, we have the usual pictorial representation ```python young.draw_diagram(4)

conjugacy.draw_diagram(4) ``` that give the same output (the argument 4 means that we draw the octothorpe, and there are 4 other symbols available).

```python

#

#

``` Further details on the other functionalities can be found in the tutorial.

Homogeneous and Elementary Polynomials

These classes can be initialized as python from pysymmpol import HomogeneousPolynomial, ElementaryPolynomial from pysymmpol.utils import create_miwa We also imported the function create_miwa from the utils module for convenience. Now, let's create the polynomials at level n=3. We can instantiate them and find their explicit expressions using the explicit(t) method, where t represents the Miwa coordinates. The block ```python n = 3 t = create_miwa(n)

homogeneous = HomogeneousPolynomial(n) elementary = ElementaryPolynomial(n) print(f"homogeneous: {homogeneous.explicit(t)}") print(f"elementary: {elementary.explicit(t)}") gives the output homogeneous: t13/6 + t1*t2 + t3 elementary: t13/6 - t1*t2 + t3 ```

Schur Polynomials

To create Schur polynomials, we first need to instantiate a partition before defining the polynomial itself. Let's use the Young diagram we considered a few lines above, then python from pysymmpol import YoungDiagram from pysymmpol import SchurPolynomial from pysymmpol.utils import create_miwa The YoungDiagram class includes a getter method for retrieving the number of boxes in the diagram, which we utilize to construct the Miwa coordinates. Subsequently, the SchurPolynomial class is instantiated using the Young diagram. Then ```python young = YoungDiagram((3,2,1)) t = create_miwa(young.boxes)

schur = SchurPolynomial(young)

print(f"schur: {schur.explicit(t)}") gives schur: t16/45 - t13t3/3 + t1t5 - t3**2 ``` The documentation and tutorial contain examples demonstrating how to find skew-Schur polynomials.

Monomial Symmetric Polynomials

For Monomial symmetric polynomials, we have a similar structure. python from pysymmpol import YoungDiagram from pysymmpol import MonomialPolynomial from pysymmpol.utils import create_x_coord The only difference is the function create_x_coord from the utils module. Therefore, ```python young = YoungDiagram((3,2,1))

n = 3 x = createxcoord(n)

monomial = MonomialPolynomial(young)

print(f"monomial: {monomial.explicit(x)}") gives the output monomial: x1x2x3(x12x2 + x12x3 + x1x22 + x1x32 + x22x3 + x2x3*2) ```

Hall-Littlewood Polynomials

In addition to partitions, for the Hall-Littlewood polynomials, we also require the deformation parameter Q (as t has been used to denote the Miwa coordinates). python from sympy import Symbol from pysymmpol import YoungDiagram from pysymmpol import HallLittlewoodPolynomial from pysymmpol.utils import create_x_coord The method explicit(x, Q) needs another argument. Finally, the code ```python Q = Symbol('Q') young = YoungDiagram((3,2,1))

n = 3 x = createxcoord(n)

hall_littlewood = HallLittlewoodPolynomial(young)

print(f"hall-littlewood: {hall_littlewood.explicit(x, Q)}") gives hall-littlewood: x1x2x3(-Q2x1x2x3 - Qx1x2x3 + x12x2 + x12x3 + x1x22 + 2x1x2x3 + x1x32 + x22x3 + x2x3**2) ```

References

Here are some recommended resources covering symmetric polynomials, combinatorics, and their significance in theoretical physics:

Citation & Contributing

If you found this package useful in your research, please consider citing the companion paper available here: arxiv.org/abs/2403.13580. @article{Araujo:2024piv, author = "Araujo, Thiago", title = "{PySymmPol: Symmetric Polynomials in Python}", eprint = "2403.13580", archivePrefix = "arXiv", primaryClass = "math.CO", doi = "10.21105/joss.06724", journal = "J. Open Source Softw.", volume = "9", pages = "6724", year = "2024" } Feeling like contributing? Fork the project and open a pull request with your modifications. Found a bug? Just open a GitHub issue.

Owner

  • Name: Thiago Araujo
  • Login: thraraujo
  • Kind: user

JOSS Publication

PySymmPol - Symmetric Polynomials
Published
May 30, 2024
Volume 9, Issue 97, Page 6724
Authors
Thiago Araujo ORCID
Institute for Theoretical Physics, UNESP, R. Dr. Bento Teobaldo Ferraz, 271, Bloco II, Barra-Funda, CEP 01140-070, São Paulo/SP, Brazil., Institute of Physics, São Paulo University, Rua do Matão 1371 - CEP 05508-090 Cidade Universitária, São Paulo/SP, Brazil
Editor
Sophie Beck ORCID
Tags
Combinatorics Physics

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: 'pySymmPol: Symmetric Polynomials'
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Thiago
    family-names: Rocha Araujo
    email: tr.araujo@unesp.br
    affiliation: 'Institute for Theoretical Physics, UNESP'
    orcid: 'https://orcid.org/0000-0001-5792-2530'
identifiers:
  - type: other
    value: 'arxiv: 2403.13580 [math.CO]'
    description: arXiv
  - type: doi
    value: 10.48550/arXiv.2403.13580
    description: Arxiv-issued DOI
  - type: doi
    value: 10.5281/zenodo.11214736
    description: Zenodo-issued Doi
repository-code: 'https://github.com/thraraujo/pysymmpol'
keywords:
  - python
  - combinatorics
  - high energy physics
license: GPL-3.0
version: v0.1.2

GitHub Events

Total
  • Watch event: 3
Last Year
  • Watch event: 3

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 96
  • Total Committers: 2
  • Avg Commits per committer: 48.0
  • Development Distribution Score (DDS): 0.01
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
thraraujo t****o@g****m 95
Eliot Robson e****4@g****m 1

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 8
  • Total pull requests: 1
  • Average time to close issues: 3 days
  • Average time to close pull requests: about 5 hours
  • Total issue authors: 3
  • Total pull request authors: 1
  • Average comments per issue: 2.5
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • 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
  • eliotwrobson (5)
  • thraraujo (2)
  • AnnikaStein (1)
Pull Request Authors
  • eliotwrobson (2)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 16 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 3
  • Total maintainers: 1
pypi.org: pysymmpol

A python package for manipulation of symmetric polynomials.

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 16 Last month
Rankings
Dependent packages count: 9.7%
Average: 36.8%
Dependent repos count: 63.9%
Maintainers (1)
Last synced: 4 months ago

Dependencies

.github/workflows/static.yml actions
  • actions/checkout v4 composite
  • actions/configure-pages v4 composite
  • actions/deploy-pages v4 composite
  • actions/upload-pages-artifact v3 composite
poetry.lock pypi
  • colorama 0.4.6
  • iniconfig 2.0.0
  • mpmath 1.3.0
  • numpy 1.26.4
  • packaging 24.0
  • pluggy 1.4.0
  • pytest 8.1.1
  • sympy 1.12
pyproject.toml pypi
  • pytest ^8.1.1 develop
  • numpy ^1.26.4
  • python ^3.12
  • sympy ^1.12