lean_profile_proof
Profile a Lean theorem to obtain per-line timing and categories. This operation is slow and may trigger heartbeat limits on large or complex theorems.
Instructions
Run lean --profile on a theorem. Returns per-line timing and categories. SLOW - avoid on theorems that already hit heartbeat limits.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | Line where theorem starts (1-indexed) | |
| top_n | No | Number of slowest lines to return | |
| timeout | No | Max seconds to wait | |
| file_path | Yes | Absolute or project-root-relative path to Lean file |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ms | Yes | Total elaboration time in ms | |
| lines | No | Time per source line (>1% of total) | |
| categories | No | Cumulative time by category in ms |