geometry.manifold.vector_bundle.basic ⟷ Mathlib.Geometry.Manifold.VectorBundle.Basic

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
@@ -69,14 +69,14 @@ variables {π•œ B B' F M : Type*} {E : B β†’ Type*}
 /-! ### Charted space structure on a fiber bundle -/
 
 section
-variables [topological_space F] [topological_space (total_space E)] [βˆ€ x, topological_space (E x)]
+variables [topological_space F] [topological_space (total_space F E)] [βˆ€ x, topological_space (E x)]
   {HB : Type*} [topological_space HB]
   [topological_space B] [charted_space HB B] [fiber_bundle F E]
 
 /-- A fiber bundle `E` over a base `B` with model fiber `F` is naturally a charted space modelled on
 `B Γ— F`. -/
-instance fiber_bundle.charted_space : charted_space (B Γ— F) (total_space E) :=
-{ atlas := (Ξ» e : trivialization F (Ο€ E), e.to_local_homeomorph) '' trivialization_atlas F E,
+instance fiber_bundle.charted_space : charted_space (B Γ— F) (total_space F E) :=
+{ atlas := (Ξ» e : trivialization F (Ο€ F E), e.to_local_homeomorph) '' trivialization_atlas F E,
   chart_at := Ξ» x, (trivialization_at F E x.proj).to_local_homeomorph,
   mem_chart_source := Ξ» x, (trivialization_at F E x.proj).mem_source.mpr
     (mem_base_set_trivialization_at F E x.proj),
@@ -87,11 +87,11 @@ local attribute [reducible] model_prod
 
 /-- Let `B` be a charted space modelled on `HB`.  Then a fiber bundle `E` over a base `B` with model
 fiber `F` is naturally a charted space modelled on `HB.prod F`. -/
-instance fiber_bundle.charted_space' : charted_space (model_prod HB F) (total_space E) :=
+instance fiber_bundle.charted_space' : charted_space (model_prod HB F) (total_space F E) :=
 charted_space.comp _ (model_prod B F) _
 end
 
-lemma fiber_bundle.charted_space_chart_at (x : total_space E) :
+lemma fiber_bundle.charted_space_chart_at (x : total_space F E) :
   chart_at (model_prod HB F) x =
   (trivialization_at F E x.proj).to_local_homeomorph ≫ₕ
   (chart_at HB x.proj).prod (local_homeomorph.refl F) :=
@@ -102,7 +102,7 @@ begin
     trivialization.coe_fst' _ (mem_base_set_trivialization_at F E x.proj)]
 end
 
-lemma fiber_bundle.charted_space_chart_at_symm_fst (x : total_space E) (y : model_prod HB F)
+lemma fiber_bundle.charted_space_chart_at_symm_fst (x : total_space F E) (y : model_prod HB F)
   (hy : y ∈ (chart_at (model_prod HB F) x).target) :
   ((chart_at (model_prod HB F) x).symm y).proj = (chart_at HB x.proj).symm y.1 :=
 begin
@@ -115,7 +115,7 @@ end
 section
 variables [nontrivially_normed_field π•œ]
   [normed_add_comm_group F] [normed_space π•œ F]
-  [topological_space (total_space E)] [βˆ€ x, topological_space (E x)]
+  [topological_space (total_space F E)] [βˆ€ x, topological_space (E x)]
 
   {EB : Type*} [normed_add_comm_group EB] [normed_space π•œ EB]
   {HB : Type*} [topological_space HB] (IB : model_with_corners π•œ EB HB)
@@ -127,7 +127,7 @@ variables [nontrivially_normed_field π•œ]
 
 variables [topological_space B] [charted_space HB B] [fiber_bundle F E]
 
-protected lemma fiber_bundle.ext_chart_at (x : total_space E) :
+protected lemma fiber_bundle.ext_chart_at (x : total_space F E) :
   ext_chart_at (IB.prod π“˜(π•œ, F)) x =
   (trivialization_at F E x.proj).to_local_equiv ≫
   (ext_chart_at IB x.proj).prod (local_equiv.refl F) :=
@@ -146,7 +146,7 @@ namespace bundle
 variables {F E IB}
 
 /-- Characterization of C^n functions into a smooth vector bundle. -/
-lemma cont_mdiff_within_at_total_space (f : M β†’ total_space E) {s : set M} {xβ‚€ : M} :
+lemma cont_mdiff_within_at_total_space (f : M β†’ total_space F E) {s : set M} {xβ‚€ : M} :
   cont_mdiff_within_at IM (IB.prod (π“˜(π•œ, F))) n f s xβ‚€ ↔
   cont_mdiff_within_at IM IB n (Ξ» x, (f x).proj) s xβ‚€ ∧
   cont_mdiff_within_at IM π“˜(π•œ, F) n (Ξ» x, (trivialization_at F E (f xβ‚€).proj (f x)).2) s xβ‚€ :=
@@ -171,7 +171,7 @@ begin
 end
 
 /-- Characterization of C^n functions into a smooth vector bundle. -/
-lemma cont_mdiff_at_total_space (f : M β†’ total_space E) (xβ‚€ : M) :
+lemma cont_mdiff_at_total_space (f : M β†’ total_space F E) (xβ‚€ : M) :
   cont_mdiff_at IM (IB.prod (π“˜(π•œ, F))) n f xβ‚€ ↔
   cont_mdiff_at IM IB n (Ξ» x, (f x).proj) xβ‚€ ∧
   cont_mdiff_at IM π“˜(π•œ, F) n (Ξ» x, (trivialization_at F E (f xβ‚€).proj (f x)).2) xβ‚€ :=
@@ -179,12 +179,12 @@ by { simp_rw [← cont_mdiff_within_at_univ], exact cont_mdiff_within_at_total_s
 
 /-- Characterization of C^n sections of a smooth vector bundle. -/
 lemma cont_mdiff_at_section (s : Ξ  x, E x) (xβ‚€ : B) :
-  cont_mdiff_at IB (IB.prod (π“˜(π•œ, F))) n (Ξ» x, total_space_mk x (s x)) xβ‚€ ↔
-  cont_mdiff_at IB π“˜(π•œ, F) n (Ξ» x, (trivialization_at F E xβ‚€ (total_space_mk x (s x))).2) xβ‚€ :=
+  cont_mdiff_at IB (IB.prod (π“˜(π•œ, F))) n (Ξ» x, total_space.mk' F x (s x)) xβ‚€ ↔
+  cont_mdiff_at IB π“˜(π•œ, F) n (Ξ» x, (trivialization_at F E xβ‚€ (total_space.mk' F x (s x))).2) xβ‚€ :=
 by { simp_rw [cont_mdiff_at_total_space, and_iff_right_iff_imp], intro x, exact cont_mdiff_at_id }
 
 variables (E)
-lemma cont_mdiff_proj : cont_mdiff (IB.prod π“˜(π•œ, F)) IB n (Ο€ E) :=
+lemma cont_mdiff_proj : cont_mdiff (IB.prod π“˜(π•œ, F)) IB n (Ο€ F E) :=
 begin
   intro x,
   rw [cont_mdiff_at, cont_mdiff_within_at_iff'],
@@ -193,47 +193,47 @@ begin
   apply cont_diff_within_at_fst.congr,
   { rintros ⟨a, b⟩ hab,
     simp only with mfld_simps at hab,
-    have : ((chart_at HB x.1).symm (IB.symm a), b) ∈ (trivialization_at F E x.fst).target,
+    have : ((chart_at HB x.1).symm (IB.symm a), b) ∈ (trivialization_at F E x.proj).target,
     { simp only [hab] with mfld_simps },
     simp only [trivialization.proj_symm_apply _ this, hab] with mfld_simps },
   { simp only with mfld_simps }
 end
 
-lemma smooth_proj : smooth (IB.prod π“˜(π•œ, F)) IB (Ο€ E) :=
+lemma smooth_proj : smooth (IB.prod π“˜(π•œ, F)) IB (Ο€ F E) :=
 cont_mdiff_proj E
 
-lemma cont_mdiff_on_proj {s : set (total_space E)} :
-  cont_mdiff_on (IB.prod π“˜(π•œ, F)) IB n (Ο€ E) s :=
+lemma cont_mdiff_on_proj {s : set (total_space F E)} :
+  cont_mdiff_on (IB.prod π“˜(π•œ, F)) IB n (Ο€ F E) s :=
 (bundle.cont_mdiff_proj E).cont_mdiff_on
 
-lemma smooth_on_proj {s : set (total_space E)} :
-  smooth_on (IB.prod π“˜(π•œ, F)) IB (Ο€ E) s :=
+lemma smooth_on_proj {s : set (total_space F E)} :
+  smooth_on (IB.prod π“˜(π•œ, F)) IB (Ο€ F E) s :=
 cont_mdiff_on_proj E
 
-lemma cont_mdiff_at_proj {p : total_space E} :
+lemma cont_mdiff_at_proj {p : total_space F E} :
   cont_mdiff_at (IB.prod π“˜(π•œ, F)) IB n
-    (Ο€ E) p :=
+    (Ο€ F E) p :=
 (bundle.cont_mdiff_proj E).cont_mdiff_at
 
-lemma smooth_at_proj {p : total_space E} :
-  smooth_at (IB.prod π“˜(π•œ, F)) IB (Ο€ E) p :=
+lemma smooth_at_proj {p : total_space F E} :
+  smooth_at (IB.prod π“˜(π•œ, F)) IB (Ο€ F E) p :=
 bundle.cont_mdiff_at_proj E
 
 lemma cont_mdiff_within_at_proj
-  {s : set (total_space E)}
-  {p : total_space E} :
-  cont_mdiff_within_at (IB.prod π“˜(π•œ, F)) IB n (Ο€ E) s p :=
+  {s : set (total_space F E)}
+  {p : total_space F E} :
+  cont_mdiff_within_at (IB.prod π“˜(π•œ, F)) IB n (Ο€ F E) s p :=
 (bundle.cont_mdiff_at_proj E).cont_mdiff_within_at
 
 lemma smooth_within_at_proj
-  {s : set (total_space E)}
-  {p : total_space E} :
-  smooth_within_at (IB.prod π“˜(π•œ, F)) IB (Ο€ E) s p :=
+  {s : set (total_space F E)}
+  {p : total_space F E} :
+  smooth_within_at (IB.prod π“˜(π•œ, F)) IB (Ο€ F E) s p :=
 bundle.cont_mdiff_within_at_proj E
 
 variables (π•œ E) [βˆ€ x, add_comm_monoid (E x)] [βˆ€ x, module π•œ (E x)] [vector_bundle π•œ F E]
 
-lemma smooth_zero_section : smooth IB (IB.prod π“˜(π•œ, F)) (zero_section E) :=
+lemma smooth_zero_section : smooth IB (IB.prod π“˜(π•œ, F)) (zero_section F E) :=
 begin
   intro x,
   rw [bundle.cont_mdiff_at_total_space],
@@ -263,7 +263,7 @@ variables [nontrivially_normed_field π•œ]
 
 section with_topology
 
-variables [topological_space (total_space E)] [βˆ€ x, topological_space (E x)]
+variables [topological_space (total_space F E)] [βˆ€ x, topological_space (E x)]
 
 variables (F E) [fiber_bundle F E] [vector_bundle π•œ F E]
 
@@ -272,7 +272,7 @@ topological vector bundle over `B` with fibers isomorphic to `F`, then `smooth_v
 registers that the bundle is smooth, in the sense of having smooth transition functions.
 This is a mixin, not carrying any new data`. -/
 class smooth_vector_bundle : Prop :=
-(smooth_on_coord_change : βˆ€ (e e' : trivialization F (Ο€ E))
+(smooth_on_coord_change : βˆ€ (e e' : trivialization F (Ο€ F E))
   [mem_trivialization_atlas e] [mem_trivialization_atlas e'],
   smooth_on IB π“˜(π•œ, F β†’L[π•œ] F) (Ξ» b : B, (e.coord_changeL π•œ e' b : F β†’L[π•œ] F))
   (e.base_set ∩ e'.base_set))
@@ -284,7 +284,7 @@ variables [smooth_vector_bundle F E IB]
 /-- For a smooth vector bundle `E` over `B` with fiber modelled on `F`, the change-of-co-ordinates
 between two trivializations `e`, `e'` for `E`, considered as charts to `B Γ— F`, is smooth and
 fiberwise linear. -/
-instance : has_groupoid (total_space E) (smooth_fiberwise_linear B F IB) :=
+instance : has_groupoid (total_space F E) (smooth_fiberwise_linear B F IB) :=
 { compatible := begin
     rintros _ _ ⟨e, he, rfl⟩ ⟨e', he', rfl⟩,
     haveI : mem_trivialization_atlas e := ⟨he⟩,
@@ -308,7 +308,7 @@ instance : has_groupoid (total_space E) (smooth_fiberwise_linear B F IB) :=
   end }
 
 /-- A smooth vector bundle `E` is naturally a smooth manifold. -/
-instance : smooth_manifold_with_corners (IB.prod π“˜(π•œ, F)) (total_space E) :=
+instance : smooth_manifold_with_corners (IB.prod π“˜(π•œ, F)) (total_space F E) :=
 begin
   refine { .. structure_groupoid.has_groupoid.comp (smooth_fiberwise_linear B F IB) _ },
   intros e he,
@@ -366,11 +366,11 @@ instance bundle.trivial.smooth_vector_bundle : smooth_vector_bundle F (bundle.tr
 
 section prod
 variables (F₁ : Type*) [normed_add_comm_group F₁] [normed_space π•œ F₁]
-  (E₁ : B β†’ Type*) [topological_space (total_space E₁)]
+  (E₁ : B β†’ Type*) [topological_space (total_space F₁ E₁)]
   [Ξ  x, add_comm_monoid (E₁ x)] [Ξ  x, module π•œ (E₁ x)]
 
 variables (Fβ‚‚ : Type*) [normed_add_comm_group Fβ‚‚] [normed_space π•œ Fβ‚‚]
-  (Eβ‚‚ : B β†’ Type*) [topological_space (total_space Eβ‚‚)]
+  (Eβ‚‚ : B β†’ Type*) [topological_space (total_space Fβ‚‚ Eβ‚‚)]
   [Ξ  x, add_comm_monoid (Eβ‚‚ x)] [Ξ  x, module π•œ (Eβ‚‚ x)]
 
 variables [Ξ  x : B, topological_space (E₁ x)] [Ξ  x : B, topological_space (Eβ‚‚ x)]
@@ -409,10 +409,9 @@ variables [βˆ€ x, topological_space (E x)] {F E}
 class is_smooth (a : vector_prebundle π•œ F E) : Prop :=
 (exists_smooth_coord_change : βˆ€ (e e' ∈ a.pretrivialization_atlas), βˆƒ f : B β†’ F β†’L[π•œ] F,
   smooth_on IB π“˜(π•œ, F β†’L[π•œ] F) f (e.base_set ∩ e'.base_set) ∧
-  βˆ€ (b : B) (hb : b ∈ e.base_set ∩ e'.base_set) (v : F),
-    f b v = (e' (total_space_mk b (e.symm b v))).2)
+  βˆ€ (b : B) (hb : b ∈ e.base_set ∩ e'.base_set) (v : F), f b v = (e' ⟨b ,e.symm b v⟩).2)
 
-variables (a : vector_prebundle π•œ F E) [ha : a.is_smooth IB] {e e' : pretrivialization F (Ο€ E)}
+variables (a : vector_prebundle π•œ F E) [ha : a.is_smooth IB] {e e' : pretrivialization F (Ο€ F E)}
 include ha
 
 /-- A randomly chosen coordinate change on a `smooth_vector_prebundle`, given by
@@ -430,12 +429,12 @@ lemma smooth_on_smooth_coord_change (he : e ∈ a.pretrivialization_atlas)
 
 lemma smooth_coord_change_apply (he : e ∈ a.pretrivialization_atlas)
   (he' : e' ∈ a.pretrivialization_atlas) {b : B} (hb : b ∈ e.base_set ∩ e'.base_set) (v : F) :
-  a.smooth_coord_change IB he he' b v = (e' (total_space_mk b (e.symm b v))).2 :=
+  a.smooth_coord_change IB he he' b v = (e' ⟨b, e.symm b v⟩).2 :=
 (classical.some_spec (ha.exists_smooth_coord_change e he e' he')).2 b hb v
 
 lemma mk_smooth_coord_change (he : e ∈ a.pretrivialization_atlas)
   (he' : e' ∈ a.pretrivialization_atlas) {b : B} (hb : b ∈ e.base_set ∩ e'.base_set) (v : F) :
-  (b, (a.smooth_coord_change IB he he' b v)) = e' (total_space_mk b (e.symm b v)) :=
+  (b, (a.smooth_coord_change IB he he' b v)) = e' ⟨b, e.symm b v⟩ :=
 begin
   ext,
   { rw [e.mk_symm hb.1 v, e'.coe_fst', e.proj_symm_apply' hb.1],

(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
@@ -471,7 +471,7 @@ namespace VectorPrebundle
 variable [βˆ€ x, TopologicalSpace (E x)] {F E}
 
 #print VectorPrebundle.IsSmooth /-
-/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (e e' «expr ∈ » a.pretrivialization_atlas) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:642:2: warning: expanding binder collection (e e' «expr ∈ » a.pretrivialization_atlas) -/
 /-- Mixin for a `vector_prebundle` stating smoothness of coordinate changes. -/
 class IsSmooth (a : VectorPrebundle π•œ F E) : Prop where
   exists_smooth_coord_change :
Diff
@@ -226,7 +226,7 @@ theorem contMDiff_proj : ContMDiff (IB.Prod π“˜(π•œ, F)) IB n (Ο€ F E) :=
   simp_rw [(· ∘ ·), FiberBundle.extChartAt]
   apply cont_diff_within_at_fst.congr
   · rintro ⟨a, b⟩ hab
-    simp only [mfld_simps] at hab 
+    simp only [mfld_simps] at hab
     have : ((chart_at HB x.1).symm (IB.symm a), b) ∈ (trivialization_at F E x.proj).target := by
       simp only [hab, mfld_simps]
     simp only [Trivialization.proj_symm_apply _ this, hab, mfld_simps]
@@ -364,7 +364,7 @@ instance : SmoothManifoldWithCorners (IB.Prod π“˜(π•œ, F)) (TotalSpace F E) :=
   by
   refine' { StructureGroupoid.HasGroupoid.comp (smoothFiberwiseLinear B F IB) _ with }
   intro e he
-  rw [mem_smoothFiberwiseLinear_iff] at he 
+  rw [mem_smoothFiberwiseLinear_iff] at he
   obtain βŸ¨Ο†, U, hU, hΟ†, h2Ο†, heΟ†βŸ© := he
   rw [isLocalStructomorphOn_contDiffGroupoid_iff]
   refine' ⟨ContMDiffOn.congr _ heΟ†.eq_on, ContMDiffOn.congr _ heΟ†.symm'.eq_on⟩
Diff
@@ -383,7 +383,7 @@ namespace VectorBundleCore
 variable {ΞΉ : Type _} {F} (Z : VectorBundleCore π•œ B F ΞΉ)
 
 #print VectorBundleCore.IsSmooth /-
-/- ./././Mathport/Syntax/Translate/Command.lean:404:30: infer kinds are unsupported in Lean 4: #[`smoothOn_coordChangeL] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:400:30: infer kinds are unsupported in Lean 4: #[`smoothOn_coordChangeL] [] -/
 /-- Mixin for a `vector_bundle_core` stating smoothness (of transition functions). -/
 class IsSmooth (IB : ModelWithCorners π•œ EB HB) : Prop where
   smoothOn_coordChangeL :
Diff
@@ -351,7 +351,7 @@ instance : HasGroupoid (TotalSpace F E) (smoothFiberwiseLinear B F IB)
       Β· infer_instance
       Β· infer_instance
     Β·
-      simp only [e.symm_trans_source_eq e', FiberwiseLinear.localHomeomorph, trans_to_local_equiv,
+      simp only [e.symm_trans_source_eq e', FiberwiseLinear.partialHomeomorph, trans_to_local_equiv,
         symm_to_local_equiv]
     · rintro ⟨b, v⟩ hb
       have hb' : b ∈ e.base_set ∩ e'.base_set := by
Diff
@@ -383,7 +383,7 @@ namespace VectorBundleCore
 variable {ΞΉ : Type _} {F} (Z : VectorBundleCore π•œ B F ΞΉ)
 
 #print VectorBundleCore.IsSmooth /-
-/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`smoothOn_coordChangeL] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:404:30: infer kinds are unsupported in Lean 4: #[`smoothOn_coordChangeL] [] -/
 /-- Mixin for a `vector_bundle_core` stating smoothness (of transition functions). -/
 class IsSmooth (IB : ModelWithCorners π•œ EB HB) : Prop where
   smoothOn_coordChangeL :
Diff
@@ -148,11 +148,11 @@ variable [TopologicalSpace B] [ChartedSpace HB B] [FiberBundle F E]
 #print FiberBundle.extChartAt /-
 protected theorem FiberBundle.extChartAt (x : TotalSpace F E) :
     extChartAt (IB.Prod π“˜(π•œ, F)) x =
-      (trivializationAt F E x.proj).toLocalEquiv ≫
-        (extChartAt IB x.proj).Prod (LocalEquiv.refl F) :=
+      (trivializationAt F E x.proj).toPartialEquiv ≫
+        (extChartAt IB x.proj).Prod (PartialEquiv.refl F) :=
   by
   simp_rw [extChartAt, FiberBundle.chartedSpace_chartAt, extend]
-  simp only [LocalEquiv.trans_assoc, mfld_simps]
+  simp only [PartialEquiv.trans_assoc, mfld_simps]
 #align fiber_bundle.ext_chart_at FiberBundle.extChartAt
 -/
 
@@ -177,9 +177,9 @@ theorem contMDiffWithinAt_totalSpace (f : M β†’ TotalSpace F E) {s : Set M} {x
   simp (config := { singlePass := true }) only [contMDiffWithinAt_iff_target]
   rw [and_and_and_comm, ← continuous_within_at_total_space, and_congr_right_iff]
   intro hf
-  simp_rw [modelWithCornersSelf_prod, FiberBundle.extChartAt, Function.comp, LocalEquiv.trans_apply,
-    LocalEquiv.prod_coe, LocalEquiv.refl_coe, extChartAt_self_apply, modelWithCornersSelf_coe,
-    id_def]
+  simp_rw [modelWithCornersSelf_prod, FiberBundle.extChartAt, Function.comp,
+    PartialEquiv.trans_apply, PartialEquiv.prod_coe, PartialEquiv.refl_coe, extChartAt_self_apply,
+    modelWithCornersSelf_coe, id_def]
   refine' (contMDiffWithinAt_prod_iff _).trans _
   -- rw doesn't do this?
   have h1 : (fun x => (f x).proj) ⁻¹' (trivialization_at F E (f xβ‚€).proj).baseSet ∈ 𝓝[s] xβ‚€ :=
Diff
@@ -64,7 +64,7 @@ fields, they can also be C^k vector bundles, etc.
 
 assert_not_exists mfderiv
 
-open Bundle Set LocalHomeomorph
+open Bundle Set PartialHomeomorph
 
 open Function (id_def)
 
@@ -87,8 +87,8 @@ variable [TopologicalSpace F] [TopologicalSpace (TotalSpace F E)] [βˆ€ x, Topolo
 `B Γ— F`. -/
 instance FiberBundle.chartedSpace' : ChartedSpace (B Γ— F) (TotalSpace F E)
     where
-  atlas := (fun e : Trivialization F (Ο€ F E) => e.toLocalHomeomorph) '' trivializationAtlas F E
-  chartAt x := (trivializationAt F E x.proj).toLocalHomeomorph
+  atlas := (fun e : Trivialization F (Ο€ F E) => e.toPartialHomeomorph) '' trivializationAtlas F E
+  chartAt x := (trivializationAt F E x.proj).toPartialHomeomorph
   mem_chart_source x :=
     (trivializationAt F E x.proj).mem_source.mpr (mem_baseSet_trivializationAt F E x.proj)
   chart_mem_atlas x := mem_image_of_mem _ (trivialization_mem_atlas F E _)
@@ -112,8 +112,8 @@ end
 #print FiberBundle.chartedSpace_chartAt /-
 theorem FiberBundle.chartedSpace_chartAt (x : TotalSpace F E) :
     chartAt (ModelProd HB F) x =
-      (trivializationAt F E x.proj).toLocalHomeomorph ≫ₕ
-        (chartAt HB x.proj).Prod (LocalHomeomorph.refl F) :=
+      (trivializationAt F E x.proj).toPartialHomeomorph ≫ₕ
+        (chartAt HB x.proj).Prod (PartialHomeomorph.refl F) :=
   by
   dsimp only [FiberBundle.chartedSpace, ChartedSpace.comp, FiberBundle.chartedSpace',
     prodChartedSpace, chartedSpaceSelf]
@@ -188,7 +188,7 @@ theorem contMDiffWithinAt_totalSpace (f : M β†’ TotalSpace F E) {s : Set M} {x
   refine'
     and_congr (eventually_eq.cont_mdiff_within_at_iff (eventually_of_mem h1 fun x hx => _) _)
       Iff.rfl
-  Β· simp_rw [Function.comp, LocalHomeomorph.coe_coe, Trivialization.coe_coe]
+  Β· simp_rw [Function.comp, PartialHomeomorph.coe_coe, Trivialization.coe_coe]
     rw [Trivialization.coe_fst']
     exact hx
   Β· simp only [mfld_simps]
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2022 Floris van Doorn, Heather Macbeth. 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.FiberwiseLinear
-import Mathbin.Topology.VectorBundle.Constructions
+import Geometry.Manifold.VectorBundle.FiberwiseLinear
+import Topology.VectorBundle.Constructions
 
 #align_import geometry.manifold.vector_bundle.basic from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
 
@@ -383,7 +383,7 @@ namespace VectorBundleCore
 variable {ΞΉ : Type _} {F} (Z : VectorBundleCore π•œ B F ΞΉ)
 
 #print VectorBundleCore.IsSmooth /-
-/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`smoothOn_coordChangeL] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`smoothOn_coordChangeL] [] -/
 /-- Mixin for a `vector_bundle_core` stating smoothness (of transition functions). -/
 class IsSmooth (IB : ModelWithCorners π•œ EB HB) : Prop where
   smoothOn_coordChangeL :
@@ -471,7 +471,7 @@ namespace VectorPrebundle
 variable [βˆ€ x, TopologicalSpace (E x)] {F E}
 
 #print VectorPrebundle.IsSmooth /-
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (e e' «expr ∈ » a.pretrivialization_atlas) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (e e' «expr ∈ » a.pretrivialization_atlas) -/
 /-- Mixin for a `vector_prebundle` stating smoothness of coordinate changes. -/
 class IsSmooth (a : VectorPrebundle π•œ F E) : Prop where
   exists_smooth_coord_change :
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2022 Floris van Doorn, Heather Macbeth. 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.basic
-! 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.FiberwiseLinear
 import Mathbin.Topology.VectorBundle.Constructions
 
+#align_import geometry.manifold.vector_bundle.basic from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
+
 /-! # Smooth vector bundles
 
 > THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
@@ -474,7 +471,7 @@ namespace VectorPrebundle
 variable [βˆ€ x, TopologicalSpace (E x)] {F E}
 
 #print VectorPrebundle.IsSmooth /-
-/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (e e' «expr ∈ » a.pretrivialization_atlas) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (e e' «expr ∈ » a.pretrivialization_atlas) -/
 /-- Mixin for a `vector_prebundle` stating smoothness of coordinate changes. -/
 class IsSmooth (a : VectorPrebundle π•œ F E) : Prop where
   exists_smooth_coord_change :
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.basic
-! 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.
 -/
@@ -82,15 +82,15 @@ variable {π•œ B B' F M : Type _} {E : B β†’ Type _}
 
 section
 
-variable [TopologicalSpace F] [TopologicalSpace (TotalSpace E)] [βˆ€ x, TopologicalSpace (E x)]
+variable [TopologicalSpace F] [TopologicalSpace (TotalSpace F E)] [βˆ€ x, TopologicalSpace (E x)]
   {HB : Type _} [TopologicalSpace HB] [TopologicalSpace B] [ChartedSpace HB B] [FiberBundle F E]
 
 #print FiberBundle.chartedSpace' /-
 /-- A fiber bundle `E` over a base `B` with model fiber `F` is naturally a charted space modelled on
 `B Γ— F`. -/
-instance FiberBundle.chartedSpace' : ChartedSpace (B Γ— F) (TotalSpace E)
+instance FiberBundle.chartedSpace' : ChartedSpace (B Γ— F) (TotalSpace F E)
     where
-  atlas := (fun e : Trivialization F (Ο€ E) => e.toLocalHomeomorph) '' trivializationAtlas F E
+  atlas := (fun e : Trivialization F (Ο€ F E) => e.toLocalHomeomorph) '' trivializationAtlas F E
   chartAt x := (trivializationAt F E x.proj).toLocalHomeomorph
   mem_chart_source x :=
     (trivializationAt F E x.proj).mem_source.mpr (mem_baseSet_trivializationAt F E x.proj)
@@ -105,7 +105,7 @@ attribute [local reducible] ModelProd
 #print FiberBundle.chartedSpace /-
 /-- Let `B` be a charted space modelled on `HB`.  Then a fiber bundle `E` over a base `B` with model
 fiber `F` is naturally a charted space modelled on `HB.prod F`. -/
-instance FiberBundle.chartedSpace : ChartedSpace (ModelProd HB F) (TotalSpace E) :=
+instance FiberBundle.chartedSpace : ChartedSpace (ModelProd HB F) (TotalSpace F E) :=
   ChartedSpace.comp _ (ModelProd B F) _
 #align fiber_bundle.charted_space' FiberBundle.chartedSpace
 -/
@@ -113,7 +113,7 @@ instance FiberBundle.chartedSpace : ChartedSpace (ModelProd HB F) (TotalSpace E)
 end
 
 #print FiberBundle.chartedSpace_chartAt /-
-theorem FiberBundle.chartedSpace_chartAt (x : TotalSpace E) :
+theorem FiberBundle.chartedSpace_chartAt (x : TotalSpace F E) :
     chartAt (ModelProd HB F) x =
       (trivializationAt F E x.proj).toLocalHomeomorph ≫ₕ
         (chartAt HB x.proj).Prod (LocalHomeomorph.refl F) :=
@@ -125,7 +125,7 @@ theorem FiberBundle.chartedSpace_chartAt (x : TotalSpace E) :
 -/
 
 #print FiberBundle.chartedSpace_chartAt_symm_fst /-
-theorem FiberBundle.chartedSpace_chartAt_symm_fst (x : TotalSpace E) (y : ModelProd HB F)
+theorem FiberBundle.chartedSpace_chartAt_symm_fst (x : TotalSpace F E) (y : ModelProd HB F)
     (hy : y ∈ (chartAt (ModelProd HB F) x).target) :
     ((chartAt (ModelProd HB F) x).symm y).proj = (chartAt HB x.proj).symm y.1 :=
   by
@@ -139,7 +139,7 @@ end
 section
 
 variable [NontriviallyNormedField π•œ] [NormedAddCommGroup F] [NormedSpace π•œ F]
-  [TopologicalSpace (TotalSpace E)] [βˆ€ x, TopologicalSpace (E x)] {EB : Type _}
+  [TopologicalSpace (TotalSpace F E)] [βˆ€ x, TopologicalSpace (E x)] {EB : Type _}
   [NormedAddCommGroup EB] [NormedSpace π•œ EB] {HB : Type _} [TopologicalSpace HB]
   (IB : ModelWithCorners π•œ EB HB) (E' : B β†’ Type _) [βˆ€ x, Zero (E' x)] {EM : Type _}
   [NormedAddCommGroup EM] [NormedSpace π•œ EM] {HM : Type _} [TopologicalSpace HM]
@@ -149,7 +149,7 @@ variable [NontriviallyNormedField π•œ] [NormedAddCommGroup F] [NormedSpace π•œ
 variable [TopologicalSpace B] [ChartedSpace HB B] [FiberBundle F E]
 
 #print FiberBundle.extChartAt /-
-protected theorem FiberBundle.extChartAt (x : TotalSpace E) :
+protected theorem FiberBundle.extChartAt (x : TotalSpace F E) :
     extChartAt (IB.Prod π“˜(π•œ, F)) x =
       (trivializationAt F E x.proj).toLocalEquiv ≫
         (extChartAt IB x.proj).Prod (LocalEquiv.refl F) :=
@@ -172,7 +172,7 @@ variable {F E IB}
 
 #print Bundle.contMDiffWithinAt_totalSpace /-
 /-- Characterization of C^n functions into a smooth vector bundle. -/
-theorem contMDiffWithinAt_totalSpace (f : M β†’ TotalSpace E) {s : Set M} {xβ‚€ : M} :
+theorem contMDiffWithinAt_totalSpace (f : M β†’ TotalSpace F E) {s : Set M} {xβ‚€ : M} :
     ContMDiffWithinAt IM (IB.Prod π“˜(π•œ, F)) n f s xβ‚€ ↔
       ContMDiffWithinAt IM IB n (fun x => (f x).proj) s xβ‚€ ∧
         ContMDiffWithinAt IM π“˜(π•œ, F) n (fun x => (trivializationAt F E (f xβ‚€).proj (f x)).2) s xβ‚€ :=
@@ -200,7 +200,7 @@ theorem contMDiffWithinAt_totalSpace (f : M β†’ TotalSpace E) {s : Set M} {xβ‚€
 
 #print Bundle.contMDiffAt_totalSpace /-
 /-- Characterization of C^n functions into a smooth vector bundle. -/
-theorem contMDiffAt_totalSpace (f : M β†’ TotalSpace E) (xβ‚€ : M) :
+theorem contMDiffAt_totalSpace (f : M β†’ TotalSpace F E) (xβ‚€ : M) :
     ContMDiffAt IM (IB.Prod π“˜(π•œ, F)) n f xβ‚€ ↔
       ContMDiffAt IM IB n (fun x => (f x).proj) xβ‚€ ∧
         ContMDiffAt IM π“˜(π•œ, F) n (fun x => (trivializationAt F E (f xβ‚€).proj (f x)).2) xβ‚€ :=
@@ -211,8 +211,9 @@ theorem contMDiffAt_totalSpace (f : M β†’ TotalSpace E) (xβ‚€ : M) :
 #print Bundle.contMDiffAt_section /-
 /-- Characterization of C^n sections of a smooth vector bundle. -/
 theorem contMDiffAt_section (s : βˆ€ x, E x) (xβ‚€ : B) :
-    ContMDiffAt IB (IB.Prod π“˜(π•œ, F)) n (fun x => totalSpaceMk x (s x)) xβ‚€ ↔
-      ContMDiffAt IB π“˜(π•œ, F) n (fun x => (trivializationAt F E xβ‚€ (totalSpaceMk x (s x))).2) xβ‚€ :=
+    ContMDiffAt IB (IB.Prod π“˜(π•œ, F)) n (fun x => (total_space.mk' F) x (s x)) xβ‚€ ↔
+      ContMDiffAt IB π“˜(π•œ, F) n (fun x => (trivializationAt F E xβ‚€ ((total_space.mk' F) x (s x))).2)
+        xβ‚€ :=
   by simp_rw [cont_mdiff_at_total_space, and_iff_right_iff_imp]; intro x; exact contMDiffAt_id
 #align bundle.cont_mdiff_at_section Bundle.contMDiffAt_section
 -/
@@ -220,7 +221,7 @@ theorem contMDiffAt_section (s : βˆ€ x, E x) (xβ‚€ : B) :
 variable (E)
 
 #print Bundle.contMDiff_proj /-
-theorem contMDiff_proj : ContMDiff (IB.Prod π“˜(π•œ, F)) IB n (Ο€ E) :=
+theorem contMDiff_proj : ContMDiff (IB.Prod π“˜(π•œ, F)) IB n (Ο€ F E) :=
   by
   intro x
   rw [ContMDiffAt, contMDiffWithinAt_iff']
@@ -229,7 +230,7 @@ theorem contMDiff_proj : ContMDiff (IB.Prod π“˜(π•œ, F)) IB n (Ο€ E) :=
   apply cont_diff_within_at_fst.congr
   · rintro ⟨a, b⟩ hab
     simp only [mfld_simps] at hab 
-    have : ((chart_at HB x.1).symm (IB.symm a), b) ∈ (trivialization_at F E x.fst).target := by
+    have : ((chart_at HB x.1).symm (IB.symm a), b) ∈ (trivialization_at F E x.proj).target := by
       simp only [hab, mfld_simps]
     simp only [Trivialization.proj_symm_apply _ this, hab, mfld_simps]
   Β· simp only [mfld_simps]
@@ -237,45 +238,46 @@ theorem contMDiff_proj : ContMDiff (IB.Prod π“˜(π•œ, F)) IB n (Ο€ E) :=
 -/
 
 #print Bundle.smooth_proj /-
-theorem smooth_proj : Smooth (IB.Prod π“˜(π•œ, F)) IB (Ο€ E) :=
+theorem smooth_proj : Smooth (IB.Prod π“˜(π•œ, F)) IB (Ο€ F E) :=
   contMDiff_proj E
 #align bundle.smooth_proj Bundle.smooth_proj
 -/
 
 #print Bundle.contMDiffOn_proj /-
-theorem contMDiffOn_proj {s : Set (TotalSpace E)} : ContMDiffOn (IB.Prod π“˜(π•œ, F)) IB n (Ο€ E) s :=
+theorem contMDiffOn_proj {s : Set (TotalSpace F E)} :
+    ContMDiffOn (IB.Prod π“˜(π•œ, F)) IB n (Ο€ F E) s :=
   (Bundle.contMDiff_proj E).ContMDiffOn
 #align bundle.cont_mdiff_on_proj Bundle.contMDiffOn_proj
 -/
 
 #print Bundle.smoothOn_proj /-
-theorem smoothOn_proj {s : Set (TotalSpace E)} : SmoothOn (IB.Prod π“˜(π•œ, F)) IB (Ο€ E) s :=
+theorem smoothOn_proj {s : Set (TotalSpace F E)} : SmoothOn (IB.Prod π“˜(π•œ, F)) IB (Ο€ F E) s :=
   contMDiffOn_proj E
 #align bundle.smooth_on_proj Bundle.smoothOn_proj
 -/
 
 #print Bundle.contMDiffAt_proj /-
-theorem contMDiffAt_proj {p : TotalSpace E} : ContMDiffAt (IB.Prod π“˜(π•œ, F)) IB n (Ο€ E) p :=
+theorem contMDiffAt_proj {p : TotalSpace F E} : ContMDiffAt (IB.Prod π“˜(π•œ, F)) IB n (Ο€ F E) p :=
   (Bundle.contMDiff_proj E).ContMDiffAt
 #align bundle.cont_mdiff_at_proj Bundle.contMDiffAt_proj
 -/
 
 #print Bundle.smoothAt_proj /-
-theorem smoothAt_proj {p : TotalSpace E} : SmoothAt (IB.Prod π“˜(π•œ, F)) IB (Ο€ E) p :=
+theorem smoothAt_proj {p : TotalSpace F E} : SmoothAt (IB.Prod π“˜(π•œ, F)) IB (Ο€ F E) p :=
   Bundle.contMDiffAt_proj E
 #align bundle.smooth_at_proj Bundle.smoothAt_proj
 -/
 
 #print Bundle.contMDiffWithinAt_proj /-
-theorem contMDiffWithinAt_proj {s : Set (TotalSpace E)} {p : TotalSpace E} :
-    ContMDiffWithinAt (IB.Prod π“˜(π•œ, F)) IB n (Ο€ E) s p :=
+theorem contMDiffWithinAt_proj {s : Set (TotalSpace F E)} {p : TotalSpace F E} :
+    ContMDiffWithinAt (IB.Prod π“˜(π•œ, F)) IB n (Ο€ F E) s p :=
   (Bundle.contMDiffAt_proj E).ContMDiffWithinAt
 #align bundle.cont_mdiff_within_at_proj Bundle.contMDiffWithinAt_proj
 -/
 
 #print Bundle.smoothWithinAt_proj /-
-theorem smoothWithinAt_proj {s : Set (TotalSpace E)} {p : TotalSpace E} :
-    SmoothWithinAt (IB.Prod π“˜(π•œ, F)) IB (Ο€ E) s p :=
+theorem smoothWithinAt_proj {s : Set (TotalSpace F E)} {p : TotalSpace F E} :
+    SmoothWithinAt (IB.Prod π“˜(π•œ, F)) IB (Ο€ F E) s p :=
   Bundle.contMDiffWithinAt_proj E
 #align bundle.smooth_within_at_proj Bundle.smoothWithinAt_proj
 -/
@@ -283,7 +285,7 @@ theorem smoothWithinAt_proj {s : Set (TotalSpace E)} {p : TotalSpace E} :
 variable (π•œ E) [βˆ€ x, AddCommMonoid (E x)] [βˆ€ x, Module π•œ (E x)] [VectorBundle π•œ F E]
 
 #print Bundle.smooth_zeroSection /-
-theorem smooth_zeroSection : Smooth IB (IB.Prod π“˜(π•œ, F)) (zeroSection E) :=
+theorem smooth_zeroSection : Smooth IB (IB.Prod π“˜(π•œ, F)) (zeroSection F E) :=
   by
   intro x
   rw [Bundle.contMDiffAt_totalSpace]
@@ -313,7 +315,7 @@ variable [NontriviallyNormedField π•œ] {EB : Type _} [NormedAddCommGroup EB] [N
 
 section WithTopology
 
-variable [TopologicalSpace (TotalSpace E)] [βˆ€ x, TopologicalSpace (E x)]
+variable [TopologicalSpace (TotalSpace F E)] [βˆ€ x, TopologicalSpace (E x)]
 
 variable (F E) [FiberBundle F E] [VectorBundle π•œ F E]
 
@@ -324,7 +326,7 @@ registers that the bundle is smooth, in the sense of having smooth transition fu
 This is a mixin, not carrying any new data`. -/
 class SmoothVectorBundle : Prop where
   smoothOn_coordChangeL :
-    βˆ€ (e e' : Trivialization F (Ο€ E)) [MemTrivializationAtlas e] [MemTrivializationAtlas e'],
+    βˆ€ (e e' : Trivialization F (Ο€ F E)) [MemTrivializationAtlas e] [MemTrivializationAtlas e'],
       SmoothOn IB π“˜(π•œ, F β†’L[π•œ] F) (fun b : B => (e.coordChangeL π•œ e' b : F β†’L[π•œ] F))
         (e.baseSet ∩ e'.baseSet)
 #align smooth_vector_bundle SmoothVectorBundle
@@ -337,7 +339,7 @@ variable [SmoothVectorBundle F E IB]
 /-- For a smooth vector bundle `E` over `B` with fiber modelled on `F`, the change-of-co-ordinates
 between two trivializations `e`, `e'` for `E`, considered as charts to `B Γ— F`, is smooth and
 fiberwise linear. -/
-instance : HasGroupoid (TotalSpace E) (smoothFiberwiseLinear B F IB)
+instance : HasGroupoid (TotalSpace F E) (smoothFiberwiseLinear B F IB)
     where compatible := by
     rintro _ _ ⟨e, he, rfl⟩ ⟨e', he', rfl⟩
     haveI : MemTrivializationAtlas e := ⟨he⟩
@@ -361,7 +363,7 @@ instance : HasGroupoid (TotalSpace E) (smoothFiberwiseLinear B F IB)
       exact e.apply_symm_apply_eq_coord_changeL e' hb' v
 
 /-- A smooth vector bundle `E` is naturally a smooth manifold. -/
-instance : SmoothManifoldWithCorners (IB.Prod π“˜(π•œ, F)) (TotalSpace E) :=
+instance : SmoothManifoldWithCorners (IB.Prod π“˜(π•œ, F)) (TotalSpace F E) :=
   by
   refine' { StructureGroupoid.HasGroupoid.comp (smoothFiberwiseLinear B F IB) _ with }
   intro e he
@@ -432,10 +434,10 @@ instance Bundle.Trivial.smoothVectorBundle : SmoothVectorBundle F (Bundle.Trivia
 section Prod
 
 variable (F₁ : Type _) [NormedAddCommGroup F₁] [NormedSpace π•œ F₁] (E₁ : B β†’ Type _)
-  [TopologicalSpace (TotalSpace E₁)] [βˆ€ x, AddCommMonoid (E₁ x)] [βˆ€ x, Module π•œ (E₁ x)]
+  [TopologicalSpace (TotalSpace F₁ E₁)] [βˆ€ x, AddCommMonoid (E₁ x)] [βˆ€ x, Module π•œ (E₁ x)]
 
 variable (Fβ‚‚ : Type _) [NormedAddCommGroup Fβ‚‚] [NormedSpace π•œ Fβ‚‚] (Eβ‚‚ : B β†’ Type _)
-  [TopologicalSpace (TotalSpace Eβ‚‚)] [βˆ€ x, AddCommMonoid (Eβ‚‚ x)] [βˆ€ x, Module π•œ (Eβ‚‚ x)]
+  [TopologicalSpace (TotalSpace Fβ‚‚ Eβ‚‚)] [βˆ€ x, AddCommMonoid (Eβ‚‚ x)] [βˆ€ x, Module π•œ (Eβ‚‚ x)]
 
 variable [βˆ€ x : B, TopologicalSpace (E₁ x)] [βˆ€ x : B, TopologicalSpace (Eβ‚‚ x)] [FiberBundle F₁ E₁]
   [FiberBundle Fβ‚‚ Eβ‚‚] [VectorBundle π•œ F₁ E₁] [VectorBundle π•œ Fβ‚‚ Eβ‚‚] [SmoothVectorBundle F₁ E₁ IB]
@@ -479,12 +481,11 @@ class IsSmooth (a : VectorPrebundle π•œ F E) : Prop where
     βˆ€ (e) (_ : e ∈ a.pretrivializationAtlas) (e') (_ : e' ∈ a.pretrivializationAtlas),
       βˆƒ f : B β†’ F β†’L[π•œ] F,
         SmoothOn IB π“˜(π•œ, F β†’L[π•œ] F) f (e.baseSet ∩ e'.baseSet) ∧
-          βˆ€ (b : B) (hb : b ∈ e.baseSet ∩ e'.baseSet) (v : F),
-            f b v = (e' (totalSpaceMk b (e.symm b v))).2
+          βˆ€ (b : B) (hb : b ∈ e.baseSet ∩ e'.baseSet) (v : F), f b v = (e' ⟨b, e.symm b v⟩).2
 #align vector_prebundle.is_smooth VectorPrebundle.IsSmooth
 -/
 
-variable (a : VectorPrebundle π•œ F E) [ha : a.IsSmooth IB] {e e' : Pretrivialization F (Ο€ E)}
+variable (a : VectorPrebundle π•œ F E) [ha : a.IsSmooth IB] {e e' : Pretrivialization F (Ο€ F E)}
 
 #print VectorPrebundle.smoothCoordChange /-
 /-- A randomly chosen coordinate change on a `smooth_vector_prebundle`, given by
@@ -509,7 +510,7 @@ theorem smoothOn_smoothCoordChange (he : e ∈ a.pretrivializationAtlas)
 #print VectorPrebundle.smoothCoordChange_apply /-
 theorem smoothCoordChange_apply (he : e ∈ a.pretrivializationAtlas)
     (he' : e' ∈ a.pretrivializationAtlas) {b : B} (hb : b ∈ e.baseSet ∩ e'.baseSet) (v : F) :
-    a.smoothCoordChange IB he he' b v = (e' (totalSpaceMk b (e.symm b v))).2 :=
+    a.smoothCoordChange IB he he' b v = (e' ⟨b, e.symm b v⟩).2 :=
   (Classical.choose_spec (ha.exists_smooth_coord_change e he e' he')).2 b hb v
 #align vector_prebundle.smooth_coord_change_apply VectorPrebundle.smoothCoordChange_apply
 -/
@@ -517,7 +518,7 @@ theorem smoothCoordChange_apply (he : e ∈ a.pretrivializationAtlas)
 #print VectorPrebundle.mk_smoothCoordChange /-
 theorem mk_smoothCoordChange (he : e ∈ a.pretrivializationAtlas)
     (he' : e' ∈ a.pretrivializationAtlas) {b : B} (hb : b ∈ e.baseSet ∩ e'.baseSet) (v : F) :
-    (b, a.smoothCoordChange IB he he' b v) = e' (totalSpaceMk b (e.symm b v)) :=
+    (b, a.smoothCoordChange IB he he' b v) = e' ⟨b, e.symm b v⟩ :=
   by
   ext
   Β· rw [e.mk_symm hb.1 v, e'.coe_fst', e.proj_symm_apply' hb.1]
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.basic
-! leanprover-community/mathlib commit f9ec187127cc5b381dfcf5f4a22dacca4c20b63d
+! leanprover-community/mathlib commit 30faa0c3618ce1472bf6305ae0e3fa56affa3f95
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -13,6 +13,9 @@ import Mathbin.Topology.VectorBundle.Constructions
 
 /-! # Smooth vector bundles
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 This file defines smooth vector bundles over a smooth manifold.
 
 Let `E` be a topological vector bundle, with model fiber `F` and base space `B`.  We consider `E` as
Diff
@@ -320,14 +320,14 @@ topological vector bundle over `B` with fibers isomorphic to `F`, then `smooth_v
 registers that the bundle is smooth, in the sense of having smooth transition functions.
 This is a mixin, not carrying any new data`. -/
 class SmoothVectorBundle : Prop where
-  smoothOn_coord_change :
+  smoothOn_coordChangeL :
     βˆ€ (e e' : Trivialization F (Ο€ E)) [MemTrivializationAtlas e] [MemTrivializationAtlas e'],
       SmoothOn IB π“˜(π•œ, F β†’L[π•œ] F) (fun b : B => (e.coordChangeL π•œ e' b : F β†’L[π•œ] F))
         (e.baseSet ∩ e'.baseSet)
 #align smooth_vector_bundle SmoothVectorBundle
 -/
 
-export SmoothVectorBundle (smoothOn_coord_change)
+export SmoothVectorBundle (smoothOn_coordChangeL)
 
 variable [SmoothVectorBundle F E IB]
 
@@ -381,10 +381,10 @@ namespace VectorBundleCore
 variable {ΞΉ : Type _} {F} (Z : VectorBundleCore π•œ B F ΞΉ)
 
 #print VectorBundleCore.IsSmooth /-
-/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`smoothOn_coord_change] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`smoothOn_coordChangeL] [] -/
 /-- Mixin for a `vector_bundle_core` stating smoothness (of transition functions). -/
 class IsSmooth (IB : ModelWithCorners π•œ EB HB) : Prop where
-  smoothOn_coord_change :
+  smoothOn_coordChangeL :
     βˆ€ i j, SmoothOn IB π“˜(π•œ, F β†’L[π•œ] F) (Z.coordChange i j) (Z.baseSet i ∩ Z.baseSet j)
 #align vector_bundle_core.is_smooth VectorBundleCore.IsSmooth
 -/
@@ -398,7 +398,7 @@ variable [Z.IsSmooth IB]
 /-- If a `vector_bundle_core` has the `is_smooth` mixin, then the vector bundle constructed from it
 is a smooth vector bundle. -/
 instance smoothVectorBundle : SmoothVectorBundle F Z.Fiber IB
-    where smoothOn_coord_change := by
+    where smoothOn_coordChangeL := by
     rintro - - ⟨i, rfl⟩ ⟨i', rfl⟩
     refine' (Z.smooth_on_coord_change IB i i').congr fun b hb => _
     ext v
@@ -414,7 +414,7 @@ end VectorBundleCore
 #print Bundle.Trivial.smoothVectorBundle /-
 /-- A trivial vector bundle over a smooth manifold is a smooth vector bundle. -/
 instance Bundle.Trivial.smoothVectorBundle : SmoothVectorBundle F (Bundle.Trivial B F) IB
-    where smoothOn_coord_change := by
+    where smoothOn_coordChangeL := by
     intro e e' he he'
     obtain rfl := Bundle.Trivial.eq_trivialization B F e
     obtain rfl := Bundle.Trivial.eq_trivialization B F e'
@@ -441,7 +441,7 @@ variable [βˆ€ x : B, TopologicalSpace (E₁ x)] [βˆ€ x : B, TopologicalSpace (E
 #print Bundle.Prod.smoothVectorBundle /-
 /-- The direct sum of two smooth vector bundles over the same base is a smooth vector bundle. -/
 instance Bundle.Prod.smoothVectorBundle : SmoothVectorBundle (F₁ Γ— Fβ‚‚) (E₁ ×ᡇ Eβ‚‚) IB
-    where smoothOn_coord_change :=
+    where smoothOn_coordChangeL :=
     by
     rintro _ _ ⟨e₁, eβ‚‚, i₁, iβ‚‚, rfl⟩ ⟨e₁', eβ‚‚', i₁', iβ‚‚', rfl⟩
     skip
@@ -531,7 +531,7 @@ theorem smoothVectorBundle :
     @SmoothVectorBundle _ _ F E _ _ _ _ _ _ IB _ _ _ _ _ _ _ a.totalSpaceTopology _ a.toFiberBundle
       a.toVectorBundle :=
   {
-    smoothOn_coord_change := by
+    smoothOn_coordChangeL := by
       rintro _ _ ⟨e, he, rfl⟩ ⟨e', he', rfl⟩
       refine' (a.smooth_on_smooth_coord_change he he').congr _
       intro b hb
Diff
@@ -82,39 +82,46 @@ section
 variable [TopologicalSpace F] [TopologicalSpace (TotalSpace E)] [βˆ€ x, TopologicalSpace (E x)]
   {HB : Type _} [TopologicalSpace HB] [TopologicalSpace B] [ChartedSpace HB B] [FiberBundle F E]
 
+#print FiberBundle.chartedSpace' /-
 /-- A fiber bundle `E` over a base `B` with model fiber `F` is naturally a charted space modelled on
 `B Γ— F`. -/
-instance FiberBundle.chartedSpace : ChartedSpace (B Γ— F) (TotalSpace E)
+instance FiberBundle.chartedSpace' : ChartedSpace (B Γ— F) (TotalSpace E)
     where
   atlas := (fun e : Trivialization F (Ο€ E) => e.toLocalHomeomorph) '' trivializationAtlas F E
   chartAt x := (trivializationAt F E x.proj).toLocalHomeomorph
   mem_chart_source x :=
     (trivializationAt F E x.proj).mem_source.mpr (mem_baseSet_trivializationAt F E x.proj)
   chart_mem_atlas x := mem_image_of_mem _ (trivialization_mem_atlas F E _)
-#align fiber_bundle.charted_space FiberBundle.chartedSpace
+#align fiber_bundle.charted_space FiberBundle.chartedSpace'
+-/
 
 section
 
 attribute [local reducible] ModelProd
 
+#print FiberBundle.chartedSpace /-
 /-- Let `B` be a charted space modelled on `HB`.  Then a fiber bundle `E` over a base `B` with model
 fiber `F` is naturally a charted space modelled on `HB.prod F`. -/
-instance FiberBundle.chartedSpace' : ChartedSpace (ModelProd HB F) (TotalSpace E) :=
+instance FiberBundle.chartedSpace : ChartedSpace (ModelProd HB F) (TotalSpace E) :=
   ChartedSpace.comp _ (ModelProd B F) _
-#align fiber_bundle.charted_space' FiberBundle.chartedSpace'
+#align fiber_bundle.charted_space' FiberBundle.chartedSpace
+-/
 
 end
 
+#print FiberBundle.chartedSpace_chartAt /-
 theorem FiberBundle.chartedSpace_chartAt (x : TotalSpace E) :
     chartAt (ModelProd HB F) x =
       (trivializationAt F E x.proj).toLocalHomeomorph ≫ₕ
         (chartAt HB x.proj).Prod (LocalHomeomorph.refl F) :=
   by
-  dsimp only [FiberBundle.chartedSpace', ChartedSpace.comp, FiberBundle.chartedSpace,
+  dsimp only [FiberBundle.chartedSpace, ChartedSpace.comp, FiberBundle.chartedSpace',
     prodChartedSpace, chartedSpaceSelf]
   rw [Trivialization.coe_coe, Trivialization.coe_fst' _ (mem_base_set_trivialization_at F E x.proj)]
 #align fiber_bundle.charted_space_chart_at FiberBundle.chartedSpace_chartAt
+-/
 
+#print FiberBundle.chartedSpace_chartAt_symm_fst /-
 theorem FiberBundle.chartedSpace_chartAt_symm_fst (x : TotalSpace E) (y : ModelProd HB F)
     (hy : y ∈ (chartAt (ModelProd HB F) x).target) :
     ((chartAt (ModelProd HB F) x).symm y).proj = (chartAt HB x.proj).symm y.1 :=
@@ -122,6 +129,7 @@ theorem FiberBundle.chartedSpace_chartAt_symm_fst (x : TotalSpace E) (y : ModelP
   simp only [FiberBundle.chartedSpace_chartAt, mfld_simps] at hy ⊒
   exact (trivialization_at F E x.proj).proj_symm_apply hy.2
 #align fiber_bundle.charted_space_chart_at_symm_fst FiberBundle.chartedSpace_chartAt_symm_fst
+-/
 
 end
 
@@ -137,6 +145,7 @@ variable [NontriviallyNormedField π•œ] [NormedAddCommGroup F] [NormedSpace π•œ
 
 variable [TopologicalSpace B] [ChartedSpace HB B] [FiberBundle F E]
 
+#print FiberBundle.extChartAt /-
 protected theorem FiberBundle.extChartAt (x : TotalSpace E) :
     extChartAt (IB.Prod π“˜(π•œ, F)) x =
       (trivializationAt F E x.proj).toLocalEquiv ≫
@@ -145,6 +154,7 @@ protected theorem FiberBundle.extChartAt (x : TotalSpace E) :
   simp_rw [extChartAt, FiberBundle.chartedSpace_chartAt, extend]
   simp only [LocalEquiv.trans_assoc, mfld_simps]
 #align fiber_bundle.ext_chart_at FiberBundle.extChartAt
+-/
 
 /-! ### Smoothness of maps in/out fiber bundles
 
@@ -157,6 +167,7 @@ namespace Bundle
 
 variable {F E IB}
 
+#print Bundle.contMDiffWithinAt_totalSpace /-
 /-- Characterization of C^n functions into a smooth vector bundle. -/
 theorem contMDiffWithinAt_totalSpace (f : M β†’ TotalSpace E) {s : Set M} {xβ‚€ : M} :
     ContMDiffWithinAt IM (IB.Prod π“˜(π•œ, F)) n f s xβ‚€ ↔
@@ -182,7 +193,9 @@ theorem contMDiffWithinAt_totalSpace (f : M β†’ TotalSpace E) {s : Set M} {xβ‚€
     exact hx
   Β· simp only [mfld_simps]
 #align bundle.cont_mdiff_within_at_total_space Bundle.contMDiffWithinAt_totalSpace
+-/
 
+#print Bundle.contMDiffAt_totalSpace /-
 /-- Characterization of C^n functions into a smooth vector bundle. -/
 theorem contMDiffAt_totalSpace (f : M β†’ TotalSpace E) (xβ‚€ : M) :
     ContMDiffAt IM (IB.Prod π“˜(π•œ, F)) n f xβ‚€ ↔
@@ -190,16 +203,20 @@ theorem contMDiffAt_totalSpace (f : M β†’ TotalSpace E) (xβ‚€ : M) :
         ContMDiffAt IM π“˜(π•œ, F) n (fun x => (trivializationAt F E (f xβ‚€).proj (f x)).2) xβ‚€ :=
   by simp_rw [← contMDiffWithinAt_univ]; exact cont_mdiff_within_at_total_space f
 #align bundle.cont_mdiff_at_total_space Bundle.contMDiffAt_totalSpace
+-/
 
+#print Bundle.contMDiffAt_section /-
 /-- Characterization of C^n sections of a smooth vector bundle. -/
 theorem contMDiffAt_section (s : βˆ€ x, E x) (xβ‚€ : B) :
     ContMDiffAt IB (IB.Prod π“˜(π•œ, F)) n (fun x => totalSpaceMk x (s x)) xβ‚€ ↔
       ContMDiffAt IB π“˜(π•œ, F) n (fun x => (trivializationAt F E xβ‚€ (totalSpaceMk x (s x))).2) xβ‚€ :=
   by simp_rw [cont_mdiff_at_total_space, and_iff_right_iff_imp]; intro x; exact contMDiffAt_id
 #align bundle.cont_mdiff_at_section Bundle.contMDiffAt_section
+-/
 
 variable (E)
 
+#print Bundle.contMDiff_proj /-
 theorem contMDiff_proj : ContMDiff (IB.Prod π“˜(π•œ, F)) IB n (Ο€ E) :=
   by
   intro x
@@ -214,39 +231,55 @@ theorem contMDiff_proj : ContMDiff (IB.Prod π“˜(π•œ, F)) IB n (Ο€ E) :=
     simp only [Trivialization.proj_symm_apply _ this, hab, mfld_simps]
   Β· simp only [mfld_simps]
 #align bundle.cont_mdiff_proj Bundle.contMDiff_proj
+-/
 
+#print Bundle.smooth_proj /-
 theorem smooth_proj : Smooth (IB.Prod π“˜(π•œ, F)) IB (Ο€ E) :=
   contMDiff_proj E
 #align bundle.smooth_proj Bundle.smooth_proj
+-/
 
+#print Bundle.contMDiffOn_proj /-
 theorem contMDiffOn_proj {s : Set (TotalSpace E)} : ContMDiffOn (IB.Prod π“˜(π•œ, F)) IB n (Ο€ E) s :=
   (Bundle.contMDiff_proj E).ContMDiffOn
 #align bundle.cont_mdiff_on_proj Bundle.contMDiffOn_proj
+-/
 
+#print Bundle.smoothOn_proj /-
 theorem smoothOn_proj {s : Set (TotalSpace E)} : SmoothOn (IB.Prod π“˜(π•œ, F)) IB (Ο€ E) s :=
   contMDiffOn_proj E
 #align bundle.smooth_on_proj Bundle.smoothOn_proj
+-/
 
+#print Bundle.contMDiffAt_proj /-
 theorem contMDiffAt_proj {p : TotalSpace E} : ContMDiffAt (IB.Prod π“˜(π•œ, F)) IB n (Ο€ E) p :=
   (Bundle.contMDiff_proj E).ContMDiffAt
 #align bundle.cont_mdiff_at_proj Bundle.contMDiffAt_proj
+-/
 
+#print Bundle.smoothAt_proj /-
 theorem smoothAt_proj {p : TotalSpace E} : SmoothAt (IB.Prod π“˜(π•œ, F)) IB (Ο€ E) p :=
   Bundle.contMDiffAt_proj E
 #align bundle.smooth_at_proj Bundle.smoothAt_proj
+-/
 
+#print Bundle.contMDiffWithinAt_proj /-
 theorem contMDiffWithinAt_proj {s : Set (TotalSpace E)} {p : TotalSpace E} :
     ContMDiffWithinAt (IB.Prod π“˜(π•œ, F)) IB n (Ο€ E) s p :=
   (Bundle.contMDiffAt_proj E).ContMDiffWithinAt
 #align bundle.cont_mdiff_within_at_proj Bundle.contMDiffWithinAt_proj
+-/
 
+#print Bundle.smoothWithinAt_proj /-
 theorem smoothWithinAt_proj {s : Set (TotalSpace E)} {p : TotalSpace E} :
     SmoothWithinAt (IB.Prod π“˜(π•œ, F)) IB (Ο€ E) s p :=
   Bundle.contMDiffWithinAt_proj E
 #align bundle.smooth_within_at_proj Bundle.smoothWithinAt_proj
+-/
 
 variable (π•œ E) [βˆ€ x, AddCommMonoid (E x)] [βˆ€ x, Module π•œ (E x)] [VectorBundle π•œ F E]
 
+#print Bundle.smooth_zeroSection /-
 theorem smooth_zeroSection : Smooth IB (IB.Prod π“˜(π•œ, F)) (zeroSection E) :=
   by
   intro x
@@ -259,6 +292,7 @@ theorem smooth_zeroSection : Smooth IB (IB.Prod π“˜(π•œ, F)) (zeroSection E) :
       fun x' hx' => _
   simp_rw [zero_section_proj, (trivialization_at F E x).zeroSection π•œ hx']
 #align bundle.smooth_zero_section Bundle.smooth_zeroSection
+-/
 
 end Bundle
 
@@ -280,6 +314,7 @@ variable [TopologicalSpace (TotalSpace E)] [βˆ€ x, TopologicalSpace (E x)]
 
 variable (F E) [FiberBundle F E] [VectorBundle π•œ F E]
 
+#print SmoothVectorBundle /-
 /-- When `B` is a smooth manifold with corners with respect to a model `IB` and `E` is a
 topological vector bundle over `B` with fibers isomorphic to `F`, then `smooth_vector_bundle F E IB`
 registers that the bundle is smooth, in the sense of having smooth transition functions.
@@ -290,6 +325,7 @@ class SmoothVectorBundle : Prop where
       SmoothOn IB π“˜(π•œ, F β†’L[π•œ] F) (fun b : B => (e.coordChangeL π•œ e' b : F β†’L[π•œ] F))
         (e.baseSet ∩ e'.baseSet)
 #align smooth_vector_bundle SmoothVectorBundle
+-/
 
 export SmoothVectorBundle (smoothOn_coord_change)
 
@@ -344,18 +380,21 @@ namespace VectorBundleCore
 
 variable {ΞΉ : Type _} {F} (Z : VectorBundleCore π•œ B F ΞΉ)
 
+#print VectorBundleCore.IsSmooth /-
 /- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`smoothOn_coord_change] [] -/
 /-- Mixin for a `vector_bundle_core` stating smoothness (of transition functions). -/
 class IsSmooth (IB : ModelWithCorners π•œ EB HB) : Prop where
   smoothOn_coord_change :
     βˆ€ i j, SmoothOn IB π“˜(π•œ, F β†’L[π•œ] F) (Z.coordChange i j) (Z.baseSet i ∩ Z.baseSet j)
 #align vector_bundle_core.is_smooth VectorBundleCore.IsSmooth
+-/
 
 /- ./././Mathport/Syntax/Translate/Command.lean:240:13: unsupported: advanced export style -/
 export IsSmooth ()
 
 variable [Z.IsSmooth IB]
 
+#print VectorBundleCore.smoothVectorBundle /-
 /-- If a `vector_bundle_core` has the `is_smooth` mixin, then the vector bundle constructed from it
 is a smooth vector bundle. -/
 instance smoothVectorBundle : SmoothVectorBundle F Z.Fiber IB
@@ -365,12 +404,14 @@ instance smoothVectorBundle : SmoothVectorBundle F Z.Fiber IB
     ext v
     exact Z.local_triv_coord_change_eq i i' hb v
 #align vector_bundle_core.smooth_vector_bundle VectorBundleCore.smoothVectorBundle
+-/
 
 end VectorBundleCore
 
 /-! ### The trivial smooth vector bundle -/
 
 
+#print Bundle.Trivial.smoothVectorBundle /-
 /-- A trivial vector bundle over a smooth manifold is a smooth vector bundle. -/
 instance Bundle.Trivial.smoothVectorBundle : SmoothVectorBundle F (Bundle.Trivial B F) IB
     where smoothOn_coord_change := by
@@ -380,6 +421,7 @@ instance Bundle.Trivial.smoothVectorBundle : SmoothVectorBundle F (Bundle.Trivia
     simp_rw [Bundle.Trivial.trivialization.coordChangeL]
     exact smooth_const.smooth_on
 #align bundle.trivial.smooth_vector_bundle Bundle.Trivial.smoothVectorBundle
+-/
 
 /-! ### Direct sums of smooth vector bundles -/
 
@@ -396,6 +438,7 @@ variable [βˆ€ x : B, TopologicalSpace (E₁ x)] [βˆ€ x : B, TopologicalSpace (E
   [FiberBundle Fβ‚‚ Eβ‚‚] [VectorBundle π•œ F₁ E₁] [VectorBundle π•œ Fβ‚‚ Eβ‚‚] [SmoothVectorBundle F₁ E₁ IB]
   [SmoothVectorBundle Fβ‚‚ Eβ‚‚ IB]
 
+#print Bundle.Prod.smoothVectorBundle /-
 /-- The direct sum of two smooth vector bundles over the same base is a smooth vector bundle. -/
 instance Bundle.Prod.smoothVectorBundle : SmoothVectorBundle (F₁ Γ— Fβ‚‚) (E₁ ×ᡇ Eβ‚‚) IB
     where smoothOn_coord_change :=
@@ -412,6 +455,7 @@ instance Bundle.Prod.smoothVectorBundle : SmoothVectorBundle (F₁ Γ— Fβ‚‚) (E
       simp only [Trivialization.baseSet_prod, mfld_simps]
       mfld_set_tac
 #align bundle.prod.smooth_vector_bundle Bundle.Prod.smoothVectorBundle
+-/
 
 end Prod
 
@@ -424,6 +468,7 @@ namespace VectorPrebundle
 
 variable [βˆ€ x, TopologicalSpace (E x)] {F E}
 
+#print VectorPrebundle.IsSmooth /-
 /- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (e e' «expr ∈ » a.pretrivialization_atlas) -/
 /-- Mixin for a `vector_prebundle` stating smoothness of coordinate changes. -/
 class IsSmooth (a : VectorPrebundle π•œ F E) : Prop where
@@ -434,9 +479,11 @@ class IsSmooth (a : VectorPrebundle π•œ F E) : Prop where
           βˆ€ (b : B) (hb : b ∈ e.baseSet ∩ e'.baseSet) (v : F),
             f b v = (e' (totalSpaceMk b (e.symm b v))).2
 #align vector_prebundle.is_smooth VectorPrebundle.IsSmooth
+-/
 
 variable (a : VectorPrebundle π•œ F E) [ha : a.IsSmooth IB] {e e' : Pretrivialization F (Ο€ E)}
 
+#print VectorPrebundle.smoothCoordChange /-
 /-- A randomly chosen coordinate change on a `smooth_vector_prebundle`, given by
   the field `exists_coord_change`. Note that `a.smooth_coord_change` need not be the same as
   `a.coord_change`. -/
@@ -444,21 +491,27 @@ noncomputable def smoothCoordChange (he : e ∈ a.pretrivializationAtlas)
     (he' : e' ∈ a.pretrivializationAtlas) (b : B) : F β†’L[π•œ] F :=
   Classical.choose (ha.exists_smooth_coord_change e he e' he') b
 #align vector_prebundle.smooth_coord_change VectorPrebundle.smoothCoordChange
+-/
 
 variable {IB}
 
+#print VectorPrebundle.smoothOn_smoothCoordChange /-
 theorem smoothOn_smoothCoordChange (he : e ∈ a.pretrivializationAtlas)
     (he' : e' ∈ a.pretrivializationAtlas) :
     SmoothOn IB π“˜(π•œ, F β†’L[π•œ] F) (a.smoothCoordChange IB he he') (e.baseSet ∩ e'.baseSet) :=
   (Classical.choose_spec (ha.exists_smooth_coord_change e he e' he')).1
 #align vector_prebundle.smooth_on_smooth_coord_change VectorPrebundle.smoothOn_smoothCoordChange
+-/
 
+#print VectorPrebundle.smoothCoordChange_apply /-
 theorem smoothCoordChange_apply (he : e ∈ a.pretrivializationAtlas)
     (he' : e' ∈ a.pretrivializationAtlas) {b : B} (hb : b ∈ e.baseSet ∩ e'.baseSet) (v : F) :
     a.smoothCoordChange IB he he' b v = (e' (totalSpaceMk b (e.symm b v))).2 :=
   (Classical.choose_spec (ha.exists_smooth_coord_change e he e' he')).2 b hb v
 #align vector_prebundle.smooth_coord_change_apply VectorPrebundle.smoothCoordChange_apply
+-/
 
+#print VectorPrebundle.mk_smoothCoordChange /-
 theorem mk_smoothCoordChange (he : e ∈ a.pretrivializationAtlas)
     (he' : e' ∈ a.pretrivializationAtlas) {b : B} (hb : b ∈ e.baseSet ∩ e'.baseSet) (v : F) :
     (b, a.smoothCoordChange IB he he' b v) = e' (totalSpaceMk b (e.symm b v)) :=
@@ -468,13 +521,15 @@ theorem mk_smoothCoordChange (he : e ∈ a.pretrivializationAtlas)
     rw [e.proj_symm_apply' hb.1]; exact hb.2
   Β· exact a.smooth_coord_change_apply he he' hb v
 #align vector_prebundle.mk_smooth_coord_change VectorPrebundle.mk_smoothCoordChange
+-/
 
 variable (IB)
 
+#print VectorPrebundle.smoothVectorBundle /-
 /-- Make a `smooth_vector_bundle` from a `smooth_vector_prebundle`.  -/
 theorem smoothVectorBundle :
     @SmoothVectorBundle _ _ F E _ _ _ _ _ _ IB _ _ _ _ _ _ _ a.totalSpaceTopology _ a.toFiberBundle
-      a.to_vectorBundle :=
+      a.toVectorBundle :=
   {
     smoothOn_coord_change := by
       rintro _ _ ⟨e, he, rfl⟩ ⟨e', he', rfl⟩
@@ -485,6 +540,7 @@ theorem smoothVectorBundle :
         Trivialization.coordChangeL_apply]
       exacts [rfl, hb] }
 #align vector_prebundle.smooth_vector_bundle VectorPrebundle.smoothVectorBundle
+-/
 
 end VectorPrebundle
 
Diff
@@ -158,18 +158,18 @@ namespace Bundle
 variable {F E IB}
 
 /-- Characterization of C^n functions into a smooth vector bundle. -/
-theorem contMdiffWithinAt_totalSpace (f : M β†’ TotalSpace E) {s : Set M} {xβ‚€ : M} :
-    ContMdiffWithinAt IM (IB.Prod π“˜(π•œ, F)) n f s xβ‚€ ↔
-      ContMdiffWithinAt IM IB n (fun x => (f x).proj) s xβ‚€ ∧
-        ContMdiffWithinAt IM π“˜(π•œ, F) n (fun x => (trivializationAt F E (f xβ‚€).proj (f x)).2) s xβ‚€ :=
+theorem contMDiffWithinAt_totalSpace (f : M β†’ TotalSpace E) {s : Set M} {xβ‚€ : M} :
+    ContMDiffWithinAt IM (IB.Prod π“˜(π•œ, F)) n f s xβ‚€ ↔
+      ContMDiffWithinAt IM IB n (fun x => (f x).proj) s xβ‚€ ∧
+        ContMDiffWithinAt IM π“˜(π•œ, F) n (fun x => (trivializationAt F E (f xβ‚€).proj (f x)).2) s xβ‚€ :=
   by
-  simp (config := { singlePass := true }) only [contMdiffWithinAt_iff_target]
+  simp (config := { singlePass := true }) only [contMDiffWithinAt_iff_target]
   rw [and_and_and_comm, ← continuous_within_at_total_space, and_congr_right_iff]
   intro hf
   simp_rw [modelWithCornersSelf_prod, FiberBundle.extChartAt, Function.comp, LocalEquiv.trans_apply,
     LocalEquiv.prod_coe, LocalEquiv.refl_coe, extChartAt_self_apply, modelWithCornersSelf_coe,
     id_def]
-  refine' (contMdiffWithinAt_prod_iff _).trans _
+  refine' (contMDiffWithinAt_prod_iff _).trans _
   -- rw doesn't do this?
   have h1 : (fun x => (f x).proj) ⁻¹' (trivialization_at F E (f xβ‚€).proj).baseSet ∈ 𝓝[s] xβ‚€ :=
     ((continuous_proj F E).ContinuousWithinAt.comp hf (maps_to_image f s)).preimage_mem_nhdsWithin
@@ -181,29 +181,29 @@ theorem contMdiffWithinAt_totalSpace (f : M β†’ TotalSpace E) {s : Set M} {xβ‚€
     rw [Trivialization.coe_fst']
     exact hx
   Β· simp only [mfld_simps]
-#align bundle.cont_mdiff_within_at_total_space Bundle.contMdiffWithinAt_totalSpace
+#align bundle.cont_mdiff_within_at_total_space Bundle.contMDiffWithinAt_totalSpace
 
 /-- Characterization of C^n functions into a smooth vector bundle. -/
-theorem contMdiffAt_totalSpace (f : M β†’ TotalSpace E) (xβ‚€ : M) :
-    ContMdiffAt IM (IB.Prod π“˜(π•œ, F)) n f xβ‚€ ↔
-      ContMdiffAt IM IB n (fun x => (f x).proj) xβ‚€ ∧
-        ContMdiffAt IM π“˜(π•œ, F) n (fun x => (trivializationAt F E (f xβ‚€).proj (f x)).2) xβ‚€ :=
-  by simp_rw [← contMdiffWithinAt_univ]; exact cont_mdiff_within_at_total_space f
-#align bundle.cont_mdiff_at_total_space Bundle.contMdiffAt_totalSpace
+theorem contMDiffAt_totalSpace (f : M β†’ TotalSpace E) (xβ‚€ : M) :
+    ContMDiffAt IM (IB.Prod π“˜(π•œ, F)) n f xβ‚€ ↔
+      ContMDiffAt IM IB n (fun x => (f x).proj) xβ‚€ ∧
+        ContMDiffAt IM π“˜(π•œ, F) n (fun x => (trivializationAt F E (f xβ‚€).proj (f x)).2) xβ‚€ :=
+  by simp_rw [← contMDiffWithinAt_univ]; exact cont_mdiff_within_at_total_space f
+#align bundle.cont_mdiff_at_total_space Bundle.contMDiffAt_totalSpace
 
 /-- Characterization of C^n sections of a smooth vector bundle. -/
-theorem contMdiffAt_section (s : βˆ€ x, E x) (xβ‚€ : B) :
-    ContMdiffAt IB (IB.Prod π“˜(π•œ, F)) n (fun x => totalSpaceMk x (s x)) xβ‚€ ↔
-      ContMdiffAt IB π“˜(π•œ, F) n (fun x => (trivializationAt F E xβ‚€ (totalSpaceMk x (s x))).2) xβ‚€ :=
-  by simp_rw [cont_mdiff_at_total_space, and_iff_right_iff_imp]; intro x; exact contMdiffAt_id
-#align bundle.cont_mdiff_at_section Bundle.contMdiffAt_section
+theorem contMDiffAt_section (s : βˆ€ x, E x) (xβ‚€ : B) :
+    ContMDiffAt IB (IB.Prod π“˜(π•œ, F)) n (fun x => totalSpaceMk x (s x)) xβ‚€ ↔
+      ContMDiffAt IB π“˜(π•œ, F) n (fun x => (trivializationAt F E xβ‚€ (totalSpaceMk x (s x))).2) xβ‚€ :=
+  by simp_rw [cont_mdiff_at_total_space, and_iff_right_iff_imp]; intro x; exact contMDiffAt_id
+#align bundle.cont_mdiff_at_section Bundle.contMDiffAt_section
 
 variable (E)
 
-theorem contMdiff_proj : ContMdiff (IB.Prod π“˜(π•œ, F)) IB n (Ο€ E) :=
+theorem contMDiff_proj : ContMDiff (IB.Prod π“˜(π•œ, F)) IB n (Ο€ E) :=
   by
   intro x
-  rw [ContMdiffAt, contMdiffWithinAt_iff']
+  rw [ContMDiffAt, contMDiffWithinAt_iff']
   refine' ⟨(continuous_proj F E).ContinuousWithinAt, _⟩
   simp_rw [(· ∘ ·), FiberBundle.extChartAt]
   apply cont_diff_within_at_fst.congr
@@ -213,36 +213,36 @@ theorem contMdiff_proj : ContMdiff (IB.Prod π“˜(π•œ, F)) IB n (Ο€ E) :=
       simp only [hab, mfld_simps]
     simp only [Trivialization.proj_symm_apply _ this, hab, mfld_simps]
   Β· simp only [mfld_simps]
-#align bundle.cont_mdiff_proj Bundle.contMdiff_proj
+#align bundle.cont_mdiff_proj Bundle.contMDiff_proj
 
 theorem smooth_proj : Smooth (IB.Prod π“˜(π•œ, F)) IB (Ο€ E) :=
-  contMdiff_proj E
+  contMDiff_proj E
 #align bundle.smooth_proj Bundle.smooth_proj
 
-theorem contMdiffOn_proj {s : Set (TotalSpace E)} : ContMdiffOn (IB.Prod π“˜(π•œ, F)) IB n (Ο€ E) s :=
-  (Bundle.contMdiff_proj E).ContMdiffOn
-#align bundle.cont_mdiff_on_proj Bundle.contMdiffOn_proj
+theorem contMDiffOn_proj {s : Set (TotalSpace E)} : ContMDiffOn (IB.Prod π“˜(π•œ, F)) IB n (Ο€ E) s :=
+  (Bundle.contMDiff_proj E).ContMDiffOn
+#align bundle.cont_mdiff_on_proj Bundle.contMDiffOn_proj
 
 theorem smoothOn_proj {s : Set (TotalSpace E)} : SmoothOn (IB.Prod π“˜(π•œ, F)) IB (Ο€ E) s :=
-  contMdiffOn_proj E
+  contMDiffOn_proj E
 #align bundle.smooth_on_proj Bundle.smoothOn_proj
 
-theorem contMdiffAt_proj {p : TotalSpace E} : ContMdiffAt (IB.Prod π“˜(π•œ, F)) IB n (Ο€ E) p :=
-  (Bundle.contMdiff_proj E).ContMdiffAt
-#align bundle.cont_mdiff_at_proj Bundle.contMdiffAt_proj
+theorem contMDiffAt_proj {p : TotalSpace E} : ContMDiffAt (IB.Prod π“˜(π•œ, F)) IB n (Ο€ E) p :=
+  (Bundle.contMDiff_proj E).ContMDiffAt
+#align bundle.cont_mdiff_at_proj Bundle.contMDiffAt_proj
 
 theorem smoothAt_proj {p : TotalSpace E} : SmoothAt (IB.Prod π“˜(π•œ, F)) IB (Ο€ E) p :=
-  Bundle.contMdiffAt_proj E
+  Bundle.contMDiffAt_proj E
 #align bundle.smooth_at_proj Bundle.smoothAt_proj
 
-theorem contMdiffWithinAt_proj {s : Set (TotalSpace E)} {p : TotalSpace E} :
-    ContMdiffWithinAt (IB.Prod π“˜(π•œ, F)) IB n (Ο€ E) s p :=
-  (Bundle.contMdiffAt_proj E).ContMdiffWithinAt
-#align bundle.cont_mdiff_within_at_proj Bundle.contMdiffWithinAt_proj
+theorem contMDiffWithinAt_proj {s : Set (TotalSpace E)} {p : TotalSpace E} :
+    ContMDiffWithinAt (IB.Prod π“˜(π•œ, F)) IB n (Ο€ E) s p :=
+  (Bundle.contMDiffAt_proj E).ContMDiffWithinAt
+#align bundle.cont_mdiff_within_at_proj Bundle.contMDiffWithinAt_proj
 
 theorem smoothWithinAt_proj {s : Set (TotalSpace E)} {p : TotalSpace E} :
     SmoothWithinAt (IB.Prod π“˜(π•œ, F)) IB (Ο€ E) s p :=
-  Bundle.contMdiffWithinAt_proj E
+  Bundle.contMDiffWithinAt_proj E
 #align bundle.smooth_within_at_proj Bundle.smoothWithinAt_proj
 
 variable (π•œ E) [βˆ€ x, AddCommMonoid (E x)] [βˆ€ x, Module π•œ (E x)] [VectorBundle π•œ F E]
@@ -250,8 +250,8 @@ variable (π•œ E) [βˆ€ x, AddCommMonoid (E x)] [βˆ€ x, Module π•œ (E x)] [Vecto
 theorem smooth_zeroSection : Smooth IB (IB.Prod π“˜(π•œ, F)) (zeroSection E) :=
   by
   intro x
-  rw [Bundle.contMdiffAt_totalSpace]
-  refine' ⟨contMdiffAt_id, cont_mdiff_at_const.congr_of_eventually_eq _⟩
+  rw [Bundle.contMDiffAt_totalSpace]
+  refine' ⟨contMDiffAt_id, cont_mdiff_at_const.congr_of_eventually_eq _⟩
   Β· exact 0
   refine'
     eventually_of_mem
@@ -307,7 +307,7 @@ instance : HasGroupoid (TotalSpace E) (smoothFiberwiseLinear B F IB)
     rw [mem_smoothFiberwiseLinear_iff]
     refine' ⟨_, _, e.open_base_set.inter e'.open_base_set, smooth_on_coord_change e e', _, _, _⟩
     Β· rw [inter_comm]
-      apply ContMdiffOn.congr (smooth_on_coord_change e' e)
+      apply ContMDiffOn.congr (smooth_on_coord_change e' e)
       Β· intro b hb
         rw [e.symm_coord_changeL e' hb]
       Β· infer_instance
@@ -328,14 +328,14 @@ instance : SmoothManifoldWithCorners (IB.Prod π“˜(π•œ, F)) (TotalSpace E) :=
   intro e he
   rw [mem_smoothFiberwiseLinear_iff] at he 
   obtain βŸ¨Ο†, U, hU, hΟ†, h2Ο†, heΟ†βŸ© := he
-  rw [is_local_structomorph_on_contDiffGroupoid_iff]
-  refine' ⟨ContMdiffOn.congr _ heΟ†.eq_on, ContMdiffOn.congr _ heΟ†.symm'.eq_on⟩
+  rw [isLocalStructomorphOn_contDiffGroupoid_iff]
+  refine' ⟨ContMDiffOn.congr _ heΟ†.eq_on, ContMDiffOn.congr _ heΟ†.symm'.eq_on⟩
   · rw [heφ.source_eq]
     apply smooth_on_fst.prod_mk
-    exact (hφ.comp contMdiffOn_fst <| prod_subset_preimage_fst _ _).clm_apply contMdiffOn_snd
+    exact (hφ.comp contMDiffOn_fst <| prod_subset_preimage_fst _ _).clm_apply contMDiffOn_snd
   · rw [heφ.target_eq]
     apply smooth_on_fst.prod_mk
-    exact (h2Ο†.comp contMdiffOn_fst <| prod_subset_preimage_fst _ _).clm_apply contMdiffOn_snd
+    exact (h2Ο†.comp contMDiffOn_fst <| prod_subset_preimage_fst _ _).clm_apply contMDiffOn_snd
 
 /-! ### Core construction for smooth vector bundles -/
 
@@ -403,8 +403,8 @@ instance Bundle.Prod.smoothVectorBundle : SmoothVectorBundle (F₁ Γ— Fβ‚‚) (E
     rintro _ _ ⟨e₁, eβ‚‚, i₁, iβ‚‚, rfl⟩ ⟨e₁', eβ‚‚', i₁', iβ‚‚', rfl⟩
     skip
     rw [SmoothOn]
-    refine' ContMdiffOn.congr _ (e₁.coord_changeL_prod π•œ e₁' eβ‚‚ eβ‚‚')
-    refine' ContMdiffOn.clm_prodMap _ _
+    refine' ContMDiffOn.congr _ (e₁.coord_changeL_prod π•œ e₁' eβ‚‚ eβ‚‚')
+    refine' ContMDiffOn.clm_prodMap _ _
     Β· refine' (smooth_on_coord_change e₁ e₁').mono _
       simp only [Trivialization.baseSet_prod, mfld_simps]
       mfld_set_tac
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.basic
-! leanprover-community/mathlib commit f7ebde7ee0d1505dfccac8644ae12371aa3c1c9f
+! leanprover-community/mathlib commit f9ec187127cc5b381dfcf5f4a22dacca4c20b63d
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -191,6 +191,13 @@ theorem contMdiffAt_totalSpace (f : M β†’ TotalSpace E) (xβ‚€ : M) :
   by simp_rw [← contMdiffWithinAt_univ]; exact cont_mdiff_within_at_total_space f
 #align bundle.cont_mdiff_at_total_space Bundle.contMdiffAt_totalSpace
 
+/-- Characterization of C^n sections of a smooth vector bundle. -/
+theorem contMdiffAt_section (s : βˆ€ x, E x) (xβ‚€ : B) :
+    ContMdiffAt IB (IB.Prod π“˜(π•œ, F)) n (fun x => totalSpaceMk x (s x)) xβ‚€ ↔
+      ContMdiffAt IB π“˜(π•œ, F) n (fun x => (trivializationAt F E xβ‚€ (totalSpaceMk x (s x))).2) xβ‚€ :=
+  by simp_rw [cont_mdiff_at_total_space, and_iff_right_iff_imp]; intro x; exact contMdiffAt_id
+#align bundle.cont_mdiff_at_section Bundle.contMdiffAt_section
+
 variable (E)
 
 theorem contMdiff_proj : ContMdiff (IB.Prod π“˜(π•œ, F)) IB n (Ο€ E) :=
Diff
@@ -337,7 +337,7 @@ namespace VectorBundleCore
 
 variable {ΞΉ : Type _} {F} (Z : VectorBundleCore π•œ B F ΞΉ)
 
-/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`smoothOn_coord_change] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`smoothOn_coord_change] [] -/
 /-- Mixin for a `vector_bundle_core` stating smoothness (of transition functions). -/
 class IsSmooth (IB : ModelWithCorners π•œ EB HB) : Prop where
   smoothOn_coord_change :
@@ -430,8 +430,6 @@ class IsSmooth (a : VectorPrebundle π•œ F E) : Prop where
 
 variable (a : VectorPrebundle π•œ F E) [ha : a.IsSmooth IB] {e e' : Pretrivialization F (Ο€ E)}
 
-include ha
-
 /-- A randomly chosen coordinate change on a `smooth_vector_prebundle`, given by
   the field `exists_coord_change`. Note that `a.smooth_coord_change` need not be the same as
   `a.coord_change`. -/
Diff
@@ -417,7 +417,7 @@ namespace VectorPrebundle
 
 variable [βˆ€ x, TopologicalSpace (E x)] {F E}
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (e e' «expr ∈ » a.pretrivialization_atlas) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (e e' «expr ∈ » a.pretrivialization_atlas) -/
 /-- Mixin for a `vector_prebundle` stating smoothness of coordinate changes. -/
 class IsSmooth (a : VectorPrebundle π•œ F E) : Prop where
   exists_smooth_coord_change :
Diff
@@ -337,14 +337,14 @@ namespace VectorBundleCore
 
 variable {ΞΉ : Type _} {F} (Z : VectorBundleCore π•œ B F ΞΉ)
 
-/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`smoothOn_coord_change] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`smoothOn_coord_change] [] -/
 /-- Mixin for a `vector_bundle_core` stating smoothness (of transition functions). -/
 class IsSmooth (IB : ModelWithCorners π•œ EB HB) : Prop where
   smoothOn_coord_change :
     βˆ€ i j, SmoothOn IB π“˜(π•œ, F β†’L[π•œ] F) (Z.coordChange i j) (Z.baseSet i ∩ Z.baseSet j)
 #align vector_bundle_core.is_smooth VectorBundleCore.IsSmooth
 
-/- ./././Mathport/Syntax/Translate/Command.lean:239:13: unsupported: advanced export style -/
+/- ./././Mathport/Syntax/Translate/Command.lean:240:13: unsupported: advanced export style -/
 export IsSmooth ()
 
 variable [Z.IsSmooth IB]
Diff
@@ -119,7 +119,7 @@ theorem FiberBundle.chartedSpace_chartAt_symm_fst (x : TotalSpace E) (y : ModelP
     (hy : y ∈ (chartAt (ModelProd HB F) x).target) :
     ((chartAt (ModelProd HB F) x).symm y).proj = (chartAt HB x.proj).symm y.1 :=
   by
-  simp only [FiberBundle.chartedSpace_chartAt, mfld_simps] at hy⊒
+  simp only [FiberBundle.chartedSpace_chartAt, mfld_simps] at hy ⊒
   exact (trivialization_at F E x.proj).proj_symm_apply hy.2
 #align fiber_bundle.charted_space_chart_at_symm_fst FiberBundle.chartedSpace_chartAt_symm_fst
 
@@ -201,7 +201,7 @@ theorem contMdiff_proj : ContMdiff (IB.Prod π“˜(π•œ, F)) IB n (Ο€ E) :=
   simp_rw [(· ∘ ·), FiberBundle.extChartAt]
   apply cont_diff_within_at_fst.congr
   · rintro ⟨a, b⟩ hab
-    simp only [mfld_simps] at hab
+    simp only [mfld_simps] at hab 
     have : ((chart_at HB x.1).symm (IB.symm a), b) ∈ (trivialization_at F E x.fst).target := by
       simp only [hab, mfld_simps]
     simp only [Trivialization.proj_symm_apply _ this, hab, mfld_simps]
@@ -319,7 +319,7 @@ instance : SmoothManifoldWithCorners (IB.Prod π“˜(π•œ, F)) (TotalSpace E) :=
   by
   refine' { StructureGroupoid.HasGroupoid.comp (smoothFiberwiseLinear B F IB) _ with }
   intro e he
-  rw [mem_smoothFiberwiseLinear_iff] at he
+  rw [mem_smoothFiberwiseLinear_iff] at he 
   obtain βŸ¨Ο†, U, hU, hΟ†, h2Ο†, heΟ†βŸ© := he
   rw [is_local_structomorph_on_contDiffGroupoid_iff]
   refine' ⟨ContMdiffOn.congr _ heΟ†.eq_on, ContMdiffOn.congr _ heΟ†.symm'.eq_on⟩
@@ -478,7 +478,7 @@ theorem smoothVectorBundle :
       ext v
       rw [a.smooth_coord_change_apply he he' hb v, ContinuousLinearEquiv.coe_coe,
         Trivialization.coordChangeL_apply]
-      exacts[rfl, hb] }
+      exacts [rfl, hb] }
 #align vector_prebundle.smooth_vector_bundle VectorPrebundle.smoothVectorBundle
 
 end VectorPrebundle
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.basic
-! leanprover-community/mathlib commit c89fe2d59ae06402c3f55f978016d1ada444f57e
+! leanprover-community/mathlib commit f7ebde7ee0d1505dfccac8644ae12371aa3c1c9f
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -415,7 +415,7 @@ end WithTopology
 
 namespace VectorPrebundle
 
-variable {F E}
+variable [βˆ€ x, TopologicalSpace (E x)] {F E}
 
 /- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (e e' «expr ∈ » a.pretrivialization_atlas) -/
 /-- Mixin for a `vector_prebundle` stating smoothness of coordinate changes. -/
@@ -468,8 +468,8 @@ variable (IB)
 
 /-- Make a `smooth_vector_bundle` from a `smooth_vector_prebundle`.  -/
 theorem smoothVectorBundle :
-    @SmoothVectorBundle _ _ F E _ _ _ _ _ _ IB _ _ _ _ _ _ _ a.totalSpaceTopology a.fiberTopology
-      a.toFiberBundle a.to_vectorBundle :=
+    @SmoothVectorBundle _ _ F E _ _ _ _ _ _ IB _ _ _ _ _ _ _ a.totalSpaceTopology _ a.toFiberBundle
+      a.to_vectorBundle :=
   {
     smoothOn_coord_change := by
       rintro _ _ ⟨e, he, rfl⟩ ⟨e', he', rfl⟩
Diff
@@ -70,7 +70,7 @@ open Function (id_def)
 
 open Filter
 
-open Manifold Bundle Topology
+open scoped Manifold Bundle Topology
 
 variable {π•œ B B' F M : Type _} {E : B β†’ Type _}
 
Diff
@@ -188,9 +188,7 @@ theorem contMdiffAt_totalSpace (f : M β†’ TotalSpace E) (xβ‚€ : M) :
     ContMdiffAt IM (IB.Prod π“˜(π•œ, F)) n f xβ‚€ ↔
       ContMdiffAt IM IB n (fun x => (f x).proj) xβ‚€ ∧
         ContMdiffAt IM π“˜(π•œ, F) n (fun x => (trivializationAt F E (f xβ‚€).proj (f x)).2) xβ‚€ :=
-  by
-  simp_rw [← contMdiffWithinAt_univ]
-  exact cont_mdiff_within_at_total_space f
+  by simp_rw [← contMdiffWithinAt_univ]; exact cont_mdiff_within_at_total_space f
 #align bundle.cont_mdiff_at_total_space Bundle.contMdiffAt_totalSpace
 
 variable (E)
@@ -462,8 +460,7 @@ theorem mk_smoothCoordChange (he : e ∈ a.pretrivializationAtlas)
   by
   ext
   Β· rw [e.mk_symm hb.1 v, e'.coe_fst', e.proj_symm_apply' hb.1]
-    rw [e.proj_symm_apply' hb.1]
-    exact hb.2
+    rw [e.proj_symm_apply' hb.1]; exact hb.2
   Β· exact a.smooth_coord_change_apply he he' hb v
 #align vector_prebundle.mk_smooth_coord_change VectorPrebundle.mk_smoothCoordChange
 
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.basic
-! leanprover-community/mathlib commit 0187644979f2d3e10a06e916a869c994facd9a87
+! leanprover-community/mathlib commit c89fe2d59ae06402c3f55f978016d1ada444f57e
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -49,9 +49,13 @@ fields, they can also be C^k vector bundles, etc.
 * `bundle.total_space.smooth_manifold_with_corners`: A smooth vector bundle is naturally a smooth
   manifold.
 
-* `vector_bundle_core.smooth_vector_bundle`: If a (topological) `vector_bundle_core` is smooth, in
-  the sense of having smooth transition functions, then the vector bundle constructed from it is a
-  smooth vector bundle.
+* `vector_bundle_core.smooth_vector_bundle`: If a (topological) `vector_bundle_core` is smooth,
+  in the sense of having smooth transition functions (cf. `vector_bundle_core.is_smooth`),
+  then the vector bundle constructed from it is a smooth vector bundle.
+
+* `vector_prebundle.smooth_vector_bundle`: If a `vector_prebundle` is smooth,
+  in the sense of having smooth transition functions (cf. `vector_prebundle.is_smooth`),
+  then the vector bundle constructed from it is a smooth vector bundle.
 
 * `bundle.prod.smooth_vector_bundle`: The direct sum of two smooth vector bundles is a smooth vector
   bundle.
@@ -258,13 +262,16 @@ end
 /-! ### Smooth vector bundles -/
 
 
-variable [NontriviallyNormedField π•œ] [βˆ€ x, AddCommMonoid (E x)] [βˆ€ x, Module π•œ (E x)]
-  [NormedAddCommGroup F] [NormedSpace π•œ F] [TopologicalSpace (TotalSpace E)]
-  [βˆ€ x, TopologicalSpace (E x)] {EB : Type _} [NormedAddCommGroup EB] [NormedSpace π•œ EB]
+variable [NontriviallyNormedField π•œ] {EB : Type _} [NormedAddCommGroup EB] [NormedSpace π•œ EB]
   {HB : Type _} [TopologicalSpace HB] (IB : ModelWithCorners π•œ EB HB) [TopologicalSpace B]
   [ChartedSpace HB B] [SmoothManifoldWithCorners IB B] {EM : Type _} [NormedAddCommGroup EM]
   [NormedSpace π•œ EM] {HM : Type _} [TopologicalSpace HM] {IM : ModelWithCorners π•œ EM HM}
   [TopologicalSpace M] [ChartedSpace HM M] [Is : SmoothManifoldWithCorners IM M] {n : β„•βˆž}
+  [βˆ€ x, AddCommMonoid (E x)] [βˆ€ x, Module π•œ (E x)] [NormedAddCommGroup F] [NormedSpace π•œ F]
+
+section WithTopology
+
+variable [TopologicalSpace (TotalSpace E)] [βˆ€ x, TopologicalSpace (E x)]
 
 variable (F E) [FiberBundle F E] [VectorBundle π•œ F E]
 
@@ -403,3 +410,79 @@ instance Bundle.Prod.smoothVectorBundle : SmoothVectorBundle (F₁ Γ— Fβ‚‚) (E
 
 end Prod
 
+end WithTopology
+
+/-! ### Prebundle construction for smooth vector bundles -/
+
+
+namespace VectorPrebundle
+
+variable {F E}
+
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (e e' «expr ∈ » a.pretrivialization_atlas) -/
+/-- Mixin for a `vector_prebundle` stating smoothness of coordinate changes. -/
+class IsSmooth (a : VectorPrebundle π•œ F E) : Prop where
+  exists_smooth_coord_change :
+    βˆ€ (e) (_ : e ∈ a.pretrivializationAtlas) (e') (_ : e' ∈ a.pretrivializationAtlas),
+      βˆƒ f : B β†’ F β†’L[π•œ] F,
+        SmoothOn IB π“˜(π•œ, F β†’L[π•œ] F) f (e.baseSet ∩ e'.baseSet) ∧
+          βˆ€ (b : B) (hb : b ∈ e.baseSet ∩ e'.baseSet) (v : F),
+            f b v = (e' (totalSpaceMk b (e.symm b v))).2
+#align vector_prebundle.is_smooth VectorPrebundle.IsSmooth
+
+variable (a : VectorPrebundle π•œ F E) [ha : a.IsSmooth IB] {e e' : Pretrivialization F (Ο€ E)}
+
+include ha
+
+/-- A randomly chosen coordinate change on a `smooth_vector_prebundle`, given by
+  the field `exists_coord_change`. Note that `a.smooth_coord_change` need not be the same as
+  `a.coord_change`. -/
+noncomputable def smoothCoordChange (he : e ∈ a.pretrivializationAtlas)
+    (he' : e' ∈ a.pretrivializationAtlas) (b : B) : F β†’L[π•œ] F :=
+  Classical.choose (ha.exists_smooth_coord_change e he e' he') b
+#align vector_prebundle.smooth_coord_change VectorPrebundle.smoothCoordChange
+
+variable {IB}
+
+theorem smoothOn_smoothCoordChange (he : e ∈ a.pretrivializationAtlas)
+    (he' : e' ∈ a.pretrivializationAtlas) :
+    SmoothOn IB π“˜(π•œ, F β†’L[π•œ] F) (a.smoothCoordChange IB he he') (e.baseSet ∩ e'.baseSet) :=
+  (Classical.choose_spec (ha.exists_smooth_coord_change e he e' he')).1
+#align vector_prebundle.smooth_on_smooth_coord_change VectorPrebundle.smoothOn_smoothCoordChange
+
+theorem smoothCoordChange_apply (he : e ∈ a.pretrivializationAtlas)
+    (he' : e' ∈ a.pretrivializationAtlas) {b : B} (hb : b ∈ e.baseSet ∩ e'.baseSet) (v : F) :
+    a.smoothCoordChange IB he he' b v = (e' (totalSpaceMk b (e.symm b v))).2 :=
+  (Classical.choose_spec (ha.exists_smooth_coord_change e he e' he')).2 b hb v
+#align vector_prebundle.smooth_coord_change_apply VectorPrebundle.smoothCoordChange_apply
+
+theorem mk_smoothCoordChange (he : e ∈ a.pretrivializationAtlas)
+    (he' : e' ∈ a.pretrivializationAtlas) {b : B} (hb : b ∈ e.baseSet ∩ e'.baseSet) (v : F) :
+    (b, a.smoothCoordChange IB he he' b v) = e' (totalSpaceMk b (e.symm b v)) :=
+  by
+  ext
+  Β· rw [e.mk_symm hb.1 v, e'.coe_fst', e.proj_symm_apply' hb.1]
+    rw [e.proj_symm_apply' hb.1]
+    exact hb.2
+  Β· exact a.smooth_coord_change_apply he he' hb v
+#align vector_prebundle.mk_smooth_coord_change VectorPrebundle.mk_smoothCoordChange
+
+variable (IB)
+
+/-- Make a `smooth_vector_bundle` from a `smooth_vector_prebundle`.  -/
+theorem smoothVectorBundle :
+    @SmoothVectorBundle _ _ F E _ _ _ _ _ _ IB _ _ _ _ _ _ _ a.totalSpaceTopology a.fiberTopology
+      a.toFiberBundle a.to_vectorBundle :=
+  {
+    smoothOn_coord_change := by
+      rintro _ _ ⟨e, he, rfl⟩ ⟨e', he', rfl⟩
+      refine' (a.smooth_on_smooth_coord_change he he').congr _
+      intro b hb
+      ext v
+      rw [a.smooth_coord_change_apply he he' hb v, ContinuousLinearEquiv.coe_coe,
+        Trivialization.coordChangeL_apply]
+      exacts[rfl, hb] }
+#align vector_prebundle.smooth_vector_bundle VectorPrebundle.smoothVectorBundle
+
+end VectorPrebundle
+
Diff
@@ -332,14 +332,14 @@ namespace VectorBundleCore
 
 variable {ΞΉ : Type _} {F} (Z : VectorBundleCore π•œ B F ΞΉ)
 
-/- ./././Mathport/Syntax/Translate/Command.lean:388:30: infer kinds are unsupported in Lean 4: #[`smoothOn_coord_change] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`smoothOn_coord_change] [] -/
 /-- Mixin for a `vector_bundle_core` stating smoothness (of transition functions). -/
 class IsSmooth (IB : ModelWithCorners π•œ EB HB) : Prop where
   smoothOn_coord_change :
     βˆ€ i j, SmoothOn IB π“˜(π•œ, F β†’L[π•œ] F) (Z.coordChange i j) (Z.baseSet i ∩ Z.baseSet j)
 #align vector_bundle_core.is_smooth VectorBundleCore.IsSmooth
 
-/- ./././Mathport/Syntax/Translate/Command.lean:234:13: unsupported: advanced export style -/
+/- ./././Mathport/Syntax/Translate/Command.lean:239:13: unsupported: advanced export style -/
 export IsSmooth ()
 
 variable [Z.IsSmooth IB]
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.basic
-! 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.
 -/
@@ -62,7 +62,11 @@ assert_not_exists mfderiv
 
 open Bundle Set LocalHomeomorph
 
-open Manifold Bundle
+open Function (id_def)
+
+open Filter
+
+open Manifold Bundle Topology
 
 variable {π•œ B B' F M : Type _} {E : B β†’ Type _}
 
@@ -107,6 +111,148 @@ theorem FiberBundle.chartedSpace_chartAt (x : TotalSpace E) :
   rw [Trivialization.coe_coe, Trivialization.coe_fst' _ (mem_base_set_trivialization_at F E x.proj)]
 #align fiber_bundle.charted_space_chart_at FiberBundle.chartedSpace_chartAt
 
+theorem FiberBundle.chartedSpace_chartAt_symm_fst (x : TotalSpace E) (y : ModelProd HB F)
+    (hy : y ∈ (chartAt (ModelProd HB F) x).target) :
+    ((chartAt (ModelProd HB F) x).symm y).proj = (chartAt HB x.proj).symm y.1 :=
+  by
+  simp only [FiberBundle.chartedSpace_chartAt, mfld_simps] at hy⊒
+  exact (trivialization_at F E x.proj).proj_symm_apply hy.2
+#align fiber_bundle.charted_space_chart_at_symm_fst FiberBundle.chartedSpace_chartAt_symm_fst
+
+end
+
+section
+
+variable [NontriviallyNormedField π•œ] [NormedAddCommGroup F] [NormedSpace π•œ F]
+  [TopologicalSpace (TotalSpace E)] [βˆ€ x, TopologicalSpace (E x)] {EB : Type _}
+  [NormedAddCommGroup EB] [NormedSpace π•œ EB] {HB : Type _} [TopologicalSpace HB]
+  (IB : ModelWithCorners π•œ EB HB) (E' : B β†’ Type _) [βˆ€ x, Zero (E' x)] {EM : Type _}
+  [NormedAddCommGroup EM] [NormedSpace π•œ EM] {HM : Type _} [TopologicalSpace HM]
+  {IM : ModelWithCorners π•œ EM HM} [TopologicalSpace M] [ChartedSpace HM M]
+  [Is : SmoothManifoldWithCorners IM M] {n : β„•βˆž}
+
+variable [TopologicalSpace B] [ChartedSpace HB B] [FiberBundle F E]
+
+protected theorem FiberBundle.extChartAt (x : TotalSpace E) :
+    extChartAt (IB.Prod π“˜(π•œ, F)) x =
+      (trivializationAt F E x.proj).toLocalEquiv ≫
+        (extChartAt IB x.proj).Prod (LocalEquiv.refl F) :=
+  by
+  simp_rw [extChartAt, FiberBundle.chartedSpace_chartAt, extend]
+  simp only [LocalEquiv.trans_assoc, mfld_simps]
+#align fiber_bundle.ext_chart_at FiberBundle.extChartAt
+
+/-! ### Smoothness of maps in/out fiber bundles
+
+Note: For these results we don't need that the bundle is a smooth vector bundle, or even a vector
+bundle at all, just that it is a fiber bundle over a charted base space.
+-/
+
+
+namespace Bundle
+
+variable {F E IB}
+
+/-- Characterization of C^n functions into a smooth vector bundle. -/
+theorem contMdiffWithinAt_totalSpace (f : M β†’ TotalSpace E) {s : Set M} {xβ‚€ : M} :
+    ContMdiffWithinAt IM (IB.Prod π“˜(π•œ, F)) n f s xβ‚€ ↔
+      ContMdiffWithinAt IM IB n (fun x => (f x).proj) s xβ‚€ ∧
+        ContMdiffWithinAt IM π“˜(π•œ, F) n (fun x => (trivializationAt F E (f xβ‚€).proj (f x)).2) s xβ‚€ :=
+  by
+  simp (config := { singlePass := true }) only [contMdiffWithinAt_iff_target]
+  rw [and_and_and_comm, ← continuous_within_at_total_space, and_congr_right_iff]
+  intro hf
+  simp_rw [modelWithCornersSelf_prod, FiberBundle.extChartAt, Function.comp, LocalEquiv.trans_apply,
+    LocalEquiv.prod_coe, LocalEquiv.refl_coe, extChartAt_self_apply, modelWithCornersSelf_coe,
+    id_def]
+  refine' (contMdiffWithinAt_prod_iff _).trans _
+  -- rw doesn't do this?
+  have h1 : (fun x => (f x).proj) ⁻¹' (trivialization_at F E (f xβ‚€).proj).baseSet ∈ 𝓝[s] xβ‚€ :=
+    ((continuous_proj F E).ContinuousWithinAt.comp hf (maps_to_image f s)).preimage_mem_nhdsWithin
+      ((Trivialization.open_baseSet _).mem_nhds (mem_base_set_trivialization_at F E _))
+  refine'
+    and_congr (eventually_eq.cont_mdiff_within_at_iff (eventually_of_mem h1 fun x hx => _) _)
+      Iff.rfl
+  Β· simp_rw [Function.comp, LocalHomeomorph.coe_coe, Trivialization.coe_coe]
+    rw [Trivialization.coe_fst']
+    exact hx
+  Β· simp only [mfld_simps]
+#align bundle.cont_mdiff_within_at_total_space Bundle.contMdiffWithinAt_totalSpace
+
+/-- Characterization of C^n functions into a smooth vector bundle. -/
+theorem contMdiffAt_totalSpace (f : M β†’ TotalSpace E) (xβ‚€ : M) :
+    ContMdiffAt IM (IB.Prod π“˜(π•œ, F)) n f xβ‚€ ↔
+      ContMdiffAt IM IB n (fun x => (f x).proj) xβ‚€ ∧
+        ContMdiffAt IM π“˜(π•œ, F) n (fun x => (trivializationAt F E (f xβ‚€).proj (f x)).2) xβ‚€ :=
+  by
+  simp_rw [← contMdiffWithinAt_univ]
+  exact cont_mdiff_within_at_total_space f
+#align bundle.cont_mdiff_at_total_space Bundle.contMdiffAt_totalSpace
+
+variable (E)
+
+theorem contMdiff_proj : ContMdiff (IB.Prod π“˜(π•œ, F)) IB n (Ο€ E) :=
+  by
+  intro x
+  rw [ContMdiffAt, contMdiffWithinAt_iff']
+  refine' ⟨(continuous_proj F E).ContinuousWithinAt, _⟩
+  simp_rw [(· ∘ ·), FiberBundle.extChartAt]
+  apply cont_diff_within_at_fst.congr
+  · rintro ⟨a, b⟩ hab
+    simp only [mfld_simps] at hab
+    have : ((chart_at HB x.1).symm (IB.symm a), b) ∈ (trivialization_at F E x.fst).target := by
+      simp only [hab, mfld_simps]
+    simp only [Trivialization.proj_symm_apply _ this, hab, mfld_simps]
+  Β· simp only [mfld_simps]
+#align bundle.cont_mdiff_proj Bundle.contMdiff_proj
+
+theorem smooth_proj : Smooth (IB.Prod π“˜(π•œ, F)) IB (Ο€ E) :=
+  contMdiff_proj E
+#align bundle.smooth_proj Bundle.smooth_proj
+
+theorem contMdiffOn_proj {s : Set (TotalSpace E)} : ContMdiffOn (IB.Prod π“˜(π•œ, F)) IB n (Ο€ E) s :=
+  (Bundle.contMdiff_proj E).ContMdiffOn
+#align bundle.cont_mdiff_on_proj Bundle.contMdiffOn_proj
+
+theorem smoothOn_proj {s : Set (TotalSpace E)} : SmoothOn (IB.Prod π“˜(π•œ, F)) IB (Ο€ E) s :=
+  contMdiffOn_proj E
+#align bundle.smooth_on_proj Bundle.smoothOn_proj
+
+theorem contMdiffAt_proj {p : TotalSpace E} : ContMdiffAt (IB.Prod π“˜(π•œ, F)) IB n (Ο€ E) p :=
+  (Bundle.contMdiff_proj E).ContMdiffAt
+#align bundle.cont_mdiff_at_proj Bundle.contMdiffAt_proj
+
+theorem smoothAt_proj {p : TotalSpace E} : SmoothAt (IB.Prod π“˜(π•œ, F)) IB (Ο€ E) p :=
+  Bundle.contMdiffAt_proj E
+#align bundle.smooth_at_proj Bundle.smoothAt_proj
+
+theorem contMdiffWithinAt_proj {s : Set (TotalSpace E)} {p : TotalSpace E} :
+    ContMdiffWithinAt (IB.Prod π“˜(π•œ, F)) IB n (Ο€ E) s p :=
+  (Bundle.contMdiffAt_proj E).ContMdiffWithinAt
+#align bundle.cont_mdiff_within_at_proj Bundle.contMdiffWithinAt_proj
+
+theorem smoothWithinAt_proj {s : Set (TotalSpace E)} {p : TotalSpace E} :
+    SmoothWithinAt (IB.Prod π“˜(π•œ, F)) IB (Ο€ E) s p :=
+  Bundle.contMdiffWithinAt_proj E
+#align bundle.smooth_within_at_proj Bundle.smoothWithinAt_proj
+
+variable (π•œ E) [βˆ€ x, AddCommMonoid (E x)] [βˆ€ x, Module π•œ (E x)] [VectorBundle π•œ F E]
+
+theorem smooth_zeroSection : Smooth IB (IB.Prod π“˜(π•œ, F)) (zeroSection E) :=
+  by
+  intro x
+  rw [Bundle.contMdiffAt_totalSpace]
+  refine' ⟨contMdiffAt_id, cont_mdiff_at_const.congr_of_eventually_eq _⟩
+  Β· exact 0
+  refine'
+    eventually_of_mem
+      ((trivialization_at F E x).open_baseSet.mem_nhds (mem_base_set_trivialization_at F E x))
+      fun x' hx' => _
+  simp_rw [zero_section_proj, (trivialization_at F E x).zeroSection π•œ hx']
+#align bundle.smooth_zero_section Bundle.smooth_zeroSection
+
+end Bundle
+
 end
 
 /-! ### Smooth vector bundles -/
@@ -116,7 +262,9 @@ variable [NontriviallyNormedField π•œ] [βˆ€ x, AddCommMonoid (E x)] [βˆ€ x, Mod
   [NormedAddCommGroup F] [NormedSpace π•œ F] [TopologicalSpace (TotalSpace E)]
   [βˆ€ x, TopologicalSpace (E x)] {EB : Type _} [NormedAddCommGroup EB] [NormedSpace π•œ EB]
   {HB : Type _} [TopologicalSpace HB] (IB : ModelWithCorners π•œ EB HB) [TopologicalSpace B]
-  [ChartedSpace HB B] [SmoothManifoldWithCorners IB B]
+  [ChartedSpace HB B] [SmoothManifoldWithCorners IB B] {EM : Type _} [NormedAddCommGroup EM]
+  [NormedSpace π•œ EM] {HM : Type _} [TopologicalSpace HM] {IM : ModelWithCorners π•œ EM HM}
+  [TopologicalSpace M] [ChartedSpace HM M] [Is : SmoothManifoldWithCorners IM M] {n : β„•βˆž}
 
 variable (F E) [FiberBundle F E] [VectorBundle π•œ F E]
 
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.basic
-! leanprover-community/mathlib commit be2c24f56783935652cefffb4bfca7e4b25d167e
+! leanprover-community/mathlib commit ddec54a71a0dd025c05445d467f1a2b7d586a3ba
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -72,11 +72,11 @@ variable {π•œ B B' F M : Type _} {E : B β†’ Type _}
 section
 
 variable [TopologicalSpace F] [TopologicalSpace (TotalSpace E)] [βˆ€ x, TopologicalSpace (E x)]
-  {HB : Type _} [TopologicalSpace HB] [TopologicalSpace B] [ChartedSpace HB B]
+  {HB : Type _} [TopologicalSpace HB] [TopologicalSpace B] [ChartedSpace HB B] [FiberBundle F E]
 
 /-- A fiber bundle `E` over a base `B` with model fiber `F` is naturally a charted space modelled on
 `B Γ— F`. -/
-instance FiberBundle.chartedSpace [FiberBundle F E] : ChartedSpace (B Γ— F) (TotalSpace E)
+instance FiberBundle.chartedSpace : ChartedSpace (B Γ— F) (TotalSpace E)
     where
   atlas := (fun e : Trivialization F (Ο€ E) => e.toLocalHomeomorph) '' trivializationAtlas F E
   chartAt x := (trivializationAt F E x.proj).toLocalHomeomorph
@@ -85,17 +85,30 @@ instance FiberBundle.chartedSpace [FiberBundle F E] : ChartedSpace (B Γ— F) (Tot
   chart_mem_atlas x := mem_image_of_mem _ (trivialization_mem_atlas F E _)
 #align fiber_bundle.charted_space FiberBundle.chartedSpace
 
+section
+
 attribute [local reducible] ModelProd
 
 /-- Let `B` be a charted space modelled on `HB`.  Then a fiber bundle `E` over a base `B` with model
 fiber `F` is naturally a charted space modelled on `HB.prod F`. -/
-instance FiberBundle.chartedSpace' [FiberBundle F E] :
-    ChartedSpace (ModelProd HB F) (TotalSpace E) :=
+instance FiberBundle.chartedSpace' : ChartedSpace (ModelProd HB F) (TotalSpace E) :=
   ChartedSpace.comp _ (ModelProd B F) _
 #align fiber_bundle.charted_space' FiberBundle.chartedSpace'
 
 end
 
+theorem FiberBundle.chartedSpace_chartAt (x : TotalSpace E) :
+    chartAt (ModelProd HB F) x =
+      (trivializationAt F E x.proj).toLocalHomeomorph ≫ₕ
+        (chartAt HB x.proj).Prod (LocalHomeomorph.refl F) :=
+  by
+  dsimp only [FiberBundle.chartedSpace', ChartedSpace.comp, FiberBundle.chartedSpace,
+    prodChartedSpace, chartedSpaceSelf]
+  rw [Trivialization.coe_coe, Trivialization.coe_fst' _ (mem_base_set_trivialization_at F E x.proj)]
+#align fiber_bundle.charted_space_chart_at FiberBundle.chartedSpace_chartAt
+
+end
+
 /-! ### Smooth vector bundles -/
 
 

Changes in mathlib4

mathlib3
mathlib4
perf: make LocalInvariantProp a structure (#12552)
  • Also redefine MDifferentiableWithinAt and MDifferentiableAt so that they are using LiftProp[Within]At.
  • This causes a speedup in the old proof of ContMDiffWithinAt.cle_arrowCongr by 25%.
  • Also give some extra information in the proof of ContMDiffWithinAt.cle_arrowCongr to speed it up by another factor of 4.
  • A bit of the fallout (e.g. in hasSmoothAddSelf) is from Lean unfolding way too many definitions to make things definitionally equal. Since LiftPropWithinAt is now a structure, the old proofs now break, unless you rewrite with chartedSpaceSelf_prod), causing much less defeq-abuse.
  • The new lemmas MDifferentiableWithinAt.differentiableWithinAt_writtenInExtChartAt and MDifferentiableAt.differentiableWithinAt_writtenInExtChartAt have a bit long names. This is to avoid naming clash with the existing MDifferentiableWithinAt.differentiableWithinAt. I'm open for other suggestions.
Diff
@@ -183,8 +183,8 @@ theorem contMDiffWithinAt_totalSpace (f : M β†’ TotalSpace F E) {s : Set M} {x
   rw [and_and_and_comm, ← FiberBundle.continuousWithinAt_totalSpace, and_congr_right_iff]
   intro hf
   simp_rw [modelWithCornersSelf_prod, FiberBundle.extChartAt, Function.comp,
-    PartialEquiv.trans_apply, PartialEquiv.prod_coe, PartialEquiv.refl_coe, extChartAt_self_apply,
-    modelWithCornersSelf_coe, Function.id_def]
+    PartialEquiv.trans_apply, PartialEquiv.prod_coe, PartialEquiv.refl_coe,
+    extChartAt_self_apply, modelWithCornersSelf_coe, Function.id_def, ← chartedSpaceSelf_prod]
   refine (contMDiffWithinAt_prod_iff _).trans (and_congr ?_ Iff.rfl)
   have h1 : (fun x => (f x).proj) ⁻¹' (trivializationAt F E (f xβ‚€).proj).baseSet ∈ 𝓝[s] xβ‚€ :=
     ((FiberBundle.continuous_proj F E).continuousWithinAt.comp hf (mapsTo_image f s))
chore(Geometry): remove a few porting notes (#12061)

In all cases, the original proof fixed itself.

Diff
@@ -594,9 +594,7 @@ is a smooth vector bundle. -/
 instance smoothVectorBundle : SmoothVectorBundle F Z.Fiber IB where
   smoothOn_coordChangeL := by
     rintro - - ⟨i, rfl⟩ ⟨i', rfl⟩
-    -- Porting note: Originally `Z.smoothOn_coordChange IB i i'`
-    refine'
-      (VectorBundleCore.IsSmooth.smoothOn_coordChange (Z := Z) (IB := IB) i i').congr fun b hb => _
+    refine (Z.smoothOn_coordChange IB i i').congr fun b hb ↦ ?_
     ext v
     exact Z.localTriv_coordChange_eq i i' hb v
 #align vector_bundle_core.smooth_vector_bundle VectorBundleCore.smoothVectorBundle
chore: simplify some proofs for the 2024-03-16 nightly (#11547)

Some small changes to adapt to the 2024-03-16 nightly that can land in advance.

Diff
@@ -184,7 +184,7 @@ theorem contMDiffWithinAt_totalSpace (f : M β†’ TotalSpace F E) {s : Set M} {x
   intro hf
   simp_rw [modelWithCornersSelf_prod, FiberBundle.extChartAt, Function.comp,
     PartialEquiv.trans_apply, PartialEquiv.prod_coe, PartialEquiv.refl_coe, extChartAt_self_apply,
-    modelWithCornersSelf_coe, id_def]
+    modelWithCornersSelf_coe, Function.id_def]
   refine (contMDiffWithinAt_prod_iff _).trans (and_congr ?_ Iff.rfl)
   have h1 : (fun x => (f x).proj) ⁻¹' (trivializationAt F E (f xβ‚€).proj).baseSet ∈ 𝓝[s] xβ‚€ :=
     ((FiberBundle.continuous_proj F E).continuousWithinAt.comp hf (mapsTo_image f s))
chore(*): remove empty lines between variable statements (#11418)

Empty lines were removed by executing the following Python script twice

import os
import re


# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
  for filename in files:
    if filename.endswith('.lean'):
      file_path = os.path.join(dir_path, filename)

      # Open the file and read its contents
      with open(file_path, 'r') as file:
        content = file.read()

      # Use a regular expression to replace sequences of "variable" lines separated by empty lines
      # with sequences without empty lines
      modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)

      # Write the modified content back to the file
      with open(file_path, 'w') as file:
        file.write(modified_content)
Diff
@@ -279,7 +279,6 @@ variable [NontriviallyNormedField π•œ] {EB : Type*} [NormedAddCommGroup EB] [No
 section WithTopology
 
 variable [TopologicalSpace (TotalSpace F E)] [βˆ€ x, TopologicalSpace (E x)] (F E)
-
 variable [FiberBundle F E] [VectorBundle π•œ F E]
 
 /-- When `B` is a smooth manifold with corners with respect to a model `IB` and `E` is a
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
@@ -141,7 +141,7 @@ protected theorem FiberBundle.extChartAt (x : TotalSpace F E) :
         (extChartAt IB x.proj).prod (PartialEquiv.refl F) := by
   simp_rw [extChartAt, FiberBundle.chartedSpace_chartAt, extend]
   simp only [PartialEquiv.trans_assoc, mfld_simps]
-  -- porting note: should not be needed
+  -- Porting note: should not be needed
   rw [PartialEquiv.prod_trans, PartialEquiv.refl_trans]
 #align fiber_bundle.ext_chart_at FiberBundle.extChartAt
 
chore: remove stream-of-consciousness uses of have, replace and suffices (#10640)

No changes to tactic file, it's just boring fixes throughout the library.

This follows on from #6964.

Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -438,9 +438,9 @@ theorem Trivialization.contMDiffOn_symm_trans :
     (contMDiffOn_fst.coordChange contMDiffOn_snd Hmaps.1 Hmaps.2)).congr ?_
   rintro ⟨b, x⟩ hb
   refine Prod.ext ?_ rfl
-  · have : (e.toPartialHomeomorph.symm (b, x)).1 ∈ e'.baseSet
-    Β· simp_all only [Trivialization.mem_target, mfld_simps]
-    exact (e'.coe_fst' this).trans (e.proj_symm_apply hb.1)
+  have : (e.toPartialHomeomorph.symm (b, x)).1 ∈ e'.baseSet := by
+    simp_all only [Trivialization.mem_target, mfld_simps]
+  exact (e'.coe_fst' this).trans (e.proj_symm_apply hb.1)
 
 variable {IB e e'}
 
chore(Analysis,Geometry): remove almost all autoImplicit (#9691)

After this PR, no file in Geometry uses autoImplicit, and in Analysis it's scoped to six declarations.

Diff
@@ -59,9 +59,6 @@ fields, they can also be C^k vector bundles, etc.
   bundle.
 -/
 
-set_option autoImplicit true
-
-
 assert_not_exists mfderiv
 
 open Bundle Set PartialHomeomorph
@@ -328,58 +325,59 @@ theorem contMDiffOn_symm_coordChangeL :
 
 variable {e e'}
 
-theorem contMDiffAt_coordChangeL (h : x ∈ e.baseSet) (h' : x ∈ e'.baseSet) :
+theorem contMDiffAt_coordChangeL {x : B} (h : x ∈ e.baseSet) (h' : x ∈ e'.baseSet) :
     ContMDiffAt IB π“˜(π•œ, F β†’L[π•œ] F) n (fun b : B => (e.coordChangeL π•œ e' b : F β†’L[π•œ] F)) x :=
   (contMDiffOn_coordChangeL IB e e').contMDiffAt <|
     (e.open_baseSet.inter e'.open_baseSet).mem_nhds ⟨h, h'⟩
 
-theorem smoothAt_coordChangeL (h : x ∈ e.baseSet) (h' : x ∈ e'.baseSet) :
+theorem smoothAt_coordChangeL {x : B} (h : x ∈ e.baseSet) (h' : x ∈ e'.baseSet) :
     SmoothAt IB π“˜(π•œ, F β†’L[π•œ] F) (fun b : B => (e.coordChangeL π•œ e' b : F β†’L[π•œ] F)) x :=
   contMDiffAt_coordChangeL IB h h'
 
 variable {IB}
+variable {s : Set M} {f : M β†’ B} {g : M β†’ F} {x : M}
 
-protected theorem ContMDiffWithinAt.coordChangeL {f : M β†’ B}
+protected theorem ContMDiffWithinAt.coordChangeL
     (hf : ContMDiffWithinAt IM IB n f s x) (he : f x ∈ e.baseSet) (he' : f x ∈ e'.baseSet) :
     ContMDiffWithinAt IM π“˜(π•œ, F β†’L[π•œ] F) n (fun y ↦ (e.coordChangeL π•œ e' (f y) : F β†’L[π•œ] F)) s x :=
   (contMDiffAt_coordChangeL IB he he').comp_contMDiffWithinAt _ hf
 
-protected nonrec theorem ContMDiffAt.coordChangeL {f : M β†’ B}
+protected nonrec theorem ContMDiffAt.coordChangeL
     (hf : ContMDiffAt IM IB n f x) (he : f x ∈ e.baseSet) (he' : f x ∈ e'.baseSet) :
     ContMDiffAt IM π“˜(π•œ, F β†’L[π•œ] F) n (fun y ↦ (e.coordChangeL π•œ e' (f y) : F β†’L[π•œ] F)) x :=
   hf.coordChangeL he he'
 
-protected theorem ContMDiffOn.coordChangeL {f : M β†’ B}
+protected theorem ContMDiffOn.coordChangeL
     (hf : ContMDiffOn IM IB n f s) (he : MapsTo f s e.baseSet) (he' : MapsTo f s e'.baseSet) :
     ContMDiffOn IM π“˜(π•œ, F β†’L[π•œ] F) n (fun y ↦ (e.coordChangeL π•œ e' (f y) : F β†’L[π•œ] F)) s :=
   fun x hx ↦ (hf x hx).coordChangeL (he hx) (he' hx)
 
-protected theorem ContMDiff.coordChangeL {f : M β†’ B}
+protected theorem ContMDiff.coordChangeL
     (hf : ContMDiff IM IB n f) (he : βˆ€ x, f x ∈ e.baseSet) (he' : βˆ€ x, f x ∈ e'.baseSet) :
     ContMDiff IM π“˜(π•œ, F β†’L[π•œ] F) n (fun y ↦ (e.coordChangeL π•œ e' (f y) : F β†’L[π•œ] F)) := fun x ↦
   (hf x).coordChangeL (he x) (he' x)
 
-protected nonrec theorem SmoothWithinAt.coordChangeL {f : M β†’ B}
+protected nonrec theorem SmoothWithinAt.coordChangeL
     (hf : SmoothWithinAt IM IB f s x) (he : f x ∈ e.baseSet) (he' : f x ∈ e'.baseSet) :
     SmoothWithinAt IM π“˜(π•œ, F β†’L[π•œ] F) (fun y ↦ (e.coordChangeL π•œ e' (f y) : F β†’L[π•œ] F)) s x :=
   hf.coordChangeL he he'
 
-protected nonrec theorem SmoothAt.coordChangeL {f : M β†’ B}
+protected nonrec theorem SmoothAt.coordChangeL
     (hf : SmoothAt IM IB f x) (he : f x ∈ e.baseSet) (he' : f x ∈ e'.baseSet) :
     SmoothAt IM π“˜(π•œ, F β†’L[π•œ] F) (fun y ↦ (e.coordChangeL π•œ e' (f y) : F β†’L[π•œ] F)) x :=
   hf.coordChangeL he he'
 
-protected nonrec theorem SmoothOn.coordChangeL {f : M β†’ B}
+protected nonrec theorem SmoothOn.coordChangeL
     (hf : SmoothOn IM IB f s) (he : MapsTo f s e.baseSet) (he' : MapsTo f s e'.baseSet) :
     SmoothOn IM π“˜(π•œ, F β†’L[π•œ] F) (fun y ↦ (e.coordChangeL π•œ e' (f y) : F β†’L[π•œ] F)) s :=
   hf.coordChangeL he he'
 
-protected nonrec theorem Smooth.coordChangeL {f : M β†’ B}
+protected nonrec theorem Smooth.coordChangeL
     (hf : Smooth IM IB f) (he : βˆ€ x, f x ∈ e.baseSet) (he' : βˆ€ x, f x ∈ e'.baseSet) :
     Smooth IM π“˜(π•œ, F β†’L[π•œ] F) (fun y ↦ (e.coordChangeL π•œ e' (f y) : F β†’L[π•œ] F)) :=
   hf.coordChangeL he he'
 
-protected theorem ContMDiffWithinAt.coordChange {f : M β†’ B} {g : M β†’ F}
+protected theorem ContMDiffWithinAt.coordChange
     (hf : ContMDiffWithinAt IM IB n f s x) (hg : ContMDiffWithinAt IM π“˜(π•œ, F) n g s x)
     (he : f x ∈ e.baseSet) (he' : f x ∈ e'.baseSet) :
     ContMDiffWithinAt IM π“˜(π•œ, F) n (fun y ↦ e.coordChange e' (f y) (g y)) s x := by
@@ -390,39 +388,39 @@ protected theorem ContMDiffWithinAt.coordChange {f : M β†’ B} {g : M β†’ F}
     exact (Trivialization.coordChangeL_apply' e e' hy (g y)).symm
   · exact (Trivialization.coordChangeL_apply' e e' ⟨he, he'⟩ (g x)).symm
 
-protected nonrec theorem ContMDiffAt.coordChange {f : M β†’ B} {g : M β†’ F}
+protected nonrec theorem ContMDiffAt.coordChange
     (hf : ContMDiffAt IM IB n f x) (hg : ContMDiffAt IM π“˜(π•œ, F) n g x) (he : f x ∈ e.baseSet)
     (he' : f x ∈ e'.baseSet) :
     ContMDiffAt IM π“˜(π•œ, F) n (fun y ↦ e.coordChange e' (f y) (g y)) x :=
   hf.coordChange hg he he'
 
-protected theorem ContMDiffOn.coordChange {f : M β†’ B} {g : M β†’ F} (hf : ContMDiffOn IM IB n f s)
+protected theorem ContMDiffOn.coordChange (hf : ContMDiffOn IM IB n f s)
     (hg : ContMDiffOn IM π“˜(π•œ, F) n g s) (he : MapsTo f s e.baseSet) (he' : MapsTo f s e'.baseSet) :
     ContMDiffOn IM π“˜(π•œ, F) n (fun y ↦ e.coordChange e' (f y) (g y)) s := fun x hx ↦
   (hf x hx).coordChange (hg x hx) (he hx) (he' hx)
 
-protected theorem ContMDiff.coordChange {f : M β†’ B} {g : M β†’ F} (hf : ContMDiff IM IB n f)
+protected theorem ContMDiff.coordChange (hf : ContMDiff IM IB n f)
     (hg : ContMDiff IM π“˜(π•œ, F) n g) (he : βˆ€ x, f x ∈ e.baseSet) (he' : βˆ€ x, f x ∈ e'.baseSet) :
     ContMDiff IM π“˜(π•œ, F) n (fun y ↦ e.coordChange e' (f y) (g y)) := fun x ↦
   (hf x).coordChange (hg x) (he x) (he' x)
 
-protected nonrec theorem SmoothWithinAt.coordChange {f : M β†’ B} {g : M β†’ F}
+protected nonrec theorem SmoothWithinAt.coordChange
     (hf : SmoothWithinAt IM IB f s x) (hg : SmoothWithinAt IM π“˜(π•œ, F) g s x)
     (he : f x ∈ e.baseSet) (he' : f x ∈ e'.baseSet) :
     SmoothWithinAt IM π“˜(π•œ, F) (fun y ↦ e.coordChange e' (f y) (g y)) s x :=
   hf.coordChange hg he he'
 
-protected nonrec theorem SmoothAt.coordChange {f : M β†’ B} {g : M β†’ F} (hf : SmoothAt IM IB f x)
+protected nonrec theorem SmoothAt.coordChange (hf : SmoothAt IM IB f x)
     (hg : SmoothAt IM π“˜(π•œ, F) g x) (he : f x ∈ e.baseSet) (he' : f x ∈ e'.baseSet) :
     SmoothAt IM π“˜(π•œ, F) (fun y ↦ e.coordChange e' (f y) (g y)) x :=
   hf.coordChange hg he he'
 
-protected nonrec theorem SmoothOn.coordChange {f : M β†’ B} {g : M β†’ F} (hf : SmoothOn IM IB f s)
+protected nonrec theorem SmoothOn.coordChange (hf : SmoothOn IM IB f s)
     (hg : SmoothOn IM π“˜(π•œ, F) g s) (he : MapsTo f s e.baseSet) (he' : MapsTo f s e'.baseSet) :
     SmoothOn IM π“˜(π•œ, F) (fun y ↦ e.coordChange e' (f y) (g y)) s :=
   hf.coordChange hg he he'
 
-protected theorem Smooth.coordChange {f : M β†’ B} {g : M β†’ F} (hf : Smooth IM IB f)
+protected theorem Smooth.coordChange (hf : Smooth IM IB f)
     (hg : Smooth IM π“˜(π•œ, F) g) (he : βˆ€ x, f x ∈ e.baseSet) (he' : βˆ€ x, f x ∈ e'.baseSet) :
     Smooth IM π“˜(π•œ, F) (fun y ↦ e.coordChange e' (f y) (g y)) := fun x ↦
   (hf x).coordChange (hg x) (he x) (he' x)
chore: last LocalHomeomorph -> PartialHomeomorph renames (#9238)

Follow-up to #8982; a few lemma names were still wrong.

Co-authored-by: Winston Yin <winstonyin@gmail.com>

Diff
@@ -479,7 +479,7 @@ instance SmoothFiberwiseLinear.hasGroupoid :
     refine' ⟨_, _, e.open_baseSet.inter e'.open_baseSet, smoothOn_coordChangeL IB e e',
       smoothOn_symm_coordChangeL IB e e', _⟩
     refine PartialHomeomorph.eqOnSourceSetoid.symm ⟨?_, ?_⟩
-    Β· simp only [e.symm_trans_source_eq e', FiberwiseLinear.localHomeomorph, trans_toPartialEquiv,
+    Β· simp only [e.symm_trans_source_eq e', FiberwiseLinear.partialHomeomorph, trans_toPartialEquiv,
         symm_toPartialEquiv]
     · rintro ⟨b, v⟩ hb
       exact (e.apply_symm_apply_eq_coordChangeL e' hb.1 v).symm
chore: audit remaining uses of "local homeomorphism" in comments (#9245)

Almost all of them should speak about partial homeomorphisms instead. In two cases, I decided removing the "local" was clearer than adding "partial".

Follow-up to #8982; complements #9238.

Diff
@@ -20,7 +20,7 @@ is also a charted space over `H Γ— F`.
 
 Now, we define `SmoothVectorBundle` as the `Prop` of having smooth transition functions.
 Recall the structure groupoid `smoothFiberwiseLinear` on `B Γ— F` consisting of smooth, fiberwise
-linear local homeomorphisms.  We show that our definition of "smooth vector bundle" implies
+linear partial homeomorphisms.  We show that our definition of "smooth vector bundle" implies
 `HasGroupoid` for this groupoid, and show (by a "composition" of `HasGroupoid` instances) that
 this means that a smooth vector bundle is a smooth manifold.
 
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
@@ -140,19 +140,19 @@ variable [TopologicalSpace B] [ChartedSpace HB B] [FiberBundle F E]
 
 protected theorem FiberBundle.extChartAt (x : TotalSpace F E) :
     extChartAt (IB.prod π“˜(π•œ, F)) x =
-      (trivializationAt F E x.proj).toLocalEquiv ≫
-        (extChartAt IB x.proj).prod (LocalEquiv.refl F) := by
+      (trivializationAt F E x.proj).toPartialEquiv ≫
+        (extChartAt IB x.proj).prod (PartialEquiv.refl F) := by
   simp_rw [extChartAt, FiberBundle.chartedSpace_chartAt, extend]
-  simp only [LocalEquiv.trans_assoc, mfld_simps]
+  simp only [PartialEquiv.trans_assoc, mfld_simps]
   -- porting note: should not be needed
-  rw [LocalEquiv.prod_trans, LocalEquiv.refl_trans]
+  rw [PartialEquiv.prod_trans, PartialEquiv.refl_trans]
 #align fiber_bundle.ext_chart_at FiberBundle.extChartAt
 
 protected theorem FiberBundle.extChartAt_target (x : TotalSpace F E) :
     (extChartAt (IB.prod π“˜(π•œ, F)) x).target =
       ((extChartAt IB x.proj).target ∩
         (extChartAt IB x.proj).symm ⁻¹' (trivializationAt F E x.proj).baseSet) Γ—Λ’ univ := by
-  rw [FiberBundle.extChartAt, LocalEquiv.trans_target, Trivialization.target_eq, inter_prod]
+  rw [FiberBundle.extChartAt, PartialEquiv.trans_target, Trivialization.target_eq, inter_prod]
   rfl
 
 theorem FiberBundle.writtenInExtChartAt_trivializationAt {x : TotalSpace F E} {y}
@@ -185,9 +185,9 @@ theorem contMDiffWithinAt_totalSpace (f : M β†’ TotalSpace F E) {s : Set M} {x
   simp (config := { singlePass := true }) only [contMDiffWithinAt_iff_target]
   rw [and_and_and_comm, ← FiberBundle.continuousWithinAt_totalSpace, and_congr_right_iff]
   intro hf
-  simp_rw [modelWithCornersSelf_prod, FiberBundle.extChartAt, Function.comp, LocalEquiv.trans_apply,
-    LocalEquiv.prod_coe, LocalEquiv.refl_coe, extChartAt_self_apply, modelWithCornersSelf_coe,
-    id_def]
+  simp_rw [modelWithCornersSelf_prod, FiberBundle.extChartAt, Function.comp,
+    PartialEquiv.trans_apply, PartialEquiv.prod_coe, PartialEquiv.refl_coe, extChartAt_self_apply,
+    modelWithCornersSelf_coe, id_def]
   refine (contMDiffWithinAt_prod_iff _).trans (and_congr ?_ Iff.rfl)
   have h1 : (fun x => (f x).proj) ⁻¹' (trivializationAt F E (f xβ‚€).proj).baseSet ∈ 𝓝[s] xβ‚€ :=
     ((FiberBundle.continuous_proj F E).continuousWithinAt.comp hf (mapsTo_image f s))
@@ -479,8 +479,8 @@ instance SmoothFiberwiseLinear.hasGroupoid :
     refine' ⟨_, _, e.open_baseSet.inter e'.open_baseSet, smoothOn_coordChangeL IB e e',
       smoothOn_symm_coordChangeL IB e e', _⟩
     refine PartialHomeomorph.eqOnSourceSetoid.symm ⟨?_, ?_⟩
-    Β· simp only [e.symm_trans_source_eq e', FiberwiseLinear.localHomeomorph, trans_toLocalEquiv,
-        symm_toLocalEquiv]
+    Β· simp only [e.symm_trans_source_eq e', FiberwiseLinear.localHomeomorph, trans_toPartialEquiv,
+        symm_toPartialEquiv]
     · rintro ⟨b, v⟩ hb
       exact (e.apply_symm_apply_eq_coordChangeL e' hb.1 v).symm
 #align smooth_fiberwise_linear.has_groupoid SmoothFiberwiseLinear.hasGroupoid
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
@@ -64,7 +64,7 @@ set_option autoImplicit true
 
 assert_not_exists mfderiv
 
-open Bundle Set LocalHomeomorph
+open Bundle Set PartialHomeomorph
 
 open Function (id_def)
 
@@ -85,15 +85,15 @@ variable [TopologicalSpace F] [TopologicalSpace (TotalSpace F E)] [βˆ€ x, Topolo
 /-- A fiber bundle `E` over a base `B` with model fiber `F` is naturally a charted space modelled on
 `B Γ— F`. -/
 instance FiberBundle.chartedSpace' : ChartedSpace (B Γ— F) (TotalSpace F E) where
-  atlas := (fun e : Trivialization F (Ο€ F E) => e.toLocalHomeomorph) '' trivializationAtlas F E
-  chartAt x := (trivializationAt F E x.proj).toLocalHomeomorph
+  atlas := (fun e : Trivialization F (Ο€ F E) => e.toPartialHomeomorph) '' trivializationAtlas F E
+  chartAt x := (trivializationAt F E x.proj).toPartialHomeomorph
   mem_chart_source x :=
     (trivializationAt F E x.proj).mem_source.mpr (mem_baseSet_trivializationAt F E x.proj)
   chart_mem_atlas _ := mem_image_of_mem _ (trivialization_mem_atlas F E _)
 #align fiber_bundle.charted_space FiberBundle.chartedSpace'
 
 theorem FiberBundle.chartedSpace'_chartAt (x : TotalSpace F E) :
-    chartAt (B Γ— F) x = (trivializationAt F E x.proj).toLocalHomeomorph :=
+    chartAt (B Γ— F) x = (trivializationAt F E x.proj).toPartialHomeomorph :=
   rfl
 
 /- Porting note: In Lean 3, the next instance was inside a section with locally reducible
@@ -110,8 +110,8 @@ instance FiberBundle.chartedSpace : ChartedSpace (ModelProd HB F) (TotalSpace F
 
 theorem FiberBundle.chartedSpace_chartAt (x : TotalSpace F E) :
     chartAt (ModelProd HB F) x =
-      (trivializationAt F E x.proj).toLocalHomeomorph ≫ₕ
-        (chartAt HB x.proj).prod (LocalHomeomorph.refl F) := by
+      (trivializationAt F E x.proj).toPartialHomeomorph ≫ₕ
+        (chartAt HB x.proj).prod (PartialHomeomorph.refl F) := by
   dsimp only [chartAt_comp, prodChartedSpace_chartAt, FiberBundle.chartedSpace'_chartAt,
     chartAt_self_eq]
   rw [Trivialization.coe_coe, Trivialization.coe_fst' _ (mem_baseSet_trivializationAt F E x.proj)]
@@ -164,7 +164,7 @@ theorem FiberBundle.writtenInExtChartAt_trivializationAt {x : TotalSpace F E} {y
 theorem FiberBundle.writtenInExtChartAt_trivializationAt_symm {x : TotalSpace F E} {y}
     (hy : y ∈ (extChartAt (IB.prod π“˜(π•œ, F)) x).target) :
     writtenInExtChartAt (IB.prod π“˜(π•œ, F)) (IB.prod π“˜(π•œ, F)) (trivializationAt F E x.proj x)
-      (trivializationAt F E x.proj).toLocalHomeomorph.symm y = y :=
+      (trivializationAt F E x.proj).toPartialHomeomorph.symm y = y :=
   writtenInExtChartAt_chartAt_symm_comp _ _ hy
 
 /-! ### Smoothness of maps in/out fiber bundles
@@ -193,7 +193,7 @@ theorem contMDiffWithinAt_totalSpace (f : M β†’ TotalSpace F E) {s : Set M} {x
     ((FiberBundle.continuous_proj F E).continuousWithinAt.comp hf (mapsTo_image f s))
       ((Trivialization.open_baseSet _).mem_nhds (mem_baseSet_trivializationAt F E _))
   refine EventuallyEq.contMDiffWithinAt_iff (eventually_of_mem h1 fun x hx => ?_) ?_
-  Β· simp_rw [Function.comp, LocalHomeomorph.coe_coe, Trivialization.coe_coe]
+  Β· simp_rw [Function.comp, PartialHomeomorph.coe_coe, Trivialization.coe_coe]
     rw [Trivialization.coe_fst']
     exact hx
   Β· simp only [mfld_simps]
@@ -431,7 +431,7 @@ variable (IB e e')
 
 theorem Trivialization.contMDiffOn_symm_trans :
     ContMDiffOn (IB.prod π“˜(π•œ, F)) (IB.prod π“˜(π•œ, F)) n
-      (e.toLocalHomeomorph.symm ≫ₕ e'.toLocalHomeomorph) (e.target ∩ e'.target) := by
+      (e.toPartialHomeomorph.symm ≫ₕ e'.toPartialHomeomorph) (e.target ∩ e'.target) := by
   have Hmaps : MapsTo Prod.fst (e.target ∩ e'.target) (e.baseSet ∩ e'.baseSet) := fun x hx ↦
     ⟨e.mem_target.1 hx.1, e'.mem_target.1 hx.2⟩
   rw [mapsTo_inter] at Hmaps
@@ -440,7 +440,7 @@ theorem Trivialization.contMDiffOn_symm_trans :
     (contMDiffOn_fst.coordChange contMDiffOn_snd Hmaps.1 Hmaps.2)).congr ?_
   rintro ⟨b, x⟩ hb
   refine Prod.ext ?_ rfl
-  · have : (e.toLocalHomeomorph.symm (b, x)).1 ∈ e'.baseSet
+  · have : (e.toPartialHomeomorph.symm (b, x)).1 ∈ e'.baseSet
     Β· simp_all only [Trivialization.mem_target, mfld_simps]
     exact (e'.coe_fst' this).trans (e.proj_symm_apply hb.1)
 
@@ -478,7 +478,7 @@ instance SmoothFiberwiseLinear.hasGroupoid :
     rw [mem_smoothFiberwiseLinear_iff]
     refine' ⟨_, _, e.open_baseSet.inter e'.open_baseSet, smoothOn_coordChangeL IB e e',
       smoothOn_symm_coordChangeL IB e e', _⟩
-    refine LocalHomeomorph.eqOnSourceSetoid.symm ⟨?_, ?_⟩
+    refine PartialHomeomorph.eqOnSourceSetoid.symm ⟨?_, ?_⟩
     Β· simp only [e.symm_trans_source_eq e', FiberwiseLinear.localHomeomorph, trans_toLocalEquiv,
         symm_toLocalEquiv]
     · rintro ⟨b, v⟩ hb
@@ -566,8 +566,8 @@ theorem Trivialization.smoothOn (e : Trivialization F (Ο€ F E)) [MemTrivializati
   exact (this.1.prod_mk this.2).congr fun x hx ↦ (e.mk_proj_snd hx).symm
 
 theorem Trivialization.smoothOn_symm (e : Trivialization F (Ο€ F E)) [MemTrivializationAtlas e] :
-    SmoothOn (IB.prod π“˜(π•œ, F)) (IB.prod π“˜(π•œ, F)) e.toLocalHomeomorph.symm e.target := by
-  rw [e.smoothOn_iff IB e.toLocalHomeomorph.symm_mapsTo]
+    SmoothOn (IB.prod π“˜(π•œ, F)) (IB.prod π“˜(π•œ, F)) e.toPartialHomeomorph.symm e.target := by
+  rw [e.smoothOn_iff IB e.toPartialHomeomorph.symm_mapsTo]
   refine ⟨smoothOn_fst.congr fun x hx ↦ e.proj_symm_apply hx, smoothOn_snd.congr fun x hx ↦ ?_⟩
   rw [e.apply_symm_apply hx]
 
chore: split Geometry/Manifold/ContMDiff (#8726)

At about 2200 lines, this is currently the longest file in the Geometry/Manifolds.

(It also moves the slowly compiling proof of ContMDiffWithinAt.cle_arrowCongr out of a common recompilation path.)

Diff
@@ -3,6 +3,7 @@ Copyright (c) 2022 Floris van Doorn, Heather Macbeth. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn, Heather Macbeth
 -/
+import Mathlib.Geometry.Manifold.ContMDiff.Atlas
 import Mathlib.Geometry.Manifold.VectorBundle.FiberwiseLinear
 import Mathlib.Topology.VectorBundle.Constructions
 
fix: disable autoImplicit globally (#6528)

Autoimplicits are highly controversial and also defeat the performance-improving work in #6474.

The intent of this PR is to make autoImplicit opt-in on a per-file basis, by disabling it in the lakefile and enabling it again with set_option autoImplicit true in the few files that rely on it.

That also keeps this PR small, as opposed to attempting to "fix" files to not need it any more.

I claim that many of the uses of autoImplicit in these files are accidental; situations such as:

  • Assuming variables are in scope, but pasting the lemma in the wrong section
  • Pasting in a lemma from a scratch file without checking to see if the variable names are consistent with the rest of the file
  • Making a copy-paste error between lemmas and forgetting to add an explicit arguments.

Having set_option autoImplicit false as the default prevents these types of mistake being made in the 90% of files where autoImplicits are not used at all, and causes them to be caught by CI during review.

I think there were various points during the port where we encouraged porters to delete the universes u v lines; I think having autoparams for universe variables only would cover a lot of the cases we actually use them, while avoiding any real shortcomings.

A Zulip poll (after combining overlapping votes accordingly) was in favor of this change with 5:5:18 as the no:dontcare:yes vote ratio.

While this PR was being reviewed, a handful of files gained some more likely-accidental autoImplicits. In these places, set_option autoImplicit true has been placed locally within a section, rather than at the top of the file.

Diff
@@ -58,6 +58,8 @@ fields, they can also be C^k vector bundles, etc.
   bundle.
 -/
 
+set_option autoImplicit true
+
 
 assert_not_exists mfderiv
 
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
@@ -69,7 +69,7 @@ open Filter
 
 open scoped Manifold Bundle Topology
 
-variable {π•œ B B' F M : Type _} {E : B β†’ Type _}
+variable {π•œ B B' F M : Type*} {E : B β†’ Type*}
 
 /-! ### Charted space structure on a fiber bundle -/
 
@@ -77,7 +77,7 @@ variable {π•œ B B' F M : Type _} {E : B β†’ Type _}
 section
 
 variable [TopologicalSpace F] [TopologicalSpace (TotalSpace F E)] [βˆ€ x, TopologicalSpace (E x)]
-  {HB : Type _} [TopologicalSpace HB] [TopologicalSpace B] [ChartedSpace HB B] [FiberBundle F E]
+  {HB : Type*} [TopologicalSpace HB] [TopologicalSpace B] [ChartedSpace HB B] [FiberBundle F E]
 
 /-- A fiber bundle `E` over a base `B` with model fiber `F` is naturally a charted space modelled on
 `B Γ— F`. -/
@@ -126,10 +126,10 @@ end
 section
 
 variable [NontriviallyNormedField π•œ] [NormedAddCommGroup F] [NormedSpace π•œ F]
-  [TopologicalSpace (TotalSpace F E)] [βˆ€ x, TopologicalSpace (E x)] {EB : Type _}
-  [NormedAddCommGroup EB] [NormedSpace π•œ EB] {HB : Type _} [TopologicalSpace HB]
-  (IB : ModelWithCorners π•œ EB HB) (E' : B β†’ Type _) [βˆ€ x, Zero (E' x)] {EM : Type _}
-  [NormedAddCommGroup EM] [NormedSpace π•œ EM] {HM : Type _} [TopologicalSpace HM]
+  [TopologicalSpace (TotalSpace F E)] [βˆ€ x, TopologicalSpace (E x)] {EB : Type*}
+  [NormedAddCommGroup EB] [NormedSpace π•œ EB] {HB : Type*} [TopologicalSpace HB]
+  (IB : ModelWithCorners π•œ EB HB) (E' : B β†’ Type*) [βˆ€ x, Zero (E' x)] {EM : Type*}
+  [NormedAddCommGroup EM] [NormedSpace π•œ EM] {HM : Type*} [TopologicalSpace HM]
   {IM : ModelWithCorners π•œ EM HM} [TopologicalSpace M] [ChartedSpace HM M]
   [Is : SmoothManifoldWithCorners IM M] {n : β„•βˆž}
 
@@ -269,10 +269,10 @@ end
 /-! ### Smooth vector bundles -/
 
 
-variable [NontriviallyNormedField π•œ] {EB : Type _} [NormedAddCommGroup EB] [NormedSpace π•œ EB]
-  {HB : Type _} [TopologicalSpace HB] (IB : ModelWithCorners π•œ EB HB) [TopologicalSpace B]
-  [ChartedSpace HB B] [SmoothManifoldWithCorners IB B] {EM : Type _} [NormedAddCommGroup EM]
-  [NormedSpace π•œ EM] {HM : Type _} [TopologicalSpace HM] {IM : ModelWithCorners π•œ EM HM}
+variable [NontriviallyNormedField π•œ] {EB : Type*} [NormedAddCommGroup EB] [NormedSpace π•œ EB]
+  {HB : Type*} [TopologicalSpace HB] (IB : ModelWithCorners π•œ EB HB) [TopologicalSpace B]
+  [ChartedSpace HB B] [SmoothManifoldWithCorners IB B] {EM : Type*} [NormedAddCommGroup EM]
+  [NormedSpace π•œ EM] {HM : Type*} [TopologicalSpace HM] {IM : ModelWithCorners π•œ EM HM}
   [TopologicalSpace M] [ChartedSpace HM M] [Is : SmoothManifoldWithCorners IM M] {n : β„•βˆž}
   [βˆ€ x, AddCommMonoid (E x)] [βˆ€ x, Module π•œ (E x)] [NormedAddCommGroup F] [NormedSpace π•œ F]
 
@@ -574,7 +574,7 @@ end
 
 namespace VectorBundleCore
 
-variable {ΞΉ : Type _} {F}
+variable {ΞΉ : Type*} {F}
 variable (Z : VectorBundleCore π•œ B F ΞΉ)
 
 /-- Mixin for a `VectorBundleCore` stating smoothness (of transition functions). -/
@@ -620,10 +620,10 @@ instance Bundle.Trivial.smoothVectorBundle : SmoothVectorBundle F (Bundle.Trivia
 
 section Prod
 
-variable (F₁ : Type _) [NormedAddCommGroup F₁] [NormedSpace π•œ F₁] (E₁ : B β†’ Type _)
+variable (F₁ : Type*) [NormedAddCommGroup F₁] [NormedSpace π•œ F₁] (E₁ : B β†’ Type*)
   [TopologicalSpace (TotalSpace F₁ E₁)] [βˆ€ x, AddCommMonoid (E₁ x)] [βˆ€ x, Module π•œ (E₁ x)]
 
-variable (Fβ‚‚ : Type _) [NormedAddCommGroup Fβ‚‚] [NormedSpace π•œ Fβ‚‚] (Eβ‚‚ : B β†’ Type _)
+variable (Fβ‚‚ : Type*) [NormedAddCommGroup Fβ‚‚] [NormedSpace π•œ Fβ‚‚] (Eβ‚‚ : B β†’ Type*)
   [TopologicalSpace (TotalSpace Fβ‚‚ Eβ‚‚)] [βˆ€ x, AddCommMonoid (Eβ‚‚ x)] [βˆ€ x, Module π•œ (Eβ‚‚ x)]
 
 variable [βˆ€ x : B, TopologicalSpace (E₁ x)] [βˆ€ x : B, TopologicalSpace (Eβ‚‚ x)] [FiberBundle F₁ E₁]
feat: lemmas about writtenInExtChartAt (#5495)
Diff
@@ -145,13 +145,31 @@ protected theorem FiberBundle.extChartAt (x : TotalSpace F E) :
   rw [LocalEquiv.prod_trans, LocalEquiv.refl_trans]
 #align fiber_bundle.ext_chart_at FiberBundle.extChartAt
 
+protected theorem FiberBundle.extChartAt_target (x : TotalSpace F E) :
+    (extChartAt (IB.prod π“˜(π•œ, F)) x).target =
+      ((extChartAt IB x.proj).target ∩
+        (extChartAt IB x.proj).symm ⁻¹' (trivializationAt F E x.proj).baseSet) Γ—Λ’ univ := by
+  rw [FiberBundle.extChartAt, LocalEquiv.trans_target, Trivialization.target_eq, inter_prod]
+  rfl
+
+theorem FiberBundle.writtenInExtChartAt_trivializationAt {x : TotalSpace F E} {y}
+    (hy : y ∈ (extChartAt (IB.prod π“˜(π•œ, F)) x).target) :
+    writtenInExtChartAt (IB.prod π“˜(π•œ, F)) (IB.prod π“˜(π•œ, F)) x
+      (trivializationAt F E x.proj) y = y :=
+  writtenInExtChartAt_chartAt_comp _ _ hy
+
+theorem FiberBundle.writtenInExtChartAt_trivializationAt_symm {x : TotalSpace F E} {y}
+    (hy : y ∈ (extChartAt (IB.prod π“˜(π•œ, F)) x).target) :
+    writtenInExtChartAt (IB.prod π“˜(π•œ, F)) (IB.prod π“˜(π•œ, F)) (trivializationAt F E x.proj x)
+      (trivializationAt F E x.proj).toLocalHomeomorph.symm y = y :=
+  writtenInExtChartAt_chartAt_symm_comp _ _ hy
+
 /-! ### Smoothness of maps in/out fiber bundles
 
 Note: For these results we don't need that the bundle is a smooth vector bundle, or even a vector
 bundle at all, just that it is a fiber bundle over a charted base space.
 -/
 
-
 namespace Bundle
 
 variable {IB}
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,15 +2,12 @@
 Copyright (c) 2022 Floris van Doorn, Heather Macbeth. 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.basic
-! 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.FiberwiseLinear
 import Mathlib.Topology.VectorBundle.Constructions
 
+#align_import geometry.manifold.vector_bundle.basic from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
+
 /-! # Smooth vector bundles
 
 This file defines smooth vector bundles over a smooth manifold.
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.basic
-! leanprover-community/mathlib commit f9ec187127cc5b381dfcf5f4a22dacca4c20b63d
+! leanprover-community/mathlib commit e473c3198bb41f68560cab68a0529c854b618833
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -79,20 +79,20 @@ variable {π•œ B B' F M : Type _} {E : B β†’ Type _}
 
 section
 
-variable [TopologicalSpace F] [TopologicalSpace (TotalSpace E)] [βˆ€ x, TopologicalSpace (E x)]
+variable [TopologicalSpace F] [TopologicalSpace (TotalSpace F E)] [βˆ€ x, TopologicalSpace (E x)]
   {HB : Type _} [TopologicalSpace HB] [TopologicalSpace B] [ChartedSpace HB B] [FiberBundle F E]
 
 /-- A fiber bundle `E` over a base `B` with model fiber `F` is naturally a charted space modelled on
 `B Γ— F`. -/
-instance FiberBundle.chartedSpace' : ChartedSpace (B Γ— F) (TotalSpace E) where
-  atlas := (fun e : Trivialization F (Ο€ E) => e.toLocalHomeomorph) '' trivializationAtlas F E
+instance FiberBundle.chartedSpace' : ChartedSpace (B Γ— F) (TotalSpace F E) where
+  atlas := (fun e : Trivialization F (Ο€ F E) => e.toLocalHomeomorph) '' trivializationAtlas F E
   chartAt x := (trivializationAt F E x.proj).toLocalHomeomorph
   mem_chart_source x :=
     (trivializationAt F E x.proj).mem_source.mpr (mem_baseSet_trivializationAt F E x.proj)
   chart_mem_atlas _ := mem_image_of_mem _ (trivialization_mem_atlas F E _)
 #align fiber_bundle.charted_space FiberBundle.chartedSpace'
 
-theorem FiberBundle.chartedSpace'_chartAt (x : TotalSpace E) :
+theorem FiberBundle.chartedSpace'_chartAt (x : TotalSpace F E) :
     chartAt (B Γ— F) x = (trivializationAt F E x.proj).toLocalHomeomorph :=
   rfl
 
@@ -104,11 +104,11 @@ gives the same instance.
 
 /-- Let `B` be a charted space modelled on `HB`.  Then a fiber bundle `E` over a base `B` with model
 fiber `F` is naturally a charted space modelled on `HB.prod F`. -/
-instance FiberBundle.chartedSpace : ChartedSpace (ModelProd HB F) (TotalSpace E) :=
+instance FiberBundle.chartedSpace : ChartedSpace (ModelProd HB F) (TotalSpace F E) :=
   ChartedSpace.comp _ (B Γ— F) _
 #align fiber_bundle.charted_space' FiberBundle.chartedSpace
 
-theorem FiberBundle.chartedSpace_chartAt (x : TotalSpace E) :
+theorem FiberBundle.chartedSpace_chartAt (x : TotalSpace F E) :
     chartAt (ModelProd HB F) x =
       (trivializationAt F E x.proj).toLocalHomeomorph ≫ₕ
         (chartAt HB x.proj).prod (LocalHomeomorph.refl F) := by
@@ -117,7 +117,7 @@ theorem FiberBundle.chartedSpace_chartAt (x : TotalSpace E) :
   rw [Trivialization.coe_coe, Trivialization.coe_fst' _ (mem_baseSet_trivializationAt F E x.proj)]
 #align fiber_bundle.charted_space_chart_at FiberBundle.chartedSpace_chartAt
 
-theorem FiberBundle.chartedSpace_chartAt_symm_fst (x : TotalSpace E) (y : ModelProd HB F)
+theorem FiberBundle.chartedSpace_chartAt_symm_fst (x : TotalSpace F E) (y : ModelProd HB F)
     (hy : y ∈ (chartAt (ModelProd HB F) x).target) :
     ((chartAt (ModelProd HB F) x).symm y).proj = (chartAt HB x.proj).symm y.1 := by
   simp only [FiberBundle.chartedSpace_chartAt, mfld_simps] at hy ⊒
@@ -129,7 +129,7 @@ end
 section
 
 variable [NontriviallyNormedField π•œ] [NormedAddCommGroup F] [NormedSpace π•œ F]
-  [TopologicalSpace (TotalSpace E)] [βˆ€ x, TopologicalSpace (E x)] {EB : Type _}
+  [TopologicalSpace (TotalSpace F E)] [βˆ€ x, TopologicalSpace (E x)] {EB : Type _}
   [NormedAddCommGroup EB] [NormedSpace π•œ EB] {HB : Type _} [TopologicalSpace HB]
   (IB : ModelWithCorners π•œ EB HB) (E' : B β†’ Type _) [βˆ€ x, Zero (E' x)] {EM : Type _}
   [NormedAddCommGroup EM] [NormedSpace π•œ EM] {HM : Type _} [TopologicalSpace HM]
@@ -138,7 +138,7 @@ variable [NontriviallyNormedField π•œ] [NormedAddCommGroup F] [NormedSpace π•œ
 
 variable [TopologicalSpace B] [ChartedSpace HB B] [FiberBundle F E]
 
-protected theorem FiberBundle.extChartAt (x : TotalSpace E) :
+protected theorem FiberBundle.extChartAt (x : TotalSpace F E) :
     extChartAt (IB.prod π“˜(π•œ, F)) x =
       (trivializationAt F E x.proj).toLocalEquiv ≫
         (extChartAt IB x.proj).prod (LocalEquiv.refl F) := by
@@ -160,7 +160,7 @@ namespace Bundle
 variable {IB}
 
 /-- Characterization of C^n functions into a smooth vector bundle. -/
-theorem contMDiffWithinAt_totalSpace (f : M β†’ TotalSpace E) {s : Set M} {xβ‚€ : M} :
+theorem contMDiffWithinAt_totalSpace (f : M β†’ TotalSpace F E) {s : Set M} {xβ‚€ : M} :
     ContMDiffWithinAt IM (IB.prod π“˜(π•œ, F)) n f s xβ‚€ ↔
       ContMDiffWithinAt IM IB n (fun x => (f x).proj) s xβ‚€ ∧
       ContMDiffWithinAt IM π“˜(π•œ, F) n (fun x ↦ (trivializationAt F E (f xβ‚€).proj (f x)).2) s xβ‚€ := by
@@ -182,7 +182,7 @@ theorem contMDiffWithinAt_totalSpace (f : M β†’ TotalSpace E) {s : Set M} {xβ‚€
 #align bundle.cont_mdiff_within_at_total_space Bundle.contMDiffWithinAt_totalSpace
 
 /-- Characterization of C^n functions into a smooth vector bundle. -/
-theorem contMDiffAt_totalSpace (f : M β†’ TotalSpace E) (xβ‚€ : M) :
+theorem contMDiffAt_totalSpace (f : M β†’ TotalSpace F E) (xβ‚€ : M) :
     ContMDiffAt IM (IB.prod π“˜(π•œ, F)) n f xβ‚€ ↔
       ContMDiffAt IM IB n (fun x => (f x).proj) xβ‚€ ∧
         ContMDiffAt IM π“˜(π•œ, F) n (fun x => (trivializationAt F E (f xβ‚€).proj (f x)).2) xβ‚€ := by
@@ -191,53 +191,54 @@ theorem contMDiffAt_totalSpace (f : M β†’ TotalSpace E) (xβ‚€ : M) :
 
 /-- Characterization of C^n sections of a smooth vector bundle. -/
 theorem contMDiffAt_section (s : βˆ€ x, E x) (xβ‚€ : B) :
-    ContMDiffAt IB (IB.prod π“˜(π•œ, F)) n (fun x => totalSpaceMk x (s x)) xβ‚€ ↔
-      ContMDiffAt IB π“˜(π•œ, F) n (fun x ↦ (trivializationAt F E xβ‚€ (totalSpaceMk x (s x))).2) xβ‚€ := by
+    ContMDiffAt IB (IB.prod π“˜(π•œ, F)) n (fun x => TotalSpace.mk' F x (s x)) xβ‚€ ↔
+      ContMDiffAt IB π“˜(π•œ, F) n (fun x ↦ (trivializationAt F E xβ‚€ ⟨x, s x⟩).2) xβ‚€ := by
   simp_rw [contMDiffAt_totalSpace, and_iff_right_iff_imp]; intro; exact contMDiffAt_id
 #align bundle.cont_mdiff_at_section Bundle.contMDiffAt_section
 
 variable (E)
 
-theorem contMDiff_proj : ContMDiff (IB.prod π“˜(π•œ, F)) IB n (Ο€ E) := fun x ↦ by
+theorem contMDiff_proj : ContMDiff (IB.prod π“˜(π•œ, F)) IB n (Ο€ F E) := fun x ↦ by
   have : ContMDiffAt (IB.prod π“˜(π•œ, F)) (IB.prod π“˜(π•œ, F)) n id x := contMDiffAt_id
   rw [contMDiffAt_totalSpace] at this
   exact this.1
 #align bundle.cont_mdiff_proj Bundle.contMDiff_proj
 
-theorem smooth_proj : Smooth (IB.prod π“˜(π•œ, F)) IB (Ο€ E) :=
+theorem smooth_proj : Smooth (IB.prod π“˜(π•œ, F)) IB (Ο€ F E) :=
   contMDiff_proj E
 #align bundle.smooth_proj Bundle.smooth_proj
 
-theorem contMDiffOn_proj {s : Set (TotalSpace E)} : ContMDiffOn (IB.prod π“˜(π•œ, F)) IB n (Ο€ E) s :=
+theorem contMDiffOn_proj {s : Set (TotalSpace F E)} :
+    ContMDiffOn (IB.prod π“˜(π•œ, F)) IB n (Ο€ F E) s :=
   (Bundle.contMDiff_proj E).contMDiffOn
 #align bundle.cont_mdiff_on_proj Bundle.contMDiffOn_proj
 
-theorem smoothOn_proj {s : Set (TotalSpace E)} : SmoothOn (IB.prod π“˜(π•œ, F)) IB (Ο€ E) s :=
+theorem smoothOn_proj {s : Set (TotalSpace F E)} : SmoothOn (IB.prod π“˜(π•œ, F)) IB (Ο€ F E) s :=
   contMDiffOn_proj E
 #align bundle.smooth_on_proj Bundle.smoothOn_proj
 
-theorem contMDiffAt_proj {p : TotalSpace E} : ContMDiffAt (IB.prod π“˜(π•œ, F)) IB n (Ο€ E) p :=
+theorem contMDiffAt_proj {p : TotalSpace F E} : ContMDiffAt (IB.prod π“˜(π•œ, F)) IB n (Ο€ F E) p :=
   (Bundle.contMDiff_proj E).contMDiffAt
 #align bundle.cont_mdiff_at_proj Bundle.contMDiffAt_proj
 
-theorem smoothAt_proj {p : TotalSpace E} : SmoothAt (IB.prod π“˜(π•œ, F)) IB (Ο€ E) p :=
+theorem smoothAt_proj {p : TotalSpace F E} : SmoothAt (IB.prod π“˜(π•œ, F)) IB (Ο€ F E) p :=
   Bundle.contMDiffAt_proj E
 #align bundle.smooth_at_proj Bundle.smoothAt_proj
 
-theorem contMDiffWithinAt_proj {s : Set (TotalSpace E)} {p : TotalSpace E} :
-    ContMDiffWithinAt (IB.prod π“˜(π•œ, F)) IB n (Ο€ E) s p :=
+theorem contMDiffWithinAt_proj {s : Set (TotalSpace F E)} {p : TotalSpace F E} :
+    ContMDiffWithinAt (IB.prod π“˜(π•œ, F)) IB n (Ο€ F E) s p :=
   (Bundle.contMDiffAt_proj E).contMDiffWithinAt
 #align bundle.cont_mdiff_within_at_proj Bundle.contMDiffWithinAt_proj
 
-theorem smoothWithinAt_proj {s : Set (TotalSpace E)} {p : TotalSpace E} :
-    SmoothWithinAt (IB.prod π“˜(π•œ, F)) IB (Ο€ E) s p :=
+theorem smoothWithinAt_proj {s : Set (TotalSpace F E)} {p : TotalSpace F E} :
+    SmoothWithinAt (IB.prod π“˜(π•œ, F)) IB (Ο€ F E) s p :=
   Bundle.contMDiffWithinAt_proj E
 #align bundle.smooth_within_at_proj Bundle.smoothWithinAt_proj
 
 variable (π•œ) [βˆ€ x, AddCommMonoid (E x)]
 variable [βˆ€ x, Module π•œ (E x)] [VectorBundle π•œ F E]
 
-theorem smooth_zeroSection : Smooth IB (IB.prod π“˜(π•œ, F)) (zeroSection E) := fun x ↦ by
+theorem smooth_zeroSection : Smooth IB (IB.prod π“˜(π•œ, F)) (zeroSection F E) := fun x ↦ by
   unfold zeroSection
   rw [Bundle.contMDiffAt_section]
   apply (contMDiffAt_const (c := 0)).congr_of_eventuallyEq
@@ -262,7 +263,7 @@ variable [NontriviallyNormedField π•œ] {EB : Type _} [NormedAddCommGroup EB] [N
 
 section WithTopology
 
-variable [TopologicalSpace (TotalSpace E)] [βˆ€ x, TopologicalSpace (E x)] (F E)
+variable [TopologicalSpace (TotalSpace F E)] [βˆ€ x, TopologicalSpace (E x)] (F E)
 
 variable [FiberBundle F E] [VectorBundle π•œ F E]
 
@@ -272,7 +273,7 @@ registers that the bundle is smooth, in the sense of having smooth transition fu
 This is a mixin, not carrying any new data. -/
 class SmoothVectorBundle : Prop where
   protected smoothOn_coordChangeL :
-    βˆ€ (e e' : Trivialization F (Ο€ E)) [MemTrivializationAtlas e] [MemTrivializationAtlas e'],
+    βˆ€ (e e' : Trivialization F (Ο€ F E)) [MemTrivializationAtlas e] [MemTrivializationAtlas e'],
       SmoothOn IB π“˜(π•œ, F β†’L[π•œ] F) (fun b : B => (e.coordChangeL π•œ e' b : F β†’L[π•œ] F))
         (e.baseSet ∩ e'.baseSet)
 #align smooth_vector_bundle SmoothVectorBundle
@@ -283,7 +284,7 @@ variable [SmoothVectorBundle F E IB]
 section SmoothCoordChange
 
 variable {F E}
-variable (e e' : Trivialization F (Ο€ E)) [MemTrivializationAtlas e] [MemTrivializationAtlas e']
+variable (e e' : Trivialization F (Ο€ F E)) [MemTrivializationAtlas e] [MemTrivializationAtlas e']
 
 theorem smoothOn_coordChangeL :
     SmoothOn IB π“˜(π•œ, F β†’L[π•œ] F) (fun b : B => (e.coordChangeL π•œ e' b : F β†’L[π•œ] F))
@@ -427,8 +428,8 @@ theorem Trivialization.contMDiffOn_symm_trans :
 
 variable {IB e e'}
 
-theorem ContMDiffWithinAt.change_section_trivialization {f : M β†’ TotalSpace E}
-    (hp : ContMDiffWithinAt IM IB n (Ο€ E ∘ f) s x)
+theorem ContMDiffWithinAt.change_section_trivialization {f : M β†’ TotalSpace F E}
+    (hp : ContMDiffWithinAt IM IB n (Ο€ F E ∘ f) s x)
     (hf : ContMDiffWithinAt IM π“˜(π•œ, F) n (fun y ↦ (e (f y)).2) s x)
     (he : f x ∈ e.source) (he' : f x ∈ e'.source) :
     ContMDiffWithinAt IM π“˜(π•œ, F) n (fun y ↦ (e' (f y)).2) s x := by
@@ -438,8 +439,8 @@ theorem ContMDiffWithinAt.change_section_trivialization {f : M β†’ TotalSpace E}
     rw [Function.comp_apply, e.coordChange_apply_snd _ hy]
   Β· rw [Function.comp_apply, e.coordChange_apply_snd _ he]
 
-theorem Trivialization.contMDiffWithinAt_snd_comp_iffβ‚‚ {f : M β†’ TotalSpace E}
-    (hp : ContMDiffWithinAt IM IB n (Ο€ E ∘ f) s x)
+theorem Trivialization.contMDiffWithinAt_snd_comp_iffβ‚‚ {f : M β†’ TotalSpace F E}
+    (hp : ContMDiffWithinAt IM IB n (Ο€ F E ∘ f) s x)
     (he : f x ∈ e.source) (he' : f x ∈ e'.source) :
     ContMDiffWithinAt IM π“˜(π•œ, F) n (fun y ↦ (e (f y)).2) s x ↔
       ContMDiffWithinAt IM π“˜(π•œ, F) n (fun y ↦ (e' (f y)).2) s x :=
@@ -451,7 +452,7 @@ end SmoothCoordChange
 between two trivializations `e`, `e'` for `E`, considered as charts to `B Γ— F`, is smooth and
 fiberwise linear. -/
 instance SmoothFiberwiseLinear.hasGroupoid :
-    HasGroupoid (TotalSpace E) (smoothFiberwiseLinear B F IB) where
+    HasGroupoid (TotalSpace F E) (smoothFiberwiseLinear B F IB) where
   compatible := by
     rintro _ _ ⟨e, he, rfl⟩ ⟨e', he', rfl⟩
     haveI : MemTrivializationAtlas e := ⟨he⟩
@@ -468,7 +469,7 @@ instance SmoothFiberwiseLinear.hasGroupoid :
 
 /-- A smooth vector bundle `E` is naturally a smooth manifold. -/
 instance Bundle.TotalSpace.smoothManifoldWithCorners :
-    SmoothManifoldWithCorners (IB.prod π“˜(π•œ, F)) (TotalSpace E) := by
+    SmoothManifoldWithCorners (IB.prod π“˜(π•œ, F)) (TotalSpace F E) := by
   refine' { StructureGroupoid.HasGroupoid.comp (smoothFiberwiseLinear B F IB) _ with }
   intro e he
   rw [mem_smoothFiberwiseLinear_iff] at he
@@ -487,9 +488,9 @@ instance Bundle.TotalSpace.smoothManifoldWithCorners :
 section
 
 variable {F E}
-variable {e e' : Trivialization F (Ο€ E)} [MemTrivializationAtlas e] [MemTrivializationAtlas e']
+variable {e e' : Trivialization F (Ο€ F E)} [MemTrivializationAtlas e] [MemTrivializationAtlas e']
 
-theorem Trivialization.contMDiffWithinAt_iff {f : M β†’ TotalSpace E} {s : Set M} {xβ‚€ : M}
+theorem Trivialization.contMDiffWithinAt_iff {f : M β†’ TotalSpace F E} {s : Set M} {xβ‚€ : M}
     (he : f xβ‚€ ∈ e.source) :
     ContMDiffWithinAt IM (IB.prod π“˜(π•œ, F)) n f s xβ‚€ ↔
       ContMDiffWithinAt IM IB n (fun x => (f x).proj) s xβ‚€ ∧
@@ -497,13 +498,13 @@ theorem Trivialization.contMDiffWithinAt_iff {f : M β†’ TotalSpace E} {s : Set M
   (contMDiffWithinAt_totalSpace _).trans <| and_congr_right fun h ↦
     Trivialization.contMDiffWithinAt_snd_comp_iffβ‚‚ h FiberBundle.mem_trivializationAt_proj_source he
 
-theorem Trivialization.contMDiffAt_iff {f : M β†’ TotalSpace E} {xβ‚€ : M} (he : f xβ‚€ ∈ e.source) :
+theorem Trivialization.contMDiffAt_iff {f : M β†’ TotalSpace F E} {xβ‚€ : M} (he : f xβ‚€ ∈ e.source) :
     ContMDiffAt IM (IB.prod π“˜(π•œ, F)) n f xβ‚€ ↔
       ContMDiffAt IM IB n (fun x => (f x).proj) xβ‚€ ∧
       ContMDiffAt IM π“˜(π•œ, F) n (fun x ↦ (e (f x)).2) xβ‚€ :=
   e.contMDiffWithinAt_iff _ he
 
-theorem Trivialization.contMDiffOn_iff {f : M β†’ TotalSpace E} {s : Set M}
+theorem Trivialization.contMDiffOn_iff {f : M β†’ TotalSpace F E} {s : Set M}
     (he : MapsTo f s e.source) :
     ContMDiffOn IM (IB.prod π“˜(π•œ, F)) n f s ↔
       ContMDiffOn IM IB n (fun x => (f x).proj) s ∧
@@ -511,42 +512,42 @@ theorem Trivialization.contMDiffOn_iff {f : M β†’ TotalSpace E} {s : Set M}
   simp only [ContMDiffOn, ← forall_and]
   exact forallβ‚‚_congr fun x hx ↦ e.contMDiffWithinAt_iff IB (he hx)
 
-theorem Trivialization.contMDiff_iff {f : M β†’ TotalSpace E} (he : βˆ€ x, f x ∈ e.source) :
+theorem Trivialization.contMDiff_iff {f : M β†’ TotalSpace F E} (he : βˆ€ x, f x ∈ e.source) :
     ContMDiff IM (IB.prod π“˜(π•œ, F)) n f ↔
       ContMDiff IM IB n (fun x => (f x).proj) ∧
       ContMDiff IM π“˜(π•œ, F) n (fun x ↦ (e (f x)).2) :=
   (forall_congr' fun x ↦ e.contMDiffAt_iff IB (he x)).trans forall_and
 
-theorem Trivialization.smoothWithinAt_iff {f : M β†’ TotalSpace E} {s : Set M} {xβ‚€ : M}
+theorem Trivialization.smoothWithinAt_iff {f : M β†’ TotalSpace F E} {s : Set M} {xβ‚€ : M}
     (he : f xβ‚€ ∈ e.source) :
     SmoothWithinAt IM (IB.prod π“˜(π•œ, F)) f s xβ‚€ ↔
       SmoothWithinAt IM IB (fun x => (f x).proj) s xβ‚€ ∧
       SmoothWithinAt IM π“˜(π•œ, F) (fun x ↦ (e (f x)).2) s xβ‚€ :=
   e.contMDiffWithinAt_iff IB he
 
-theorem Trivialization.smoothAt_iff {f : M β†’ TotalSpace E} {xβ‚€ : M} (he : f xβ‚€ ∈ e.source) :
+theorem Trivialization.smoothAt_iff {f : M β†’ TotalSpace F E} {xβ‚€ : M} (he : f xβ‚€ ∈ e.source) :
     SmoothAt IM (IB.prod π“˜(π•œ, F)) f xβ‚€ ↔
       SmoothAt IM IB (fun x => (f x).proj) xβ‚€ ∧ SmoothAt IM π“˜(π•œ, F) (fun x ↦ (e (f x)).2) xβ‚€ :=
   e.contMDiffAt_iff IB he
 
-theorem Trivialization.smoothOn_iff {f : M β†’ TotalSpace E} {s : Set M}
+theorem Trivialization.smoothOn_iff {f : M β†’ TotalSpace F E} {s : Set M}
     (he : MapsTo f s e.source) :
     SmoothOn IM (IB.prod π“˜(π•œ, F)) f s ↔
       SmoothOn IM IB (fun x => (f x).proj) s ∧ SmoothOn IM π“˜(π•œ, F) (fun x ↦ (e (f x)).2) s :=
   e.contMDiffOn_iff IB he
 
-theorem Trivialization.smooth_iff {f : M β†’ TotalSpace E} (he : βˆ€ x, f x ∈ e.source) :
+theorem Trivialization.smooth_iff {f : M β†’ TotalSpace F E} (he : βˆ€ x, f x ∈ e.source) :
     Smooth IM (IB.prod π“˜(π•œ, F)) f ↔
       Smooth IM IB (fun x => (f x).proj) ∧ Smooth IM π“˜(π•œ, F) (fun x ↦ (e (f x)).2) :=
   e.contMDiff_iff IB he
 
-theorem Trivialization.smoothOn (e : Trivialization F (Ο€ E)) [MemTrivializationAtlas e] :
+theorem Trivialization.smoothOn (e : Trivialization F (Ο€ F E)) [MemTrivializationAtlas e] :
     SmoothOn (IB.prod π“˜(π•œ, F)) (IB.prod π“˜(π•œ, F)) e e.source := by
   have : SmoothOn (IB.prod π“˜(π•œ, F)) (IB.prod π“˜(π•œ, F)) id e.source := smoothOn_id
   rw [e.smoothOn_iff IB (mapsTo_id _)] at this
   exact (this.1.prod_mk this.2).congr fun x hx ↦ (e.mk_proj_snd hx).symm
 
-theorem Trivialization.smoothOn_symm (e : Trivialization F (Ο€ E)) [MemTrivializationAtlas e] :
+theorem Trivialization.smoothOn_symm (e : Trivialization F (Ο€ F E)) [MemTrivializationAtlas e] :
     SmoothOn (IB.prod π“˜(π•œ, F)) (IB.prod π“˜(π•œ, F)) e.toLocalHomeomorph.symm e.target := by
   rw [e.smoothOn_iff IB e.toLocalHomeomorph.symm_mapsTo]
   refine ⟨smoothOn_fst.congr fun x hx ↦ e.proj_symm_apply hx, smoothOn_snd.congr fun x hx ↦ ?_⟩
@@ -605,10 +606,10 @@ instance Bundle.Trivial.smoothVectorBundle : SmoothVectorBundle F (Bundle.Trivia
 section Prod
 
 variable (F₁ : Type _) [NormedAddCommGroup F₁] [NormedSpace π•œ F₁] (E₁ : B β†’ Type _)
-  [TopologicalSpace (TotalSpace E₁)] [βˆ€ x, AddCommMonoid (E₁ x)] [βˆ€ x, Module π•œ (E₁ x)]
+  [TopologicalSpace (TotalSpace F₁ E₁)] [βˆ€ x, AddCommMonoid (E₁ x)] [βˆ€ x, Module π•œ (E₁ x)]
 
 variable (Fβ‚‚ : Type _) [NormedAddCommGroup Fβ‚‚] [NormedSpace π•œ Fβ‚‚] (Eβ‚‚ : B β†’ Type _)
-  [TopologicalSpace (TotalSpace Eβ‚‚)] [βˆ€ x, AddCommMonoid (Eβ‚‚ x)] [βˆ€ x, Module π•œ (Eβ‚‚ x)]
+  [TopologicalSpace (TotalSpace Fβ‚‚ Eβ‚‚)] [βˆ€ x, AddCommMonoid (Eβ‚‚ x)] [βˆ€ x, Module π•œ (Eβ‚‚ x)]
 
 variable [βˆ€ x : B, TopologicalSpace (E₁ x)] [βˆ€ x : B, TopologicalSpace (Eβ‚‚ x)] [FiberBundle F₁ E₁]
   [FiberBundle Fβ‚‚ Eβ‚‚] [VectorBundle π•œ F₁ E₁] [VectorBundle π•œ Fβ‚‚ Eβ‚‚] [SmoothVectorBundle F₁ E₁ IB]
@@ -646,10 +647,10 @@ class IsSmooth (a : VectorPrebundle π•œ F E) : Prop where
       βˆƒ f : B β†’ F β†’L[π•œ] F,
         SmoothOn IB π“˜(π•œ, F β†’L[π•œ] F) f (e.baseSet ∩ e'.baseSet) ∧
           βˆ€ (b : B) (_ : b ∈ e.baseSet ∩ e'.baseSet) (v : F),
-            f b v = (e' (totalSpaceMk b (e.symm b v))).2
+            f b v = (e' ⟨b, e.symm b v⟩).2
 #align vector_prebundle.is_smooth VectorPrebundle.IsSmooth
 
-variable (a : VectorPrebundle π•œ F E) [ha : a.IsSmooth IB] {e e' : Pretrivialization F (Ο€ E)}
+variable (a : VectorPrebundle π•œ F E) [ha : a.IsSmooth IB] {e e' : Pretrivialization F (Ο€ F E)}
 
 /-- A randomly chosen coordinate change on a `SmoothVectorPrebundle`, given by
   the field `exists_coordChange`. Note that `a.smoothCoordChange` need not be the same as
@@ -669,13 +670,13 @@ theorem smoothOn_smoothCoordChange (he : e ∈ a.pretrivializationAtlas)
 
 theorem smoothCoordChange_apply (he : e ∈ a.pretrivializationAtlas)
     (he' : e' ∈ a.pretrivializationAtlas) {b : B} (hb : b ∈ e.baseSet ∩ e'.baseSet) (v : F) :
-    a.smoothCoordChange IB he he' b v = (e' (totalSpaceMk b (e.symm b v))).2 :=
+    a.smoothCoordChange IB he he' b v = (e' ⟨b, e.symm b v⟩).2 :=
   (Classical.choose_spec (ha.exists_smoothCoordChange e he e' he')).2 b hb v
 #align vector_prebundle.smooth_coord_change_apply VectorPrebundle.smoothCoordChange_apply
 
 theorem mk_smoothCoordChange (he : e ∈ a.pretrivializationAtlas)
     (he' : e' ∈ a.pretrivializationAtlas) {b : B} (hb : b ∈ e.baseSet ∩ e'.baseSet) (v : F) :
-    (b, a.smoothCoordChange IB he he' b v) = e' (totalSpaceMk b (e.symm b v)) := by
+    (b, a.smoothCoordChange IB he he' b v) = e' ⟨b, e.symm b v⟩ := by
   ext
   Β· rw [e.mk_symm hb.1 v, e'.coe_fst', e.proj_symm_apply' hb.1]
     rw [e.proj_symm_apply' hb.1]; exact hb.2
chore: fix focusing dots (#5708)

This PR is the result of running

find . -type f -name "*.lean" -exec sed -i -E 's/^( +)\. /\1Β· /' {} \;
find . -type f -name "*.lean" -exec sed -i -E 'N;s/^( +Β·)\n +(.*)$/\1 \2/;P;D' {} \;

which firstly replaces . focusing dots with Β· and secondly removes isolated instances of such dots, unifying them with the following line. A new rule is placed in the style linter to verify this.

Diff
@@ -422,7 +422,7 @@ theorem Trivialization.contMDiffOn_symm_trans :
   rintro ⟨b, x⟩ hb
   refine Prod.ext ?_ rfl
   · have : (e.toLocalHomeomorph.symm (b, x)).1 ∈ e'.baseSet
-    . simp_all only [Trivialization.mem_target, mfld_simps]
+    Β· simp_all only [Trivialization.mem_target, mfld_simps]
     exact (e'.coe_fst' this).trans (e.proj_symm_apply hb.1)
 
 variable {IB e e'}
feat: smoothness in a vector bundle (#5494)

Add lemmas about smoothness in a smooth vector bundle. Also rename the old smoothOn_coordChange to smoothOn_coordChangeL.

Diff
@@ -170,14 +170,11 @@ theorem contMDiffWithinAt_totalSpace (f : M β†’ TotalSpace E) {s : Set M} {xβ‚€
   simp_rw [modelWithCornersSelf_prod, FiberBundle.extChartAt, Function.comp, LocalEquiv.trans_apply,
     LocalEquiv.prod_coe, LocalEquiv.refl_coe, extChartAt_self_apply, modelWithCornersSelf_coe,
     id_def]
-  refine' (contMDiffWithinAt_prod_iff _).trans _
-  -- rw doesn't do this?
+  refine (contMDiffWithinAt_prod_iff _).trans (and_congr ?_ Iff.rfl)
   have h1 : (fun x => (f x).proj) ⁻¹' (trivializationAt F E (f xβ‚€).proj).baseSet ∈ 𝓝[s] xβ‚€ :=
-    ((FiberBundle.continuous_proj F E).continuousWithinAt.comp hf
-        (mapsTo_image f s)).preimage_mem_nhdsWithin
+    ((FiberBundle.continuous_proj F E).continuousWithinAt.comp hf (mapsTo_image f s))
       ((Trivialization.open_baseSet _).mem_nhds (mem_baseSet_trivializationAt F E _))
-  refine'
-    and_congr (EventuallyEq.contMDiffWithinAt_iff (eventually_of_mem h1 fun x hx => _) _) Iff.rfl
+  refine EventuallyEq.contMDiffWithinAt_iff (eventually_of_mem h1 fun x hx => ?_) ?_
   Β· simp_rw [Function.comp, LocalHomeomorph.coe_coe, Trivialization.coe_coe]
     rw [Trivialization.coe_fst']
     exact hx
@@ -201,18 +198,10 @@ theorem contMDiffAt_section (s : βˆ€ x, E x) (xβ‚€ : B) :
 
 variable (E)
 
-theorem contMDiff_proj : ContMDiff (IB.prod π“˜(π•œ, F)) IB n (Ο€ E) := by
-  intro x
-  rw [ContMDiffAt, contMDiffWithinAt_iff']
-  refine' ⟨(FiberBundle.continuous_proj F E).continuousWithinAt, _⟩
-  simp_rw [(· ∘ ·), FiberBundle.extChartAt]
-  apply contDiffWithinAt_fst.congr
-  · rintro ⟨a, b⟩ hab
-    simp only [mfld_simps] at hab
-    have : ((chartAt HB x.1).symm (IB.symm a), b) ∈ (trivializationAt F E x.fst).target := by
-      simp only [hab, mfld_simps]
-    simp only [Trivialization.proj_symm_apply _ this, hab, mfld_simps]
-  Β· simp only [mfld_simps]
+theorem contMDiff_proj : ContMDiff (IB.prod π“˜(π•œ, F)) IB n (Ο€ E) := fun x ↦ by
+  have : ContMDiffAt (IB.prod π“˜(π•œ, F)) (IB.prod π“˜(π•œ, F)) n id x := contMDiffAt_id
+  rw [contMDiffAt_totalSpace] at this
+  exact this.1
 #align bundle.cont_mdiff_proj Bundle.contMDiff_proj
 
 theorem smooth_proj : Smooth (IB.prod π“˜(π•œ, F)) IB (Ο€ E) :=
@@ -248,16 +237,13 @@ theorem smoothWithinAt_proj {s : Set (TotalSpace E)} {p : TotalSpace E} :
 variable (π•œ) [βˆ€ x, AddCommMonoid (E x)]
 variable [βˆ€ x, Module π•œ (E x)] [VectorBundle π•œ F E]
 
-theorem smooth_zeroSection : Smooth IB (IB.prod π“˜(π•œ, F)) (zeroSection E) := by
-  intro x
-  rw [Bundle.contMDiffAt_totalSpace]
-  refine' ⟨contMDiffAt_id, contMDiffAt_const.congr_of_eventuallyEq _⟩
-  Β· exact 0
-  refine'
-    eventually_of_mem
-      ((trivializationAt F E x).open_baseSet.mem_nhds (mem_baseSet_trivializationAt F E x))
-      fun x' hx' => _
-  simp_rw [zeroSection_proj, (trivializationAt F E x).zeroSection π•œ hx']
+theorem smooth_zeroSection : Smooth IB (IB.prod π“˜(π•œ, F)) (zeroSection E) := fun x ↦ by
+  unfold zeroSection
+  rw [Bundle.contMDiffAt_section]
+  apply (contMDiffAt_const (c := 0)).congr_of_eventuallyEq
+  filter_upwards [(trivializationAt F E x).open_baseSet.mem_nhds
+    (mem_baseSet_trivializationAt F E x)] with y hy
+    using congr_arg Prod.snd <| (trivializationAt F E x).zeroSection π•œ hy
 #align bundle.smooth_zero_section Bundle.smooth_zeroSection
 
 end Bundle
@@ -285,16 +271,182 @@ topological vector bundle over `B` with fibers isomorphic to `F`, then `SmoothVe
 registers that the bundle is smooth, in the sense of having smooth transition functions.
 This is a mixin, not carrying any new data. -/
 class SmoothVectorBundle : Prop where
-  smoothOn_coordChange :
+  protected smoothOn_coordChangeL :
     βˆ€ (e e' : Trivialization F (Ο€ E)) [MemTrivializationAtlas e] [MemTrivializationAtlas e'],
       SmoothOn IB π“˜(π•œ, F β†’L[π•œ] F) (fun b : B => (e.coordChangeL π•œ e' b : F β†’L[π•œ] F))
         (e.baseSet ∩ e'.baseSet)
 #align smooth_vector_bundle SmoothVectorBundle
-
-export SmoothVectorBundle (smoothOn_coordChange)
+#align smooth_vector_bundle.smooth_on_coord_change SmoothVectorBundle.smoothOn_coordChangeL
 
 variable [SmoothVectorBundle F E IB]
 
+section SmoothCoordChange
+
+variable {F E}
+variable (e e' : Trivialization F (Ο€ E)) [MemTrivializationAtlas e] [MemTrivializationAtlas e']
+
+theorem smoothOn_coordChangeL :
+    SmoothOn IB π“˜(π•œ, F β†’L[π•œ] F) (fun b : B => (e.coordChangeL π•œ e' b : F β†’L[π•œ] F))
+      (e.baseSet ∩ e'.baseSet) :=
+  SmoothVectorBundle.smoothOn_coordChangeL e e'
+
+theorem smoothOn_symm_coordChangeL :
+    SmoothOn IB π“˜(π•œ, F β†’L[π•œ] F) (fun b : B => ((e.coordChangeL π•œ e' b).symm : F β†’L[π•œ] F))
+      (e.baseSet ∩ e'.baseSet) := by
+  rw [inter_comm]
+  refine (SmoothVectorBundle.smoothOn_coordChangeL e' e).congr fun b hb ↦ ?_
+  rw [e.symm_coordChangeL e' hb]
+
+theorem contMDiffOn_coordChangeL :
+    ContMDiffOn IB π“˜(π•œ, F β†’L[π•œ] F) n (fun b : B => (e.coordChangeL π•œ e' b : F β†’L[π•œ] F))
+      (e.baseSet ∩ e'.baseSet) :=
+  (smoothOn_coordChangeL IB e e').of_le le_top
+
+theorem contMDiffOn_symm_coordChangeL :
+    ContMDiffOn IB π“˜(π•œ, F β†’L[π•œ] F) n (fun b : B => ((e.coordChangeL π•œ e' b).symm : F β†’L[π•œ] F))
+      (e.baseSet ∩ e'.baseSet) :=
+  (smoothOn_symm_coordChangeL IB e e').of_le le_top
+
+variable {e e'}
+
+theorem contMDiffAt_coordChangeL (h : x ∈ e.baseSet) (h' : x ∈ e'.baseSet) :
+    ContMDiffAt IB π“˜(π•œ, F β†’L[π•œ] F) n (fun b : B => (e.coordChangeL π•œ e' b : F β†’L[π•œ] F)) x :=
+  (contMDiffOn_coordChangeL IB e e').contMDiffAt <|
+    (e.open_baseSet.inter e'.open_baseSet).mem_nhds ⟨h, h'⟩
+
+theorem smoothAt_coordChangeL (h : x ∈ e.baseSet) (h' : x ∈ e'.baseSet) :
+    SmoothAt IB π“˜(π•œ, F β†’L[π•œ] F) (fun b : B => (e.coordChangeL π•œ e' b : F β†’L[π•œ] F)) x :=
+  contMDiffAt_coordChangeL IB h h'
+
+variable {IB}
+
+protected theorem ContMDiffWithinAt.coordChangeL {f : M β†’ B}
+    (hf : ContMDiffWithinAt IM IB n f s x) (he : f x ∈ e.baseSet) (he' : f x ∈ e'.baseSet) :
+    ContMDiffWithinAt IM π“˜(π•œ, F β†’L[π•œ] F) n (fun y ↦ (e.coordChangeL π•œ e' (f y) : F β†’L[π•œ] F)) s x :=
+  (contMDiffAt_coordChangeL IB he he').comp_contMDiffWithinAt _ hf
+
+protected nonrec theorem ContMDiffAt.coordChangeL {f : M β†’ B}
+    (hf : ContMDiffAt IM IB n f x) (he : f x ∈ e.baseSet) (he' : f x ∈ e'.baseSet) :
+    ContMDiffAt IM π“˜(π•œ, F β†’L[π•œ] F) n (fun y ↦ (e.coordChangeL π•œ e' (f y) : F β†’L[π•œ] F)) x :=
+  hf.coordChangeL he he'
+
+protected theorem ContMDiffOn.coordChangeL {f : M β†’ B}
+    (hf : ContMDiffOn IM IB n f s) (he : MapsTo f s e.baseSet) (he' : MapsTo f s e'.baseSet) :
+    ContMDiffOn IM π“˜(π•œ, F β†’L[π•œ] F) n (fun y ↦ (e.coordChangeL π•œ e' (f y) : F β†’L[π•œ] F)) s :=
+  fun x hx ↦ (hf x hx).coordChangeL (he hx) (he' hx)
+
+protected theorem ContMDiff.coordChangeL {f : M β†’ B}
+    (hf : ContMDiff IM IB n f) (he : βˆ€ x, f x ∈ e.baseSet) (he' : βˆ€ x, f x ∈ e'.baseSet) :
+    ContMDiff IM π“˜(π•œ, F β†’L[π•œ] F) n (fun y ↦ (e.coordChangeL π•œ e' (f y) : F β†’L[π•œ] F)) := fun x ↦
+  (hf x).coordChangeL (he x) (he' x)
+
+protected nonrec theorem SmoothWithinAt.coordChangeL {f : M β†’ B}
+    (hf : SmoothWithinAt IM IB f s x) (he : f x ∈ e.baseSet) (he' : f x ∈ e'.baseSet) :
+    SmoothWithinAt IM π“˜(π•œ, F β†’L[π•œ] F) (fun y ↦ (e.coordChangeL π•œ e' (f y) : F β†’L[π•œ] F)) s x :=
+  hf.coordChangeL he he'
+
+protected nonrec theorem SmoothAt.coordChangeL {f : M β†’ B}
+    (hf : SmoothAt IM IB f x) (he : f x ∈ e.baseSet) (he' : f x ∈ e'.baseSet) :
+    SmoothAt IM π“˜(π•œ, F β†’L[π•œ] F) (fun y ↦ (e.coordChangeL π•œ e' (f y) : F β†’L[π•œ] F)) x :=
+  hf.coordChangeL he he'
+
+protected nonrec theorem SmoothOn.coordChangeL {f : M β†’ B}
+    (hf : SmoothOn IM IB f s) (he : MapsTo f s e.baseSet) (he' : MapsTo f s e'.baseSet) :
+    SmoothOn IM π“˜(π•œ, F β†’L[π•œ] F) (fun y ↦ (e.coordChangeL π•œ e' (f y) : F β†’L[π•œ] F)) s :=
+  hf.coordChangeL he he'
+
+protected nonrec theorem Smooth.coordChangeL {f : M β†’ B}
+    (hf : Smooth IM IB f) (he : βˆ€ x, f x ∈ e.baseSet) (he' : βˆ€ x, f x ∈ e'.baseSet) :
+    Smooth IM π“˜(π•œ, F β†’L[π•œ] F) (fun y ↦ (e.coordChangeL π•œ e' (f y) : F β†’L[π•œ] F)) :=
+  hf.coordChangeL he he'
+
+protected theorem ContMDiffWithinAt.coordChange {f : M β†’ B} {g : M β†’ F}
+    (hf : ContMDiffWithinAt IM IB n f s x) (hg : ContMDiffWithinAt IM π“˜(π•œ, F) n g s x)
+    (he : f x ∈ e.baseSet) (he' : f x ∈ e'.baseSet) :
+    ContMDiffWithinAt IM π“˜(π•œ, F) n (fun y ↦ e.coordChange e' (f y) (g y)) s x := by
+  refine ((hf.coordChangeL he he').clm_apply hg).congr_of_eventuallyEq ?_ ?_
+  Β· have : e.baseSet ∩ e'.baseSet ∈ 𝓝 (f x) :=
+     (e.open_baseSet.inter e'.open_baseSet).mem_nhds ⟨he, he'⟩
+    filter_upwards [hf.continuousWithinAt this] with y hy
+    exact (Trivialization.coordChangeL_apply' e e' hy (g y)).symm
+  · exact (Trivialization.coordChangeL_apply' e e' ⟨he, he'⟩ (g x)).symm
+
+protected nonrec theorem ContMDiffAt.coordChange {f : M β†’ B} {g : M β†’ F}
+    (hf : ContMDiffAt IM IB n f x) (hg : ContMDiffAt IM π“˜(π•œ, F) n g x) (he : f x ∈ e.baseSet)
+    (he' : f x ∈ e'.baseSet) :
+    ContMDiffAt IM π“˜(π•œ, F) n (fun y ↦ e.coordChange e' (f y) (g y)) x :=
+  hf.coordChange hg he he'
+
+protected theorem ContMDiffOn.coordChange {f : M β†’ B} {g : M β†’ F} (hf : ContMDiffOn IM IB n f s)
+    (hg : ContMDiffOn IM π“˜(π•œ, F) n g s) (he : MapsTo f s e.baseSet) (he' : MapsTo f s e'.baseSet) :
+    ContMDiffOn IM π“˜(π•œ, F) n (fun y ↦ e.coordChange e' (f y) (g y)) s := fun x hx ↦
+  (hf x hx).coordChange (hg x hx) (he hx) (he' hx)
+
+protected theorem ContMDiff.coordChange {f : M β†’ B} {g : M β†’ F} (hf : ContMDiff IM IB n f)
+    (hg : ContMDiff IM π“˜(π•œ, F) n g) (he : βˆ€ x, f x ∈ e.baseSet) (he' : βˆ€ x, f x ∈ e'.baseSet) :
+    ContMDiff IM π“˜(π•œ, F) n (fun y ↦ e.coordChange e' (f y) (g y)) := fun x ↦
+  (hf x).coordChange (hg x) (he x) (he' x)
+
+protected nonrec theorem SmoothWithinAt.coordChange {f : M β†’ B} {g : M β†’ F}
+    (hf : SmoothWithinAt IM IB f s x) (hg : SmoothWithinAt IM π“˜(π•œ, F) g s x)
+    (he : f x ∈ e.baseSet) (he' : f x ∈ e'.baseSet) :
+    SmoothWithinAt IM π“˜(π•œ, F) (fun y ↦ e.coordChange e' (f y) (g y)) s x :=
+  hf.coordChange hg he he'
+
+protected nonrec theorem SmoothAt.coordChange {f : M β†’ B} {g : M β†’ F} (hf : SmoothAt IM IB f x)
+    (hg : SmoothAt IM π“˜(π•œ, F) g x) (he : f x ∈ e.baseSet) (he' : f x ∈ e'.baseSet) :
+    SmoothAt IM π“˜(π•œ, F) (fun y ↦ e.coordChange e' (f y) (g y)) x :=
+  hf.coordChange hg he he'
+
+protected nonrec theorem SmoothOn.coordChange {f : M β†’ B} {g : M β†’ F} (hf : SmoothOn IM IB f s)
+    (hg : SmoothOn IM π“˜(π•œ, F) g s) (he : MapsTo f s e.baseSet) (he' : MapsTo f s e'.baseSet) :
+    SmoothOn IM π“˜(π•œ, F) (fun y ↦ e.coordChange e' (f y) (g y)) s :=
+  hf.coordChange hg he he'
+
+protected theorem Smooth.coordChange {f : M β†’ B} {g : M β†’ F} (hf : Smooth IM IB f)
+    (hg : Smooth IM π“˜(π•œ, F) g) (he : βˆ€ x, f x ∈ e.baseSet) (he' : βˆ€ x, f x ∈ e'.baseSet) :
+    Smooth IM π“˜(π•œ, F) (fun y ↦ e.coordChange e' (f y) (g y)) := fun x ↦
+  (hf x).coordChange (hg x) (he x) (he' x)
+
+variable (IB e e')
+
+theorem Trivialization.contMDiffOn_symm_trans :
+    ContMDiffOn (IB.prod π“˜(π•œ, F)) (IB.prod π“˜(π•œ, F)) n
+      (e.toLocalHomeomorph.symm ≫ₕ e'.toLocalHomeomorph) (e.target ∩ e'.target) := by
+  have Hmaps : MapsTo Prod.fst (e.target ∩ e'.target) (e.baseSet ∩ e'.baseSet) := fun x hx ↦
+    ⟨e.mem_target.1 hx.1, e'.mem_target.1 hx.2⟩
+  rw [mapsTo_inter] at Hmaps
+  -- TODO: drop `congr` #5473
+  refine (contMDiffOn_fst.prod_mk
+    (contMDiffOn_fst.coordChange contMDiffOn_snd Hmaps.1 Hmaps.2)).congr ?_
+  rintro ⟨b, x⟩ hb
+  refine Prod.ext ?_ rfl
+  · have : (e.toLocalHomeomorph.symm (b, x)).1 ∈ e'.baseSet
+    . simp_all only [Trivialization.mem_target, mfld_simps]
+    exact (e'.coe_fst' this).trans (e.proj_symm_apply hb.1)
+
+variable {IB e e'}
+
+theorem ContMDiffWithinAt.change_section_trivialization {f : M β†’ TotalSpace E}
+    (hp : ContMDiffWithinAt IM IB n (Ο€ E ∘ f) s x)
+    (hf : ContMDiffWithinAt IM π“˜(π•œ, F) n (fun y ↦ (e (f y)).2) s x)
+    (he : f x ∈ e.source) (he' : f x ∈ e'.source) :
+    ContMDiffWithinAt IM π“˜(π•œ, F) n (fun y ↦ (e' (f y)).2) s x := by
+  rw [Trivialization.mem_source] at he he'
+  refine (hp.coordChange hf he he').congr_of_eventuallyEq ?_ ?_
+  Β· filter_upwards [hp.continuousWithinAt (e.open_baseSet.mem_nhds he)] with y hy
+    rw [Function.comp_apply, e.coordChange_apply_snd _ hy]
+  Β· rw [Function.comp_apply, e.coordChange_apply_snd _ he]
+
+theorem Trivialization.contMDiffWithinAt_snd_comp_iffβ‚‚ {f : M β†’ TotalSpace E}
+    (hp : ContMDiffWithinAt IM IB n (Ο€ E ∘ f) s x)
+    (he : f x ∈ e.source) (he' : f x ∈ e'.source) :
+    ContMDiffWithinAt IM π“˜(π•œ, F) n (fun y ↦ (e (f y)).2) s x ↔
+      ContMDiffWithinAt IM π“˜(π•œ, F) n (fun y ↦ (e' (f y)).2) s x :=
+  ⟨(hp.change_section_trivialization · he he'), (hp.change_section_trivialization · he' he)⟩
+
+end SmoothCoordChange
+
 /-- For a smooth vector bundle `E` over `B` with fiber modelled on `F`, the change-of-co-ordinates
 between two trivializations `e`, `e'` for `E`, considered as charts to `B Γ— F`, is smooth and
 fiberwise linear. -/
@@ -305,18 +457,13 @@ instance SmoothFiberwiseLinear.hasGroupoid :
     haveI : MemTrivializationAtlas e := ⟨he⟩
     haveI : MemTrivializationAtlas e' := ⟨he'⟩
     rw [mem_smoothFiberwiseLinear_iff]
-    refine' ⟨_, _, e.open_baseSet.inter e'.open_baseSet, smoothOn_coordChange e e', _, _, _⟩
-    Β· rw [inter_comm]
-      apply ContMDiffOn.congr (smoothOn_coordChange e' e)
-      Β· intro b hb
-        rw [e.symm_coordChangeL e' hb]
+    refine' ⟨_, _, e.open_baseSet.inter e'.open_baseSet, smoothOn_coordChangeL IB e e',
+      smoothOn_symm_coordChangeL IB e e', _⟩
+    refine LocalHomeomorph.eqOnSourceSetoid.symm ⟨?_, ?_⟩
     Β· simp only [e.symm_trans_source_eq e', FiberwiseLinear.localHomeomorph, trans_toLocalEquiv,
         symm_toLocalEquiv]
     · rintro ⟨b, v⟩ hb
-      have hb' : b ∈ e.baseSet ∩ e'.baseSet := by
-        simpa only [trans_toLocalEquiv, symm_toLocalEquiv, e.symm_trans_source_eq e',
-          coe_coe_symm, prod_mk_mem_set_prod_eq, mem_univ, and_true_iff] using hb
-      exact e.apply_symm_apply_eq_coordChangeL e' hb' v
+      exact (e.apply_symm_apply_eq_coordChangeL e' hb.1 v).symm
 #align smooth_fiberwise_linear.has_groupoid SmoothFiberwiseLinear.hasGroupoid
 
 /-- A smooth vector bundle `E` is naturally a smooth manifold. -/
@@ -337,8 +484,77 @@ instance Bundle.TotalSpace.smoothManifoldWithCorners :
     exact (h2Ο†.comp contMDiffOn_fst <| prod_subset_preimage_fst _ _).clm_apply contMDiffOn_snd
 #align bundle.total_space.smooth_manifold_with_corners Bundle.TotalSpace.smoothManifoldWithCorners
 
-/-! ### Core construction for smooth vector bundles -/
+section
+
+variable {F E}
+variable {e e' : Trivialization F (Ο€ E)} [MemTrivializationAtlas e] [MemTrivializationAtlas e']
+
+theorem Trivialization.contMDiffWithinAt_iff {f : M β†’ TotalSpace E} {s : Set M} {xβ‚€ : M}
+    (he : f xβ‚€ ∈ e.source) :
+    ContMDiffWithinAt IM (IB.prod π“˜(π•œ, F)) n f s xβ‚€ ↔
+      ContMDiffWithinAt IM IB n (fun x => (f x).proj) s xβ‚€ ∧
+      ContMDiffWithinAt IM π“˜(π•œ, F) n (fun x ↦ (e (f x)).2) s xβ‚€ :=
+  (contMDiffWithinAt_totalSpace _).trans <| and_congr_right fun h ↦
+    Trivialization.contMDiffWithinAt_snd_comp_iffβ‚‚ h FiberBundle.mem_trivializationAt_proj_source he
 
+theorem Trivialization.contMDiffAt_iff {f : M β†’ TotalSpace E} {xβ‚€ : M} (he : f xβ‚€ ∈ e.source) :
+    ContMDiffAt IM (IB.prod π“˜(π•œ, F)) n f xβ‚€ ↔
+      ContMDiffAt IM IB n (fun x => (f x).proj) xβ‚€ ∧
+      ContMDiffAt IM π“˜(π•œ, F) n (fun x ↦ (e (f x)).2) xβ‚€ :=
+  e.contMDiffWithinAt_iff _ he
+
+theorem Trivialization.contMDiffOn_iff {f : M β†’ TotalSpace E} {s : Set M}
+    (he : MapsTo f s e.source) :
+    ContMDiffOn IM (IB.prod π“˜(π•œ, F)) n f s ↔
+      ContMDiffOn IM IB n (fun x => (f x).proj) s ∧
+      ContMDiffOn IM π“˜(π•œ, F) n (fun x ↦ (e (f x)).2) s := by
+  simp only [ContMDiffOn, ← forall_and]
+  exact forallβ‚‚_congr fun x hx ↦ e.contMDiffWithinAt_iff IB (he hx)
+
+theorem Trivialization.contMDiff_iff {f : M β†’ TotalSpace E} (he : βˆ€ x, f x ∈ e.source) :
+    ContMDiff IM (IB.prod π“˜(π•œ, F)) n f ↔
+      ContMDiff IM IB n (fun x => (f x).proj) ∧
+      ContMDiff IM π“˜(π•œ, F) n (fun x ↦ (e (f x)).2) :=
+  (forall_congr' fun x ↦ e.contMDiffAt_iff IB (he x)).trans forall_and
+
+theorem Trivialization.smoothWithinAt_iff {f : M β†’ TotalSpace E} {s : Set M} {xβ‚€ : M}
+    (he : f xβ‚€ ∈ e.source) :
+    SmoothWithinAt IM (IB.prod π“˜(π•œ, F)) f s xβ‚€ ↔
+      SmoothWithinAt IM IB (fun x => (f x).proj) s xβ‚€ ∧
+      SmoothWithinAt IM π“˜(π•œ, F) (fun x ↦ (e (f x)).2) s xβ‚€ :=
+  e.contMDiffWithinAt_iff IB he
+
+theorem Trivialization.smoothAt_iff {f : M β†’ TotalSpace E} {xβ‚€ : M} (he : f xβ‚€ ∈ e.source) :
+    SmoothAt IM (IB.prod π“˜(π•œ, F)) f xβ‚€ ↔
+      SmoothAt IM IB (fun x => (f x).proj) xβ‚€ ∧ SmoothAt IM π“˜(π•œ, F) (fun x ↦ (e (f x)).2) xβ‚€ :=
+  e.contMDiffAt_iff IB he
+
+theorem Trivialization.smoothOn_iff {f : M β†’ TotalSpace E} {s : Set M}
+    (he : MapsTo f s e.source) :
+    SmoothOn IM (IB.prod π“˜(π•œ, F)) f s ↔
+      SmoothOn IM IB (fun x => (f x).proj) s ∧ SmoothOn IM π“˜(π•œ, F) (fun x ↦ (e (f x)).2) s :=
+  e.contMDiffOn_iff IB he
+
+theorem Trivialization.smooth_iff {f : M β†’ TotalSpace E} (he : βˆ€ x, f x ∈ e.source) :
+    Smooth IM (IB.prod π“˜(π•œ, F)) f ↔
+      Smooth IM IB (fun x => (f x).proj) ∧ Smooth IM π“˜(π•œ, F) (fun x ↦ (e (f x)).2) :=
+  e.contMDiff_iff IB he
+
+theorem Trivialization.smoothOn (e : Trivialization F (Ο€ E)) [MemTrivializationAtlas e] :
+    SmoothOn (IB.prod π“˜(π•œ, F)) (IB.prod π“˜(π•œ, F)) e e.source := by
+  have : SmoothOn (IB.prod π“˜(π•œ, F)) (IB.prod π“˜(π•œ, F)) id e.source := smoothOn_id
+  rw [e.smoothOn_iff IB (mapsTo_id _)] at this
+  exact (this.1.prod_mk this.2).congr fun x hx ↦ (e.mk_proj_snd hx).symm
+
+theorem Trivialization.smoothOn_symm (e : Trivialization F (Ο€ E)) [MemTrivializationAtlas e] :
+    SmoothOn (IB.prod π“˜(π•œ, F)) (IB.prod π“˜(π•œ, F)) e.toLocalHomeomorph.symm e.target := by
+  rw [e.smoothOn_iff IB e.toLocalHomeomorph.symm_mapsTo]
+  refine ⟨smoothOn_fst.congr fun x hx ↦ e.proj_symm_apply hx, smoothOn_snd.congr fun x hx ↦ ?_⟩
+  rw [e.apply_symm_apply hx]
+
+end
+
+/-! ### Core construction for smooth vector bundles -/
 
 namespace VectorBundleCore
 
@@ -360,7 +576,7 @@ variable [Z.IsSmooth IB]
 /-- If a `VectorBundleCore` has the `IsSmooth` mixin, then the vector bundle constructed from it
 is a smooth vector bundle. -/
 instance smoothVectorBundle : SmoothVectorBundle F Z.Fiber IB where
-  smoothOn_coordChange := by
+  smoothOn_coordChangeL := by
     rintro - - ⟨i, rfl⟩ ⟨i', rfl⟩
     -- Porting note: Originally `Z.smoothOn_coordChange IB i i'`
     refine'
@@ -375,7 +591,7 @@ end VectorBundleCore
 
 /-- A trivial vector bundle over a smooth manifold is a smooth vector bundle. -/
 instance Bundle.Trivial.smoothVectorBundle : SmoothVectorBundle F (Bundle.Trivial B F) IB where
-  smoothOn_coordChange := by
+  smoothOn_coordChangeL := by
     intro e e' he he'
     obtain rfl := Bundle.Trivial.eq_trivialization B F e
     obtain rfl := Bundle.Trivial.eq_trivialization B F e'
@@ -400,15 +616,15 @@ variable [βˆ€ x : B, TopologicalSpace (E₁ x)] [βˆ€ x : B, TopologicalSpace (E
 
 /-- The direct sum of two smooth vector bundles over the same base is a smooth vector bundle. -/
 instance Bundle.Prod.smoothVectorBundle : SmoothVectorBundle (F₁ Γ— Fβ‚‚) (E₁ ×ᡇ Eβ‚‚) IB where
-  smoothOn_coordChange := by
+  smoothOn_coordChangeL := by
     rintro _ _ ⟨e₁, eβ‚‚, i₁, iβ‚‚, rfl⟩ ⟨e₁', eβ‚‚', i₁', iβ‚‚', rfl⟩
     rw [SmoothOn]
     refine' ContMDiffOn.congr _ (e₁.coordChangeL_prod π•œ e₁' eβ‚‚ eβ‚‚')
     refine' ContMDiffOn.clm_prodMap _ _
-    Β· refine' (smoothOn_coordChange e₁ e₁').mono _
+    Β· refine' (smoothOn_coordChangeL IB e₁ e₁').mono _
       simp only [Trivialization.baseSet_prod, mfld_simps]
       mfld_set_tac
-    Β· refine' (smoothOn_coordChange eβ‚‚ eβ‚‚').mono _
+    Β· refine' (smoothOn_coordChangeL IB eβ‚‚ eβ‚‚').mono _
       simp only [Trivialization.baseSet_prod, mfld_simps]
       mfld_set_tac
 #align bundle.prod.smooth_vector_bundle Bundle.Prod.smoothVectorBundle
@@ -471,7 +687,7 @@ variable (IB)
 theorem smoothVectorBundle : @SmoothVectorBundle
     _ _ F E _ _ _ _ _ _ IB _ _ _ _ _ _ a.totalSpaceTopology _ a.toFiberBundle a.toVectorBundle :=
   letI := a.totalSpaceTopology; letI := a.toFiberBundle; letI := a.toVectorBundle
-  { smoothOn_coordChange := by
+  { smoothOn_coordChangeL := by
       rintro _ _ ⟨e, he, rfl⟩ ⟨e', he', rfl⟩
       refine' (a.smoothOn_smoothCoordChange he he').congr _
       intro b hb
feat: port Geometry.Manifold.VectorBundle.Basic (#5444)

Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>

Dependencies 12 + 884

885 files ported (98.7%)
395143 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