
Math Reasoning
- 1 installs
- 255 repo stars
- Updated February 27, 2026
- lingzhi227/claude-research-skills
This is a copy of math-reasoning by lingzhi227 - installs and ranking accrue to the original listing.
Helps with ai & agent building tasks.
About
math-reasoning is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.
- math-reasoning
- AI & Agent Building
- AI-coding skill
Math Reasoning by the numbers
- 1 all-time installs (skills.sh)
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/lingzhi227/claude-research-skills --skill math-reasoningAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1 |
|---|---|
| repo stars | ★ 255 |
| Last updated | February 27, 2026 |
| Repository | lingzhi227/claude-research-skills ↗ |
What it does
Helps with ai & agent building tasks.
Files
Mathematical Reasoning
Perform rigorous mathematical reasoning and produce publication-quality LaTeX output.
Input
$0— Task type:derive,prove,formalize,stats,notation,verify$1— Context: equation, theorem statement, problem description, or data description
Tasks
derive — Step-by-step equation derivation
Show every intermediate step. Justify each with the rule applied. Box final result with \boxed{}. Number important equations with \label{eq:name}.
prove — Formal theorem proof
Use appropriate technique: direct, contradiction, induction, construction, or cases. See references/proof-templates.md for LaTeX templates.
formalize — Problem setting formalization
Convert informal description into formal mathematical framework with: variable definitions, domain/range specifications, assumptions, objective function.
stats — Statistical test selection
Use the decision tree in references/notation-guide.md to select appropriate tests. Report p-values, effect sizes, confidence intervals.
notation — Generate notation table
Create a \begin{table} with all symbols used in the paper. Use standard ML notation from references/notation-guide.md.
verify — Check mathematical correctness
Verify: dimensional consistency, boundary cases, gradient computations, notation consistency across sections.
References
- Standard ML notation + statistical tests:
~/.claude/skills/math-reasoning/references/notation-guide.md - Proof templates and theorem environments:
~/.claude/skills/math-reasoning/references/proof-templates.md
Rules
- Define ALL symbols before first use: "Let $\mathcal{X}$ denote..."
- Use consistent notation throughout the paper
- Number equations that are referenced later
- Use
\tag{reason}for key derivation steps - State assumptions explicitly
- Cite lemmas and prior results used in proofs
Related Skills
- Upstream: research-planning
- Downstream: algorithm-design, paper-writing-section
- See also: symbolic-equation, data-analysis
Standard Mathematical Notation for ML/AI Papers
Spaces and Sets
| Concept | Notation | LaTeX |
|---|---|---|
| Real numbers | ℝ | \mathbb{R} |
| Natural numbers | ℕ | \mathbb{N} |
| Integers | ℤ | \mathbb{Z} |
| d-dimensional reals | ℝ^d | \mathbb{R}^d |
| Input space | 𝒳 | \mathcal{X} |
| Output/label space | 𝒴 | \mathcal{Y} |
| Hypothesis space | 𝒫 | \mathcal{H} |
| Parameter space | Θ | \Theta |
| Dataset | 𝒟 | \mathcal{D} |
| Loss function | ℒ | \mathcal{L} |
| Model family | ℱ | \mathcal{F} |
Probability and Statistics
| Concept | LaTeX |
|---|---|
| Expectation | \mathbb{E}[\cdot] or \mathbb{E}_{p(x)}[\cdot] |
| Probability | \mathbb{P}(\cdot) or p(\cdot) |
| Variance | \mathrm{Var}[\cdot] |
| Covariance | \mathrm{Cov}[\cdot, \cdot] |
| KL divergence | `D_{\mathrm{KL}}(p \ |
| Mutual information | I(X; Y) |
| Entropy | H(X) or \mathcal{H}(X) |
| Normal distribution | \mathcal{N}(\mu, \sigma^2) |
| Indicator function | \mathbb{1}[\cdot] |
Optimization
| Concept | LaTeX |
|---|---|
| Argmin | \arg\min_{\theta \in \Theta} |
| Argmax | \arg\max_{\theta \in \Theta} |
| Optimal params | \theta^* |
| Gradient | \nabla_\theta \mathcal{L} |
| Hessian | \nabla^2 \mathcal{L} |
| Learning rate | \eta or \alpha |
Linear Algebra
| Concept | LaTeX |
|---|---|
| Vectors (bold lowercase) | \mathbf{x} or \bm{x} |
| Matrices (bold uppercase) | \mathbf{W} or \bm{W} |
| Transpose | \mathbf{W}^\top |
| Inverse | \mathbf{W}^{-1} |
| Norm | `\ |
| Inner product | \langle \mathbf{x}, \mathbf{y} \rangle |
| Trace | \mathrm{tr}(\mathbf{A}) |
| Determinant | \det(\mathbf{A}) or ` |
| Frobenius norm | `\ |
| Hadamard product | \mathbf{A} \odot \mathbf{B} |
Common ML Operations
| Concept | LaTeX |
|---|---|
| Softmax | \mathrm{softmax}(\mathbf{z})_i = \frac{e^{z_i}}{\sum_j e^{z_j}} |
| Sigmoid | \sigma(x) = \frac{1}{1 + e^{-x}} |
| ReLU | \mathrm{ReLU}(x) = \max(0, x) |
| Cross-entropy | -\sum_i y_i \log \hat{y}_i |
| MSE | \frac{1}{n}\sum_i (y_i - \hat{y}_i)^2 |
| Attention | \mathrm{Attention}(Q, K, V) = \mathrm{softmax}\left(\frac{QK^\top}{\sqrt{d_k}}\right)V |
Useful LaTeX Declarations
\DeclareMathOperator*{\argmin}{arg\,min}
\DeclareMathOperator*{\argmax}{arg\,max}
\DeclareMathOperator{\tr}{tr}
\DeclareMathOperator{\diag}{diag}
\DeclareMathOperator{\rank}{rank}
\DeclareMathOperator{\softmax}{softmax}
\DeclareMathOperator{\sigmoid}{\sigma}
\newcommand{\R}{\mathbb{R}}
\newcommand{\E}{\mathbb{E}}
\newcommand{\Prob}{\mathbb{P}}
\newcommand{\bx}{\mathbf{x}}
\newcommand{\by}{\mathbf{y}}
\newcommand{\bW}{\mathbf{W}}
\newcommand{\btheta}{\boldsymbol{\theta}}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\abs}[1]{\left| #1 \right|}
\newcommand{\inner}[2]{\langle #1, #2 \rangle}
\newcommand{\KL}[2]{D_{\mathrm{KL}}\left( #1 \| #2 \right)}Statistical Tests Decision Tree
Comparing two groups
- Normal data → paired/unpaired t-test
- Non-normal → Wilcoxon signed-rank / Mann-Whitney U
Comparing >2 groups
- Normal + equal variance → one-way ANOVA + post-hoc Tukey HSD
- Otherwise → Kruskal-Wallis + post-hoc Dunn
Correlation
- Linear → Pearson's r
- Monotonic → Spearman's ρ
Categorical data
- 2×2 → Fisher's exact test / χ² test
- Larger → χ² test of independence
Multiple comparisons
- Always apply Bonferroni correction or Benjamini-Hochberg FDR
- Report:
α_corrected = α / kwhere k = number of comparisons
Reporting convention
The improvement is statistically significant
($p < 0.01$, paired $t$-test, $t(4) = 5.23$, Cohen's $d = 1.87$).
Results reported as mean $\pm$ std over $N = 5$ random seeds.Proof Templates for Research Papers
Theorem Environment
\begin{theorem}[Name]
\label{thm:name}
Let $f: \mathcal{X} \to \mathcal{Y}$ be a continuous function. Then ...
\end{theorem}
\begin{proof}
We prove by [technique]. ...
[Step 1] ...
[Step 2] ...
Therefore, ... \qed
\end{proof}Supporting Environments
\begin{lemma}[Helper result]
\label{lem:helper}
For all $x \in \mathcal{X}$, ...
\end{lemma}
\begin{proposition}
\label{prop:name}
Under Assumption~\ref{asm:name}, ...
\end{proposition}
\begin{corollary}
\label{cor:name}
As a direct consequence of Theorem~\ref{thm:name}, ...
\end{corollary}
\begin{definition}[Concept Name]
\label{def:name}
We define ... as ...
\end{definition}
\begin{assumption}
\label{asm:name}
We assume that ...
\end{assumption}
\begin{remark}
Note that this result implies ...
\end{remark}Proof Techniques
Direct Proof
\begin{proof}
Assume the premises hold. We have:
\begin{align}
f(x) &= ... \label{eq:step1} \\
&\leq ... \tag{by Lemma~\ref{lem:helper}} \\
&= ... \nonumber
\end{align}
which completes the proof.
\end{proof}Proof by Contradiction
\begin{proof}
Suppose for contradiction that $\neg P$. Then ...
This contradicts the assumption that ..., completing the proof.
\end{proof}Proof by Induction
\begin{proof}
We prove by induction on $n$.
\textbf{Base case} ($n = 1$): ...
\textbf{Inductive step}: Assume the statement holds for $n = k$.
We show it holds for $n = k + 1$:
\begin{align}
f(k+1) &= f(k) + g(k) \\
&\leq ... \tag{by inductive hypothesis} \\
&= ...
\end{align}
By the principle of mathematical induction, the result holds for all $n \geq 1$.
\end{proof}Convergence Proof (common in ML)
\begin{theorem}[Convergence Rate]
\label{thm:convergence}
Under Assumptions~\ref{asm:smoothness} and~\ref{asm:bounded_var}, Algorithm~\ref{alg:method}
with step size $\eta = \frac{1}{\sqrt{T}}$ satisfies:
\begin{equation}
\frac{1}{T} \sum_{t=1}^{T} \mathbb{E}\left[\|\nabla f(\theta_t)\|^2\right] \leq \frac{2(f(\theta_1) - f^*)}{\sqrt{T}} + \frac{L\sigma^2}{\sqrt{T}}
\end{equation}
\end{theorem}Generalization Bound (common in learning theory)
\begin{theorem}[Generalization Bound]
\label{thm:generalization}
Let $\mathcal{F}$ be a function class with Rademacher complexity $\mathfrak{R}_n(\mathcal{F})$.
For any $\delta > 0$, with probability at least $1 - \delta$ over the draw of $n$ samples:
\begin{equation}
\sup_{f \in \mathcal{F}} \left| \hat{R}(f) - R(f) \right| \leq 2\mathfrak{R}_n(\mathcal{F}) + \sqrt{\frac{\log(2/\delta)}{2n}}
\end{equation}
\end{theorem}Complexity Analysis Template
\begin{proposition}[Computational Complexity]
\label{prop:complexity}
Algorithm~\ref{alg:method} has time complexity $\mathcal{O}(nd^2)$ and
space complexity $\mathcal{O}(nd)$, where $n$ is the number of samples
and $d$ is the input dimension.
\end{proposition}