morankor/theorist-toolbox/math-proof

Claude Code and agent skill by morankor/theorist-toolbox

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Write clear, detailed mathematical proofs for academic papers. Use when

Install

npx vskill@latest install morankor/theorist-toolbox/math-proof

SKILL.md

Math proof

Author: Moran Koren, Ben-Gurion University of the Negev (korenmor@bgu.ac.il). Part of the Theorist Toolbox.

Write rigorous mathematical proofs suitable for peer-reviewed academic papers. Every step should be explicit enough that a reader can verify it without filling in gaps. The proof must be a complete proof, not a proof outline — each step should be carefully explained and documented.

Trigger phrases

  • /math-proof
  • "prove this"
  • "show analytically"
  • "derive this result"
  • "justify mathematically"
  • "write a proof"
  • "expand this proof"

Proof strategy

Before writing a single line of algebra, invest time in planning:

Choose an approach before committing

Consider at least two proof strategies and state why you chose one:

  • Direct proof: Assume hypotheses, derive conclusion step by step.
  • Proof by contradiction: Assume the negation; derive a contradiction.
  • Proof by contrapositive: Prove $\neg Q \Rightarrow \neg P$ instead of $P \Rightarrow Q$.
  • Mathematical induction: Base case plus inductive step.
  • Constructive proof: Exhibit the object whose existence you claim.
  • Proof by exhaustion: Enumerate all cases and handle each.
Attack the hardest step first

Identify the single most technically demanding step before starting. If you cannot see how to close that step, the entire proof strategy may be wrong. Discovering this before writing three pages of algebra saves significant effort.

Prove simpler cases as scaffolding

Before tackling the general claim, prove it for a simple special case ($n=1$, $x=0$, a symmetric configuration, etc.). The special case often reveals the structure of the general proof. Label these explicitly as "Special case" or "Warm-up" — they are scaffolding, not the proof itself.

Retrieve before you generate (RAG)

Before writing any algebra, inventory your tools:

  1. List all theorems and lemmas you expect to use, by name.
  2. For each, confirm it is either (a) well-known (Wikipedia page, standard undergraduate course) or (b) something you will prove inline.
  3. Check whether a weaker version of the claim — or a closely related result — is already proved earlier in the paper or in a standard reference. Reuse it rather than reprove it.

Do not attempt the main proof without first knowing which tools are in your kit. Discovering mid-proof that a key lemma is either false or requires its own long proof is the most common cause of a failed proof attempt.

Sub-agent decomposition

For complex proofs, treat each major sub-claim as an independent proof task:

  1. Identify independent sub-claims: What facts must be true for the main proof to go through? State each as a precise formal claim.
  2. Prove each sub-claim in isolation: Each lemma proof stands alone — it should not assume facts from sibling lemmas unless they are explicitly passed in as hypotheses.
  3. Assemble the main proof last: The main proof should be short and structural, citing the proved lemmas rather than re-deriving their content.
  4. Check the assembly: Verify that the hypotheses of each lemma are actually satisfied at the call site in the main proof.

This mirrors how AlphaProof handled IMO problems: individual sub-goals are proved and verified independently, then composed into a complete solution. A gap in assembly — using a lemma whose hypotheses are not met — is as fatal as a gap in the lemma itself.

AlphaProof-inspired pipeline

AlphaProof (DeepMind, 2024) solved IMO problems at silver-medal level using a five-stage loop. Apply the same loop to any proof task:

Stage 1 — Formalize

Translate the natural-language claim into a precise formal statement before touching any algebra:

  • Write hypotheses as a bulleted list of mathematical conditions.
  • Write the conclusion as a single mathematical statement.
  • Assign explicit names to all objects, functions, and parameters.
  • Surface all implicit assumptions (e.g., $n \in \mathbb{N}$, $f$ continuous, $\varepsilon > 0$) and write them down.

If you cannot write a clean formal statement, the claim is ambiguous. Clarify with the user before proceeding.

Stage 2 — Retrieve

Inventory relevant results (see "Retrieve before you generate" in Proof Strategy above). Do not enter Stage 3 until your toolkit is assembled.

Stage 3 — Generate with sub-agent decomposition

Decompose into independent sub-claims and prove each in isolation (see "Sub-agent decomposition" above). Consider multiple proof strategies in parallel; abandon any path where the hardest step is not closable.

Stage 4 — Verify

Apply the mechanistic verifiability check to every line (see Core Principles). For maximum rigor, translate the proof into Lean 4 (see "Lean verification" below). Only accept a step that survives this check.

Stage 5 — Iterate

If verification fails at a step, do not patch around it. Return to Stage 3, understand why the step fails, and either find a new proof path or state explicitly what additional lemma would be needed to close the gap. A confident-sounding patch over a failed step is worse than an honest "this step requires further work."

Core principles

No gaps between steps

Every transition from one equation to the next must be justified. If you use the quotient rule, say so. If you substitute a definition, point to which definition. If a sign is negative, explain why. The reader should never need to work out an intermediate step on their own.

Bad: $$\frac{d}{d\rho}\frac{n_G}{n_B} = \frac{2q-1}{n_B^2} > 0.$$

Good: We compute $\frac{d}{d\rho}(n_G/n_B)$ using the quotient rule. First, the derivatives: $$\frac{dn_G}{d\rho} = q, \qquad \frac{dn_B}{d\rho} = 1-q.$$ Applying the quotient rule: $$\frac{d}{d\rho}\frac{n_G}{n_B} = \frac{q \cdot n_B - (1-q) \cdot n_G}{n_B^2}.$$ Expanding the numerator: $$q[\rho + (1-\rho)q] - (1-q)[\rho + (1-\rho)(1-q)] = \rho(2q-1) + (1-\rho)(2q-1) = 2q-1.$$ Since $q > 1/2$, this is positive.

State what you want to show before showing it

Open each step with a sentence explaining the goal: "We want to show that $t$ decreases with $\rho$." Then deliver the proof. The reader should know where you are headed before wading into algebra.

Sign every term

When a derivative or expression appears, immediately state its sign and why. Do not leave sign determination as an exercise. If a quantity is negative because it is a log of a number less than 1, say so explicitly.

Bridge definitions to usage

When you define a quantity (like a threshold $t$) and then use it in a derivative, explain the connection. Do not jump from "$Y \geq$ [some expression]" to "$t(K,\rho) =$ [formula]" without a sentence like: "Define $t(K,\rho)$ as the minimum number of yes votes required for allocation, i.e., the smallest integer $Y$ satisfying this inequality."

Show intermediate algebra

Expand products, collect terms, cancel factors. Do not skip from a quotient rule setup to a simplified final form. Show at least one intermediate line where terms are expanded but not yet simplified.

Explain why results are intuitive

After a formal derivation, add one sentence of economic or mathematical intuition. "The threshold drops because no votes carry less information, so fewer yes votes suffice to outweigh them." This helps the reader connect the math to the model.

Mechanistic verifiability

Every step should be verifiable as if by a formal proof assistant (Lean, Coq, Isabelle). Before writing each line, ask: "Could this step, in principle, be encoded in formal logic without adding new assumptions?" If not, it is too vague and needs to be broken down further.

Concretely:

  • "By continuity, the limit can be exchanged" → state which theorem justifies the exchange (dominated convergence, uniform convergence on compact sets, etc.)
  • "The matrix is positive definite" → prove it: show all eigenvalues are positive, or verify the definition directly.
  • "This sum converges absolutely" → bound the terms and invoke a comparison test or ratio test explicitly.
  • "The two expressions are equal by symmetry" → state which symmetry, and verify it is exact, not approximate.

This principle is the main safeguard against producing a confident-sounding but subtly flawed argument. Natural language makes it easy to hallucinate plausible but incorrect intermediate steps — demanding mechanistic verifiability at each line blocks this failure mode.

Self-contained proofs

The proof must be self-contained. Only cite well-known theorems — as a rule of thumb, a theorem must be famous enough to have a Wikipedia page or be taught in standard undergraduate courses. Do not invoke obscure or non-existent results. If you need a non-standard lemma, prove it inline.

Prove the general case, not examples

Never prove a claim only for specific cases or small examples and then assert it holds in general. If you verify a property for $n=1,2,3$, that is evidence, not a proof. You must provide an argument that covers the full generality of the claim. If the general proof is beyond reach, state this explicitly: "We have verified this for $n \leq 5$; the general case remains open."

Proof structure

1. Setup section
  • Define all notation up front
  • State the model primitives (distributions, parameters, decision rules)
  • Write the key quantities as explicit functions of the parameters
2. Numbered steps

Each step should:

  • Open with a plain-language statement of what will be shown
  • Derive the result with full intermediate algebra
  • Sign every derivative and explain the sign
  • Close with boundary values or limiting cases where helpful
3. Connecting steps

When one step feeds into the next, say so explicitly: "Substituting the result from Step 1 into the expression for $c_K$..." Do not assume the reader tracks which results carry forward.

4. Edge cases and case analysis

Enumerate all cases explicitly. If you claim a result holds "for all $x > 0$", check boundary behavior at $x = 0$ and $x \to \infty$. Do not silently assume non-degeneracy. If the proof requires case splits (e.g., $n$ even vs odd, or an angle acute vs obtuse), handle every case — do not prove one case and assert "the other case is similar" unless the symmetry is genuinely obvious and you state the symmetry.

5. QED

End with $\square$ and optionally a one-sentence summary of the full result.

Common patterns

Differentiating a ratio $f/g$

Always use the quotient rule explicitly: $$\frac{d}{dx}\frac{f}{g} = \frac{f'g - fg'}{g^2}.$$ Compute $f'$ and $g'$ separately first, then substitute.

Signing a log

If $\beta = \log(a/b)$ and you claim $\beta < 0$, show that $a < b$ first with an explicit inequality.

Chain rule through a CDF

When differentiating $P(Y \geq t(\rho))$ where both $t$ and the distribution parameter depend on $\rho$: $$\frac{d}{d\rho}P(Y \geq t) = \frac{\partial P}{\partial t}\cdot\frac{dt}{d\rho} + \frac{\partial P}{\partial p}\cdot\frac{dp}{d\rho}.$$ Sign each term separately, then discuss which dominates.

Discrete vs continuous

When a threshold must be an integer but you differentiate as if it were continuous, flag this: "Treating $t$ as continuous for tractability. In practice, $t$ is an integer, so small changes in $\rho$ can cause discrete jumps in $t$."

Inequality manipulation

When manipulating inequalities, explicitly justify every direction change. Common errors include: reversing inequality signs when multiplying by a negative quantity without noting it, flipping bounds when taking reciprocals without checking sign, and applying Jensen's inequality in the wrong direction (convex vs concave). After each inequality transformation, re-state which direction the inequality points and why.

Induction

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
92
Repository forks
23
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 6 Nov 2026, yesterday.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/morankor/theorist-toolbox/math-proof/badge)](https://verified-skill.com/skills/morankor/theorist-toolbox/math-proof)

Something wrong with this skill or its page? Tell us.