geometry.manifold.vector_bundle.fiberwise_linearMathlib.Geometry.Manifold.VectorBundle.FiberwiseLinear

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)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(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)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -3,7 +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 Geometry.Manifold.ContMdiff
+import Geometry.Manifold.ContMDiff.Defs
 
 #align_import geometry.manifold.vector_bundle.fiberwise_linear from "leanprover-community/mathlib"@"30faa0c3618ce1472bf6305ae0e3fa56affa3f95"
 
Diff
@@ -150,12 +150,12 @@ theorem SmoothFiberwiseLinear.locality_aux₁ (e : PartialHomeomorph (B × F) (B
           (e.restr (u ×ˢ univ)).EqOnSource
             (FiberwiseLinear.partialHomeomorph φ hu hφ.ContinuousOn h2φ.ContinuousOn) :=
   by
-  rw [SetCoe.forall'] at h 
+  rw [SetCoe.forall'] at h
   -- choose s hs hsp φ u hu hφ h2φ heφ using h,
   -- the following 2 lines should be `choose s hs hsp φ u hu hφ h2φ heφ using h,`
   -- `choose` produces a proof term that takes a long time to type-check by the kernel (it seems)
   -- porting note: todo: try using `choose` again in Lean 4
-  simp only [Classical.skolem, ← exists_prop] at h 
+  simp only [Classical.skolem, ← exists_prop] at h
   rcases h with ⟨s, hs, hsp, φ, u, hu, hφ, h2φ, heφ⟩
   have hesu : ∀ p : e.source, e.source ∩ s p = u p ×ˢ univ :=
     by
@@ -171,7 +171,7 @@ theorem SmoothFiberwiseLinear.locality_aux₁ (e : PartialHomeomorph (B × F) (B
     by
     intro p q hq
     have : q ∈ u p ×ˢ (univ : Set F) := ⟨hq, trivial⟩
-    rw [← hesu p] at this 
+    rw [← hesu p] at this
     exact this.1
   have he : e.source = (Prod.fst '' e.source) ×ˢ (univ : Set F) :=
     by
@@ -219,7 +219,7 @@ theorem SmoothFiberwiseLinear.locality_aux₂ (e : PartialHomeomorph (B × F) (B
       e.EqOnSource (FiberwiseLinear.partialHomeomorph Φ hU₀ hΦ.ContinuousOn h2Φ.ContinuousOn) :=
   by
   classical
-  rw [SetCoe.forall'] at h 
+  rw [SetCoe.forall'] at h
   choose! φ u hu hUu hux hφ h2φ heφ using h
   have heuφ : ∀ x : U, eq_on e (fun q => (q.1, φ x q.1 q.2)) (u x ×ˢ univ) :=
     by
@@ -269,7 +269,7 @@ theorem SmoothFiberwiseLinear.locality_aux₂ (e : PartialHomeomorph (B × F) (B
     intro y hy
     rw [hΦφ ⟨x, hx⟩ y hy]
   refine' ⟨Φ, U, hU', hΦ, h2Φ, hU, fun p hp => _⟩
-  rw [hU] at hp 
+  rw [hU] at hp
   -- using rw on the next line seems to cause a timeout in kernel type-checking
   refine' (heuφ ⟨p.fst, hp.1⟩ ⟨hux _, hp.2⟩).trans _
   trace
Diff
@@ -217,11 +217,68 @@ theorem SmoothFiberwiseLinear.locality_aux₂ (e : PartialHomeomorph (B × F) (B
       SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (Φ x : F →L[𝕜] F)) U) (h2Φ :
       SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ((Φ x).symm : F →L[𝕜] F)) U),
       e.EqOnSource (FiberwiseLinear.partialHomeomorph Φ hU₀ hΦ.ContinuousOn h2Φ.ContinuousOn) :=
-  by classical
+  by
+  classical
+  rw [SetCoe.forall'] at h 
+  choose! φ u hu hUu hux hφ h2φ heφ using h
+  have heuφ : ∀ x : U, eq_on e (fun q => (q.1, φ x q.1 q.2)) (u x ×ˢ univ) :=
+    by
+    intro x p hp
+    refine' (heφ x).2 _
+    rw [(heφ x).1]
+    exact hp
+  have huφ : ∀ (x x' : U) (y : B) (hyx : y ∈ u x) (hyx' : y ∈ u x'), φ x y = φ x' y :=
+    by
+    intro p p' y hyp hyp'
+    ext v
+    have h1 : e (y, v) = (y, φ p y v) := heuφ _ ⟨(id hyp : (y, v).fst ∈ u p), trivial⟩
+    have h2 : e (y, v) = (y, φ p' y v) := heuφ _ ⟨(id hyp' : (y, v).fst ∈ u p'), trivial⟩
+    exact congr_arg Prod.snd (h1.symm.trans h2)
+  have hUu' : U = ⋃ i, u i := by
+    ext x
+    rw [mem_Union]
+    refine' ⟨fun h => ⟨⟨x, h⟩, hux _⟩, _⟩
+    rintro ⟨x, hx⟩
+    exact hUu x hx
+  have hU' : IsOpen U := by
+    rw [hUu']
+    apply isOpen_iUnion hu
+  let Φ₀ : U → F ≃L[𝕜] F := Union_lift u (fun x => φ x ∘ coe) huφ U hUu'.le
+  let Φ : B → F ≃L[𝕜] F := fun y =>
+    if hy : y ∈ U then Φ₀ ⟨y, hy⟩ else ContinuousLinearEquiv.refl 𝕜 F
+  have hΦ : ∀ (y) (hy : y ∈ U), Φ y = Φ₀ ⟨y, hy⟩ := fun y hy => dif_pos hy
+  have hΦφ : ∀ x : U, ∀ y ∈ u x, Φ y = φ x y :=
+    by
+    intro x y hyu
+    refine' (hΦ y (hUu x hyu)).trans _
+    exact Union_lift_mk ⟨y, hyu⟩ _
+  have hΦ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => (Φ y : F →L[𝕜] F)) U :=
+    by
+    apply contMDiffOn_of_locally_contMDiffOn
+    intro x hx
+    refine' ⟨u ⟨x, hx⟩, hu ⟨x, hx⟩, hux _, _⟩
+    refine' (ContMDiffOn.congr (hφ ⟨x, hx⟩) _).mono (inter_subset_right _ _)
+    intro y hy
+    rw [hΦφ ⟨x, hx⟩ y hy]
+  have h2Φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => ((Φ y).symm : F →L[𝕜] F)) U :=
+    by
+    apply contMDiffOn_of_locally_contMDiffOn
+    intro x hx
+    refine' ⟨u ⟨x, hx⟩, hu ⟨x, hx⟩, hux _, _⟩
+    refine' (ContMDiffOn.congr (h2φ ⟨x, hx⟩) _).mono (inter_subset_right _ _)
+    intro y hy
+    rw [hΦφ ⟨x, hx⟩ y hy]
+  refine' ⟨Φ, U, hU', hΦ, h2Φ, hU, fun p hp => _⟩
+  rw [hU] at hp 
+  -- using rw on the next line seems to cause a timeout in kernel type-checking
+  refine' (heuφ ⟨p.fst, hp.1⟩ ⟨hux _, hp.2⟩).trans _
+  trace
+    "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr (_, _)]]"
+  rw [hΦφ]
+  apply hux
 #align smooth_fiberwise_linear.locality_aux₂ SmoothFiberwiseLinear.locality_aux₂
 -/
 
--- using rw on the next line seems to cause a timeout in kernel type-checking
 variable (F B IB)
 
 #print smoothFiberwiseLinear /-
Diff
@@ -217,68 +217,11 @@ theorem SmoothFiberwiseLinear.locality_aux₂ (e : PartialHomeomorph (B × F) (B
       SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (Φ x : F →L[𝕜] F)) U) (h2Φ :
       SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ((Φ x).symm : F →L[𝕜] F)) U),
       e.EqOnSource (FiberwiseLinear.partialHomeomorph Φ hU₀ hΦ.ContinuousOn h2Φ.ContinuousOn) :=
-  by
-  classical
-  rw [SetCoe.forall'] at h 
-  choose! φ u hu hUu hux hφ h2φ heφ using h
-  have heuφ : ∀ x : U, eq_on e (fun q => (q.1, φ x q.1 q.2)) (u x ×ˢ univ) :=
-    by
-    intro x p hp
-    refine' (heφ x).2 _
-    rw [(heφ x).1]
-    exact hp
-  have huφ : ∀ (x x' : U) (y : B) (hyx : y ∈ u x) (hyx' : y ∈ u x'), φ x y = φ x' y :=
-    by
-    intro p p' y hyp hyp'
-    ext v
-    have h1 : e (y, v) = (y, φ p y v) := heuφ _ ⟨(id hyp : (y, v).fst ∈ u p), trivial⟩
-    have h2 : e (y, v) = (y, φ p' y v) := heuφ _ ⟨(id hyp' : (y, v).fst ∈ u p'), trivial⟩
-    exact congr_arg Prod.snd (h1.symm.trans h2)
-  have hUu' : U = ⋃ i, u i := by
-    ext x
-    rw [mem_Union]
-    refine' ⟨fun h => ⟨⟨x, h⟩, hux _⟩, _⟩
-    rintro ⟨x, hx⟩
-    exact hUu x hx
-  have hU' : IsOpen U := by
-    rw [hUu']
-    apply isOpen_iUnion hu
-  let Φ₀ : U → F ≃L[𝕜] F := Union_lift u (fun x => φ x ∘ coe) huφ U hUu'.le
-  let Φ : B → F ≃L[𝕜] F := fun y =>
-    if hy : y ∈ U then Φ₀ ⟨y, hy⟩ else ContinuousLinearEquiv.refl 𝕜 F
-  have hΦ : ∀ (y) (hy : y ∈ U), Φ y = Φ₀ ⟨y, hy⟩ := fun y hy => dif_pos hy
-  have hΦφ : ∀ x : U, ∀ y ∈ u x, Φ y = φ x y :=
-    by
-    intro x y hyu
-    refine' (hΦ y (hUu x hyu)).trans _
-    exact Union_lift_mk ⟨y, hyu⟩ _
-  have hΦ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => (Φ y : F →L[𝕜] F)) U :=
-    by
-    apply contMDiffOn_of_locally_contMDiffOn
-    intro x hx
-    refine' ⟨u ⟨x, hx⟩, hu ⟨x, hx⟩, hux _, _⟩
-    refine' (ContMDiffOn.congr (hφ ⟨x, hx⟩) _).mono (inter_subset_right _ _)
-    intro y hy
-    rw [hΦφ ⟨x, hx⟩ y hy]
-  have h2Φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => ((Φ y).symm : F →L[𝕜] F)) U :=
-    by
-    apply contMDiffOn_of_locally_contMDiffOn
-    intro x hx
-    refine' ⟨u ⟨x, hx⟩, hu ⟨x, hx⟩, hux _, _⟩
-    refine' (ContMDiffOn.congr (h2φ ⟨x, hx⟩) _).mono (inter_subset_right _ _)
-    intro y hy
-    rw [hΦφ ⟨x, hx⟩ y hy]
-  refine' ⟨Φ, U, hU', hΦ, h2Φ, hU, fun p hp => _⟩
-  rw [hU] at hp 
-  -- using rw on the next line seems to cause a timeout in kernel type-checking
-  refine' (heuφ ⟨p.fst, hp.1⟩ ⟨hux _, hp.2⟩).trans _
-  trace
-    "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr (_, _)]]"
-  rw [hΦφ]
-  apply hux
+  by classical
 #align smooth_fiberwise_linear.locality_aux₂ SmoothFiberwiseLinear.locality_aux₂
 -/
 
+-- using rw on the next line seems to cause a timeout in kernel type-checking
 variable (F B IB)
 
 #print smoothFiberwiseLinear /-
Diff
@@ -321,7 +321,7 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F)
     · apply contMDiffOn_const
     · apply contMDiffOn_const
     ·
-      simp only [FiberwiseLinear.partialHomeomorph, PartialHomeomorph.refl_localEquiv,
+      simp only [FiberwiseLinear.partialHomeomorph, PartialHomeomorph.refl_partialEquiv,
         PartialEquiv.refl_source, univ_prod_univ]
     ·
       simp only [FiberwiseLinear.partialHomeomorph, PartialHomeomorph.refl_apply, Prod.mk.eta,
Diff
@@ -38,10 +38,10 @@ variable {φ φ' : B → F ≃L[𝕜] F} {U U' : Set B}
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print FiberwiseLinear.localHomeomorph /-
+#print FiberwiseLinear.partialHomeomorph /-
 /-- For `B` a topological space and `F` a `𝕜`-normed space, a map from `U : set B` to `F ≃L[𝕜] F`
 determines a local homeomorphism from `B × F` to itself by its action fiberwise. -/
-def localHomeomorph (φ : B → F ≃L[𝕜] F) (hU : IsOpen U)
+def partialHomeomorph (φ : B → F ≃L[𝕜] F) (hU : IsOpen U)
     (hφ : ContinuousOn (fun x => φ x : B → F →L[𝕜] F) U)
     (h2φ : ContinuousOn (fun x => (φ x).symm : B → F →L[𝕜] F) U) : PartialHomeomorph (B × F) (B × F)
     where
@@ -63,54 +63,55 @@ def localHomeomorph (φ : B → F ≃L[𝕜] F) (hU : IsOpen U)
     haveI : ContinuousOn (fun p : B × F => (((φ p.1).symm : F →L[𝕜] F), p.2)) (U ×ˢ univ) :=
       h2φ.prod_map continuousOn_id
     continuous_on_fst.prod (is_bounded_bilinear_map_apply.continuous.comp_continuous_on this)
-#align fiberwise_linear.local_homeomorph FiberwiseLinear.localHomeomorph
+#align fiberwise_linear.local_homeomorph FiberwiseLinear.partialHomeomorph
 -/
 
-#print FiberwiseLinear.trans_localHomeomorph_apply /-
+#print FiberwiseLinear.trans_partialHomeomorph_apply /-
 /-- Compute the composition of two local homeomorphisms induced by fiberwise linear
 equivalences. -/
-theorem trans_localHomeomorph_apply (hU : IsOpen U)
+theorem trans_partialHomeomorph_apply (hU : IsOpen U)
     (hφ : ContinuousOn (fun x => φ x : B → F →L[𝕜] F) U)
     (h2φ : ContinuousOn (fun x => (φ x).symm : B → F →L[𝕜] F) U) (hU' : IsOpen U')
     (hφ' : ContinuousOn (fun x => φ' x : B → F →L[𝕜] F) U')
     (h2φ' : ContinuousOn (fun x => (φ' x).symm : B → F →L[𝕜] F) U') (b : B) (v : F) :
-    (FiberwiseLinear.localHomeomorph φ hU hφ h2φ ≫ₕ FiberwiseLinear.localHomeomorph φ' hU' hφ' h2φ')
+    (FiberwiseLinear.partialHomeomorph φ hU hφ h2φ ≫ₕ
+          FiberwiseLinear.partialHomeomorph φ' hU' hφ' h2φ')
         ⟨b, v⟩ =
       ⟨b, φ' b (φ b v)⟩ :=
   rfl
-#align fiberwise_linear.trans_local_homeomorph_apply FiberwiseLinear.trans_localHomeomorph_apply
+#align fiberwise_linear.trans_local_homeomorph_apply FiberwiseLinear.trans_partialHomeomorph_apply
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print FiberwiseLinear.source_trans_localHomeomorph /-
+#print FiberwiseLinear.source_trans_partialHomeomorph /-
 /-- Compute the source of the composition of two local homeomorphisms induced by fiberwise linear
 equivalences. -/
-theorem source_trans_localHomeomorph (hU : IsOpen U)
+theorem source_trans_partialHomeomorph (hU : IsOpen U)
     (hφ : ContinuousOn (fun x => φ x : B → F →L[𝕜] F) U)
     (h2φ : ContinuousOn (fun x => (φ x).symm : B → F →L[𝕜] F) U) (hU' : IsOpen U')
     (hφ' : ContinuousOn (fun x => φ' x : B → F →L[𝕜] F) U')
     (h2φ' : ContinuousOn (fun x => (φ' x).symm : B → F →L[𝕜] F) U') :
-    (FiberwiseLinear.localHomeomorph φ hU hφ h2φ ≫ₕ
-          FiberwiseLinear.localHomeomorph φ' hU' hφ' h2φ').source =
+    (FiberwiseLinear.partialHomeomorph φ hU hφ h2φ ≫ₕ
+          FiberwiseLinear.partialHomeomorph φ' hU' hφ' h2φ').source =
       (U ∩ U') ×ˢ univ :=
-  by dsimp only [FiberwiseLinear.localHomeomorph]; mfld_set_tac
-#align fiberwise_linear.source_trans_local_homeomorph FiberwiseLinear.source_trans_localHomeomorph
+  by dsimp only [FiberwiseLinear.partialHomeomorph]; mfld_set_tac
+#align fiberwise_linear.source_trans_local_homeomorph FiberwiseLinear.source_trans_partialHomeomorph
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print FiberwiseLinear.target_trans_localHomeomorph /-
+#print FiberwiseLinear.target_trans_partialHomeomorph /-
 /-- Compute the target of the composition of two local homeomorphisms induced by fiberwise linear
 equivalences. -/
-theorem target_trans_localHomeomorph (hU : IsOpen U)
+theorem target_trans_partialHomeomorph (hU : IsOpen U)
     (hφ : ContinuousOn (fun x => φ x : B → F →L[𝕜] F) U)
     (h2φ : ContinuousOn (fun x => (φ x).symm : B → F →L[𝕜] F) U) (hU' : IsOpen U')
     (hφ' : ContinuousOn (fun x => φ' x : B → F →L[𝕜] F) U')
     (h2φ' : ContinuousOn (fun x => (φ' x).symm : B → F →L[𝕜] F) U') :
-    (FiberwiseLinear.localHomeomorph φ hU hφ h2φ ≫ₕ
-          FiberwiseLinear.localHomeomorph φ' hU' hφ' h2φ').target =
+    (FiberwiseLinear.partialHomeomorph φ hU hφ h2φ ≫ₕ
+          FiberwiseLinear.partialHomeomorph φ' hU' hφ' h2φ').target =
       (U ∩ U') ×ˢ univ :=
-  by dsimp only [FiberwiseLinear.localHomeomorph]; mfld_set_tac
-#align fiberwise_linear.target_trans_local_homeomorph FiberwiseLinear.target_trans_localHomeomorph
+  by dsimp only [FiberwiseLinear.partialHomeomorph]; mfld_set_tac
+#align fiberwise_linear.target_trans_local_homeomorph FiberwiseLinear.target_trans_partialHomeomorph
 -/
 
 end FiberwiseLinear
@@ -140,14 +141,14 @@ theorem SmoothFiberwiseLinear.locality_aux₁ (e : PartialHomeomorph (B × F) (B
                 SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x : F →L[𝕜] F)) u) (h2φ :
                 SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ((φ x).symm : F →L[𝕜] F)) u),
                 (e.restr s).EqOnSource
-                  (FiberwiseLinear.localHomeomorph φ hu hφ.ContinuousOn h2φ.ContinuousOn)) :
+                  (FiberwiseLinear.partialHomeomorph φ hu hφ.ContinuousOn h2φ.ContinuousOn)) :
     ∃ (U : Set B) (hU : e.source = U ×ˢ univ),
       ∀ x ∈ U,
         ∃ (φ : B → F ≃L[𝕜] F) (u : Set B) (hu : IsOpen u) (huU : u ⊆ U) (hux : x ∈ u) (hφ :
           SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x : F →L[𝕜] F)) u) (h2φ :
           SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ((φ x).symm : F →L[𝕜] F)) u),
           (e.restr (u ×ˢ univ)).EqOnSource
-            (FiberwiseLinear.localHomeomorph φ hu hφ.ContinuousOn h2φ.ContinuousOn) :=
+            (FiberwiseLinear.partialHomeomorph φ hu hφ.ContinuousOn h2φ.ContinuousOn) :=
   by
   rw [SetCoe.forall'] at h 
   -- choose s hs hsp φ u hu hφ h2φ heφ using h,
@@ -211,11 +212,11 @@ theorem SmoothFiberwiseLinear.locality_aux₂ (e : PartialHomeomorph (B × F) (B
           SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x : F →L[𝕜] F)) u) (h2φ :
           SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ((φ x).symm : F →L[𝕜] F)) u),
           (e.restr (u ×ˢ univ)).EqOnSource
-            (FiberwiseLinear.localHomeomorph φ hu hφ.ContinuousOn h2φ.ContinuousOn)) :
+            (FiberwiseLinear.partialHomeomorph φ hu hφ.ContinuousOn h2φ.ContinuousOn)) :
     ∃ (Φ : B → F ≃L[𝕜] F) (U : Set B) (hU₀ : IsOpen U) (hΦ :
       SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (Φ x : F →L[𝕜] F)) U) (h2Φ :
       SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ((Φ x).symm : F →L[𝕜] F)) U),
-      e.EqOnSource (FiberwiseLinear.localHomeomorph Φ hU₀ hΦ.ContinuousOn h2Φ.ContinuousOn) :=
+      e.EqOnSource (FiberwiseLinear.partialHomeomorph Φ hU₀ hΦ.ContinuousOn h2Φ.ContinuousOn) :=
   by
   classical
   rw [SetCoe.forall'] at h 
@@ -291,7 +292,7 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F)
     ⋃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U) (hφ :
       SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U) (h2φ :
       SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U),
-      {e | e.EqOnSource (FiberwiseLinear.localHomeomorph φ hU hφ.ContinuousOn h2φ.ContinuousOn)}
+      {e | e.EqOnSource (FiberwiseLinear.partialHomeomorph φ hU hφ.ContinuousOn h2φ.ContinuousOn)}
   trans' := by
     simp_rw [mem_Union]
     rintro e e' ⟨φ, U, hU, hφ, h2φ, heφ⟩ ⟨φ', U', hU', hφ', h2φ', heφ'⟩
@@ -306,8 +307,8 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F)
           (fun x : B => (φ x).symm.toContinuousLinearMap ∘L (φ' x).symm.toContinuousLinearMap)
           (U ∩ U')
       exact (h2φ.mono <| inter_subset_left _ _).clm_comp (h2φ'.mono <| inter_subset_right _ _)
-    · apply FiberwiseLinear.source_trans_localHomeomorph
-    · rintro ⟨b, v⟩ hb; apply FiberwiseLinear.trans_localHomeomorph_apply
+    · apply FiberwiseLinear.source_trans_partialHomeomorph
+    · rintro ⟨b, v⟩ hb; apply FiberwiseLinear.trans_partialHomeomorph_apply
   symm' := by
     simp_rw [mem_Union]
     rintro e ⟨φ, U, hU, hφ, h2φ, heφ⟩
@@ -320,11 +321,11 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F)
     · apply contMDiffOn_const
     · apply contMDiffOn_const
     ·
-      simp only [FiberwiseLinear.localHomeomorph, PartialHomeomorph.refl_localEquiv,
+      simp only [FiberwiseLinear.partialHomeomorph, PartialHomeomorph.refl_localEquiv,
         PartialEquiv.refl_source, univ_prod_univ]
     ·
-      simp only [FiberwiseLinear.localHomeomorph, PartialHomeomorph.refl_apply, Prod.mk.eta, id.def,
-        ContinuousLinearEquiv.coe_refl', PartialHomeomorph.mk_coe, PartialEquiv.coe_mk]
+      simp only [FiberwiseLinear.partialHomeomorph, PartialHomeomorph.refl_apply, Prod.mk.eta,
+        id.def, ContinuousLinearEquiv.coe_refl', PartialHomeomorph.mk_coe, PartialEquiv.coe_mk]
   locality' :=
     by
     -- the hard work has been extracted to `locality_aux₁` and `locality_aux₂`
@@ -346,7 +347,7 @@ theorem mem_smoothFiberwiseLinear_iff (e : PartialHomeomorph (B × F) (B × F))
       ∃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U) (hφ :
         SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U) (h2φ :
         SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U),
-        e.EqOnSource (FiberwiseLinear.localHomeomorph φ hU hφ.ContinuousOn h2φ.ContinuousOn) :=
+        e.EqOnSource (FiberwiseLinear.partialHomeomorph φ hU hφ.ContinuousOn h2φ.ContinuousOn) :=
   show e ∈ Set.iUnion _ ↔ _ by simp only [mem_Union]; rfl
 #align mem_smooth_fiberwise_linear_iff mem_smoothFiberwiseLinear_iff
 -/
Diff
@@ -321,10 +321,10 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F)
     · apply contMDiffOn_const
     ·
       simp only [FiberwiseLinear.localHomeomorph, PartialHomeomorph.refl_localEquiv,
-        LocalEquiv.refl_source, univ_prod_univ]
+        PartialEquiv.refl_source, univ_prod_univ]
     ·
       simp only [FiberwiseLinear.localHomeomorph, PartialHomeomorph.refl_apply, Prod.mk.eta, id.def,
-        ContinuousLinearEquiv.coe_refl', PartialHomeomorph.mk_coe, LocalEquiv.coe_mk]
+        ContinuousLinearEquiv.coe_refl', PartialHomeomorph.mk_coe, PartialEquiv.coe_mk]
   locality' :=
     by
     -- the hard work has been extracted to `locality_aux₁` and `locality_aux₂`
Diff
@@ -43,7 +43,7 @@ variable {φ φ' : B → F ≃L[𝕜] F} {U U' : Set B}
 determines a local homeomorphism from `B × F` to itself by its action fiberwise. -/
 def localHomeomorph (φ : B → F ≃L[𝕜] F) (hU : IsOpen U)
     (hφ : ContinuousOn (fun x => φ x : B → F →L[𝕜] F) U)
-    (h2φ : ContinuousOn (fun x => (φ x).symm : B → F →L[𝕜] F) U) : LocalHomeomorph (B × F) (B × F)
+    (h2φ : ContinuousOn (fun x => (φ x).symm : B → F →L[𝕜] F) U) : PartialHomeomorph (B × F) (B × F)
     where
   toFun x := (x.1, φ x.1 x.2)
   invFun x := (x.1, (φ x.1).symm x.2)
@@ -130,7 +130,7 @@ local homeomorphism.
 Then the source of `e` is of the form `U ×ˢ univ`, for some set `U` in `B`, and, at any point `x` in
 `U`, admits a neighbourhood `u` of `x` such that `e` is equal on `u ×ˢ univ` to some bi-smooth
 fiberwise linear local homeomorphism. -/
-theorem SmoothFiberwiseLinear.locality_aux₁ (e : LocalHomeomorph (B × F) (B × F))
+theorem SmoothFiberwiseLinear.locality_aux₁ (e : PartialHomeomorph (B × F) (B × F))
     (h :
       ∀ p ∈ e.source,
         ∃ s : Set (B × F),
@@ -203,7 +203,7 @@ together the various bi-smooth fiberwise linear local homeomorphism which exist
 
 The `U` in the conclusion is the same `U` as in the hypothesis. We state it like this, because this
 is exactly what we need for `smooth_fiberwise_linear`. -/
-theorem SmoothFiberwiseLinear.locality_aux₂ (e : LocalHomeomorph (B × F) (B × F)) (U : Set B)
+theorem SmoothFiberwiseLinear.locality_aux₂ (e : PartialHomeomorph (B × F) (B × F)) (U : Set B)
     (hU : e.source = U ×ˢ univ)
     (h :
       ∀ x ∈ U,
@@ -320,11 +320,11 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F)
     · apply contMDiffOn_const
     · apply contMDiffOn_const
     ·
-      simp only [FiberwiseLinear.localHomeomorph, LocalHomeomorph.refl_localEquiv,
+      simp only [FiberwiseLinear.localHomeomorph, PartialHomeomorph.refl_localEquiv,
         LocalEquiv.refl_source, univ_prod_univ]
     ·
-      simp only [FiberwiseLinear.localHomeomorph, LocalHomeomorph.refl_apply, Prod.mk.eta, id.def,
-        ContinuousLinearEquiv.coe_refl', LocalHomeomorph.mk_coe, LocalEquiv.coe_mk]
+      simp only [FiberwiseLinear.localHomeomorph, PartialHomeomorph.refl_apply, Prod.mk.eta, id.def,
+        ContinuousLinearEquiv.coe_refl', PartialHomeomorph.mk_coe, LocalEquiv.coe_mk]
   locality' :=
     by
     -- the hard work has been extracted to `locality_aux₁` and `locality_aux₂`
@@ -341,7 +341,7 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F)
 
 #print mem_smoothFiberwiseLinear_iff /-
 @[simp]
-theorem mem_smoothFiberwiseLinear_iff (e : LocalHomeomorph (B × F) (B × F)) :
+theorem mem_smoothFiberwiseLinear_iff (e : PartialHomeomorph (B × F) (B × F)) :
     e ∈ smoothFiberwiseLinear B F IB ↔
       ∃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U) (hφ :
         SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U) (h2φ :
Diff
@@ -3,7 +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 Mathbin.Geometry.Manifold.ContMdiff
+import Geometry.Manifold.ContMdiff
 
 #align_import geometry.manifold.vector_bundle.fiberwise_linear from "leanprover-community/mathlib"@"30faa0c3618ce1472bf6305ae0e3fa56affa3f95"
 
Diff
@@ -2,14 +2,11 @@
 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.fiberwise_linear
-! leanprover-community/mathlib commit 30faa0c3618ce1472bf6305ae0e3fa56affa3f95
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Geometry.Manifold.ContMdiff
 
+#align_import geometry.manifold.vector_bundle.fiberwise_linear from "leanprover-community/mathlib"@"30faa0c3618ce1472bf6305ae0e3fa56affa3f95"
+
 /-! # The groupoid of smooth, fiberwise-linear maps
 
 > THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn, Heather Macbeth
 
 ! This file was ported from Lean 3 source module geometry.manifold.vector_bundle.fiberwise_linear
-! leanprover-community/mathlib commit be2c24f56783935652cefffb4bfca7e4b25d167e
+! leanprover-community/mathlib commit 30faa0c3618ce1472bf6305ae0e3fa56affa3f95
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -12,6 +12,9 @@ import Mathbin.Geometry.Manifold.ContMdiff
 
 /-! # The groupoid of smooth, fiberwise-linear maps
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 This file contains preliminaries for the definition of a smooth vector bundle: an associated
 `structure_groupoid`, the groupoid of `smooth_fiberwise_linear` functions.
 -/
Diff
@@ -38,6 +38,7 @@ variable {φ φ' : B → F ≃L[𝕜] F} {U U' : Set B}
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print FiberwiseLinear.localHomeomorph /-
 /-- For `B` a topological space and `F` a `𝕜`-normed space, a map from `U : set B` to `F ≃L[𝕜] F`
 determines a local homeomorphism from `B × F` to itself by its action fiberwise. -/
 def localHomeomorph (φ : B → F ≃L[𝕜] F) (hU : IsOpen U)
@@ -63,7 +64,9 @@ def localHomeomorph (φ : B → F ≃L[𝕜] F) (hU : IsOpen U)
       h2φ.prod_map continuousOn_id
     continuous_on_fst.prod (is_bounded_bilinear_map_apply.continuous.comp_continuous_on this)
 #align fiberwise_linear.local_homeomorph FiberwiseLinear.localHomeomorph
+-/
 
+#print FiberwiseLinear.trans_localHomeomorph_apply /-
 /-- Compute the composition of two local homeomorphisms induced by fiberwise linear
 equivalences. -/
 theorem trans_localHomeomorph_apply (hU : IsOpen U)
@@ -76,8 +79,10 @@ theorem trans_localHomeomorph_apply (hU : IsOpen U)
       ⟨b, φ' b (φ b v)⟩ :=
   rfl
 #align fiberwise_linear.trans_local_homeomorph_apply FiberwiseLinear.trans_localHomeomorph_apply
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print FiberwiseLinear.source_trans_localHomeomorph /-
 /-- Compute the source of the composition of two local homeomorphisms induced by fiberwise linear
 equivalences. -/
 theorem source_trans_localHomeomorph (hU : IsOpen U)
@@ -90,8 +95,10 @@ theorem source_trans_localHomeomorph (hU : IsOpen U)
       (U ∩ U') ×ˢ univ :=
   by dsimp only [FiberwiseLinear.localHomeomorph]; mfld_set_tac
 #align fiberwise_linear.source_trans_local_homeomorph FiberwiseLinear.source_trans_localHomeomorph
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print FiberwiseLinear.target_trans_localHomeomorph /-
 /-- Compute the target of the composition of two local homeomorphisms induced by fiberwise linear
 equivalences. -/
 theorem target_trans_localHomeomorph (hU : IsOpen U)
@@ -104,6 +111,7 @@ theorem target_trans_localHomeomorph (hU : IsOpen U)
       (U ∩ U') ×ˢ univ :=
   by dsimp only [FiberwiseLinear.localHomeomorph]; mfld_set_tac
 #align fiberwise_linear.target_trans_local_homeomorph FiberwiseLinear.target_trans_localHomeomorph
+-/
 
 end FiberwiseLinear
 
@@ -115,6 +123,7 @@ variable {EB : Type _} [NormedAddCommGroup EB] [NormedSpace 𝕜 EB] {HB : Type
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print SmoothFiberwiseLinear.locality_aux₁ /-
 /-- Let `e` be a local homeomorphism of `B × F`.  Suppose that at every point `p` in the source of
 `e`, there is some neighbourhood `s` of `p` on which `e` is equal to a bi-smooth fiberwise linear
 local homeomorphism.
@@ -176,11 +185,13 @@ theorem SmoothFiberwiseLinear.locality_aux₁ (e : LocalHomeomorph (B × F) (B 
   · intro y hy; refine' ⟨(y, 0), heu ⟨p, hp⟩ ⟨_, _⟩ hy, rfl⟩
   · rw [← hesu, e.restr_source_inter]; exact heφ ⟨p, hp⟩
 #align smooth_fiberwise_linear.locality_aux₁ SmoothFiberwiseLinear.locality_aux₁
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr (_, _)]] -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print SmoothFiberwiseLinear.locality_aux₂ /-
 /-- Let `e` be a local homeomorphism of `B × F` whose source is `U ×ˢ univ`, for some set `U` in
 `B`, and which, at any point `x` in `U`, admits a neighbourhood `u` of `x` such that `e` is equal on
 `u ×ˢ univ` to some bi-smooth fiberwise linear local homeomorphism.  Then `e` itself is equal to
@@ -265,9 +276,11 @@ theorem SmoothFiberwiseLinear.locality_aux₂ (e : LocalHomeomorph (B × F) (B 
   rw [hΦφ]
   apply hux
 #align smooth_fiberwise_linear.locality_aux₂ SmoothFiberwiseLinear.locality_aux₂
+-/
 
 variable (F B IB)
 
+#print smoothFiberwiseLinear /-
 /-- For `B` a manifold and `F` a normed space, the groupoid on `B × F` consisting of local
 homeomorphisms which are bi-smooth and fiberwise linear, and induce the identity on `B`.
 When a (topological) vector bundle is smooth, then the composition of charts associated
@@ -324,7 +337,9 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F)
     rintro e e' ⟨φ, U, hU, hφ, h2φ, heφ⟩ hee'
     exact ⟨φ, U, hU, hφ, h2φ, Setoid.trans hee' heφ⟩
 #align smooth_fiberwise_linear smoothFiberwiseLinear
+-/
 
+#print mem_smoothFiberwiseLinear_iff /-
 @[simp]
 theorem mem_smoothFiberwiseLinear_iff (e : LocalHomeomorph (B × F) (B × F)) :
     e ∈ smoothFiberwiseLinear B F IB ↔
@@ -334,4 +349,5 @@ theorem mem_smoothFiberwiseLinear_iff (e : LocalHomeomorph (B × F) (B × F)) :
         e.EqOnSource (FiberwiseLinear.localHomeomorph φ hU hφ.ContinuousOn h2φ.ContinuousOn) :=
   show e ∈ Set.iUnion _ ↔ _ by simp only [mem_Union]; rfl
 #align mem_smooth_fiberwise_linear_iff mem_smoothFiberwiseLinear_iff
+-/
 
Diff
@@ -242,18 +242,18 @@ theorem SmoothFiberwiseLinear.locality_aux₂ (e : LocalHomeomorph (B × F) (B 
     exact Union_lift_mk ⟨y, hyu⟩ _
   have hΦ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => (Φ y : F →L[𝕜] F)) U :=
     by
-    apply contMdiffOn_of_locally_contMdiffOn
+    apply contMDiffOn_of_locally_contMDiffOn
     intro x hx
     refine' ⟨u ⟨x, hx⟩, hu ⟨x, hx⟩, hux _, _⟩
-    refine' (ContMdiffOn.congr (hφ ⟨x, hx⟩) _).mono (inter_subset_right _ _)
+    refine' (ContMDiffOn.congr (hφ ⟨x, hx⟩) _).mono (inter_subset_right _ _)
     intro y hy
     rw [hΦφ ⟨x, hx⟩ y hy]
   have h2Φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => ((Φ y).symm : F →L[𝕜] F)) U :=
     by
-    apply contMdiffOn_of_locally_contMdiffOn
+    apply contMDiffOn_of_locally_contMDiffOn
     intro x hx
     refine' ⟨u ⟨x, hx⟩, hu ⟨x, hx⟩, hux _, _⟩
-    refine' (ContMdiffOn.congr (h2φ ⟨x, hx⟩) _).mono (inter_subset_right _ _)
+    refine' (ContMDiffOn.congr (h2φ ⟨x, hx⟩) _).mono (inter_subset_right _ _)
     intro y hy
     rw [hΦφ ⟨x, hx⟩ y hy]
   refine' ⟨Φ, U, hU', hΦ, h2Φ, hU, fun p hp => _⟩
@@ -304,8 +304,8 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F)
   id_mem' := by
     simp_rw [mem_Union]
     refine' ⟨fun b => ContinuousLinearEquiv.refl 𝕜 F, univ, isOpen_univ, _, _, ⟨_, fun b hb => _⟩⟩
-    · apply contMdiffOn_const
-    · apply contMdiffOn_const
+    · apply contMDiffOn_const
+    · apply contMDiffOn_const
     ·
       simp only [FiberwiseLinear.localHomeomorph, LocalHomeomorph.refl_localEquiv,
         LocalEquiv.refl_source, univ_prod_univ]
Diff
@@ -207,63 +207,63 @@ theorem SmoothFiberwiseLinear.locality_aux₂ (e : LocalHomeomorph (B × F) (B 
       e.EqOnSource (FiberwiseLinear.localHomeomorph Φ hU₀ hΦ.ContinuousOn h2Φ.ContinuousOn) :=
   by
   classical
-    rw [SetCoe.forall'] at h 
-    choose! φ u hu hUu hux hφ h2φ heφ using h
-    have heuφ : ∀ x : U, eq_on e (fun q => (q.1, φ x q.1 q.2)) (u x ×ˢ univ) :=
-      by
-      intro x p hp
-      refine' (heφ x).2 _
-      rw [(heφ x).1]
-      exact hp
-    have huφ : ∀ (x x' : U) (y : B) (hyx : y ∈ u x) (hyx' : y ∈ u x'), φ x y = φ x' y :=
-      by
-      intro p p' y hyp hyp'
-      ext v
-      have h1 : e (y, v) = (y, φ p y v) := heuφ _ ⟨(id hyp : (y, v).fst ∈ u p), trivial⟩
-      have h2 : e (y, v) = (y, φ p' y v) := heuφ _ ⟨(id hyp' : (y, v).fst ∈ u p'), trivial⟩
-      exact congr_arg Prod.snd (h1.symm.trans h2)
-    have hUu' : U = ⋃ i, u i := by
-      ext x
-      rw [mem_Union]
-      refine' ⟨fun h => ⟨⟨x, h⟩, hux _⟩, _⟩
-      rintro ⟨x, hx⟩
-      exact hUu x hx
-    have hU' : IsOpen U := by
-      rw [hUu']
-      apply isOpen_iUnion hu
-    let Φ₀ : U → F ≃L[𝕜] F := Union_lift u (fun x => φ x ∘ coe) huφ U hUu'.le
-    let Φ : B → F ≃L[𝕜] F := fun y =>
-      if hy : y ∈ U then Φ₀ ⟨y, hy⟩ else ContinuousLinearEquiv.refl 𝕜 F
-    have hΦ : ∀ (y) (hy : y ∈ U), Φ y = Φ₀ ⟨y, hy⟩ := fun y hy => dif_pos hy
-    have hΦφ : ∀ x : U, ∀ y ∈ u x, Φ y = φ x y :=
-      by
-      intro x y hyu
-      refine' (hΦ y (hUu x hyu)).trans _
-      exact Union_lift_mk ⟨y, hyu⟩ _
-    have hΦ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => (Φ y : F →L[𝕜] F)) U :=
-      by
-      apply contMdiffOn_of_locally_contMdiffOn
-      intro x hx
-      refine' ⟨u ⟨x, hx⟩, hu ⟨x, hx⟩, hux _, _⟩
-      refine' (ContMdiffOn.congr (hφ ⟨x, hx⟩) _).mono (inter_subset_right _ _)
-      intro y hy
-      rw [hΦφ ⟨x, hx⟩ y hy]
-    have h2Φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => ((Φ y).symm : F →L[𝕜] F)) U :=
-      by
-      apply contMdiffOn_of_locally_contMdiffOn
-      intro x hx
-      refine' ⟨u ⟨x, hx⟩, hu ⟨x, hx⟩, hux _, _⟩
-      refine' (ContMdiffOn.congr (h2φ ⟨x, hx⟩) _).mono (inter_subset_right _ _)
-      intro y hy
-      rw [hΦφ ⟨x, hx⟩ y hy]
-    refine' ⟨Φ, U, hU', hΦ, h2Φ, hU, fun p hp => _⟩
-    rw [hU] at hp 
-    -- using rw on the next line seems to cause a timeout in kernel type-checking
-    refine' (heuφ ⟨p.fst, hp.1⟩ ⟨hux _, hp.2⟩).trans _
-    trace
-      "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr (_, _)]]"
-    rw [hΦφ]
-    apply hux
+  rw [SetCoe.forall'] at h 
+  choose! φ u hu hUu hux hφ h2φ heφ using h
+  have heuφ : ∀ x : U, eq_on e (fun q => (q.1, φ x q.1 q.2)) (u x ×ˢ univ) :=
+    by
+    intro x p hp
+    refine' (heφ x).2 _
+    rw [(heφ x).1]
+    exact hp
+  have huφ : ∀ (x x' : U) (y : B) (hyx : y ∈ u x) (hyx' : y ∈ u x'), φ x y = φ x' y :=
+    by
+    intro p p' y hyp hyp'
+    ext v
+    have h1 : e (y, v) = (y, φ p y v) := heuφ _ ⟨(id hyp : (y, v).fst ∈ u p), trivial⟩
+    have h2 : e (y, v) = (y, φ p' y v) := heuφ _ ⟨(id hyp' : (y, v).fst ∈ u p'), trivial⟩
+    exact congr_arg Prod.snd (h1.symm.trans h2)
+  have hUu' : U = ⋃ i, u i := by
+    ext x
+    rw [mem_Union]
+    refine' ⟨fun h => ⟨⟨x, h⟩, hux _⟩, _⟩
+    rintro ⟨x, hx⟩
+    exact hUu x hx
+  have hU' : IsOpen U := by
+    rw [hUu']
+    apply isOpen_iUnion hu
+  let Φ₀ : U → F ≃L[𝕜] F := Union_lift u (fun x => φ x ∘ coe) huφ U hUu'.le
+  let Φ : B → F ≃L[𝕜] F := fun y =>
+    if hy : y ∈ U then Φ₀ ⟨y, hy⟩ else ContinuousLinearEquiv.refl 𝕜 F
+  have hΦ : ∀ (y) (hy : y ∈ U), Φ y = Φ₀ ⟨y, hy⟩ := fun y hy => dif_pos hy
+  have hΦφ : ∀ x : U, ∀ y ∈ u x, Φ y = φ x y :=
+    by
+    intro x y hyu
+    refine' (hΦ y (hUu x hyu)).trans _
+    exact Union_lift_mk ⟨y, hyu⟩ _
+  have hΦ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => (Φ y : F →L[𝕜] F)) U :=
+    by
+    apply contMdiffOn_of_locally_contMdiffOn
+    intro x hx
+    refine' ⟨u ⟨x, hx⟩, hu ⟨x, hx⟩, hux _, _⟩
+    refine' (ContMdiffOn.congr (hφ ⟨x, hx⟩) _).mono (inter_subset_right _ _)
+    intro y hy
+    rw [hΦφ ⟨x, hx⟩ y hy]
+  have h2Φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => ((Φ y).symm : F →L[𝕜] F)) U :=
+    by
+    apply contMdiffOn_of_locally_contMdiffOn
+    intro x hx
+    refine' ⟨u ⟨x, hx⟩, hu ⟨x, hx⟩, hux _, _⟩
+    refine' (ContMdiffOn.congr (h2φ ⟨x, hx⟩) _).mono (inter_subset_right _ _)
+    intro y hy
+    rw [hΦφ ⟨x, hx⟩ y hy]
+  refine' ⟨Φ, U, hU', hΦ, h2Φ, hU, fun p hp => _⟩
+  rw [hU] at hp 
+  -- using rw on the next line seems to cause a timeout in kernel type-checking
+  refine' (heuφ ⟨p.fst, hp.1⟩ ⟨hux _, hp.2⟩).trans _
+  trace
+    "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr (_, _)]]"
+  rw [hΦφ]
+  apply hux
 #align smooth_fiberwise_linear.locality_aux₂ SmoothFiberwiseLinear.locality_aux₂
 
 variable (F B IB)
@@ -278,7 +278,7 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F)
     ⋃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U) (hφ :
       SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U) (h2φ :
       SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U),
-      { e | e.EqOnSource (FiberwiseLinear.localHomeomorph φ hU hφ.ContinuousOn h2φ.ContinuousOn) }
+      {e | e.EqOnSource (FiberwiseLinear.localHomeomorph φ hU hφ.ContinuousOn h2φ.ContinuousOn)}
   trans' := by
     simp_rw [mem_Union]
     rintro e e' ⟨φ, U, hU, hφ, h2φ, heφ⟩ ⟨φ', U', hU', hφ', h2φ', heφ'⟩
Diff
@@ -127,25 +127,25 @@ theorem SmoothFiberwiseLinear.locality_aux₁ (e : LocalHomeomorph (B × F) (B 
         ∃ s : Set (B × F),
           IsOpen s ∧
             p ∈ s ∧
-              ∃ (φ : B → F ≃L[𝕜] F)(u : Set B)(hu : IsOpen u)(hφ :
-                SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x : F →L[𝕜] F)) u)(h2φ :
+              ∃ (φ : B → F ≃L[𝕜] F) (u : Set B) (hu : IsOpen u) (hφ :
+                SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x : F →L[𝕜] F)) u) (h2φ :
                 SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ((φ x).symm : F →L[𝕜] F)) u),
                 (e.restr s).EqOnSource
                   (FiberwiseLinear.localHomeomorph φ hu hφ.ContinuousOn h2φ.ContinuousOn)) :
-    ∃ (U : Set B)(hU : e.source = U ×ˢ univ),
+    ∃ (U : Set B) (hU : e.source = U ×ˢ univ),
       ∀ x ∈ U,
-        ∃ (φ : B → F ≃L[𝕜] F)(u : Set B)(hu : IsOpen u)(huU : u ⊆ U)(hux : x ∈ u)(hφ :
-          SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x : F →L[𝕜] F)) u)(h2φ :
+        ∃ (φ : B → F ≃L[𝕜] F) (u : Set B) (hu : IsOpen u) (huU : u ⊆ U) (hux : x ∈ u) (hφ :
+          SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x : F →L[𝕜] F)) u) (h2φ :
           SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ((φ x).symm : F →L[𝕜] F)) u),
           (e.restr (u ×ˢ univ)).EqOnSource
             (FiberwiseLinear.localHomeomorph φ hu hφ.ContinuousOn h2φ.ContinuousOn) :=
   by
-  rw [SetCoe.forall'] at h
+  rw [SetCoe.forall'] at h 
   -- choose s hs hsp φ u hu hφ h2φ heφ using h,
   -- the following 2 lines should be `choose s hs hsp φ u hu hφ h2φ heφ using h,`
   -- `choose` produces a proof term that takes a long time to type-check by the kernel (it seems)
   -- porting note: todo: try using `choose` again in Lean 4
-  simp only [Classical.skolem, ← exists_prop] at h
+  simp only [Classical.skolem, ← exists_prop] at h 
   rcases h with ⟨s, hs, hsp, φ, u, hu, hφ, h2φ, heφ⟩
   have hesu : ∀ p : e.source, e.source ∩ s p = u p ×ˢ univ :=
     by
@@ -161,7 +161,7 @@ theorem SmoothFiberwiseLinear.locality_aux₁ (e : LocalHomeomorph (B × F) (B 
     by
     intro p q hq
     have : q ∈ u p ×ˢ (univ : Set F) := ⟨hq, trivial⟩
-    rw [← hesu p] at this
+    rw [← hesu p] at this 
     exact this.1
   have he : e.source = (Prod.fst '' e.source) ×ˢ (univ : Set F) :=
     by
@@ -196,18 +196,18 @@ theorem SmoothFiberwiseLinear.locality_aux₂ (e : LocalHomeomorph (B × F) (B 
     (hU : e.source = U ×ˢ univ)
     (h :
       ∀ x ∈ U,
-        ∃ (φ : B → F ≃L[𝕜] F)(u : Set B)(hu : IsOpen u)(hUu : u ⊆ U)(hux : x ∈ u)(hφ :
-          SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x : F →L[𝕜] F)) u)(h2φ :
+        ∃ (φ : B → F ≃L[𝕜] F) (u : Set B) (hu : IsOpen u) (hUu : u ⊆ U) (hux : x ∈ u) (hφ :
+          SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x : F →L[𝕜] F)) u) (h2φ :
           SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ((φ x).symm : F →L[𝕜] F)) u),
           (e.restr (u ×ˢ univ)).EqOnSource
             (FiberwiseLinear.localHomeomorph φ hu hφ.ContinuousOn h2φ.ContinuousOn)) :
-    ∃ (Φ : B → F ≃L[𝕜] F)(U : Set B)(hU₀ : IsOpen U)(hΦ :
-      SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (Φ x : F →L[𝕜] F)) U)(h2Φ :
+    ∃ (Φ : B → F ≃L[𝕜] F) (U : Set B) (hU₀ : IsOpen U) (hΦ :
+      SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (Φ x : F →L[𝕜] F)) U) (h2Φ :
       SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ((Φ x).symm : F →L[𝕜] F)) U),
       e.EqOnSource (FiberwiseLinear.localHomeomorph Φ hU₀ hΦ.ContinuousOn h2Φ.ContinuousOn) :=
   by
   classical
-    rw [SetCoe.forall'] at h
+    rw [SetCoe.forall'] at h 
     choose! φ u hu hUu hux hφ h2φ heφ using h
     have heuφ : ∀ x : U, eq_on e (fun q => (q.1, φ x q.1 q.2)) (u x ×ˢ univ) :=
       by
@@ -257,7 +257,7 @@ theorem SmoothFiberwiseLinear.locality_aux₂ (e : LocalHomeomorph (B × F) (B 
       intro y hy
       rw [hΦφ ⟨x, hx⟩ y hy]
     refine' ⟨Φ, U, hU', hΦ, h2Φ, hU, fun p hp => _⟩
-    rw [hU] at hp
+    rw [hU] at hp 
     -- using rw on the next line seems to cause a timeout in kernel type-checking
     refine' (heuφ ⟨p.fst, hp.1⟩ ⟨hux _, hp.2⟩).trans _
     trace
@@ -328,8 +328,8 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F)
 @[simp]
 theorem mem_smoothFiberwiseLinear_iff (e : LocalHomeomorph (B × F) (B × F)) :
     e ∈ smoothFiberwiseLinear B F IB ↔
-      ∃ (φ : B → F ≃L[𝕜] F)(U : Set B)(hU : IsOpen U)(hφ :
-        SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U)(h2φ :
+      ∃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U) (hφ :
+        SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U) (h2φ :
         SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U),
         e.EqOnSource (FiberwiseLinear.localHomeomorph φ hU hφ.ContinuousOn h2φ.ContinuousOn) :=
   show e ∈ Set.iUnion _ ↔ _ by simp only [mem_Union]; rfl
Diff
@@ -311,7 +311,7 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F)
         LocalEquiv.refl_source, univ_prod_univ]
     ·
       simp only [FiberwiseLinear.localHomeomorph, LocalHomeomorph.refl_apply, Prod.mk.eta, id.def,
-        ContinuousLinearEquiv.coe_refl', LocalHomeomorph.mk_coe, [anonymous]]
+        ContinuousLinearEquiv.coe_refl', LocalHomeomorph.mk_coe, LocalEquiv.coe_mk]
   locality' :=
     by
     -- the hard work has been extracted to `locality_aux₁` and `locality_aux₂`
Diff
@@ -21,7 +21,7 @@ noncomputable section
 
 open Set TopologicalSpace
 
-open Manifold Topology
+open scoped Manifold Topology
 
 /-! ### The groupoid of smooth, fiberwise-linear maps -/
 
Diff
@@ -88,9 +88,7 @@ theorem source_trans_localHomeomorph (hU : IsOpen U)
     (FiberwiseLinear.localHomeomorph φ hU hφ h2φ ≫ₕ
           FiberwiseLinear.localHomeomorph φ' hU' hφ' h2φ').source =
       (U ∩ U') ×ˢ univ :=
-  by
-  dsimp only [FiberwiseLinear.localHomeomorph]
-  mfld_set_tac
+  by dsimp only [FiberwiseLinear.localHomeomorph]; mfld_set_tac
 #align fiberwise_linear.source_trans_local_homeomorph FiberwiseLinear.source_trans_localHomeomorph
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
@@ -104,9 +102,7 @@ theorem target_trans_localHomeomorph (hU : IsOpen U)
     (FiberwiseLinear.localHomeomorph φ hU hφ h2φ ≫ₕ
           FiberwiseLinear.localHomeomorph φ' hU' hφ' h2φ').target =
       (U ∩ U') ×ˢ univ :=
-  by
-  dsimp only [FiberwiseLinear.localHomeomorph]
-  mfld_set_tac
+  by dsimp only [FiberwiseLinear.localHomeomorph]; mfld_set_tac
 #align fiberwise_linear.target_trans_local_homeomorph FiberwiseLinear.target_trans_localHomeomorph
 
 end FiberwiseLinear
@@ -177,10 +173,8 @@ theorem SmoothFiberwiseLinear.locality_aux₁ (e : LocalHomeomorph (B × F) (B 
   refine' ⟨Prod.fst '' e.source, he, _⟩
   rintro x ⟨p, hp, rfl⟩
   refine' ⟨φ ⟨p, hp⟩, u ⟨p, hp⟩, hu ⟨p, hp⟩, _, hu' _, hφ ⟨p, hp⟩, h2φ ⟨p, hp⟩, _⟩
-  · intro y hy
-    refine' ⟨(y, 0), heu ⟨p, hp⟩ ⟨_, _⟩ hy, rfl⟩
-  · rw [← hesu, e.restr_source_inter]
-    exact heφ ⟨p, hp⟩
+  · intro y hy; refine' ⟨(y, 0), heu ⟨p, hp⟩ ⟨_, _⟩ hy, rfl⟩
+  · rw [← hesu, e.restr_source_inter]; exact heφ ⟨p, hp⟩
 #align smooth_fiberwise_linear.locality_aux₁ SmoothFiberwiseLinear.locality_aux₁
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
@@ -300,8 +294,7 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F)
           (U ∩ U')
       exact (h2φ.mono <| inter_subset_left _ _).clm_comp (h2φ'.mono <| inter_subset_right _ _)
     · apply FiberwiseLinear.source_trans_localHomeomorph
-    · rintro ⟨b, v⟩ hb
-      apply FiberwiseLinear.trans_localHomeomorph_apply
+    · rintro ⟨b, v⟩ hb; apply FiberwiseLinear.trans_localHomeomorph_apply
   symm' := by
     simp_rw [mem_Union]
     rintro e ⟨φ, U, hU, hφ, h2φ, heφ⟩
@@ -339,8 +332,6 @@ theorem mem_smoothFiberwiseLinear_iff (e : LocalHomeomorph (B × F) (B × F)) :
         SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U)(h2φ :
         SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U),
         e.EqOnSource (FiberwiseLinear.localHomeomorph φ hU hφ.ContinuousOn h2φ.ContinuousOn) :=
-  show e ∈ Set.iUnion _ ↔ _ by
-    simp only [mem_Union]
-    rfl
+  show e ∈ Set.iUnion _ ↔ _ by simp only [mem_Union]; rfl
 #align mem_smooth_fiberwise_linear_iff mem_smoothFiberwiseLinear_iff
 
Diff
@@ -236,7 +236,7 @@ theorem SmoothFiberwiseLinear.locality_aux₂ (e : LocalHomeomorph (B × F) (B 
       exact hUu x hx
     have hU' : IsOpen U := by
       rw [hUu']
-      apply isOpen_unionᵢ hu
+      apply isOpen_iUnion hu
     let Φ₀ : U → F ≃L[𝕜] F := Union_lift u (fun x => φ x ∘ coe) huφ U hUu'.le
     let Φ : B → F ≃L[𝕜] F := fun y =>
       if hy : y ∈ U then Φ₀ ⟨y, hy⟩ else ContinuousLinearEquiv.refl 𝕜 F
@@ -339,7 +339,7 @@ theorem mem_smoothFiberwiseLinear_iff (e : LocalHomeomorph (B × F) (B × F)) :
         SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U)(h2φ :
         SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U),
         e.EqOnSource (FiberwiseLinear.localHomeomorph φ hU hφ.ContinuousOn h2φ.ContinuousOn) :=
-  show e ∈ Set.unionᵢ _ ↔ _ by
+  show e ∈ Set.iUnion _ ↔ _ by
     simp only [mem_Union]
     rfl
 #align mem_smooth_fiberwise_linear_iff mem_smoothFiberwiseLinear_iff
Diff
@@ -3,19 +3,17 @@ 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
-! leanprover-community/mathlib commit 87ecf9614fedda186a792c38ee571904f548df29
+! This file was ported from Lean 3 source module geometry.manifold.vector_bundle.fiberwise_linear
+! leanprover-community/mathlib commit be2c24f56783935652cefffb4bfca7e4b25d167e
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
 import Mathbin.Geometry.Manifold.ContMdiff
 
-/-! # Smooth vector bundles
+/-! # The groupoid of smooth, fiberwise-linear maps
 
-This file will eventually contain the definition of a smooth vector bundle. For now, it contains
-preliminaries regarding an associated `structure_groupoid`, the groupoid of
-`smooth_fiberwise_linear` functions. When a (topological) vector bundle is smooth, then the
-composition of charts associated to the vector bundle belong to this groupoid.
+This file contains preliminaries for the definition of a smooth vector bundle: an associated
+`structure_groupoid`, the groupoid of `smooth_fiberwise_linear` functions.
 -/
 
 
@@ -124,7 +122,6 @@ variable {EB : Type _} [NormedAddCommGroup EB] [NormedSpace 𝕜 EB] {HB : Type
 /-- Let `e` be a local homeomorphism of `B × F`.  Suppose that at every point `p` in the source of
 `e`, there is some neighbourhood `s` of `p` on which `e` is equal to a bi-smooth fiberwise linear
 local homeomorphism.
-
 Then the source of `e` is of the form `U ×ˢ univ`, for some set `U` in `B`, and, at any point `x` in
 `U`, admits a neighbourhood `u` of `x` such that `e` is equal on `u ×ˢ univ` to some bi-smooth
 fiberwise linear local homeomorphism. -/
@@ -335,3 +332,15 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F)
     exact ⟨φ, U, hU, hφ, h2φ, Setoid.trans hee' heφ⟩
 #align smooth_fiberwise_linear smoothFiberwiseLinear
 
+@[simp]
+theorem mem_smoothFiberwiseLinear_iff (e : LocalHomeomorph (B × F) (B × F)) :
+    e ∈ smoothFiberwiseLinear B F IB ↔
+      ∃ (φ : B → F ≃L[𝕜] F)(U : Set B)(hU : IsOpen U)(hφ :
+        SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U)(h2φ :
+        SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U),
+        e.EqOnSource (FiberwiseLinear.localHomeomorph φ hU hφ.ContinuousOn h2φ.ContinuousOn) :=
+  show e ∈ Set.unionᵢ _ ↔ _ by
+    simp only [mem_Union]
+    rfl
+#align mem_smooth_fiberwise_linear_iff mem_smoothFiberwiseLinear_iff
+

Changes in mathlib4

mathlib3
mathlib4
chore(Geometry): remove a few porting notes (#12061)

In all cases, the original proof fixed itself.

Diff
@@ -221,21 +221,6 @@ theorem SmoothFiberwiseLinear.locality_aux₂ (e : PartialHomeomorph (B × F) (B
   apply hux
 #align smooth_fiberwise_linear.locality_aux₂ SmoothFiberwiseLinear.locality_aux₂
 
-/- Porting note: `simp only [mem_iUnion]` fails in the next definition. This aux lemma is a
-workaround. -/
-private theorem mem_aux {e : PartialHomeomorph (B × F) (B × F)} :
-    (e ∈ ⋃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U)
-      (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U)
-      (h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U),
-        {e | e.EqOnSource (FiberwiseLinear.partialHomeomorph φ hU hφ.continuousOn
-          h2φ.continuousOn)}) ↔
-      ∃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U)
-        (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U)
-        (h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U),
-          e.EqOnSource
-            (FiberwiseLinear.partialHomeomorph φ hU hφ.continuousOn h2φ.continuousOn) := by
-  simp only [mem_iUnion, mem_setOf_eq]
-
 variable (F B IB)
 
 /-- For `B` a manifold and `F` a normed space, the groupoid on `B × F` consisting of local
@@ -249,7 +234,7 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F) where
       (h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U),
         {e | e.EqOnSource (FiberwiseLinear.partialHomeomorph φ hU hφ.continuousOn h2φ.continuousOn)}
   trans' := by
-    simp only [mem_aux]
+    simp only [mem_iUnion]
     rintro e e' ⟨φ, U, hU, hφ, h2φ, heφ⟩ ⟨φ', U', hU', hφ', h2φ', heφ'⟩
     refine' ⟨fun b => (φ b).trans (φ' b), _, hU.inter hU', _, _,
       Setoid.trans (PartialHomeomorph.EqOnSource.trans' heφ heφ') ⟨_, _⟩⟩
@@ -272,27 +257,38 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F) where
     simp_rw [ContinuousLinearEquiv.symm_symm]
     exact hφ
   id_mem' := by
-    /- porting note: `simp_rw [mem_iUnion]` failed; expanding. Was:
     simp_rw [mem_iUnion]
-    refine' ⟨fun b => ContinuousLinearEquiv.refl 𝕜 F, univ, isOpen_univ, _, _, ⟨_, fun b hb => _⟩⟩
-    -/
-    refine mem_iUnion.2 ⟨fun _ ↦ .refl 𝕜 F, mem_iUnion.2 ⟨univ, mem_iUnion.2 ⟨isOpen_univ, ?_⟩⟩⟩
-    refine mem_iUnion.2 ⟨contMDiffOn_const, mem_iUnion.2 ⟨contMDiffOn_const, ?_, ?_⟩⟩
-    · simp only [FiberwiseLinear.partialHomeomorph, PartialHomeomorph.refl_partialEquiv,
-        PartialEquiv.refl_source, univ_prod_univ]
-    · exact eqOn_refl id _
+    refine ⟨fun _ ↦ ContinuousLinearEquiv.refl 𝕜 F, univ, isOpen_univ, smoothOn_const,
+      smoothOn_const, ⟨?_, fun b _hb ↦ rfl⟩⟩
+    simp only [FiberwiseLinear.partialHomeomorph, PartialHomeomorph.refl_partialEquiv,
+      PartialEquiv.refl_source, univ_prod_univ]
   locality' := by
     -- the hard work has been extracted to `locality_aux₁` and `locality_aux₂`
-    simp only [mem_aux]
+    simp only [mem_iUnion]
     intro e he
     obtain ⟨U, hU, h⟩ := SmoothFiberwiseLinear.locality_aux₁ e he
     exact SmoothFiberwiseLinear.locality_aux₂ e U hU h
   mem_of_eqOnSource' := by
-    simp only [mem_aux]
+    simp only [mem_iUnion]
     rintro e e' ⟨φ, U, hU, hφ, h2φ, heφ⟩ hee'
     exact ⟨φ, U, hU, hφ, h2φ, Setoid.trans hee' heφ⟩
 #align smooth_fiberwise_linear smoothFiberwiseLinear
 
+variable {F B IB} in
+-- TODO: can this be inlined into the next lemma?
+private theorem mem_aux {e : PartialHomeomorph (B × F) (B × F)} :
+    (e ∈ ⋃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U)
+      (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U)
+      (h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U),
+        {e | e.EqOnSource (FiberwiseLinear.partialHomeomorph φ hU hφ.continuousOn
+          h2φ.continuousOn)}) ↔
+      ∃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U)
+        (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U)
+        (h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U),
+          e.EqOnSource
+            (FiberwiseLinear.partialHomeomorph φ hU hφ.continuousOn h2φ.continuousOn) := by
+  simp only [mem_iUnion, mem_setOf_eq]
+
 @[simp]
 theorem mem_smoothFiberwiseLinear_iff (e : PartialHomeomorph (B × F) (B × F)) :
     e ∈ smoothFiberwiseLinear B F IB ↔
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
@@ -23,7 +23,6 @@ open scoped Manifold Topology
 
 
 variable {𝕜 B F : Type*} [TopologicalSpace B]
-
 variable [NontriviallyNormedField 𝕜] [NormedAddCommGroup F] [NormedSpace 𝕜 F]
 
 namespace FiberwiseLinear
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
@@ -265,7 +265,7 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F) where
       exact (h2φ.mono <| inter_subset_left _ _).clm_comp (h2φ'.mono <| inter_subset_right _ _)
     · apply FiberwiseLinear.source_trans_partialHomeomorph
     · rintro ⟨b, v⟩ -; apply FiberwiseLinear.trans_partialHomeomorph_apply
-  -- porting note: without introducing `e` first, the first `simp only` fails
+  -- Porting note: without introducing `e` first, the first `simp only` fails
   symm' := fun e ↦ by
     simp only [mem_iUnion]
     rintro ⟨φ, U, hU, hφ, h2φ, heφ⟩
chore: rename StructureGroupoid.eq_on_source' to StructureGroupoid.mem_of_eqOnSource' (#9802)

Since it refers to PartialEquiv.EqOnSource, the correct naming scheme should not be snake case eq_on_source. I also added mem_of_ because that's the target of the lemma, while EqOnSource is just a hypothesis.

There are no added lemmas or docstrings in this PR. It's all just renaming.

Diff
@@ -288,7 +288,7 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F) where
     intro e he
     obtain ⟨U, hU, h⟩ := SmoothFiberwiseLinear.locality_aux₁ e he
     exact SmoothFiberwiseLinear.locality_aux₂ e U hU h
-  eq_on_source' := by
+  mem_of_eqOnSource' := by
     simp only [mem_aux]
     rintro e e' ⟨φ, U, hU, hφ, h2φ, heφ⟩ hee'
     exact ⟨φ, U, hU, hφ, h2φ, Setoid.trans hee' heφ⟩
chore: last localEquiv -> partialEquiv renames in lemma names (#9620)
Diff
@@ -279,7 +279,7 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F) where
     -/
     refine mem_iUnion.2 ⟨fun _ ↦ .refl 𝕜 F, mem_iUnion.2 ⟨univ, mem_iUnion.2 ⟨isOpen_univ, ?_⟩⟩⟩
     refine mem_iUnion.2 ⟨contMDiffOn_const, mem_iUnion.2 ⟨contMDiffOn_const, ?_, ?_⟩⟩
-    · simp only [FiberwiseLinear.partialHomeomorph, PartialHomeomorph.refl_localEquiv,
+    · simp only [FiberwiseLinear.partialHomeomorph, PartialHomeomorph.refl_partialEquiv,
         PartialEquiv.refl_source, univ_prod_univ]
     · exact eqOn_refl id _
   locality' := by
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
@@ -31,8 +31,8 @@ namespace FiberwiseLinear
 variable {φ φ' : B → F ≃L[𝕜] F} {U U' : Set B}
 
 /-- For `B` a topological space and `F` a `𝕜`-normed space, a map from `U : Set B` to `F ≃L[𝕜] F`
-determines a local homeomorphism from `B × F` to itself by its action fiberwise. -/
-def localHomeomorph (φ : B → F ≃L[𝕜] F) (hU : IsOpen U)
+determines a partial homeomorphism from `B × F` to itself by its action fiberwise. -/
+def partialHomeomorph (φ : B → F ≃L[𝕜] F) (hU : IsOpen U)
     (hφ : ContinuousOn (fun x => φ x : B → F →L[𝕜] F) U)
     (h2φ : ContinuousOn (fun x => (φ x).symm : B → F →L[𝕜] F) U) :
     PartialHomeomorph (B × F) (B × F) where
@@ -54,71 +54,72 @@ def localHomeomorph (φ : B → F ≃L[𝕜] F) (hU : IsOpen U)
     haveI : ContinuousOn (fun p : B × F => (((φ p.1).symm : F →L[𝕜] F), p.2)) (U ×ˢ univ) :=
       h2φ.prod_map continuousOn_id
     continuousOn_fst.prod (isBoundedBilinearMap_apply.continuous.comp_continuousOn this)
-#align fiberwise_linear.local_homeomorph FiberwiseLinear.localHomeomorph
+#align fiberwise_linear.local_homeomorph FiberwiseLinear.partialHomeomorph
 
-/-- Compute the composition of two local homeomorphisms induced by fiberwise linear
+/-- Compute the composition of two partial homeomorphisms induced by fiberwise linear
 equivalences. -/
-theorem trans_localHomeomorph_apply (hU : IsOpen U)
+theorem trans_partialHomeomorph_apply (hU : IsOpen U)
     (hφ : ContinuousOn (fun x => φ x : B → F →L[𝕜] F) U)
     (h2φ : ContinuousOn (fun x => (φ x).symm : B → F →L[𝕜] F) U) (hU' : IsOpen U')
     (hφ' : ContinuousOn (fun x => φ' x : B → F →L[𝕜] F) U')
     (h2φ' : ContinuousOn (fun x => (φ' x).symm : B → F →L[𝕜] F) U') (b : B) (v : F) :
-    (FiberwiseLinear.localHomeomorph φ hU hφ h2φ ≫ₕ FiberwiseLinear.localHomeomorph φ' hU' hφ' h2φ')
+    (FiberwiseLinear.partialHomeomorph φ hU hφ h2φ ≫ₕ
+      FiberwiseLinear.partialHomeomorph φ' hU' hφ' h2φ')
         ⟨b, v⟩ =
       ⟨b, φ' b (φ b v)⟩ :=
   rfl
-#align fiberwise_linear.trans_local_homeomorph_apply FiberwiseLinear.trans_localHomeomorph_apply
+#align fiberwise_linear.trans_local_homeomorph_apply FiberwiseLinear.trans_partialHomeomorph_apply
 
-/-- Compute the source of the composition of two local homeomorphisms induced by fiberwise linear
+/-- Compute the source of the composition of two partial homeomorphisms induced by fiberwise linear
 equivalences. -/
-theorem source_trans_localHomeomorph (hU : IsOpen U)
+theorem source_trans_partialHomeomorph (hU : IsOpen U)
     (hφ : ContinuousOn (fun x => φ x : B → F →L[𝕜] F) U)
     (h2φ : ContinuousOn (fun x => (φ x).symm : B → F →L[𝕜] F) U) (hU' : IsOpen U')
     (hφ' : ContinuousOn (fun x => φ' x : B → F →L[𝕜] F) U')
     (h2φ' : ContinuousOn (fun x => (φ' x).symm : B → F →L[𝕜] F) U') :
-    (FiberwiseLinear.localHomeomorph φ hU hφ h2φ ≫ₕ
-          FiberwiseLinear.localHomeomorph φ' hU' hφ' h2φ').source =
+    (FiberwiseLinear.partialHomeomorph φ hU hφ h2φ ≫ₕ
+          FiberwiseLinear.partialHomeomorph φ' hU' hφ' h2φ').source =
       (U ∩ U') ×ˢ univ :=
-  by dsimp only [FiberwiseLinear.localHomeomorph]; mfld_set_tac
-#align fiberwise_linear.source_trans_local_homeomorph FiberwiseLinear.source_trans_localHomeomorph
+  by dsimp only [FiberwiseLinear.partialHomeomorph]; mfld_set_tac
+#align fiberwise_linear.source_trans_local_homeomorph FiberwiseLinear.source_trans_partialHomeomorph
 
-/-- Compute the target of the composition of two local homeomorphisms induced by fiberwise linear
+/-- Compute the target of the composition of two partial homeomorphisms induced by fiberwise linear
 equivalences. -/
-theorem target_trans_localHomeomorph (hU : IsOpen U)
+theorem target_trans_partialHomeomorph (hU : IsOpen U)
     (hφ : ContinuousOn (fun x => φ x : B → F →L[𝕜] F) U)
     (h2φ : ContinuousOn (fun x => (φ x).symm : B → F →L[𝕜] F) U) (hU' : IsOpen U')
     (hφ' : ContinuousOn (fun x => φ' x : B → F →L[𝕜] F) U')
     (h2φ' : ContinuousOn (fun x => (φ' x).symm : B → F →L[𝕜] F) U') :
-    (FiberwiseLinear.localHomeomorph φ hU hφ h2φ ≫ₕ
-          FiberwiseLinear.localHomeomorph φ' hU' hφ' h2φ').target =
+    (FiberwiseLinear.partialHomeomorph φ hU hφ h2φ ≫ₕ
+          FiberwiseLinear.partialHomeomorph φ' hU' hφ' h2φ').target =
       (U ∩ U') ×ˢ univ :=
-  by dsimp only [FiberwiseLinear.localHomeomorph]; mfld_set_tac
-#align fiberwise_linear.target_trans_local_homeomorph FiberwiseLinear.target_trans_localHomeomorph
+  by dsimp only [FiberwiseLinear.partialHomeomorph]; mfld_set_tac
+#align fiberwise_linear.target_trans_local_homeomorph FiberwiseLinear.target_trans_partialHomeomorph
 
 end FiberwiseLinear
 
 variable {EB : Type*} [NormedAddCommGroup EB] [NormedSpace 𝕜 EB] {HB : Type*}
   [TopologicalSpace HB] [ChartedSpace HB B] {IB : ModelWithCorners 𝕜 EB HB}
 
-/-- Let `e` be a local homeomorphism of `B × F`.  Suppose that at every point `p` in the source of
+/-- Let `e` be a partial homeomorphism of `B × F`.  Suppose that at every point `p` in the source of
 `e`, there is some neighbourhood `s` of `p` on which `e` is equal to a bi-smooth fiberwise linear
-local homeomorphism.
+partial homeomorphism.
 Then the source of `e` is of the form `U ×ˢ univ`, for some set `U` in `B`, and, at any point `x` in
 `U`, admits a neighbourhood `u` of `x` such that `e` is equal on `u ×ˢ univ` to some bi-smooth
-fiberwise linear local homeomorphism. -/
+fiberwise linear partial homeomorphism. -/
 theorem SmoothFiberwiseLinear.locality_aux₁ (e : PartialHomeomorph (B × F) (B × F))
     (h : ∀ p ∈ e.source, ∃ s : Set (B × F), IsOpen s ∧ p ∈ s ∧
       ∃ (φ : B → F ≃L[𝕜] F) (u : Set B) (hu : IsOpen u)
         (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x : F →L[𝕜] F)) u)
         (h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ((φ x).symm : F →L[𝕜] F)) u),
           (e.restr s).EqOnSource
-            (FiberwiseLinear.localHomeomorph φ hu hφ.continuousOn h2φ.continuousOn)) :
+            (FiberwiseLinear.partialHomeomorph φ hu hφ.continuousOn h2φ.continuousOn)) :
     ∃ U : Set B, e.source = U ×ˢ univ ∧ ∀ x ∈ U,
         ∃ (φ : B → F ≃L[𝕜] F) (u : Set B) (hu : IsOpen u) (_huU : u ⊆ U) (_hux : x ∈ u),
           ∃ (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x : F →L[𝕜] F)) u)
             (h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ((φ x).symm : F →L[𝕜] F)) u),
             (e.restr (u ×ˢ univ)).EqOnSource
-              (FiberwiseLinear.localHomeomorph φ hu hφ.continuousOn h2φ.continuousOn) := by
+              (FiberwiseLinear.partialHomeomorph φ hu hφ.continuousOn h2φ.continuousOn) := by
   rw [SetCoe.forall'] at h
   choose s hs hsp φ u hu hφ h2φ heφ using h
   have hesu : ∀ p : e.source, e.source ∩ s p = u p ×ˢ univ := by
@@ -147,14 +148,14 @@ theorem SmoothFiberwiseLinear.locality_aux₁ (e : PartialHomeomorph (B × F) (B
   · rw [← hesu, e.restr_source_inter]; exact heφ ⟨p, hp⟩
 #align smooth_fiberwise_linear.locality_aux₁ SmoothFiberwiseLinear.locality_aux₁
 
-/-- Let `e` be a local homeomorphism of `B × F` whose source is `U ×ˢ univ`, for some set `U` in
-`B`, and which, at any point `x` in `U`, admits a neighbourhood `u` of `x` such that `e` is equal on
-`u ×ˢ univ` to some bi-smooth fiberwise linear local homeomorphism.  Then `e` itself is equal to
-some bi-smooth fiberwise linear local homeomorphism.
+/-- Let `e` be a partial homeomorphism of `B × F` whose source is `U ×ˢ univ`, for some set `U` in
+`B`, and which, at any point `x` in `U`, admits a neighbourhood `u` of `x` such that `e` is equal
+on `u ×ˢ univ` to some bi-smooth fiberwise linear partial homeomorphism.  Then `e` itself
+is equal to some bi-smooth fiberwise linear partial homeomorphism.
 
 This is the key mathematical point of the `locality` condition in the construction of the
-`StructureGroupoid` of bi-smooth fiberwise linear local homeomorphisms.  The proof is by gluing
-together the various bi-smooth fiberwise linear local homeomorphism which exist locally.
+`StructureGroupoid` of bi-smooth fiberwise linear partial homeomorphisms.  The proof is by gluing
+together the various bi-smooth fiberwise linear partial homeomorphism which exist locally.
 
 The `U` in the conclusion is the same `U` as in the hypothesis. We state it like this, because this
 is exactly what we need for `smoothFiberwiseLinear`. -/
@@ -165,11 +166,11 @@ theorem SmoothFiberwiseLinear.locality_aux₂ (e : PartialHomeomorph (B × F) (B
         (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x : F →L[𝕜] F)) u)
         (h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ((φ x).symm : F →L[𝕜] F)) u),
           (e.restr (u ×ˢ univ)).EqOnSource
-            (FiberwiseLinear.localHomeomorph φ hu hφ.continuousOn h2φ.continuousOn)) :
+            (FiberwiseLinear.partialHomeomorph φ hu hφ.continuousOn h2φ.continuousOn)) :
     ∃ (Φ : B → F ≃L[𝕜] F) (U : Set B) (hU₀ : IsOpen U) (hΦ :
       SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (Φ x : F →L[𝕜] F)) U) (h2Φ :
       SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ((Φ x).symm : F →L[𝕜] F)) U),
-      e.EqOnSource (FiberwiseLinear.localHomeomorph Φ hU₀ hΦ.continuousOn h2Φ.continuousOn) := by
+      e.EqOnSource (FiberwiseLinear.partialHomeomorph Φ hU₀ hΦ.continuousOn h2Φ.continuousOn) := by
   classical
   rw [SetCoe.forall'] at h
   choose! φ u hu hUu hux hφ h2φ heφ using h
@@ -227,12 +228,13 @@ private theorem mem_aux {e : PartialHomeomorph (B × F) (B × F)} :
     (e ∈ ⋃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U)
       (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U)
       (h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U),
-        {e | e.EqOnSource (FiberwiseLinear.localHomeomorph φ hU hφ.continuousOn
+        {e | e.EqOnSource (FiberwiseLinear.partialHomeomorph φ hU hφ.continuousOn
           h2φ.continuousOn)}) ↔
       ∃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U)
         (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U)
         (h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U),
-          e.EqOnSource (FiberwiseLinear.localHomeomorph φ hU hφ.continuousOn h2φ.continuousOn) := by
+          e.EqOnSource
+            (FiberwiseLinear.partialHomeomorph φ hU hφ.continuousOn h2φ.continuousOn) := by
   simp only [mem_iUnion, mem_setOf_eq]
 
 variable (F B IB)
@@ -246,7 +248,7 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F) where
     ⋃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U)
       (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U)
       (h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U),
-        {e | e.EqOnSource (FiberwiseLinear.localHomeomorph φ hU hφ.continuousOn h2φ.continuousOn)}
+        {e | e.EqOnSource (FiberwiseLinear.partialHomeomorph φ hU hφ.continuousOn h2φ.continuousOn)}
   trans' := by
     simp only [mem_aux]
     rintro e e' ⟨φ, U, hU, hφ, h2φ, heφ⟩ ⟨φ', U', hU', hφ', h2φ', heφ'⟩
@@ -261,8 +263,8 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F) where
           (fun x : B => (φ x).symm.toContinuousLinearMap ∘L (φ' x).symm.toContinuousLinearMap)
           (U ∩ U')
       exact (h2φ.mono <| inter_subset_left _ _).clm_comp (h2φ'.mono <| inter_subset_right _ _)
-    · apply FiberwiseLinear.source_trans_localHomeomorph
-    · rintro ⟨b, v⟩ -; apply FiberwiseLinear.trans_localHomeomorph_apply
+    · apply FiberwiseLinear.source_trans_partialHomeomorph
+    · rintro ⟨b, v⟩ -; apply FiberwiseLinear.trans_partialHomeomorph_apply
   -- porting note: without introducing `e` first, the first `simp only` fails
   symm' := fun e ↦ by
     simp only [mem_iUnion]
@@ -277,7 +279,7 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F) where
     -/
     refine mem_iUnion.2 ⟨fun _ ↦ .refl 𝕜 F, mem_iUnion.2 ⟨univ, mem_iUnion.2 ⟨isOpen_univ, ?_⟩⟩⟩
     refine mem_iUnion.2 ⟨contMDiffOn_const, mem_iUnion.2 ⟨contMDiffOn_const, ?_, ?_⟩⟩
-    · simp only [FiberwiseLinear.localHomeomorph, PartialHomeomorph.refl_localEquiv,
+    · simp only [FiberwiseLinear.partialHomeomorph, PartialHomeomorph.refl_localEquiv,
         PartialEquiv.refl_source, univ_prod_univ]
     · exact eqOn_refl id _
   locality' := by
@@ -298,6 +300,6 @@ theorem mem_smoothFiberwiseLinear_iff (e : PartialHomeomorph (B × F) (B × F))
       ∃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U) (hφ :
         SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U) (h2φ :
         SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U),
-        e.EqOnSource (FiberwiseLinear.localHomeomorph φ hU hφ.continuousOn h2φ.continuousOn) :=
+        e.EqOnSource (FiberwiseLinear.partialHomeomorph φ hU hφ.continuousOn h2φ.continuousOn) :=
   mem_aux
 #align mem_smooth_fiberwise_linear_iff mem_smoothFiberwiseLinear_iff
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
@@ -278,7 +278,7 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F) where
     refine mem_iUnion.2 ⟨fun _ ↦ .refl 𝕜 F, mem_iUnion.2 ⟨univ, mem_iUnion.2 ⟨isOpen_univ, ?_⟩⟩⟩
     refine mem_iUnion.2 ⟨contMDiffOn_const, mem_iUnion.2 ⟨contMDiffOn_const, ?_, ?_⟩⟩
     · simp only [FiberwiseLinear.localHomeomorph, PartialHomeomorph.refl_localEquiv,
-        LocalEquiv.refl_source, univ_prod_univ]
+        PartialEquiv.refl_source, univ_prod_univ]
     · exact eqOn_refl id _
   locality' := by
     -- the hard work has been extracted to `locality_aux₁` and `locality_aux₂`
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
@@ -35,7 +35,7 @@ determines a local homeomorphism from `B × F` to itself by its action fiberwise
 def localHomeomorph (φ : B → F ≃L[𝕜] F) (hU : IsOpen U)
     (hφ : ContinuousOn (fun x => φ x : B → F →L[𝕜] F) U)
     (h2φ : ContinuousOn (fun x => (φ x).symm : B → F →L[𝕜] F) U) :
-    LocalHomeomorph (B × F) (B × F) where
+    PartialHomeomorph (B × F) (B × F) where
   toFun x := (x.1, φ x.1 x.2)
   invFun x := (x.1, (φ x.1).symm x.2)
   source := U ×ˢ univ
@@ -106,7 +106,7 @@ local homeomorphism.
 Then the source of `e` is of the form `U ×ˢ univ`, for some set `U` in `B`, and, at any point `x` in
 `U`, admits a neighbourhood `u` of `x` such that `e` is equal on `u ×ˢ univ` to some bi-smooth
 fiberwise linear local homeomorphism. -/
-theorem SmoothFiberwiseLinear.locality_aux₁ (e : LocalHomeomorph (B × F) (B × F))
+theorem SmoothFiberwiseLinear.locality_aux₁ (e : PartialHomeomorph (B × F) (B × F))
     (h : ∀ p ∈ e.source, ∃ s : Set (B × F), IsOpen s ∧ p ∈ s ∧
       ∃ (φ : B → F ≃L[𝕜] F) (u : Set B) (hu : IsOpen u)
         (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x : F →L[𝕜] F)) u)
@@ -158,7 +158,7 @@ together the various bi-smooth fiberwise linear local homeomorphism which exist
 
 The `U` in the conclusion is the same `U` as in the hypothesis. We state it like this, because this
 is exactly what we need for `smoothFiberwiseLinear`. -/
-theorem SmoothFiberwiseLinear.locality_aux₂ (e : LocalHomeomorph (B × F) (B × F)) (U : Set B)
+theorem SmoothFiberwiseLinear.locality_aux₂ (e : PartialHomeomorph (B × F) (B × F)) (U : Set B)
     (hU : e.source = U ×ˢ univ)
     (h : ∀ x ∈ U,
       ∃ (φ : B → F ≃L[𝕜] F) (u : Set B) (hu : IsOpen u) (_hUu : u ⊆ U) (_hux : x ∈ u)
@@ -223,7 +223,7 @@ theorem SmoothFiberwiseLinear.locality_aux₂ (e : LocalHomeomorph (B × F) (B 
 
 /- Porting note: `simp only [mem_iUnion]` fails in the next definition. This aux lemma is a
 workaround. -/
-private theorem mem_aux {e : LocalHomeomorph (B × F) (B × F)} :
+private theorem mem_aux {e : PartialHomeomorph (B × F) (B × F)} :
     (e ∈ ⋃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U)
       (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U)
       (h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U),
@@ -251,7 +251,7 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F) where
     simp only [mem_aux]
     rintro e e' ⟨φ, U, hU, hφ, h2φ, heφ⟩ ⟨φ', U', hU', hφ', h2φ', heφ'⟩
     refine' ⟨fun b => (φ b).trans (φ' b), _, hU.inter hU', _, _,
-      Setoid.trans (LocalHomeomorph.EqOnSource.trans' heφ heφ') ⟨_, _⟩⟩
+      Setoid.trans (PartialHomeomorph.EqOnSource.trans' heφ heφ') ⟨_, _⟩⟩
     · show
         SmoothOn IB 𝓘(𝕜, F →L[𝕜] F)
           (fun x : B => (φ' x).toContinuousLinearMap ∘L (φ x).toContinuousLinearMap) (U ∩ U')
@@ -267,7 +267,7 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F) where
   symm' := fun e ↦ by
     simp only [mem_iUnion]
     rintro ⟨φ, U, hU, hφ, h2φ, heφ⟩
-    refine' ⟨fun b => (φ b).symm, U, hU, h2φ, _, LocalHomeomorph.EqOnSource.symm' heφ⟩
+    refine' ⟨fun b => (φ b).symm, U, hU, h2φ, _, PartialHomeomorph.EqOnSource.symm' heφ⟩
     simp_rw [ContinuousLinearEquiv.symm_symm]
     exact hφ
   id_mem' := by
@@ -277,7 +277,7 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F) where
     -/
     refine mem_iUnion.2 ⟨fun _ ↦ .refl 𝕜 F, mem_iUnion.2 ⟨univ, mem_iUnion.2 ⟨isOpen_univ, ?_⟩⟩⟩
     refine mem_iUnion.2 ⟨contMDiffOn_const, mem_iUnion.2 ⟨contMDiffOn_const, ?_, ?_⟩⟩
-    · simp only [FiberwiseLinear.localHomeomorph, LocalHomeomorph.refl_localEquiv,
+    · simp only [FiberwiseLinear.localHomeomorph, PartialHomeomorph.refl_localEquiv,
         LocalEquiv.refl_source, univ_prod_univ]
     · exact eqOn_refl id _
   locality' := by
@@ -293,7 +293,7 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F) where
 #align smooth_fiberwise_linear smoothFiberwiseLinear
 
 @[simp]
-theorem mem_smoothFiberwiseLinear_iff (e : LocalHomeomorph (B × F) (B × F)) :
+theorem mem_smoothFiberwiseLinear_iff (e : PartialHomeomorph (B × F) (B × F)) :
     e ∈ smoothFiberwiseLinear B F IB ↔
       ∃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U) (hφ :
         SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U) (h2φ :
chore: rename {LocalHomeomorph,ChartedSpace}.continuous_{to,inv}Fun fields to continuousOn_{to,inv}Fun (#8848)

They have type ContinuousOn ..., hence should be named accordingly. Suggested by @fpvandoorn in #8736.

Diff
@@ -46,11 +46,11 @@ def localHomeomorph (φ : B → F ≃L[𝕜] F) (hU : IsOpen U)
   right_inv' _ _ := Prod.ext rfl (ContinuousLinearEquiv.apply_symm_apply _ _)
   open_source := hU.prod isOpen_univ
   open_target := hU.prod isOpen_univ
-  continuous_toFun :=
+  continuousOn_toFun :=
     have : ContinuousOn (fun p : B × F => ((φ p.1 : F →L[𝕜] F), p.2)) (U ×ˢ univ) :=
       hφ.prod_map continuousOn_id
     continuousOn_fst.prod (isBoundedBilinearMap_apply.continuous.comp_continuousOn this)
-  continuous_invFun :=
+  continuousOn_invFun :=
     haveI : ContinuousOn (fun p : B × F => (((φ p.1).symm : F →L[𝕜] F), p.2)) (U ×ˢ univ) :=
       h2φ.prod_map continuousOn_id
     continuousOn_fst.prod (isBoundedBilinearMap_apply.continuous.comp_continuousOn this)
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,7 +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
+import Mathlib.Geometry.Manifold.ContMDiff.NormedSpace
 
 #align_import geometry.manifold.vector_bundle.fiberwise_linear from "leanprover-community/mathlib"@"be2c24f56783935652cefffb4bfca7e4b25d167e"
 
chore: rename isBoundedBilinearMapApply to isBoundedBilinearMap_apply (#6963)
Diff
@@ -49,11 +49,11 @@ def localHomeomorph (φ : B → F ≃L[𝕜] F) (hU : IsOpen U)
   continuous_toFun :=
     have : ContinuousOn (fun p : B × F => ((φ p.1 : F →L[𝕜] F), p.2)) (U ×ˢ univ) :=
       hφ.prod_map continuousOn_id
-    continuousOn_fst.prod (isBoundedBilinearMapApply.continuous.comp_continuousOn this)
+    continuousOn_fst.prod (isBoundedBilinearMap_apply.continuous.comp_continuousOn this)
   continuous_invFun :=
     haveI : ContinuousOn (fun p : B × F => (((φ p.1).symm : F →L[𝕜] F), p.2)) (U ×ˢ univ) :=
       h2φ.prod_map continuousOn_id
-    continuousOn_fst.prod (isBoundedBilinearMapApply.continuous.comp_continuousOn this)
+    continuousOn_fst.prod (isBoundedBilinearMap_apply.continuous.comp_continuousOn this)
 #align fiberwise_linear.local_homeomorph FiberwiseLinear.localHomeomorph
 
 /-- Compute the composition of two local homeomorphisms induced by fiberwise linear
feat: congr(...) congruence quotations and port congrm tactic (#2544)

Adds a term elaborator for congr(...) "congruence quotations". For example, if hf : f = f' and hx : x = x', then we have congr($hf $x) : f x = f' x'. This supports the functions having implicit arguments, and it has support for subsingleton instance arguments. So for example, if s t : Set X are sets with Fintype instances and h : s = t then congr(Fintype.card $h) : Fintype.card s = Fintype.card t works.

Ports the congrm tactic as a convenient frontend for applying a congruence quotation to the goal. Holes are turned into congruence holes. For example, congrm 1 + ?_ uses congr(1 + $(?_)). Placeholders (_) do not turn into congruence holes; that's not to say they have to be identical on the LHS and RHS, but congrm itself is responsible for finding a congruence lemma for such arguments.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Moritz Doll <moritz.doll@googlemail.com>

Diff
@@ -216,8 +216,7 @@ theorem SmoothFiberwiseLinear.locality_aux₂ (e : LocalHomeomorph (B × F) (B 
   refine' ⟨Φ, U, hU', hΦ, h2Φ, hU, fun p hp => _⟩
   rw [hU] at hp
   rw [heuφ ⟨p.fst, hp.1⟩ ⟨hux _, hp.2⟩]
-  -- porting note: replaced `congrm` with manual `congr_arg`
-  refine congr_arg (Prod.mk _) ?_
+  congrm (_, ?_)
   rw [hΦφ]
   apply hux
 #align smooth_fiberwise_linear.locality_aux₂ SmoothFiberwiseLinear.locality_aux₂
style: remove trailing whitespace and modify the linter to detect it (#6519)
Diff
@@ -119,7 +119,7 @@ theorem SmoothFiberwiseLinear.locality_aux₁ (e : LocalHomeomorph (B × F) (B 
             (h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ((φ x).symm : F →L[𝕜] F)) u),
             (e.restr (u ×ˢ univ)).EqOnSource
               (FiberwiseLinear.localHomeomorph φ hu hφ.continuousOn h2φ.continuousOn) := by
-  rw [SetCoe.forall'] at h 
+  rw [SetCoe.forall'] at h
   choose s hs hsp φ u hu hφ h2φ heφ using h
   have hesu : ∀ p : e.source, e.source ∩ s p = u p ×ˢ univ := by
     intro p
@@ -132,7 +132,7 @@ theorem SmoothFiberwiseLinear.locality_aux₁ (e : LocalHomeomorph (B × F) (B 
   have heu : ∀ p : e.source, ∀ q : B × F, q.fst ∈ u p → q ∈ e.source := by
     intro p q hq
     have : q ∈ u p ×ˢ (univ : Set F) := ⟨hq, trivial⟩
-    rw [← hesu p] at this 
+    rw [← hesu p] at this
     exact this.1
   have he : e.source = (Prod.fst '' e.source) ×ˢ (univ : Set F) := by
     apply HasSubset.Subset.antisymm
@@ -171,7 +171,7 @@ theorem SmoothFiberwiseLinear.locality_aux₂ (e : LocalHomeomorph (B × F) (B 
       SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ((Φ x).symm : F →L[𝕜] F)) U),
       e.EqOnSource (FiberwiseLinear.localHomeomorph Φ hU₀ hΦ.continuousOn h2Φ.continuousOn) := by
   classical
-  rw [SetCoe.forall'] at h 
+  rw [SetCoe.forall'] at h
   choose! φ u hu hUu hux hφ h2φ heφ using h
   have heuφ : ∀ x : U, EqOn e (fun q => (q.1, φ x q.1 q.2)) (u x ×ˢ univ) := fun x p hp ↦ by
     refine' (heφ x).2 _
@@ -214,7 +214,7 @@ theorem SmoothFiberwiseLinear.locality_aux₂ (e : LocalHomeomorph (B × F) (B 
     intro y hy
     rw [hΦφ ⟨x, hx⟩ y hy]
   refine' ⟨Φ, U, hU', hΦ, h2Φ, hU, fun p hp => _⟩
-  rw [hU] at hp 
+  rw [hU] at hp
   rw [heuφ ⟨p.fst, hp.1⟩ ⟨hux _, hp.2⟩]
   -- porting note: replaced `congrm` with manual `congr_arg`
   refine congr_arg (Prod.mk _) ?_
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
@@ -22,7 +22,7 @@ open scoped Manifold Topology
 /-! ### The groupoid of smooth, fiberwise-linear maps -/
 
 
-variable {𝕜 B F : Type _} [TopologicalSpace B]
+variable {𝕜 B F : Type*} [TopologicalSpace B]
 
 variable [NontriviallyNormedField 𝕜] [NormedAddCommGroup F] [NormedSpace 𝕜 F]
 
@@ -97,7 +97,7 @@ theorem target_trans_localHomeomorph (hU : IsOpen U)
 
 end FiberwiseLinear
 
-variable {EB : Type _} [NormedAddCommGroup EB] [NormedSpace 𝕜 EB] {HB : Type _}
+variable {EB : Type*} [NormedAddCommGroup EB] [NormedSpace 𝕜 EB] {HB : Type*}
   [TopologicalSpace HB] [ChartedSpace HB B] {IB : ModelWithCorners 𝕜 EB HB}
 
 /-- Let `e` be a local homeomorphism of `B × F`.  Suppose that at every point `p` in the source of
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

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

Diff
@@ -2,14 +2,11 @@
 Copyright (c) 2022 Floris van Doorn, 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.fiberwise_linear
-! leanprover-community/mathlib commit be2c24f56783935652cefffb4bfca7e4b25d167e
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Geometry.Manifold.ContMDiff
 
+#align_import geometry.manifold.vector_bundle.fiberwise_linear from "leanprover-community/mathlib"@"be2c24f56783935652cefffb4bfca7e4b25d167e"
+
 /-! # The groupoid of smooth, fiberwise-linear maps
 
 This file contains preliminaries for the definition of a smooth vector bundle: an associated
feat: port Geometry.Manifold.VectorBundle.FiberwiseLinear (#5440)

Dependencies 12 + 877

878 files ported (98.7%)
391498 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