Metadata-Version: 2.4
Name: GroupsMath
Version: 1.0.0
Summary: The educational Python library for Group Theory
Author-email: Mario Sultan Romero <mariosultan.uem@gmail.com>
License: PolyForm Strict License 1.0.0.
Project-URL: Homepage, https://github.com/MarioSultan/GroupsMath
Project-URL: Documentation, https://groupsmath.readthedocs.io/en/latest/
Project-URL: Issues, https://github.com/MarioSultan/GroupsMath/issues
Keywords: math,mathematics,algebra,abstract-algebra,group-theory,finite-groups,sylow,quotient-groups,automorphisms,group,groups,group theory,finte groups,finite group theory,finite-group-theory
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Education
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: matplotlib>=3.0.0
Requires-Dist: numpy>=1.20.0
Dynamic: license-file

# GroupsMath – v1.0.0

[![PyPI Downloads](https://img.shields.io/pypi/dm/groupsmath)](https://pypistats.org/packages/groupsmath)
[![PyPI Version](https://img.shields.io/pypi/v/groupsmath?color=2A646E)](https://pypi.org/project/groupsmath/)
[![Python Versions](https://img.shields.io/pypi/pyversions/groupsmath?color=2A646E)](https://pypi.org/project/groupsmath/)
![Last Commit](https://img.shields.io/github/last-commit/MarioSultan/groupsmath?color=2A646E)
<!-- ![GitHub Stars](https://img.shields.io/github/stars/MarioSultan/groupsmath?style=social) -->


![GroupsMath Logo](https://raw.githubusercontent.com/MarioSultan/GroupsMath/main/logo.png)


**GroupsMath** is an open-source Python library for exploring and computing with mathematical groups. It lets you construct groups, perform operations on their elements, and study their structure through concepts such as subgroups, quotient groups, products, automorphisms, and conjugacy classes. Its goal is to make group theory **accessible, intuitive, and computational**, connecting abstract mathematics with hands-on experimentation in Python.


![Examples](https://raw.githubusercontent.com/MarioSultan/GroupsMath/main/imgs/examples.png)


📚 Visit here the [GroupsMath official documentation](https://groupsmath.readthedocs.io/en/latest/).


---

[![Launch Binder](https://raw.githubusercontent.com/MarioSultan/GroupsMath/main/imgs/here.png)](https://mybinder.org/v2/gh/MarioSultan/GroupsMath/main?labpath=GroupsMath_demo.ipynb)

---

## Installation

GroupsMath is currently distributed through [PyPI](https://pypi.org/project/GroupsMath/) and [Github](https://github.com/MarioSultan/GroupsMath). To install the latest released version from PyPI, run the following in your preferred terminal (VS code, Jupyter, ...).

```bash
pip install groupsmath
```

Also, you can install the latest development version directly from GitHub:

```bash
pip install git+https://github.com/MarioSultan/GroupsMath.git
```

or visit https://github.com/MarioSultan/GroupsMath and download all the files.

---

## Quick start

### A program in GroupsMath
```python
import groupsmath as gm
from groupsmath.precooked import S3, A4, C3

#Calculating properties of the group S3

print(S3.order())               # 6
print(S3.elements)              # ['e', '(23)', '(12)', '(123)', '(132)', '(13)']
print(S3.element_orders())      # [1, 2, 2, 3, 3, 2]
print(S3.is_cyclic())           # False
print(S3.is_abelian())          # False

#Generating Cayley table of S3

S3.cayley_table()

#Generating the Cayley table of the direct product A4xC3

G = A4 * C3                     # Product group
G.cayley_table()

#Generating the group of units U1200 and its Cayley table

U1200 = gm.units_group(1200)    # Create the group
U1200.cayley_table()
```

### Cayley table of $S_3$
![S3 table](https://raw.githubusercontent.com/MarioSultan/GroupsMath/main/imgs/cayley_S3.png)

### Cayley table of $A_4\times C_3$
![A4xC3 table](https://raw.githubusercontent.com/MarioSultan/GroupsMath/main/imgs/cayley_A4xC3.png)

### Cayley table of $U_{1200}$
![U1200 table](https://raw.githubusercontent.com/MarioSultan/GroupsMath/main/imgs/cayley_U1200.png)


---

## Features

GroupsMath is designed to provide tools for working with finite (and infinite) groups, including:

**GROUPS:**
* Construction of finite groups with classes `CayleyGroup` and `ExplicitGroup`.
* Determination of the order of a group and its elements.
* Operation with group elements (multiplication, inverse, powers, ...).
* Computation of Cayley tables with `matplotlib.pyplot`.
* Detection of algebraic properties such as cyclicity, commutativity and solubility.
* Centralizers, conjugacy classes and conmutator.
* Computation and exploration of other structural properties of finite groups.
* Predefined group families in the library `groupsmath.precooked`, such as $C_n$, $S_n$, $A_n$, $D_n$, $V_4$, $Q_8$, ...
* Structure description. (*experimental feature*)

**SUBGROUPS:**
* Study of subgroups (order, cosets, normal subgroups, quotients, ...).
* Normal subgroups.
* Quotient groups $Q=G/H$.
* Conmutator and derived subgroups $G'$.
* Abelianization $G/G'$.
* Hasse diagrams. (*experimental feature*)

**AUTOMORPHISMS:**
* Class `Automorphism` and automorphism functions.
* Automorphisim functions $f:A\to\text{Aut}(B)$.
* Automorphism groups $\text{Aut}(G)$.

**PRODUCTS:**
* Direct product of two groups $G\times H$.
* Semidirect product of two groups $G\rtimes H$.

**MATRIX GROUPS**
* Library `groupsmath.matrixgroups` and class `MatrixGroup`.
* Groups generated by matrices: $GL$, $SL$, $O$, $SO$, $U$, $SU$ and $Sp$.
* Matrix groups over finite fields $\mathbb{F}_p$, with $p$ prime.

**PRESENTED GROUPS**
* Presentation of groups, generators and class `PresentedGroup`. (*experimental feature*)

**EDUCATION**
* Jupyter notebook [A swift introduction to group theory with *GroupsMath*](https://mybinder.org/v2/gh/MarioSultan/GroupsMath/main?labpath=GroupsMath_demo.ipynb) in Binder.


The available functionality will expand as the project develops.

---

## Coming soon

The GroupsMath team is currently working on theese ideas:
* Free groups $F_n$ and free products.
* Optimization of actual features.
* Representation theory.
* and much more...


---

## Documentation

Detailed documentation is available in the [GroupsMath official documentation](https://groupsmath.readthedocs.io/en/latest/) and it is developed alongside the library.

---

## Contributing

Contributions, suggestions, and bug reports are welcome. If you find a bug or have an idea for improving GroupsMath, please open an issue in the GitHub repository.
