Skip to content

Commit 3741e4f

Browse files
committed
chore: golf using TangentSpace%, tangentMap[s] and tangentMap%
1 parent 384fe6f commit 3741e4f

5 files changed

Lines changed: 30 additions & 28 deletions

File tree

Mathlib/Geometry/Manifold/ContMDiffMFDeriv.lean

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -274,18 +274,18 @@ variable [Is : IsManifold I 1 M] [I's : IsManifold I' 1 M']
274274
is `C^m` when `m+1 ≤ n`. -/
275275
theorem ContMDiffOn.contMDiffOn_tangentMapWithin
276276
(hf : CMDiff[s] n f) (hmn : m + 1 ≤ n) (hs : UniqueMDiffOn I s) :
277-
CMDiff[(π E (TangentSpace I) ⁻¹' s)] m (tangentMapWithin I I' f s) := by
277+
CMDiff[(π E (TangentSpace I) ⁻¹' s)] m (tangentMap[s] f) := by
278278
intro x₀ hx₀
279279
let s' : Set (TangentBundle I M) := (π E (TangentSpace I) ⁻¹' s)
280280
let b₁ : TangentBundle I M → M := fun p ↦ p.1
281-
let v : Π (y : TangentBundle I M), TangentSpace I (b₁ y) := fun y ↦ y.2
281+
let v : Π (y : TangentBundle I M), TangentSpace% (b₁ y) := fun y ↦ y.2
282282
have hv : ContMDiffWithinAt I.tangent I.tangent m (fun y ↦ (v y : TangentBundle I M)) s' x₀ :=
283283
contMDiffWithinAt_id
284284
let b₂ : TangentBundle I M → M' := f ∘ b₁
285285
have hb₂ : CMDiffAt[s'] m b₂ x₀ :=
286286
((hf (b₁ x₀) hx₀).of_le (le_self_add.trans hmn)).comp _
287287
(contMDiffWithinAt_proj (TangentSpace I)) (fun x h ↦ h)
288-
let ϕ : Π (y : TangentBundle I M), TangentSpace I (b₁ y) →L[𝕜] TangentSpace I' (b₂ y) :=
288+
let ϕ : Π (y : TangentBundle I M), TangentSpace% (b₁ y) →L[𝕜] TangentSpace% (b₂ y) :=
289289
fun y ↦ mfderiv[s] f (b₁ y)
290290
have hϕ : CMDiffAt[s'] m (fun y ↦ ContinuousLinearMap.inCoordinates E (TangentSpace I (M := M)) E'
291291
(TangentSpace I' (M := M')) (b₁ x₀) (b₁ y) (b₂ x₀) (b₂ y) (ϕ y)) x₀ := by
@@ -299,21 +299,21 @@ theorem ContMDiffOn.contMDiffOn_tangentMapWithin
299299
derivative is continuous there. -/
300300
theorem ContMDiffOn.continuousOn_tangentMapWithin (hf : CMDiff[s] n f) (hmn : 1 ≤ n)
301301
(hs : UniqueMDiffOn I s) :
302-
ContinuousOn (tangentMapWithin I I' f s) (π E (TangentSpace I) ⁻¹' s) := by
303-
have : CMDiff[π E (TangentSpace I) ⁻¹' s] 0 (tangentMapWithin I I' f s) :=
302+
ContinuousOn (tangentMap[s] f) (π E (TangentSpace I) ⁻¹' s) := by
303+
have : CMDiff[π E (TangentSpace I) ⁻¹' s] 0 (tangentMap[s] f) :=
304304
hf.contMDiffOn_tangentMapWithin hmn hs
305305
exact this.continuousOn
306306

307307
/-- If a function is `C^n`, then its bundled derivative is `C^m` when `m+1 ≤ n`. -/
308308
theorem ContMDiff.contMDiff_tangentMap (hf : CMDiff n f) (hmn : m + 1 ≤ n) :
309-
CMDiff m (tangentMap I I' f) := by
309+
CMDiff m (tangentMap% f) := by
310310
rw [← contMDiffOn_univ] at hf ⊢
311311
convert hf.contMDiffOn_tangentMapWithin hmn uniqueMDiffOn_univ
312312
rw [tangentMapWithin_univ]
313313

314314
/-- If a function is `C^n`, with `1 ≤ n`, then its bundled derivative is continuous. -/
315315
theorem ContMDiff.continuous_tangentMap (hf : CMDiff n f) (hmn : 1 ≤ n) :
316-
Continuous (tangentMap I I' f) := by
316+
Continuous (tangentMap% f) := by
317317
rw [← contMDiffOn_univ] at hf
318318
rw [← continuousOn_univ]
319319
convert hf.continuousOn_tangentMapWithin hmn uniqueMDiffOn_univ
@@ -342,7 +342,7 @@ may seem.
342342
TODO define splittings of vector bundles; state this result invariantly. -/
343343
theorem tangentMap_tangentBundle_pure [Is : IsManifold I 1 M]
344344
(p : TangentBundle I M) :
345-
tangentMap I I.tangent (zeroSection E (TangentSpace I)) p = ⟨⟨p.proj, 0⟩, ⟨p.2, 0⟩⟩ := by
345+
tangentMap% (zeroSection (B := M) E (TangentSpace I)) p = ⟨⟨p.proj, 0⟩, ⟨p.2, 0⟩⟩ := by
346346
rcases p with ⟨x, v⟩
347347
have N : I.symm ⁻¹' (chartAt H x).target ∈ 𝓝 (I ((chartAt H x) x)) := by
348348
apply IsOpen.mem_nhds
@@ -404,7 +404,7 @@ bundles. -/
404404

405405
lemma equivTangentBundleProd_eq_tangentMap_prod_tangentMap :
406406
equivTangentBundleProd I M I' M' = fun (p : TangentBundle (I.prod I') (M × M')) ↦
407-
(tangentMap (I.prod I') I Prod.fst p, tangentMap (I.prod I') I' Prod.snd p) := by
407+
(tangentMap% (@Prod.fst M M') p, tangentMap% (@Prod.snd M M') p) := by
408408
simp only [tangentMap_prodFst, tangentMap_prodSnd]; rfl
409409

410410
variable [IsManifold I 1 M] [IsManifold I' 1 M']

Mathlib/Geometry/Manifold/GroupLieAlgebra.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ variable (I G) in
5353
`GroupLieAlgebra` instead of `LieAlgebra` as the latter is taken as a generic class. -/
5454
@[to_additive /-- The Lie algebra of an additive Lie group, i.e., its tangent space at zero. We use
5555
the word `AddGroupLieAlgebra` instead of `LieAlgebra` as the latter is taken as a generic class. -/]
56-
abbrev GroupLieAlgebra : Type _ := TangentSpace I (1 : G)
56+
abbrev GroupLieAlgebra : Type _ := TangentSpace% (1 : G)
5757

5858
/-- The invariant vector field associated to a vector `v` in the Lie algebra. At a point `g`, it
5959
is given by the image of `v` under left-multiplication by `g`. -/
6060
@[to_additive /-- The invariant vector field associated to a vector `v` in the Lie algebra. At a
6161
point `g`, it is given by the image of `v` under left-addition by `g`. -/]
62-
noncomputable def mulInvariantVectorField (v : GroupLieAlgebra I G) (g : G) : TangentSpace I g :=
62+
noncomputable def mulInvariantVectorField (v : GroupLieAlgebra I G) (g : G) : TangentSpace% g :=
6363
mfderiv% (g * ·) (1 : G) v
6464

6565
set_option backward.isDefEq.respectTransparency false in
@@ -134,7 +134,7 @@ lemma mpullback_mulInvariantVectorField (g : G) (v : GroupLieAlgebra I G) :
134134

135135
set_option backward.isDefEq.respectTransparency false in
136136
@[to_additive]
137-
lemma mulInvariantVectorField_eq_mpullback (g : G) (V : Π (g : G), TangentSpace I g) :
137+
lemma mulInvariantVectorField_eq_mpullback (g : G) (V : Π (g : G), TangentSpace% g) :
138138
mulInvariantVectorField (V 1) g = mpullback I I (g⁻¹ * ·) V g := by
139139
have A : 1 = g⁻¹ * g := by simp
140140
simp only [mulInvariantVectorField, mpullback, inverse_mfderiv_mul_left]
@@ -170,7 +170,7 @@ theorem contMDiff_mulInvariantVectorField (v : GroupLieAlgebra I G) :
170170
(equivTangentBundleProd I G I G).symm
171171
have S₂ : CMDiff (minSmoothness 𝕜 2) F₂ := contMDiff_equivTangentBundleProd_symm
172172
let F₃ : TangentBundle (I.prod I) (G × G) → TangentBundle I G :=
173-
tangentMap (I.prod I) I (fun (p : G × G) ↦ p.1 * p.2)
173+
tangentMap% (fun (p : G × G) ↦ p.1 * p.2)
174174
have S₃ : CMDiff (minSmoothness 𝕜 2) F₃ := by
175175
apply ContMDiff.contMDiff_tangentMap _ (m := minSmoothness 𝕜 2) le_rfl
176176
rw [A]

Mathlib/Geometry/Manifold/IntegralCurve/Basic.lean

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Authors: Winston Yin
66
module
77

88
public import Mathlib.Geometry.Manifold.MFDeriv.Tangent
9+
public import Mathlib.Geometry.Manifold.Notation
910

1011
/-!
1112
# Integral curves of vector fields on a manifold
@@ -62,21 +63,21 @@ variable
6263
/-- If `γ : ℝ → M` is $C^1$ on `s : Set ℝ` and `v` is a vector field on `M`,
6364
`IsMIntegralCurveOn γ v s` means `γ t` is tangent to `v (γ t)` for all `t ∈ s`. The value of `γ`
6465
outside of `s` is irrelevant and considered junk. -/
65-
def IsMIntegralCurveOn (γ : ℝ → M) (v : (x : M) → TangentSpace I x) (s : Set ℝ) : Prop :=
66+
def IsMIntegralCurveOn (γ : ℝ → M) (v : (x : M) → TangentSpace% x) (s : Set ℝ) : Prop :=
6667
∀ t ∈ s, HasMFDerivAt[s] γ t ((1 : ℝ →L[ℝ] ℝ).smulRight <| v (γ t))
6768

6869
/-- If `v` is a vector field on `M` and `t₀ : ℝ`, `IsMIntegralCurveAt γ v t₀` means `γ : ℝ → M` is a
6970
local integral curve of `v` in a neighbourhood containing `t₀`. The value of `γ` outside of this
7071
interval is irrelevant and considered junk. -/
71-
def IsMIntegralCurveAt (γ : ℝ → M) (v : (x : M) → TangentSpace I x) (t₀ : ℝ) : Prop :=
72+
def IsMIntegralCurveAt (γ : ℝ → M) (v : (x : M) → TangentSpace% x) (t₀ : ℝ) : Prop :=
7273
∀ᶠ t in 𝓝 t₀, HasMFDerivAt% γ t ((1 : ℝ →L[ℝ] ℝ).smulRight <| v (γ t))
7374

7475
/-- If `v : M → TM` is a vector field on `M`, `IsMIntegralCurve γ v` means `γ : ℝ → M` is a global
7576
integral curve of `v`. That is, `γ t` is tangent to `v (γ t)` for all `t : ℝ`. -/
76-
def IsMIntegralCurve (γ : ℝ → M) (v : (x : M) → TangentSpace I x) : Prop :=
77+
def IsMIntegralCurve (γ : ℝ → M) (v : (x : M) → TangentSpace% x) : Prop :=
7778
∀ t : ℝ, HasMFDerivAt% γ t ((1 : ℝ →L[ℝ] ℝ).smulRight (v (γ t)))
7879

79-
variable {γ γ' : ℝ → M} {v : (x : M) → TangentSpace I x} {s s' : Set ℝ} {t₀ : ℝ}
80+
variable {γ γ' : ℝ → M} {v : (x : M) → TangentSpace% x} {s s' : Set ℝ} {t₀ : ℝ}
8081

8182
lemma IsMIntegralCurve.isMIntegralCurveOn (h : IsMIntegralCurve γ v) (s : Set ℝ) :
8283
IsMIntegralCurveOn γ v s := fun t _ ↦ (h t).hasMFDerivWithinAt

Mathlib/Geometry/Manifold/MFDeriv/SpecificFunctions.lean

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module
77

88
public import Mathlib.Analysis.Calculus.FDeriv.Mul
99
public import Mathlib.Geometry.Manifold.MFDeriv.FDeriv
10-
import Mathlib.Geometry.Manifold.Notation
10+
public import Mathlib.Geometry.Manifold.Notation
1111

1212
/-!
1313
# Differentiability of specific functions
@@ -160,10 +160,10 @@ theorem mfderivWithin_id (hxs : UniqueMDiffWithinAt I s x) :
160160

161161
set_option backward.isDefEq.respectTransparency false in
162162
@[simp, mfld_simps]
163-
theorem tangentMap_id : tangentMap I I (id : M → M) = id := by ext1 ⟨x, v⟩; simp [tangentMap]
163+
theorem tangentMap_id : tangentMap% (@id M) = id := by ext1 ⟨x, v⟩; simp [tangentMap]
164164

165165
theorem tangentMapWithin_id {p : TangentBundle I M} (hs : UniqueMDiffWithinAt I s p.proj) :
166-
tangentMapWithin I I (id : M → M) s p = p := by
166+
tangentMap[s] (id : M → M) p = p := by
167167
simp only [tangentMapWithin, id]
168168
rw [mfderivWithin_id]
169169
· rcases p with ⟨⟩; rfl
@@ -323,12 +323,12 @@ theorem mfderivWithin_fst {s : Set (M × M')} {x : M × M'}
323323

324324
@[simp, mfld_simps]
325325
theorem tangentMap_prodFst {p : TangentBundle (I.prod I') (M × M')} :
326-
tangentMap (I.prod I') I Prod.fst p = ⟨p.proj.1, p.2.1⟩ := by
326+
tangentMap% (@Prod.fst M M') p = ⟨p.proj.1, p.2.1⟩ := by
327327
simp [tangentMap]; rfl
328328

329329
theorem tangentMapWithin_prodFst {s : Set (M × M')} {p : TangentBundle (I.prod I') (M × M')}
330330
(hs : UniqueMDiffWithinAt (I.prod I') s p.proj) :
331-
tangentMapWithin (I.prod I') I Prod.fst s p = ⟨p.proj.1, p.2.1⟩ := by
331+
tangentMap[s] (@Prod.fst M M') p = ⟨p.proj.1, p.2.1⟩ := by
332332
simp only [tangentMapWithin]
333333
rw [mfderivWithin_fst]
334334
· rcases p with ⟨⟩; rfl
@@ -535,12 +535,12 @@ end prodMap
535535

536536
@[simp, mfld_simps]
537537
theorem tangentMap_prodSnd {p : TangentBundle (I.prod I') (M × M')} :
538-
tangentMap (I.prod I') I' Prod.snd p = ⟨p.proj.2, p.2.2⟩ := by
538+
tangentMap% (@Prod.snd M M') p = ⟨p.proj.2, p.2.2⟩ := by
539539
simp [tangentMap]; rfl
540540

541541
theorem tangentMapWithin_prodSnd {s : Set (M × M')} {p : TangentBundle (I.prod I') (M × M')}
542542
(hs : UniqueMDiffWithinAt (I.prod I') s p.proj) :
543-
tangentMapWithin (I.prod I') I' Prod.snd s p = ⟨p.proj.2, p.2.2⟩ := by
543+
tangentMap[s] (@Prod.snd M M') p = ⟨p.proj.2, p.2.2⟩ := by
544544
simp only [tangentMapWithin]
545545
rw [mfderivWithin_snd hs]
546546
rcases p with ⟨⟩; rfl
@@ -555,8 +555,9 @@ theorem mfderiv_prod_left {x₀ : M} {y₀ : M'} :
555555
refine (mdifferentiableAt_id.mfderiv_prod mdifferentiableAt_const).trans ?_
556556
rw [mfderiv_id, mfderiv_const, ContinuousLinearMap.inl]
557557

558+
-- TODO: better error when the type of x is left open
558559
theorem tangentMap_prod_left {p : TangentBundle I M} {y₀ : M'} :
559-
tangentMap I (I.prod I') (fun x ↦ (x, y₀)) p = ⟨(p.1, y₀), (p.2, 0)⟩ := by
560+
tangentMap% (fun (x : M) ↦ (x, y₀)) p = ⟨(p.1, y₀), (p.2, 0)⟩ := by
560561
simp only [tangentMap, mfderiv_prod_left, TotalSpace.mk_inj]
561562
rfl
562563

@@ -568,7 +569,7 @@ theorem mfderiv_prod_right {x₀ : M} {y₀ : M'} :
568569
rw [mfderiv_id, mfderiv_const, ContinuousLinearMap.inr]
569570

570571
theorem tangentMap_prod_right {p : TangentBundle I' M'} {x₀ : M} :
571-
tangentMap I' (I.prod I') (fun y ↦ (x₀, y)) p = ⟨(x₀, p.1), (0, p.2)⟩ := by
572+
tangentMap% (fun (y : M') ↦ (x₀, y)) p = ⟨(x₀, p.1), (0, p.2)⟩ := by
572573
simp only [tangentMap, mfderiv_prod_right, TotalSpace.mk_inj]
573574
rfl
574575

Mathlib/Geometry/Manifold/MFDeriv/Tangent.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
3535
/-- The derivative of the chart at a base point is the chart of the tangent bundle, composed with
3636
the identification between the tangent bundle of the model space and the product space. -/
3737
theorem tangentMap_chart {p q : TangentBundle I M} (h : q.1 ∈ (chartAt H p.1).source) :
38-
tangentMap I I (chartAt H p.1) q =
38+
tangentMap% (chartAt H p.1) q =
3939
(TotalSpace.toProd _ _).symm
4040
((chartAt (ModelProd H E) p : TangentBundle I M → ModelProd H E) q) := by
4141
dsimp [tangentMap]
@@ -48,7 +48,7 @@ tangent bundle, composed with the identification between the tangent bundle of t
4848
the product space. -/
4949
theorem tangentMap_chart_symm {p : TangentBundle I M} {q : TangentBundle I H}
5050
(h : q.1 ∈ (chartAt H p.1).target) :
51-
tangentMap I I (chartAt H p.1).symm q =
51+
tangentMap% (chartAt H p.1).symm q =
5252
(chartAt (ModelProd H E) p).symm (TotalSpace.toProd H E q) := by
5353
dsimp only [tangentMap]
5454
rw [MDifferentiableAt.mfderiv (mdifferentiableAt_atlas_symm (chart_mem_atlas _ _) h)]

0 commit comments

Comments
 (0)