-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat(Geometry/Manifold): continuously differentiable actions #38527
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
Open
archiebrowne
wants to merge
17
commits into
leanprover-community:master
Choose a base branch
from
archiebrowne:contdiffmulaction
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+281
β0
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
198caae
ContDiffMulAction.lean
archiebrowne 53a9389
add file to Mathlib.lean
archiebrowne f20eb82
min_imports
archiebrowne 7818bf3
Merge branch 'master' into contdiffmulaction
archiebrowne 276491a
Prod.contDiffSMul
archiebrowne f46ee32
golf
archiebrowne e01b349
\forall instance
archiebrowne 36b179c
MulAction.contDiffSMul_compHom
archiebrowne baf7726
ContDiffSMul.of_le
archiebrowne c3e17b9
normed
archiebrowne 03554a4
imports
archiebrowne 586c663
typo
archiebrowne 268ac5e
typo
archiebrowne 03cde04
smooth -> continuously differentiable
archiebrowne 0848e9a
switch ContDiffVAdd, ContDiffSMul and move to_additive
archiebrowne 78079e2
ContinuousLinearMap.contDiffSMul
archiebrowne 91a2402
move file
archiebrowne 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,280 @@ | ||
| /- | ||
| Copyright (c) 2026 Archibald Browne. All rights reserved. | ||
| Released under Apache 2.0 license as described in the file LICENSE. | ||
| Authors: Archibald Browne | ||
| -/ | ||
| module | ||
|
|
||
|
|
||
| public import Mathlib.Analysis.Calculus.ContDiff.Operations | ||
|
|
||
| /-! | ||
| # Continuously differentiable monoid actions | ||
|
|
||
| In this file we define the class `ContDiffSMul`. `ContDiffSMul π M X n` holds if `M` acts on `X` and | ||
| the map `(c, x) β¦ c β’ x` is `n` times continuously differentiable on `M Γ X`. | ||
|
|
||
| ## Main definitions | ||
|
|
||
| * `ContDiffSMul π M X n` : typeclass saying that the map `(c, x) β¦ c β’ x` is `n` times continuously | ||
| differentiable on `M Γ X` | ||
|
|
||
| ## Main results | ||
|
|
||
| `ContDiffSMul.of_retraction`, `ContinuousLinearEquiv.contDiffSMul` and `ContDiffSMul.comp` prove | ||
| results about pullbacks of continuously differentiable actions. `ContDiff.contdiff_smul` | ||
| provides dot-syntax for `ContDiffSMul`. Many of the results here are the continuously differentiable | ||
| analogues of the results in the module `Mathlib.Topology.Algebra.MulAction`. | ||
| -/ | ||
|
|
||
| @[expose] public section | ||
|
|
||
| open Topology Pointwise | ||
| open Filter | ||
|
|
||
|
|
||
| /-- The class `ContDiffVAdd π M X n` says that the additive action `(+α΅₯) : M β X β X` | ||
| is `n` times continuously differentiable on `M Γ X`. -/ | ||
| class ContDiffVAdd (π M X : Type*) (n : WithTop ββ) [VAdd M X] [NormedAddCommGroup X] | ||
| [NontriviallyNormedField π] [NormedAddCommGroup M] [NormedSpace π M] | ||
| [NormedSpace π X] : Prop where | ||
| /-- The additive action `(+α΅₯)` is continuous. -/ | ||
| contdiff_vadd : ContDiff π n fun p : M Γ X => p.1 +α΅₯ p.2 | ||
|
|
||
|
|
||
|
|
||
| /-- The class `ContDiffSMul π M X n` says that the scalar multiplication `(β’) : M β X β X` is `n` | ||
| times continuously differentiable on `M Γ X`. -/ | ||
| @[to_additive] | ||
| class ContDiffSMul (π M X : Type*) (n : WithTop ββ) [SMul M X] [NormedAddCommGroup X] | ||
| [NontriviallyNormedField π] [NormedAddCommGroup M] [NormedSpace π M] | ||
| [NormedSpace π X] : Prop where | ||
| /-- The scalar multiplication `(β’)` is continuously differentiable. -/ | ||
| contdiff_smul : ContDiff π n fun p : M Γ X => p.1 β’ p.2 | ||
|
|
||
| export ContDiffSMul (contdiff_smul) | ||
|
|
||
|
|
||
|
|
||
| export ContDiffVAdd (contdiff_vadd) | ||
|
|
||
|
|
||
| attribute [continuity, fun_prop] contdiff_smul contdiff_vadd | ||
|
|
||
| @[to_additive] | ||
| -- Cannot be an instance: `π` and `n` don't appear in the conclusion | ||
| theorem ContDiffSMul.toContinuousSMul (π : Type*) {M X : Type*} (n : WithTop ββ) | ||
| [NontriviallyNormedField π] [SMul M X] | ||
| [NormedAddCommGroup M] [NormedSpace π M] | ||
| [NormedAddCommGroup X] [NormedSpace π X] | ||
| [ContDiffSMul π M X n] : ContinuousSMul M X where | ||
| continuous_smul := (contdiff_smul (π := π) (n := n)).continuous | ||
|
|
||
| section Main | ||
|
|
||
| variable {π M X Y Ξ± : Type*} {n : WithTop ββ} [NontriviallyNormedField π] | ||
| [NormedAddCommGroup M] [NormedSpace π M] | ||
| [NormedAddCommGroup X] [NormedSpace π X] | ||
|
|
||
| theorem ContDiffSMul.of_le {m : WithTop ββ} [SMul M X] [ContDiffSMul π M X n] (h : m β€ n) : | ||
| ContDiffSMul π M X m where | ||
| contdiff_smul := contdiff_smul.of_le h | ||
|
|
||
|
|
||
| section SMul | ||
|
|
||
| variable [SMul M X] [ContDiffSMul π M X n] | ||
|
|
||
| @[to_additive] | ||
| lemma IsScalarTower.contdiffSMul {M : Type*} (N : Type*) {Ξ± : Type*} [Monoid N] [SMul M N] | ||
| [MulAction N Ξ±] [SMul M Ξ±] [IsScalarTower M N Ξ±] | ||
| [NormedAddCommGroup Ξ±] [NormedAddCommGroup M] [NormedAddCommGroup N] [NormedSpace π M] | ||
| [NormedSpace π N] [NormedSpace π Ξ±] [ContDiffSMul π M N n] | ||
| [ContDiffSMul π N Ξ± n] : ContDiffSMul π M Ξ± n where | ||
| contdiff_smul := by | ||
| suffices ContDiff π n (fun p : M Γ Ξ± β¦ (p.1 β’ (1 : N)) β’ p.2) by | ||
| simpa [smul_one_smul N] | ||
| have h1 : ContDiff π n (fun p : M Γ Ξ± β¦ p.1 β’ (1 : N)) := | ||
| (ContDiffSMul.contdiff_smul (π := π) (M := M) (X := N) (n := n)).comp | ||
| (ContDiff.prodMk contDiff_fst contDiff_const) | ||
| exact (ContDiffSMul.contdiff_smul (π := π) (M := N) (X := Ξ±) (n := n)).comp | ||
| (ContDiff.prodMk h1 contDiff_snd) | ||
|
|
||
| @[to_additive] | ||
| lemma MulOpposite.contDiff_op : ContDiff π n (op : M β Mα΅α΅α΅) := | ||
| (MulOpposite.opContinuousLinearEquiv π : M βL[π] Mα΅α΅α΅).contDiff | ||
|
|
||
| lemma MulOpposite.contDiff_unop : ContDiff π n (unop : Mα΅α΅α΅ β M) := | ||
| (MulOpposite.opContinuousLinearEquiv π : M βL[π] Mα΅α΅α΅).symm.contDiff | ||
|
|
||
| @[to_additive] | ||
| instance ContDiffSMul.op [SMul Mα΅α΅α΅ X] [IsCentralScalar M X] : ContDiffSMul π Mα΅α΅α΅ X n := | ||
| β¨by | ||
| suffices ContDiff π n fun p : M Γ X => MulOpposite.op p.fst β’ p.snd from | ||
| this.comp ((MulOpposite.contDiff_unop (n := n)).prodMap contDiff_id) | ||
| simpa only [op_smul_eq_smul] using (contdiff_smul : ContDiff π n fun p : M Γ X => _)β© | ||
|
|
||
| @[to_additive] | ||
| instance MulOpposite.contDiffSMul : ContDiffSMul π M Xα΅α΅α΅ n := | ||
| β¨(MulOpposite.contDiff_op (n := n)).comp <| | ||
| contdiff_smul.comp <| contDiff_id.prodMap (MulOpposite.contDiff_unop (n := n))β© | ||
|
|
||
| section Transfer | ||
|
|
||
| variable {N Y : Type*} [NormedAddCommGroup N] [NormedSpace π N] | ||
| [NormedAddCommGroup Y] [NormedSpace π Y] | ||
|
|
||
|
|
||
| /-- Transfer `ContDiffSMul` along a `ContinuousLinearEquiv`. | ||
| Analogue of `Topology.IsInducing.continuousSMul` for the smooth setting. -/ | ||
| @[to_additive] | ||
| lemma ContinuousLinearEquiv.contDiffSMul [SMul N Y] {f : N β M} | ||
| (g : Y βL[π] X) (hf : ContDiff π n f) | ||
| (hsmul : β {c y}, g (c β’ y) = f c β’ g y) : | ||
| ContDiffSMul π N Y n := β¨by | ||
| set F := fun (p : N Γ Y) => p.1 β’ p.2 with hF | ||
| have hF' : F = (fun p β¦ g.symm (g (p.1 β’ p.2))) := by | ||
| ext p; simp only [symm_apply_apply, hF] | ||
| simp_rw [hsmul] at hF' | ||
| rw [hF'] | ||
| exact g.symm.contDiff.comp | ||
| (contdiff_smul.comp (ContDiff.prodMk (hf.comp contDiff_fst) | ||
| (g.contDiff.comp contDiff_snd)))β© | ||
|
|
||
| /-- Transfer `ContDiffSMul` via a retraction (continuous linear left inverse). | ||
| Analogue of `SMulMemClass.continuousSMul` for complemented subspaces. -/ | ||
| @[to_additive] | ||
| lemma ContDiffSMul.of_retraction [SMul M N] | ||
| (ΞΉ : N βL[π] X) (Ο : X βL[π] N) (hΟΞΉ : β x, Ο (ΞΉ x) = x) | ||
| (hsmul : β (m : M) (x : N), ΞΉ (m β’ x) = m β’ ΞΉ x) : ContDiffSMul π M N n := β¨by | ||
| set F := fun (p : M Γ N) => p.1 β’ p.2 with hF | ||
| have hF' : F = fun p β¦ Ο (p.1 β’ ΞΉ p.2) := by | ||
| ext p; rw [β hsmul p.1 p.2, hΟΞΉ (p.1 β’ p.2)] | ||
| rw [hF'] | ||
| exact Ο.contDiff.comp (contdiff_smul.comp | ||
| (ContDiff.prodMk contDiff_fst (ΞΉ.contDiff.comp contDiff_snd)))β© | ||
|
|
||
| /-- Transfer `ContDiffSMul` along a continuously differentiable map on the acting type. -/ | ||
| @[to_additive] | ||
| lemma ContDiffSMul.comp [SMul N X] {f : N β M} | ||
| (hf : ContDiff π n f) | ||
| (hsmul : β (c : N) (x : X), c β’ x = f c β’ x) : | ||
| ContDiffSMul π N X n := β¨by | ||
| set F := fun p : N Γ X => p.1 β’ p.2 with hF | ||
| have : F = fun p => f p.1 β’ p.2 := by | ||
| ext p; rw [β hsmul p.1 p.2] | ||
| simpa [this] using | ||
| contdiff_smul.comp (ContDiff.prodMk (hf.comp contDiff_fst) contDiff_snd)β© | ||
|
|
||
| end Transfer | ||
|
|
||
| variable {f : Y β M} {g : Y β X} {b : Y} {s : Set Y} [NormedAddCommGroup Y] [NormedSpace π Y] | ||
|
|
||
| @[to_additive] | ||
| theorem ContDiffWithinAt.contdiff_smul' | ||
| (hf : ContDiffWithinAt π n f s b) (hg : ContDiffWithinAt π n g s b) : | ||
| ContDiffWithinAt π n (fun x => f x β’ g x) s b := | ||
| ContDiffSMul.contdiff_smul.comp_contDiffWithinAt (ContDiffWithinAt.prodMk hf hg) | ||
|
|
||
| @[to_additive] | ||
| theorem ContDiffAt.contdiff_smul (hf : ContDiffAt π n f b) | ||
| (hg : ContDiffAt π n g b) : | ||
| ContDiffAt π n (fun x => f x β’ g x) b := | ||
| ContDiffSMul.contdiff_smul.comp_contDiffAt _ (ContDiffAt.prodMk hf hg) | ||
|
|
||
| @[to_additive] | ||
| theorem ContDiffOn.contdiff_smul (hf : ContDiffOn π n f s) | ||
| (hg : ContDiffOn π n g s) : | ||
| ContDiffOn π n (fun x => f x β’ g x) s := | ||
| fun x hx => (hf x hx).contdiff_smul' (hg x hx) | ||
|
|
||
| @[to_additive] | ||
| theorem ContDiff.contdiff_smul (hf : ContDiff π n f) (hg : ContDiff π n g) : | ||
| ContDiff π n (fun x => f x β’ g x) := | ||
| ContDiffSMul.contdiff_smul.comp (ContDiff.prodMk hf hg) | ||
|
|
||
| end SMul | ||
|
|
||
| section Monoid | ||
|
|
||
| variable [Monoid M] [MulAction M X] [ContDiffSMul π M X n] | ||
|
|
||
| theorem MulAction.contDiffSMul_compHom {N} [NormedAddCommGroup N] [NormedSpace π N] | ||
| [Monoid N] {f : N β* M} (hf : ContDiff π n f) : | ||
| letI := MulAction.compHom X f | ||
| ContDiffSMul π N X n := by | ||
| letI := MulAction.compHom X f | ||
| exact β¨(hf.comp contDiff_fst).contdiff_smul contDiff_sndβ© | ||
|
|
||
|
|
||
| end Monoid | ||
|
|
||
| section Normed | ||
|
|
||
| variable {π' : Type*} [NontriviallyNormedField π'] [NormedAlgebra π π'] | ||
|
|
||
| /-- Scalar multiplication by a normed field on a normed space is C^n. -/ | ||
| instance NormedSpace.contDiffSMul {F : Type*} [NormedAddCommGroup F] [NormedSpace π F] | ||
| [Module π' F] [IsBoundedSMul π' F] [IsScalarTower π π' F] : | ||
| ContDiffSMul π π' F n where | ||
| contdiff_smul := contDiff_smul | ||
|
|
||
|
|
||
| /-- Multiplication in a normed algebra is C^n as a scalar action on itself. -/ | ||
| instance NormedAlgebra.contDiffSMul_self {A : Type*} [NormedRing A] [NormedAlgebra π A] : | ||
| ContDiffSMul π A A n where | ||
| contdiff_smul := contDiff_mul | ||
|
|
||
| end Normed | ||
|
|
||
| instance ContinuousLinearMap.contDiffSMul : | ||
| ContDiffSMul π (M βL[π] M) M n where | ||
| contdiff_smul := isBoundedBilinearMap_apply.contDiff | ||
|
|
||
| variable [NormedAddCommGroup Y] [NormedSpace π Y] | ||
|
|
||
| instance Prod.contDiffSMul [SMul M X] [SMul M Y] [ContDiffSMul π M X n] [ContDiffSMul π M Y n] : | ||
| ContDiffSMul π M (X Γ Y) n where | ||
| contdiff_smul := by | ||
| suffices ContDiff π n (fun p : M Γ (X Γ Y) => p.1 β’ p.2) by | ||
| simpa only [Prod.smul_def] using this | ||
| refine ContDiff.prodMk ?_ ?_ | ||
| Β· exact ContDiff.contdiff_smul contDiff_fst (ContDiff.snd' contDiff_fst) | ||
| Β· exact ContDiff.contdiff_smul contDiff_fst (ContDiff.snd' contDiff_snd) | ||
|
|
||
| instance {ΞΉ : Type*} [Fintype ΞΉ] {Ξ³ : ΞΉ β Type*} [β i, SMul M (Ξ³ i)] | ||
| [β i, NormedAddCommGroup (Ξ³ i)] | ||
| [β i, NormedSpace π (Ξ³ i)] [β i, ContDiffSMul π M (Ξ³ i) n] : | ||
| ContDiffSMul π M (β i, Ξ³ i) n := | ||
| β¨contDiff_pi.mpr fun i => by | ||
| simp only [Pi.smul_apply] | ||
| have hi : ContDiff π n (fun x : M Γ (β i, Ξ³ i) => x.2 i) := | ||
| (ContinuousLinearMap.proj (R := π) (ΞΉ := ΞΉ) (Ο := Ξ³) i).contDiff.comp contDiff_snd | ||
| exact contDiff_fst.contdiff_smul hiβ© | ||
|
|
||
| end Main | ||
|
|
||
| section Tendsto | ||
|
|
||
| variable {π M X Ξ± : Type*} | ||
|
|
||
| @[to_additive] | ||
| theorem Filter.Tendsto.contdiff_smul (π : Type*) [NontriviallyNormedField π] | ||
| [NormedAddCommGroup M] [NormedSpace π M] [NormedAddCommGroup X] [NormedSpace π X] | ||
| [SMul M X] (n : WithTop ββ) [ContDiffSMul π M X n] | ||
| {f : Ξ± β M} {g : Ξ± β X} {l : Filter Ξ±} {c : M} {a : X} | ||
| (hf : Tendsto f l (π c)) (hg : Tendsto g l (π a)) : | ||
| Tendsto (fun x => f x β’ g x) l (π <| c β’ a) := | ||
| (ContDiffSMul.contdiff_smul (π := π) (n := n) |>.continuous.tendsto _).comp | ||
| (hf.prodMk_nhds hg) | ||
|
|
||
| @[to_additive] | ||
| theorem Filter.Tendsto.contdiff_smul_const (π : Type*) [NontriviallyNormedField π] | ||
| [NormedAddCommGroup M] [NormedSpace π M] [NormedAddCommGroup X] [NormedSpace π X] | ||
| [SMul M X] (n : WithTop ββ) [ContDiffSMul π M X n] | ||
| {f : Ξ± β M} {l : Filter Ξ±} {c : M} | ||
| (hf : Tendsto f l (π c)) (a : X) : | ||
| Tendsto (fun x => f x β’ a) l (π (c β’ a)) := | ||
| hf.contdiff_smul π n tendsto_const_nhds | ||
|
|
||
| end Tendsto | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The correct name for this would be
ContDiff.smul, but that name is already taken by the corresponding lemma for scalar multiplication on vector spaces - if possible without messing with the import structure too much, it would probably make sense to remove those lemmas and provide aContDiffSMulinstance for scalar multiplication on vector spaces instead, and then use the correct name here? The same goes forContDiffAt.contdiff_smuletc.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I'll have a think about how to do this cleanly