modular-arithmetic
SolidProblem-solving strategies for modular arithmetic in graph number theory
AI & Automation 496 stars
41 forks Updated 1 months ago MIT
Install
Quality Score: 87/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Modular Arithmetic
## When to Use
Use this skill when working on modular-arithmetic problems in graph number theory.
## Decision Tree
1. **Extended Euclidean Algorithm**
- Find gcd(a,b) and x,y with ax + by = gcd(a,b)
- Modular inverse: a^{-1} mod n when gcd(a,n) = 1
- `sympy_compute.py solve "a*x == 1 mod n"`
2. **Chinese Remainder Theorem**
- System x = a_i (mod m_i) with coprime m_i
- Unique solution mod prod(m_i)
- `z3_solve.py prove "crt_solution_exists"`
3. **Euler's Theorem**
- a^{phi(n)} = 1 (mod n) when gcd(a,n) = 1
- phi(p^k) = p^{k-1}(p-1)
- `sympy_compute.py simplify "euler_phi"`
4. **Quadratic Residues**
- Legendre symbol: (a/p) = a^{(p-1)/2} mod p
- Quadratic reciprocity: (p/q)(q/p) = (-1)^{...}
- Tonelli-Shanks for square roots
5. **Order and Primitive Roots**
- ord_n(a) = smallest k with a^k = 1 (mod n)
- Primitive root: ord_n(a) = phi(n)
## Tool Commands
### Sympy_Mod_Inverse
```bash
uv run python -m runtime.harness scripts/sympy_compute.py solve "a*x == 1 mod n" --var x
```
### Z3_Crt
```bash
uv run python -m runtime.harness scripts/z3_solve.py prove "solution_exists_iff_pairwise_coprime"
```
### Sympy_Euler_Phi
```bash
uv run python -m runtime.harness scripts/sympy_compute.py simplify "phi(p**k) == p**(k-1)*(p-1)"
```
### Z3_Quadratic_Residue
```bash
uv run python -m runtime.harness scripts/z3_solve.py prove "legendre_symbol_multiplicative"
```
...
Details
- Author
- vibeeval
- Repository
- vibeeval/vibecosystem
- Created
- 2 months ago
- Last Updated
- 1 months ago
- Language
- C#
- License
- MIT
Integrates with
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Listed
modular-arithmetic
Problem-solving strategies for modular arithmetic in graph number theory
3,795 Updated 4 months ago
parcadei AI & Automation Solid
prime-numbers
Problem-solving strategies for prime numbers in graph number theory
496 Updated 1 months ago
vibeeval AI & Automation Listed
prime-numbers
Problem-solving strategies for prime numbers in graph number theory
3,795 Updated 4 months ago
parcadei AI & Automation Solid
groups
Problem-solving strategies for groups in abstract algebra
3,795 Updated 4 months ago
parcadei AI & Automation Solid
graph-algorithms
Problem-solving strategies for graph algorithms in graph number theory
3,795 Updated 4 months ago
parcadei