Loading...
Loading...
Formal theorem proving with research, testing, and verification phases
npx skill4agent add parcadei/continuous-claude-v3 prove# Check if lake is available
command -v lake &>/dev/null && echo "Lean4 installed" || echo "Lean4 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/provelake build/prove every group homomorphism preserves identity
/prove Monsky's theorem
/prove continuous functions on compact sets are uniformly continuous┌─────────────────────────────────────────────────────────────┐
│ 📚 RESEARCH → 🏗️ DESIGN → 🧪 TEST → ⚙️ IMPLEMENT → ✅ VERIFY │
└─────────────────────────────────────────────────────────────┘# 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_?a?bFoo, Barmcp__nia__searchmcp__perplexity__searchsorry-- SORRY: needs proof (straightforward)
-- SORRY: needs proof (complex - ~50 lines)
-- AXIOM CANDIDATE: v₂ constraint - will test in Phase 3proofs/<theorem_name>.lean-- Create #eval or example statements
#eval testLemma (randomInput1) -- should return true
#eval testLemma (randomInput2) -- should return truelake env lean test_lemmas.leanlake build && grep "depends on axioms" outputgrep -c "sorry" proofs/<file>.lean✓ 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| Tool | Best For | Command |
|---|---|---|
| Loogle | Type signature search (PRIMARY) | |
| Nia MCP | Library documentation | |
| Perplexity MCP | Proof strategies, papers | |
| WebSearch | General references | WebSearch tool |
| WebFetch | Specific paper/page content | WebFetch tool |
~/tools/loogleloogle-server &┌─────────────────────────────────────────────────────┐
│ ✓ 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 │
└─────────────────────────────────────────────────────┘| 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 |
/loogle-search/math-router/lean4