No. The platform pins the Lean toolchain and exporter runtime for you. Do not include `lakefile.lean`, `lean-toolchain`, `lake-manifest.json`, or `.lake/` in the uploaded archive.
Lean To Code Translator W Proof - C Rust Wasm
Available ActionsEach successful request consumes credits as outlined below.
Details
The Lean to Code Translator converts exportable Lean proof programs into auditable C, Rust, or WebAssembly deliverables. Upload a Lean source bundle, choose the entry module and symbol, and get generated code plus a certificate, logs, and a verification bundle so you can preserve provenance, re-run validation, and confirm the artifact still matches the original source under the pinned runtime.
Use Cases
Compile Lean proof programs to C for native integration, Generate Rust exports from pinned Lean proof bundles, Produce constrained Wasm artifacts from Lean proof code, Package code generation runs with certificates and logs, Verify previously generated bundles before shipping or publication, Preserve reproducible build evidence for audits and reviews, Archive proof export bundles for downstream teams
Connect Your Agent In 5 Min
Watch the setup guide for your platform
Or Install Locally
STDIO connector for Claude Code, Codex, Cursor, Zed, and other LLMs that require STDIO or custom connections. This lightweight connector routes requests to https://api.agentpmt.com/mcp. All tool execution happens in the cloud and the server cannot edit any files on your computer.
npm install -g @agentpmt/mcp-routeragentpmt-setupCompile Lean proofs into auditable code artifacts
Proof Code Compiler starts asynchronous Lean proof export and verification jobs that produce reproducible C, Rust, or WebAssembly artifacts plus the files needed to audit and verify them later.
Read the full Lean input tutorial or download the working example zip.
Async workflow
- Call generate or verify. The tool returns a task_id immediately.
- Poll get_task with that task ID.
- When the task reaches completed, read the result payload for artifact metadata and file IDs.
- Use list_tasks to review recent jobs for the current budget.
What to upload for generation
Upload a .zip with a top-level UserProofs/ directory that contains only Lean source files.
Do not upload lakefile.lean, lean-toolchain, lake-manifest.json, or .lake/. The platform supplies the pinned Lean toolchain and runtime.
Generate inputs
- source_archive_file_id
- entry_module, such as UserProofs.Main
- entry_symbol, such as exportProgram
- target_language: c, rust, or wasm
You may also set use_vendored_runtime for the built-in smoke-test program or adjust timeout_seconds within 10-300 seconds.
Verification inputs
Use the bundle_file_id from a completed generation task. Choose fast to re-check hashes and certificate details, or full to rebuild and compare regenerated output under the pinned runtime.
Task results
Completed tasks can return generated output metadata, a verification bundle, a certificate, a generation log, and normalized source-archive metadata. Keep the bundle file ID if you want to verify the export later.
About The Developer

Apoth3osis
Joined Agent Payment: August 14, 2025
We build tools that enable AI agents to excel in the mathematical realm.
Our small team develops experimental and unique solutions in the AI arena, with a strong focus on modular computing for agentic applications and custom model deployment. We have handled projects for a variety of applications across many sectors, from algorithmic trading and financial analysis, to molecular simulations and predictions, to habitat and biodiversity monitoring and wildlife conservation.
Frequently Asked Questions
Can I upload `lakefile.lean`, `lean-toolchain`, or my own build configuration?
Does this compile any Lean program?
No. The selected definition must elaborate to `HeytingLean.LeanCP.CProgramDecl`, which is the exportable LeanCP program form supported by the current compiler path.
What do `entry_module` and `entry_symbol` mean?
`entry_module` is the Lean module imported from your uploaded source tree, such as `UserProofs.Main`. `entry_symbol` is the definition exported from that module, such as `exportProgram`.
What do I upload to Proof Code Compiler?
Upload a `.zip` whose top-level folder is `UserProofs/` and whose contents are Lean source files only. A single-file project can be as small as `UserProofs/Main.lean`.
What is the difference between `fast` and `full` verification?
`fast` checks certificate details and hashes without rebuilding. `full` rebuilds and re-exports under the pinned runtime, then compares the regenerated output with the stored artifact for stronger assurance.
What should I save after a successful generation?
Save the generated output file, the certificate, the generation log, and especially `artifacts.bundle.file_id`. The bundle is what you need for later verification.
Which target should I choose?
Use `c` when you want the broadest and lowest-risk support. Use `rust` when you want the same export path with Rust output. Use `wasm` only when you are comfortable with the current target being more constrained than `c`.





