[Merged by Bors] - perf(Analysis/RCLike/Basic): move a section#38034
Closed
kbuzzard wants to merge 2 commits intoleanprover-community:masterfrom
Closed
[Merged by Bors] - perf(Analysis/RCLike/Basic): move a section#38034kbuzzard wants to merge 2 commits intoleanprover-community:masterfrom
kbuzzard wants to merge 2 commits intoleanprover-community:masterfrom
Conversation
PR summary 00dbc4ec64Import changes for modified filesNo significant changes to the import graph Import changes for all files
Declarations diffNo declarations were harmed in the making of this PR! 🐙 You can run this locally as follows## summary with just the declaration names:
./scripts/pr_summary/declarations_diff.sh <optional_commit>
## more verbose report:
./scripts/pr_summary/declarations_diff.sh long <optional_commit>The doc-module for No changes to technical debt.You can run this locally as
|
Contributor
|
!bench |
|
Benchmark results for 5a3bcef against 00dbc4e are in. No significant results found. @grunweg
Small changes (1✅)
|
Contributor
|
The diff looks straightforward; do you think a comment about their location being deliberate is worth it? Otherwise, LGTM assuming benchmarks are good; thanks for doing this! |
Contributor
|
Thanks! |
mathlib-bors bot
pushed a commit
that referenced
this pull request
Apr 14, 2026
These lemmas compile more quickly if `RCLike ℝ` is available, so move them lower in the file.
Contributor
|
Pull request successfully merged into master. Build succeeded:
|
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.
These lemmas compile more quickly if
RCLike ℝis available, so move them lower in the file.Random fact: changing the definition of
Ring Rfromextends Semiring R, AddCommGroup R, AddGroupWithOne Rtoextends Semiring R, AddCommGroupWithOne Rcauses very little breakage in mathlib, but one thing it does break is the proof ofRCLike.norm_expect_le. Intrigued, I investigated further. What's happening is that the lemmas in the section which this PR moves needHSMul ℚ≥0 ℝ ℝorModule ℚ≥0 ℝwhich they all want to get fromRCLike ℝbut typeclass inference goes on a wild goose chase for this instance because it is only defined later in the file! Fiddling with the algebra hierarchy (which I'm currently doing) makes the wild goose chase slightly longer and triggers a timeout.However moving the section to just after the definition of
RCLike ℝmakes two of the three lemmas compile more quickly:RCLike.norm_nnqsmulgoes from 728878 mHeartbeats to 220634 andRCLike.norm_expect_legoes from 1308705 to 802785 (the third is unchanged). Rather than doing the moving as part of the algebra refactor PR I thought I'd just split it off as it seemed uncontroversial.