Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
parcadei avatar

Prove

  • 485 installs
  • 3.9k repo stars
  • Updated January 26, 2026
  • parcadei/continuous-claude-v3

prove is a Claude Code skill that runs a 5-phase machine-verified proof workflow in Lean4 for developers who need formal theorem proofs without manually writing Lean syntax.

About

prove is a high-priority skill from parcadei/continuous-claude-v3 invoked via `/prove` with triggers including verify, show that, is it true, and formalize. It runs five phases: RESEARCH before Lean, DESIGN with sorry skeletons, TEST via counterexample search, IMPLEMENT by filling sorries, and VERIFY through proof audit. Prerequisites require Lean4 via the lake toolchain, installable through elan if missing. Allowed tools span Bash, Read, Write, Edit, WebSearch, WebFetch, AskUserQuestion, Grep, and Glob. prove targets mathematicians and engineers who want machine-checked guarantees rather than informal arguments, using /loogle-search for Mathlib type-signature discovery during research. With 455 installs on skills.sh from a 3.9K-star repository, prove automates checkpoints across phases so users avoid learning Lean syntax while still receiving verified proof artifacts.

  • prove

Prove by the numbers

  • 485 all-time installs (skills.sh)
  • +2 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #839 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/parcadei/continuous-claude-v3 --skill prove

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs485
repo stars3.9k
Last updatedJanuary 26, 2026
Repositoryparcadei/continuous-claude-v3

How do you get machine-verified proofs in Lean4?

Use prove for development tasks

Who is it for?

Engineers and mathematicians who need formal Lean4 verification but want an agent-guided 5-phase workflow instead of writing proof tactics manually.

Skip if: Developers seeking informal unit tests, runtime assertions, or proofs without Lean4 and elan/lake installed on the machine.

When should I use this skill?

User types /prove, asks to verify or formalize a claim, or wants machine-checked proofs with show that or is it true phrasing.

What you get

Lean4 proof artifacts with researched Mathlib references, tested sorry skeletons, implemented proofs, and VERIFY-phase audit results

  • Lean4 proof files
  • verified theorem artifacts
  • phase audit report

By the numbers

  • 455 installs on skills.sh
  • Runs a 5-phase formal proof workflow in Lean4
  • Source continuous-claude-v3 repository has 3.9K GitHub stars

Files

SKILL.mdMarkdownGitHub ↗

/prove - Machine-Verified Proofs (5-Phase Workflow)

For mathematicians who want verified proofs without learning Lean syntax.

Prerequisites

Before using this skill, check Lean4 is installed:

# Check if lake is available
command -v lake &>/dev/null && echo "Lean4 installed" || echo "Lean4 NOT installed"

If not installed:

# Install elan (Lean version manager)
curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh

# Restart shell, then verify
lake --version

First run of /prove will download Mathlib (~2GB) via lake build.

Usage

/prove every group homomorphism preserves identity
/prove Monsky's theorem
/prove continuous functions on compact sets are uniformly continuous

The 5-Phase Workflow

┌─────────────────────────────────────────────────────────────┐
│  📚 RESEARCH → 🏗️ DESIGN → 🧪 TEST → ⚙️ IMPLEMENT → ✅ VERIFY  │
└─────────────────────────────────────────────────────────────┘

Phase 1: RESEARCH (before any Lean)

Goal: Understand if/how this can be formalized.

1. Search Mathlib with Loogle (PRIMARY - type-aware search)

   # Use loogle for type signature search - finds lemmas by shape
   loogle-search "pattern_here"

   # Examples:
   loogle-search "Nontrivial _ ↔ _"           # Find Nontrivial lemmas
   loogle-search "(?a → ?b) → List ?a → List ?b"  # Map-like functions
   loogle-search "IsCyclic, center"           # Multiple concepts

Query syntax:

  • _ = any single type
  • ?a, ?b = type variables (same var = same type)
  • Foo, Bar = must mention both

2. Search External - What's the known proof strategy?

  • Use Nia MCP if available: mcp__nia__search
  • Use Perplexity MCP if available: mcp__perplexity__search
  • Fall back to WebSearch for papers/references
  • Check: Is there an existing formalization elsewhere (Coq, Isabelle)?

3. Identify Obstacles

  • What lemmas are NOT in Mathlib?
  • Does proof require axioms beyond ZFC? (Choice, LEM, etc.)
  • Is the statement even true? (search for counterexamples)

4. Output: Brief summary of proof strategy and obstacles

CHECKPOINT: If obstacles found, use AskUserQuestion:

  • "This requires [X]. Options: (a) restricted version, (b) accept axiom, (c) abort"

Phase 2: DESIGN (skeleton with sorries)

Goal: Build proof structure before filling details.

1. Create Lean file with:

  • Imports
  • Definitions needed
  • Main theorem statement
  • Helper lemmas as sorry

2. Annotate each sorry:

   -- SORRY: needs proof (straightforward)
   -- SORRY: needs proof (complex - ~50 lines)
   -- AXIOM CANDIDATE: v₂ constraint - will test in Phase 3

3. Verify skeleton compiles (with sorries)

Output: proofs/<theorem_name>.lean with annotated structure

Phase 3: TEST (counterexample search)

Goal: Catch false lemmas BEFORE trying to prove them.

For each AXIOM CANDIDATE sorry:

1. Generate test cases

   -- Create #eval or example statements
   #eval testLemma (randomInput1)  -- should return true
   #eval testLemma (randomInput2)  -- should return true

2. Run tests

   lake env lean test_lemmas.lean

3. If counterexample found:

  • Report the counterexample
  • Use AskUserQuestion: "Lemma is FALSE. Options: (a) restrict domain, (b) reformulate, (c) abort"

CHECKPOINT: Only proceed if all axiom candidates pass testing.

Phase 4: IMPLEMENT (fill sorries)

Goal: Complete the proofs.

Standard iteration loop: 1. Pick a sorry 2. Write proof attempt 3. Compiler-in-the-loop checks (hook fires automatically) 4. If error, Godel-Prover suggests fixes 5. Iterate until sorry is filled 6. Repeat for all sorries

Tools active:

  • compiler-in-the-loop hook (on every Write)
  • Godel-Prover suggestions (on errors)

Phase 5: VERIFY (audit)

Goal: Confirm proof quality.

1. Axiom Audit

   lake build && grep "depends on axioms" output
  • Standard: propext, Classical.choice, Quot.sound ✓
  • Custom axioms: LIST EACH ONE

2. Sorry Count

   grep -c "sorry" proofs/<file>.lean
  • Must be 0 for "complete" proof

3. Generate Summary

   ✓ MACHINE VERIFIED (or ⚠️ PARTIAL - N axioms)

   Theorem: <statement>
   Proof Strategy: <brief description>

   Proved:
   - <lemma 1>
   - <lemma 2>

   Axiomatized (if any):
   - <axiom>: <why it's needed>

   File: proofs/<name>.lean

Research Tool Priority

Use whatever's available, in order:

ToolBest ForCommand
LoogleType signature search (PRIMARY)loogle-search "pattern"
Nia MCPLibrary documentationmcp__nia__search
Perplexity MCPProof strategies, papersmcp__perplexity__search
WebSearchGeneral referencesWebSearch tool
WebFetchSpecific paper/page contentWebFetch tool

Loogle setup: Requires ~/tools/loogle with Mathlib index. Run loogle-server & for fast queries.

If no search tools available, proceed with caution and note "research phase skipped".

Checkpoints (automatic)

The workflow pauses for user input when:

  • ⚠️ Research finds obstacles
  • ❌ Testing finds counterexamples
  • 🔄 Implementation hits unfillable sorry after N attempts

Output Format

┌─────────────────────────────────────────────────────┐
│ ✓ MACHINE VERIFIED                                  │
│                                                     │
│ Theorem: ∀ φ : G →* H, φ(1_G) = 1_H                │
│                                                     │
│ Proof Strategy: Direct application of              │
│ MonoidHom.map_one from Mathlib.                    │
│                                                     │
│ Phases:                                             │
│   📚 Research: Found in Mathlib.Algebra.Group.Hom  │
│   🏗️ Design: Single lemma, no sorries needed       │
│   🧪 Test: N/A (trivial)                           │
│   ⚙️ Implement: 3 lines                            │
│   ✅ Verify: 0 custom axioms, 0 sorries            │
│                                                     │
│ File: proofs/group_hom_identity.lean               │
└─────────────────────────────────────────────────────┘

What I Can Prove

DomainExamples
Category TheoryFunctors, natural transformations, Yoneda
Abstract AlgebraGroups, rings, homomorphisms
TopologyContinuity, compactness, connectedness
AnalysisLimits, derivatives, integrals
LogicPropositional, first-order

Limitations

  • Complex proofs may take multiple iterations
  • Novel research-level proofs may exceed capabilities
  • Some statements are unprovable over ℚ (need ℝ extension)

Behind The Scenes

  • Lean 4.26.0 - Theorem prover
  • Mathlib - 100K+ formalized theorems
  • Godel-Prover - AI tactic suggestions (via LMStudio)
  • Compiler-in-the-loop - Automatic verification on every write
  • Research tools - Nia, Perplexity, WebSearch (graceful degradation)

See Also

  • /loogle-search - Search Mathlib by type signature (used in Phase 1 RESEARCH)
  • /math-router - For computation (integrals, equations)
  • /lean4 - Direct Lean syntax access

Related skills

How it compares

Pick prove for Lean4 machine-verified theorems; use conventional TDD skills when informal unit tests suffice.

FAQ

What are the five prove workflow phases?

prove runs RESEARCH before Lean, DESIGN with sorry skeletons, TEST via counterexample search, IMPLEMENT by filling sorries, and VERIFY through proof audit—five sequential phases with automatic checkpoints.

What must be installed before using prove?

prove requires Lean4 with the lake command available. The skill checks `command -v lake` and documents elan installation via curl when Lean4 is not already present.

Backend & APIsbackendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.