audit-math
Adversarial audit of mathematical proofs, derivations, and formal environments
/plugin install ai-asset-pricingdetails
Audit Math Skill
Structured adversarial audit of mathematical content: proofs, derivations, definitions, assumptions, and formal environments. Works on any section containing formal math.
Examples
/audit-math appendix-a-- full audit of Appendix A/audit-math methodology-- audit math content in the methodology section/audit-math 200-450-- audit specific line range in main.tex
Input
The user provides one of:
- A section key (e.g.,
appendix-a,methodology,results) - A line range (e.g.,
200-450) - If omitted, scans main.tex for sections containing formal environments and audits the first one found
Workflow
Step 1: Load Context
- Read
.claude/rules/notation-protocol.mdfor custom commands, core variables, subscript conventions, theorem environment numbering, and math writing rules (if it exists) - Read
guidance/paper-context.mdfor key labels, formal environment ordering, and canonical results (if it exists) - Read
.claude/rules/academic-writing.mdfor cross-reference style rules and terminology - Extract the target section from
main.texusing%% BEGIN/ENDmarkers (or line range)
Step 2: Inventory Formal Environments
Build a registry of every formal environment in the target section:
- Definitions (
\begin{definition}) - Assumptions (
\begin{assumption}) - Lemmas (
\begin{lemma}) - Propositions (
\begin{proposition}) - Corollaries (
\begin{corollary}) - Theorems (
\begin{theorem}) - Proofs (
\begin{proof}) - Remarks (
\begin{remark})
For each, record: label, name (from [...] bracket), line number, and which assumptions/results it references.
If notation-protocol.md registers environment numbering, cross-check against it. Flag any missing or extra environments, misordered labels, or mismatched names.
Step 3: Assumption Dependency Audit
For each lemma, proposition, corollary, and theorem:
- List the assumptions explicitly invoked in the statement (e.g., "Under Assumptions \ref{assum:iid} and \ref{assum:overlap}")
- List the assumptions actually used in the proof
- Flag hidden dependencies: assumptions used in the proof but not stated in the result
- Flag unused declarations: assumptions stated in the result but never invoked in the proof
- Flag implicit prerequisites: does the result depend on an earlier definition or lemma not cited?
- Check that assumption references use
\ref{assum:...}(not prose descriptions like "the independence assumption")
Present as a table:
| Result | States | Uses | Hidden | Unused |
|---|
Step 4: Proof Completeness Audit
For each proof, check:
- Hand-waved steps: Are there jumps marked by "it follows that," "clearly," "one can verify," or "by standard arguments" without justification? Flag with the specific step that is skipped.
- Approximations: Are approximations (first-order, asymptotic, etc.) flagged explicitly? Does the proof state where the approximation is used and what is neglected?
- Substitution steps: When a definition or earlier result is substituted, is the substitution shown or just asserted? For a top-journal appendix, key algebraic steps should be shown.
- Symmetry arguments: When "by symmetry" is invoked, verify the symmetry actually holds.
- Proof endings: Does every
\begin{proof}have a matching\end{proof}?
Step 5: Sign Analysis
For each inequality or signed result:
- Trace the sign through each step of the proof. Does the chain of inequalities yield the stated direction?
- Check WLOG conventions: when "without loss of generality, assume $a > 0$" is stated, verify the other case is handled and that the final result is invariant to this choice.
- Check that the sign of the result aligns with the economic intuition in the interpretive prose.
- For results stated with $\ge$ (weak inequality): is there a condition under which equality holds? Is it stated?
Step 6: Boundary and Degenerate Cases
Test each result at the edges of its parameter space:
- Identify the key parameters and check behavior at their extremes (0, 1, $\infty$, etc.)
- Do closed-form expressions simplify correctly at these limits?
- Are limiting cases stated as corollaries? If so, do they match the general result at those parameter values?
- Are expressions well-defined at all points in the claimed parameter range? (No division by zero, no undefined logs, etc.)
Step 7: Notation Consistency
Using notation-protocol.md as the reference (if available):
- Symbol reuse: Is the same symbol used for the same quantity throughout?
- Hat convention: If hats are used (e.g., observed vs. true), is the convention consistent?
- Define before use: Is every symbol defined where it first appears? Flag any symbol used before its definition.
- Custom commands: Are custom commands used consistently? (
\E[...]notE[...],\Varnot\text{Var}, etc.) - Subscript conventions: Are subscripts consistent throughout?
- Cross-check with main body: If the same symbol appears in the main body, verify it has the same meaning.
Step 8: Cross-Reference Integrity
- Every
\ref{...}to a definition, assumption, lemma, proposition, corollary, or theorem must point to a valid\label{...} - Equation references must use
\eqref{...}(not\ref{...}) - Non-breaking spaces must precede all references:
Eq.~\eqref{...},Lemma~\ref{...},Assumption~\ref{...} - Check that references to main body sections resolve correctly
- Check for dangling forward references (result X cites result Y that appears later -- is Y actually proven independently?)
Step 9: Interpretive Prose Audit
Each formal result should be followed by interpretive prose. Check:
- Does every lemma/proposition/theorem/corollary have a remark or explanatory paragraph after it?
- Does the interpretive prose connect the mathematical result to the paper's economic argument?
- Does the prose use correct terminology (per academic-writing.md)?
- Is the prose free of banned words?
Step 10: Edge Case -- No Math Found
If the target section contains no formal environments:
- Report: "No formal mathematical environments found in [section]. This skill is designed for sections with proofs and derivations."
- Suggest: "Consider running
/audit-section [key]for a general content audit instead." - If the section contains inline math or displayed equations (but no formal environments), note the equations found and flag any that lack surrounding context or definitions.
Output
MATH AUDIT: [section name / line range]
========================================
ENVIRONMENT INVENTORY:
Definitions: N (labels: ...)
Assumptions: N (labels: ...)
Lemmas: N
Propositions: N
Corollaries: N
Theorems: N
Proofs: N
Remarks: N
Inventory vs notation-protocol.md: [MATCH / N discrepancies / not available]
ASSUMPTION DEPENDENCIES:
| Result | States | Uses | Hidden | Unused |
|--------|--------|------|--------|--------|
| Lemma 1 | none | none | -- | -- |
| Prop 1 | 1,2 | 1,2 | -- | -- |
| ... | ... | ... | ... | ... |
PROOF COMPLETENESS: [N issues]
- [Line X] [SEVERITY]: [description]
SIGN ANALYSIS: [N issues]
- [Line X] [SEVERITY]: [description]
BOUNDARY CASES: [N issues]
- [Line X] [SEVERITY]: [description]
NOTATION CONSISTENCY: [N issues]
- [Line X] [SEVERITY]: [description]
CROSS-REFERENCES: [N issues]
- [Line X] [SEVERITY]: [description]
INTERPRETIVE PROSE: [N issues]
- [Line X] [SEVERITY]: [description]
SEVERITY SUMMARY:
CRITICAL: N (errors that invalidate a result or hide a dependency)
IMPORTANT: N (gaps that a referee would flag)
MINOR: N (notation inconsistencies, style issues)
NICE-TO-HAVE: N (polish items)
TOP PRIORITY FIXES:
1. [CRITICAL] [Line X]: [description and suggested fix]
2. [IMPORTANT] [Line Y]: [description and suggested fix]
3. [etc.]
Severity Definitions
- CRITICAL: A hidden assumption, incorrect sign, missing proof step, or broken cross-reference that could invalidate a formal result. A referee would reject on this basis.
- IMPORTANT: A gap that does not invalidate the result but that a careful referee would flag -- e.g., an unhandled boundary case, an approximation not explicitly flagged, or an assumption invoked in the proof but not stated in the theorem.
- MINOR: A notation inconsistency, a missing non-breaking space, or a style violation in interpretive prose. Does not affect correctness.
- NICE-TO-HAVE: Polish items -- e.g., adding an extra remark for economic intuition, clarifying a "by standard arguments" step that is in fact standard.
Composability
This skill can be called from /full-paper-audit as an additional pass on sections containing formal math. The recommended integration point is after Step 2 (section-by-section audit):
Step 2b: For sections containing formal environments (any appendix or main body
section with \begin{proposition}), run /audit-math.
When called from /full-paper-audit, suppress the full output template and return only the SEVERITY SUMMARY and TOP PRIORITY FIXES sections.
technical
- github
- Alexander-M-Dickerson/ai-asset-pricing
- stars
- 49
- license
- MIT
- contributors
- 1
- last commit
- 2026-04-19T07:58:01Z
- file
- .claude/skills/audit-math/SKILL.md