Add textbook formalization pipeline (extract -> LLM formalize -> elaboration check -> library assembly)
- extract_section.py: slice a book section out of a pdftotext -layout dump and list its labeled Theorem/Proposition/Lemma/Corollary/Definition items. - formalize.py: LLM-formalize a section into Lean 4 candidate statements (preferring Mathlib vocabulary) plus a definitions manifest. - check_statements.py: elaboration-only sanity check against a real Mathlib-backed Lean project (must run outside the Cowork sandbox, which has no Lean toolchain and can't run macOS binaries anyway). - build_library.py: assemble solved lean-bench results into a reusable .lean file, reusing each winning proof verbatim. - llm.py: standalone OpenAI-compatible chat client + .env loader, kept independent of lean_agent so this pipeline works without it installed. - Source PDFs and raw/layout text dumps are gitignored (copyrighted material); only code and the final short Lean statement datasets are tracked.
This commit is contained in:
@@ -3,3 +3,9 @@ __pycache__/
|
||||
.venv/
|
||||
.env
|
||||
results/
|
||||
|
||||
# Source textbook and raw/derived full-text dumps: copyrighted material, never commit.
|
||||
# Only code and the final short Lean statement datasets under datasets/ are tracked.
|
||||
*.pdf
|
||||
textbook/*.txt
|
||||
textbook/*_raw.txt
|
||||
|
||||
Reference in New Issue
Block a user