Repository navigation
fix: parse exposition declarations without replaying proofs - #337
Conversation
|
/profile |
Greptile SummaryThe PR changes exposition extraction to parse modules against their compiled environments without re-elaborating existing declarations, avoiding duplicate execution of private declaration bodies.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| scripts/exposition/Extract.lean | Replaces full command processing with selective parsing and context elaboration while skipping declarations already present in the imported environment. |
| python/lean_pool/exposition/SCHEMA.md | Documents the extractor’s new parse-without-declaration-replay behavior and its rationale for private declarations. |
| NOTICE | Adds generated attribution entries for two pooled projects. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Load compiled module environment] --> B[Parse next source command]
B --> C{Contains compiled declaration?}
C -->|No| D[Elaborate context command]
C -->|Yes| E{Defines notation or parser syntax?}
E -->|Yes| D
E -->|No| F[Skip declaration elaboration]
D --> G[Record parsed syntax]
F --> G
G --> H{Terminal command?}
H -->|No| B
H -->|Yes| I[Classify commands and emit JSON]
Reviews (4): Last reviewed commit: "Clarify exposition parser initialization" | Re-trigger Greptile
|
/profile |
🤖 LLM review — not a content PR (skipped)Reviewed head: No model review: this PR changes Lean only outside Skip rule: the fit-and-significance review is for content PRs. Tooling and CI changes that happen to touch a |
|
/review |
|
/profile |
|
/review |
Summary
Motivation
The extractor previously used
IO.processCommandsover source whose compiled declarations were already imported. Public declarations failed quickly as already declared, but private declarations received fresh internal names and their bodies ran again. Expensive kernel certificates inFrameBoosters.leantherefore took minutes a second time during documentation extraction and prompted a content workaround that exposed implementation declarations.Validation
lake env lean scripts/exposition/Extract.leanFrameBoostersproject environment: old extractor 695.31s, latest extractor about 6s; dump and command files byte-identical