Modular arithmetic

From vibeeval/vibecosystem · View interactive version

Modular arithmetic is an AI agent skill from the GitHub repository vibeeval/vibecosystem. Problem-solving strategies for modular arithmetic in graph number theory

How to use this skill

Skill file

Modular Arithmetic

When to Use

Use this skill when working on modular-arithmetic problems in graph number theory.

Decision Tree

  1. Extended Euclidean Algorithm
  1. Chinese Remainder Theorem
  1. Euler's Theorem
  1. Quadratic Residues
  1. Order and Primitive Roots

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:

Cognitive Tools Reference

See .claude/skills/math-mode/SKILL.md for full tool documentation.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.