Skip to main content
Glama

prove_lean_code

Submit Lean code to automatically fill 'sorry' placeholders and generate proofs using the Aristotle theorem proving API.

Instructions

Submits Lean code directly to Aristotle to fill in 'sorry' placeholders. Returns the Project ID immediately.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lean_codeYes

Implementation Reference

  • main.py:127-145 (handler)
    The main handler function for the 'prove_lean_code' tool. It is registered via the @mcp.tool() decorator. This function takes Lean code as a string, submits it to Aristotle's Project.prove_from_file for proving (filling 'sorry' placeholders), adds the project to monitored_projects, and returns the project ID.
    async def prove_lean_code( lean_code: str, ctx: Context | None = None, ) -> str: """ Submits Lean code directly to Aristotle to fill in 'sorry' placeholders. Returns the Project ID immediately. """ if ctx: await ctx.info("Submitting Lean code to Aristotle...") project_id = await Project.prove_from_file( # type: ignore input_content=lean_code, project_input_type=ProjectInputType.FORMAL_LEAN, wait_for_completion=False ) monitored_projects.add(project_id) return f"Project started with ID: {project_id}."

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gleachkr/aristotle-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server