スキル一覧に戻る
hxrts

aristotle

by hxrts

Unofficial interface for the proving service aristotle.harmonic.fun

0🍴 0📅 2026年1月14日
GitHubで見るManusで実行

SKILL.md


name: aristotle description: Prove Lean 4 theorems using the Aristotle proof synthesis service. Use when the user mentions "aristotle", "prove", "fill sorries", or wants to automatically generate proofs for Lean files with sorry placeholders. allowed-tools:

  • Bash
  • Read
  • Edit
  • Write
  • Glob
  • Grep hooks: PreToolUse:
    • matcher: "Bash(aristotle prove-from-file:*)" hooks:
      • type: command command: ".claude/skills/aristotle/scripts/validate.sh"

Aristotle Theorem Prover

Aristotle is an LLM-powered proof synthesis service that generates verified Lean 4 proofs. Given a file with sorry placeholders, it returns either a complete proof, a counterexample if the statement is false, or an explanation of why it couldn't find a proof.

Features

  • Automatic Proof Synthesis: Fills sorry placeholders with verified Lean 4 proofs
  • Counterexample Finding: Automatically disproves false statements with counterexamples
  • Natural Language Input: Convert problems from text/LaTeX/markdown using --informal mode
  • Proof Guidance: Guide with natural language hints via PROVIDED SOLUTION: in doc comments
  • Custom Tactics: Output may include negate_state and revert_all tactics

See submission-guide.md for detailed examples and best practices.

TUI Modes

The Aristotle terminal UI (aristotle command without arguments) provides four modes:

ModeDescription
Fill SorriesSubmit Lean files with sorry placeholders for automatic proving
Upload PaperConvert natural language/LaTeX/markdown problems to formal proofs
Type PromptDirect text input mode for quick submissions
View HistoryDisplay all previous submissions with status and completion times

Instructions

1. Prepare the input file

Ensure your Lean file:

  • Has sorry placeholders for theorems you want proved
  • Uses admit for definitions or theorems to skip
  • Contains no axiom declarations (Aristotle cannot verify these)
  • Typechecks with lake env lean <file.lean>

Optionally add PROVIDED SOLUTION: hints in doc comments:

/--
Given x, y ∈ [0, π/2], show that cos(sqrt(x ^ 2 + y ^ 2)) ≤ cos x * cos y.

PROVIDED SOLUTION:
Set r := sqrt(x^2 + y^2). If r > π/2, then the inequality holds trivially
since the LHS is at most 1 and the RHS is non-negative...
-/
theorem my_theorem : ... := by
  sorry

2. Run the validation script

.claude/skills/aristotle/scripts/validate.sh <file.lean>

This checks for common issues before submission.

3. Submit to Aristotle

aristotle prove-from-file <input_file> [options]

Key options:

OptionDescriptionDefault
--output-file <path>Path to save solution file[input]_aristotle.lean
--context-folder <path>Include context files from folder-
--informalNatural language input modeformal Lean
--no-waitSubmit without waitingwait

4. Review the output

  • Proofs filled: sorry replaced with proof tactics
  • Counterexamples: False statements get a comment with proof of negation
  • Errors: See troubleshooting.md for fixes

5. Handle partial progress

If Aristotle hits budget limits or only solves some theorems, see troubleshooting.md for the recovery workflow.

Examples

Basic usage

aristotle prove-from-file Problems/Example.lean

With additional context

aristotle prove-from-file Problems/Hard.lean --context-folder ./notes/

Natural language input

aristotle prove-from-file problem.txt --informal --formal-input-context context.lean

Full workflow example

# 1. Validate the file
.claude/skills/aristotle/scripts/validate.sh Problems/my_theorem.lean

# 2. Submit to Aristotle
aristotle prove-from-file Problems/my_theorem.lean

# 3. Check the output
lake env lean Problems/my_theorem_aristotle.lean

How It Works

Aristotle uses a project-based workflow:

  1. Create: Initialize a project with optional context files
  2. Add Context: Attach dependency files (up to 10 per request, unlimited requests)
  3. Solve: Submit the problem for processing
  4. Poll: Check status until completion
  5. Download: Retrieve the solved proof file

Project Status Values

NOT_STARTEDQUEUEDIN_PROGRESSCOMPLETE

Jobs may also enter FAILED (unrecoverable) or PENDING_RETRY (auto-recovering). See troubleshooting.md if a job seems stuck.

Input Modes

ModeFlagDescription
Formal(default)Direct Lean 4 code with theorem statements
Informal--informalNatural language mathematical descriptions

For informal mode, use --formal-input-context <file.lean> to provide type definitions and imports.

Technical Limits

LimitValue
File size100 MB per file
Context files10 per request (unlimited total via multiple calls)
Polling interval30 seconds (configurable)

Required Project Files

Aristotle validates your Lean project structure. Ensure you have:

  • lakefile.toml or lakefile.lean
  • lean-toolchain matching Aristotle's version

Automatic Import Resolution

By default (auto_add_imports=True), Aristotle:

  1. Detects your project root from lakefile.toml
  2. Parses imports in your input file
  3. Recursively discovers all local dependencies
  4. Uploads them as context automatically

To disable this and manually specify context files, use --context-files (mutually exclusive with auto-imports).

SDK Validation

The SDK automatically:

  • Validates file paths are within the Lean project
  • Enforces the 100 MB per-file limit
  • Checks for required project structure files
  • Resolves relative paths to absolute paths

Reference

All CLI options

OptionDescriptionDefault
--output-file <path>Path to save solution file[input]_aristotle.lean
--context-folder <path>Include .lean, .md, .txt, .tex files from folder-
--context-files <files...>Additional context files (incompatible with auto-imports)-
--informalNatural language input modeformal Lean
--formal-input-context <file>Lean context file for --informal mode-
--no-waitSubmit without waiting for completionwait
--silentSuppress console outputfalse
--no-auto-add-importsDisable automatic import resolutionenabled
--no-validate-lean-projectSkip Lean project validationvalidate
--polling-interval <sec>Polling interval when waiting30
--max-polling-failures <n>Max failures before early exit3
--api-key <key>API key (or set ARISTOTLE_API_KEY)-
--helpShow all available options-

Environment

Requires ARISTOTLE_API_KEY environment variable. Automatically loaded from .env when entering the nix shell.

Version compatibility

  • Lean toolchain: leanprover/lean4:v4.24.0
  • Mathlib: v4.24.0 (Oct 14, 2025) - commit f897ebcf72cd16f89ab4577d0c826cd14afaafc7

Additional Resources

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です