Repository navigation
fix: erase args for erased app params in toMono - #9224
Merged
Merged
Conversation
zwarich
force-pushed
the
type-based-app-noncomputable
branch
from
July 6, 2025 22:52
3d9ab42 to
311820f
Compare
zwarich
enabled auto-merge
July 6, 2025 22:52
zwarich
disabled auto-merge
July 6, 2025 22:55
Contributor
Author
|
!bench |
|
Mathlib CI status (docs):
|
Collaborator
|
Reference manual CI status:
|
Collaborator
|
Here are the benchmark results for commit 311820f. Benchmark Metric Change
=====================================================================================
+ Init.Data.BitVec.Lemmas re-elab branch-misses -2.7% (-21.6 σ)
+ Init.Data.List.Sublist re-elab -j4 branch-misses -2.4% (-106.5 σ)
+ Std.Data.DHashMap.Internal.RawLemmas branch-misses -4.0% (-24.8 σ)
+ riscv-ast.lean task-clock -10.3% (-60.7 σ)
- stdlib let-to-have transformation 3.3% (34.7 σ) |
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 changes the
toMonopass to consider the type of an application and erase all arguments corresponding to erased params. This enables a lightweight form of relevance analysis by changing the mono type of a decl. I would have liked to unify this with the behavior for constructors, but my attempt to give constructors the same behavior in #9222 (which was in preparation for this PR) had a minor performance regression that is really incidental to the change. Still, I decided to hold off on it for the time being. In the future, we can hopefully extend this to constructors, extern decls, etc.