lean-proof-verification-harness
Formal theorem proving, tactic validation, and invariant verification harness for Lean 4 and agent logic specs.
SKILL.mdskills/lean-proof-verification-harness/SKILL.md
GitHubLean Proof Verification Harness
Executes formal verification on Lean 4 source files, theorem declarations, and state invariant proofs.
See Skill Operator Guide for shared operating requirements.
Inputs & Outputs
Input Schema
| Property | Type | Required | Description |
|---|---|---|---|
source |
string |
Yes | Inline Lean 4 source code or path to .lean file |
strict |
boolean |
No | Fail verification if sorry or unverified axioms exist (default: true) |
targetTheorem |
string |
No | Target specific theorem/lemma name to verify |
routingTier |
string |
No | Cost-routing gateway tier for proof tactic synthesis (default: tier_2_frontier) |
Output Schema
{
"status": "VERIFIED | OPEN_OBLIGATIONS | FAILED",
"theoremsFound": 3,
"theoremsVerified": 3,
"sorryCount": 0,
"axiomsUsed": ["propext"],
"diagnostics": [],
"verificationDurationMs": 142
}
Verification Pipeline
- Syntax & AST Analysis: Extracts theorem signatures, tactic blocks (
by ...), definitions, structures, and axioms. - Obligation Auditing: Audits proof bodies for
sorry,admit, uninstantiated hypotheses, and ungrounded axioms. - Compiler Integration: Runs
lean --runorlake buildwhen Lean 4 toolchain is installed; executes deterministic AST invariant analysis when running in standalone mode. - Frontier Proof Synthesis: Routes unproven lemmas to the Multi-Model Cost-Routing Gateway on
tier_2_frontierfor tactic generation.