SkillsLib.ai

Prove

Formal theorem proving with machine verification in Lean 4

4.4(46 reviews)
1,000+ downloads
Updated Nov 2026
Verified SafeSecurity VerifiedThis skill was analyzed by our AI security scanner for harmful content including data exfiltration, system manipulation, credential theft, and prompt injection. No threats were detected.

What You Can Do

You can formally verify mathematical proofs by translating theorems into Lean 4 code, leveraging Mathlib's extensive library of formalized mathematics. The skill guides you through researching existing lemmas, designing proof strategies, testing approaches, implementing formal proofs, and verifying correctness—turning informal mathematical claims into machine-checked theorems without requiring deep Lean syntax expertise.

Features

5-phase structured workflow

research, design, test, implement, and verify proofs systematically

Mathlib integration

access 100,000+ formalized lemmas and theorems via Loogle type-aware search

Type signature search

find existing lemmas by mathematical structure, not just keywords

Lean 4 code generation

Claude produces production-ready proof scripts with proper syntax

Iterative testing

test proof tactics incrementally before final verification

Machine verification

Lean 4 compiler confirms correctness; no human review needed

Research phase automation

Web search and Loogle queries identify proven strategies

Formalization guidance

Clear templates for translating informal proofs to formal notation

Example Output

Example 1: Group Homomorphism Identity Preservation

code
theorem group_homomorphism_preserves_id (G H : Type*) [Group G] [Group H] 
  (φ : G →* H) : φ 1 = 1 := 
  map_one φ

Proof verified: ✓ Compiles without errors

Example 2: Continuous Functions on Compact Sets

code
theorem continuous_on_compact_is_uniform (f : ℝ → ℝ) (K : Set ℝ) 
  (hf : ContinuousOn f K) (hK : IsCompact K) : 
  UniformContinuousOn f K :=
  hf.uniformContinuousOn_of_compact hK

Proof verified: ✓ Uses Mathlib's compact space theorem (2 lemmas)

Example 3: Research Phase Output

For "Monsky's theorem":

  • Located Mathlib.NumberTheory.Zsqrtd.Basic with relevant field theory
  • Found 47 candidate lemmas via type signature matching
  • Identified proof strategy: construct explicit counterexample using 2-adic valuation

What's Included

  • SKILL.md: Complete 5-phase workflow specification with Lean 4 syntax templates
  • Loogle search checklists: Type signature patterns for common mathematical structures (groups, rings, topology, analysis)
  • Proof strategy templates: Induction, case analysis, contradiction, and term-mode proof skeletons
  • Lean 4 tactic quick reference: Common tactics with examples (rw, simp, exact, apply, sorry)
  • Mathlib navigation guide: How to browse and import modules for group theory, topology, and number theory

Who It's For

  • Mathematicians and pure math researchers — Formalize theorems without learning theorem prover syntax
  • Logic and computation theory specialists — Verify proof correctness at machine precision
  • Academic mathematicians — Create publication-ready machine-verified proofs
  • PhD students in mathematics — Formalize dissertation theorems for reproducibility
  • Automated theorem proving practitioners — Scale proof verification across research libraries

Best For

  • Formalizing existing mathematical theorems from papers and textbooks
  • Verifying correctness of abstract algebra proofs (groups, rings, fields)
  • Proving topology and analysis theorems (continuity, compactness, convergence)
  • Generating Lean 4 code from informal mathematical statements
  • Discovering related lemmas and proof strategies through Mathlib search

You might also like

Implement Task
$35
Full-Stack4.6(48)
Implement Task

You can deploy this agent to execute specific implementation tasks within a larger development plan. It operates independently with fresh context, follows test-driven development principles for every code change, and creates comprehensive handoff documentation that captures progress, decisions, and learnings for the next task executor. This ensures consistent code quality, prevents rework, and maintains continuity across distributed implementation efforts.

Typescript Strict Mode Enforcer
$20
Backend4.2(51)
Typescript Strict Mode Enforcer

This skill scans your TypeScript codebase for type safety violations and systematically remediates them. You can automatically remove implicit any types, add comprehensive type annotations to functions and variables, configure strict mode compiler options in tsconfig.json, and receive actionable refactoring guidance with concrete code examples. It's designed for migrating existing projects to strict mode or enforcing strict practices before production deployment.

Bid Assembly & Analysis for Preconstruction Estimates
$40
Bid Assembly & Analysis for Preconstruction Estimates

You can rapidly process multiple subcontractor bid responses—from trade contractors, material suppliers, and specialty vendors—into a cohesive, auditable estimate structure. Claude extracts key bid components, identifies pricing inconsistencies against benchmarks or prior projects, flags scope gaps and exclusions, and organizes everything by CSI division for seamless estimate assembly. This eliminates manual spreadsheet comparison and reduces the risk of overlooked scope omissions or pricing anomalies when managing 15+ concurrent bids.

Shapely Compute
$30
Shapely Compute

You can construct geometric objects (points, lines, polygons, multigeometries), execute boolean operations (intersection, union, difference), apply spatial predicates (contains, intersects, within), calculate measurements (area, length, distance, centroid), and transform geometries through translation, rotation, and scaling. This skill handles geometry validation, invalid geometry repair, and complex spatial analysis tasks.

Construction Estimate Analysis & Refinement
$35
Estimating4.0(34)
Construction Estimate Analysis & Refinement

You can systematically analyze construction estimates by breaking down components, validating labor and material pricing against market data, identifying embedded errors or outdated assumptions, and applying data-driven contingency allocation. Claude helps you produce risk-adjusted cost projections that are defensible to stakeholders and competitive in bid scenarios, reducing estimate variance and catching pricing gaps before client submission.

Backend Code Review Assistant
$40
Backend Code Review Assistant

This skill systematically reviews backend code to uncover bugs, performance bottlenecks, security vulnerabilities, and architectural debt before deployment. You provide code (functions, diffs, or full files), and it delivers prioritized findings with detailed explanations and actionable fixes. Every review includes severity assessment, code examples, and concrete recommendations to improve quality and safety.

Pdf
$25
Backend4.4(48)
Pdf

You can perform end-to-end PDF operations including extracting text and metadata from documents, merging multiple PDFs into a single file, splitting PDFs by page ranges, filling fillable forms programmatically, and adding text overlays to non-fillable PDFs. This skill handles both simple read operations and complex document workflows, making it essential for document processing, form automation, and PDF batch operations.

API Parameter Validation & Security Hardening
$30
API Parameter Validation & Security Hardening

You get Claude to analyze your API specifications and automatically generate bulletproof parameter validation logic. Claude creates security-hardened middleware, enforces type constraints, detects malicious input patterns, and generates comprehensive error handling — all tailored to your framework and existing codebase. The result is production-ready validation code with zero unvalidated inputs reaching your business logic.

$25.00