Lean 4 Paper, Requirement & Report Synchronization
Maintain bidirectional fidelity between informal papers/reports and formal Lean 4 declarations across the full lifecycle: pre-proof requirement extraction, post-proof LaTeX report generation, theorem-count synchronization, and readability review.
Routing
- USE FOR: extracting formalizable claims from papers (
requirementsmode), compiling blueprint artifacts into LaTeX/PDF reports (reportmode), updating paper theorem counts/citations (syncmode), and auditing draft readability (feedbackmode). - DO NOT USE FOR: authoring step-by-step pedagogical proof narratives (
@lean-pedagogical-exposition) or annotating Lean declarations with@[blueprint](@lean-blueprint).
Workflow
- Select Mode --
requirements(paper -> 3-part spec queue),report(scripts/lean/blueprint_to_report.py-> LaTeX),sync(scripts/lean/metric_sync.py-> update appendix counts &[T<chap>.<idx>]anchors), orfeedback(flag undefined terms & broken citations). - Verify Identifier & Citation Parity -- Run
scripts/lean/check_citations.pyso every Lean theorem/module cited in prose physically exists and issorry-free. - Enforce Honest Scope -- Distinguish kernel-checked theorems from external hypotheses or idealized model assumptions; never overclaim formal coverage.
- Compile & Validate Typography -- Enforce
INV-001scoped Unicode and verify clean LaTeX/Markdown compilation with zero unresolved references.
Recovery & STOP
- Never cite a
sorry-bearing or non-existent Lean declaration as "formally verified" in any paper or report; halt and route back to@lean-proof. - Re-derive module/theorem counts from a clean build census rather than copying historical numbers from prose.
Handoffs
- Predecessors:
lean-blueprint,lean-verification-gate,lean-review-council. - Successors:
lean-specification,lean-pedagogical-exposition,lean-retro-methodology.
Detailed reference
- Layer-1 Fast Lookup Card (read first):
references/cards/lean-doc-sync-tables.md - Full handbook:
../../references/handbooks/lean-doc-sync-handbook.md
See also
../lean-pedagogical-exposition/SKILL.md-- Textbook-grade mathematical proof narratives../lean-blueprint/SKILL.md-- Lean@[blueprint]DAG scaffolding
