🎯

prove

🎯Skill

from parcadei/continuous-claude-v3

VibeIndex|
What it does

prove skill from parcadei/continuous-claude-v3

prove

Installation

Install skill:
npx skills add https://github.com/parcadei/continuous-claude-v3 --skill prove
11
AddedJan 27, 2026

Skill Details

SKILL.md

Formal theorem proving with research, testing, and verification phases

Overview

# /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:

```bash

# Check if lake is available

command -v lake &>/dev/null && echo "Lean4 installed" || echo "Lean4 NOT installed"

```

If not installed:

```bash

# 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)

```bash

# 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

  1. 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)?

  1. 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)

  1. 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

  1. Annotate each sorry:

```lean

-- SORRY: needs proof (straightforward)

-- SORRY: needs proof (complex - ~50 lines)

-- AXIOM CANDIDATE: vβ‚‚ constraint - will test in Phase 3

```

  1. Verify skeleton compiles (with sorries)

Output: proofs/.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

```lean

-- Create #eval or example statements

#eval testLemma (randomInput1) -- should return true

#eval testLemma (randomInput2) -- should return true

```

  1. Run tests

```bash

lake env lean test_lemmas.lean

```

  1. 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

```bash

lake build && grep "depends on axioms" output

```

- Standard: propext, Classical.choice, Quot.sound βœ“

- Custom axioms: LIST EACH ONE

  1. Sorry Count

```bash

grep -c "sorry" proofs/.lean

```

- Must be 0 for "complete" proof

  1. Generate Summary

```

βœ“ MACHINE VERIFIED (or ⚠️ PARTIAL - N axioms)

Theorem:

Proof Strategy:

Proved:

-

-

Axiomatized (if any):

- :

File: proofs/.lean

```

Research Tool Priority

Use whatever's available, in order:

| Tool | Best For | Command |

|------|----------|---------|

| Loogle | Type signature search (PRIMARY) | loogle-search "pattern" |

| Nia MCP | Library documentation | mcp__nia__search |

| Perplexity MCP | Proof strategies, papers | mcp__perplexity__search |

| WebSearch | General references | WebSearch tool |

| WebFetch | Specific paper/page content | WebFetch 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

| Domain | Examples |

|--------|----------|

| Category Theory | Functors, natural transformations, Yoneda |

| Abstract Algebra | Groups, rings, homomorphisms |

| Topology | Continuity, compactness, connectedness |

| Analysis | Limits, derivatives, integrals |

| Logic | Propositional, 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

More from this repository10

🎯
agentica-claude-proxy🎯Skill

Enables seamless integration between Agentica agents and Claude Code CLI by managing proxy configurations, tool permissions, and response formatting.

🎯
git-commits🎯Skill

Manages git commits by removing Claude attribution, generating reasoning documentation, and ensuring clean commit workflows.

🎯
debug-hooks🎯Skill

Systematically diagnose and resolve hook registration, execution, and output issues in Claude Code projects by checking cache, settings, files, and manual testing.

🎯
migrate🎯Skill

Systematically researches, analyzes, plans, implements, and reviews migrations across frameworks, languages, and infrastructure with minimal risk.

🎯
background-agent-pings🎯Skill

Enables background agent execution with system-triggered progress notifications, avoiding manual polling and context flooding.

🎯
agentica-infrastructure🎯Skill

Provides comprehensive reference and infrastructure for building sophisticated multi-agent coordination patterns and workflows with precise API specifications and tracking mechanisms.

🎯
system-overview🎯Skill

Generates a comprehensive summary of the current system's configuration, components, and key metrics across skills, agents, hooks, and other core systems.

🎯
cli-reference🎯Skill

Provides comprehensive CLI commands and flags for interacting with Claude Code, enabling headless mode, automation, and session management.

🎯
braintrust-tracing🎯Skill

Traces and correlates Claude Code session events across parent and sub-agent interactions using comprehensive Braintrust instrumentation.

🎯
morph-apply🎯Skill

Rapidly edits files using AI-powered Morph Apply API with high accuracy and speed, without requiring full file context.