refactor: golf only Function/SimpleFunc, Function/LpSeminorm/Basic#38107
Closed
yuanyi-350 wants to merge 5 commits intoleanprover-community:masterfrom
Closed
refactor: golf only Function/SimpleFunc, Function/LpSeminorm/Basic#38107yuanyi-350 wants to merge 5 commits intoleanprover-community:masterfrom
Function/SimpleFunc, Function/LpSeminorm/Basic#38107yuanyi-350 wants to merge 5 commits intoleanprover-community:masterfrom
Conversation
PR summary 8e3c989104Import 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
|
grunweg
reviewed
Apr 16, 2026
Contributor
grunweg
left a comment
There was a problem hiding this comment.
A couple of minor comments. Can you comment on the performance aspects of this change?
EtienneC30
reviewed
Apr 16, 2026
2 tasks
Contributor
|
Echoing my comment made elsewhere, can you also update the PR description to be more helpful? Thanks! |
Co-authored-by: Michael Rothgang <rothgang@math.uni-bonn.de> Co-authored-by: Etienne Marion <66847262+EtienneC30@users.noreply.github.com>
Function/SimpleFunc, Function/LpSeminorm/Basic, Constructions/Polish/BasicFunction/SimpleFunc, Function/LpSeminorm/Basic
Collaborator
Author
|
I ran a profiler comparison for the changed declarations in this PR. Results (seconds):
Overall:
Caveat:
|
Contributor
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 selectively ports part of #38104.
Concretely, it does two things:
Mathlib/MeasureTheory/Function/SimpleFunc.lean, it rewritesMeasurable.add_simpleFuncandMeasurable.simpleFunc_addto useSimpleFunc.measurable_bindinstead of explicit inductions over simple functions together with manual piecewise/ support arguments.Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean, it shortens severaleLpNorm/eLpNorm'monotonicity and bound proofs by deriving the nnnorm versions from the more general enorm versions, instead of reproving the same argument separately.