geometry.manifold.vector_bundle.tangentMathlib.Geometry.Manifold.VectorBundle.Tangent

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

refactor: redefine bundle.total_space (#19221)
  • Use a custom structure for bundle.total_space.
    • Use bundle.total_space.mk instead of bundle.total_space_mk.
    • Use bundle.total_space.to_prod instead of equiv.sigma_equiv_prod.
    • Use bundle.total_space.mk' (scoped notation) to specify F.
    • Rename bundle.trivial.proj_snd to bundle.total_space.trivial_snd to allow dot notation. Should we just use bundle.total_space.snd since bundle.trivial is now reducible?
  • Add an unused argument to bundle.total_space.
  • Make bundle.trivial and bundle.continuous_linear_map reducible.
  • Drop instances that are no longer needed.
Diff
@@ -136,11 +136,10 @@ variable (M)
 /-- The tangent bundle to a smooth manifold, as a Sigma type. Defined in terms of
 `bundle.total_space` to be able to put a suitable topology on it. -/
 @[nolint has_nonempty_instance, reducible] -- is empty if the base manifold is empty
-def tangent_bundle := bundle.total_space (tangent_space I : M → Type*)
+def tangent_bundle := bundle.total_space E (tangent_space I : M → Type*)
 
 local notation `TM` := tangent_bundle I M
 
-
 section tangent_bundle_instances
 
 /- In general, the definition of tangent_space is not reducible, so that type class inference
@@ -187,7 +186,8 @@ rfl
 
 @[simp, mfld_simps]
 lemma trivialization_at_source (x : M) :
-  (trivialization_at E (tangent_space I) x).source = π _ ⁻¹' (chart_at H x).source :=
+  (trivialization_at E (tangent_space I) x).source =
+    π E (tangent_space I) ⁻¹' (chart_at H x).source :=
 rfl
 
 @[simp, mfld_simps]
@@ -287,7 +287,7 @@ end tangent_bundle_instances
 /-- In the tangent bundle to the model space, the charts are just the canonical identification
 between a product type and a sigma type, a.k.a. `equiv.sigma_equiv_prod`. -/
 @[simp, mfld_simps] lemma tangent_bundle_model_space_chart_at (p : tangent_bundle I H) :
-  (chart_at (model_prod H E) p).to_local_equiv = (equiv.sigma_equiv_prod H E).to_local_equiv :=
+  (chart_at (model_prod H E) p).to_local_equiv = (total_space.to_prod H E).to_local_equiv :=
 begin
   ext x : 1,
   { ext, { refl },
@@ -303,12 +303,12 @@ begin
 end
 
 @[simp, mfld_simps] lemma tangent_bundle_model_space_coe_chart_at (p : tangent_bundle I H) :
-  ⇑(chart_at (model_prod H E) p) = equiv.sigma_equiv_prod H E :=
+  ⇑(chart_at (model_prod H E) p) = total_space.to_prod H E :=
 by { unfold_coes, simp_rw [tangent_bundle_model_space_chart_at], refl }
 
 @[simp, mfld_simps] lemma tangent_bundle_model_space_coe_chart_at_symm (p : tangent_bundle I H) :
   ((chart_at (model_prod H E) p).symm : model_prod H E → tangent_bundle I H) =
-  (equiv.sigma_equiv_prod H E).symm :=
+  (total_space.to_prod H E).symm :=
 by { unfold_coes,
   simp_rw [local_homeomorph.symm_to_local_equiv, tangent_bundle_model_space_chart_at], refl }
 
@@ -339,16 +339,16 @@ def tangent_bundle_model_space_homeomorph : tangent_bundle I H ≃ₜ model_prod
       simp only with mfld_simps },
     simpa only with mfld_simps using this,
   end,
-  .. equiv.sigma_equiv_prod H E }
+  .. total_space.to_prod H E }
 
 @[simp, mfld_simps] lemma tangent_bundle_model_space_homeomorph_coe :
   (tangent_bundle_model_space_homeomorph H I : tangent_bundle I H → model_prod H E)
-  = equiv.sigma_equiv_prod H E :=
+  = total_space.to_prod H E :=
 rfl
 
 @[simp, mfld_simps] lemma tangent_bundle_model_space_homeomorph_coe_symm :
   ((tangent_bundle_model_space_homeomorph H I).symm : model_prod H E → tangent_bundle I H)
-  = (equiv.sigma_equiv_prod H E).symm :=
+  = (total_space.to_prod H E).symm :=
 rfl
 
 section in_tangent_coordinates

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(first ported)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -354,7 +354,7 @@ instance tangentBundleCore.isSmooth : (tangentBundleCore I M).IsSmooth I :=
   rw [SmoothOn, contMDiffOn_iff_source_of_mem_maximalAtlas (subset_maximal_atlas I i.2),
     contMDiffOn_iff_contDiffOn]
   refine' ((contDiffOn_fderiv_coord_change I i j).congr fun x hx => _).mono _
-  · rw [PartialEquiv.trans_source'] at hx 
+  · rw [PartialEquiv.trans_source'] at hx
     simp_rw [Function.comp_apply, tangentBundleCore_coordChange, (i.1.extend I).right_inv hx.1]
   · exact (i.1.extend_image_source_inter j.1 I).Subset
   · apply inter_subset_left
Diff
@@ -204,13 +204,13 @@ protected theorem chartAt (p : TM) :
 #align tangent_bundle.chart_at TangentBundle.chartAt
 -/
 
-#print TangentBundle.chartAt_toLocalEquiv /-
-theorem chartAt_toLocalEquiv (p : TM) :
-    (chartAt (ModelProd H E) p).toLocalEquiv =
-      (tangentBundleCore I M).toFiberBundleCore.localTrivAsLocalEquiv (achart H p.1) ≫
-        (chartAt H p.1).toLocalEquiv.Prod (LocalEquiv.refl E) :=
+#print TangentBundle.chartAt_toPartialEquiv /-
+theorem chartAt_toPartialEquiv (p : TM) :
+    (chartAt (ModelProd H E) p).toPartialEquiv =
+      (tangentBundleCore I M).toFiberBundleCore.localTrivAsPartialEquiv (achart H p.1) ≫
+        (chartAt H p.1).toPartialEquiv.Prod (PartialEquiv.refl E) :=
   rfl
-#align tangent_bundle.chart_at_to_local_equiv TangentBundle.chartAt_toLocalEquiv
+#align tangent_bundle.chart_at_to_local_equiv TangentBundle.chartAt_toPartialEquiv
 -/
 
 #print TangentBundle.trivializationAt_eq_localTriv /-
@@ -354,7 +354,7 @@ instance tangentBundleCore.isSmooth : (tangentBundleCore I M).IsSmooth I :=
   rw [SmoothOn, contMDiffOn_iff_source_of_mem_maximalAtlas (subset_maximal_atlas I i.2),
     contMDiffOn_iff_contDiffOn]
   refine' ((contDiffOn_fderiv_coord_change I i j).congr fun x hx => _).mono _
-  · rw [LocalEquiv.trans_source'] at hx 
+  · rw [PartialEquiv.trans_source'] at hx 
     simp_rw [Function.comp_apply, tangentBundleCore_coordChange, (i.1.extend I).right_inv hx.1]
   · exact (i.1.extend_image_source_inter j.1 I).Subset
   · apply inter_subset_left
@@ -377,15 +377,16 @@ end TangentBundleInstances
 between a product type and a sigma type, a.k.a. `equiv.sigma_equiv_prod`. -/
 @[simp, mfld_simps]
 theorem tangentBundle_model_space_chartAt (p : TangentBundle I H) :
-    (chartAt (ModelProd H E) p).toLocalEquiv = (TotalSpace.toProd H E).toLocalEquiv :=
+    (chartAt (ModelProd H E) p).toPartialEquiv = (TotalSpace.toProd H E).toPartialEquiv :=
   by
   ext x : 1
   · ext; · rfl
     exact (tangentBundleCore I H).coordChange_self (achart _ x.1) x.1 (mem_achart_source H x.1) x.2
   · intro x; ext; · rfl; apply hEq_of_eq
     exact (tangentBundleCore I H).coordChange_self (achart _ x.1) x.1 (mem_achart_source H x.1) x.2
-  simp_rw [TangentBundle.chartAt, FiberBundleCore.localTriv, FiberBundleCore.localTrivAsLocalEquiv,
-    VectorBundleCore.toFiberBundleCore_baseSet, tangentBundleCore_baseSet]
+  simp_rw [TangentBundle.chartAt, FiberBundleCore.localTriv,
+    FiberBundleCore.localTrivAsPartialEquiv, VectorBundleCore.toFiberBundleCore_baseSet,
+    tangentBundleCore_baseSet]
   simp only [mfld_simps]
 #align tangent_bundle_model_space_chart_at tangentBundle_model_space_chartAt
 -/
@@ -405,7 +406,7 @@ theorem tangentBundle_model_space_coe_chartAt_symm (p : TangentBundle I H) :
       (TotalSpace.toProd H E).symm :=
   by
   unfold_coes
-  simp_rw [PartialHomeomorph.symm_toLocalEquiv, tangentBundle_model_space_chartAt]; rfl
+  simp_rw [PartialHomeomorph.symm_toPartialEquiv, tangentBundle_model_space_chartAt]; rfl
 #align tangent_bundle_model_space_coe_chart_at_symm tangentBundle_model_space_coe_chartAt_symm
 -/
 
Diff
@@ -34,7 +34,7 @@ This defines a smooth vector bundle `tangent_bundle` with fibers `tangent_space`
 -/
 
 
-open Bundle Set SmoothManifoldWithCorners LocalHomeomorph ContinuousLinearMap
+open Bundle Set SmoothManifoldWithCorners PartialHomeomorph ContinuousLinearMap
 
 open scoped Manifold Topology Bundle
 
@@ -63,7 +63,7 @@ theorem contDiffOn_fderiv_coord_change (i j : atlas H M) :
   intro x hx
   refine' (ContDiffWithinAt.fderivWithin_right _ I.unique_diff le_top <| h hx).mono h
   refine'
-    (LocalHomeomorph.contDiffOn_extend_coord_change I (subset_maximal_atlas I j.2)
+    (PartialHomeomorph.contDiffOn_extend_coord_change I (subset_maximal_atlas I j.2)
           (subset_maximal_atlas I i.2) x hx).mono_of_mem
       _
   exact i.1.extend_coord_change_source_mem_nhdsWithin j.1 I hx
@@ -198,8 +198,8 @@ namespace TangentBundle
 #print TangentBundle.chartAt /-
 protected theorem chartAt (p : TM) :
     chartAt (ModelProd H E) p =
-      ((tangentBundleCore I M).toFiberBundleCore.localTriv (achart H p.1)).toLocalHomeomorph ≫ₕ
-        (chartAt H p.1).Prod (LocalHomeomorph.refl E) :=
+      ((tangentBundleCore I M).toFiberBundleCore.localTriv (achart H p.1)).toPartialHomeomorph ≫ₕ
+        (chartAt H p.1).Prod (PartialHomeomorph.refl E) :=
   rfl
 #align tangent_bundle.chart_at TangentBundle.chartAt
 -/
@@ -405,7 +405,7 @@ theorem tangentBundle_model_space_coe_chartAt_symm (p : TangentBundle I H) :
       (TotalSpace.toProd H E).symm :=
   by
   unfold_coes
-  simp_rw [LocalHomeomorph.symm_toLocalEquiv, tangentBundle_model_space_chartAt]; rfl
+  simp_rw [PartialHomeomorph.symm_toLocalEquiv, tangentBundle_model_space_chartAt]; rfl
 #align tangent_bundle_model_space_coe_chart_at_symm tangentBundle_model_space_coe_chartAt_symm
 -/
 
@@ -430,7 +430,7 @@ def tangentBundleModelSpaceHomeomorph : TangentBundle I H ≃ₜ ModelProd H E :
       have : Continuous (chart_at (ModelProd H E) p) :=
         by
         rw [continuous_iff_continuousOn_univ]
-        convert LocalHomeomorph.continuousOn _
+        convert PartialHomeomorph.continuousOn _
         simp only [TangentSpace.fiberBundle, mfld_simps]
       simpa only [mfld_simps] using this
     continuous_invFun :=
@@ -439,7 +439,7 @@ def tangentBundleModelSpaceHomeomorph : TangentBundle I H ≃ₜ ModelProd H E :
       have : Continuous (chart_at (ModelProd H E) p).symm :=
         by
         rw [continuous_iff_continuousOn_univ]
-        convert LocalHomeomorph.continuousOn _
+        convert PartialHomeomorph.continuousOn _
         simp only [mfld_simps]
       simpa only [mfld_simps] using this }
 #align tangent_bundle_model_space_homeomorph tangentBundleModelSpaceHomeomorph
Diff
@@ -3,7 +3,7 @@ Copyright (c) 2022 Floris van Doorn. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn, Heather Macbeth
 -/
-import Mathbin.Geometry.Manifold.VectorBundle.Basic
+import Geometry.Manifold.VectorBundle.Basic
 
 #align_import geometry.manifold.vector_bundle.tangent from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
 
Diff
@@ -2,14 +2,11 @@
 Copyright (c) 2022 Floris van Doorn. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn, Heather Macbeth
-
-! This file was ported from Lean 3 source module geometry.manifold.vector_bundle.tangent
-! leanprover-community/mathlib commit e473c3198bb41f68560cab68a0529c854b618833
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Geometry.Manifold.VectorBundle.Basic
 
+#align_import geometry.manifold.vector_bundle.tangent from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
+
 /-! # Tangent bundles
 
 > THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn, Heather Macbeth
 
 ! This file was ported from Lean 3 source module geometry.manifold.vector_bundle.tangent
-! leanprover-community/mathlib commit 30faa0c3618ce1472bf6305ae0e3fa56affa3f95
+! leanprover-community/mathlib commit e473c3198bb41f68560cab68a0529c854b618833
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -163,7 +163,7 @@ variable (M)
 `bundle.total_space` to be able to put a suitable topology on it. -/
 @[nolint has_nonempty_instance, reducible]
 def TangentBundle :=
-  Bundle.TotalSpace (TangentSpace I : M → Type _)
+  Bundle.TotalSpace E (TangentSpace I : M → Type _)
 #align tangent_bundle TangentBundle
 -/
 
@@ -227,7 +227,8 @@ theorem trivializationAt_eq_localTriv (x : M) :
 #print TangentBundle.trivializationAt_source /-
 @[simp, mfld_simps]
 theorem trivializationAt_source (x : M) :
-    (trivializationAt E (TangentSpace I) x).source = π _ ⁻¹' (chartAt H x).source :=
+    (trivializationAt E (TangentSpace I) x).source =
+      π E (TangentSpace I) ⁻¹' (chartAt H x).source :=
   rfl
 #align tangent_bundle.trivialization_at_source TangentBundle.trivializationAt_source
 -/
@@ -379,7 +380,7 @@ end TangentBundleInstances
 between a product type and a sigma type, a.k.a. `equiv.sigma_equiv_prod`. -/
 @[simp, mfld_simps]
 theorem tangentBundle_model_space_chartAt (p : TangentBundle I H) :
-    (chartAt (ModelProd H E) p).toLocalEquiv = (Equiv.sigmaEquivProd H E).toLocalEquiv :=
+    (chartAt (ModelProd H E) p).toLocalEquiv = (TotalSpace.toProd H E).toLocalEquiv :=
   by
   ext x : 1
   · ext; · rfl
@@ -395,7 +396,7 @@ theorem tangentBundle_model_space_chartAt (p : TangentBundle I H) :
 #print tangentBundle_model_space_coe_chartAt /-
 @[simp, mfld_simps]
 theorem tangentBundle_model_space_coe_chartAt (p : TangentBundle I H) :
-    ⇑(chartAt (ModelProd H E) p) = Equiv.sigmaEquivProd H E := by unfold_coes;
+    ⇑(chartAt (ModelProd H E) p) = TotalSpace.toProd H E := by unfold_coes;
   simp_rw [tangentBundle_model_space_chartAt]; rfl
 #align tangent_bundle_model_space_coe_chart_at tangentBundle_model_space_coe_chartAt
 -/
@@ -404,7 +405,7 @@ theorem tangentBundle_model_space_coe_chartAt (p : TangentBundle I H) :
 @[simp, mfld_simps]
 theorem tangentBundle_model_space_coe_chartAt_symm (p : TangentBundle I H) :
     ((chartAt (ModelProd H E) p).symm : ModelProd H E → TangentBundle I H) =
-      (Equiv.sigmaEquivProd H E).symm :=
+      (TotalSpace.toProd H E).symm :=
   by
   unfold_coes
   simp_rw [LocalHomeomorph.symm_toLocalEquiv, tangentBundle_model_space_chartAt]; rfl
@@ -425,7 +426,7 @@ variable (H)
 as a homeomorphism -/
 def tangentBundleModelSpaceHomeomorph : TangentBundle I H ≃ₜ ModelProd H E :=
   {
-    Equiv.sigmaEquivProd H
+    TotalSpace.toProd H
       E with
     continuous_toFun := by
       let p : TangentBundle I H := ⟨I.symm (0 : E), (0 : E)⟩
@@ -451,7 +452,7 @@ def tangentBundleModelSpaceHomeomorph : TangentBundle I H ≃ₜ ModelProd H E :
 @[simp, mfld_simps]
 theorem tangentBundleModelSpaceHomeomorph_coe :
     (tangentBundleModelSpaceHomeomorph H I : TangentBundle I H → ModelProd H E) =
-      Equiv.sigmaEquivProd H E :=
+      TotalSpace.toProd H E :=
   rfl
 #align tangent_bundle_model_space_homeomorph_coe tangentBundleModelSpaceHomeomorph_coe
 -/
@@ -460,7 +461,7 @@ theorem tangentBundleModelSpaceHomeomorph_coe :
 @[simp, mfld_simps]
 theorem tangentBundleModelSpaceHomeomorph_coe_symm :
     ((tangentBundleModelSpaceHomeomorph H I).symm : ModelProd H E → TangentBundle I H) =
-      (Equiv.sigmaEquivProd H E).symm :=
+      (TotalSpace.toProd H E).symm :=
   rfl
 #align tangent_bundle_model_space_homeomorph_coe_symm tangentBundleModelSpaceHomeomorph_coe_symm
 -/
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn, Heather Macbeth
 
 ! This file was ported from Lean 3 source module geometry.manifold.vector_bundle.tangent
-! leanprover-community/mathlib commit e354e865255654389cc46e6032160238df2e0f40
+! leanprover-community/mathlib commit 30faa0c3618ce1472bf6305ae0e3fa56affa3f95
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -12,6 +12,9 @@ import Mathbin.Geometry.Manifold.VectorBundle.Basic
 
 /-! # Tangent bundles
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 This file defines the tangent bundle as a smooth vector bundle.
 
 Let `M` be a smooth manifold with corners with model `I` on `(E, H)`. We define the tangent bundle
Diff
@@ -51,6 +51,7 @@ variable {𝕜 : Type _} [NontriviallyNormedField 𝕜] {E : Type _} [NormedAddC
 
 variable (I)
 
+#print contDiffOn_fderiv_coord_change /-
 /-- Auxiliary lemma for tangent spaces: the derivative of a coordinate change between two charts is
   smooth on its source. -/
 theorem contDiffOn_fderiv_coord_change (i j : atlas H M) :
@@ -67,11 +68,13 @@ theorem contDiffOn_fderiv_coord_change (i j : atlas H M) :
       _
   exact i.1.extend_coord_change_source_mem_nhdsWithin j.1 I hx
 #align cont_diff_on_fderiv_coord_change contDiffOn_fderiv_coord_change
+-/
 
 variable (M)
 
 open SmoothManifoldWithCorners
 
+#print tangentBundleCore /-
 /-- Let `M` be a smooth manifold with corners with model `I` on `(E, H)`.
 Then `vector_bundle_core I M` is the vector bundle core for the tangent bundle over `M`.
 It is indexed by the atlas of `M`, with fiber `E` and its change of coordinates from the chart `i`
@@ -125,15 +128,19 @@ def tangentBundleCore : VectorBundleCore 𝕜 M E (atlas H M)
     · exact I.unique_diff_at_image
     · rw [Function.comp_apply, i.1.extend_left_inv I hxi]
 #align tangent_bundle_core tangentBundleCore
+-/
 
 variable {M}
 
+#print tangentBundleCore_coordChange_achart /-
 theorem tangentBundleCore_coordChange_achart (x x' z : M) :
     (tangentBundleCore I M).coordChange (achart H x) (achart H x') z =
       fderivWithin 𝕜 (extChartAt I x' ∘ (extChartAt I x).symm) (range I) (extChartAt I x z) :=
   rfl
 #align tangent_bundle_core_coord_change_achart tangentBundleCore_coordChange_achart
+-/
 
+#print TangentSpace /-
 /-- The tangent space at a point of the manifold `M`. It is just `E`. We could use instead
 `(tangent_bundle_core I M).to_topological_vector_bundle_core.fiber x`, but we use `E` to help the
 kernel.
@@ -143,9 +150,11 @@ def TangentSpace (x : M) : Type _ :=
   E
 deriving TopologicalSpace, AddCommGroup, TopologicalAddGroup
 #align tangent_space TangentSpace
+-/
 
 variable (M)
 
+#print TangentBundle /-
 -- is empty if the base manifold is empty
 /-- The tangent bundle to a smooth manifold, as a Sigma type. Defined in terms of
 `bundle.total_space` to be able to put a suitable topology on it. -/
@@ -153,6 +162,7 @@ variable (M)
 def TangentBundle :=
   Bundle.TotalSpace (TangentSpace I : M → Type _)
 #align tangent_bundle TangentBundle
+-/
 
 local notation "TM" => TangentBundle I M
 
@@ -185,45 +195,58 @@ instance : VectorBundle 𝕜 E (TangentSpace I : M → Type _) :=
 
 namespace TangentBundle
 
+#print TangentBundle.chartAt /-
 protected theorem chartAt (p : TM) :
     chartAt (ModelProd H E) p =
       ((tangentBundleCore I M).toFiberBundleCore.localTriv (achart H p.1)).toLocalHomeomorph ≫ₕ
         (chartAt H p.1).Prod (LocalHomeomorph.refl E) :=
   rfl
 #align tangent_bundle.chart_at TangentBundle.chartAt
+-/
 
+#print TangentBundle.chartAt_toLocalEquiv /-
 theorem chartAt_toLocalEquiv (p : TM) :
     (chartAt (ModelProd H E) p).toLocalEquiv =
       (tangentBundleCore I M).toFiberBundleCore.localTrivAsLocalEquiv (achart H p.1) ≫
         (chartAt H p.1).toLocalEquiv.Prod (LocalEquiv.refl E) :=
   rfl
 #align tangent_bundle.chart_at_to_local_equiv TangentBundle.chartAt_toLocalEquiv
+-/
 
+#print TangentBundle.trivializationAt_eq_localTriv /-
 theorem trivializationAt_eq_localTriv (x : M) :
     trivializationAt E (TangentSpace I) x =
       (tangentBundleCore I M).toFiberBundleCore.localTriv (achart H x) :=
   rfl
 #align tangent_bundle.trivialization_at_eq_local_triv TangentBundle.trivializationAt_eq_localTriv
+-/
 
+#print TangentBundle.trivializationAt_source /-
 @[simp, mfld_simps]
 theorem trivializationAt_source (x : M) :
     (trivializationAt E (TangentSpace I) x).source = π _ ⁻¹' (chartAt H x).source :=
   rfl
 #align tangent_bundle.trivialization_at_source TangentBundle.trivializationAt_source
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print TangentBundle.trivializationAt_target /-
 @[simp, mfld_simps]
 theorem trivializationAt_target (x : M) :
     (trivializationAt E (TangentSpace I) x).target = (chartAt H x).source ×ˢ univ :=
   rfl
 #align tangent_bundle.trivialization_at_target TangentBundle.trivializationAt_target
+-/
 
+#print TangentBundle.trivializationAt_baseSet /-
 @[simp, mfld_simps]
 theorem trivializationAt_baseSet (x : M) :
     (trivializationAt E (TangentSpace I) x).baseSet = (chartAt H x).source :=
   rfl
 #align tangent_bundle.trivialization_at_base_set TangentBundle.trivializationAt_baseSet
+-/
 
+#print TangentBundle.trivializationAt_apply /-
 theorem trivializationAt_apply (x : M) (z : TM) :
     trivializationAt E (TangentSpace I) x z =
       (z.1,
@@ -231,36 +254,48 @@ theorem trivializationAt_apply (x : M) (z : TM) :
           ((chartAt H z.1).extend I z.1) z.2) :=
   rfl
 #align tangent_bundle.trivialization_at_apply TangentBundle.trivializationAt_apply
+-/
 
+#print TangentBundle.trivializationAt_fst /-
 @[simp, mfld_simps]
 theorem trivializationAt_fst (x : M) (z : TM) : (trivializationAt E (TangentSpace I) x z).1 = z.1 :=
   rfl
 #align tangent_bundle.trivialization_at_fst TangentBundle.trivializationAt_fst
+-/
 
+#print TangentBundle.mem_chart_source_iff /-
 @[simp, mfld_simps]
 theorem mem_chart_source_iff (p q : TM) :
     p ∈ (chartAt (ModelProd H E) q).source ↔ p.1 ∈ (chartAt H q.1).source := by
   simp only [FiberBundle.chartedSpace_chartAt, mfld_simps]
 #align tangent_bundle.mem_chart_source_iff TangentBundle.mem_chart_source_iff
+-/
 
+#print TangentBundle.mem_chart_target_iff /-
 @[simp, mfld_simps]
 theorem mem_chart_target_iff (p : H × E) (q : TM) :
     p ∈ (chartAt (ModelProd H E) q).target ↔ p.1 ∈ (chartAt H q.1).target := by
   simp (config := { contextual := true }) only [FiberBundle.chartedSpace_chartAt,
     and_iff_left_iff_imp, mfld_simps]
 #align tangent_bundle.mem_chart_target_iff TangentBundle.mem_chart_target_iff
+-/
 
+#print TangentBundle.coe_chartAt_fst /-
 @[simp, mfld_simps]
 theorem coe_chartAt_fst (p q : TM) : ((chartAt (ModelProd H E) q) p).1 = chartAt H q.1 p.1 :=
   rfl
 #align tangent_bundle.coe_chart_at_fst TangentBundle.coe_chartAt_fst
+-/
 
+#print TangentBundle.coe_chartAt_symm_fst /-
 @[simp, mfld_simps]
 theorem coe_chartAt_symm_fst (p : H × E) (q : TM) :
     ((chartAt (ModelProd H E) q).symm p).1 = ((chartAt H q.1).symm : H → M) p.1 :=
   rfl
 #align tangent_bundle.coe_chart_at_symm_fst TangentBundle.coe_chartAt_symm_fst
+-/
 
+#print TangentBundle.trivializationAt_continuousLinearMapAt /-
 @[simp, mfld_simps]
 theorem trivializationAt_continuousLinearMapAt {b₀ b : M}
     (hb : b ∈ (trivializationAt E (TangentSpace I) b₀).baseSet) :
@@ -268,7 +303,9 @@ theorem trivializationAt_continuousLinearMapAt {b₀ b : M}
       (tangentBundleCore I M).coordChange (achart H b) (achart H b₀) b :=
   (tangentBundleCore I M).localTriv_continuousLinearMapAt hb
 #align tangent_bundle.trivialization_at_continuous_linear_map_at TangentBundle.trivializationAt_continuousLinearMapAt
+-/
 
+#print TangentBundle.trivializationAt_symmL /-
 @[simp, mfld_simps]
 theorem trivializationAt_symmL {b₀ b : M}
     (hb : b ∈ (trivializationAt E (TangentSpace I) b₀).baseSet) :
@@ -276,14 +313,18 @@ theorem trivializationAt_symmL {b₀ b : M}
       (tangentBundleCore I M).coordChange (achart H b₀) (achart H b) b :=
   (tangentBundleCore I M).localTriv_symmL hb
 #align tangent_bundle.trivialization_at_symmL TangentBundle.trivializationAt_symmL
+-/
 
+#print TangentBundle.coordChange_model_space /-
 @[simp, mfld_simps]
 theorem coordChange_model_space (b b' x : F) :
     (tangentBundleCore 𝓘(𝕜, F) F).coordChange (achart F b) (achart F b') x = 1 := by
   simpa only [tangentBundleCore_coordChange, mfld_simps] using
     fderivWithin_id uniqueDiffWithinAt_univ
 #align tangent_bundle.coord_change_model_space TangentBundle.coordChange_model_space
+-/
 
+#print TangentBundle.symmL_model_space /-
 @[simp, mfld_simps]
 theorem symmL_model_space (b b' : F) :
     (trivializationAt F (TangentSpace 𝓘(𝕜, F)) b).symmL 𝕜 b' = (1 : F →L[𝕜] F) :=
@@ -291,7 +332,9 @@ theorem symmL_model_space (b b' : F) :
   rw [TangentBundle.trivializationAt_symmL, coord_change_model_space]
   apply mem_univ
 #align tangent_bundle.symmL_model_space TangentBundle.symmL_model_space
+-/
 
+#print TangentBundle.continuousLinearMapAt_model_space /-
 @[simp, mfld_simps]
 theorem continuousLinearMapAt_model_space (b b' : F) :
     (trivializationAt F (TangentSpace 𝓘(𝕜, F)) b).continuousLinearMapAt 𝕜 b' = (1 : F →L[𝕜] F) :=
@@ -299,9 +342,11 @@ theorem continuousLinearMapAt_model_space (b b' : F) :
   rw [TangentBundle.trivializationAt_continuousLinearMapAt, coord_change_model_space]
   apply mem_univ
 #align tangent_bundle.continuous_linear_map_at_model_space TangentBundle.continuousLinearMapAt_model_space
+-/
 
 end TangentBundle
 
+#print tangentBundleCore.isSmooth /-
 instance tangentBundleCore.isSmooth : (tangentBundleCore I M).IsSmooth I :=
   by
   refine' ⟨fun i j => _⟩
@@ -313,16 +358,20 @@ instance tangentBundleCore.isSmooth : (tangentBundleCore I M).IsSmooth I :=
   · exact (i.1.extend_image_source_inter j.1 I).Subset
   · apply inter_subset_left
 #align tangent_bundle_core.is_smooth tangentBundleCore.isSmooth
+-/
 
+#print TangentBundle.smoothVectorBundle /-
 instance TangentBundle.smoothVectorBundle : SmoothVectorBundle E (TangentSpace I : M → Type _) I :=
   (tangentBundleCore I M).SmoothVectorBundle _
 #align tangent_bundle.smooth_vector_bundle TangentBundle.smoothVectorBundle
+-/
 
 end TangentBundleInstances
 
 /-! ## The tangent bundle to the model space -/
 
 
+#print tangentBundle_model_space_chartAt /-
 /-- In the tangent bundle to the model space, the charts are just the canonical identification
 between a product type and a sigma type, a.k.a. `equiv.sigma_equiv_prod`. -/
 @[simp, mfld_simps]
@@ -338,13 +387,17 @@ theorem tangentBundle_model_space_chartAt (p : TangentBundle I H) :
     VectorBundleCore.toFiberBundleCore_baseSet, tangentBundleCore_baseSet]
   simp only [mfld_simps]
 #align tangent_bundle_model_space_chart_at tangentBundle_model_space_chartAt
+-/
 
+#print tangentBundle_model_space_coe_chartAt /-
 @[simp, mfld_simps]
 theorem tangentBundle_model_space_coe_chartAt (p : TangentBundle I H) :
     ⇑(chartAt (ModelProd H E) p) = Equiv.sigmaEquivProd H E := by unfold_coes;
   simp_rw [tangentBundle_model_space_chartAt]; rfl
 #align tangent_bundle_model_space_coe_chart_at tangentBundle_model_space_coe_chartAt
+-/
 
+#print tangentBundle_model_space_coe_chartAt_symm /-
 @[simp, mfld_simps]
 theorem tangentBundle_model_space_coe_chartAt_symm (p : TangentBundle I H) :
     ((chartAt (ModelProd H E) p).symm : ModelProd H E → TangentBundle I H) =
@@ -353,14 +406,18 @@ theorem tangentBundle_model_space_coe_chartAt_symm (p : TangentBundle I H) :
   unfold_coes
   simp_rw [LocalHomeomorph.symm_toLocalEquiv, tangentBundle_model_space_chartAt]; rfl
 #align tangent_bundle_model_space_coe_chart_at_symm tangentBundle_model_space_coe_chartAt_symm
+-/
 
+#print tangentBundleCore_coordChange_model_space /-
 theorem tangentBundleCore_coordChange_model_space (x x' z : H) :
     (tangentBundleCore I H).coordChange (achart H x) (achart H x') z = ContinuousLinearMap.id 𝕜 E :=
   by ext v; exact (tangentBundleCore I H).coordChange_self (achart _ z) z (mem_univ _) v
 #align tangent_bundle_core_coord_change_model_space tangentBundleCore_coordChange_model_space
+-/
 
 variable (H)
 
+#print tangentBundleModelSpaceHomeomorph /-
 /-- The canonical identification between the tangent bundle to the model space and the product,
 as a homeomorphism -/
 def tangentBundleModelSpaceHomeomorph : TangentBundle I H ≃ₜ ModelProd H E :=
@@ -385,25 +442,31 @@ def tangentBundleModelSpaceHomeomorph : TangentBundle I H ≃ₜ ModelProd H E :
         simp only [mfld_simps]
       simpa only [mfld_simps] using this }
 #align tangent_bundle_model_space_homeomorph tangentBundleModelSpaceHomeomorph
+-/
 
+#print tangentBundleModelSpaceHomeomorph_coe /-
 @[simp, mfld_simps]
 theorem tangentBundleModelSpaceHomeomorph_coe :
     (tangentBundleModelSpaceHomeomorph H I : TangentBundle I H → ModelProd H E) =
       Equiv.sigmaEquivProd H E :=
   rfl
 #align tangent_bundle_model_space_homeomorph_coe tangentBundleModelSpaceHomeomorph_coe
+-/
 
+#print tangentBundleModelSpaceHomeomorph_coe_symm /-
 @[simp, mfld_simps]
 theorem tangentBundleModelSpaceHomeomorph_coe_symm :
     ((tangentBundleModelSpaceHomeomorph H I).symm : ModelProd H E → TangentBundle I H) =
       (Equiv.sigmaEquivProd H E).symm :=
   rfl
 #align tangent_bundle_model_space_homeomorph_coe_symm tangentBundleModelSpaceHomeomorph_coe_symm
+-/
 
 section inTangentCoordinates
 
 variable (I I') {M M' H H'} {N : Type _}
 
+#print inCoordinates_tangent_bundle_core_model_space /-
 /-- The map `in_coordinates` for the tangent bundle is trivial on the model spaces -/
 theorem inCoordinates_tangent_bundle_core_model_space (x₀ x : H) (y₀ y : H') (ϕ : E →L[𝕜] E') :
     inCoordinates E (TangentSpace I) E' (TangentSpace I') x₀ x y₀ y ϕ = ϕ :=
@@ -414,7 +477,9 @@ theorem inCoordinates_tangent_bundle_core_model_space (x₀ x : H) (y₀ y : H')
   simp_rw [tangentBundleCore_indexAt, tangentBundleCore_coordChange_model_space,
     ContinuousLinearMap.id_comp, ContinuousLinearMap.comp_id]
 #align in_coordinates_tangent_bundle_core_model_space inCoordinates_tangent_bundle_core_model_space
+-/
 
+#print inTangentCoordinates /-
 /-- When `ϕ x` is a continuous linear map that changes vectors in charts around `f x` to vectors
 in charts around `g x`, `in_tangent_coordinates I I' f g ϕ x₀ x` is a coordinate change of
 this continuous linear map that makes sense from charts around `f x₀` to charts around `g x₀`
@@ -429,12 +494,16 @@ This is the underlying function of the trivializations of the hom of (pullbacks
 def inTangentCoordinates (f : N → M) (g : N → M') (ϕ : N → E →L[𝕜] E') : N → N → E →L[𝕜] E' :=
   fun x₀ x => inCoordinates E (TangentSpace I) E' (TangentSpace I') (f x₀) (f x) (g x₀) (g x) (ϕ x)
 #align in_tangent_coordinates inTangentCoordinates
+-/
 
+#print inTangentCoordinates_model_space /-
 theorem inTangentCoordinates_model_space (f : N → H) (g : N → H') (ϕ : N → E →L[𝕜] E') (x₀ : N) :
     inTangentCoordinates I I' f g ϕ x₀ = ϕ := by
   simp_rw [inTangentCoordinates, inCoordinates_tangent_bundle_core_model_space]
 #align in_tangent_coordinates_model_space inTangentCoordinates_model_space
+-/
 
+#print inTangentCoordinates_eq /-
 theorem inTangentCoordinates_eq (f : N → M) (g : N → M') (ϕ : N → E →L[𝕜] E') {x₀ x : N}
     (hx : f x ∈ (chartAt H (f x₀)).source) (hy : g x ∈ (chartAt H' (g x₀)).source) :
     inTangentCoordinates I I' f g ϕ x₀ x =
@@ -442,6 +511,7 @@ theorem inTangentCoordinates_eq (f : N → M) (g : N → M') (ϕ : N → E →L[
         ϕ x ∘L (tangentBundleCore I M).coordChange (achart H (f x₀)) (achart H (f x)) (f x) :=
   (tangentBundleCore I M).inCoordinates_eq (tangentBundleCore I' M') (ϕ x) hx hy
 #align in_tangent_coordinates_eq inTangentCoordinates_eq
+-/
 
 end inTangentCoordinates
 
Diff
@@ -305,8 +305,8 @@ end TangentBundle
 instance tangentBundleCore.isSmooth : (tangentBundleCore I M).IsSmooth I :=
   by
   refine' ⟨fun i j => _⟩
-  rw [SmoothOn, contMdiffOn_iff_source_of_mem_maximalAtlas (subset_maximal_atlas I i.2),
-    contMdiffOn_iff_contDiffOn]
+  rw [SmoothOn, contMDiffOn_iff_source_of_mem_maximalAtlas (subset_maximal_atlas I i.2),
+    contMDiffOn_iff_contDiffOn]
   refine' ((contDiffOn_fderiv_coord_change I i j).congr fun x hx => _).mono _
   · rw [LocalEquiv.trans_source'] at hx 
     simp_rw [Function.comp_apply, tangentBundleCore_coordChange, (i.1.extend I).right_inv hx.1]
Diff
@@ -134,8 +134,6 @@ theorem tangentBundleCore_coordChange_achart (x x' z : M) :
   rfl
 #align tangent_bundle_core_coord_change_achart tangentBundleCore_coordChange_achart
 
-include I
-
 /-- The tangent space at a point of the manifold `M`. It is just `E`. We could use instead
 `(tangent_bundle_core I M).to_topological_vector_bundle_core.fiber x`, but we use `E` to help the
 kernel.
@@ -146,8 +144,6 @@ def TangentSpace (x : M) : Type _ :=
 deriving TopologicalSpace, AddCommGroup, TopologicalAddGroup
 #align tangent_space TangentSpace
 
-omit I
-
 variable (M)
 
 -- is empty if the base manifold is empty
@@ -158,7 +154,6 @@ def TangentBundle :=
   Bundle.TotalSpace (TangentSpace I : M → Type _)
 #align tangent_bundle TangentBundle
 
--- mathport name: exprTM
 local notation "TM" => TangentBundle I M
 
 section TangentBundleInstances
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn, Heather Macbeth
 
 ! This file was ported from Lean 3 source module geometry.manifold.vector_bundle.tangent
-! leanprover-community/mathlib commit 3a69562db5a458db8322b190ec8d9a8bbd8a5b14
+! leanprover-community/mathlib commit e354e865255654389cc46e6032160238df2e0f40
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -40,6 +40,8 @@ open scoped Manifold Topology Bundle
 
 noncomputable section
 
+section General
+
 variable {𝕜 : Type _} [NontriviallyNormedField 𝕜] {E : Type _} [NormedAddCommGroup E]
   [NormedSpace 𝕜 E] {E' : Type _} [NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H : Type _}
   [TopologicalSpace H] {I : ModelWithCorners 𝕜 E H} {H' : Type _} [TopologicalSpace H']
@@ -173,6 +175,8 @@ instance : Module 𝕜 (TangentSpace I x) := by delta_instance tangent_space
 instance : Inhabited (TangentSpace I x) :=
   ⟨0⟩
 
+instance {x : M} : ContinuousAdd (TangentSpace I x) := by delta_instance tangent_space
+
 end
 
 instance : TopologicalSpace TM :=
@@ -446,3 +450,15 @@ theorem inTangentCoordinates_eq (f : N → M) (g : N → M') (ϕ : N → E →L[
 
 end inTangentCoordinates
 
+end General
+
+section Real
+
+variable {E : Type _} [NormedAddCommGroup E] [NormedSpace ℝ E] {H : Type _} [TopologicalSpace H]
+  {I : ModelWithCorners ℝ E H} {M : Type _} [TopologicalSpace M] [ChartedSpace H M]
+  [SmoothManifoldWithCorners I M]
+
+instance {x : M} : PathConnectedSpace (TangentSpace I x) := by delta_instance tangent_space
+
+end Real
+
Diff
@@ -92,7 +92,7 @@ def tangentBundleCore : VectorBundleCore 𝕜 M E (atlas H M)
     by
     rw [Filter.EventuallyEq.fderivWithin_eq, fderivWithin_id', ContinuousLinearMap.id_apply]
     · exact I.unique_diff_at_image
-    · filter_upwards [i.1.extend_target_mem_nhdsWithin I hx]with y hy
+    · filter_upwards [i.1.extend_target_mem_nhdsWithin I hx] with y hy
       exact (i.1.extend I).right_inv hy
     · simp_rw [Function.comp_apply, i.1.extend_left_inv I hx]
   continuousOn_coordChange i j :=
@@ -106,7 +106,7 @@ def tangentBundleCore : VectorBundleCore 𝕜 M E (atlas H M)
     rintro i j k x ⟨⟨hxi, hxj⟩, hxk⟩ v
     rw [fderivWithin_fderivWithin, Filter.EventuallyEq.fderivWithin_eq]
     · have := i.1.extend_preimage_mem_nhds I hxi (j.1.extend_source_mem_nhds I hxj)
-      filter_upwards [nhdsWithin_le_nhds this]with y hy
+      filter_upwards [nhdsWithin_le_nhds this] with y hy
       simp_rw [Function.comp_apply, (j.1.extend I).left_inv hy]
     · simp_rw [Function.comp_apply, i.1.extend_left_inv I hxi, j.1.extend_left_inv I hxj]
     ·
Diff
@@ -140,7 +140,8 @@ kernel.
 -/
 @[nolint unused_arguments]
 def TangentSpace (x : M) : Type _ :=
-  E deriving TopologicalSpace, AddCommGroup, TopologicalAddGroup
+  E
+deriving TopologicalSpace, AddCommGroup, TopologicalAddGroup
 #align tangent_space TangentSpace
 
 omit I
@@ -308,7 +309,7 @@ instance tangentBundleCore.isSmooth : (tangentBundleCore I M).IsSmooth I :=
   rw [SmoothOn, contMdiffOn_iff_source_of_mem_maximalAtlas (subset_maximal_atlas I i.2),
     contMdiffOn_iff_contDiffOn]
   refine' ((contDiffOn_fderiv_coord_change I i j).congr fun x hx => _).mono _
-  · rw [LocalEquiv.trans_source'] at hx
+  · rw [LocalEquiv.trans_source'] at hx 
     simp_rw [Function.comp_apply, tangentBundleCore_coordChange, (i.1.extend I).right_inv hx.1]
   · exact (i.1.extend_image_source_inter j.1 I).Subset
   · apply inter_subset_left
Diff
@@ -36,7 +36,7 @@ This defines a smooth vector bundle `tangent_bundle` with fibers `tangent_space`
 
 open Bundle Set SmoothManifoldWithCorners LocalHomeomorph ContinuousLinearMap
 
-open Manifold Topology Bundle
+open scoped Manifold Topology Bundle
 
 noncomputable section
 
Diff
@@ -55,10 +55,8 @@ theorem contDiffOn_fderiv_coord_change (i j : atlas H M) :
     ContDiffOn 𝕜 ∞ (fderivWithin 𝕜 (j.1.extend I ∘ (i.1.extend I).symm) (range I))
       ((i.1.extend I).symm ≫ j.1.extend I).source :=
   by
-  have h : ((i.1.extend I).symm ≫ j.1.extend I).source ⊆ range I :=
-    by
-    rw [i.1.extend_coord_change_source]
-    apply image_subset_range
+  have h : ((i.1.extend I).symm ≫ j.1.extend I).source ⊆ range I := by
+    rw [i.1.extend_coord_change_source]; apply image_subset_range
   intro x hx
   refine' (ContDiffWithinAt.fderivWithin_right _ I.unique_diff le_top <| h hx).mono h
   refine'
@@ -102,8 +100,7 @@ def tangentBundleCore : VectorBundleCore 𝕜 M E (atlas H M)
     refine'
       (contDiffOn_fderiv_coord_change I i j).ContinuousOn.comp ((i.1.continuousOn_extend I).mono _)
         _
-    · rw [i.1.extend_source]
-      exact inter_subset_left _ _
+    · rw [i.1.extend_source]; exact inter_subset_left _ _
     simp_rw [← i.1.extend_image_source_inter, maps_to_image]
   coordChange_comp := by
     rintro i j k x ⟨⟨hxi, hxj⟩, hxk⟩ v
@@ -122,8 +119,7 @@ def tangentBundleCore : VectorBundleCore 𝕜 M E (atlas H M)
         (cont_diff_within_at_extend_coord_change' I (subset_maximal_atlas I j.2)
               (subset_maximal_atlas I i.2) hxj hxi).DifferentiableWithinAt
           le_top
-    · intro x hx
-      exact mem_range_self _
+    · intro x hx; exact mem_range_self _
     · exact I.unique_diff_at_image
     · rw [Function.comp_apply, i.1.extend_left_inv I hxi]
 #align tangent_bundle_core tangentBundleCore
@@ -334,13 +330,9 @@ theorem tangentBundle_model_space_chartAt (p : TangentBundle I H) :
     (chartAt (ModelProd H E) p).toLocalEquiv = (Equiv.sigmaEquivProd H E).toLocalEquiv :=
   by
   ext x : 1
-  · ext
-    · rfl
+  · ext; · rfl
     exact (tangentBundleCore I H).coordChange_self (achart _ x.1) x.1 (mem_achart_source H x.1) x.2
-  · intro x
-    ext
-    · rfl
-    apply hEq_of_eq
+  · intro x; ext; · rfl; apply hEq_of_eq
     exact (tangentBundleCore I H).coordChange_self (achart _ x.1) x.1 (mem_achart_source H x.1) x.2
   simp_rw [TangentBundle.chartAt, FiberBundleCore.localTriv, FiberBundleCore.localTrivAsLocalEquiv,
     VectorBundleCore.toFiberBundleCore_baseSet, tangentBundleCore_baseSet]
@@ -349,11 +341,8 @@ theorem tangentBundle_model_space_chartAt (p : TangentBundle I H) :
 
 @[simp, mfld_simps]
 theorem tangentBundle_model_space_coe_chartAt (p : TangentBundle I H) :
-    ⇑(chartAt (ModelProd H E) p) = Equiv.sigmaEquivProd H E :=
-  by
-  unfold_coes
-  simp_rw [tangentBundle_model_space_chartAt]
-  rfl
+    ⇑(chartAt (ModelProd H E) p) = Equiv.sigmaEquivProd H E := by unfold_coes;
+  simp_rw [tangentBundle_model_space_chartAt]; rfl
 #align tangent_bundle_model_space_coe_chart_at tangentBundle_model_space_coe_chartAt
 
 @[simp, mfld_simps]
@@ -362,15 +351,12 @@ theorem tangentBundle_model_space_coe_chartAt_symm (p : TangentBundle I H) :
       (Equiv.sigmaEquivProd H E).symm :=
   by
   unfold_coes
-  simp_rw [LocalHomeomorph.symm_toLocalEquiv, tangentBundle_model_space_chartAt]
-  rfl
+  simp_rw [LocalHomeomorph.symm_toLocalEquiv, tangentBundle_model_space_chartAt]; rfl
 #align tangent_bundle_model_space_coe_chart_at_symm tangentBundle_model_space_coe_chartAt_symm
 
 theorem tangentBundleCore_coordChange_model_space (x x' z : H) :
     (tangentBundleCore I H).coordChange (achart H x) (achart H x') z = ContinuousLinearMap.id 𝕜 E :=
-  by
-  ext v
-  exact (tangentBundleCore I H).coordChange_self (achart _ z) z (mem_univ _) v
+  by ext v; exact (tangentBundleCore I H).coordChange_self (achart _ z) z (mem_univ _) v
 #align tangent_bundle_core_coord_change_model_space tangentBundleCore_coordChange_model_space
 
 variable (H)
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn, Heather Macbeth
 
 ! This file was ported from Lean 3 source module geometry.manifold.vector_bundle.tangent
-! leanprover-community/mathlib commit 17fe3632366bfefa54c240db521ce21beeb7a28a
+! leanprover-community/mathlib commit 3a69562db5a458db8322b190ec8d9a8bbd8a5b14
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -94,7 +94,6 @@ def tangentBundleCore : VectorBundleCore 𝕜 M E (atlas H M)
     by
     rw [Filter.EventuallyEq.fderivWithin_eq, fderivWithin_id', ContinuousLinearMap.id_apply]
     · exact I.unique_diff_at_image
-    · exact I.unique_diff_at_image
     · filter_upwards [i.1.extend_target_mem_nhdsWithin I hx]with y hy
       exact (i.1.extend I).right_inv hy
     · simp_rw [Function.comp_apply, i.1.extend_left_inv I hx]
@@ -109,7 +108,6 @@ def tangentBundleCore : VectorBundleCore 𝕜 M E (atlas H M)
   coordChange_comp := by
     rintro i j k x ⟨⟨hxi, hxj⟩, hxk⟩ v
     rw [fderivWithin_fderivWithin, Filter.EventuallyEq.fderivWithin_eq]
-    · exact I.unique_diff_at_image
     · have := i.1.extend_preimage_mem_nhds I hxi (j.1.extend_source_mem_nhds I hxj)
       filter_upwards [nhdsWithin_le_nhds this]with y hy
       simp_rw [Function.comp_apply, (j.1.extend I).left_inv hy]
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn, Heather Macbeth
 
 ! This file was ported from Lean 3 source module geometry.manifold.vector_bundle.tangent
-! leanprover-community/mathlib commit 7dfe85833014fb54258a228081ebb76b7e96ec98
+! leanprover-community/mathlib commit 17fe3632366bfefa54c240db521ce21beeb7a28a
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -34,16 +34,18 @@ This defines a smooth vector bundle `tangent_bundle` with fibers `tangent_space`
 -/
 
 
-open Bundle Set SmoothManifoldWithCorners LocalHomeomorph
+open Bundle Set SmoothManifoldWithCorners LocalHomeomorph ContinuousLinearMap
 
 open Manifold Topology Bundle
 
 noncomputable section
 
 variable {𝕜 : Type _} [NontriviallyNormedField 𝕜] {E : Type _} [NormedAddCommGroup E]
-  [NormedSpace 𝕜 E] {H : Type _} [TopologicalSpace H] {I : ModelWithCorners 𝕜 E H} {M : Type _}
-  [TopologicalSpace M] [ChartedSpace H M] [SmoothManifoldWithCorners I M] {F : Type _}
-  [NormedAddCommGroup F] [NormedSpace 𝕜 F]
+  [NormedSpace 𝕜 E] {E' : Type _} [NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H : Type _}
+  [TopologicalSpace H] {I : ModelWithCorners 𝕜 E H} {H' : Type _} [TopologicalSpace H']
+  {I' : ModelWithCorners 𝕜 E' H'} {M : Type _} [TopologicalSpace M] [ChartedSpace H M]
+  [SmoothManifoldWithCorners I M] {M' : Type _} [TopologicalSpace M'] [ChartedSpace H' M']
+  [SmoothManifoldWithCorners I' M'] {F : Type _} [NormedAddCommGroup F] [NormedSpace 𝕜 F]
 
 variable (I)
 
@@ -414,3 +416,48 @@ theorem tangentBundleModelSpaceHomeomorph_coe_symm :
   rfl
 #align tangent_bundle_model_space_homeomorph_coe_symm tangentBundleModelSpaceHomeomorph_coe_symm
 
+section inTangentCoordinates
+
+variable (I I') {M M' H H'} {N : Type _}
+
+/-- The map `in_coordinates` for the tangent bundle is trivial on the model spaces -/
+theorem inCoordinates_tangent_bundle_core_model_space (x₀ x : H) (y₀ y : H') (ϕ : E →L[𝕜] E') :
+    inCoordinates E (TangentSpace I) E' (TangentSpace I') x₀ x y₀ y ϕ = ϕ :=
+  by
+  refine' (vector_bundle_core.in_coordinates_eq _ _ _ _ _).trans _
+  · exact mem_univ x
+  · exact mem_univ y
+  simp_rw [tangentBundleCore_indexAt, tangentBundleCore_coordChange_model_space,
+    ContinuousLinearMap.id_comp, ContinuousLinearMap.comp_id]
+#align in_coordinates_tangent_bundle_core_model_space inCoordinates_tangent_bundle_core_model_space
+
+/-- When `ϕ x` is a continuous linear map that changes vectors in charts around `f x` to vectors
+in charts around `g x`, `in_tangent_coordinates I I' f g ϕ x₀ x` is a coordinate change of
+this continuous linear map that makes sense from charts around `f x₀` to charts around `g x₀`
+by composing it with appropriate coordinate changes.
+Note that the type of `ϕ` is more accurately
+`Π x : N, tangent_space I (f x) →L[𝕜] tangent_space I' (g x)`.
+We are unfolding `tangent_space` in this type so that Lean recognizes that the type of `ϕ` doesn't
+actually depend on `f` or `g`.
+
+This is the underlying function of the trivializations of the hom of (pullbacks of) tangent spaces.
+-/
+def inTangentCoordinates (f : N → M) (g : N → M') (ϕ : N → E →L[𝕜] E') : N → N → E →L[𝕜] E' :=
+  fun x₀ x => inCoordinates E (TangentSpace I) E' (TangentSpace I') (f x₀) (f x) (g x₀) (g x) (ϕ x)
+#align in_tangent_coordinates inTangentCoordinates
+
+theorem inTangentCoordinates_model_space (f : N → H) (g : N → H') (ϕ : N → E →L[𝕜] E') (x₀ : N) :
+    inTangentCoordinates I I' f g ϕ x₀ = ϕ := by
+  simp_rw [inTangentCoordinates, inCoordinates_tangent_bundle_core_model_space]
+#align in_tangent_coordinates_model_space inTangentCoordinates_model_space
+
+theorem inTangentCoordinates_eq (f : N → M) (g : N → M') (ϕ : N → E →L[𝕜] E') {x₀ x : N}
+    (hx : f x ∈ (chartAt H (f x₀)).source) (hy : g x ∈ (chartAt H' (g x₀)).source) :
+    inTangentCoordinates I I' f g ϕ x₀ x =
+      (tangentBundleCore I' M').coordChange (achart H' (g x)) (achart H' (g x₀)) (g x) ∘L
+        ϕ x ∘L (tangentBundleCore I M).coordChange (achart H (f x₀)) (achart H (f x)) (f x) :=
+  (tangentBundleCore I M).inCoordinates_eq (tangentBundleCore I' M') (ϕ x) hx hy
+#align in_tangent_coordinates_eq inTangentCoordinates_eq
+
+end inTangentCoordinates
+
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn, Heather Macbeth
 
 ! This file was ported from Lean 3 source module geometry.manifold.vector_bundle.tangent
-! leanprover-community/mathlib commit 0187644979f2d3e10a06e916a869c994facd9a87
+! leanprover-community/mathlib commit 7dfe85833014fb54258a228081ebb76b7e96ec98
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -169,11 +169,9 @@ does not pick wrong instances. In this section, we record the right instances fo
 them, noting in particular that the tangent bundle is a smooth manifold. -/
 section
 
-attribute [local reducible] TangentSpace
-
 variable {M} (x : M)
 
-instance : Module 𝕜 (TangentSpace I x) := by infer_instance
+instance : Module 𝕜 (TangentSpace I x) := by delta_instance tangent_space
 
 instance : Inhabited (TangentSpace I x) :=
   ⟨0⟩
@@ -267,6 +265,45 @@ theorem coe_chartAt_symm_fst (p : H × E) (q : TM) :
   rfl
 #align tangent_bundle.coe_chart_at_symm_fst TangentBundle.coe_chartAt_symm_fst
 
+@[simp, mfld_simps]
+theorem trivializationAt_continuousLinearMapAt {b₀ b : M}
+    (hb : b ∈ (trivializationAt E (TangentSpace I) b₀).baseSet) :
+    (trivializationAt E (TangentSpace I) b₀).continuousLinearMapAt 𝕜 b =
+      (tangentBundleCore I M).coordChange (achart H b) (achart H b₀) b :=
+  (tangentBundleCore I M).localTriv_continuousLinearMapAt hb
+#align tangent_bundle.trivialization_at_continuous_linear_map_at TangentBundle.trivializationAt_continuousLinearMapAt
+
+@[simp, mfld_simps]
+theorem trivializationAt_symmL {b₀ b : M}
+    (hb : b ∈ (trivializationAt E (TangentSpace I) b₀).baseSet) :
+    (trivializationAt E (TangentSpace I) b₀).symmL 𝕜 b =
+      (tangentBundleCore I M).coordChange (achart H b₀) (achart H b) b :=
+  (tangentBundleCore I M).localTriv_symmL hb
+#align tangent_bundle.trivialization_at_symmL TangentBundle.trivializationAt_symmL
+
+@[simp, mfld_simps]
+theorem coordChange_model_space (b b' x : F) :
+    (tangentBundleCore 𝓘(𝕜, F) F).coordChange (achart F b) (achart F b') x = 1 := by
+  simpa only [tangentBundleCore_coordChange, mfld_simps] using
+    fderivWithin_id uniqueDiffWithinAt_univ
+#align tangent_bundle.coord_change_model_space TangentBundle.coordChange_model_space
+
+@[simp, mfld_simps]
+theorem symmL_model_space (b b' : F) :
+    (trivializationAt F (TangentSpace 𝓘(𝕜, F)) b).symmL 𝕜 b' = (1 : F →L[𝕜] F) :=
+  by
+  rw [TangentBundle.trivializationAt_symmL, coord_change_model_space]
+  apply mem_univ
+#align tangent_bundle.symmL_model_space TangentBundle.symmL_model_space
+
+@[simp, mfld_simps]
+theorem continuousLinearMapAt_model_space (b b' : F) :
+    (trivializationAt F (TangentSpace 𝓘(𝕜, F)) b).continuousLinearMapAt 𝕜 b' = (1 : F →L[𝕜] F) :=
+  by
+  rw [TangentBundle.trivializationAt_continuousLinearMapAt, coord_change_model_space]
+  apply mem_univ
+#align tangent_bundle.continuous_linear_map_at_model_space TangentBundle.continuousLinearMapAt_model_space
+
 end TangentBundle
 
 instance tangentBundleCore.isSmooth : (tangentBundleCore I M).IsSmooth I :=
@@ -329,6 +366,13 @@ theorem tangentBundle_model_space_coe_chartAt_symm (p : TangentBundle I H) :
   rfl
 #align tangent_bundle_model_space_coe_chart_at_symm tangentBundle_model_space_coe_chartAt_symm
 
+theorem tangentBundleCore_coordChange_model_space (x x' z : H) :
+    (tangentBundleCore I H).coordChange (achart H x) (achart H x') z = ContinuousLinearMap.id 𝕜 E :=
+  by
+  ext v
+  exact (tangentBundleCore I H).coordChange_self (achart _ z) z (mem_univ _) v
+#align tangent_bundle_core_coord_change_model_space tangentBundleCore_coordChange_model_space
+
 variable (H)
 
 /-- The canonical identification between the tangent bundle to the model space and the product,
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn, Heather Macbeth
 
 ! This file was ported from Lean 3 source module geometry.manifold.vector_bundle.tangent
-! leanprover-community/mathlib commit ddec54a71a0dd025c05445d467f1a2b7d586a3ba
+! leanprover-community/mathlib commit 0187644979f2d3e10a06e916a869c994facd9a87
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -36,7 +36,7 @@ This defines a smooth vector bundle `tangent_bundle` with fibers `tangent_space`
 
 open Bundle Set SmoothManifoldWithCorners LocalHomeomorph
 
-open Manifold Topology
+open Manifold Topology Bundle
 
 noncomputable section
 
@@ -47,10 +47,6 @@ variable {𝕜 : Type _} [NontriviallyNormedField 𝕜] {E : Type _} [NormedAddC
 
 variable (I)
 
-namespace hidden
-
-/- we temporarily put everything in a namespace to not have name clashes with
-the existing `tangent_bundle_core`. -/
 /-- Auxiliary lemma for tangent spaces: the derivative of a coordinate change between two charts is
   smooth on its source. -/
 theorem contDiffOn_fderiv_coord_change (i j : atlas H M) :
@@ -68,7 +64,7 @@ theorem contDiffOn_fderiv_coord_change (i j : atlas H M) :
           (subset_maximal_atlas I i.2) x hx).mono_of_mem
       _
   exact i.1.extend_coord_change_source_mem_nhdsWithin j.1 I hx
-#align hidden.cont_diff_on_fderiv_coord_change hidden.contDiffOn_fderiv_coord_change
+#align cont_diff_on_fderiv_coord_change contDiffOn_fderiv_coord_change
 
 variable (M)
 
@@ -103,8 +99,8 @@ def tangentBundleCore : VectorBundleCore 𝕜 M E (atlas H M)
   continuousOn_coordChange i j :=
     by
     refine'
-      (cont_diff_on_fderiv_coord_change I i j).ContinuousOn.comp
-        ((i.1.continuousOn_extend I).mono _) _
+      (contDiffOn_fderiv_coord_change I i j).ContinuousOn.comp ((i.1.continuousOn_extend I).mono _)
+        _
     · rw [i.1.extend_source]
       exact inter_subset_left _ _
     simp_rw [← i.1.extend_image_source_inter, maps_to_image]
@@ -130,7 +126,7 @@ def tangentBundleCore : VectorBundleCore 𝕜 M E (atlas H M)
       exact mem_range_self _
     · exact I.unique_diff_at_image
     · rw [Function.comp_apply, i.1.extend_left_inv I hxi]
-#align hidden.tangent_bundle_core hidden.tangentBundleCore
+#align tangent_bundle_core tangentBundleCore
 
 variable {M}
 
@@ -138,7 +134,7 @@ theorem tangentBundleCore_coordChange_achart (x x' z : M) :
     (tangentBundleCore I M).coordChange (achart H x) (achart H x') z =
       fderivWithin 𝕜 (extChartAt I x' ∘ (extChartAt I x).symm) (range I) (extChartAt I x z) :=
   rfl
-#align hidden.tangent_bundle_core_coord_change_achart hidden.tangentBundleCore_coordChange_achart
+#align tangent_bundle_core_coord_change_achart tangentBundleCore_coordChange_achart
 
 include I
 
@@ -149,7 +145,7 @@ kernel.
 @[nolint unused_arguments]
 def TangentSpace (x : M) : Type _ :=
   E deriving TopologicalSpace, AddCommGroup, TopologicalAddGroup
-#align hidden.tangent_space hidden.TangentSpace
+#align tangent_space TangentSpace
 
 omit I
 
@@ -161,7 +157,7 @@ variable (M)
 @[nolint has_nonempty_instance, reducible]
 def TangentBundle :=
   Bundle.TotalSpace (TangentSpace I : M → Type _)
-#align hidden.tangent_bundle hidden.TangentBundle
+#align tangent_bundle TangentBundle
 
 -- mathport name: exprTM
 local notation "TM" => TangentBundle I M
@@ -173,7 +169,7 @@ does not pick wrong instances. In this section, we record the right instances fo
 them, noting in particular that the tangent bundle is a smooth manifold. -/
 section
 
-attribute [local reducible] tangent_space
+attribute [local reducible] TangentSpace
 
 variable {M} (x : M)
 
@@ -185,43 +181,109 @@ instance : Inhabited (TangentSpace I x) :=
 end
 
 instance : TopologicalSpace TM :=
-  (tangentBundleCore I M).toFiberBundleCore.toTopologicalSpace
+  (tangentBundleCore I M).toTopologicalSpace
 
 instance : FiberBundle E (TangentSpace I : M → Type _) :=
-  (tangentBundleCore I M).toFiberBundleCore.FiberBundle
+  (tangentBundleCore I M).FiberBundle
 
 instance : VectorBundle 𝕜 E (TangentSpace I : M → Type _) :=
   (tangentBundleCore I M).VectorBundle
 
-theorem tangentSpace_chartAt (p : TM) :
+namespace TangentBundle
+
+protected theorem chartAt (p : TM) :
     chartAt (ModelProd H E) p =
       ((tangentBundleCore I M).toFiberBundleCore.localTriv (achart H p.1)).toLocalHomeomorph ≫ₕ
         (chartAt H p.1).Prod (LocalHomeomorph.refl E) :=
   rfl
-#align hidden.tangent_space_chart_at hidden.tangentSpace_chartAt
+#align tangent_bundle.chart_at TangentBundle.chartAt
 
-theorem tangentSpace_chartAt_toLocalEquiv (p : TM) :
+theorem chartAt_toLocalEquiv (p : TM) :
     (chartAt (ModelProd H E) p).toLocalEquiv =
       (tangentBundleCore I M).toFiberBundleCore.localTrivAsLocalEquiv (achart H p.1) ≫
         (chartAt H p.1).toLocalEquiv.Prod (LocalEquiv.refl E) :=
   rfl
-#align hidden.tangent_space_chart_at_to_local_equiv hidden.tangentSpace_chartAt_toLocalEquiv
+#align tangent_bundle.chart_at_to_local_equiv TangentBundle.chartAt_toLocalEquiv
+
+theorem trivializationAt_eq_localTriv (x : M) :
+    trivializationAt E (TangentSpace I) x =
+      (tangentBundleCore I M).toFiberBundleCore.localTriv (achart H x) :=
+  rfl
+#align tangent_bundle.trivialization_at_eq_local_triv TangentBundle.trivializationAt_eq_localTriv
+
+@[simp, mfld_simps]
+theorem trivializationAt_source (x : M) :
+    (trivializationAt E (TangentSpace I) x).source = π _ ⁻¹' (chartAt H x).source :=
+  rfl
+#align tangent_bundle.trivialization_at_source TangentBundle.trivializationAt_source
+
+/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+@[simp, mfld_simps]
+theorem trivializationAt_target (x : M) :
+    (trivializationAt E (TangentSpace I) x).target = (chartAt H x).source ×ˢ univ :=
+  rfl
+#align tangent_bundle.trivialization_at_target TangentBundle.trivializationAt_target
+
+@[simp, mfld_simps]
+theorem trivializationAt_baseSet (x : M) :
+    (trivializationAt E (TangentSpace I) x).baseSet = (chartAt H x).source :=
+  rfl
+#align tangent_bundle.trivialization_at_base_set TangentBundle.trivializationAt_baseSet
+
+theorem trivializationAt_apply (x : M) (z : TM) :
+    trivializationAt E (TangentSpace I) x z =
+      (z.1,
+        fderivWithin 𝕜 ((chartAt H x).extend I ∘ ((chartAt H z.1).extend I).symm) (range I)
+          ((chartAt H z.1).extend I z.1) z.2) :=
+  rfl
+#align tangent_bundle.trivialization_at_apply TangentBundle.trivializationAt_apply
+
+@[simp, mfld_simps]
+theorem trivializationAt_fst (x : M) (z : TM) : (trivializationAt E (TangentSpace I) x z).1 = z.1 :=
+  rfl
+#align tangent_bundle.trivialization_at_fst TangentBundle.trivializationAt_fst
+
+@[simp, mfld_simps]
+theorem mem_chart_source_iff (p q : TM) :
+    p ∈ (chartAt (ModelProd H E) q).source ↔ p.1 ∈ (chartAt H q.1).source := by
+  simp only [FiberBundle.chartedSpace_chartAt, mfld_simps]
+#align tangent_bundle.mem_chart_source_iff TangentBundle.mem_chart_source_iff
+
+@[simp, mfld_simps]
+theorem mem_chart_target_iff (p : H × E) (q : TM) :
+    p ∈ (chartAt (ModelProd H E) q).target ↔ p.1 ∈ (chartAt H q.1).target := by
+  simp (config := { contextual := true }) only [FiberBundle.chartedSpace_chartAt,
+    and_iff_left_iff_imp, mfld_simps]
+#align tangent_bundle.mem_chart_target_iff TangentBundle.mem_chart_target_iff
+
+@[simp, mfld_simps]
+theorem coe_chartAt_fst (p q : TM) : ((chartAt (ModelProd H E) q) p).1 = chartAt H q.1 p.1 :=
+  rfl
+#align tangent_bundle.coe_chart_at_fst TangentBundle.coe_chartAt_fst
+
+@[simp, mfld_simps]
+theorem coe_chartAt_symm_fst (p : H × E) (q : TM) :
+    ((chartAt (ModelProd H E) q).symm p).1 = ((chartAt H q.1).symm : H → M) p.1 :=
+  rfl
+#align tangent_bundle.coe_chart_at_symm_fst TangentBundle.coe_chartAt_symm_fst
+
+end TangentBundle
 
 instance tangentBundleCore.isSmooth : (tangentBundleCore I M).IsSmooth I :=
   by
   refine' ⟨fun i j => _⟩
   rw [SmoothOn, contMdiffOn_iff_source_of_mem_maximalAtlas (subset_maximal_atlas I i.2),
     contMdiffOn_iff_contDiffOn]
-  refine' ((cont_diff_on_fderiv_coord_change I i j).congr fun x hx => _).mono _
+  refine' ((contDiffOn_fderiv_coord_change I i j).congr fun x hx => _).mono _
   · rw [LocalEquiv.trans_source'] at hx
-    simp_rw [Function.comp_apply, tangent_bundle_core_coord_change, (i.1.extend I).right_inv hx.1]
+    simp_rw [Function.comp_apply, tangentBundleCore_coordChange, (i.1.extend I).right_inv hx.1]
   · exact (i.1.extend_image_source_inter j.1 I).Subset
   · apply inter_subset_left
-#align hidden.tangent_bundle_core.is_smooth hidden.tangentBundleCore.isSmooth
+#align tangent_bundle_core.is_smooth tangentBundleCore.isSmooth
 
 instance TangentBundle.smoothVectorBundle : SmoothVectorBundle E (TangentSpace I : M → Type _) I :=
   (tangentBundleCore I M).SmoothVectorBundle _
-#align hidden.tangent_bundle.smooth_vector_bundle hidden.TangentBundle.smoothVectorBundle
+#align tangent_bundle.smooth_vector_bundle TangentBundle.smoothVectorBundle
 
 end TangentBundleInstances
 
@@ -237,27 +299,25 @@ theorem tangentBundle_model_space_chartAt (p : TangentBundle I H) :
   ext x : 1
   · ext
     · rfl
-    exact
-      (tangent_bundle_core I H).coordChange_self (achart _ x.1) x.1 (mem_achart_source H x.1) x.2
+    exact (tangentBundleCore I H).coordChange_self (achart _ x.1) x.1 (mem_achart_source H x.1) x.2
   · intro x
     ext
     · rfl
     apply hEq_of_eq
-    exact
-      (tangent_bundle_core I H).coordChange_self (achart _ x.1) x.1 (mem_achart_source H x.1) x.2
-  simp_rw [tangent_space_chart_at, FiberBundleCore.localTriv, FiberBundleCore.localTrivAsLocalEquiv,
-    VectorBundleCore.toFiberBundleCore_baseSet, tangent_bundle_core_base_set]
+    exact (tangentBundleCore I H).coordChange_self (achart _ x.1) x.1 (mem_achart_source H x.1) x.2
+  simp_rw [TangentBundle.chartAt, FiberBundleCore.localTriv, FiberBundleCore.localTrivAsLocalEquiv,
+    VectorBundleCore.toFiberBundleCore_baseSet, tangentBundleCore_baseSet]
   simp only [mfld_simps]
-#align hidden.tangent_bundle_model_space_chart_at hidden.tangentBundle_model_space_chartAt
+#align tangent_bundle_model_space_chart_at tangentBundle_model_space_chartAt
 
 @[simp, mfld_simps]
 theorem tangentBundle_model_space_coe_chartAt (p : TangentBundle I H) :
     ⇑(chartAt (ModelProd H E) p) = Equiv.sigmaEquivProd H E :=
   by
   unfold_coes
-  simp_rw [tangent_bundle_model_space_chart_at]
+  simp_rw [tangentBundle_model_space_chartAt]
   rfl
-#align hidden.tangent_bundle_model_space_coe_chart_at hidden.tangentBundle_model_space_coe_chartAt
+#align tangent_bundle_model_space_coe_chart_at tangentBundle_model_space_coe_chartAt
 
 @[simp, mfld_simps]
 theorem tangentBundle_model_space_coe_chartAt_symm (p : TangentBundle I H) :
@@ -265,9 +325,9 @@ theorem tangentBundle_model_space_coe_chartAt_symm (p : TangentBundle I H) :
       (Equiv.sigmaEquivProd H E).symm :=
   by
   unfold_coes
-  simp_rw [LocalHomeomorph.symm_toLocalEquiv, tangent_bundle_model_space_chart_at]
+  simp_rw [LocalHomeomorph.symm_toLocalEquiv, tangentBundle_model_space_chartAt]
   rfl
-#align hidden.tangent_bundle_model_space_coe_chart_at_symm hidden.tangentBundle_model_space_coe_chartAt_symm
+#align tangent_bundle_model_space_coe_chart_at_symm tangentBundle_model_space_coe_chartAt_symm
 
 variable (H)
 
@@ -278,37 +338,35 @@ def tangentBundleModelSpaceHomeomorph : TangentBundle I H ≃ₜ ModelProd H E :
     Equiv.sigmaEquivProd H
       E with
     continuous_toFun := by
-      let p : tangent_bundle I H := ⟨I.symm (0 : E), (0 : E)⟩
+      let p : TangentBundle I H := ⟨I.symm (0 : E), (0 : E)⟩
       have : Continuous (chart_at (ModelProd H E) p) :=
         by
         rw [continuous_iff_continuousOn_univ]
         convert LocalHomeomorph.continuousOn _
-        simp only [tangent_space.fiber_bundle, mfld_simps]
+        simp only [TangentSpace.fiberBundle, mfld_simps]
       simpa only [mfld_simps] using this
     continuous_invFun :=
       by
-      let p : tangent_bundle I H := ⟨I.symm (0 : E), (0 : E)⟩
+      let p : TangentBundle I H := ⟨I.symm (0 : E), (0 : E)⟩
       have : Continuous (chart_at (ModelProd H E) p).symm :=
         by
         rw [continuous_iff_continuousOn_univ]
         convert LocalHomeomorph.continuousOn _
         simp only [mfld_simps]
       simpa only [mfld_simps] using this }
-#align hidden.tangent_bundle_model_space_homeomorph hidden.tangentBundleModelSpaceHomeomorph
+#align tangent_bundle_model_space_homeomorph tangentBundleModelSpaceHomeomorph
 
 @[simp, mfld_simps]
 theorem tangentBundleModelSpaceHomeomorph_coe :
     (tangentBundleModelSpaceHomeomorph H I : TangentBundle I H → ModelProd H E) =
       Equiv.sigmaEquivProd H E :=
   rfl
-#align hidden.tangent_bundle_model_space_homeomorph_coe hidden.tangentBundleModelSpaceHomeomorph_coe
+#align tangent_bundle_model_space_homeomorph_coe tangentBundleModelSpaceHomeomorph_coe
 
 @[simp, mfld_simps]
 theorem tangentBundleModelSpaceHomeomorph_coe_symm :
     ((tangentBundleModelSpaceHomeomorph H I).symm : ModelProd H E → TangentBundle I H) =
       (Equiv.sigmaEquivProd H E).symm :=
   rfl
-#align hidden.tangent_bundle_model_space_homeomorph_coe_symm hidden.tangentBundleModelSpaceHomeomorph_coe_symm
-
-end hidden
+#align tangent_bundle_model_space_homeomorph_coe_symm tangentBundleModelSpaceHomeomorph_coe_symm
 

Changes in mathlib4

mathlib3
mathlib4
chore: adapt to multiple goal linter 1 (#12338)

A PR accompanying #12339.

Zulip discussion

Diff
@@ -352,10 +352,10 @@ instance tangentBundleCore.isSmooth : (tangentBundleCore I M).IsSmooth I := by
   refine' ⟨fun i j => _⟩
   rw [SmoothOn, contMDiffOn_iff_source_of_mem_maximalAtlas (subset_maximalAtlas I i.2),
     contMDiffOn_iff_contDiffOn]
-  refine' ((contDiffOn_fderiv_coord_change I i j).congr fun x hx => _).mono _
-  · rw [PartialEquiv.trans_source'] at hx
-    simp_rw [Function.comp_apply, tangentBundleCore_coordChange, (i.1.extend I).right_inv hx.1]
-  · exact (i.1.extend_image_source_inter j.1 I).subset
+  · refine' ((contDiffOn_fderiv_coord_change I i j).congr fun x hx => _).mono _
+    · rw [PartialEquiv.trans_source'] at hx
+      simp_rw [Function.comp_apply, tangentBundleCore_coordChange, (i.1.extend I).right_inv hx.1]
+    · exact (i.1.extend_image_source_inter j.1 I).subset
   · apply inter_subset_left
 #align tangent_bundle_core.is_smooth tangentBundleCore.isSmooth
 
chore: classify porting notes referring to missing linters (#12098)

Reference the newly created issues #12094 and #12096, as well as the pre-existing #5171. Change all references to #10927 to #5171. Some of these changes were not labelled as "porting note"; change this for good measure.

Diff
@@ -189,7 +189,7 @@ variable (M)
 -- is empty if the base manifold is empty
 /-- The tangent bundle to a smooth manifold, as a Sigma type. Defined in terms of
 `Bundle.TotalSpace` to be able to put a suitable topology on it. -/
-@[reducible] -- Porting note: was nolint has_nonempty_instance
+@[reducible] -- Porting note(#5171): was nolint has_nonempty_instance
 def TangentBundle :=
   Bundle.TotalSpace E (TangentSpace I : M → Type _)
 #align tangent_bundle TangentBundle
chore(Geometry): remove a few porting notes (#12061)

In all cases, the original proof fixed itself.

Diff
@@ -376,8 +376,8 @@ theorem tangentBundle_model_space_chartAt (p : TangentBundle I H) :
   ext x : 1
   · ext; · rfl
     exact (tangentBundleCore I H).coordChange_self (achart _ x.1) x.1 (mem_achart_source H x.1) x.2
-  · -- Porting note: was ext; · rfl; apply hEq_of_eq
-    refine congr_arg (TotalSpace.mk _) ?_
+  · ext; · rfl
+    apply heq_of_eq
     exact (tangentBundleCore I H).coordChange_self (achart _ x.1) x.1 (mem_achart_source H x.1) x.2
   simp_rw [TangentBundle.chartAt, FiberBundleCore.localTriv,
     FiberBundleCore.localTrivAsPartialEquiv, VectorBundleCore.toFiberBundleCore_baseSet,
chore: remove some mathlib3 names in doc comments (#11931)
Diff
@@ -198,7 +198,7 @@ local notation "TM" => TangentBundle I M
 
 section TangentBundleInstances
 
-/- In general, the definition of tangent_space is not reducible, so that type class inference
+/- In general, the definition of `TangentSpace` is not reducible, so that type class inference
 does not pick wrong instances. In this section, we record the right instances for
 them, noting in particular that the tangent bundle is a smooth manifold. -/
 section
style: homogenise porting notes (#11145)

Homogenises porting notes via capitalisation and addition of whitespace.

It makes the following changes:

  • converts "--porting note" into "-- Porting note";
  • converts "porting note" into "Porting note".
Diff
@@ -112,7 +112,7 @@ def tangentBundleCore : VectorBundleCore 𝕜 M E (atlas H M) where
     · rw [Function.comp_apply, i.1.extend_left_inv I hxi]
 #align tangent_bundle_core tangentBundleCore
 
--- porting note: moved to a separate `simp high` lemma b/c `simp` can simplify the LHS
+-- Porting note: moved to a separate `simp high` lemma b/c `simp` can simplify the LHS
 @[simp high]
 theorem tangentBundleCore_baseSet (i) : (tangentBundleCore I M).baseSet i = i.1.source := rfl
 
@@ -177,7 +177,7 @@ kernel.
 def TangentSpace {𝕜} [NontriviallyNormedField 𝕜] {E} [NormedAddCommGroup E] [NormedSpace 𝕜 E]
     {H} [TopologicalSpace H] (I : ModelWithCorners 𝕜 E H) {M} [TopologicalSpace M]
     [ChartedSpace H M] [SmoothManifoldWithCorners I M] (_x : M) : Type* := E
--- porting note: was deriving TopologicalSpace, AddCommGroup, TopologicalAddGroup
+-- Porting note: was deriving TopologicalSpace, AddCommGroup, TopologicalAddGroup
 #align tangent_space TangentSpace
 
 instance {x : M} : TopologicalSpace (TangentSpace I x) := inferInstanceAs (TopologicalSpace E)
@@ -189,7 +189,7 @@ variable (M)
 -- is empty if the base manifold is empty
 /-- The tangent bundle to a smooth manifold, as a Sigma type. Defined in terms of
 `Bundle.TotalSpace` to be able to put a suitable topology on it. -/
-@[reducible] -- porting note: was nolint has_nonempty_instance
+@[reducible] -- Porting note: was nolint has_nonempty_instance
 def TangentBundle :=
   Bundle.TotalSpace E (TangentSpace I : M → Type _)
 #align tangent_bundle TangentBundle
@@ -209,7 +209,7 @@ instance : Module 𝕜 (TangentSpace I x) := inferInstanceAs (Module 𝕜 E)
 
 instance : Inhabited (TangentSpace I x) := ⟨0⟩
 
--- porting note: removed unneeded ContinuousAdd (TangentSpace I x)
+-- Porting note: removed unneeded ContinuousAdd (TangentSpace I x)
 
 end
 
@@ -321,7 +321,7 @@ theorem trivializationAt_symmL {b₀ b : M}
 set_option linter.uppercaseLean3 false in
 #align tangent_bundle.trivialization_at_symmL TangentBundle.trivializationAt_symmL
 
--- porting note: `simp` simplifies LHS to `.id _ _`
+-- Porting note: `simp` simplifies LHS to `.id _ _`
 @[simp high, mfld_simps]
 theorem coordChange_model_space (b b' x : F) :
     (tangentBundleCore 𝓘(𝕜, F) F).coordChange (achart F b) (achart F b') x = 1 := by
@@ -329,7 +329,7 @@ theorem coordChange_model_space (b b' x : F) :
     fderivWithin_id uniqueDiffWithinAt_univ
 #align tangent_bundle.coord_change_model_space TangentBundle.coordChange_model_space
 
--- porting note: `simp` simplifies LHS to `.id _ _`
+-- Porting note: `simp` simplifies LHS to `.id _ _`
 @[simp high, mfld_simps]
 theorem symmL_model_space (b b' : F) :
     (trivializationAt F (TangentSpace 𝓘(𝕜, F)) b).symmL 𝕜 b' = (1 : F →L[𝕜] F) := by
@@ -338,7 +338,7 @@ theorem symmL_model_space (b b' : F) :
 set_option linter.uppercaseLean3 false in
 #align tangent_bundle.symmL_model_space TangentBundle.symmL_model_space
 
--- porting note: `simp` simplifies LHS to `.id _ _`
+-- Porting note: `simp` simplifies LHS to `.id _ _`
 @[simp high, mfld_simps]
 theorem continuousLinearMapAt_model_space (b b' : F) :
     (trivializationAt F (TangentSpace 𝓘(𝕜, F)) b).continuousLinearMapAt 𝕜 b' = (1 : F →L[𝕜] F) := by
@@ -376,7 +376,7 @@ theorem tangentBundle_model_space_chartAt (p : TangentBundle I H) :
   ext x : 1
   · ext; · rfl
     exact (tangentBundleCore I H).coordChange_self (achart _ x.1) x.1 (mem_achart_source H x.1) x.2
-  · -- porting note: was ext; · rfl; apply hEq_of_eq
+  · -- Porting note: was ext; · rfl; apply hEq_of_eq
     refine congr_arg (TotalSpace.mk _) ?_
     exact (tangentBundleCore I H).coordChange_self (achart _ x.1) x.1 (mem_achart_source H x.1) x.2
   simp_rw [TangentBundle.chartAt, FiberBundleCore.localTriv,
feat(Geometry/Manifold/VectorBundle/Tangent): tangentCoordChange (#8672)

We define tangentCoordChange as a convenient abbreviation for coordinate changes on the tangent bundle. We also restate the axioms of VectorBundleCore as lemmas involving extChartAt.

Currently, we need to write (tangentBundleCore I M).coordChange (achart H x) (achart H y), referring explicitly to the atlas of M. Since tangentBundleCore uses the same base sets as the preferred charts of the base manifold, we wish to work directly with points x y : M and the preferred extended charts at those points (extChartAt).

We find this definition and related lemmas useful in #8483 in shortening proofs.

Diff
@@ -124,6 +124,51 @@ theorem tangentBundleCore_coordChange_achart (x x' z : M) :
   rfl
 #align tangent_bundle_core_coord_change_achart tangentBundleCore_coordChange_achart
 
+section tangentCoordChange
+
+/-- In a manifold `M`, given two preferred charts indexed by `x y : M`, `tangentCoordChange I x y`
+is the family of derivatives of the corresponding change-of-coordinates map. It takes junk values
+outside the intersection of the sources of the two charts.
+
+Note that this definition takes advantage of the fact that `tangentBundleCore` has the same base
+sets as the preferred charts of the base manifold. -/
+abbrev tangentCoordChange (x y : M) : M → E →L[𝕜] E :=
+  (tangentBundleCore I M).coordChange (achart H x) (achart H y)
+
+variable {I}
+
+lemma tangentCoordChange_def {x y z : M} : tangentCoordChange I x y z =
+    fderivWithin 𝕜 (extChartAt I y ∘ (extChartAt I x).symm) (range I) (extChartAt I x z) := rfl
+
+lemma tangentCoordChange_self {x z : M} {v : E} (h : z ∈ (extChartAt I x).source) :
+    tangentCoordChange I x x z v = v := by
+  apply (tangentBundleCore I M).coordChange_self
+  rw [tangentBundleCore_baseSet, coe_achart, ← extChartAt_source I]
+  exact h
+
+lemma tangentCoordChange_comp {w x y z : M} {v : E}
+    (h : z ∈ (extChartAt I w).source ∩ (extChartAt I x).source ∩ (extChartAt I y).source) :
+    tangentCoordChange I x y z (tangentCoordChange I w x z v) = tangentCoordChange I w y z v := by
+  apply (tangentBundleCore I M).coordChange_comp
+  simp only [tangentBundleCore_baseSet, coe_achart, ← extChartAt_source I]
+  exact h
+
+lemma hasFDerivWithinAt_tangentCoordChange {x y z : M}
+    (h : z ∈ (extChartAt I x).source ∩ (extChartAt I y).source) :
+    HasFDerivWithinAt ((extChartAt I y) ∘ (extChartAt I x).symm) (tangentCoordChange I x y z)
+      (range I) (extChartAt I x z) :=
+  have h' : extChartAt I x z ∈ ((extChartAt I x).symm ≫ (extChartAt I y)).source := by
+    rw [PartialEquiv.trans_source'', PartialEquiv.symm_symm, PartialEquiv.symm_target]
+    exact mem_image_of_mem _ h
+  ((contDiffWithinAt_ext_coord_change I y x h').differentiableWithinAt (by simp)).hasFDerivWithinAt
+
+lemma continuousOn_tangentCoordChange (x y : M) : ContinuousOn (tangentCoordChange I x y)
+    ((extChartAt I x).source ∩ (extChartAt I y).source) := by
+  convert (tangentBundleCore I M).continuousOn_coordChange (achart H x) (achart H y) <;>
+  simp only [tangentBundleCore_baseSet, coe_achart, ← extChartAt_source I]
+
+end tangentCoordChange
+
 /-- The tangent space at a point of the manifold `M`. It is just `E`. We could use instead
 `(tangentBundleCore I M).to_topological_vector_bundle_core.fiber x`, but we use `E` to help the
 kernel.
chore: rename LocalEquiv to PartialEquiv (#8984)

The current name is misleading: there's no open set involved; it's just an equivalence between subsets of domain and target. zulip discussion

PEquiv is similarly named: this is fine, as they're different designs for the same concept.

Co-authored-by: Michael Rothgang <rothgami@math.hu-berlin.de>

Diff
@@ -186,12 +186,12 @@ protected theorem chartAt (p : TM) :
   rfl
 #align tangent_bundle.chart_at TangentBundle.chartAt
 
-theorem chartAt_toLocalEquiv (p : TM) :
-    (chartAt (ModelProd H E) p).toLocalEquiv =
-      (tangentBundleCore I M).toFiberBundleCore.localTrivAsLocalEquiv (achart H p.1) ≫
-        (chartAt H p.1).toLocalEquiv.prod (LocalEquiv.refl E) :=
+theorem chartAt_toPartialEquiv (p : TM) :
+    (chartAt (ModelProd H E) p).toPartialEquiv =
+      (tangentBundleCore I M).toFiberBundleCore.localTrivAsPartialEquiv (achart H p.1) ≫
+        (chartAt H p.1).toPartialEquiv.prod (PartialEquiv.refl E) :=
   rfl
-#align tangent_bundle.chart_at_to_local_equiv TangentBundle.chartAt_toLocalEquiv
+#align tangent_bundle.chart_at_to_local_equiv TangentBundle.chartAt_toPartialEquiv
 
 theorem trivializationAt_eq_localTriv (x : M) :
     trivializationAt E (TangentSpace I) x =
@@ -244,7 +244,7 @@ theorem mem_chart_target_iff (p : H × E) (q : TM) :
     and_iff_left_iff_imp, mfld_simps]
   -/
   simp only [FiberBundle.chartedSpace_chartAt, mfld_simps]
-  rw [LocalEquiv.prod_symm]
+  rw [PartialEquiv.prod_symm]
   simp (config := { contextual := true }) only [and_iff_left_iff_imp, mfld_simps]
 #align tangent_bundle.mem_chart_target_iff TangentBundle.mem_chart_target_iff
 
@@ -308,7 +308,7 @@ instance tangentBundleCore.isSmooth : (tangentBundleCore I M).IsSmooth I := by
   rw [SmoothOn, contMDiffOn_iff_source_of_mem_maximalAtlas (subset_maximalAtlas I i.2),
     contMDiffOn_iff_contDiffOn]
   refine' ((contDiffOn_fderiv_coord_change I i j).congr fun x hx => _).mono _
-  · rw [LocalEquiv.trans_source'] at hx
+  · rw [PartialEquiv.trans_source'] at hx
     simp_rw [Function.comp_apply, tangentBundleCore_coordChange, (i.1.extend I).right_inv hx.1]
   · exact (i.1.extend_image_source_inter j.1 I).subset
   · apply inter_subset_left
@@ -327,15 +327,16 @@ end TangentBundleInstances
 between a product type and a sigma type, a.k.a. `TotalSpace.toProd`. -/
 @[simp, mfld_simps]
 theorem tangentBundle_model_space_chartAt (p : TangentBundle I H) :
-    (chartAt (ModelProd H E) p).toLocalEquiv = (TotalSpace.toProd H E).toLocalEquiv := by
+    (chartAt (ModelProd H E) p).toPartialEquiv = (TotalSpace.toProd H E).toPartialEquiv := by
   ext x : 1
   · ext; · rfl
     exact (tangentBundleCore I H).coordChange_self (achart _ x.1) x.1 (mem_achart_source H x.1) x.2
   · -- porting note: was ext; · rfl; apply hEq_of_eq
     refine congr_arg (TotalSpace.mk _) ?_
     exact (tangentBundleCore I H).coordChange_self (achart _ x.1) x.1 (mem_achart_source H x.1) x.2
-  simp_rw [TangentBundle.chartAt, FiberBundleCore.localTriv, FiberBundleCore.localTrivAsLocalEquiv,
-    VectorBundleCore.toFiberBundleCore_baseSet, tangentBundleCore_baseSet]
+  simp_rw [TangentBundle.chartAt, FiberBundleCore.localTriv,
+    FiberBundleCore.localTrivAsPartialEquiv, VectorBundleCore.toFiberBundleCore_baseSet,
+    tangentBundleCore_baseSet]
   simp only [mfld_simps]
 #align tangent_bundle_model_space_chart_at tangentBundle_model_space_chartAt
 
@@ -349,7 +350,7 @@ theorem tangentBundle_model_space_coe_chartAt (p : TangentBundle I H) :
 theorem tangentBundle_model_space_coe_chartAt_symm (p : TangentBundle I H) :
     ((chartAt (ModelProd H E) p).symm : ModelProd H E → TangentBundle I H) =
       (TotalSpace.toProd H E).symm := by
-  rw [← PartialHomeomorph.coe_coe, PartialHomeomorph.symm_toLocalEquiv,
+  rw [← PartialHomeomorph.coe_coe, PartialHomeomorph.symm_toPartialEquiv,
     tangentBundle_model_space_chartAt]; rfl
 #align tangent_bundle_model_space_coe_chart_at_symm tangentBundle_model_space_coe_chartAt_symm
 
chore: rename LocalHomeomorph to PartialHomeomorph (#8982)

LocalHomeomorph evokes a "local homeomorphism": this is not what this means. Instead, this is a homeomorphism on an open set of the domain (extended to the whole space, by the junk value pattern). Hence, partial homeomorphism is more appropriate, and avoids confusion with IsLocallyHomeomorph.

A future PR will rename LocalEquiv to PartialEquiv.

Zulip discussion

Diff
@@ -14,8 +14,8 @@ This file defines the tangent bundle as a smooth vector bundle.
 
 Let `M` be a smooth manifold with corners with model `I` on `(E, H)`. We define the tangent bundle
 of `M` using the `VectorBundleCore` construction indexed by the charts of `M` with fibers `E`.
-Given two charts `i, j : LocalHomeomorph M H`, the coordinate change between `i` and `j` at a point
-`x : M` is the derivative of the composite
+Given two charts `i, j : PartialHomeomorph M H`, the coordinate change between `i` and `j`
+at a point `x : M` is the derivative of the composite
 ```
   I.symm   i.symm    j     I
 E -----> H -----> M --> H --> E
@@ -32,7 +32,7 @@ This defines a smooth vector bundle `TangentBundle` with fibers `TangentSpace`.
 -/
 
 
-open Bundle Set SmoothManifoldWithCorners LocalHomeomorph ContinuousLinearMap
+open Bundle Set SmoothManifoldWithCorners PartialHomeomorph ContinuousLinearMap
 
 open scoped Manifold Topology Bundle
 
@@ -58,7 +58,7 @@ theorem contDiffOn_fderiv_coord_change (i j : atlas H M) :
     rw [i.1.extend_coord_change_source]; apply image_subset_range
   intro x hx
   refine' (ContDiffWithinAt.fderivWithin_right _ I.unique_diff le_top <| h hx).mono h
-  refine' (LocalHomeomorph.contDiffOn_extend_coord_change I (subset_maximalAtlas I j.2)
+  refine' (PartialHomeomorph.contDiffOn_extend_coord_change I (subset_maximalAtlas I j.2)
     (subset_maximalAtlas I i.2) x hx).mono_of_mem _
   exact i.1.extend_coord_change_source_mem_nhdsWithin j.1 I hx
 #align cont_diff_on_fderiv_coord_change contDiffOn_fderiv_coord_change
@@ -181,8 +181,8 @@ namespace TangentBundle
 
 protected theorem chartAt (p : TM) :
     chartAt (ModelProd H E) p =
-      ((tangentBundleCore I M).toFiberBundleCore.localTriv (achart H p.1)).toLocalHomeomorph ≫ₕ
-        (chartAt H p.1).prod (LocalHomeomorph.refl E) :=
+      ((tangentBundleCore I M).toFiberBundleCore.localTriv (achart H p.1)).toPartialHomeomorph ≫ₕ
+        (chartAt H p.1).prod (PartialHomeomorph.refl E) :=
   rfl
 #align tangent_bundle.chart_at TangentBundle.chartAt
 
@@ -342,14 +342,14 @@ theorem tangentBundle_model_space_chartAt (p : TangentBundle I H) :
 @[simp, mfld_simps]
 theorem tangentBundle_model_space_coe_chartAt (p : TangentBundle I H) :
     ⇑(chartAt (ModelProd H E) p) = TotalSpace.toProd H E := by
-  rw [← LocalHomeomorph.coe_coe, tangentBundle_model_space_chartAt]; rfl
+  rw [← PartialHomeomorph.coe_coe, tangentBundle_model_space_chartAt]; rfl
 #align tangent_bundle_model_space_coe_chart_at tangentBundle_model_space_coe_chartAt
 
 @[simp, mfld_simps]
 theorem tangentBundle_model_space_coe_chartAt_symm (p : TangentBundle I H) :
     ((chartAt (ModelProd H E) p).symm : ModelProd H E → TangentBundle I H) =
       (TotalSpace.toProd H E).symm := by
-  rw [← LocalHomeomorph.coe_coe, LocalHomeomorph.symm_toLocalEquiv,
+  rw [← PartialHomeomorph.coe_coe, PartialHomeomorph.symm_toLocalEquiv,
     tangentBundle_model_space_chartAt]; rfl
 #align tangent_bundle_model_space_coe_chart_at_symm tangentBundle_model_space_coe_chartAt_symm
 
chore: bump to v4.3.0-rc2 (#8366)

PR contents

This is the supremum of

along with some minor fixes from failures on nightly-testing as Mathlib master is merged into it.

Note that some PRs for changes that are already compatible with the current toolchain and will be necessary have already been split out: #8380.

I am hopeful that in future we will be able to progressively merge adaptation PRs into a bump/v4.X.0 branch, so we never end up with a "big merge" like this. However one of these adaptation PRs (#8056) predates my new scheme for combined CI, and it wasn't possible to keep that PR viable in the meantime.

Lean PRs involved in this bump

In particular this includes adjustments for the Lean PRs

leanprover/lean4#2778

We can get rid of all the

local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue [lean4#2220](https://github.com/leanprover/lean4/pull/2220)

macros across Mathlib (and in any projects that want to write natural number powers of reals).

leanprover/lean4#2722

Changes the default behaviour of simp to (config := {decide := false}). This makes simp (and consequentially norm_num) less powerful, but also more consistent, and less likely to blow up in long failures. This requires a variety of changes: changing some previously by simp or norm_num to decide or rfl, or adding (config := {decide := true}).

leanprover/lean4#2783

This changed the behaviour of simp so that simp [f] will only unfold "fully applied" occurrences of f. The old behaviour can be recovered with simp (config := { unfoldPartialApp := true }). We may in future add a syntax for this, e.g. simp [!f]; please provide feedback! In the meantime, we have made the following changes:

  • switching to using explicit lemmas that have the intended level of application
  • (config := { unfoldPartialApp := true }) in some places, to recover the old behaviour
  • Using @[eqns] to manually adjust the equation lemmas for a particular definition, recovering the old behaviour just for that definition. See #8371, where we do this for Function.comp and Function.flip.

This change in Lean may require further changes down the line (e.g. adding the !f syntax, and/or upstreaming the special treatment for Function.comp and Function.flip, and/or removing this special treatment). Please keep an open and skeptical mind about these changes!

Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Mauricio Collares <mauricio@collares.org>

Diff
@@ -423,7 +423,8 @@ def inTangentCoordinates (f : N → M) (g : N → M') (ϕ : N → E →L[𝕜] E
 
 theorem inTangentCoordinates_model_space (f : N → H) (g : N → H') (ϕ : N → E →L[𝕜] E') (x₀ : N) :
     inTangentCoordinates I I' f g ϕ x₀ = ϕ := by
-  simp_rw [inTangentCoordinates, inCoordinates_tangent_bundle_core_model_space]
+  simp (config := { unfoldPartialApp := true }) only [inTangentCoordinates,
+    inCoordinates_tangent_bundle_core_model_space]
 #align in_tangent_coordinates_model_space inTangentCoordinates_model_space
 
 theorem inTangentCoordinates_eq (f : N → M) (g : N → M') (ϕ : N → E →L[𝕜] E') {x₀ x : N}
chore: split Mathlib.Analysis.Calculus.ContDiff.Basic (#8344)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn, Heather Macbeth
 -/
 import Mathlib.Geometry.Manifold.VectorBundle.Basic
+import Mathlib.Analysis.Convex.Normed
 
 #align_import geometry.manifold.vector_bundle.tangent from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
 
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -39,12 +39,12 @@ noncomputable section
 
 section General
 
-variable {𝕜 : Type _} [NontriviallyNormedField 𝕜] {E : Type _} [NormedAddCommGroup E]
-  [NormedSpace 𝕜 E] {E' : Type _} [NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H : Type _}
-  [TopologicalSpace H] {I : ModelWithCorners 𝕜 E H} {H' : Type _} [TopologicalSpace H']
-  {I' : ModelWithCorners 𝕜 E' H'} {M : Type _} [TopologicalSpace M] [ChartedSpace H M]
-  [SmoothManifoldWithCorners I M] {M' : Type _} [TopologicalSpace M'] [ChartedSpace H' M']
-  [SmoothManifoldWithCorners I' M'] {F : Type _} [NormedAddCommGroup F] [NormedSpace 𝕜 F]
+variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] {E : Type*} [NormedAddCommGroup E]
+  [NormedSpace 𝕜 E] {E' : Type*} [NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H : Type*}
+  [TopologicalSpace H] {I : ModelWithCorners 𝕜 E H} {H' : Type*} [TopologicalSpace H']
+  {I' : ModelWithCorners 𝕜 E' H'} {M : Type*} [TopologicalSpace M] [ChartedSpace H M]
+  [SmoothManifoldWithCorners I M] {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M']
+  [SmoothManifoldWithCorners I' M'] {F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F]
 
 variable (I)
 
@@ -130,7 +130,7 @@ kernel.
 @[nolint unusedArguments]
 def TangentSpace {𝕜} [NontriviallyNormedField 𝕜] {E} [NormedAddCommGroup E] [NormedSpace 𝕜 E]
     {H} [TopologicalSpace H] (I : ModelWithCorners 𝕜 E H) {M} [TopologicalSpace M]
-    [ChartedSpace H M] [SmoothManifoldWithCorners I M] (_x : M) : Type _ := E
+    [ChartedSpace H M] [SmoothManifoldWithCorners I M] (_x : M) : Type* := E
 -- porting note: was deriving TopologicalSpace, AddCommGroup, TopologicalAddGroup
 #align tangent_space TangentSpace
 
@@ -307,7 +307,7 @@ instance tangentBundleCore.isSmooth : (tangentBundleCore I M).IsSmooth I := by
   rw [SmoothOn, contMDiffOn_iff_source_of_mem_maximalAtlas (subset_maximalAtlas I i.2),
     contMDiffOn_iff_contDiffOn]
   refine' ((contDiffOn_fderiv_coord_change I i j).congr fun x hx => _).mono _
-  · rw [LocalEquiv.trans_source'] at hx 
+  · rw [LocalEquiv.trans_source'] at hx
     simp_rw [Function.comp_apply, tangentBundleCore_coordChange, (i.1.extend I).right_inv hx.1]
   · exact (i.1.extend_image_source_inter j.1 I).subset
   · apply inter_subset_left
@@ -395,7 +395,7 @@ theorem tangentBundleModelSpaceHomeomorph_coe_symm :
 
 section inTangentCoordinates
 
-variable (I') {M H} {N : Type _}
+variable (I') {M H} {N : Type*}
 
 /-- The map `in_coordinates` for the tangent bundle is trivial on the model spaces -/
 theorem inCoordinates_tangent_bundle_core_model_space (x₀ x : H) (y₀ y : H') (ϕ : E →L[𝕜] E') :
@@ -439,8 +439,8 @@ end General
 
 section Real
 
-variable {E : Type _} [NormedAddCommGroup E] [NormedSpace ℝ E] {H : Type _} [TopologicalSpace H]
-  {I : ModelWithCorners ℝ E H} {M : Type _} [TopologicalSpace M] [ChartedSpace H M]
+variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] {H : Type*} [TopologicalSpace H]
+  {I : ModelWithCorners ℝ E H} {M : Type*} [TopologicalSpace M] [ChartedSpace H M]
   [SmoothManifoldWithCorners I M]
 
 instance {x : M} : PathConnectedSpace (TangentSpace I x) := by unfold TangentSpace; infer_instance
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,14 +2,11 @@
 Copyright (c) 2022 Floris van Doorn. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn, Heather Macbeth
-
-! This file was ported from Lean 3 source module geometry.manifold.vector_bundle.tangent
-! leanprover-community/mathlib commit e473c3198bb41f68560cab68a0529c854b618833
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Geometry.Manifold.VectorBundle.Basic
 
+#align_import geometry.manifold.vector_bundle.tangent from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
+
 /-! # Tangent bundles
 
 This file defines the tangent bundle as a smooth vector bundle.
feat: port Geometry.Manifold.ContMdiffMfderiv (#5496)
Diff
@@ -326,7 +326,7 @@ end TangentBundleInstances
 
 
 /-- In the tangent bundle to the model space, the charts are just the canonical identification
-between a product type and a sigma type, a.k.a. `Equiv.sigmaEquivProd`. -/
+between a product type and a sigma type, a.k.a. `TotalSpace.toProd`. -/
 @[simp, mfld_simps]
 theorem tangentBundle_model_space_chartAt (p : TangentBundle I H) :
     (chartAt (ModelProd H E) p).toLocalEquiv = (TotalSpace.toProd H E).toLocalEquiv := by
refactor: redefine Bundle.TotalSpace (#5720)

Forward-port leanprover-community/mathlib#19221

Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn, Heather Macbeth
 
 ! This file was ported from Lean 3 source module geometry.manifold.vector_bundle.tangent
-! leanprover-community/mathlib commit e354e865255654389cc46e6032160238df2e0f40
+! leanprover-community/mathlib commit e473c3198bb41f68560cab68a0529c854b618833
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -148,7 +148,7 @@ variable (M)
 `Bundle.TotalSpace` to be able to put a suitable topology on it. -/
 @[reducible] -- porting note: was nolint has_nonempty_instance
 def TangentBundle :=
-  Bundle.TotalSpace (TangentSpace I : M → Type _)
+  Bundle.TotalSpace E (TangentSpace I : M → Type _)
 #align tangent_bundle TangentBundle
 
 local notation "TM" => TangentBundle I M
@@ -203,7 +203,8 @@ theorem trivializationAt_eq_localTriv (x : M) :
 
 @[simp, mfld_simps]
 theorem trivializationAt_source (x : M) :
-    (trivializationAt E (TangentSpace I) x).source = π _ ⁻¹' (chartAt H x).source :=
+    (trivializationAt E (TangentSpace I) x).source =
+      π E (TangentSpace I) ⁻¹' (chartAt H x).source :=
   rfl
 #align tangent_bundle.trivialization_at_source TangentBundle.trivializationAt_source
 
@@ -328,12 +329,12 @@ end TangentBundleInstances
 between a product type and a sigma type, a.k.a. `Equiv.sigmaEquivProd`. -/
 @[simp, mfld_simps]
 theorem tangentBundle_model_space_chartAt (p : TangentBundle I H) :
-    (chartAt (ModelProd H E) p).toLocalEquiv = (Equiv.sigmaEquivProd H E).toLocalEquiv := by
+    (chartAt (ModelProd H E) p).toLocalEquiv = (TotalSpace.toProd H E).toLocalEquiv := by
   ext x : 1
   · ext; · rfl
     exact (tangentBundleCore I H).coordChange_self (achart _ x.1) x.1 (mem_achart_source H x.1) x.2
   · -- porting note: was ext; · rfl; apply hEq_of_eq
-    refine congr_arg (Sigma.mk _) ?_
+    refine congr_arg (TotalSpace.mk _) ?_
     exact (tangentBundleCore I H).coordChange_self (achart _ x.1) x.1 (mem_achart_source H x.1) x.2
   simp_rw [TangentBundle.chartAt, FiberBundleCore.localTriv, FiberBundleCore.localTrivAsLocalEquiv,
     VectorBundleCore.toFiberBundleCore_baseSet, tangentBundleCore_baseSet]
@@ -342,14 +343,14 @@ theorem tangentBundle_model_space_chartAt (p : TangentBundle I H) :
 
 @[simp, mfld_simps]
 theorem tangentBundle_model_space_coe_chartAt (p : TangentBundle I H) :
-    ⇑(chartAt (ModelProd H E) p) = Equiv.sigmaEquivProd H E := by
+    ⇑(chartAt (ModelProd H E) p) = TotalSpace.toProd H E := by
   rw [← LocalHomeomorph.coe_coe, tangentBundle_model_space_chartAt]; rfl
 #align tangent_bundle_model_space_coe_chart_at tangentBundle_model_space_coe_chartAt
 
 @[simp, mfld_simps]
 theorem tangentBundle_model_space_coe_chartAt_symm (p : TangentBundle I H) :
     ((chartAt (ModelProd H E) p).symm : ModelProd H E → TangentBundle I H) =
-      (Equiv.sigmaEquivProd H E).symm := by
+      (TotalSpace.toProd H E).symm := by
   rw [← LocalHomeomorph.coe_coe, LocalHomeomorph.symm_toLocalEquiv,
     tangentBundle_model_space_chartAt]; rfl
 #align tangent_bundle_model_space_coe_chart_at_symm tangentBundle_model_space_coe_chartAt_symm
@@ -364,7 +365,7 @@ variable (H)
 /-- The canonical identification between the tangent bundle to the model space and the product,
 as a homeomorphism -/
 def tangentBundleModelSpaceHomeomorph : TangentBundle I H ≃ₜ ModelProd H E :=
-  { Equiv.sigmaEquivProd H E with
+  { TotalSpace.toProd H E with
     continuous_toFun := by
       let p : TangentBundle I H := ⟨I.symm (0 : E), (0 : E)⟩
       have : Continuous (chartAt (ModelProd H E) p) := by
@@ -384,14 +385,14 @@ def tangentBundleModelSpaceHomeomorph : TangentBundle I H ≃ₜ ModelProd H E :
 @[simp, mfld_simps]
 theorem tangentBundleModelSpaceHomeomorph_coe :
     (tangentBundleModelSpaceHomeomorph H I : TangentBundle I H → ModelProd H E) =
-      Equiv.sigmaEquivProd H E :=
+      TotalSpace.toProd H E :=
   rfl
 #align tangent_bundle_model_space_homeomorph_coe tangentBundleModelSpaceHomeomorph_coe
 
 @[simp, mfld_simps]
 theorem tangentBundleModelSpaceHomeomorph_coe_symm :
     ((tangentBundleModelSpaceHomeomorph H I).symm : ModelProd H E → TangentBundle I H) =
-      (Equiv.sigmaEquivProd H E).symm :=
+      (TotalSpace.toProd H E).symm :=
   rfl
 #align tangent_bundle_model_space_homeomorph_coe_symm tangentBundleModelSpaceHomeomorph_coe_symm
 
feat: port Geometry.Manifold.VectorBundle.Tangent (#5448)

Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com>

Dependencies 12 + 885

886 files ported (98.7%)
395550 lines ported (98.6%)
Show graph

The unported dependencies are

The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file