Skip to content

feat(lean): preliminary core model extraction#1849

Merged
abentkamp merged 1 commit intomainfrom
lean-core-models
Jan 13, 2026
Merged

feat(lean): preliminary core model extraction#1849
abentkamp merged 1 commit intomainfrom
lean-core-models

Conversation

@abentkamp
Copy link
Copy Markdown
Contributor

@abentkamp abentkamp commented Jan 6, 2026

This PR adds an option to core-models/hax.sh to extract Lean code from Core models. It is able to generate a Lean file that compiles.

To make the extraction work, I currently must exclude some functions and do some text replacements using sed (see hax.sh). This is due to the following issues:

Moreover, the following points should be improved in future PRs:

This PR lets us produce a compiling Lean file, but the file is not part of this PR. This is because the generated items are all in the namespace Core_models, whereas extracted Code references Core. So we cannot use the file just yet. In a future PR, I plan to make extraction generate references to the Core_models namespace whenever extracting something that is not Core models itself. (#1855)

[skip changelog]

@abentkamp abentkamp force-pushed the lean-core-models branch 3 times, most recently from 7ecb79a to 780dd06 Compare January 7, 2026 13:19
@abentkamp abentkamp requested a review from maximebuyse January 7, 2026 13:54
@abentkamp abentkamp marked this pull request as ready for review January 7, 2026 13:55
@abentkamp abentkamp requested a review from a team as a code owner January 7, 2026 13:55
@abentkamp abentkamp added lean Related to the Lean backend or library proof-lib Issues related the backend-specific definitions (in the proof-lib folder) labels Jan 7, 2026
@abentkamp abentkamp added this pull request to the merge queue Jan 13, 2026
Merged via the queue into main with commit 601c253 Jan 13, 2026
17 of 18 checks passed
@abentkamp abentkamp deleted the lean-core-models branch January 13, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lean Related to the Lean backend or library proof-lib Issues related the backend-specific definitions (in the proof-lib folder)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants