Skip to content

[Lean Backend] Improve support for functionalized loops#1695

Merged
clementblaudeau merged 10 commits intomainfrom
lean-loops
Sep 29, 2025
Merged

[Lean Backend] Improve support for functionalized loops#1695
clementblaudeau merged 10 commits intomainfrom
lean-loops

Conversation

@clementblaudeau
Copy link
Copy Markdown
Contributor

@clementblaudeau clementblaudeau commented Sep 18, 2025

This PR improves the support for loops in the Lean backend, by:

  1. Making them polymorphic on the bounds (start and end can now be usize, i32, u64, etc)
  2. Adding fold_range_return
  3. Fixing the lib

Besides, it fixes a small bug in the OCaml engine.

This is temporary, as we plan to not functionalize loops in the Lean backend

[Disclaimer] The proofs of Chacha (in Lean_chacha20_manual_edits.lean) have been removed. They were broken, and fixed by the refactor in #1696. Fixing them here in a state of the Lean lib that is not going to exist much longer seemed like unnecessary. We can wait for both this and #1696 to be approved and merge them together.

@clementblaudeau clementblaudeau changed the title [Lean Backend] Add basic support for loops [Lean Backend] Improve support for loops Sep 18, 2025
@clementblaudeau clementblaudeau marked this pull request as ready for review September 24, 2025 15:46
@clementblaudeau clementblaudeau requested a review from a team as a code owner September 24, 2025 15:46
@clementblaudeau clementblaudeau requested review from W95Psp and karthikbhargavan and removed request for a team and karthikbhargavan September 24, 2025 15:46
@clementblaudeau clementblaudeau changed the title [Lean Backend] Improve support for loops [Lean Backend] Improve support for functionalized loops Sep 24, 2025
Copy link
Copy Markdown
Contributor

@W95Psp W95Psp left a comment

Choose a reason for hiding this comment

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

Looks good to me, I only skemed through the Lean changes.
The OCaml engine type bug was pretty dumb indeed! 😄

Base automatically changed from lean-traits to main September 29, 2025 09:52
@clementblaudeau clementblaudeau added this pull request to the merge queue Sep 29, 2025
Merged via the queue into main with commit f88735a Sep 29, 2025
18 of 19 checks passed
@clementblaudeau clementblaudeau deleted the lean-loops branch September 29, 2025 12:26
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.

2 participants