algepy-tools
A Python library for efficient number theory and abstract algebra.
Science Score: 31.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
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.7%) to scientific vocabulary
Keywords
Repository
A Python library for efficient number theory and abstract algebra.
Basic Info
- Host: GitHub
- Owner: sumaddury
- License: apache-2.0
- Language: Python
- Default Branch: main
- Homepage: https://sumaddury.github.io/AlgePy/
- Size: 2.47 MB
Statistics
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
AlgePy: Algebraic Tools in Pure Python
![]()
1. Introduction
Module Overview
AlgePy is a Python library for discrete algebra and computational number theory. It provides efficient, mathematically rigorous tools for working with number theory and algebraic structures. All algorithms are verified for complexity and correctness.
Functionality
DiscreteFunctions
PrimalityTesting: Implements deterministic (Sieve of Eratosthenes) and probabilistic (Fermat, Miller–Rabin) methods for testing prime numbers.PrimeNumberTheorem: Provides functions to estimate the density and count of primes.Factorization: Offers algorithms to compute divisors and perform prime factorization.ArithmeticFunctions: Contains number-theoretic functions such as Euler’s totient, Möbius function, Liouville function, and divisor sums.
SingletonStructures
Z: Represents elements of the ring of integers (ℤ) with overloaded arithmetic and number-theoretic checks.R: Models real numbers (ℝ) with standard arithmetic operations.Z_n&Z_mod_: Provide modular arithmetic (ℤₙ) functionality, including methods for computing orders, inverses, cyclicity, primitive roots, and the Legendre symbol.
QuadraticStructures
C: Models complex numbers (ℂ) with standard arithmetic operations.Q: Represents elements of the field of rationals (ℚ) with overloaded arithmetic.QuadInt&QuadIntRing: Provide quadratic integer (ℤ[ω]) functionality, including methods for floor division, greatest-common-divisor (gcd), normalization, and factorization. Also provided are ring-wide functions such as fundamental and imaginary unit search.QuadRat&QuadRatField: Provide quadratic rational (ℚ(√d)) functionality, including true division, several types of embedding, inverses, etc.
AlgePy also integrates empirical complexity analysis to assess the performance of its algorithms.
2. Getting Started
Installation
Install AlgePy via PyPi:
bash
pip install algepy-tools
Or install directly from GitHub:
bash
pip install git+https://github.com/sumaddury/AlgePy.git
Or install directly from source:
bash
git clone https://github.com/sumaddury/AlgePy.git
cd algepy
pip install .
Quick Usage Example
```python from AlgePy.DiscreteFunctions import PrimalityTesting, Factorization from AlgePy.SingletonStructures import Z
Check if a number is prime using the Sieve of Eratosthenes
n = 29 print(f"{n} is prime: {PrimalityTesting.eratosthenes_primality(n)}")
Factorize a number
print("Factorization of 360:", Factorization.factorize(360))
Work with the ring of integers ℤ
a = Z(15)
b = Z(10)
print("a + b =", a + b)
For working with quadratic systems:
python
from AlgePy.QuadraticStructures import QuadRatField, Q
Create a quadratic rational field Q(√2)
field = QuadRatField(2) q = field(Q(3, 1), Q(5, 1)) print("q =", q) print("q inverse =", q.inverse()) ``` CHECK: demo.ipynb for cool artwork!
3. Documentation & Analysis
Full Documentation: sumaddury.github.io/AlgePy
API Reference: Detailed API docs are automatically generated using Sphinx.
Complexity Analysis: /complexity/
4. Citation
yaml
cff-version: 1.2.0
title: "AlgePy"
version: "0.0.1"
date-released: "2025-03-31"
authors:
- given-names: Sucheer
family-names: Maddury
repository-code: "https://github.com/sumaddury/algepy"
license: "Apache-2.0"
Owner
- Name: Sucheer Maddury
- Login: sumaddury
- Kind: user
- Location: California
- Company: Leland High School
- Repositories: 3
- Profile: https://github.com/sumaddury
High Schooler interested in programming and Computer Science.
Citation (CITATION.cff)
cff-version: 1.2.0
title: "AlgePy"
version: "0.1.2"
date-released: "2025-03-31"
authors:
- given-names: Sucheer
family-names: Maddury
repository-code: "https://github.com/sumaddury/algepy"
license: "Apache-2.0"
GitHub Events
Total
- Release event: 2
- Watch event: 1
- Public event: 1
- Push event: 19
- Create event: 3
Last Year
- Release event: 2
- Watch event: 1
- Public event: 1
- Push event: 19
- Create event: 3
Packages
- Total packages: 1
-
Total downloads:
- pypi 24 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 3
- Total maintainers: 1
pypi.org: algepy-tools
A Python library for efficient number theory and abstract algebra, featuring tools for primality testing, factorization, and advanced modular arithmetic.
- Homepage: https://github.com/sumaddury/algepy
- Documentation: https://sumaddury.github.io/AlgePy/
- License: Apache Software License
-
Latest release: 0.1.2
published 9 months ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v3 composite
- actions/setup-python v4 composite
- peaceiris/actions-gh-pages v3 composite
- Jinja2 ==3.1.6
- MarkupSafe ==3.0.2
- Pygments ==2.19.1
- Sphinx ==8.2.3
- alabaster ==1.0.0
- attrs ==25.3.0
- babel ==2.17.0
- big_O ==0.11.0
- certifi ==2025.1.31
- charset-normalizer ==3.4.1
- contourpy ==1.3.1
- cycler ==0.12.1
- docutils ==0.21.2
- fonttools ==4.56.0
- hypothesis ==6.130.5
- idna ==3.10
- imagesize ==1.4.1
- kiwisolver ==1.4.8
- matplotlib ==3.10.1
- numpy ==2.2.4
- packaging ==24.2
- pillow ==11.1.0
- pyparsing ==3.2.3
- python-dateutil ==2.9.0.post0
- requests ==2.32.3
- roman-numerals-py ==3.1.0
- setuptools ==78.1.0
- six ==1.17.0
- snowballstemmer ==2.2.0
- sortedcontainers ==2.4.0
- sphinxcontrib-applehelp ==2.0.0
- sphinxcontrib-devhelp ==2.0.0
- sphinxcontrib-htmlhelp ==2.1.0
- sphinxcontrib-jsmath ==1.0.1
- sphinxcontrib-qthelp ==2.0.0
- sphinxcontrib-serializinghtml ==2.0.0
- urllib3 ==2.3.0
- wheel ==0.45.1