academic-prover
3
总安装量
3
周安装量
#55258
全站排名
安装命令
npx skills add https://github.com/prismer-ai/prismer --skill academic-prover
Agent 安装分布
openclaw
3
antigravity
3
claude-code
3
github-copilot
3
codex
3
kiro-cli
3
Skill 文档
Academic Prover â Formal Verification
Overview
This skill provides access to three formal verification tools:
- Lean 4 (v4.27) â dependently-typed programming and theorem proving
- Coq (v8.18) â interactive proof assistant
- Z3 (v4.15) â SMT solver for satisfiability and optimization
All tools are accessed via the prover server at http://localhost:8081.
When To Use
- User asks to verify a proof, type-check code, or solve logical formulas
- User provides Lean 4, Coq, or Z3/SMT-LIB code
- User wants help with formal methods, theorem proving, or satisfiability checking
Lean 4
Type check
curl -sf -X POST http://localhost:8081/lean/check \
-H "Content-Type: application/json" \
-d '{"code": "#check Nat"}' | jq .
# â {"success": true, "output": "Nat : Type\n", "errors": "", "returncode": 0}
Evaluate / Run
curl -sf -X POST http://localhost:8081/lean/run \
-H "Content-Type: application/json" \
-d '{"code": "#eval 2 + 3"}' | jq .
# â {"success": true, "output": "5\n", ...}
Multi-line example
curl -sf -X POST http://localhost:8081/lean/run \
-H "Content-Type: application/json" \
-d '{
"code": "def factorial : Nat â Nat\n | 0 => 1\n | n + 1 => (n + 1) * factorial n\n\n#eval factorial 10"
}' | jq .
Coq
Verify proof
curl -sf -X POST http://localhost:8081/coq/check \
-H "Content-Type: application/json" \
-d '{
"code": "Theorem plus_0_r : forall n : nat, n + 0 = n.\nProof.\n intros n. induction n.\n - reflexivity.\n - simpl. rewrite IHn. reflexivity.\nQed."
}' | jq .
# â {"success": true, "compiled": true, ...}
Z3 (SMT Solver)
Solve formula (SMT-LIB2 format)
curl -sf -X POST http://localhost:8081/z3/solve \
-H "Content-Type: application/json" \
-d '{
"formula": "(declare-const x Int)\n(declare-const y Int)\n(assert (= (+ x y) 10))\n(assert (= (- x y) 4))\n(check-sat)\n(get-model)"
}' | jq .
# â {"success": true, "result": "sat", "model": "[x = 7, y = 3]"}
API Reference
| Endpoint | Method | Body field | Response fields |
|---|---|---|---|
/lean/check |
POST | code |
success, output, errors, returncode |
/lean/run |
POST | code |
success, output, errors, returncode |
/coq/check |
POST | code |
success, compiled, output, errors, returncode |
/z3/solve |
POST | formula |
success, result (sat/unsat/unknown), model |
/health |
GET | â | {status, service} |
Response Interpretation
Lean 4
success: trueâ code is well-typed or evaluated successfullyoutputcontains#checktypes or#evalresultserrorscontains warnings or errors with line numbers
Coq
success: true+compiled: trueâ proof is valid and fully checked- Errors indicate which tactic failed and why
Z3
result: "sat"â satisfiable,modelshows the solutionresult: "unsat"â no solution exists (useful for proving impossibility)result: "unknown"â solver timed out or formula is undecidable
Tips
- Lean 4: Use
#checkfor type inspection,#evalfor computation. - Coq: Proofs must be self-contained â include all
Require Importstatements. - Z3: Input uses SMT-LIB2 format. Use
(check-sat)and(get-model). - All three tools have their full standard libraries available.
- For complex projects, write files to
/workspace/projects/and use CLI directly.