math-proof-audit

Verify mathematical code implementations against LaTeX derivations via adversarial subagent audits.

9|Updated Jul 8, 2026
One-click install
npx skills add https://github.com/jerrylin96/dotgemini --skill math-proof-audit-jerrylin96
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: math-proof-audit
Source: https://github.com/jerrylin96/dotgemini/tree/main/skills/math-proof-audit
Command: npx skills add https://github.com/jerrylin96/dotgemini --skill math-proof-audit-jerrylin96

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires sympy, numpy, scipy.

What problem does it solve? Mathematical and statistical code often contains subtle bugs—missing normalization factors, off-by-one indexing, matrix transposition errors, or numerical instability—that pass ordinary code review. This Skill systematically verifies implementations against formal LaTeX derivations and catches discrepancies before they corrupt results. ## Core Features & Use Cases - Formal Proof Drafting: Generates LaTeX derivations, variable-to-symbol mapping tables, and line-by-line code alignment for the target implementation. - Adversarial Red Teaming: Spawns an isolated subagent that writes empirical verification scripts (sympy/numpy with pure-Python fallbacks) and audits against a 5-point discrepancy checklist covering scale, indexing, matrix dimensions, numerical stability, and boundary assumptions. - Socratic Human Signoff: Conducts an interactive interview to confirm the user understands the mathematical trade-offs before approval. - Persistent Proof Notes: Exports a self-contained proof reference note with embedded test logs to an Obsidian Vault. - Use Case: After implementing a custom loss function or softmax layer, run /showproof to verify the code matches the math, catch a missing 1/N normalization factor, and archive the verified proof for future reference. ## Quick Start Ask the agent to run /showproof on the file containing your mathematical implementation to verify it against formal derivations.

Frequently Asked Questions about math-proof-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify mathematical code against a formal proof?

Trigger the /showproof command on the target implementation. The skill drafts LaTeX derivations with a variable-to-symbol mapping, then runs an adversarial subagent that executes empirical verification scripts comparing symbolic math against actual code outputs.

What kinds of bugs does a math code audit catch?

The audit checks five discrepancy categories: missing scale or normalization factors, indexing and off-by-one errors, matrix dimension and transposition mistakes, numerical instability like unstabilized log or exp, and boundary assumption failures such as singular matrices or NaN inputs.

Does the verification work without numpy or sympy installed?

Yes. The verification scripts include a preflight check and fall back to pure-Python checks using the math and cmath modules when sympy, numpy, or scipy are unavailable, logging a clear warning instead of failing silently.

Where are the verified proof notes saved?

Proof notes are exported to an Obsidian Vault resolved from the ANTIGRAVITY_OBSIDIAN_VAULT environment variable, the CLI settings file, or local fallback directories. Each note embeds the derivations, audit results, and test output logs.

When should I not use formal proof auditing for code?

The workflow is heavyweight for trivial arithmetic or non-mathematical business logic. It is designed for implementations of mathematical models, statistical algorithms, and numerical methods where correctness against a formal specification matters.