wanshuiyin/auto-claude-code-research-in-sleep1 file

Proof Checker

Rigorous mathematical proof verification and fixing workflow. Reads a LaTeX proof, identifies gaps via cross-model review (external reviewer backend, ultra reasoning), 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.

Specification
Skill ID
wanshuiyin/auto-claude-code-research-in-sleep/proof-checker
Publisher
wanshuiyin
Repository
auto-claude-code-research-in-sleep
Installs
0
Files
1
Synced
Sep 23, 2026
How to use it

Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.

wanshuiyin/auto-claude-code-research-in-sleep/proof-checkerInstalls these files
  • SKILL.md

What this skill tells the agent

Proof Checker: Rigorous Mathematical Verification & Fixing

🔒 Do not wrap this skill in `/loop`, `/schedule`, or `CronCreate`. It is verdict-bearing — it judges proof validity across rounds, threading the reviewer's memory from Phase 1 → Phase 3 via codex-reply so the reviewer can check whether a fix actually closed the gap it flagged. An external timer re-enters from the top each tick, starting a fresh thread and losing that memory. Schedule the external wait that precedes it, not the verdict. See `shared-references/external-cadence.md`.

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-6-astra — Default model for the Codex backend, reasoning effort ultra (deep-audit tier; capability fallback gpt-6-astra+xhigh → gpt-5.5+xhigh per shared-references/reviewer-routing.md, capability errors only — never below xhigh). Manual backend uses a model the user chooses, but it must be a non-Claude model ARIS can classify (OpenAI, Google, DeepSeek, Moonshot/Kimi, Qwen) — the executor is Claude, so routing the proof review into any Claude product makes Claude judge Claude and voids the cross-model invariant (see shared-references/reviewer-routing.md).
  • REVIEWER_BACKEND = `codex` — Default: Codex MCP (ultra). Override with — reviewer: oracle-pro for Oracle MCP, or — reviewer: manual for Manual Review MCP. If manual-review MCP is unavailable, stop and print the install command; do not fall back to Codex. See shared-references/reviewer-routing.md.

Reviewer Calling Convention

When calling the reviewer, branch on REVIEWER_BACKEND:

If REVIEWER_BACKEND = `codex`: Use mcp__codex__codex for new review threads (model: gpt-6-astra, config: {"model_reasoning_effort": "ultra"}). Use mcp__codex__codex-reply for follow-up rounds (reuse threadId).

If REVIEWER_BACKEND = `manual`: Use mcp__manual_review__review for new review threads with: prompt: [exact same prompt that would go to Codex] config: {"model_reasoning_effort": "xhigh", "executor_model": "<actual executor model>", "require_reviewer_model": true} Save the returned threadId. Use mcp__manual_review__review_reply for follow-up rounds with: threadId: [saved manual-review threadId] prompt: [follow-up prompt] config: {"model_reasoning_effort": "xhigh", "executor_model": "<actual executor model>", "require_reviewer_model": true}

Prompt fidelity: the manual prompt must be exactly the same text that Codex would receive. Review tracing applies equally to both backends.

  • 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)
  • RENDER_HTML = true — When true (default), auto-render PROOF_AUDIT.md to HTML at workflow end via /render-html. Uses full Codex review gate (audit-class artifact — math-heavy content; render-fidelity check protects against MathJax breakage and matches the skill's cross-model audit invariant). Set false to skip, or pass — render html: false.

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^p without proving/assuming finite moments
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:

| Theorem | Required Conditions |

Use this skill in a project

Open any RiverX project, search the Skills panel for wanshuiyin/auto-claude-code-research-in-sleep/proof-checker, and install it in one click.

Use this skill