Skip to content

project-numina/numina-lean-agent / skills/code-transform

code-transform

Verified

Code transformation tools for repairing, simplifying, and extracting Lean proofs

reference-axle-simplify-theorems.md

View on GitHub
# axle simplify-theorems — Simplify Proofs

Simplifies working Lean proofs by removing unnecessary code and renaming unused variables, producing cleaner and more readable proofs.

## CLI Invocation

```bash
python skills/cli/axle.py simplify-theorems CONTENT --environment ENV [OPTIONS]
```

| Argument | Required | Default | Description |
|----------|----------|---------|-------------|
| `CONTENT` | yes | — | Lean file path or code string |
| `--environment` | yes | — | Lean environment, e.g. `lean-4.28.0` |
| `--names` | no | all | Comma-separated theorem names |
| `--indices` | no | all | Comma-separated theorem indices |
| `--simplifications` | no | all | Which simplifications to apply (see below) |
| `--ignore-imports` | no | off | Ignore imports |
| `--timeout-seconds` | no | 120 | Max execution time (max 300) |

## Available Simplifications

| Simplification name | What it does |
|---|---|
| `remove_unused_tactics` | Removes tactics that have no effect on the proof state |
| `remove_unused_haves` | Removes `have` bindings that are never referenced |
| `rename_unused_vars` | Renames unused variables to `_` |

## Examples

```bash
python skills/cli/axle.py simplify-theorems proof.lean --environment lean-4.28.0
python skills/cli/axle.py simplify-theorems proof.lean --environment lean-4.28.0 --simplifications remove_unused_tactics,remove_unused_haves
```

## Notes

- Only run on proofs that already compile successfully (use `python skills/cli/lean_check.py FILE` first).
- Best used as a final cleanup step after a proof is verified.
- `AXLE_API_KEY` environment variable is required.
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 319kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 319kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 319kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 319kUpdated Claude CodeCodexVerifiedInstall