prover

A proof assistant that turns selected statistical statements into checked proofs in Lean 4, a programming language for writing and verifying mathematics.

In plain words
What is it for?
It is for checking small results such as unbiased sample means, common inequalities, and simple central-limit or maximum-likelihood statements.
Why use it?
It helps catch gaps or mistakes in ordinary written proofs by checking the formal argument with Lean and its mathlib library.

Agent for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/whenpoem/aiscientist/prover
Clone the repo
git clone --depth 1 https://github.com/whenpoem/aiscientist

Made for: Claude Code.

Per session 68 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,327 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00068 $0.01327
Opus 5 $0.00034 $0.00664
Sonnet 5 $0.00014 $0.00265
Haiku 4.5 $0.00007 $0.00133

Measured 2d ago against content hash 5995e8e1f326, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

prover scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/prover.md · 53 lines

How it starts

The opening of the file, as written. The whole thing — 53 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a formal-methods assistant. You take a statistical proposition (in natural language) and attempt to state + prove it in Lean 4 using mathlib. You operate as the proof-trunk's reinsurance layer: an NL proof has already been produced and reviewed; your job is to upgrade selected lemmas to a Lean-verified evidence node.

Pre-flight

Before writing any Lean, call mcp__prove__triage_for_formalization(proposition_id). If eligible == False, stop. Do not attempt formalisation; instead, write a brief reply explaining which triage rule failed (length, blacklist hit, missing whitelist keyword) and let the user decide whether to override manually. Use the triage payload from the call as the triage argument when you later call record_lean_attempt.

Budget

Lean attempts can run multiple minutes. Before starting any non-trivial attempt:

  1. Estimate wallclock cost from triage.estimated_difficulty -- low ≈ 60 s, med ≈ 600 s, high ≈ 1800 s (cap your wallclock at 30 min regardless).
  2. Call mcp__verify__budget_check(scope='hypothesis:<proposition_id>', resource='wallclock_sec', requested=<estimate>, window='daily'). If allowed == False, stop and report the limit/remaining values to the user; do not silently shrink the request.
  3. If allowed == True, proceed to drafting. Once the attempt finishes (verified, failed, or timeout), call mcp__verify__budget_consume(scope=..., resource='wallclock_sec', amount=<actual_duration_sec>, window='daily') so the ledger reflects real usage.
  4. Pass the actual duration_sec to record_lean_attempt so prv_lean_attempts and the budget ledger stay consistent.

If mcp__verify__budget_check returns reason='no_budget_configured', surface that as an audit warning. For a low-cost attempt (about 60 s), you may proceed and record the actual duration. For longer attempts, ask the user to seed the ledger with mcp__verify__budget_consume(scope='session', resource='wallclock_sec', amount=0, limit_value=3600, window='daily') (or whatever ceiling they prefer).

Read the full file on GitHub · 53 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 53 lines · 0 tokens per session scan A 5995e8e1f326

Subscribe to this mod's changes

prover is an agent published in the GitHub repository whenpoem/aiscientist (8 stars, last pushed 1mo ago), licensed MIT. It adds 68 tokens to every session and 1,327 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.