Skip to content
Development
Skill

/modular-arithmetic

Problem-solving strategies for modular arithmetic in graph number theory

From plugin
vibecosystem
547200 skills138 agents7 hooks

Claude Code

$ npx -y skills add vibeeval/vibecosystem --skill modular-arithmetic --agent claude-code

SKILL.md

modular-arithmetic.SKILL.md
name: modular-arithmetic
description: "Problem-solving strategies for modular arithmetic in graph number theory"
allowed-tools: [Bash, Read]

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

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.

Read more
@vibeeval
Ships withvibecosystem

A focused runtime for Claude Code. A bounded worker for Codex. Catalog (in repo): Default core: vibecosystem packages agents, skills and hooks for software work.

547200 skills138 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
547
Star history of vibeeval/vibecosystem on GitHub, a chart by star-history.com

Other skills on vibecosystem.

achievements

achievements

Steam-style achievement system with XP, levels, streaks, and skill trees. Gamifies the development workflow. 25 achievements…

agent-benchmark

agent-benchmark

Framework for measuring and tracking agent response quality over time. Detects regressions before they reach production. Use when…

agent-linter

agent-linter

Agent ve skill dosyalarinin yapisal dogrulamasi. Frontmatter kontrol, naming convention, zorunlu bolum kontrolu, tutarlilik…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about modular-arithmetic.

Which coding agents can use modular-arithmetic?
modular-arithmetic installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.