Skip to content

Conversation

@clementblaudeau
Copy link
Contributor

This PR leverages the recent work on Core Models to add functions for several modules of Core : options, result, default, clone, Fn/FnOnce.

Overview

  • In proof-libs/lean, models are added. They are lightly adapted (mostly namespacing) from a normal cargo hax into lean of the core-models crate.
  • In tests/lean-core-models, add tests for all the functions added in the lean library. The extracted lean is well-typed.
  • In rust-engine/backends/lean.rs fix a bug (missing parenthesis)

@clementblaudeau clementblaudeau requested a review from a team as a code owner October 27, 2025 23:12
Copy link
Contributor

@maximebuyse maximebuyse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!
About the tests, lean type-checking is not tested on these tests right? So do you manually try that it works?

@abentkamp
Copy link
Contributor

Hi, looks good to me!

As Maxime mentioned, it would be nice to actually test the Lean type-checking. I did it manually and it worked for me.

The name clash between hax's Result and Rust's Result is unfortunate. The name for hax's Result is borrowed from Aeneas? Does Aeneas have the same name clash then? I haven't been able to find Aeneas's modelling of Rust's Result.

@clementblaudeau
Copy link
Contributor Author

clementblaudeau commented Nov 13, 2025

I've rebased on main, and corrected the typo in the core models description. I agree that the name clash for Result is unfortunate, I've opened #1766

@maximebuyse maximebuyse self-requested a review November 13, 2025 12:58
@maximebuyse maximebuyse added this pull request to the merge queue Nov 13, 2025
Merged via the queue into main with commit eccbfef Nov 13, 2025
18 checks passed
@maximebuyse maximebuyse deleted the lean-core-models branch November 13, 2025 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants