Agent Skillsparcadei/Continuous-Claude-v3 › modular-arithmetic

modular-arithmetic

GitHub

解决图数论中的模运算问题,提供扩展欧几里得、中国剩余定理等策略及Sympy/Z3工具命令。

.claude/skills/math/graph-number-theory/modular-arithmetic/SKILL.md parcadei/Continuous-Claude-v3

Trigger Scenarios

模逆元计算 同余方程组求解 欧拉函数简化 二次剩余判定

Install

npx skills add parcadei/Continuous-Claude-v3 --skill modular-arithmetic -g -y
More Options

Non-standard path

npx skills add https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/math/graph-number-theory/modular-arithmetic -g -y

Use without installing

npx skills use parcadei/Continuous-Claude-v3@modular-arithmetic

指定 Agent (Claude Code)

npx skills add parcadei/Continuous-Claude-v3 --skill modular-arithmetic -a claude-code -g -y

安装 repo 全部 skill

npx skills add parcadei/Continuous-Claude-v3 --all -g -y

预览 repo 内 skill

npx skills add parcadei/Continuous-Claude-v3 --list

SKILL.md

Frontmatter
{
    "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.

Version History

  • d07ff4b Current 2026-08-20 12:48

Same Skill Collection

.claude/plugins/braintrust-tracing/skills/trace-claude-code/SKILL.md
.claude/skills/agentica-claude-proxy/SKILL.md
.claude/skills/agentica-infrastructure/SKILL.md
.claude/skills/agentica-prompts/SKILL.md
.claude/skills/agentica-sdk/SKILL.md
.claude/skills/agentica-server/SKILL.md
.claude/skills/archive/leann-search/SKILL.md
.claude/skills/ast-grep-find/SKILL.md
.claude/skills/braintrust-tracing/SKILL.md
.claude/skills/cli-reference/SKILL.md
.claude/skills/commit/SKILL.md
.claude/skills/compound-learnings/SKILL.md
.claude/skills/continuity_ledger/SKILL.md
.claude/skills/create_handoff/SKILL.md
.claude/skills/dead-code/SKILL.md
.claude/skills/debug-hooks/SKILL.md
.claude/skills/debug/SKILL.md
.claude/skills/describe_pr/SKILL.md
.claude/skills/discovery-interview/SKILL.md
.claude/skills/explore/SKILL.md
.claude/skills/firecrawl-scrape/SKILL.md
.claude/skills/fix/SKILL.md
.claude/skills/github-search/SKILL.md
.claude/skills/help/SKILL.md
.claude/skills/hook-developer/SKILL.md
.claude/skills/implement_plan_micro/SKILL.md
.claude/skills/implement_plan/SKILL.md
.claude/skills/implement_task/SKILL.md
.claude/skills/loogle-search/SKILL.md
.claude/skills/math-help/SKILL.md
.claude/skills/math-router/SKILL.md
.claude/skills/math-unified/SKILL.md
.claude/skills/math/abstract-algebra/fields/SKILL.md
.claude/skills/math/abstract-algebra/groups/SKILL.md
.claude/skills/math/abstract-algebra/rings/SKILL.md
.claude/skills/math/category-theory/categories-functors/SKILL.md
.claude/skills/math/category-theory/limits-colimits/SKILL.md
.claude/skills/math/category-theory/natural-transformations/SKILL.md
.claude/skills/math/complex-analysis/analytic-functions/SKILL.md
.claude/skills/math/complex-analysis/contour-integrals/SKILL.md
.claude/skills/math/complex-analysis/residues/SKILL.md
.claude/skills/math/functional-analysis/banach-spaces/SKILL.md
.claude/skills/math/functional-analysis/hilbert-spaces/SKILL.md
.claude/skills/math/functional-analysis/operator-theory/SKILL.md
.claude/skills/math/graph-number-theory/graph-algorithms/SKILL.md
.claude/skills/math/graph-number-theory/prime-numbers/SKILL.md
.claude/skills/math/information-theory/channel-capacity/SKILL.md
.claude/skills/math/information-theory/entropy/SKILL.md
.claude/skills/math/information-theory/source-coding/SKILL.md

Metadata

Files
0
Version
d07ff4b
Hash
66c3f139
Indexed
2026-08-20 12:48

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-21 06:33
浙ICP备14020137号-1 $Гость$