-
Notifications
You must be signed in to change notification settings - Fork 715
refactor: replace PRange shape α with Rcc α and eight other types
#10319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
4c82b65 to
7f75a92
Compare
Contributor
Author
|
!bench |
Collaborator
|
Here are the benchmark results for commit f4372ef. Benchmark Metric Change
==================================================================================
- Init size bytes .olean 2.3%
- Init size bytes .olean.private 2.3%
- Init size bytes .olean.server 1.9%
- Init.Data.BitVec.Lemmas re-elab maxrss 1.1% (47.2 σ)
- Init.Data.List.Sublist re-elab -j4 maxrss 1.4% (36.3 σ)
+ bv_decide_inequality.lean wall-clock -3.5% (-83.9 σ)
+ iterators (compiled) branches -8.7% (-774.9 σ)
+ iterators (compiled) instructions -9.1% (-597.1 σ)
+ iterators (elab) branch-misses -3.1% (-28.0 σ)
+ iterators (elab) branches -4.1% (-242.6 σ)
+ iterators (elab) instructions -4.1% (-199.9 σ)
+ iterators (interpreted) branches -1.8% (-649.2 σ)
+ iterators (interpreted) instructions -1.8% (-727.2 σ)
- lake build clean maxrss 1.3% (22.9 σ)
+ lake config elab instructions -1.9% (-79.3 σ)
+ stdlib grind dsimp -7.6% (-32.1 σ)
- stdlib number of imported bytes 1.2%
- stdlib number of imported consts 1.5%
- stdlib size lines 1.1%
+ treemap.lean eraseInsert -4.0% (-39.2 σ) |
PRange shape α with Rcc α and eight other types
PRange shape α with Rcc α and eight other typesPRange shape α with Rcc α and eight other types
Collaborator
|
Reference manual CI status:
|
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Sep 23, 2025
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4-nightly-testing
that referenced
this pull request
Sep 23, 2025
Collaborator
|
Mathlib CI status (docs):
|
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Sep 24, 2025
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4-nightly-testing
that referenced
this pull request
Sep 24, 2025
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Sep 24, 2025
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4-nightly-testing
that referenced
this pull request
Sep 24, 2025
TwoFX
reviewed
Sep 24, 2025
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Sep 24, 2025
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4-nightly-testing
that referenced
this pull request
Sep 24, 2025
73b1991 to
a94c596
Compare
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Oct 1, 2025
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4-nightly-testing
that referenced
this pull request
Oct 1, 2025
arthur-adjedj
pushed a commit
to arthur-adjedj/lean4
that referenced
this pull request
Oct 6, 2025
…leanprover#10319) This PR "monomorphizes" the structure `Std.PRange shape α`, replacing it with nine distinct structures `Std.Rcc`, `Std.Rco`, `Std.Rci` etc., one for each possible shape of a range's bounds. This change was necessary because the shape polymorphism is detrimental to attempts of automation. **BREAKING CHANGE:** While range/slice notation itself is unchanged, this essentially breaks the entire remaining (polymorphic) range and slice API except for the dot-notation(`toList`, `iter`, ...). It is not possible to deprecate old declarations that were formulated in a shape-polymorphic way that is not available anymore.
3 tasks
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-library
Library
toolchain-available
A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
will-merge-soon
…unless someone speaks up
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 "monomorphizes" the structure
Std.PRange shape α, replacing it with nine distinct structuresStd.Rcc,Std.Rco,Std.Rcietc., one for each possible shape of a range's bounds. This change was necessary because the shape polymorphism is detrimental to attempts of automation.BREAKING CHANGE: While range/slice notation itself is unchanged, this essentially breaks the entire remaining (polymorphic) range and slice API except for the dot-notation(
toList,iter, ...). It is not possible to deprecate old declarations that were formulated in a shape-polymorphic way that is not available anymore.