Skip to content

[Merged by Bors] - feat: transfer normed spaces and continuous linear equiv's across equ…#31896

Closed
grunweg wants to merge 24 commits intoleanprover-community:masterfrom
grunweg:transfer-cle
Closed

[Merged by Bors] - feat: transfer normed spaces and continuous linear equiv's across equ…#31896
grunweg wants to merge 24 commits intoleanprover-community:masterfrom
grunweg:transfer-cle

Conversation

@grunweg
Copy link
Copy Markdown
Contributor

@grunweg grunweg commented Nov 21, 2025

…ivalences

Analogous to existing instances for e.g. linear equivalences. This is required for adding Shrink instances for these, which in turns are necessary for making the definition of immersions in #28793 universe-polymorphic.


Open in Gitpod

…ivalences

Analogous to existing instances for e.g. linear equivalences.
This is required for adding Shrink instances for these, which in turns are
necessary for making the definition of immersions in leanprover-community#28793
universe-polymorphic.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 21, 2025

PR summary e2e5306e7e

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ _root_.Equiv.topologicalSpace
+ continuousLinearEquiv
+ dist
+ metricSpace
+ normedCommGroup
+ normedSpace
+ pseudometricSpace
+ seminormedCommGroup
+ toLinearEquiv_continuousLinearEquiv

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.


No changes to technical debt.

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).

@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Nov 21, 2025

@Vierkantor It seems there's still a bug around the header linter: locally, I did not get any error in Topology/Algebra/Module/TransferInstance (which is missing a module doc-string). That was before merging master, so there's a small chance this might go away. If not, this could be worth investigating.

@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Nov 21, 2025

CI errors now - so it seems fixed. Sorry for the false alarm - I'm glad the linter works now :-)

fix variable explicitness, generalise to semirings and fix variable order
Co-authored-by: Anatole Dedecker <anatolededecker@gmail.com>
Comment on lines +28 to +37
/-- Transfer a `Dist` across an `Equiv` -/
protected abbrev dist (e : α ≃ β) : ∀ [Dist β], Dist α := ⟨fun x y ↦ dist (e x) (e y)⟩

/-- Transfer a `PseudoMetricSpace` across an `Equiv` -/
protected abbrev pseudometricSpace (e : α ≃ β) : ∀ [PseudoMetricSpace β], PseudoMetricSpace α :=
.induced e ‹_›

/-- Transfer a `MetricSpace` across an `Equiv` -/
protected abbrev metricSpace (e : α ≃ β) : ∀ [MetricSpace β], MetricSpace α :=
.induced e e.injective ‹_›
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.

It feels like these belong in their own file inside Topology/MetricSpace, and maybe we should add the EMetric variants, although the latter is okay to wait for another PR when we actually need them. Maybe they don't come up often enough to matter.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fair point. I have moved them to a new file Topology/MetricSpace/TransferInstance.lean. I've chosen to not add the EMetricSpace versions for now: most applications will be fine with using .induced, and we can always add them later if we need them.

@j-loreaux j-loreaux added awaiting-author A reviewer has asked the author a question or requested changes. t-analysis Analysis (normed *, calculus) labels Nov 23, 2025
grunweg and others added 2 commits November 23, 2025 10:25
@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Nov 23, 2025

Thank you for the quick review! I have addressed all comments.
-awaiting-author

@github-actions github-actions bot removed the awaiting-author A reviewer has asked the author a question or requested changes. label Nov 23, 2025
@sgouezel sgouezel added the awaiting-author A reviewer has asked the author a question or requested changes. label Nov 23, 2025
grunweg and others added 2 commits November 23, 2025 19:45
Co-authored-by: Sebastien Gouezel <sebastien.gouezel@univ-rennes1.fr>
@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Nov 23, 2025

-awaiting-author

@github-actions github-actions bot removed the awaiting-author A reviewer has asked the author a question or requested changes. label Nov 23, 2025
@sgouezel sgouezel added the awaiting-author A reviewer has asked the author a question or requested changes. label Nov 24, 2025
Copy link
Copy Markdown
Contributor Author

@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.

Addressed all comments!

zero_smul := by simp [smul_def, zero_smul, zero_def]
add_smul := by simp [add_def, smul_def, add_smul] } :
Module R α)
protected abbrev module (e : α ≃ β) [AddCommMonoid β] [Module R β] :
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I also changed this in the same way - do you prefer me to split this into its own PR?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I made #32037 --- and am equally happy with merging this PR (containing both changes) or merging the other one first.

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.

No need to split, it's fine to have them in the current PR.

@sgouezel
Copy link
Copy Markdown
Contributor

bors d+
Thanks!

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Nov 24, 2025

✌️ grunweg can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@ghost ghost added delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). and removed awaiting-author A reviewer has asked the author a question or requested changes. labels Nov 24, 2025
grunweg and others added 4 commits November 24, 2025 11:16
Co-authored-by: Christian Merten <christian@merten.dev>
Co-authored-by: Christian Merten <christian@merten.dev>
@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Nov 24, 2025

Thanks for the quick review! Let me wait after lunch; if #32037 hasn't been merged then, I'll bors this PR as-is.

mathlib-bors bot pushed a commit that referenced this pull request Nov 24, 2025
@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Nov 24, 2025

bors merge

@ghost ghost added the ready-to-merge This PR has been sent to bors. label Nov 24, 2025
mathlib-bors bot pushed a commit that referenced this pull request Nov 24, 2025
#31896)

…ivalences

Analogous to existing instances for e.g. linear equivalences. This is required for adding Shrink instances for these, which in turns are necessary for making the definition of immersions in #28793 universe-polymorphic.

Co-authored-by: Christian Merten <christian@merten.dev>
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Nov 24, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat: transfer normed spaces and continuous linear equiv's across equ… [Merged by Bors] - feat: transfer normed spaces and continuous linear equiv's across equ… Nov 24, 2025
@mathlib-bors mathlib-bors bot closed this Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). ready-to-merge This PR has been sent to bors. t-analysis Analysis (normed *, calculus)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants