feat: realizeConst for match equations#7247
Merged
Kha merged 2 commits intoleanprover:masterfrom Mar 3, 2025
Merged
Conversation
e9c0ae2 to
0f1ae17
Compare
|
Mathlib CI status (docs):
|
Kha
commented
Feb 27, 2025
Comment on lines
+255
to
+261
| -- We assume (and check below) that, if used asynchronously, enum attributes are set only in the | ||
| -- same context in which the tagged declaration was created | ||
| asyncMode := .async | ||
| replay? := some fun _ newState consts st => consts.foldl (init := st) fun st c => | ||
| match newState.find? c with | ||
| | some v => st.insert c v | ||
| | _ => st |
Member
Author
There was a problem hiding this comment.
Needed for @[inline] being applied to the splitter def
tests/lean/run/matchEqsBug.lean
Outdated
| test% f.match_1 | ||
| #check f.match_1.splitter | ||
|
|
||
| def g.match_1.splitter := 4 |
Member
Author
There was a problem hiding this comment.
The async code (must) assume that the same name isn't used by a private and a non-private declaration so this broke. I think that is an acceptable regression.
a27576d to
1a7b356
Compare
0e4db6d to
4c68db2
Compare
a0bfb55 to
e1d3692
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes generation of
matchequations and splitters compatible with parallelism.