-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[Merged by Bors] - feat: Shrink instances for NormedSpace and ContinuousLinearEquiv
#31897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 13 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
f32d346
feat: transfer normed spaces and continuous linear equiv's across equ…
grunweg dcae2af
Fix CI; better documentation
grunweg 103d944
Make public
grunweg dc5cd50
Tweak and improve previous PR:
grunweg 0821eb4
fix
chrisflav 9719ed3
fix diamond: the old transported instances was .coinduced e.symm, cle…
chrisflav 1f1c7db
feat: add Shrink instances for NormedSpace and ContinuousLinearEquiv
grunweg 87cec80
It seems there is a diamond, right?
grunweg 4c25529
Does this fix the diamond? Need help with a last proof, though...
grunweg 12d00a6
This doesn't seem to help either
grunweg 8e08856
fix
chrisflav 447b85c
cleanup
chrisflav bf00cd1
Last clean-up
grunweg 2d5a7ed
Update Mathlib/Topology/Algebra/Module/Shrink.lean
grunweg 9de22ee
Merge branch 'master' into shrinknorm2
grunweg 3276739
Add instance lost in the merge
grunweg df985d1
Update Mathlib/Topology/Homeomorph/TransferInstance.lean
grunweg 67fb78f
Fix
grunweg cceea3a
Move to Homeomorph, minimize imports
grunweg 302de16
Fix
grunweg d8a1a7f
Apply suggestions from code review
grunweg 1997aeb
Move again
grunweg 21e9d33
Update Mathlib/Topology/Algebra/Module/TransferInstance.lean
grunweg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| /- | ||
| Copyright (c) 2025 Michael Rothgang. All rights reserved. | ||
| Released under Apache 2.0 license as described in the file LICENSE. | ||
| Authors: Michael Rothgang | ||
| -/ | ||
| module | ||
|
|
||
| public import Mathlib.Analysis.Normed.Module.Basic | ||
| public import Mathlib.Algebra.Group.TransferInstance | ||
| public import Mathlib.Algebra.Module.TransferInstance | ||
|
|
||
| /-! | ||
| # Transfer algebraic structures across `Equiv`s | ||
|
|
||
| In this file, we transfer a (pseudo-)metric space, (semi-)normed additive commutive group | ||
| and normed space structures across an equivalence. | ||
| This continues the pattern set in `Mathlib/Algebra/Module/TransferInstance.lean`. | ||
| -/ | ||
|
|
||
| @[expose] public section | ||
|
|
||
| variable {α β : Type*} | ||
|
|
||
| namespace Equiv | ||
|
|
||
| variable (e : α ≃ β) | ||
|
|
||
| /-- 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 ‹_› | ||
|
|
||
| /-- Transfer a `SeminormedAddCommGroup` across an `Equiv` -/ | ||
| protected abbrev seminormedAddCommGroup (e : α ≃ β) : | ||
| ∀ [SeminormedAddCommGroup β], SeminormedAddCommGroup α := | ||
| letI := e.addCommGroup | ||
| { SeminormedAddCommGroup.induced _ _ e.addEquiv with toPseudoMetricSpace := e.pseudometricSpace } | ||
|
|
||
| /-- Transfer a `NormedAddCommGroup` across an `Equiv` -/ | ||
| protected abbrev normedAddCommGroup (e : α ≃ β) : | ||
| ∀ [NormedAddCommGroup β], NormedAddCommGroup α := | ||
| letI := e.addCommGroup | ||
| { NormedAddCommGroup.induced _ _ e.addEquiv e.injective | ||
| with toPseudoMetricSpace := e.pseudometricSpace } | ||
|
|
||
| /-- Transfer `NormedSpace` across an `Equiv` -/ | ||
| protected abbrev normedSpace (𝕜 : Type*) [NormedField 𝕜] (e : α ≃ β) [SeminormedAddCommGroup β] : | ||
| let _ := Equiv.seminormedAddCommGroup e | ||
| ∀ [NormedSpace 𝕜 β], NormedSpace 𝕜 α := | ||
| letI := e.seminormedAddCommGroup | ||
| letI := e.module 𝕜 | ||
| .induced _ _ _ (e.linearEquiv _) | ||
|
|
||
| end Equiv |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| /- | ||
| Copyright (c) 2025 Michael Rothgang. All rights reserved. | ||
| Released under Apache 2.0 license as described in the file LICENSE. | ||
| Authors: Michael Rothgang | ||
| -/ | ||
| module | ||
|
|
||
| public import Mathlib.Algebra.Module.Shrink | ||
| public import Mathlib.Analysis.Normed.Module.TransferInstance | ||
| -- XXX: for import reduction purposes, the file should be split in two, with these imports | ||
| -- going into a second file. This does not seem warrented at the moment. | ||
| public import Mathlib.Topology.Algebra.Module.TransferInstance | ||
| public import Mathlib.Topology.Instances.Shrink | ||
| public import Mathlib.Analysis.Normed.Module.Basic | ||
|
|
||
| /-! | ||
| # Transfer algebraic structures from `α` to `Shrink α` | ||
|
|
||
| -/ | ||
|
|
||
| @[expose] public section | ||
|
|
||
| namespace Shrink | ||
|
|
||
| universe v | ||
| variable {R 𝕜 α : Type*} [Small.{v} α] [Semiring R] [NormedField 𝕜] | ||
|
|
||
| suppress_compilation | ||
|
grunweg marked this conversation as resolved.
Outdated
|
||
|
|
||
| instance [SeminormedAddCommGroup α] : SeminormedAddCommGroup (Shrink.{v} α) := | ||
| (equivShrink α).symm.seminormedAddCommGroup | ||
|
|
||
| instance [NormedAddCommGroup α] : NormedAddCommGroup (Shrink.{v} α) := | ||
| (equivShrink α).symm.normedAddCommGroup | ||
|
|
||
| instance [SeminormedAddCommGroup α] [NormedSpace 𝕜 α] : NormedSpace 𝕜 (Shrink.{v} α) := | ||
| (equivShrink α).symm.normedSpace 𝕜 | ||
|
|
||
| variable (R α) in | ||
| /-- Shrinking `α` to a smaller universe preserves the continuous module structure. -/ | ||
| @[simps!] | ||
| def continuousLinearEquiv [AddCommMonoid α] [TopologicalSpace α] [Module R α] : | ||
| Shrink.{v} α ≃L[R] α := by | ||
| convert (equivShrink α).symm.continuousLinearEquiv R | ||
|
grunweg marked this conversation as resolved.
Outdated
|
||
|
|
||
| end Shrink | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| /- | ||
| Copyright (c) 2025 Michael Rothgang. All rights reserved. | ||
| Released under Apache 2.0 license as described in the file LICENSE. | ||
| Authors: Michael Rothgang | ||
| -/ | ||
| module | ||
|
|
||
| public import Mathlib.Analysis.Normed.Module.Basic | ||
| public import Mathlib.Algebra.Module.TransferInstance | ||
| public import Mathlib.Topology.Algebra.Module.Equiv | ||
|
|
||
| /-! | ||
| # Transfer algebraic structures across `Equiv`s | ||
|
|
||
| In this file, we transfer a topological space and continuous linear equivalence structure | ||
| across an equivalence. | ||
| This continues the pattern set in `Mathlib/Algebra/Normed/Module/TransferInstance.lean`. | ||
| -/ | ||
|
|
||
| @[expose] public section | ||
|
|
||
| variable {R α β : Type*} | ||
|
|
||
| namespace Equiv | ||
|
|
||
| variable (e : α ≃ β) | ||
|
|
||
| /-- Transfer a `TopologicalSpace` across an `Equiv` -/ | ||
| protected abbrev topologicalSpace (e : α ≃ β) : ∀ [TopologicalSpace β], TopologicalSpace α := | ||
| .induced e ‹_› | ||
|
|
||
| /-- An equivalence e : α ≃ β gives a homeomorphism α ≃ₜ β where the topological space structure | ||
| on α is the one obtained by transporting the topological space structure on β back along e. -/ | ||
| def homeomorph (e : α ≃ β) [TopologicalSpace β] : | ||
| letI := e.topologicalSpace | ||
| α ≃ₜ β := | ||
| letI := e.topologicalSpace | ||
| { e with | ||
| continuous_toFun := continuous_induced_dom | ||
| continuous_invFun := by convert continuous_coinduced_rng; exact e.coinduced_symm.symm } | ||
|
|
||
| variable [TopologicalSpace β] [AddCommMonoid β] [Semiring R] [Module R β] | ||
|
|
||
| variable (R) in | ||
| /-- An equivalence `e : α ≃ β` gives a continuous linear equivalence `α ≃L[R] β` | ||
| where the continuous `R`-module structure on `α` is the one obtained by transporting an | ||
| `R`-module structure on `β` back along `e`. | ||
|
|
||
| This is `e.linearEquiv` as a continuous linear equivalence. -/ | ||
| def continuousLinearEquiv (e : α ≃ β) : | ||
| letI := e.topologicalSpace | ||
| letI := e.addCommMonoid | ||
| letI := e.module R | ||
| α ≃L[R] β := | ||
| letI := e.topologicalSpace | ||
| letI := e.addCommMonoid | ||
| letI := e.module R | ||
| { toLinearEquiv := e.linearEquiv _ | ||
| __ := e.homeomorph } | ||
|
|
||
| @[simp] | ||
| lemma continuousLinearEquiv_toLinearEquiv (e : α ≃ β) : | ||
| let _ := e.topologicalSpace | ||
| let _ := e.addCommMonoid | ||
| let _ := e.module R | ||
| (e.continuousLinearEquiv R).toLinearEquiv = e.linearEquiv R := by rfl | ||
|
|
||
| end Equiv |
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
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.
Uh oh!
There was an error while loading. Please reload this page.