Skip to content

Conversation

@Rob23oba
Copy link
Contributor

@Rob23oba Rob23oba commented Nov 1, 2025

This PR fixes a case of overeager constant folding on Nat where the compiler would mistakenly assume 0 - x = x (see also #11042 for the same bug on UInts).

@github-actions github-actions bot added the changelog-compiler Compiler, runtime, and FFI label Nov 1, 2025
@Rob23oba Rob23oba marked this pull request as ready for review November 1, 2025 09:53
@hargoniX hargoniX added this pull request to the merge queue Nov 1, 2025
Merged via the queue into leanprover:master with commit 1fa67d0 Nov 1, 2025
17 checks passed
@Rob23oba Rob23oba deleted the nat-sub-fold branch November 1, 2025 10:34
github-merge-queue bot pushed a commit that referenced this pull request Nov 1, 2025
This PR enforces users of the constant folder API to provide proofs of
their algebraic properties,
thus hopefully avoiding bugs such as #11042 and #11043 in the future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-compiler Compiler, runtime, and FFI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants