Claude Code Skills · 论文 · 文档处理

proof-checker

数学证明的自动化验证与修复工作流。该 skill 读取 LaTeX 证明文本,通过跨模型对抗审查(基于 GPT-5.4 高推理配置)识别逻辑缺口、量词错误、未证明断言等,逐条修正后重新审查,最终生成审计报告。适用于理论论文中需要多人轮值审查前的自动化扫查,或作为审稿环节的辅助工具。

Rigorous mathematical proof verification and fixing workflow. Reads a LaTeX proof, identifies gaps via cross-model review (Codex GPT-5.4 xhigh), fixes each gap with full derivations, re-reviews, and generates an audit report. Use when user says "检查证明", "verify proof", "proof check", "审证明", "check this proof", or wants rigorous mathematical verification of a theory paper.

Repo
Chanw-research/claude-code-paper-writing
Slug
proof-checker

SKILL.md

Proof Checker: Rigorous Mathematical Verification & Fixing

Systematically verify a mathematical proof via cross-model adversarial review, fix identified gaps, re-review until convergence, and generate a detailed audit report with proof-obligation accounting.

Context: $ARGUMENTS

Constants

  • MAX_REVIEW_ROUNDS = 3
  • REVIEWER_MODEL = gpt-5.4 via Codex MCP, reasoning effort always xhigh
  • REVIEWER_BACKEND = codex — Default: Codex MCP (xhigh). Override with — reviewer: oracle-pro for GPT-5.4 Pro via Oracle MCP. See shared-references/reviewer-routing.md.
  • AUDIT_DOC: PROOF_AUDIT.md at the paper directory root, alongside main.tex (cumulative log; when invoked via /paper-writing, this is paper/PROOF_AUDIT.md)
  • REPORT_TEX: proof_audit_report.tex (formal before/after PDF)
  • STATE_FILE: PROOF_CHECK_STATE.json (for recovery)
  • SKELETON_DOC: PROOF_SKELETON.md (micro-claim inventory)

Acceptance Gate (objective, replaces subjective scoring)

The proof passes when ALL of the following hold:

  1. Zero open FATAL or CRITICAL issues
  2. Every theorem/lemma has: (i) explicit hypotheses, (ii) proof with all interchanges justified, (iii) every application discharges hypotheses in the ledger
  3. All big-O/Θ/o statements have declared parameter dependence and uniformity scope
  4. Counterexample pass executed on all key lemmas (log candidates even if none found)

Issue Taxonomy (20 categories, 4 groups)

Group A: Logic & Proof Structure

CategoryDescriptionExample
UNJUSTIFIED_ASSERTIONClaim stated without proof or reference"The Hessian splits into Gram blocks"
UNPROVEN_SUBCLAIM"Clearly" / "it follows" hides a nontrivial lemma"By symmetry, the cross-terms vanish" without checking
QUANTIFIER_ERRORWrong order ∀/∃, missing "for sufficiently small κ""For all π, there exists ε" vs "there exists ε for all π"
IMPLICATION_REVERSALUses (A⇒B) as (B⇒A), or claims equivalence with only one direction
CASE_INCOMPLETEMisses boundary/degenerate casesSingular covariance, zero weight, non-unique argmin
CIRCULAR_DEPENDENCYLemma uses theorem that depends on it
LOGICAL_GAPA step is not justified by what precedes itB=Θ(1) → β_K=0 without analyzing W

Group B: Analysis & Measure Theory

CategoryDescriptionExample
ILLEGAL_INTERCHANGESwaps limit/expectation/derivative/integral without DCT/MCT/FubiniDifferentiating under E without domination
NONUNIFORM_CONVERGENCEPointwise convergence used as uniformsup and limit swapped
MISSING_DOMINATIONDCT cited but no dominating function given
INTEGRABILITY_GAPUses EX
REGULARITY_GAPDifferentiability/Lipschitz/convexity used but not established
STOCHASTIC_MODE_CONFUSIONMixes a.s./in prob./in L²/in expectation

Group C: Model & Parameter Tracking

CategoryDescriptionExample
MISSING_DERIVATIONA quantity is used but never derived from the modelRisk functional with undefined B, W
HIDDEN_ASSUMPTIONProof silently uses a condition not in the theoremGaussianity assumed but not stated
INSUFFICIENT_ASSUMPTIONHypotheses too weak for proof (counterexample exists)Moment conditions admitting 2-point distributions
DIMENSION_TRACKINGParameter dependence (d, n, K, ...) not explicitd enters only through κ
NORMALIZATION_MISMATCHCoordinate/scaling conventions inconsistentRescaled vs raw coordinates
CONSTANT_DEPENDENCE_HIDDEN"C" depends on d,n,K but treated as universal

Group D: Scope & Claims

CategoryDescriptionExample
SCOPE_OVERCLAIMConclusion stated more broadly than proof supports"β_K=0" with only generic overlap
REFERENCE_MISMATCHCited theorem's hypotheses not verified at point of use

Two-Axis Severity System

Axis A — Proof Status (what is wrong)

StatusMeaning
INVALIDStatement false as written (counterexample exists or contradiction)
UNJUSTIFIEDCould be true, but current proof does not establish it
UNDERSTATEDTrue only after strengthening assumptions
OVERSTATEDTrue only after weakening conclusion / adding qualifiers
UNCLEARAmbiguous notation / definition drift (not wrong per se)

Axis B — Impact (how much breaks)

ImpactMeaning
GLOBALBreaks main theorem or core dependency chain
LOCALAffects a side result but not the main theorem
COSMETICExposition only

Severity Labels (derived)

LabelDefinition
FATALINVALID + GLOBAL
CRITICAL(INVALID + LOCAL) or (UNJUSTIFIED + GLOBAL)
MAJOR(UNJUSTIFIED + LOCAL) or (UNDERSTATED/OVERSTATED + GLOBAL)
MINORClarity / notation / dimension bookkeeping that doesn't change claims

Side-Condition Checklists for Common Theorems

When the proof invokes any of the following, require explicit verification of ALL listed conditions:

TheoremRequired Conditions
DCT (Dominated Convergence)Pointwise a.e. convergence + integrable dominating function
MCT (Monotone Convergence)Monotone increasing + non-negative
Fubini/TonelliProduct measurability + integrability (Fubini) or non-negative (Tonelli)
Leibniz integral ruleContinuity of integrand + dominating function for derivative
Implicit Function TheoremContinuous differentiability + non-singular Jacobian
Taylor with remainderSufficient differentiability + remainder form (Lagrange/integral)
Jensen's inequalityConvexity of function + integrability
Cauchy-SchwarzCorrect inner product space + integrability of both factors
Weyl/Davis-KahanSymmetry/Hermiticity + perturbation bound conditions
Analytic continuationDomain connectivity + identity theorem conditions
WLOG reductionInvariance under claimed symmetry + reduction is reversible

Workflow

Phase 0: Preparation

  1. Locate the proof: Find the main .tex file(s).
  2. Read the entire proof: Extract list of all theorems/lemmas/propositions/corollaries/definitions/assumptions.
  3. Read reference materials: Reference papers, prior results.
  4. Build a section map: Structured list with line numbers and key claims.
  5. Identify the main theorem: Central result, assumptions, claims.

Phase 0.5: Proof-Obligation Ledger

Build formal accounting artifacts. Save to PROOF_SKELETON.md:

1. Dependency DAG

Nodes = Definitions / Assumptions / Lemmas / Theorems. Edges = "uses". Detect cycles (including semantic circularity where Lemma A uses a corollary that quietly depends on A).

2. Assumption Ledger

For each theorem/lemma, list every hypothesis with WHERE each is verified (or mark "UNVERIFIED"). Track usage-minimal assumption sets — which assumptions were actually used vs merely stated.

3. Typed Symbol Table

Each symbol must have a type signature:

κ : scalar ∈ (0,1), depends on (d, α_t, Σ, μ)
u* : vector ∈ ℝ^d, u* = C^{-1}m
B^even : matrix ∈ ℝ^{(L+1)×(L+1)}, symmetric PSD
Ψ_v : function ℝ → ℝ, analytic in (ζ,κ), parity determined by v

Flag any symbol whose meaning changes or whose type is inconsistent across uses.

4. Canonical Quantified Statements

For each theorem/lemma, rewrite the statement with explicit quantifiers, domains, and limit order:

∀K ≥ 3, ∀π ∈ Π_K^{ms,∘} \ E_K, ∃κ_0 > 0 such that ∀κ ∈ (0, κ_0):
  h_act^{(K,π)} = Θ(κ^{α_K^act})  [uniform in π on compact subsets]

If you cannot restate a theorem this precisely, mark it **UNCLEAR — n

同一分类的其他项