modular-arithmetic
A research helper for solving graph number theory problems involving modular arithmetic, CRT, and Euler's theorem.
Install
mkdir -p .claude/skills/modular-arithmetic && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/2680" && unzip -o skill.zip -d .claude/skills/modular-arithmetic && rm skill.zipInstalls to .claude/skills/modular-arithmetic
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Problem-solving strategies for modular arithmetic in graph number theoryKey capabilities
- →Calculate modular inverses using the Extended Euclidean Algorithm
- →Solve systems of modular equations with the Chinese Remainder Theorem
- →Simplify Euler totient functions
- →Verify quadratic residues using the Legendre symbol
- →Determine the order of elements and primitive roots
How it works
The skill applies number theory strategies through symbolic computation tools like Sympy and Z3. It maps mathematical definitions to specific solver commands for verification and calculation.
Inputs & outputs
When to use modular-arithmetic
- →Calculate modular inverses
- →Solve systems of modular equations
- →Verify quadratic residues
- →Compute Euler totient functions
About this skill
Modular Arithmetic
When to Use
Use this skill when working on modular-arithmetic problems in graph number theory.
Decision Tree
-
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"
-
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"
-
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"
-
Quadratic Residues
- Legendre symbol: (a/p) = a^{(p-1)/2} mod p
- Quadratic reciprocity: (p/q)(q/p) = (-1)^{...}
- Tonelli-Shanks for square roots
-
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
uv run python -m runtime.harness scripts/sympy_compute.py solve "a*x == 1 mod n" --var x
Z3_Crt
uv run python -m runtime.harness scripts/z3_solve.py prove "solution_exists_iff_pairwise_coprime"
Sympy_Euler_Phi
uv run python -m runtime.harness scripts/sympy_compute.py simplify "phi(p**k) == p**(k-1)*(p-1)"
Z3_Quadratic_Residue
uv run python -m runtime.harness scripts/z3_solve.py prove "legendre_symbol_multiplicative"
Key Techniques
From indexed textbooks:
- [Graph Theory (Graduate Texts in Mathematics (173))] By N we denote the set of natural numbers, including zero. The set Z/nZ of integers modulo n is denoted by Zn; its elements are written as i := i + nZ. When we regard Z2 = {0, 1} as a eld, we also denote it as F2 = {0, 1}.
Cognitive Tools Reference
See .claude/skills/math-mode/SKILL.md for full tool documentation.
When not to use it
- →Problems outside of graph number theory
- →General arithmetic not involving modular systems
Limitations
- →Requires specific solver scripts for execution
- →Limited to the mathematical domains defined in the decision tree
How it compares
It automates the application of number theory theorems via CLI-based symbolic solvers instead of manual derivation.
Compared to similar skills
modular-arithmetic side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| modular-arithmetic (this skill) | 2 | 7mo | Review | Intermediate |
| literature-review | 559 | 2mo | Review | Advanced |
| openalex-database | 48 | 7mo | Review | Intermediate |
| scientific-critical-thinking | 18 | 7mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by parcadei
View all by parcadei →You might also like
literature-review
K-Dense-AI
Conduct comprehensive, systematic literature reviews using multiple academic databases (PubMed, arXiv, bioRxiv, Semantic Scholar, etc.). This skill should be used when conducting systematic literature reviews, meta-analyses, research synthesis, or comprehensive literature searches across biomedical, scientific, and technical domains. Creates professionally formatted markdown documents and PDFs with verified citations in multiple citation styles (APA, Nature, Vancouver, etc.).
openalex-database
davila7
Query and analyze scholarly literature using the OpenAlex database. This skill should be used when searching for academic papers, analyzing research trends, finding works by authors or institutions, tracking citations, discovering open access publications, or conducting bibliometric analysis across 240M+ scholarly works. Use for literature searches, research output analysis, citation analysis, and academic database queries.
scientific-critical-thinking
davila7
Evaluate research rigor. Assess methodology, experimental design, statistical validity, biases, confounding, evidence quality (GRADE, Cochrane ROB), for critical analysis of scientific claims.
biorxiv-database
lifangda
Efficient database search tool for bioRxiv preprint server. Use this skill when searching for life sciences preprints by keywords, authors, date ranges, or categories, retrieving paper metadata, downloading PDFs, or conducting literature reviews.
physics-validator
omriwen
Validate optical physics parameters including Fresnel numbers, diffraction regimes, and resolution limits. This skill should be used when configuring Telescope, Microscope, or Camera instruments to ensure physically realistic parameters.
fda-database
davila7
Query openFDA API for drugs, devices, adverse events, recalls, regulatory submissions (510k, PMA), substance identification (UNII), for FDA regulatory data analysis and safety research.