Skip to content

refactor: golf only Function/SimpleFunc, Function/LpSeminorm/Basic, Constructions/Polish/Basic#38107

Open
yuanyi-350 wants to merge 2 commits intoleanprover-community:masterfrom
yuanyi-350:golf_77
Open

refactor: golf only Function/SimpleFunc, Function/LpSeminorm/Basic, Constructions/Polish/Basic#38107
yuanyi-350 wants to merge 2 commits intoleanprover-community:masterfrom
yuanyi-350:golf_77

Conversation

@yuanyi-350
Copy link
Copy Markdown
Collaborator

This PR selectively ports part of #38104.

Included files:

  • Mathlib/MeasureTheory/Function/SimpleFunc.lean
  • Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean
  • Mathlib/MeasureTheory/Constructions/Polish/Basic.lean

This intentionally excludes the rest of #38104.

No build or compile checks were run for this selective port.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 16, 2026

PR summary 8e3c989104

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

No 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 scripts/pr_summary/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/reporting/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@github-actions github-actions bot added the t-measure-probability Measure theory / Probability theory label Apr 16, 2026
Copy link
Copy Markdown
Contributor

@grunweg grunweg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of minor comments. Can you comment on the performance aspects of this change?

Comment thread Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean Outdated
Comment thread Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean Outdated
Comment thread Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean Outdated
Comment thread Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean Outdated
have : ∀ᵐ x ∂μ, ‖f x‖₊ ≤ ‖(C : ℝ)‖₊ := hfC.mono fun x hx => hx.trans_eq C.nnnorm_eq.symm
refine (eLpNorm_mono_ae this).trans_eq ?_
rw [eLpNorm_const _ hp (NeZero.ne μ), C.enorm_eq, one_div, ENNReal.smul_def, smul_eq_mul]
simpa [C.enorm_eq, ENNReal.smul_def, smul_eq_mul] using
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This simpa might be too strongly golfed: can you make this have := ...; simpa [...] instead?

Comment thread Mathlib/MeasureTheory/Function/SimpleFunc.lean Outdated
Set.piecewise_eq_of_notMem _ _ _ hx, _root_.add_left_inj, add_eq_right] using hx
rw [this]
exact Measurable.piecewise f.measurableSet_support hf hf'
simpa using f.measurable_bind (fun b a => b + g a) fun b => hg.const_add b
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise

@MeasurableSet.image_of_continuousOn_injOn γ
_ _ _ _ s f _ t' t'_polish (@borel γ t') (@BorelSpace.mk _ _ (borel γ) rfl)
M (@Continuous.continuousOn γ _ t' _ f s f_cont) f_inj
have hs' := (borel_anti t't s) <| by rwa [← eq_borel_upgradeStandardBorel γ]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'd have to answer somebody else to review this --- splitting into a separate PR might do.

@grunweg grunweg added the awaiting-author A reviewer has asked the author a question or requested changes. label Apr 16, 2026
Comment thread Mathlib/MeasureTheory/Constructions/Polish/Basic.lean Outdated
@grunweg grunweg added the LLM-generated PRs with substantial input from LLMs - review accordingly label Apr 16, 2026
@grunweg
Copy link
Copy Markdown
Contributor

grunweg commented Apr 16, 2026

Echoing my comment made elsewhere, can you also update the PR description to be more helpful? Thanks!

@yuanyi-350 yuanyi-350 added the codex OpenAI Codex wrote (parts of) this PR. label Apr 16, 2026
Co-authored-by: Michael Rothgang <rothgang@math.uni-bonn.de>
Co-authored-by: Etienne Marion <66847262+EtienneC30@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-author A reviewer has asked the author a question or requested changes. codex OpenAI Codex wrote (parts of) this PR. LLM-generated PRs with substantial input from LLMs - review accordingly t-measure-probability Measure theory / Probability theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants