Skip to content

Conversation

@nomeata
Copy link
Collaborator

@nomeata nomeata commented Dec 4, 2025

This PR avoids running substCore twice in caseValues.

@nomeata nomeata added awaiting-mathlib We should not merge this until we have a successful Mathlib build changelog-language Language features and metaprograms labels Dec 4, 2025
@nomeata
Copy link
Collaborator Author

nomeata commented Dec 4, 2025

!bench

@leanprover-radar
Copy link

leanprover-radar commented Dec 4, 2025

Benchmark results for 98a06ec against 0173444 are in! @nomeata

@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Dec 4, 2025
@leanprover-bot
Copy link
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI can not be attempted yet, as the nightly-testing-2025-12-03 tag does not exist there yet. We will retry when you push more commits. If you rebase your branch onto nightly-with-manual, reference manual CI should run now. You can force reference manual CI using the force-manual-ci label. (2025-12-04 14:04:35)

leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Dec 4, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Dec 4, 2025
@nomeata nomeata marked this pull request as ready for review December 4, 2025 14:53
@nomeata nomeata requested a review from kim-em as a code owner December 4, 2025 14:53
@nomeata nomeata changed the base branch from nightly-with-mathlib to master December 4, 2025 14:53
@nomeata nomeata enabled auto-merge December 4, 2025 14:53
This PR changes how match splitters are generated: Rather than rewriting
the match statement, the match compilation pipeline is used again.


The benefits are:

* Re-doing the match compilation means we can do more intelligent book
keeping, e.g. prove overlap assumptions only once and re-use the proof,
or prune the context of the MVar to speed up `contradiction`. This may
have allowed a different solution than #11200.
 
* It would unblock #11105, as the existing splitter implementation would
have trouble dealing with the matchers produced that way.
 
* It provides the necessary machinery also for source-exposed “none of
the above” bindings, a feature that we probably want at some point (and
we mostly need to find good syntax for, see #3136, although maybe I
should open a dedicated RFC).

* It allows us to skip costly things during matcher creation that would
only be useful for the splitter, and thus allows performance
improvements like #11508.
 
 * We can drop the existing implementation.
 
It’s not entirely free:

* We have to run `simpH` twice, once for the match equations and once
for the splitter.
@leanprover-community-bot leanprover-community-bot added builds-mathlib CI has verified that Mathlib builds against this PR and removed awaiting-mathlib We should not merge this until we have a successful Mathlib build labels Dec 4, 2025
@leanprover-community-bot
Copy link
Collaborator

@nomeata nomeata added this pull request to the merge queue Dec 4, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to invalid changes in the merge commit Dec 4, 2025
@nomeata nomeata added this pull request to the merge queue Dec 4, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to invalid changes in the merge commit Dec 4, 2025
@nomeata nomeata added this pull request to the merge queue Dec 4, 2025
github-merge-queue bot pushed a commit that referenced this pull request Dec 4, 2025
This PR avoids running substCore twice in caseValues.
Merged via the queue into master with commit f0738c2 Dec 4, 2025
21 of 22 checks passed
algebraic-dev pushed a commit that referenced this pull request Dec 8, 2025
This PR avoids running substCore twice in caseValues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

builds-mathlib CI has verified that Mathlib builds against this PR changelog-language Language features and metaprograms toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants