Skip to content

chore: replace WithLp.equiv with a new pair WithLp.toLp/WithLp.ofLp#24261

Closed
Paul-Lez wants to merge 40 commits intomasterfrom
with-lp-refactor
Closed

chore: replace WithLp.equiv with a new pair WithLp.toLp/WithLp.ofLp#24261
Paul-Lez wants to merge 40 commits intomasterfrom
with-lp-refactor

Conversation

@Paul-Lez
Copy link
Copy Markdown
Collaborator

@Paul-Lez Paul-Lez commented Apr 21, 2025

This PR does the following:

  • deprecate WithLp.equiv
  • Add WithLp.toLp and WithLp.ofLp (for consistency with other equivalences to type synonyms)

See Zulip discussion


Open in Gitpod

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 21, 2025

PR summary 78a26d50f7

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ EuclideanSpace.measurePreserving_measurableOfLp
+ PiLp.measurePreserving_ofLp
+ coe_measurableOfLp
+ coe_measurableOfLp_symm
+ measurableOfLp
+ ofLpContinuousLinearEquiv
+ ofLpLinearEquiv
+ ofLpProdContinuousLinearEquiv
+ ofLpₗᵢ
+ prodOfLpₗᵢ
+ symm_ofLp
+ symm_toLp
- PiLp.volume_preserving_ofLp
- ofLp_surjective
- toLp_surjective

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


Increase in tech debt: (relative, absolute) = (2.00, 0.02)
Current number Change Type
81 2 disabled deprecation lints

Current commit 7bb53035e4
Reference commit 78a26d50f7

You can run this locally as

./scripts/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-analysis Analysis (normed *, calculus) label Apr 21, 2025
@Paul-Lez Paul-Lez added the WIP Work in progress label Apr 21, 2025
@Paul-Lez Paul-Lez changed the title chore(Analysis/Normed/Lp/WithLp): rename WithLp.equiv, make arguments implicit and change the direction of the equivalence chore(Analysis/Normed/Lp/WithLp): add WithLp.toLp Apr 22, 2025
@Paul-Lez Paul-Lez requested a review from YaelDillies April 22, 2025 23:06
@Paul-Lez Paul-Lez removed the WIP Work in progress label Apr 23, 2025
@Paul-Lez Paul-Lez requested a review from YaelDillies April 23, 2025 21:10
@YaelDillies YaelDillies added the awaiting-author A reviewer has asked the author a question or requested changes. label Apr 24, 2025
@Paul-Lez Paul-Lez removed the awaiting-author A reviewer has asked the author a question or requested changes. label Apr 25, 2025
@Paul-Lez Paul-Lez requested a review from YaelDillies April 25, 2025 19:50
Copy link
Copy Markdown
Contributor

@YaelDillies YaelDillies left a comment

Choose a reason for hiding this comment

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

Thanks!

maintainer delegate

@github-actions
Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by YaelDillies.

@github-actions github-actions bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Apr 25, 2025
@b-mehta b-mehta requested a review from eric-wieser April 26, 2025 09:20
@eric-wieser eric-wieser added awaiting-author A reviewer has asked the author a question or requested changes. and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Apr 26, 2025
Copy link
Copy Markdown
Member

@eric-wieser eric-wieser left a comment

Choose a reason for hiding this comment

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

I think we should rip off the bandaid and deprecate equiv in this PR, rather than in a follow-up. Otherwise we have two spellings of everything, and reviewers have to tell contributors which one to use.

@YaelDillies
Copy link
Copy Markdown
Contributor

Can't this be done in a second PR soon? Paul is really really focused on that refactor and definitely doesn't have 10 other things going on.

@eric-wieser
Copy link
Copy Markdown
Member

I don't see any benefit in merging this PR until the other is ready to go. Mathlib shouldn't have two non-deprecated ways to spell something identical.

@Paul-Lez
Copy link
Copy Markdown
Collaborator Author

I can take care of this tonight!

@YaelDillies
Copy link
Copy Markdown
Contributor

Sure, I agree. All I'm saying is that they should be in separate PR. But I am happy for both PRs to land in a short time frame.

@Paul-Lez
Copy link
Copy Markdown
Collaborator Author

Paul-Lez commented Apr 26, 2025

Added the deprecations (and also removed simp tags from deprecated lemmas). Edit: there seem to be some more to do in PiLp - I'll take a look tomorrow when it's daytime:)

Along the way, I also noticed that ofLpProdContinuousLinearEquiv/prodContinuousLinearEquiv should be generalised, and added a TODO note to that effect. I think this may be better to leave to another PR since it would be natural to move it to the WithLp file, but the imports aren't quite right (and maybe we don't want to be changing those in this PR?)

@leanprover-community-bot-assistant
Copy link
Copy Markdown
Collaborator

This pull request has conflicts, please merge master and resolve them.

@leanprover-community-bot-assistant leanprover-community-bot-assistant added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Apr 27, 2025
@github-actions github-actions bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jun 28, 2025
@github-actions github-actions bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jun 28, 2025
@eric-wieser eric-wieser added the WIP Work in progress label Jun 28, 2025
@eric-wieser eric-wieser marked this pull request as draft June 28, 2025 23:10
@eric-wieser
Copy link
Copy Markdown
Member

I've adjusted the diff here to show the difference with the now-merged #26459; merging this PR as is would amount to reverting that one and merging the original version of this instead. I don't think we should actually do that, but maybe there are parts of this diff we still want.

@leanprover-community-bot-assistant leanprover-community-bot-assistant added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jul 5, 2025
@leanprover-community-bot-assistant
Copy link
Copy Markdown
Collaborator

This pull request has conflicts, please merge master and resolve them.

joelriou pushed a commit to joelriou/mathlib4 that referenced this pull request Jul 7, 2025
…26249)

Put a measurable space structure on a general `WithLp`. Define a `MeasurableEquiv` version of `WithLp.equiv`. The direction is reversed in prevision of the `WithLp` refactor in leanprover-community#24261. Define a `BorelSpace` instance.
callesonne pushed a commit to callesonne/mathlib4 that referenced this pull request Jul 24, 2025
…26249)

Put a measurable space structure on a general `WithLp`. Define a `MeasurableEquiv` version of `WithLp.equiv`. The direction is reversed in prevision of the `WithLp` refactor in leanprover-community#24261. Define a `BorelSpace` instance.
@Paul-Lez Paul-Lez closed this Aug 4, 2025
@YaelDillies YaelDillies deleted the with-lp-refactor branch August 4, 2025 15:11
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. merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) t-analysis Analysis (normed *, calculus) WIP Work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants