geometry.manifold.charted_spaceMathlib.Geometry.Manifold.ChartedSpace

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)

(last sync)

feat(geometry/manifold/sheaf/basic): sheaf of functions satisfying a local_invariant_prop (#19146)

Define structure_groupoid.local_invariant_prop.sheaf, the sheaf-of-types of functions f : M → M' (for charted spaces M, M') satisfying some local property in the sense of structure_groupoid.local_invariant_prop (for example continuity, differentiability, smoothness).

Diff
@@ -984,6 +984,21 @@ instance [closed_under_restriction G] : has_groupoid s G :=
     { exact preimage_open_of_open_symm (chart_at H x) s.2 },
   end }
 
+lemma chart_at_inclusion_symm_eventually_eq {U V : opens M} (hUV : U ≤ V) {x : U} :
+  (chart_at H (set.inclusion hUV x)).symm
+  =ᶠ[𝓝 (chart_at H (set.inclusion hUV x) (set.inclusion hUV x))] set.inclusion hUV
+    ∘ (chart_at H x).symm :=
+begin
+  set i := set.inclusion hUV,
+  set e := chart_at H (x:M),
+  haveI : nonempty U := ⟨x⟩,
+  haveI : nonempty V := ⟨i x⟩,
+  have heUx_nhds : (e.subtype_restr U).target ∈ 𝓝 (e x),
+  { apply (e.subtype_restr U).open_target.mem_nhds,
+    exact e.map_subtype_source (mem_chart_source _ _) },
+  exact filter.eventually_eq_of_mem heUx_nhds (e.subtype_restr_symm_eq_on_of_le hUV),
+end
+
 end topological_space.opens
 
 /-! ### Structomorphisms -/

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(first ported)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -3,7 +3,7 @@ Copyright (c) 2019 Sébastien Gouëzel. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Sébastien Gouëzel
 -/
-import Topology.LocalHomeomorph
+import Topology.PartialHomeomorph
 
 #align_import geometry.manifold.charted_space from "leanprover-community/mathlib"@"431589bce478b2229eba14b14a283250428217db"
 
Diff
@@ -220,7 +220,7 @@ theorem StructureGroupoid.mem_of_eqOnSource (G : StructureGroupoid H) {e e' : Pa
 #print StructureGroupoid.partialOrder /-
 /-- Partial order on the set of groupoids, given by inclusion of the members of the groupoid -/
 instance StructureGroupoid.partialOrder : PartialOrder (StructureGroupoid H) :=
-  PartialOrder.lift StructureGroupoid.members fun a b h => by cases a; cases b; dsimp at h ;
+  PartialOrder.lift StructureGroupoid.members fun a b h => by cases a; cases b; dsimp at h;
     induction h; rfl
 #align structure_groupoid.partial_order StructureGroupoid.partialOrder
 -/
@@ -238,10 +238,10 @@ def idGroupoid (H : Type u) [TopologicalSpace H] : StructureGroupoid H
     where
   members := {PartialHomeomorph.refl H} ∪ {e : PartialHomeomorph H H | e.source = ∅}
   trans' e e' he he' := by
-    cases he <;> simp at he he' 
+    cases he <;> simp at he he'
     · simpa only [he, refl_trans]
     · have : (e ≫ₕ e').source ⊆ e.source := sep_subset _ _
-      rw [he] at this 
+      rw [he] at this
       have : e ≫ₕ e' ∈ {e : PartialHomeomorph H H | e.source = ∅} := eq_bot_iff.2 this
       exact (mem_union _ _ _).2 (Or.inr this)
   symm' e he := by
@@ -264,13 +264,13 @@ def idGroupoid (H : Type u) [TopologicalSpace H] : StructureGroupoid H
       · replace hs : PartialHomeomorph.restr e s = PartialHomeomorph.refl H
         · simpa only using hs
         have : (e.restr s).source = univ := by rw [hs]; simp
-        change e.to_local_equiv.source ∩ interior s = univ at this 
+        change e.to_local_equiv.source ∩ interior s = univ at this
         have : univ ⊆ interior s := by rw [← this]; exact inter_subset_right _ _
-        have : s = univ := by rwa [open_s.interior_eq, univ_subset_iff] at this 
+        have : s = univ := by rwa [open_s.interior_eq, univ_subset_iff] at this
         simpa only [this, restr_univ] using hs
       · exfalso
-        rw [mem_set_of_eq] at hs 
-        rwa [hs] at x's 
+        rw [mem_set_of_eq] at hs
+        rwa [hs] at x's
   eq_on_source' e e' he he'e := by
     cases he
     · left
@@ -280,7 +280,7 @@ def idGroupoid (H : Type u) [TopologicalSpace H] : StructureGroupoid H
           rfl
       rwa [← this]
     · right
-      change e.to_local_equiv.source = ∅ at he 
+      change e.to_local_equiv.source = ∅ at he
       rwa [Set.mem_setOf_eq, he'e.source_eq]
 #align id_groupoid idGroupoid
 -/
@@ -291,14 +291,14 @@ instance : OrderBot (StructureGroupoid H)
   bot := idGroupoid H
   bot_le := by
     intro u f hf
-    change f ∈ {PartialHomeomorph.refl H} ∪ {e : PartialHomeomorph H H | e.source = ∅} at hf 
-    simp only [singleton_union, mem_set_of_eq, mem_insert_iff] at hf 
+    change f ∈ {PartialHomeomorph.refl H} ∪ {e : PartialHomeomorph H H | e.source = ∅} at hf
+    simp only [singleton_union, mem_set_of_eq, mem_insert_iff] at hf
     cases hf
     · rw [hf]
       apply u.id_mem
     · apply u.locality
       intro x hx
-      rw [hf, mem_empty_iff_false] at hx 
+      rw [hf, mem_empty_iff_false] at hx
       exact hx.elim
 
 instance (H : Type u) [TopologicalSpace H] : Inhabited (StructureGroupoid H) :=
@@ -443,7 +443,7 @@ def idRestrGroupoid : StructureGroupoid H
     rintro e e' ⟨s, hs, hse⟩ ⟨s', hs', hse'⟩
     refine' ⟨s ∩ s', IsOpen.inter hs hs', _⟩
     have := PartialHomeomorph.EqOnSource.trans' hse hse'
-    rwa [PartialHomeomorph.ofSet_trans_ofSet] at this 
+    rwa [PartialHomeomorph.ofSet_trans_ofSet] at this
   symm' := by
     rintro e ⟨s, hs, hse⟩
     refine' ⟨s, hs, _⟩
@@ -639,7 +639,7 @@ theorem ChartedSpace.secondCountable_of_countable_cover [SecondCountableTopology
   haveI : ∀ x : M, second_countable_topology (chart_at H x).source := fun x =>
     (chart_at H x).secondCountableTopology_source
   haveI := hsc.to_encodable
-  rw [bUnion_eq_Union] at hs 
+  rw [bUnion_eq_Union] at hs
   exact
     second_countable_topology_of_countable_cover (fun x : s => (chart_at H (x : M)).open_source) hs
 #align charted_space.second_countable_of_countable_cover ChartedSpace.secondCountable_of_countable_cover
@@ -921,7 +921,7 @@ protected def partialHomeomorph (e : PartialEquiv M H) (he : e ∈ c.atlas) :
       letI : TopologicalSpace M := c.to_topological_space
       apply continuousOn_isOpen_of_generateFrom (c.open_target he)
       intro t ht
-      simp only [exists_prop, mem_Union, mem_singleton_iff] at ht 
+      simp only [exists_prop, mem_Union, mem_singleton_iff] at ht
       rcases ht with ⟨e', e'_atlas, s, s_open, ts⟩
       rw [ts]
       let f := e.symm.trans e'
@@ -1006,7 +1006,7 @@ instance hasGroupoid_model_space (H : Type _) [TopologicalSpace H] (G : Structur
     by
     replace he : e ∈ atlas H H := he
     replace he' : e' ∈ atlas H H := he'
-    rw [chartedSpaceSelf_atlas] at he he' 
+    rw [chartedSpaceSelf_atlas] at he he'
     simp [he, he', StructureGroupoid.id_mem]
 #align has_groupoid_model_space hasGroupoid_model_space
 -/
@@ -1070,7 +1070,7 @@ theorem StructureGroupoid.compatible_of_mem_maximalAtlas {e e' : PartialHomeomor
   let s := e.target ∩ e.symm ⁻¹' f.source
   have hs : IsOpen s := by
     apply e.symm.continuous_to_fun.preimage_open_of_open <;> apply open_source
-  have xs : x ∈ s := by dsimp at hx ; simp [s, hx]
+  have xs : x ∈ s := by dsimp at hx; simp [s, hx]
   refine' ⟨s, hs, xs, _⟩
   have A : e.symm ≫ₕ f ∈ G := (mem_maximalAtlas_iff.1 he f (chart_mem_atlas _ _)).1
   have B : f.symm ≫ₕ e' ∈ G := (mem_maximalAtlas_iff.1 he' f (chart_mem_atlas _ _)).2
@@ -1223,8 +1223,8 @@ instance [ClosedUnderRestriction G] : HasGroupoid s G
     where compatible := by
     rintro e e' ⟨_, ⟨x, hc⟩, he⟩ ⟨_, ⟨x', hc'⟩, he'⟩
     haveI : Nonempty s := ⟨x⟩
-    simp only [hc.symm, mem_singleton_iff, Subtype.val_eq_coe] at he 
-    simp only [hc'.symm, mem_singleton_iff, Subtype.val_eq_coe] at he' 
+    simp only [hc.symm, mem_singleton_iff, Subtype.val_eq_coe] at he
+    simp only [hc'.symm, mem_singleton_iff, Subtype.val_eq_coe] at he'
     rw [he, he']
     convert
       G.eq_on_source _ (subtype_restr_symm_trans_subtype_restr s (chart_at H x) (chart_at H x'))
@@ -1294,7 +1294,7 @@ def Structomorph.symm (e : Structomorph G M M') : Structomorph G M' M :=
       have : (c'.symm ≫ₕ e.to_homeomorph.to_local_homeomorph ≫ₕ c).symm ∈ G :=
         G.symm (e.mem_groupoid c' c hc' hc)
       rwa [trans_symm_eq_symm_trans_symm, trans_symm_eq_symm_trans_symm, symm_symm, trans_assoc] at
-        this  }
+        this }
 #align structomorph.symm Structomorph.symm
 -/
 
@@ -1326,7 +1326,7 @@ def Structomorph.trans (e : Structomorph G M M') (e' : Structomorph G M' M'') :
       have : x ∈ s := by
         constructor
         · simp only [trans_source, preimage_univ, inter_univ, Homeomorph.toPartialHomeomorph_source]
-          rw [trans_source] at hx 
+          rw [trans_source] at hx
           exact hx.1
         · exact hg₂
       refine' ⟨s, open_s, this, _⟩
Diff
@@ -518,10 +518,10 @@ end Groupoid
 
 
 #print ChartedSpace /-
-/- ./././Mathport/Syntax/Translate/Command.lean:404:30: infer kinds are unsupported in Lean 4: #[`atlas] [] -/
-/- ./././Mathport/Syntax/Translate/Command.lean:404:30: infer kinds are unsupported in Lean 4: #[`chartAt] [] -/
-/- ./././Mathport/Syntax/Translate/Command.lean:404:30: infer kinds are unsupported in Lean 4: #[`mem_chart_source] [] -/
-/- ./././Mathport/Syntax/Translate/Command.lean:404:30: infer kinds are unsupported in Lean 4: #[`chart_mem_atlas] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:400:30: infer kinds are unsupported in Lean 4: #[`atlas] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:400:30: infer kinds are unsupported in Lean 4: #[`chartAt] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:400:30: infer kinds are unsupported in Lean 4: #[`mem_chart_source] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:400:30: infer kinds are unsupported in Lean 4: #[`chart_mem_atlas] [] -/
 /-- A charted space is a topological space endowed with an atlas, i.e., a set of local
 homeomorphisms taking value in a model space `H`, called charts, such that the domains of the charts
 cover the whole space. We express the covering property by chosing for each `x` a member
@@ -961,7 +961,7 @@ section HasGroupoid
 variable [TopologicalSpace H] [TopologicalSpace M] [ChartedSpace H M]
 
 #print HasGroupoid /-
-/- ./././Mathport/Syntax/Translate/Command.lean:404:30: infer kinds are unsupported in Lean 4: #[`compatible] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:400:30: infer kinds are unsupported in Lean 4: #[`compatible] [] -/
 /-- A charted space has an atlas in a groupoid `G` if the change of coordinates belong to the
 groupoid -/
 class HasGroupoid {H : Type _} [TopologicalSpace H] (M : Type _) [TopologicalSpace M]
Diff
@@ -210,11 +210,11 @@ theorem StructureGroupoid.locality (G : StructureGroupoid H) {e : PartialHomeomo
 #align structure_groupoid.locality StructureGroupoid.locality
 -/
 
-#print StructureGroupoid.eq_on_source /-
-theorem StructureGroupoid.eq_on_source (G : StructureGroupoid H) {e e' : PartialHomeomorph H H}
+#print StructureGroupoid.mem_of_eqOnSource /-
+theorem StructureGroupoid.mem_of_eqOnSource (G : StructureGroupoid H) {e e' : PartialHomeomorph H H}
     (he : e ∈ G) (h : e' ≈ e) : e' ∈ G :=
   G.eq_on_source' e e' he h
-#align structure_groupoid.eq_on_source StructureGroupoid.eq_on_source
+#align structure_groupoid.eq_on_source StructureGroupoid.mem_of_eqOnSource
 -/
 
 #print StructureGroupoid.partialOrder /-
@@ -379,13 +379,13 @@ theorem groupoid_of_pregroupoid_le (PG₁ PG₂ : Pregroupoid H)
 #align groupoid_of_pregroupoid_le groupoid_of_pregroupoid_le
 -/
 
-#print mem_pregroupoid_of_eq_on_source /-
-theorem mem_pregroupoid_of_eq_on_source (PG : Pregroupoid H) {e e' : PartialHomeomorph H H}
+#print mem_pregroupoid_of_eqOnSource /-
+theorem mem_pregroupoid_of_eqOnSource (PG : Pregroupoid H) {e e' : PartialHomeomorph H H}
     (he' : e ≈ e') (he : PG.property e e.source) : PG.property e' e'.source :=
   by
   rw [← he'.1]
   exact PG.congr e.open_source he'.eq_on.symm he
-#align mem_pregroupoid_of_eq_on_source mem_pregroupoid_of_eq_on_source
+#align mem_pregroupoid_of_eq_on_source mem_pregroupoid_of_eqOnSource
 -/
 
 #print continuousPregroupoid /-
Diff
@@ -672,7 +672,7 @@ theorem ChartedSpace.locallyCompactSpace [LocallyCompactSpace H] : LocallyCompac
     rw [← (chart_at H x).symm_map_nhds_eq (mem_chart_source H x)]
     exact
       ((compact_basis_nhds (chart_at H x x)).hasBasis_self_subset (chart_target_mem_nhds H x)).map _
-  refine' locallyCompactSpace_of_hasBasis this _
+  refine' LocallyCompactSpace.of_hasBasis this _
   rintro x s ⟨h₁, h₂, h₃⟩
   exact h₂.image_of_continuous_on ((chart_at H x).continuousOn_symm.mono h₃)
 #align charted_space.locally_compact ChartedSpace.locallyCompactSpace
@@ -900,11 +900,11 @@ theorem open_target (he : e ∈ c.atlas) : IsOpen e.target :=
 #align charted_space_core.open_target ChartedSpaceCore.open_target
 -/
 
-#print ChartedSpaceCore.localHomeomorph /-
+#print ChartedSpaceCore.partialHomeomorph /-
 /-- An element of the atlas in a charted space without topology becomes a local homeomorphism
 for the topology constructed from this atlas. The `local_homeomorph` version is given in this
 definition. -/
-protected def localHomeomorph (e : PartialEquiv M H) (he : e ∈ c.atlas) :
+protected def partialHomeomorph (e : PartialEquiv M H) (he : e ∈ c.atlas) :
     @PartialHomeomorph M H c.toTopologicalSpace _ :=
   { e with
     open_source := by convert c.open_source' he
@@ -934,7 +934,7 @@ protected def localHomeomorph (e : PartialEquiv M H) (he : e ∈ c.atlas) :
           e.target ∩ (e' ∘ e.symm ⁻¹' s ∩ e.symm ⁻¹' e'.source) :=
         by rw [← inter_assoc, ← inter_assoc]; congr 1; exact inter_comm _ _
       simpa [PartialEquiv.trans_source, preimage_inter, preimage_comp.symm, A] using this }
-#align charted_space_core.local_homeomorph ChartedSpaceCore.localHomeomorph
+#align charted_space_core.local_homeomorph ChartedSpaceCore.partialHomeomorph
 -/
 
 #print ChartedSpaceCore.toChartedSpace /-
Diff
@@ -518,10 +518,10 @@ end Groupoid
 
 
 #print ChartedSpace /-
-/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`atlas] [] -/
-/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`chartAt] [] -/
-/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`mem_chart_source] [] -/
-/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`chart_mem_atlas] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:404:30: infer kinds are unsupported in Lean 4: #[`atlas] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:404:30: infer kinds are unsupported in Lean 4: #[`chartAt] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:404:30: infer kinds are unsupported in Lean 4: #[`mem_chart_source] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:404:30: infer kinds are unsupported in Lean 4: #[`chart_mem_atlas] [] -/
 /-- A charted space is a topological space endowed with an atlas, i.e., a set of local
 homeomorphisms taking value in a model space `H`, called charts, such that the domains of the charts
 cover the whole space. We express the covering property by chosing for each `x` a member
@@ -961,7 +961,7 @@ section HasGroupoid
 variable [TopologicalSpace H] [TopologicalSpace M] [ChartedSpace H M]
 
 #print HasGroupoid /-
-/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`compatible] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:404:30: infer kinds are unsupported in Lean 4: #[`compatible] [] -/
 /-- A charted space has an atlas in a groupoid `G` if the change of coordinates belong to the
 groupoid -/
 class HasGroupoid {H : Type _} [TopologicalSpace H] (M : Type _) [TopologicalSpace M]
Diff
@@ -129,7 +129,7 @@ Note that, as is usual for equivs, the composition is from left to right, hence
 the arrow. -/
 scoped[Manifold] infixr:100 " ≫ₕ " => PartialHomeomorph.trans
 
-scoped[Manifold] infixr:100 " ≫ " => LocalEquiv.trans
+scoped[Manifold] infixr:100 " ≫ " => PartialEquiv.trans
 
 open Set PartialHomeomorph
 
@@ -856,26 +856,27 @@ charts that are only local equivs, and continuity properties for their compositi
 This is formalised in `charted_space_core`. -/
 @[nolint has_nonempty_instance]
 structure ChartedSpaceCore (H : Type _) [TopologicalSpace H] (M : Type _) where
-  atlas : Set (LocalEquiv M H)
-  chartAt : M → LocalEquiv M H
+  atlas : Set (PartialEquiv M H)
+  chartAt : M → PartialEquiv M H
   mem_chart_source : ∀ x, x ∈ (chart_at x).source
   chart_mem_atlas : ∀ x, chart_at x ∈ atlas
-  open_source : ∀ e e' : LocalEquiv M H, e ∈ atlas → e' ∈ atlas → IsOpen (e.symm.trans e').source
+  open_source : ∀ e e' : PartialEquiv M H, e ∈ atlas → e' ∈ atlas → IsOpen (e.symm.trans e').source
   continuous_toFun :
-    ∀ e e' : LocalEquiv M H,
+    ∀ e e' : PartialEquiv M H,
       e ∈ atlas → e' ∈ atlas → ContinuousOn (e.symm.trans e') (e.symm.trans e').source
 #align charted_space_core ChartedSpaceCore
 -/
 
 namespace ChartedSpaceCore
 
-variable [TopologicalSpace H] (c : ChartedSpaceCore H M) {e : LocalEquiv M H}
+variable [TopologicalSpace H] (c : ChartedSpaceCore H M) {e : PartialEquiv M H}
 
 #print ChartedSpaceCore.toTopologicalSpace /-
 /-- Topology generated by a set of charts on a Type. -/
 protected def toTopologicalSpace : TopologicalSpace M :=
   TopologicalSpace.generateFrom <|
-    ⋃ (e : LocalEquiv M H) (he : e ∈ c.atlas) (s : Set H) (s_open : IsOpen s), {e ⁻¹' s ∩ e.source}
+    ⋃ (e : PartialEquiv M H) (he : e ∈ c.atlas) (s : Set H) (s_open : IsOpen s),
+      {e ⁻¹' s ∩ e.source}
 #align charted_space_core.to_topological_space ChartedSpaceCore.toTopologicalSpace
 -/
 
@@ -894,8 +895,8 @@ theorem open_target (he : e ∈ c.atlas) : IsOpen e.target :=
   by
   have E : e.target ∩ e.symm ⁻¹' e.source = e.target :=
     subset.antisymm (inter_subset_left _ _) fun x hx =>
-      ⟨hx, LocalEquiv.target_subset_preimage_source _ hx⟩
-  simpa [LocalEquiv.trans_source, E] using c.open_source e e he he
+      ⟨hx, PartialEquiv.target_subset_preimage_source _ hx⟩
+  simpa [PartialEquiv.trans_source, E] using c.open_source e e he he
 #align charted_space_core.open_target ChartedSpaceCore.open_target
 -/
 
@@ -903,7 +904,7 @@ theorem open_target (he : e ∈ c.atlas) : IsOpen e.target :=
 /-- An element of the atlas in a charted space without topology becomes a local homeomorphism
 for the topology constructed from this atlas. The `local_homeomorph` version is given in this
 definition. -/
-protected def localHomeomorph (e : LocalEquiv M H) (he : e ∈ c.atlas) :
+protected def localHomeomorph (e : PartialEquiv M H) (he : e ∈ c.atlas) :
     @PartialHomeomorph M H c.toTopologicalSpace _ :=
   { e with
     open_source := by convert c.open_source' he
@@ -932,7 +933,7 @@ protected def localHomeomorph (e : LocalEquiv M H) (he : e ∈ c.atlas) :
         e' ∘ e.symm ⁻¹' s ∩ (e.target ∩ e.symm ⁻¹' e'.source) =
           e.target ∩ (e' ∘ e.symm ⁻¹' s ∩ e.symm ⁻¹' e'.source) :=
         by rw [← inter_assoc, ← inter_assoc]; congr 1; exact inter_comm _ _
-      simpa [LocalEquiv.trans_source, preimage_inter, preimage_comp.symm, A] using this }
+      simpa [PartialEquiv.trans_source, preimage_inter, preimage_comp.symm, A] using this }
 #align charted_space_core.local_homeomorph ChartedSpaceCore.localHomeomorph
 -/
 
@@ -941,7 +942,7 @@ protected def localHomeomorph (e : LocalEquiv M H) (he : e ∈ c.atlas) :
 respect to the topology constructed from the atlas. -/
 def toChartedSpace : @ChartedSpace H _ M c.toTopologicalSpace
     where
-  atlas := ⋃ (e : LocalEquiv M H) (he : e ∈ c.atlas), {c.PartialHomeomorph e he}
+  atlas := ⋃ (e : PartialEquiv M H) (he : e ∈ c.atlas), {c.PartialHomeomorph e he}
   chartAt x := c.PartialHomeomorph (c.chartAt x) (c.chart_mem_atlas x)
   mem_chart_source x := c.mem_chart_source x
   chart_mem_atlas x := by
Diff
@@ -127,11 +127,11 @@ variable {H : Type u} {H' : Type _} {M : Type _} {M' : Type _} {M'' : Type _}
 `local_homeomorph.trans` and `local_equiv.trans`.
 Note that, as is usual for equivs, the composition is from left to right, hence the direction of
 the arrow. -/
-scoped[Manifold] infixr:100 " ≫ₕ " => LocalHomeomorph.trans
+scoped[Manifold] infixr:100 " ≫ₕ " => PartialHomeomorph.trans
 
 scoped[Manifold] infixr:100 " ≫ " => LocalEquiv.trans
 
-open Set LocalHomeomorph
+open Set PartialHomeomorph
 
 /-! ### Structure groupoids-/
 
@@ -167,51 +167,51 @@ We use primes in the structure names as we will reformulate them below (without
 /-- A structure groupoid is a set of local homeomorphisms of a topological space stable under
 composition and inverse. They appear in the definition of the smoothness class of a manifold. -/
 structure StructureGroupoid (H : Type u) [TopologicalSpace H] where
-  members : Set (LocalHomeomorph H H)
-  trans' : ∀ e e' : LocalHomeomorph H H, e ∈ members → e' ∈ members → e ≫ₕ e' ∈ members
-  symm' : ∀ e : LocalHomeomorph H H, e ∈ members → e.symm ∈ members
-  id_mem' : LocalHomeomorph.refl H ∈ members
+  members : Set (PartialHomeomorph H H)
+  trans' : ∀ e e' : PartialHomeomorph H H, e ∈ members → e' ∈ members → e ≫ₕ e' ∈ members
+  symm' : ∀ e : PartialHomeomorph H H, e ∈ members → e.symm ∈ members
+  id_mem' : PartialHomeomorph.refl H ∈ members
   locality' :
-    ∀ e : LocalHomeomorph H H,
+    ∀ e : PartialHomeomorph H H,
       (∀ x ∈ e.source, ∃ s, IsOpen s ∧ x ∈ s ∧ e.restr s ∈ members) → e ∈ members
-  eq_on_source' : ∀ e e' : LocalHomeomorph H H, e ∈ members → e' ≈ e → e' ∈ members
+  eq_on_source' : ∀ e e' : PartialHomeomorph H H, e ∈ members → e' ≈ e → e' ∈ members
 #align structure_groupoid StructureGroupoid
 -/
 
 variable [TopologicalSpace H]
 
-instance : Membership (LocalHomeomorph H H) (StructureGroupoid H) :=
-  ⟨fun (e : LocalHomeomorph H H) (G : StructureGroupoid H) => e ∈ G.members⟩
+instance : Membership (PartialHomeomorph H H) (StructureGroupoid H) :=
+  ⟨fun (e : PartialHomeomorph H H) (G : StructureGroupoid H) => e ∈ G.members⟩
 
 #print StructureGroupoid.trans /-
-theorem StructureGroupoid.trans (G : StructureGroupoid H) {e e' : LocalHomeomorph H H} (he : e ∈ G)
-    (he' : e' ∈ G) : e ≫ₕ e' ∈ G :=
+theorem StructureGroupoid.trans (G : StructureGroupoid H) {e e' : PartialHomeomorph H H}
+    (he : e ∈ G) (he' : e' ∈ G) : e ≫ₕ e' ∈ G :=
   G.trans' e e' he he'
 #align structure_groupoid.trans StructureGroupoid.trans
 -/
 
 #print StructureGroupoid.symm /-
-theorem StructureGroupoid.symm (G : StructureGroupoid H) {e : LocalHomeomorph H H} (he : e ∈ G) :
+theorem StructureGroupoid.symm (G : StructureGroupoid H) {e : PartialHomeomorph H H} (he : e ∈ G) :
     e.symm ∈ G :=
   G.symm' e he
 #align structure_groupoid.symm StructureGroupoid.symm
 -/
 
 #print StructureGroupoid.id_mem /-
-theorem StructureGroupoid.id_mem (G : StructureGroupoid H) : LocalHomeomorph.refl H ∈ G :=
+theorem StructureGroupoid.id_mem (G : StructureGroupoid H) : PartialHomeomorph.refl H ∈ G :=
   G.id_mem'
 #align structure_groupoid.id_mem StructureGroupoid.id_mem
 -/
 
 #print StructureGroupoid.locality /-
-theorem StructureGroupoid.locality (G : StructureGroupoid H) {e : LocalHomeomorph H H}
+theorem StructureGroupoid.locality (G : StructureGroupoid H) {e : PartialHomeomorph H H}
     (h : ∀ x ∈ e.source, ∃ s, IsOpen s ∧ x ∈ s ∧ e.restr s ∈ G) : e ∈ G :=
   G.locality' e h
 #align structure_groupoid.locality StructureGroupoid.locality
 -/
 
 #print StructureGroupoid.eq_on_source /-
-theorem StructureGroupoid.eq_on_source (G : StructureGroupoid H) {e e' : LocalHomeomorph H H}
+theorem StructureGroupoid.eq_on_source (G : StructureGroupoid H) {e e' : PartialHomeomorph H H}
     (he : e ∈ G) (h : e' ≈ e) : e' ∈ G :=
   G.eq_on_source' e e' he h
 #align structure_groupoid.eq_on_source StructureGroupoid.eq_on_source
@@ -236,13 +236,13 @@ theorem StructureGroupoid.le_iff {G₁ G₂ : StructureGroupoid H} : G₁ ≤ G
 necessary from the definition) -/
 def idGroupoid (H : Type u) [TopologicalSpace H] : StructureGroupoid H
     where
-  members := {LocalHomeomorph.refl H} ∪ {e : LocalHomeomorph H H | e.source = ∅}
+  members := {PartialHomeomorph.refl H} ∪ {e : PartialHomeomorph H H | e.source = ∅}
   trans' e e' he he' := by
     cases he <;> simp at he he' 
     · simpa only [he, refl_trans]
     · have : (e ≫ₕ e').source ⊆ e.source := sep_subset _ _
       rw [he] at this 
-      have : e ≫ₕ e' ∈ {e : LocalHomeomorph H H | e.source = ∅} := eq_bot_iff.2 this
+      have : e ≫ₕ e' ∈ {e : PartialHomeomorph H H | e.source = ∅} := eq_bot_iff.2 this
       exact (mem_union _ _ _).2 (Or.inr this)
   symm' e he := by
     cases' (mem_union _ _ _).1 he with E E
@@ -261,7 +261,7 @@ def idGroupoid (H : Type u) [TopologicalSpace H] : StructureGroupoid H
         rw [restr_source, open_s.interior_eq]
         exact ⟨hx, xs⟩
       cases hs
-      · replace hs : LocalHomeomorph.restr e s = LocalHomeomorph.refl H
+      · replace hs : PartialHomeomorph.restr e s = PartialHomeomorph.refl H
         · simpa only using hs
         have : (e.restr s).source = univ := by rw [hs]; simp
         change e.to_local_equiv.source ∩ interior s = univ at this 
@@ -291,7 +291,7 @@ instance : OrderBot (StructureGroupoid H)
   bot := idGroupoid H
   bot_le := by
     intro u f hf
-    change f ∈ {LocalHomeomorph.refl H} ∪ {e : LocalHomeomorph H H | e.source = ∅} at hf 
+    change f ∈ {PartialHomeomorph.refl H} ∪ {e : PartialHomeomorph H H | e.source = ∅} at hf 
     simp only [singleton_union, mem_set_of_eq, mem_insert_iff] at hf 
     cases hf
     · rw [hf]
@@ -327,7 +327,7 @@ structure Pregroupoid (H : Type _) [TopologicalSpace H] where
 from a pregroupoid asserting that this property is stable under composition. -/
 def Pregroupoid.groupoid (PG : Pregroupoid H) : StructureGroupoid H
     where
-  members := {e : LocalHomeomorph H H | PG.property e e.source ∧ PG.property e.symm e.target}
+  members := {e : PartialHomeomorph H H | PG.property e e.source ∧ PG.property e.symm e.target}
   trans' e e' he he' := by
     constructor
     · apply PG.comp he.1 he'.1 e.open_source e'.open_source
@@ -342,14 +342,14 @@ def Pregroupoid.groupoid (PG : Pregroupoid H) : StructureGroupoid H
       rcases he x xu with ⟨s, s_open, xs, hs⟩
       refine' ⟨s, s_open, xs, _⟩
       convert hs.1 using 1
-      dsimp [LocalHomeomorph.restr]; rw [s_open.interior_eq]
+      dsimp [PartialHomeomorph.restr]; rw [s_open.interior_eq]
     · apply PG.locality e.open_target fun x xu => _
       rcases he (e.symm x) (e.map_target xu) with ⟨s, s_open, xs, hs⟩
       refine' ⟨e.target ∩ e.symm ⁻¹' s, _, ⟨xu, xs⟩, _⟩
       · exact ContinuousOn.isOpen_inter_preimage e.continuous_inv_fun e.open_target s_open
       · rw [← inter_assoc, inter_self]
         convert hs.2 using 1
-        dsimp [LocalHomeomorph.restr]; rw [s_open.interior_eq]
+        dsimp [PartialHomeomorph.restr]; rw [s_open.interior_eq]
   eq_on_source' e e' he ee' := by
     constructor
     · apply PG.congr e'.open_source ee'.2
@@ -363,7 +363,7 @@ def Pregroupoid.groupoid (PG : Pregroupoid H) : StructureGroupoid H
 -/
 
 #print mem_groupoid_of_pregroupoid /-
-theorem mem_groupoid_of_pregroupoid {PG : Pregroupoid H} {e : LocalHomeomorph H H} :
+theorem mem_groupoid_of_pregroupoid {PG : Pregroupoid H} {e : PartialHomeomorph H H} :
     e ∈ PG.groupoid ↔ PG.property e e.source ∧ PG.property e.symm e.target :=
   Iff.rfl
 #align mem_groupoid_of_pregroupoid mem_groupoid_of_pregroupoid
@@ -380,7 +380,7 @@ theorem groupoid_of_pregroupoid_le (PG₁ PG₂ : Pregroupoid H)
 -/
 
 #print mem_pregroupoid_of_eq_on_source /-
-theorem mem_pregroupoid_of_eq_on_source (PG : Pregroupoid H) {e e' : LocalHomeomorph H H}
+theorem mem_pregroupoid_of_eq_on_source (PG : Pregroupoid H) {e e' : PartialHomeomorph H H}
     (he' : e ≈ e') (he : PG.property e e.source) : PG.property e' e'.source :=
   by
   rw [← he'.1]
@@ -422,13 +422,13 @@ instance : OrderTop (StructureGroupoid H)
 homeomorphisms to open subsets of the source. -/
 class ClosedUnderRestriction (G : StructureGroupoid H) : Prop where
   ClosedUnderRestriction :
-    ∀ {e : LocalHomeomorph H H}, e ∈ G → ∀ s : Set H, IsOpen s → e.restr s ∈ G
+    ∀ {e : PartialHomeomorph H H}, e ∈ G → ∀ s : Set H, IsOpen s → e.restr s ∈ G
 #align closed_under_restriction ClosedUnderRestriction
 -/
 
 #print closedUnderRestriction' /-
 theorem closedUnderRestriction' {G : StructureGroupoid H} [ClosedUnderRestriction G]
-    {e : LocalHomeomorph H H} (he : e ∈ G) {s : Set H} (hs : IsOpen s) : e.restr s ∈ G :=
+    {e : PartialHomeomorph H H} (he : e ∈ G) {s : Set H} (hs : IsOpen s) : e.restr s ∈ G :=
   ClosedUnderRestriction.closedUnderRestriction he s hs
 #align closed_under_restriction' closedUnderRestriction'
 -/
@@ -438,17 +438,17 @@ theorem closedUnderRestriction' {G : StructureGroupoid H} [ClosedUnderRestrictio
 restriction of the identity to the various open subsets. -/
 def idRestrGroupoid : StructureGroupoid H
     where
-  members := {e | ∃ (s : Set H) (h : IsOpen s), e ≈ LocalHomeomorph.ofSet s h}
+  members := {e | ∃ (s : Set H) (h : IsOpen s), e ≈ PartialHomeomorph.ofSet s h}
   trans' := by
     rintro e e' ⟨s, hs, hse⟩ ⟨s', hs', hse'⟩
     refine' ⟨s ∩ s', IsOpen.inter hs hs', _⟩
-    have := LocalHomeomorph.EqOnSource.trans' hse hse'
-    rwa [LocalHomeomorph.ofSet_trans_ofSet] at this 
+    have := PartialHomeomorph.EqOnSource.trans' hse hse'
+    rwa [PartialHomeomorph.ofSet_trans_ofSet] at this 
   symm' := by
     rintro e ⟨s, hs, hse⟩
     refine' ⟨s, hs, _⟩
     rw [← of_set_symm]
-    exact LocalHomeomorph.EqOnSource.symm' hse
+    exact PartialHomeomorph.EqOnSource.symm' hse
   id_mem' := ⟨univ, isOpen_univ, by simp only [mfld_simps]⟩
   locality' := by
     intro e h
@@ -458,7 +458,7 @@ def idRestrGroupoid : StructureGroupoid H
     have hes : x ∈ (e.restr s).source := by
       rw [e.restr_source]; refine' ⟨hx, _⟩
       rw [hs.interior_eq]; exact hxs
-    simpa only [mfld_simps] using LocalHomeomorph.EqOnSource.eqOn hes' hes
+    simpa only [mfld_simps] using PartialHomeomorph.EqOnSource.eqOn hes' hes
   eq_on_source' := by
     rintro e e' ⟨s, hs, hse⟩ hee'
     exact ⟨s, hs, Setoid.trans hee' hse⟩
@@ -477,7 +477,7 @@ instance closedUnderRestriction_idRestrGroupoid : ClosedUnderRestriction (@idRes
   ⟨by
     rintro e ⟨s', hs', he⟩ s hs
     use s' ∩ s, IsOpen.inter hs' hs
-    refine' Setoid.trans (LocalHomeomorph.EqOnSource.restr he s) _
+    refine' Setoid.trans (PartialHomeomorph.EqOnSource.restr he s) _
     exact ⟨by simp only [hs.interior_eq, mfld_simps], by simp only [mfld_simps]⟩⟩
 #align closed_under_restriction_id_restr_groupoid closedUnderRestriction_idRestrGroupoid
 -/
@@ -500,7 +500,7 @@ theorem closedUnderRestriction_iff_id_le (G : StructureGroupoid H) :
   · intro h
     constructor
     intro e he s hs
-    rw [← of_set_trans (e : LocalHomeomorph H H) hs]
+    rw [← of_set_trans (e : PartialHomeomorph H H) hs]
     refine' G.trans _ he
     apply structure_groupoid.le_iff.mp h
     exact idRestrGroupoid_mem hs
@@ -533,8 +533,8 @@ sometimes as a real manifold over `ℝ^(2n)`.
 -/
 @[ext]
 class ChartedSpace (H : Type _) [TopologicalSpace H] (M : Type _) [TopologicalSpace M] where
-  atlas : Set (LocalHomeomorph M H)
-  chartAt : M → LocalHomeomorph M H
+  atlas : Set (PartialHomeomorph M H)
+  chartAt : M → PartialHomeomorph M H
   mem_chart_source : ∀ x, x ∈ (chart_at x).source
   chart_mem_atlas : ∀ x, chart_at x ∈ atlas
 #align charted_space ChartedSpace
@@ -550,8 +550,8 @@ section ChartedSpace
 /-- Any space is a charted_space modelled over itself, by just using the identity chart -/
 instance chartedSpaceSelf (H : Type _) [TopologicalSpace H] : ChartedSpace H H
     where
-  atlas := {LocalHomeomorph.refl H}
-  chartAt x := LocalHomeomorph.refl H
+  atlas := {PartialHomeomorph.refl H}
+  chartAt x := PartialHomeomorph.refl H
   mem_chart_source x := mem_univ x
   chart_mem_atlas x := mem_singleton _
 #align charted_space_self chartedSpaceSelf
@@ -561,15 +561,15 @@ instance chartedSpaceSelf (H : Type _) [TopologicalSpace H] : ChartedSpace H H
 /-- In the trivial charted_space structure of a space modelled over itself through the identity, the
 atlas members are just the identity -/
 @[simp, mfld_simps]
-theorem chartedSpaceSelf_atlas {H : Type _} [TopologicalSpace H] {e : LocalHomeomorph H H} :
-    e ∈ atlas H H ↔ e = LocalHomeomorph.refl H := by simp [atlas, ChartedSpace.atlas]
+theorem chartedSpaceSelf_atlas {H : Type _} [TopologicalSpace H] {e : PartialHomeomorph H H} :
+    e ∈ atlas H H ↔ e = PartialHomeomorph.refl H := by simp [atlas, ChartedSpace.atlas]
 #align charted_space_self_atlas chartedSpaceSelf_atlas
 -/
 
 #print chartAt_self_eq /-
 /-- In the model space, chart_at is always the identity -/
 theorem chartAt_self_eq {H : Type _} [TopologicalSpace H] {x : H} :
-    chartAt H x = LocalHomeomorph.refl H := by simpa using chart_mem_atlas H x
+    chartAt H x = PartialHomeomorph.refl H := by simpa using chart_mem_atlas H x
 #align chart_at_self_eq chartAt_self_eq
 -/
 
@@ -611,7 +611,7 @@ theorem achart_def (x : M) : achart H x = ⟨chartAt H x, chart_mem_atlas H x⟩
 
 #print coe_achart /-
 @[simp, mfld_simps]
-theorem coe_achart (x : M) : (achart H x : LocalHomeomorph M H) = chartAt H x :=
+theorem coe_achart (x : M) : (achart H x : PartialHomeomorph M H) = chartAt H x :=
   rfl
 #align coe_achart coe_achart
 -/
@@ -683,12 +683,12 @@ theorem ChartedSpace.locallyCompactSpace [LocallyCompactSpace H] : LocallyCompac
 locally connected. -/
 theorem ChartedSpace.locallyConnectedSpace [LocallyConnectedSpace H] : LocallyConnectedSpace M :=
   by
-  let E : M → LocalHomeomorph M H := chart_at H
+  let E : M → PartialHomeomorph M H := chart_at H
   refine'
     locallyConnectedSpace_of_connected_bases (fun x s => (E x).symm '' s)
       (fun x s => (IsOpen s ∧ E x x ∈ s ∧ IsConnected s) ∧ s ⊆ (E x).target) _ _
   · intro x
-    simpa only [LocalHomeomorph.symm_map_nhds_eq, mem_chart_source] using
+    simpa only [PartialHomeomorph.symm_map_nhds_eq, mem_chart_source] using
       ((LocallyConnectedSpace.open_connected_basis (E x x)).restrict_subset
             ((E x).open_target.mem_nhds (mem_chart_target H x))).map
         (E x).symm
@@ -703,7 +703,7 @@ modelled on `H`. -/
 def ChartedSpace.comp (H : Type _) [TopologicalSpace H] (H' : Type _) [TopologicalSpace H']
     (M : Type _) [TopologicalSpace M] [ChartedSpace H H'] [ChartedSpace H' M] : ChartedSpace H M
     where
-  atlas := image2 LocalHomeomorph.trans (atlas H' M) (atlas H H')
+  atlas := image2 PartialHomeomorph.trans (atlas H' M) (atlas H H')
   chartAt := fun p : M => (chartAt H' p).trans (chartAt H (chartAt H' p p))
   mem_chart_source p := by simp only [mfld_simps]
   chart_mem_atlas p := ⟨chartAt H' p, chartAt H _, chart_mem_atlas H' p, chart_mem_atlas H _, rfl⟩
@@ -792,7 +792,7 @@ instance prodChartedSpace (H : Type _) [TopologicalSpace H] (M : Type _) [Topolo
     [ChartedSpace H M] (H' : Type _) [TopologicalSpace H'] (M' : Type _) [TopologicalSpace M']
     [ChartedSpace H' M'] : ChartedSpace (ModelProd H H') (M × M')
     where
-  atlas := image2 LocalHomeomorph.prod (atlas H M) (atlas H' M')
+  atlas := image2 PartialHomeomorph.prod (atlas H M) (atlas H' M')
   chartAt := fun x : M × M' => (chartAt H x.1).Prod (chartAt H' x.2)
   mem_chart_source x := ⟨mem_chart_source _ _, mem_chart_source _ _⟩
   chart_mem_atlas x := mem_image2_of_mem (chart_mem_atlas _ _) (chart_mem_atlas _ _)
@@ -827,8 +827,8 @@ instance piChartedSpace {ι : Type _} [Fintype ι] (H : ι → Type _) [∀ i, T
     (M : ι → Type _) [∀ i, TopologicalSpace (M i)] [∀ i, ChartedSpace (H i) (M i)] :
     ChartedSpace (ModelPi H) (∀ i, M i)
     where
-  atlas := LocalHomeomorph.pi '' Set.pi univ fun i => atlas (H i) (M i)
-  chartAt f := LocalHomeomorph.pi fun i => chartAt (H i) (f i)
+  atlas := PartialHomeomorph.pi '' Set.pi univ fun i => atlas (H i) (M i)
+  chartAt f := PartialHomeomorph.pi fun i => chartAt (H i) (f i)
   mem_chart_source f i hi := mem_chart_source (H i) (f i)
   chart_mem_atlas f := mem_image_of_mem _ fun i hi => chart_mem_atlas (H i) (f i)
 #align pi_charted_space piChartedSpace
@@ -839,7 +839,7 @@ instance piChartedSpace {ι : Type _} [Fintype ι] (H : ι → Type _) [∀ i, T
 theorem piChartedSpace_chartAt {ι : Type _} [Fintype ι] (H : ι → Type _)
     [∀ i, TopologicalSpace (H i)] (M : ι → Type _) [∀ i, TopologicalSpace (M i)]
     [∀ i, ChartedSpace (H i) (M i)] (f : ∀ i, M i) :
-    chartAt (ModelPi H) f = LocalHomeomorph.pi fun i => chartAt (H i) (f i) :=
+    chartAt (ModelPi H) f = PartialHomeomorph.pi fun i => chartAt (H i) (f i) :=
   rfl
 #align pi_charted_space_chart_at piChartedSpace_chartAt
 -/
@@ -904,7 +904,7 @@ theorem open_target (he : e ∈ c.atlas) : IsOpen e.target :=
 for the topology constructed from this atlas. The `local_homeomorph` version is given in this
 definition. -/
 protected def localHomeomorph (e : LocalEquiv M H) (he : e ∈ c.atlas) :
-    @LocalHomeomorph M H c.toTopologicalSpace _ :=
+    @PartialHomeomorph M H c.toTopologicalSpace _ :=
   { e with
     open_source := by convert c.open_source' he
     open_target := by convert c.open_target he
@@ -941,8 +941,8 @@ protected def localHomeomorph (e : LocalEquiv M H) (he : e ∈ c.atlas) :
 respect to the topology constructed from the atlas. -/
 def toChartedSpace : @ChartedSpace H _ M c.toTopologicalSpace
     where
-  atlas := ⋃ (e : LocalEquiv M H) (he : e ∈ c.atlas), {c.LocalHomeomorph e he}
-  chartAt x := c.LocalHomeomorph (c.chartAt x) (c.chart_mem_atlas x)
+  atlas := ⋃ (e : LocalEquiv M H) (he : e ∈ c.atlas), {c.PartialHomeomorph e he}
+  chartAt x := c.PartialHomeomorph (c.chartAt x) (c.chart_mem_atlas x)
   mem_chart_source x := c.mem_chart_source x
   chart_mem_atlas x := by
     simp only [mem_Union, mem_singleton_iff]
@@ -965,7 +965,7 @@ variable [TopologicalSpace H] [TopologicalSpace M] [ChartedSpace H M]
 groupoid -/
 class HasGroupoid {H : Type _} [TopologicalSpace H] (M : Type _) [TopologicalSpace M]
     [ChartedSpace H M] (G : StructureGroupoid H) : Prop where
-  compatible : ∀ {e e' : LocalHomeomorph M H}, e ∈ atlas H M → e' ∈ atlas H M → e.symm ≫ₕ e' ∈ G
+  compatible : ∀ {e e' : PartialHomeomorph M H}, e ∈ atlas H M → e' ∈ atlas H M → e.symm ≫ₕ e' ∈ G
 #align has_groupoid HasGroupoid
 -/
 
@@ -975,7 +975,7 @@ charted space admitting a structure groupoid, to make it more easily accessible
 notation. -/
 theorem StructureGroupoid.compatible {H : Type _} [TopologicalSpace H] (G : StructureGroupoid H)
     {M : Type _} [TopologicalSpace M] [ChartedSpace H M] [HasGroupoid M G]
-    {e e' : LocalHomeomorph M H} (he : e ∈ atlas H M) (he' : e' ∈ atlas H M) : e.symm ≫ₕ e' ∈ G :=
+    {e e' : PartialHomeomorph M H} (he : e ∈ atlas H M) (he' : e' ∈ atlas H M) : e.symm ≫ₕ e' ∈ G :=
   HasGroupoid.compatible G he he'
 #align structure_groupoid.compatible StructureGroupoid.compatible
 -/
@@ -990,7 +990,7 @@ theorem hasGroupoid_of_le {G₁ G₂ : StructureGroupoid H} (h : HasGroupoid M G
 #print hasGroupoid_of_pregroupoid /-
 theorem hasGroupoid_of_pregroupoid (PG : Pregroupoid H)
     (h :
-      ∀ {e e' : LocalHomeomorph M H},
+      ∀ {e e' : PartialHomeomorph M H},
         e ∈ atlas H M → e' ∈ atlas H M → PG.property (e.symm ≫ₕ e') (e.symm ≫ₕ e').source) :
     HasGroupoid M PG.groupoid :=
   ⟨fun e e' he he' => mem_groupoid_of_pregroupoid.mpr ⟨h he he', h he' he⟩⟩
@@ -1028,7 +1028,7 @@ variable (M) (G : StructureGroupoid H)
 /-- Given a charted space admitting a structure groupoid, the maximal atlas associated to this
 structure groupoid is the set of all local charts that are compatible with the atlas, i.e., such
 that changing coordinates with an atlas member gives an element of the groupoid. -/
-def StructureGroupoid.maximalAtlas : Set (LocalHomeomorph M H) :=
+def StructureGroupoid.maximalAtlas : Set (PartialHomeomorph M H) :=
   {e | ∀ e' ∈ atlas H M, e.symm ≫ₕ e' ∈ G ∧ e'.symm ≫ₕ e ∈ G}
 #align structure_groupoid.maximal_atlas StructureGroupoid.maximalAtlas
 -/
@@ -1052,7 +1052,7 @@ theorem StructureGroupoid.chart_mem_maximalAtlas [HasGroupoid M G] (x : M) :
 variable {G}
 
 #print mem_maximalAtlas_iff /-
-theorem mem_maximalAtlas_iff {e : LocalHomeomorph M H} :
+theorem mem_maximalAtlas_iff {e : PartialHomeomorph M H} :
     e ∈ G.maximalAtlas M ↔ ∀ e' ∈ atlas H M, e.symm ≫ₕ e' ∈ G ∧ e'.symm ≫ₕ e ∈ G :=
   Iff.rfl
 #align mem_maximal_atlas_iff mem_maximalAtlas_iff
@@ -1061,7 +1061,7 @@ theorem mem_maximalAtlas_iff {e : LocalHomeomorph M H} :
 #print StructureGroupoid.compatible_of_mem_maximalAtlas /-
 /-- Changing coordinates between two elements of the maximal atlas gives rise to an element
 of the structure groupoid. -/
-theorem StructureGroupoid.compatible_of_mem_maximalAtlas {e e' : LocalHomeomorph M H}
+theorem StructureGroupoid.compatible_of_mem_maximalAtlas {e e' : PartialHomeomorph M H}
     (he : e ∈ G.maximalAtlas M) (he' : e' ∈ G.maximalAtlas M) : e.symm ≫ₕ e' ∈ G :=
   by
   apply G.locality fun x hx => _
@@ -1090,16 +1090,17 @@ variable (G)
 
 #print StructureGroupoid.id_mem_maximalAtlas /-
 /-- In the model space, the identity is in any maximal atlas. -/
-theorem StructureGroupoid.id_mem_maximalAtlas : LocalHomeomorph.refl H ∈ G.maximalAtlas H :=
+theorem StructureGroupoid.id_mem_maximalAtlas : PartialHomeomorph.refl H ∈ G.maximalAtlas H :=
   G.subset_maximalAtlas <| by simp
 #align structure_groupoid.id_mem_maximal_atlas StructureGroupoid.id_mem_maximalAtlas
 -/
 
 #print StructureGroupoid.mem_maximalAtlas_of_mem_groupoid /-
 /-- In the model space, any element of the groupoid is in the maximal atlas. -/
-theorem StructureGroupoid.mem_maximalAtlas_of_mem_groupoid {f : LocalHomeomorph H H} (hf : f ∈ G) :
-    f ∈ G.maximalAtlas H := by
-  rintro e (rfl : e = LocalHomeomorph.refl H)
+theorem StructureGroupoid.mem_maximalAtlas_of_mem_groupoid {f : PartialHomeomorph H H}
+    (hf : f ∈ G) : f ∈ G.maximalAtlas H :=
+  by
+  rintro e (rfl : e = PartialHomeomorph.refl H)
   exact ⟨G.trans (G.symm hf) G.id_mem, G.trans (G.symm G.id_mem) hf⟩
 #align structure_groupoid.mem_maximal_atlas_of_mem_groupoid StructureGroupoid.mem_maximalAtlas_of_mem_groupoid
 -/
@@ -1110,11 +1111,11 @@ section Singleton
 
 variable {α : Type _} [TopologicalSpace α]
 
-namespace LocalHomeomorph
+namespace PartialHomeomorph
 
-variable (e : LocalHomeomorph α H)
+variable (e : PartialHomeomorph α H)
 
-#print LocalHomeomorph.singletonChartedSpace /-
+#print PartialHomeomorph.singletonChartedSpace /-
 /-- If a single local homeomorphism `e` from a space `α` into `H` has source covering the whole
 space `α`, then that local homeomorphism induces an `H`-charted space structure on `α`.
 (This condition is equivalent to `e` being an open embedding of `α` into `H`; see
@@ -1125,32 +1126,32 @@ def singletonChartedSpace (h : e.source = Set.univ) : ChartedSpace H α
   chartAt _ := e
   mem_chart_source _ := by simp only [h, mfld_simps]
   chart_mem_atlas _ := by tauto
-#align local_homeomorph.singleton_charted_space LocalHomeomorph.singletonChartedSpace
+#align local_homeomorph.singleton_charted_space PartialHomeomorph.singletonChartedSpace
 -/
 
-#print LocalHomeomorph.singletonChartedSpace_chartAt_eq /-
+#print PartialHomeomorph.singletonChartedSpace_chartAt_eq /-
 @[simp, mfld_simps]
 theorem singletonChartedSpace_chartAt_eq (h : e.source = Set.univ) {x : α} :
     @chartAt H _ α _ (e.singletonChartedSpace h) x = e :=
   rfl
-#align local_homeomorph.singleton_charted_space_chart_at_eq LocalHomeomorph.singletonChartedSpace_chartAt_eq
+#align local_homeomorph.singleton_charted_space_chart_at_eq PartialHomeomorph.singletonChartedSpace_chartAt_eq
 -/
 
-#print LocalHomeomorph.singletonChartedSpace_chartAt_source /-
+#print PartialHomeomorph.singletonChartedSpace_chartAt_source /-
 theorem singletonChartedSpace_chartAt_source (h : e.source = Set.univ) {x : α} :
     (@chartAt H _ α _ (e.singletonChartedSpace h) x).source = Set.univ :=
   h
-#align local_homeomorph.singleton_charted_space_chart_at_source LocalHomeomorph.singletonChartedSpace_chartAt_source
+#align local_homeomorph.singleton_charted_space_chart_at_source PartialHomeomorph.singletonChartedSpace_chartAt_source
 -/
 
-#print LocalHomeomorph.singletonChartedSpace_mem_atlas_eq /-
-theorem singletonChartedSpace_mem_atlas_eq (h : e.source = Set.univ) (e' : LocalHomeomorph α H)
+#print PartialHomeomorph.singletonChartedSpace_mem_atlas_eq /-
+theorem singletonChartedSpace_mem_atlas_eq (h : e.source = Set.univ) (e' : PartialHomeomorph α H)
     (h' : e' ∈ (e.singletonChartedSpace h).atlas) : e' = e :=
   h'
-#align local_homeomorph.singleton_charted_space_mem_atlas_eq LocalHomeomorph.singletonChartedSpace_mem_atlas_eq
+#align local_homeomorph.singleton_charted_space_mem_atlas_eq PartialHomeomorph.singletonChartedSpace_mem_atlas_eq
 -/
 
-#print LocalHomeomorph.singleton_hasGroupoid /-
+#print PartialHomeomorph.singleton_hasGroupoid /-
 /-- Given a local homeomorphism `e` from a space `α` into `H`, if its source covers the whole
 space `α`, then the induced charted space structure on `α` is `has_groupoid G` for any structure
 groupoid `G` which is closed under restrictions. -/
@@ -1164,10 +1165,10 @@ theorem singleton_hasGroupoid (h : e.source = Set.univ) (G : StructureGroupoid H
       refine' G.eq_on_source _ e.trans_symm_self
       have hle : idRestrGroupoid ≤ G := (closedUnderRestriction_iff_id_le G).mp (by assumption)
       exact structure_groupoid.le_iff.mp hle _ (idRestrGroupoid_mem _) }
-#align local_homeomorph.singleton_has_groupoid LocalHomeomorph.singleton_hasGroupoid
+#align local_homeomorph.singleton_has_groupoid PartialHomeomorph.singleton_hasGroupoid
 -/
 
-end LocalHomeomorph
+end PartialHomeomorph
 
 namespace OpenEmbedding
 
@@ -1177,7 +1178,7 @@ variable [Nonempty α]
 /-- An open embedding of `α` into `H` induces an `H`-charted space structure on `α`.
 See `local_homeomorph.singleton_charted_space` -/
 def singletonChartedSpace {f : α → H} (h : OpenEmbedding f) : ChartedSpace H α :=
-  (h.toLocalHomeomorph f).singletonChartedSpace (by simp)
+  (h.toPartialHomeomorph f).singletonChartedSpace (by simp)
 #align open_embedding.singleton_charted_space OpenEmbedding.singletonChartedSpace
 -/
 
@@ -1191,7 +1192,7 @@ theorem singletonChartedSpace_chartAt_eq {f : α → H} (h : OpenEmbedding f) {x
 #print OpenEmbedding.singleton_hasGroupoid /-
 theorem singleton_hasGroupoid {f : α → H} (h : OpenEmbedding f) (G : StructureGroupoid H)
     [ClosedUnderRestriction G] : @HasGroupoid _ _ _ _ h.singletonChartedSpace G :=
-  (h.toLocalHomeomorph f).singleton_hasGroupoid (by simp) G
+  (h.toPartialHomeomorph f).singleton_hasGroupoid (by simp) G
 #align open_embedding.singleton_has_groupoid OpenEmbedding.singleton_hasGroupoid
 -/
 
@@ -1210,8 +1211,8 @@ variable (s : Opens M)
 /-- An open subset of a charted space is naturally a charted space. -/
 instance : ChartedSpace H s
     where
-  atlas := ⋃ x : s, {@LocalHomeomorph.subtypeRestr _ _ _ _ (chartAt H x.1) s ⟨x⟩}
-  chartAt x := @LocalHomeomorph.subtypeRestr _ _ _ _ (chartAt H x.1) s ⟨x⟩
+  atlas := ⋃ x : s, {@PartialHomeomorph.subtypeRestr _ _ _ _ (chartAt H x.1) s ⟨x⟩}
+  chartAt x := @PartialHomeomorph.subtypeRestr _ _ _ _ (chartAt H x.1) s ⟨x⟩
   mem_chart_source x := by simp only [mfld_simps]; exact mem_chart_source H x.1
   chart_mem_atlas x := by simp only [mem_Union, mem_singleton_iff]; use x
 
@@ -1261,9 +1262,9 @@ and use structomorph instead. -/
 structure Structomorph (G : StructureGroupoid H) (M : Type _) (M' : Type _) [TopologicalSpace M]
     [TopologicalSpace M'] [ChartedSpace H M] [ChartedSpace H M'] extends Homeomorph M M' where
   mem_groupoid :
-    ∀ c : LocalHomeomorph M H,
-      ∀ c' : LocalHomeomorph M' H,
-        c ∈ atlas H M → c' ∈ atlas H M' → c.symm ≫ₕ to_homeomorph.toLocalHomeomorph ≫ₕ c' ∈ G
+    ∀ c : PartialHomeomorph M H,
+      ∀ c' : PartialHomeomorph M' H,
+        c ∈ atlas H M → c' ∈ atlas H M' → c.symm ≫ₕ to_homeomorph.toPartialHomeomorph ≫ₕ c' ∈ G
 #align structomorph Structomorph
 -/
 
@@ -1277,8 +1278,8 @@ def Structomorph.refl (M : Type _) [TopologicalSpace M] [ChartedSpace H M] [HasG
   { Homeomorph.refl M with
     mem_groupoid := fun c c' hc hc' =>
       by
-      change LocalHomeomorph.symm c ≫ₕ LocalHomeomorph.refl M ≫ₕ c' ∈ G
-      rw [LocalHomeomorph.refl_trans]
+      change PartialHomeomorph.symm c ≫ₕ PartialHomeomorph.refl M ≫ₕ c' ∈ G
+      rw [PartialHomeomorph.refl_trans]
       exact HasGroupoid.compatible G hc hc' }
 #align structomorph.refl Structomorph.refl
 -/
@@ -1312,8 +1313,8 @@ def Structomorph.trans (e : Structomorph G M M') (e' : Structomorph G M' M'') :
       refine' G.locality fun x hx => _
       let f₁ := e.to_homeomorph.to_local_homeomorph
       let f₂ := e'.to_homeomorph.to_local_homeomorph
-      let f := (e.to_homeomorph.trans e'.to_homeomorph).toLocalHomeomorph
-      have feq : f = f₁ ≫ₕ f₂ := Homeomorph.trans_toLocalHomeomorph _ _
+      let f := (e.to_homeomorph.trans e'.to_homeomorph).toPartialHomeomorph
+      have feq : f = f₁ ≫ₕ f₂ := Homeomorph.trans_toPartialHomeomorph _ _
       let y := (c.symm ≫ₕ f₁) x
       let g := chart_at H y
       have hg₁ := chart_mem_atlas H y
@@ -1323,7 +1324,7 @@ def Structomorph.trans (e : Structomorph G M M') (e' : Structomorph G M' M'') :
         apply (c.symm ≫ₕ f₁).continuous_toFun.isOpen_inter_preimage <;> apply open_source
       have : x ∈ s := by
         constructor
-        · simp only [trans_source, preimage_univ, inter_univ, Homeomorph.toLocalHomeomorph_source]
+        · simp only [trans_source, preimage_univ, inter_univ, Homeomorph.toPartialHomeomorph_source]
           rw [trans_source] at hx 
           exact hx.1
         · exact hg₂
Diff
@@ -346,7 +346,7 @@ def Pregroupoid.groupoid (PG : Pregroupoid H) : StructureGroupoid H
     · apply PG.locality e.open_target fun x xu => _
       rcases he (e.symm x) (e.map_target xu) with ⟨s, s_open, xs, hs⟩
       refine' ⟨e.target ∩ e.symm ⁻¹' s, _, ⟨xu, xs⟩, _⟩
-      · exact ContinuousOn.preimage_open_of_open e.continuous_inv_fun e.open_target s_open
+      · exact ContinuousOn.isOpen_inter_preimage e.continuous_inv_fun e.open_target s_open
       · rw [← inter_assoc, inter_self]
         convert hs.2 using 1
         dsimp [LocalHomeomorph.restr]; rw [s_open.interior_eq]
@@ -918,7 +918,7 @@ protected def localHomeomorph (e : LocalEquiv M H) (he : e ∈ c.atlas) :
       exact ⟨e, he, ⟨s, s_open, rfl⟩⟩
     continuous_invFun := by
       letI : TopologicalSpace M := c.to_topological_space
-      apply continuousOn_open_of_generateFrom (c.open_target he)
+      apply continuousOn_isOpen_of_generateFrom (c.open_target he)
       intro t ht
       simp only [exists_prop, mem_Union, mem_singleton_iff] at ht 
       rcases ht with ⟨e', e'_atlas, s, s_open, ts⟩
@@ -1320,7 +1320,7 @@ def Structomorph.trans (e : Structomorph G M M') (e' : Structomorph G M' M'') :
       have hg₂ := mem_chart_source H y
       let s := (c.symm ≫ₕ f₁).source ∩ c.symm ≫ₕ f₁ ⁻¹' g.source
       have open_s : IsOpen s := by
-        apply (c.symm ≫ₕ f₁).continuous_toFun.preimage_open_of_open <;> apply open_source
+        apply (c.symm ≫ₕ f₁).continuous_toFun.isOpen_inter_preimage <;> apply open_source
       have : x ∈ s := by
         constructor
         · simp only [trans_source, preimage_univ, inter_univ, Homeomorph.toLocalHomeomorph_source]
Diff
@@ -3,7 +3,7 @@ Copyright (c) 2019 Sébastien Gouëzel. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Sébastien Gouëzel
 -/
-import Mathbin.Topology.LocalHomeomorph
+import Topology.LocalHomeomorph
 
 #align_import geometry.manifold.charted_space from "leanprover-community/mathlib"@"431589bce478b2229eba14b14a283250428217db"
 
@@ -518,10 +518,10 @@ end Groupoid
 
 
 #print ChartedSpace /-
-/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`atlas] [] -/
-/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`chartAt] [] -/
-/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`mem_chart_source] [] -/
-/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`chart_mem_atlas] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`atlas] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`chartAt] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`mem_chart_source] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`chart_mem_atlas] [] -/
 /-- A charted space is a topological space endowed with an atlas, i.e., a set of local
 homeomorphisms taking value in a model space `H`, called charts, such that the domains of the charts
 cover the whole space. We express the covering property by chosing for each `x` a member
@@ -960,7 +960,7 @@ section HasGroupoid
 variable [TopologicalSpace H] [TopologicalSpace M] [ChartedSpace H M]
 
 #print HasGroupoid /-
-/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`compatible] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`compatible] [] -/
 /-- A charted space has an atlas in a groupoid `G` if the change of coordinates belong to the
 groupoid -/
 class HasGroupoid {H : Type _} [TopologicalSpace H] (M : Type _) [TopologicalSpace M]
Diff
@@ -658,10 +658,10 @@ theorem ChartedSpace.secondCountable_of_sigma_compact [SecondCountableTopology H
 #align charted_space.second_countable_of_sigma_compact ChartedSpace.secondCountable_of_sigma_compact
 -/
 
-#print ChartedSpace.locallyCompact /-
+#print ChartedSpace.locallyCompactSpace /-
 /-- If a topological space admits an atlas with locally compact charts, then the space itself
 is locally compact. -/
-theorem ChartedSpace.locallyCompact [LocallyCompactSpace H] : LocallyCompactSpace M :=
+theorem ChartedSpace.locallyCompactSpace [LocallyCompactSpace H] : LocallyCompactSpace M :=
   by
   have :
     ∀ x : M,
@@ -675,7 +675,7 @@ theorem ChartedSpace.locallyCompact [LocallyCompactSpace H] : LocallyCompactSpac
   refine' locallyCompactSpace_of_hasBasis this _
   rintro x s ⟨h₁, h₂, h₃⟩
   exact h₂.image_of_continuous_on ((chart_at H x).continuousOn_symm.mono h₃)
-#align charted_space.locally_compact ChartedSpace.locallyCompact
+#align charted_space.locally_compact ChartedSpace.locallyCompactSpace
 -/
 
 #print ChartedSpace.locallyConnectedSpace /-
Diff
@@ -2,14 +2,11 @@
 Copyright (c) 2019 Sébastien Gouëzel. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Sébastien Gouëzel
-
-! This file was ported from Lean 3 source module geometry.manifold.charted_space
-! leanprover-community/mathlib commit 431589bce478b2229eba14b14a283250428217db
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Topology.LocalHomeomorph
 
+#align_import geometry.manifold.charted_space from "leanprover-community/mathlib"@"431589bce478b2229eba14b14a283250428217db"
+
 /-!
 # Charted spaces
 
Diff
@@ -1233,6 +1233,7 @@ instance [ClosedUnderRestriction G] : HasGroupoid s G
     · exact G.compatible (chart_mem_atlas H x) (chart_mem_atlas H x')
     · exact preimage_open_of_open_symm (chart_at H x) s.2
 
+#print TopologicalSpace.Opens.chartAt_inclusion_symm_eventuallyEq /-
 theorem chartAt_inclusion_symm_eventuallyEq {U V : Opens M} (hUV : U ≤ V) {x : U} :
     (chartAt H
           (Set.inclusion hUV x)).symm =ᶠ[𝓝 (chartAt H (Set.inclusion hUV x) (Set.inclusion hUV x))]
@@ -1248,6 +1249,7 @@ theorem chartAt_inclusion_symm_eventuallyEq {U V : Opens M} (hUV : U ≤ V) {x :
     exact e.map_subtype_source (mem_chart_source _ _)
   exact Filter.eventuallyEq_of_mem heUx_nhds (e.subtype_restr_symm_eq_on_of_le hUV)
 #align topological_space.opens.chart_at_inclusion_symm_eventually_eq TopologicalSpace.Opens.chartAt_inclusion_symm_eventuallyEq
+-/
 
 end TopologicalSpace.Opens
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Sébastien Gouëzel
 
 ! This file was ported from Lean 3 source module geometry.manifold.charted_space
-! leanprover-community/mathlib commit 814d76e2247d5ba8bc024843552da1278bfe9e5c
+! leanprover-community/mathlib commit 431589bce478b2229eba14b14a283250428217db
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -1233,6 +1233,22 @@ instance [ClosedUnderRestriction G] : HasGroupoid s G
     · exact G.compatible (chart_mem_atlas H x) (chart_mem_atlas H x')
     · exact preimage_open_of_open_symm (chart_at H x) s.2
 
+theorem chartAt_inclusion_symm_eventuallyEq {U V : Opens M} (hUV : U ≤ V) {x : U} :
+    (chartAt H
+          (Set.inclusion hUV x)).symm =ᶠ[𝓝 (chartAt H (Set.inclusion hUV x) (Set.inclusion hUV x))]
+      Set.inclusion hUV ∘ (chartAt H x).symm :=
+  by
+  set i := Set.inclusion hUV
+  set e := chart_at H (x : M)
+  haveI : Nonempty U := ⟨x⟩
+  haveI : Nonempty V := ⟨i x⟩
+  have heUx_nhds : (e.subtype_restr U).target ∈ 𝓝 (e x) :=
+    by
+    apply (e.subtype_restr U).open_target.mem_nhds
+    exact e.map_subtype_source (mem_chart_source _ _)
+  exact Filter.eventuallyEq_of_mem heUx_nhds (e.subtype_restr_symm_eq_on_of_le hUV)
+#align topological_space.opens.chart_at_inclusion_symm_eventually_eq TopologicalSpace.Opens.chartAt_inclusion_symm_eventuallyEq
+
 end TopologicalSpace.Opens
 
 /-! ### Structomorphisms -/
Diff
@@ -126,14 +126,12 @@ universe u
 
 variable {H : Type u} {H' : Type _} {M : Type _} {M' : Type _} {M'' : Type _}
 
--- mathport name: local_homeomorph.trans
 /- Notational shortcut for the composition of local homeomorphisms and local equivs, i.e.,
 `local_homeomorph.trans` and `local_equiv.trans`.
 Note that, as is usual for equivs, the composition is from left to right, hence the direction of
 the arrow. -/
 scoped[Manifold] infixr:100 " ≫ₕ " => LocalHomeomorph.trans
 
--- mathport name: local_equiv.trans
 scoped[Manifold] infixr:100 " ≫ " => LocalEquiv.trans
 
 open Set LocalHomeomorph
@@ -215,10 +213,12 @@ theorem StructureGroupoid.locality (G : StructureGroupoid H) {e : LocalHomeomorp
 #align structure_groupoid.locality StructureGroupoid.locality
 -/
 
+#print StructureGroupoid.eq_on_source /-
 theorem StructureGroupoid.eq_on_source (G : StructureGroupoid H) {e e' : LocalHomeomorph H H}
     (he : e ∈ G) (h : e' ≈ e) : e' ∈ G :=
   G.eq_on_source' e e' he h
 #align structure_groupoid.eq_on_source StructureGroupoid.eq_on_source
+-/
 
 #print StructureGroupoid.partialOrder /-
 /-- Partial order on the set of groupoids, given by inclusion of the members of the groupoid -/
@@ -382,12 +382,14 @@ theorem groupoid_of_pregroupoid_le (PG₁ PG₂ : Pregroupoid H)
 #align groupoid_of_pregroupoid_le groupoid_of_pregroupoid_le
 -/
 
+#print mem_pregroupoid_of_eq_on_source /-
 theorem mem_pregroupoid_of_eq_on_source (PG : Pregroupoid H) {e e' : LocalHomeomorph H H}
     (he' : e ≈ e') (he : PG.property e e.source) : PG.property e' e'.source :=
   by
   rw [← he'.1]
   exact PG.congr e.open_source he'.eq_on.symm he
 #align mem_pregroupoid_of_eq_on_source mem_pregroupoid_of_eq_on_source
+-/
 
 #print continuousPregroupoid /-
 /-- The pregroupoid of all local maps on a topological space `H` -/
@@ -519,10 +521,10 @@ end Groupoid
 
 
 #print ChartedSpace /-
-/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`atlas] [] -/
-/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`chartAt] [] -/
-/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`mem_chart_source] [] -/
-/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`chart_mem_atlas] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`atlas] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`chartAt] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`mem_chart_source] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`chart_mem_atlas] [] -/
 /-- A charted space is a topological space endowed with an atlas, i.e., a set of local
 homeomorphisms taking value in a model space `H`, called charts, such that the domains of the charts
 cover the whole space. We express the covering property by chosing for each `x` a member
@@ -578,17 +580,23 @@ section
 
 variable (H) [TopologicalSpace H] [TopologicalSpace M] [ChartedSpace H M]
 
+#print mem_chart_target /-
 theorem mem_chart_target (x : M) : chartAt H x x ∈ (chartAt H x).target :=
   (chartAt H x).map_source (mem_chart_source _ _)
 #align mem_chart_target mem_chart_target
+-/
 
+#print chart_source_mem_nhds /-
 theorem chart_source_mem_nhds (x : M) : (chartAt H x).source ∈ 𝓝 x :=
   (chartAt H x).open_source.mem_nhds <| mem_chart_source H x
 #align chart_source_mem_nhds chart_source_mem_nhds
+-/
 
+#print chart_target_mem_nhds /-
 theorem chart_target_mem_nhds (x : M) : (chartAt H x).target ∈ 𝓝 (chartAt H x x) :=
   (chartAt H x).open_target.mem_nhds <| mem_chart_target H x
 #align chart_target_mem_nhds chart_target_mem_nhds
+-/
 
 #print achart /-
 /-- `achart H x` is the chart at `x`, considered as an element of the atlas.
@@ -598,26 +606,35 @@ def achart (x : M) : atlas H M :=
 #align achart achart
 -/
 
+#print achart_def /-
 theorem achart_def (x : M) : achart H x = ⟨chartAt H x, chart_mem_atlas H x⟩ :=
   rfl
 #align achart_def achart_def
+-/
 
+#print coe_achart /-
 @[simp, mfld_simps]
 theorem coe_achart (x : M) : (achart H x : LocalHomeomorph M H) = chartAt H x :=
   rfl
 #align coe_achart coe_achart
+-/
 
+#print achart_val /-
 @[simp, mfld_simps]
 theorem achart_val (x : M) : (achart H x).1 = chartAt H x :=
   rfl
 #align achart_val achart_val
+-/
 
+#print mem_achart_source /-
 theorem mem_achart_source (x : M) : x ∈ (achart H x).1.source :=
   mem_chart_source H x
 #align mem_achart_source mem_achart_source
+-/
 
 open TopologicalSpace
 
+#print ChartedSpace.secondCountable_of_countable_cover /-
 theorem ChartedSpace.secondCountable_of_countable_cover [SecondCountableTopology H] {s : Set M}
     (hs : (⋃ (x) (hx : x ∈ s), (chartAt H x).source) = univ) (hsc : s.Countable) :
     SecondCountableTopology M :=
@@ -629,9 +646,11 @@ theorem ChartedSpace.secondCountable_of_countable_cover [SecondCountableTopology
   exact
     second_countable_topology_of_countable_cover (fun x : s => (chart_at H (x : M)).open_source) hs
 #align charted_space.second_countable_of_countable_cover ChartedSpace.secondCountable_of_countable_cover
+-/
 
 variable (M)
 
+#print ChartedSpace.secondCountable_of_sigma_compact /-
 theorem ChartedSpace.secondCountable_of_sigma_compact [SecondCountableTopology H]
     [SigmaCompactSpace M] : SecondCountableTopology M :=
   by
@@ -640,7 +659,9 @@ theorem ChartedSpace.secondCountable_of_sigma_compact [SecondCountableTopology H
     countable_cover_nhds_of_sigma_compact fun x : M => chart_source_mem_nhds H x
   exact ChartedSpace.secondCountable_of_countable_cover H hsU hsc
 #align charted_space.second_countable_of_sigma_compact ChartedSpace.secondCountable_of_sigma_compact
+-/
 
+#print ChartedSpace.locallyCompact /-
 /-- If a topological space admits an atlas with locally compact charts, then the space itself
 is locally compact. -/
 theorem ChartedSpace.locallyCompact [LocallyCompactSpace H] : LocallyCompactSpace M :=
@@ -658,7 +679,9 @@ theorem ChartedSpace.locallyCompact [LocallyCompactSpace H] : LocallyCompactSpac
   rintro x s ⟨h₁, h₂, h₃⟩
   exact h₂.image_of_continuous_on ((chart_at H x).continuousOn_symm.mono h₃)
 #align charted_space.locally_compact ChartedSpace.locallyCompact
+-/
 
+#print ChartedSpace.locallyConnectedSpace /-
 /-- If a topological space admits an atlas with locally connected charts, then the space itself is
 locally connected. -/
 theorem ChartedSpace.locallyConnectedSpace [LocallyConnectedSpace H] : LocallyConnectedSpace M :=
@@ -675,6 +698,7 @@ theorem ChartedSpace.locallyConnectedSpace [LocallyConnectedSpace H] : LocallyCo
   · rintro x s ⟨⟨-, -, hsconn⟩, hssubset⟩
     exact hsconn.is_preconnected.image _ ((E x).continuousOn_symm.mono hssubset)
 #align charted_space.locally_connected_space ChartedSpace.locallyConnectedSpace
+-/
 
 #print ChartedSpace.comp /-
 /-- If `M` is modelled on `H'` and `H'` is itself modelled on `H`, then we can consider `M` as being
@@ -738,12 +762,14 @@ instance (H : Type _) [TopologicalSpace H] (H' : Type _) [TopologicalSpace H'] :
   Prod.topologicalSpace
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print modelProd_range_prod_id /-
 -- Next lemma shows up often when dealing with derivatives, register it as simp.
 @[simp, mfld_simps]
 theorem modelProd_range_prod_id {H : Type _} {H' : Type _} {α : Type _} (f : H → α) :
     (range fun p : ModelProd H H' => (f p.1, p.2)) = range f ×ˢ (univ : Set H') := by
   rw [prod_range_univ_eq]
 #align model_prod_range_prod_id modelProd_range_prod_id
+-/
 
 end
 
@@ -762,6 +788,7 @@ instance [∀ i, TopologicalSpace (Hi i)] : TopologicalSpace (ModelPi Hi) :=
 
 end
 
+#print prodChartedSpace /-
 /-- The product of two charted spaces is naturally a charted space, with the canonical
 construction of the atlas of product maps. -/
 instance prodChartedSpace (H : Type _) [TopologicalSpace H] (M : Type _) [TopologicalSpace M]
@@ -773,21 +800,26 @@ instance prodChartedSpace (H : Type _) [TopologicalSpace H] (M : Type _) [Topolo
   mem_chart_source x := ⟨mem_chart_source _ _, mem_chart_source _ _⟩
   chart_mem_atlas x := mem_image2_of_mem (chart_mem_atlas _ _) (chart_mem_atlas _ _)
 #align prod_charted_space prodChartedSpace
+-/
 
 section prodChartedSpace
 
 variable [TopologicalSpace H] [TopologicalSpace M] [ChartedSpace H M] [TopologicalSpace H']
   [TopologicalSpace M'] [ChartedSpace H' M'] {x : M × M'}
 
+#print prodChartedSpace_chartAt /-
 @[simp, mfld_simps]
 theorem prodChartedSpace_chartAt :
     chartAt (ModelProd H H') x = (chartAt H x.fst).Prod (chartAt H' x.snd) :=
   rfl
 #align prod_charted_space_chart_at prodChartedSpace_chartAt
+-/
 
+#print chartedSpaceSelf_prod /-
 theorem chartedSpaceSelf_prod : prodChartedSpace H H H' H' = chartedSpaceSelf (H × H') := by ext1;
   · simp [prodChartedSpace, atlas]; · ext1; simp [chartAt_self_eq]; rfl
 #align charted_space_self_prod chartedSpaceSelf_prod
+-/
 
 end prodChartedSpace
 
@@ -805,6 +837,7 @@ instance piChartedSpace {ι : Type _} [Fintype ι] (H : ι → Type _) [∀ i, T
 #align pi_charted_space piChartedSpace
 -/
 
+#print piChartedSpace_chartAt /-
 @[simp, mfld_simps]
 theorem piChartedSpace_chartAt {ι : Type _} [Fintype ι] (H : ι → Type _)
     [∀ i, TopologicalSpace (H i)] (M : ι → Type _) [∀ i, TopologicalSpace (M i)]
@@ -812,6 +845,7 @@ theorem piChartedSpace_chartAt {ι : Type _} [Fintype ι] (H : ι → Type _)
     chartAt (ModelPi H) f = LocalHomeomorph.pi fun i => chartAt (H i) (f i) :=
   rfl
 #align pi_charted_space_chart_at piChartedSpace_chartAt
+-/
 
 end ChartedSpace
 
@@ -848,6 +882,7 @@ protected def toTopologicalSpace : TopologicalSpace M :=
 #align charted_space_core.to_topological_space ChartedSpaceCore.toTopologicalSpace
 -/
 
+#print ChartedSpaceCore.open_source' /-
 theorem open_source' (he : e ∈ c.atlas) : is_open[c.toTopologicalSpace] e.source :=
   by
   apply TopologicalSpace.GenerateOpen.basic
@@ -855,7 +890,9 @@ theorem open_source' (he : e ∈ c.atlas) : is_open[c.toTopologicalSpace] e.sour
   refine' ⟨e, he, univ, isOpen_univ, _⟩
   simp only [Set.univ_inter, Set.preimage_univ]
 #align charted_space_core.open_source' ChartedSpaceCore.open_source'
+-/
 
+#print ChartedSpaceCore.open_target /-
 theorem open_target (he : e ∈ c.atlas) : IsOpen e.target :=
   by
   have E : e.target ∩ e.symm ⁻¹' e.source = e.target :=
@@ -863,6 +900,7 @@ theorem open_target (he : e ∈ c.atlas) : IsOpen e.target :=
       ⟨hx, LocalEquiv.target_subset_preimage_source _ hx⟩
   simpa [LocalEquiv.trans_source, E] using c.open_source e e he he
 #align charted_space_core.open_target ChartedSpaceCore.open_target
+-/
 
 #print ChartedSpaceCore.localHomeomorph /-
 /-- An element of the atlas in a charted space without topology becomes a local homeomorphism
@@ -925,7 +963,7 @@ section HasGroupoid
 variable [TopologicalSpace H] [TopologicalSpace M] [ChartedSpace H M]
 
 #print HasGroupoid /-
-/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`compatible] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`compatible] [] -/
 /-- A charted space has an atlas in a groupoid `G` if the change of coordinates belong to the
 groupoid -/
 class HasGroupoid {H : Type _} [TopologicalSpace H] (M : Type _) [TopologicalSpace M]
@@ -934,6 +972,7 @@ class HasGroupoid {H : Type _} [TopologicalSpace H] (M : Type _) [TopologicalSpa
 #align has_groupoid HasGroupoid
 -/
 
+#print StructureGroupoid.compatible /-
 /-- Reformulate in the `structure_groupoid` namespace the compatibility condition of charts in a
 charted space admitting a structure groupoid, to make it more easily accessible with dot
 notation. -/
@@ -942,12 +981,16 @@ theorem StructureGroupoid.compatible {H : Type _} [TopologicalSpace H] (G : Stru
     {e e' : LocalHomeomorph M H} (he : e ∈ atlas H M) (he' : e' ∈ atlas H M) : e.symm ≫ₕ e' ∈ G :=
   HasGroupoid.compatible G he he'
 #align structure_groupoid.compatible StructureGroupoid.compatible
+-/
 
+#print hasGroupoid_of_le /-
 theorem hasGroupoid_of_le {G₁ G₂ : StructureGroupoid H} (h : HasGroupoid M G₁) (hle : G₁ ≤ G₂) :
     HasGroupoid M G₂ :=
   ⟨fun e e' he he' => hle (h.compatible he he')⟩
 #align has_groupoid_of_le hasGroupoid_of_le
+-/
 
+#print hasGroupoid_of_pregroupoid /-
 theorem hasGroupoid_of_pregroupoid (PG : Pregroupoid H)
     (h :
       ∀ {e e' : LocalHomeomorph M H},
@@ -955,6 +998,7 @@ theorem hasGroupoid_of_pregroupoid (PG : Pregroupoid H)
     HasGroupoid M PG.groupoid :=
   ⟨fun e e' he he' => mem_groupoid_of_pregroupoid.mpr ⟨h he he', h he' he⟩⟩
 #align has_groupoid_of_pregroupoid hasGroupoid_of_pregroupoid
+-/
 
 #print hasGroupoid_model_space /-
 /-- The trivial charted space structure on the model space is compatible with any groupoid -/
@@ -994,23 +1038,30 @@ def StructureGroupoid.maximalAtlas : Set (LocalHomeomorph M H) :=
 
 variable {M}
 
+#print StructureGroupoid.subset_maximalAtlas /-
 /-- The elements of the atlas belong to the maximal atlas for any structure groupoid -/
 theorem StructureGroupoid.subset_maximalAtlas [HasGroupoid M G] : atlas H M ⊆ G.maximalAtlas M :=
   fun e he e' he' => ⟨G.compatible he he', G.compatible he' he⟩
 #align structure_groupoid.subset_maximal_atlas StructureGroupoid.subset_maximalAtlas
+-/
 
+#print StructureGroupoid.chart_mem_maximalAtlas /-
 theorem StructureGroupoid.chart_mem_maximalAtlas [HasGroupoid M G] (x : M) :
     chartAt H x ∈ G.maximalAtlas M :=
   G.subset_maximalAtlas (chart_mem_atlas H x)
 #align structure_groupoid.chart_mem_maximal_atlas StructureGroupoid.chart_mem_maximalAtlas
+-/
 
 variable {G}
 
+#print mem_maximalAtlas_iff /-
 theorem mem_maximalAtlas_iff {e : LocalHomeomorph M H} :
     e ∈ G.maximalAtlas M ↔ ∀ e' ∈ atlas H M, e.symm ≫ₕ e' ∈ G ∧ e'.symm ≫ₕ e ∈ G :=
   Iff.rfl
 #align mem_maximal_atlas_iff mem_maximalAtlas_iff
+-/
 
+#print StructureGroupoid.compatible_of_mem_maximalAtlas /-
 /-- Changing coordinates between two elements of the maximal atlas gives rise to an element
 of the structure groupoid. -/
 theorem StructureGroupoid.compatible_of_mem_maximalAtlas {e e' : LocalHomeomorph M H}
@@ -1036,6 +1087,7 @@ theorem StructureGroupoid.compatible_of_mem_maximalAtlas {e e' : LocalHomeomorph
       _ ≈ (e.symm ≫ₕ e').restr s := by simp [restr_trans]
   exact G.eq_on_source C (Setoid.symm D)
 #align structure_groupoid.compatible_of_mem_maximal_atlas StructureGroupoid.compatible_of_mem_maximalAtlas
+-/
 
 variable (G)
 
@@ -1079,22 +1131,29 @@ def singletonChartedSpace (h : e.source = Set.univ) : ChartedSpace H α
 #align local_homeomorph.singleton_charted_space LocalHomeomorph.singletonChartedSpace
 -/
 
+#print LocalHomeomorph.singletonChartedSpace_chartAt_eq /-
 @[simp, mfld_simps]
 theorem singletonChartedSpace_chartAt_eq (h : e.source = Set.univ) {x : α} :
     @chartAt H _ α _ (e.singletonChartedSpace h) x = e :=
   rfl
 #align local_homeomorph.singleton_charted_space_chart_at_eq LocalHomeomorph.singletonChartedSpace_chartAt_eq
+-/
 
+#print LocalHomeomorph.singletonChartedSpace_chartAt_source /-
 theorem singletonChartedSpace_chartAt_source (h : e.source = Set.univ) {x : α} :
     (@chartAt H _ α _ (e.singletonChartedSpace h) x).source = Set.univ :=
   h
 #align local_homeomorph.singleton_charted_space_chart_at_source LocalHomeomorph.singletonChartedSpace_chartAt_source
+-/
 
+#print LocalHomeomorph.singletonChartedSpace_mem_atlas_eq /-
 theorem singletonChartedSpace_mem_atlas_eq (h : e.source = Set.univ) (e' : LocalHomeomorph α H)
     (h' : e' ∈ (e.singletonChartedSpace h).atlas) : e' = e :=
   h'
 #align local_homeomorph.singleton_charted_space_mem_atlas_eq LocalHomeomorph.singletonChartedSpace_mem_atlas_eq
+-/
 
+#print LocalHomeomorph.singleton_hasGroupoid /-
 /-- Given a local homeomorphism `e` from a space `α` into `H`, if its source covers the whole
 space `α`, then the induced charted space structure on `α` is `has_groupoid G` for any structure
 groupoid `G` which is closed under restrictions. -/
@@ -1109,6 +1168,7 @@ theorem singleton_hasGroupoid (h : e.source = Set.univ) (G : StructureGroupoid H
       have hle : idRestrGroupoid ≤ G := (closedUnderRestriction_iff_id_le G).mp (by assumption)
       exact structure_groupoid.le_iff.mp hle _ (idRestrGroupoid_mem _) }
 #align local_homeomorph.singleton_has_groupoid LocalHomeomorph.singleton_hasGroupoid
+-/
 
 end LocalHomeomorph
 
@@ -1124,15 +1184,19 @@ def singletonChartedSpace {f : α → H} (h : OpenEmbedding f) : ChartedSpace H
 #align open_embedding.singleton_charted_space OpenEmbedding.singletonChartedSpace
 -/
 
+#print OpenEmbedding.singletonChartedSpace_chartAt_eq /-
 theorem singletonChartedSpace_chartAt_eq {f : α → H} (h : OpenEmbedding f) {x : α} :
     ⇑(@chartAt H _ α _ h.singletonChartedSpace x) = f :=
   rfl
 #align open_embedding.singleton_charted_space_chart_at_eq OpenEmbedding.singletonChartedSpace_chartAt_eq
+-/
 
+#print OpenEmbedding.singleton_hasGroupoid /-
 theorem singleton_hasGroupoid {f : α → H} (h : OpenEmbedding f) (G : StructureGroupoid H)
     [ClosedUnderRestriction G] : @HasGroupoid _ _ _ _ h.singletonChartedSpace G :=
   (h.toLocalHomeomorph f).singleton_hasGroupoid (by simp) G
 #align open_embedding.singleton_has_groupoid OpenEmbedding.singleton_hasGroupoid
+-/
 
 end OpenEmbedding
 
Diff
@@ -1034,7 +1034,6 @@ theorem StructureGroupoid.compatible_of_mem_maximalAtlas {e e' : LocalHomeomorph
       _ ≈ (e.symm ≫ₕ of_set f.source f.open_source) ≫ₕ e' := by simp [trans_assoc]
       _ ≈ e.symm.restr s ≫ₕ e' := by simp [s, trans_of_set']
       _ ≈ (e.symm ≫ₕ e').restr s := by simp [restr_trans]
-      
   exact G.eq_on_source C (Setoid.symm D)
 #align structure_groupoid.compatible_of_mem_maximal_atlas StructureGroupoid.compatible_of_mem_maximalAtlas
 
@@ -1263,7 +1262,6 @@ def Structomorph.trans (e : Structomorph G M M') (e' : Structomorph G M' M'') :
           _ ≈ ((c.symm ≫ₕ f₁) ≫ₕ f₂ ≫ₕ c').restr s := by simp [restr_trans]
           _ ≈ (c.symm ≫ₕ (f₁ ≫ₕ f₂) ≫ₕ c').restr s := by simp [eq_on_source.restr, trans_assoc]
           _ ≈ F₂ := by simp [F₂, feq]
-          
       have : F₂ ∈ G := G.eq_on_source A (Setoid.symm this)
       exact this }
 #align structomorph.trans Structomorph.trans
Diff
@@ -239,13 +239,13 @@ theorem StructureGroupoid.le_iff {G₁ G₂ : StructureGroupoid H} : G₁ ≤ G
 necessary from the definition) -/
 def idGroupoid (H : Type u) [TopologicalSpace H] : StructureGroupoid H
     where
-  members := {LocalHomeomorph.refl H} ∪ { e : LocalHomeomorph H H | e.source = ∅ }
+  members := {LocalHomeomorph.refl H} ∪ {e : LocalHomeomorph H H | e.source = ∅}
   trans' e e' he he' := by
     cases he <;> simp at he he' 
     · simpa only [he, refl_trans]
     · have : (e ≫ₕ e').source ⊆ e.source := sep_subset _ _
       rw [he] at this 
-      have : e ≫ₕ e' ∈ { e : LocalHomeomorph H H | e.source = ∅ } := eq_bot_iff.2 this
+      have : e ≫ₕ e' ∈ {e : LocalHomeomorph H H | e.source = ∅} := eq_bot_iff.2 this
       exact (mem_union _ _ _).2 (Or.inr this)
   symm' e he := by
     cases' (mem_union _ _ _).1 he with E E
@@ -294,7 +294,7 @@ instance : OrderBot (StructureGroupoid H)
   bot := idGroupoid H
   bot_le := by
     intro u f hf
-    change f ∈ {LocalHomeomorph.refl H} ∪ { e : LocalHomeomorph H H | e.source = ∅ } at hf 
+    change f ∈ {LocalHomeomorph.refl H} ∪ {e : LocalHomeomorph H H | e.source = ∅} at hf 
     simp only [singleton_union, mem_set_of_eq, mem_insert_iff] at hf 
     cases hf
     · rw [hf]
@@ -330,7 +330,7 @@ structure Pregroupoid (H : Type _) [TopologicalSpace H] where
 from a pregroupoid asserting that this property is stable under composition. -/
 def Pregroupoid.groupoid (PG : Pregroupoid H) : StructureGroupoid H
     where
-  members := { e : LocalHomeomorph H H | PG.property e e.source ∧ PG.property e.symm e.target }
+  members := {e : LocalHomeomorph H H | PG.property e e.source ∧ PG.property e.symm e.target}
   trans' e e' he he' := by
     constructor
     · apply PG.comp he.1 he'.1 e.open_source e'.open_source
@@ -439,7 +439,7 @@ theorem closedUnderRestriction' {G : StructureGroupoid H} [ClosedUnderRestrictio
 restriction of the identity to the various open subsets. -/
 def idRestrGroupoid : StructureGroupoid H
     where
-  members := { e | ∃ (s : Set H) (h : IsOpen s), e ≈ LocalHomeomorph.ofSet s h }
+  members := {e | ∃ (s : Set H) (h : IsOpen s), e ≈ LocalHomeomorph.ofSet s h}
   trans' := by
     rintro e e' ⟨s, hs, hse⟩ ⟨s', hs', hse'⟩
     refine' ⟨s ∩ s', IsOpen.inter hs hs', _⟩
@@ -519,10 +519,10 @@ end Groupoid
 
 
 #print ChartedSpace /-
-/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`atlas] [] -/
-/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`chartAt] [] -/
-/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`mem_chart_source] [] -/
-/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`chart_mem_atlas] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`atlas] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`chartAt] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`mem_chart_source] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`chart_mem_atlas] [] -/
 /-- A charted space is a topological space endowed with an atlas, i.e., a set of local
 homeomorphisms taking value in a model space `H`, called charts, such that the domains of the charts
 cover the whole space. We express the covering property by chosing for each `x` a member
@@ -925,7 +925,7 @@ section HasGroupoid
 variable [TopologicalSpace H] [TopologicalSpace M] [ChartedSpace H M]
 
 #print HasGroupoid /-
-/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`compatible] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`compatible] [] -/
 /-- A charted space has an atlas in a groupoid `G` if the change of coordinates belong to the
 groupoid -/
 class HasGroupoid {H : Type _} [TopologicalSpace H] (M : Type _) [TopologicalSpace M]
@@ -988,7 +988,7 @@ variable (M) (G : StructureGroupoid H)
 structure groupoid is the set of all local charts that are compatible with the atlas, i.e., such
 that changing coordinates with an atlas member gives an element of the groupoid. -/
 def StructureGroupoid.maximalAtlas : Set (LocalHomeomorph M H) :=
-  { e | ∀ e' ∈ atlas H M, e.symm ≫ₕ e' ∈ G ∧ e'.symm ≫ₕ e ∈ G }
+  {e | ∀ e' ∈ atlas H M, e.symm ≫ₕ e' ∈ G ∧ e'.symm ≫ₕ e ∈ G}
 #align structure_groupoid.maximal_atlas StructureGroupoid.maximalAtlas
 -/
 
@@ -1164,8 +1164,8 @@ instance [ClosedUnderRestriction G] : HasGroupoid s G
     simp only [hc.symm, mem_singleton_iff, Subtype.val_eq_coe] at he 
     simp only [hc'.symm, mem_singleton_iff, Subtype.val_eq_coe] at he' 
     rw [he, he']
-    convert G.eq_on_source _
-        (subtype_restr_symm_trans_subtype_restr s (chart_at H x) (chart_at H x'))
+    convert
+      G.eq_on_source _ (subtype_restr_symm_trans_subtype_restr s (chart_at H x) (chart_at H x'))
     apply closedUnderRestriction'
     · exact G.compatible (chart_mem_atlas H x) (chart_mem_atlas H x')
     · exact preimage_open_of_open_symm (chart_at H x) s.2
Diff
@@ -223,7 +223,7 @@ theorem StructureGroupoid.eq_on_source (G : StructureGroupoid H) {e e' : LocalHo
 #print StructureGroupoid.partialOrder /-
 /-- Partial order on the set of groupoids, given by inclusion of the members of the groupoid -/
 instance StructureGroupoid.partialOrder : PartialOrder (StructureGroupoid H) :=
-  PartialOrder.lift StructureGroupoid.members fun a b h => by cases a; cases b; dsimp at h;
+  PartialOrder.lift StructureGroupoid.members fun a b h => by cases a; cases b; dsimp at h ;
     induction h; rfl
 #align structure_groupoid.partial_order StructureGroupoid.partialOrder
 -/
@@ -241,10 +241,10 @@ def idGroupoid (H : Type u) [TopologicalSpace H] : StructureGroupoid H
     where
   members := {LocalHomeomorph.refl H} ∪ { e : LocalHomeomorph H H | e.source = ∅ }
   trans' e e' he he' := by
-    cases he <;> simp at he he'
+    cases he <;> simp at he he' 
     · simpa only [he, refl_trans]
     · have : (e ≫ₕ e').source ⊆ e.source := sep_subset _ _
-      rw [he] at this
+      rw [he] at this 
       have : e ≫ₕ e' ∈ { e : LocalHomeomorph H H | e.source = ∅ } := eq_bot_iff.2 this
       exact (mem_union _ _ _).2 (Or.inr this)
   symm' e he := by
@@ -267,13 +267,13 @@ def idGroupoid (H : Type u) [TopologicalSpace H] : StructureGroupoid H
       · replace hs : LocalHomeomorph.restr e s = LocalHomeomorph.refl H
         · simpa only using hs
         have : (e.restr s).source = univ := by rw [hs]; simp
-        change e.to_local_equiv.source ∩ interior s = univ at this
+        change e.to_local_equiv.source ∩ interior s = univ at this 
         have : univ ⊆ interior s := by rw [← this]; exact inter_subset_right _ _
-        have : s = univ := by rwa [open_s.interior_eq, univ_subset_iff] at this
+        have : s = univ := by rwa [open_s.interior_eq, univ_subset_iff] at this 
         simpa only [this, restr_univ] using hs
       · exfalso
-        rw [mem_set_of_eq] at hs
-        rwa [hs] at x's
+        rw [mem_set_of_eq] at hs 
+        rwa [hs] at x's 
   eq_on_source' e e' he he'e := by
     cases he
     · left
@@ -283,7 +283,7 @@ def idGroupoid (H : Type u) [TopologicalSpace H] : StructureGroupoid H
           rfl
       rwa [← this]
     · right
-      change e.to_local_equiv.source = ∅ at he
+      change e.to_local_equiv.source = ∅ at he 
       rwa [Set.mem_setOf_eq, he'e.source_eq]
 #align id_groupoid idGroupoid
 -/
@@ -294,14 +294,14 @@ instance : OrderBot (StructureGroupoid H)
   bot := idGroupoid H
   bot_le := by
     intro u f hf
-    change f ∈ {LocalHomeomorph.refl H} ∪ { e : LocalHomeomorph H H | e.source = ∅ } at hf
-    simp only [singleton_union, mem_set_of_eq, mem_insert_iff] at hf
+    change f ∈ {LocalHomeomorph.refl H} ∪ { e : LocalHomeomorph H H | e.source = ∅ } at hf 
+    simp only [singleton_union, mem_set_of_eq, mem_insert_iff] at hf 
     cases hf
     · rw [hf]
       apply u.id_mem
     · apply u.locality
       intro x hx
-      rw [hf, mem_empty_iff_false] at hx
+      rw [hf, mem_empty_iff_false] at hx 
       exact hx.elim
 
 instance (H : Type u) [TopologicalSpace H] : Inhabited (StructureGroupoid H) :=
@@ -377,7 +377,7 @@ theorem groupoid_of_pregroupoid_le (PG₁ PG₂ : Pregroupoid H)
     (h : ∀ f s, PG₁.property f s → PG₂.property f s) : PG₁.groupoid ≤ PG₂.groupoid :=
   by
   refine' StructureGroupoid.le_iff.2 fun e he => _
-  rw [mem_groupoid_of_pregroupoid] at he⊢
+  rw [mem_groupoid_of_pregroupoid] at he ⊢
   exact ⟨h _ _ he.1, h _ _ he.2⟩
 #align groupoid_of_pregroupoid_le groupoid_of_pregroupoid_le
 -/
@@ -439,12 +439,12 @@ theorem closedUnderRestriction' {G : StructureGroupoid H} [ClosedUnderRestrictio
 restriction of the identity to the various open subsets. -/
 def idRestrGroupoid : StructureGroupoid H
     where
-  members := { e | ∃ (s : Set H)(h : IsOpen s), e ≈ LocalHomeomorph.ofSet s h }
+  members := { e | ∃ (s : Set H) (h : IsOpen s), e ≈ LocalHomeomorph.ofSet s h }
   trans' := by
     rintro e e' ⟨s, hs, hse⟩ ⟨s', hs', hse'⟩
     refine' ⟨s ∩ s', IsOpen.inter hs hs', _⟩
     have := LocalHomeomorph.EqOnSource.trans' hse hse'
-    rwa [LocalHomeomorph.ofSet_trans_ofSet] at this
+    rwa [LocalHomeomorph.ofSet_trans_ofSet] at this 
   symm' := by
     rintro e ⟨s, hs, hse⟩
     refine' ⟨s, hs, _⟩
@@ -625,7 +625,7 @@ theorem ChartedSpace.secondCountable_of_countable_cover [SecondCountableTopology
   haveI : ∀ x : M, second_countable_topology (chart_at H x).source := fun x =>
     (chart_at H x).secondCountableTopology_source
   haveI := hsc.to_encodable
-  rw [bUnion_eq_Union] at hs
+  rw [bUnion_eq_Union] at hs 
   exact
     second_countable_topology_of_countable_cover (fun x : s => (chart_at H (x : M)).open_source) hs
 #align charted_space.second_countable_of_countable_cover ChartedSpace.secondCountable_of_countable_cover
@@ -885,7 +885,7 @@ protected def localHomeomorph (e : LocalEquiv M H) (he : e ∈ c.atlas) :
       letI : TopologicalSpace M := c.to_topological_space
       apply continuousOn_open_of_generateFrom (c.open_target he)
       intro t ht
-      simp only [exists_prop, mem_Union, mem_singleton_iff] at ht
+      simp only [exists_prop, mem_Union, mem_singleton_iff] at ht 
       rcases ht with ⟨e', e'_atlas, s, s_open, ts⟩
       rw [ts]
       let f := e.symm.trans e'
@@ -929,7 +929,7 @@ variable [TopologicalSpace H] [TopologicalSpace M] [ChartedSpace H M]
 /-- A charted space has an atlas in a groupoid `G` if the change of coordinates belong to the
 groupoid -/
 class HasGroupoid {H : Type _} [TopologicalSpace H] (M : Type _) [TopologicalSpace M]
-  [ChartedSpace H M] (G : StructureGroupoid H) : Prop where
+    [ChartedSpace H M] (G : StructureGroupoid H) : Prop where
   compatible : ∀ {e e' : LocalHomeomorph M H}, e ∈ atlas H M → e' ∈ atlas H M → e.symm ≫ₕ e' ∈ G
 #align has_groupoid HasGroupoid
 -/
@@ -964,7 +964,7 @@ instance hasGroupoid_model_space (H : Type _) [TopologicalSpace H] (G : Structur
     by
     replace he : e ∈ atlas H H := he
     replace he' : e' ∈ atlas H H := he'
-    rw [chartedSpaceSelf_atlas] at he he'
+    rw [chartedSpaceSelf_atlas] at he he' 
     simp [he, he', StructureGroupoid.id_mem]
 #align has_groupoid_model_space hasGroupoid_model_space
 -/
@@ -1021,7 +1021,7 @@ theorem StructureGroupoid.compatible_of_mem_maximalAtlas {e e' : LocalHomeomorph
   let s := e.target ∩ e.symm ⁻¹' f.source
   have hs : IsOpen s := by
     apply e.symm.continuous_to_fun.preimage_open_of_open <;> apply open_source
-  have xs : x ∈ s := by dsimp at hx; simp [s, hx]
+  have xs : x ∈ s := by dsimp at hx ; simp [s, hx]
   refine' ⟨s, hs, xs, _⟩
   have A : e.symm ≫ₕ f ∈ G := (mem_maximalAtlas_iff.1 he f (chart_mem_atlas _ _)).1
   have B : f.symm ≫ₕ e' ∈ G := (mem_maximalAtlas_iff.1 he' f (chart_mem_atlas _ _)).2
@@ -1161,8 +1161,8 @@ instance [ClosedUnderRestriction G] : HasGroupoid s G
     where compatible := by
     rintro e e' ⟨_, ⟨x, hc⟩, he⟩ ⟨_, ⟨x', hc'⟩, he'⟩
     haveI : Nonempty s := ⟨x⟩
-    simp only [hc.symm, mem_singleton_iff, Subtype.val_eq_coe] at he
-    simp only [hc'.symm, mem_singleton_iff, Subtype.val_eq_coe] at he'
+    simp only [hc.symm, mem_singleton_iff, Subtype.val_eq_coe] at he 
+    simp only [hc'.symm, mem_singleton_iff, Subtype.val_eq_coe] at he' 
     rw [he, he']
     convert G.eq_on_source _
         (subtype_restr_symm_trans_subtype_restr s (chart_at H x) (chart_at H x'))
@@ -1181,7 +1181,7 @@ charts, belongs to `G`. We avoid the word diffeomorph as it is too related to th
 and use structomorph instead. -/
 @[nolint has_nonempty_instance]
 structure Structomorph (G : StructureGroupoid H) (M : Type _) (M' : Type _) [TopologicalSpace M]
-  [TopologicalSpace M'] [ChartedSpace H M] [ChartedSpace H M'] extends Homeomorph M M' where
+    [TopologicalSpace M'] [ChartedSpace H M] [ChartedSpace H M'] extends Homeomorph M M' where
   mem_groupoid :
     ∀ c : LocalHomeomorph M H,
       ∀ c' : LocalHomeomorph M' H,
@@ -1214,7 +1214,7 @@ def Structomorph.symm (e : Structomorph G M M') : Structomorph G M' M :=
       have : (c'.symm ≫ₕ e.to_homeomorph.to_local_homeomorph ≫ₕ c).symm ∈ G :=
         G.symm (e.mem_groupoid c' c hc' hc)
       rwa [trans_symm_eq_symm_trans_symm, trans_symm_eq_symm_trans_symm, symm_symm, trans_assoc] at
-        this }
+        this  }
 #align structomorph.symm Structomorph.symm
 -/
 
@@ -1246,7 +1246,7 @@ def Structomorph.trans (e : Structomorph G M M') (e' : Structomorph G M' M'') :
       have : x ∈ s := by
         constructor
         · simp only [trans_source, preimage_univ, inter_univ, Homeomorph.toLocalHomeomorph_source]
-          rw [trans_source] at hx
+          rw [trans_source] at hx 
           exact hx.1
         · exact hg₂
       refine' ⟨s, open_s, this, _⟩
Diff
@@ -118,7 +118,7 @@ composition of local equivs with `≫`.
 
 noncomputable section
 
-open Classical Topology
+open scoped Classical Topology
 
 open Filter
 
@@ -228,9 +228,11 @@ instance StructureGroupoid.partialOrder : PartialOrder (StructureGroupoid H) :=
 #align structure_groupoid.partial_order StructureGroupoid.partialOrder
 -/
 
+#print StructureGroupoid.le_iff /-
 theorem StructureGroupoid.le_iff {G₁ G₂ : StructureGroupoid H} : G₁ ≤ G₂ ↔ ∀ e, e ∈ G₁ → e ∈ G₂ :=
   Iff.rfl
 #align structure_groupoid.le_iff StructureGroupoid.le_iff
+-/
 
 #print idGroupoid /-
 /-- The trivial groupoid, containing only the identity (and maps with empty source, as this is
@@ -370,6 +372,7 @@ theorem mem_groupoid_of_pregroupoid {PG : Pregroupoid H} {e : LocalHomeomorph H
 #align mem_groupoid_of_pregroupoid mem_groupoid_of_pregroupoid
 -/
 
+#print groupoid_of_pregroupoid_le /-
 theorem groupoid_of_pregroupoid_le (PG₁ PG₂ : Pregroupoid H)
     (h : ∀ f s, PG₁.property f s → PG₂.property f s) : PG₁.groupoid ≤ PG₂.groupoid :=
   by
@@ -377,6 +380,7 @@ theorem groupoid_of_pregroupoid_le (PG₁ PG₂ : Pregroupoid H)
   rw [mem_groupoid_of_pregroupoid] at he⊢
   exact ⟨h _ _ he.1, h _ _ he.2⟩
 #align groupoid_of_pregroupoid_le groupoid_of_pregroupoid_le
+-/
 
 theorem mem_pregroupoid_of_eq_on_source (PG : Pregroupoid H) {e e' : LocalHomeomorph H H}
     (he' : e ≈ e') (he : PG.property e e.source) : PG.property e' e'.source :=
@@ -479,6 +483,7 @@ instance closedUnderRestriction_idRestrGroupoid : ClosedUnderRestriction (@idRes
 #align closed_under_restriction_id_restr_groupoid closedUnderRestriction_idRestrGroupoid
 -/
 
+#print closedUnderRestriction_iff_id_le /-
 /-- A groupoid is closed under restriction if and only if it contains the trivial restriction-closed
 groupoid. -/
 theorem closedUnderRestriction_iff_id_le (G : StructureGroupoid H) :
@@ -501,6 +506,7 @@ theorem closedUnderRestriction_iff_id_le (G : StructureGroupoid H) :
     apply structure_groupoid.le_iff.mp h
     exact idRestrGroupoid_mem hs
 #align closed_under_restriction_iff_id_le closedUnderRestriction_iff_id_le
+-/
 
 /-- The groupoid of all local homeomorphisms on a topological space `H` is closed under restriction.
 -/
Diff
@@ -215,12 +215,6 @@ theorem StructureGroupoid.locality (G : StructureGroupoid H) {e : LocalHomeomorp
 #align structure_groupoid.locality StructureGroupoid.locality
 -/
 
-/- warning: structure_groupoid.eq_on_source -> StructureGroupoid.eq_on_source is a dubious translation:
-lean 3 declaration is
-  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] (G : StructureGroupoid.{u1} H _inst_1) {e : LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1} {e' : LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1}, (Membership.Mem.{u1, u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.hasMem.{u1} H _inst_1) e G) -> (HasEquivₓ.Equiv.{succ u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (setoidHasEquiv.{succ u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (LocalHomeomorph.setoid.{u1, u1} H H _inst_1 _inst_1)) e' e) -> (Membership.Mem.{u1, u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.hasMem.{u1} H _inst_1) e' G)
-but is expected to have type
-  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] (G : StructureGroupoid.{u1} H _inst_1) {e : LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1} {e' : LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1}, (Membership.mem.{u1, u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (StructureGroupoid.{u1} H _inst_1) (instMembershipLocalHomeomorphStructureGroupoid.{u1} H _inst_1) e G) -> (HasEquiv.Equiv.{succ u1, 0} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (instHasEquiv.{succ u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (LocalHomeomorph.eqOnSourceSetoid.{u1, u1} H H _inst_1 _inst_1)) e' e) -> (Membership.mem.{u1, u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (StructureGroupoid.{u1} H _inst_1) (instMembershipLocalHomeomorphStructureGroupoid.{u1} H _inst_1) e' G)
-Case conversion may be inaccurate. Consider using '#align structure_groupoid.eq_on_source StructureGroupoid.eq_on_sourceₓ'. -/
 theorem StructureGroupoid.eq_on_source (G : StructureGroupoid H) {e e' : LocalHomeomorph H H}
     (he : e ∈ G) (h : e' ≈ e) : e' ∈ G :=
   G.eq_on_source' e e' he h
@@ -234,12 +228,6 @@ instance StructureGroupoid.partialOrder : PartialOrder (StructureGroupoid H) :=
 #align structure_groupoid.partial_order StructureGroupoid.partialOrder
 -/
 
-/- warning: structure_groupoid.le_iff -> StructureGroupoid.le_iff is a dubious translation:
-lean 3 declaration is
-  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] {G₁ : StructureGroupoid.{u1} H _inst_1} {G₂ : StructureGroupoid.{u1} H _inst_1}, Iff (LE.le.{u1} (StructureGroupoid.{u1} H _inst_1) (Preorder.toHasLe.{u1} (StructureGroupoid.{u1} H _inst_1) (PartialOrder.toPreorder.{u1} (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.partialOrder.{u1} H _inst_1))) G₁ G₂) (forall (e : LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1), (Membership.Mem.{u1, u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.hasMem.{u1} H _inst_1) e G₁) -> (Membership.Mem.{u1, u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.hasMem.{u1} H _inst_1) e G₂))
-but is expected to have type
-  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] {G₁ : StructureGroupoid.{u1} H _inst_1} {G₂ : StructureGroupoid.{u1} H _inst_1}, Iff (LE.le.{u1} (StructureGroupoid.{u1} H _inst_1) (Preorder.toLE.{u1} (StructureGroupoid.{u1} H _inst_1) (PartialOrder.toPreorder.{u1} (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.partialOrder.{u1} H _inst_1))) G₁ G₂) (forall (e : LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1), (Membership.mem.{u1, u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (StructureGroupoid.{u1} H _inst_1) (instMembershipLocalHomeomorphStructureGroupoid.{u1} H _inst_1) e G₁) -> (Membership.mem.{u1, u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (StructureGroupoid.{u1} H _inst_1) (instMembershipLocalHomeomorphStructureGroupoid.{u1} H _inst_1) e G₂))
-Case conversion may be inaccurate. Consider using '#align structure_groupoid.le_iff StructureGroupoid.le_iffₓ'. -/
 theorem StructureGroupoid.le_iff {G₁ G₂ : StructureGroupoid H} : G₁ ≤ G₂ ↔ ∀ e, e ∈ G₁ → e ∈ G₂ :=
   Iff.rfl
 #align structure_groupoid.le_iff StructureGroupoid.le_iff
@@ -382,12 +370,6 @@ theorem mem_groupoid_of_pregroupoid {PG : Pregroupoid H} {e : LocalHomeomorph H
 #align mem_groupoid_of_pregroupoid mem_groupoid_of_pregroupoid
 -/
 
-/- warning: groupoid_of_pregroupoid_le -> groupoid_of_pregroupoid_le is a dubious translation:
-lean 3 declaration is
-  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] (PG₁ : Pregroupoid.{u1} H _inst_1) (PG₂ : Pregroupoid.{u1} H _inst_1), (forall (f : H -> H) (s : Set.{u1} H), (Pregroupoid.Property.{u1} H _inst_1 PG₁ f s) -> (Pregroupoid.Property.{u1} H _inst_1 PG₂ f s)) -> (LE.le.{u1} (StructureGroupoid.{u1} H _inst_1) (Preorder.toHasLe.{u1} (StructureGroupoid.{u1} H _inst_1) (PartialOrder.toPreorder.{u1} (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.partialOrder.{u1} H _inst_1))) (Pregroupoid.groupoid.{u1} H _inst_1 PG₁) (Pregroupoid.groupoid.{u1} H _inst_1 PG₂))
-but is expected to have type
-  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] (PG₁ : Pregroupoid.{u1} H _inst_1) (PG₂ : Pregroupoid.{u1} H _inst_1), (forall (f : H -> H) (s : Set.{u1} H), (Pregroupoid.property.{u1} H _inst_1 PG₁ f s) -> (Pregroupoid.property.{u1} H _inst_1 PG₂ f s)) -> (LE.le.{u1} (StructureGroupoid.{u1} H _inst_1) (Preorder.toLE.{u1} (StructureGroupoid.{u1} H _inst_1) (PartialOrder.toPreorder.{u1} (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.partialOrder.{u1} H _inst_1))) (Pregroupoid.groupoid.{u1} H _inst_1 PG₁) (Pregroupoid.groupoid.{u1} H _inst_1 PG₂))
-Case conversion may be inaccurate. Consider using '#align groupoid_of_pregroupoid_le groupoid_of_pregroupoid_leₓ'. -/
 theorem groupoid_of_pregroupoid_le (PG₁ PG₂ : Pregroupoid H)
     (h : ∀ f s, PG₁.property f s → PG₂.property f s) : PG₁.groupoid ≤ PG₂.groupoid :=
   by
@@ -396,12 +378,6 @@ theorem groupoid_of_pregroupoid_le (PG₁ PG₂ : Pregroupoid H)
   exact ⟨h _ _ he.1, h _ _ he.2⟩
 #align groupoid_of_pregroupoid_le groupoid_of_pregroupoid_le
 
-/- warning: mem_pregroupoid_of_eq_on_source -> mem_pregroupoid_of_eq_on_source is a dubious translation:
-lean 3 declaration is
-  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] (PG : Pregroupoid.{u1} H _inst_1) {e : LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1} {e' : LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1}, (HasEquivₓ.Equiv.{succ u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (setoidHasEquiv.{succ u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (LocalHomeomorph.setoid.{u1, u1} H H _inst_1 _inst_1)) e e') -> (Pregroupoid.Property.{u1} H _inst_1 PG (coeFn.{succ u1, succ u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (fun (_x : LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) => H -> H) (LocalHomeomorph.hasCoeToFun.{u1, u1} H H _inst_1 _inst_1) e) (LocalEquiv.source.{u1, u1} H H (LocalHomeomorph.toLocalEquiv.{u1, u1} H H _inst_1 _inst_1 e))) -> (Pregroupoid.Property.{u1} H _inst_1 PG (coeFn.{succ u1, succ u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (fun (_x : LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) => H -> H) (LocalHomeomorph.hasCoeToFun.{u1, u1} H H _inst_1 _inst_1) e') (LocalEquiv.source.{u1, u1} H H (LocalHomeomorph.toLocalEquiv.{u1, u1} H H _inst_1 _inst_1 e')))
-but is expected to have type
-  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] (PG : Pregroupoid.{u1} H _inst_1) {e : LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1} {e' : LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1}, (HasEquiv.Equiv.{succ u1, 0} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (instHasEquiv.{succ u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (LocalHomeomorph.eqOnSourceSetoid.{u1, u1} H H _inst_1 _inst_1)) e e') -> (Pregroupoid.property.{u1} H _inst_1 PG (LocalHomeomorph.toFun'.{u1, u1} H H _inst_1 _inst_1 e) (LocalEquiv.source.{u1, u1} H H (LocalHomeomorph.toLocalEquiv.{u1, u1} H H _inst_1 _inst_1 e))) -> (Pregroupoid.property.{u1} H _inst_1 PG (LocalHomeomorph.toFun'.{u1, u1} H H _inst_1 _inst_1 e') (LocalEquiv.source.{u1, u1} H H (LocalHomeomorph.toLocalEquiv.{u1, u1} H H _inst_1 _inst_1 e')))
-Case conversion may be inaccurate. Consider using '#align mem_pregroupoid_of_eq_on_source mem_pregroupoid_of_eq_on_sourceₓ'. -/
 theorem mem_pregroupoid_of_eq_on_source (PG : Pregroupoid H) {e e' : LocalHomeomorph H H}
     (he' : e ≈ e') (he : PG.property e e.source) : PG.property e' e'.source :=
   by
@@ -503,12 +479,6 @@ instance closedUnderRestriction_idRestrGroupoid : ClosedUnderRestriction (@idRes
 #align closed_under_restriction_id_restr_groupoid closedUnderRestriction_idRestrGroupoid
 -/
 
-/- warning: closed_under_restriction_iff_id_le -> closedUnderRestriction_iff_id_le is a dubious translation:
-lean 3 declaration is
-  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] (G : StructureGroupoid.{u1} H _inst_1), Iff (ClosedUnderRestriction.{u1} H _inst_1 G) (LE.le.{u1} (StructureGroupoid.{u1} H _inst_1) (Preorder.toHasLe.{u1} (StructureGroupoid.{u1} H _inst_1) (PartialOrder.toPreorder.{u1} (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.partialOrder.{u1} H _inst_1))) (idRestrGroupoid.{u1} H _inst_1) G)
-but is expected to have type
-  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] (G : StructureGroupoid.{u1} H _inst_1), Iff (ClosedUnderRestriction.{u1} H _inst_1 G) (LE.le.{u1} (StructureGroupoid.{u1} H _inst_1) (Preorder.toLE.{u1} (StructureGroupoid.{u1} H _inst_1) (PartialOrder.toPreorder.{u1} (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.partialOrder.{u1} H _inst_1))) (idRestrGroupoid.{u1} H _inst_1) G)
-Case conversion may be inaccurate. Consider using '#align closed_under_restriction_iff_id_le closedUnderRestriction_iff_id_leₓ'. -/
 /-- A groupoid is closed under restriction if and only if it contains the trivial restriction-closed
 groupoid. -/
 theorem closedUnderRestriction_iff_id_le (G : StructureGroupoid H) :
@@ -602,32 +572,14 @@ section
 
 variable (H) [TopologicalSpace H] [TopologicalSpace M] [ChartedSpace H M]
 
-/- warning: mem_chart_target -> mem_chart_target is a dubious translation:
-lean 3 declaration is
-  forall (H : Type.{u1}) {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] (x : M), Membership.Mem.{u1, u1} H (Set.{u1} H) (Set.hasMem.{u1} H) (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (fun (_x : LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) => M -> H) (LocalHomeomorph.hasCoeToFun.{u2, u1} M H _inst_2 _inst_1) (ChartedSpace.chartAt.{u1, u2} H _inst_1 M _inst_2 _inst_3 x) x) (LocalEquiv.target.{u2, u1} M H (LocalHomeomorph.toLocalEquiv.{u2, u1} M H _inst_2 _inst_1 (ChartedSpace.chartAt.{u1, u2} H _inst_1 M _inst_2 _inst_3 x)))
-but is expected to have type
-  forall (H : Type.{u2}) {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] (x : M), Membership.mem.{u2, u2} H (Set.{u2} H) (Set.instMembershipSet.{u2} H) (LocalHomeomorph.toFun'.{u1, u2} M H _inst_2 _inst_1 (ChartedSpace.chartAt.{u2, u1} H _inst_1 M _inst_2 _inst_3 x) x) (LocalEquiv.target.{u1, u2} M H (LocalHomeomorph.toLocalEquiv.{u1, u2} M H _inst_2 _inst_1 (ChartedSpace.chartAt.{u2, u1} H _inst_1 M _inst_2 _inst_3 x)))
-Case conversion may be inaccurate. Consider using '#align mem_chart_target mem_chart_targetₓ'. -/
 theorem mem_chart_target (x : M) : chartAt H x x ∈ (chartAt H x).target :=
   (chartAt H x).map_source (mem_chart_source _ _)
 #align mem_chart_target mem_chart_target
 
-/- warning: chart_source_mem_nhds -> chart_source_mem_nhds is a dubious translation:
-lean 3 declaration is
-  forall (H : Type.{u1}) {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] (x : M), Membership.Mem.{u2, u2} (Set.{u2} M) (Filter.{u2} M) (Filter.hasMem.{u2} M) (LocalEquiv.source.{u2, u1} M H (LocalHomeomorph.toLocalEquiv.{u2, u1} M H _inst_2 _inst_1 (ChartedSpace.chartAt.{u1, u2} H _inst_1 M _inst_2 _inst_3 x))) (nhds.{u2} M _inst_2 x)
-but is expected to have type
-  forall (H : Type.{u2}) {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] (x : M), Membership.mem.{u1, u1} (Set.{u1} M) (Filter.{u1} M) (instMembershipSetFilter.{u1} M) (LocalEquiv.source.{u1, u2} M H (LocalHomeomorph.toLocalEquiv.{u1, u2} M H _inst_2 _inst_1 (ChartedSpace.chartAt.{u2, u1} H _inst_1 M _inst_2 _inst_3 x))) (nhds.{u1} M _inst_2 x)
-Case conversion may be inaccurate. Consider using '#align chart_source_mem_nhds chart_source_mem_nhdsₓ'. -/
 theorem chart_source_mem_nhds (x : M) : (chartAt H x).source ∈ 𝓝 x :=
   (chartAt H x).open_source.mem_nhds <| mem_chart_source H x
 #align chart_source_mem_nhds chart_source_mem_nhds
 
-/- warning: chart_target_mem_nhds -> chart_target_mem_nhds is a dubious translation:
-lean 3 declaration is
-  forall (H : Type.{u1}) {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] (x : M), Membership.Mem.{u1, u1} (Set.{u1} H) (Filter.{u1} H) (Filter.hasMem.{u1} H) (LocalEquiv.target.{u2, u1} M H (LocalHomeomorph.toLocalEquiv.{u2, u1} M H _inst_2 _inst_1 (ChartedSpace.chartAt.{u1, u2} H _inst_1 M _inst_2 _inst_3 x))) (nhds.{u1} H _inst_1 (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (fun (_x : LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) => M -> H) (LocalHomeomorph.hasCoeToFun.{u2, u1} M H _inst_2 _inst_1) (ChartedSpace.chartAt.{u1, u2} H _inst_1 M _inst_2 _inst_3 x) x))
-but is expected to have type
-  forall (H : Type.{u2}) {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] (x : M), Membership.mem.{u2, u2} (Set.{u2} H) (Filter.{u2} H) (instMembershipSetFilter.{u2} H) (LocalEquiv.target.{u1, u2} M H (LocalHomeomorph.toLocalEquiv.{u1, u2} M H _inst_2 _inst_1 (ChartedSpace.chartAt.{u2, u1} H _inst_1 M _inst_2 _inst_3 x))) (nhds.{u2} H _inst_1 (LocalHomeomorph.toFun'.{u1, u2} M H _inst_2 _inst_1 (ChartedSpace.chartAt.{u2, u1} H _inst_1 M _inst_2 _inst_3 x) x))
-Case conversion may be inaccurate. Consider using '#align chart_target_mem_nhds chart_target_mem_nhdsₓ'. -/
 theorem chart_target_mem_nhds (x : M) : (chartAt H x).target ∈ 𝓝 (chartAt H x x) :=
   (chartAt H x).open_target.mem_nhds <| mem_chart_target H x
 #align chart_target_mem_nhds chart_target_mem_nhds
@@ -640,56 +592,26 @@ def achart (x : M) : atlas H M :=
 #align achart achart
 -/
 
-/- warning: achart_def -> achart_def is a dubious translation:
-lean 3 declaration is
-  forall (H : Type.{u1}) {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] (x : M), Eq.{succ (max u2 u1)} (coeSort.{succ (max u2 u1), succ (succ (max u2 u1))} (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) Type.{max u2 u1} (Set.hasCoeToSort.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (ChartedSpace.atlas.{u1, u2} H _inst_1 M _inst_2 _inst_3)) (achart.{u1, u2} H M _inst_1 _inst_2 _inst_3 x) (Subtype.mk.{succ (max u2 u1)} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (fun (x : LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) => Membership.Mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (Set.hasMem.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) x (ChartedSpace.atlas.{u1, u2} H _inst_1 M _inst_2 _inst_3)) (ChartedSpace.chartAt.{u1, u2} H _inst_1 M _inst_2 _inst_3 x) (ChartedSpace.chart_mem_atlas.{u1, u2} H _inst_1 M _inst_2 _inst_3 x))
-but is expected to have type
-  forall (H : Type.{u2}) {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] (x : M), Eq.{max (succ u2) (succ u1)} (Set.Elem.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (ChartedSpace.atlas.{u2, u1} H _inst_1 M _inst_2 _inst_3)) (achart.{u2, u1} H M _inst_1 _inst_2 _inst_3 x) (Subtype.mk.{max (succ u2) (succ u1)} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (fun (x : LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) => Membership.mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) (Set.instMembershipSet.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) x (ChartedSpace.atlas.{u2, u1} H _inst_1 M _inst_2 _inst_3)) (ChartedSpace.chartAt.{u2, u1} H _inst_1 M _inst_2 _inst_3 x) (ChartedSpace.chart_mem_atlas.{u2, u1} H _inst_1 M _inst_2 _inst_3 x))
-Case conversion may be inaccurate. Consider using '#align achart_def achart_defₓ'. -/
 theorem achart_def (x : M) : achart H x = ⟨chartAt H x, chart_mem_atlas H x⟩ :=
   rfl
 #align achart_def achart_def
 
-/- warning: coe_achart -> coe_achart is a dubious translation:
-lean 3 declaration is
-  forall (H : Type.{u1}) {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] (x : M), Eq.{max (succ u2) (succ u1)} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) ((fun (a : Type.{max u2 u1}) (b : Sort.{max (succ u2) (succ u1)}) [self : HasLiftT.{succ (max u2 u1), max (succ u2) (succ u1)} a b] => self.0) (coeSort.{succ (max u2 u1), succ (succ (max u2 u1))} (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) Type.{max u2 u1} (Set.hasCoeToSort.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (ChartedSpace.atlas.{u1, u2} H _inst_1 M _inst_2 _inst_3)) (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (HasLiftT.mk.{succ (max u2 u1), max (succ u2) (succ u1)} (coeSort.{succ (max u2 u1), succ (succ (max u2 u1))} (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) Type.{max u2 u1} (Set.hasCoeToSort.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (ChartedSpace.atlas.{u1, u2} H _inst_1 M _inst_2 _inst_3)) (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (CoeTCₓ.coe.{succ (max u2 u1), max (succ u2) (succ u1)} (coeSort.{succ (max u2 u1), succ (succ (max u2 u1))} (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) Type.{max u2 u1} (Set.hasCoeToSort.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (ChartedSpace.atlas.{u1, u2} H _inst_1 M _inst_2 _inst_3)) (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (coeBase.{succ (max u2 u1), max (succ u2) (succ u1)} (coeSort.{succ (max u2 u1), succ (succ (max u2 u1))} (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) Type.{max u2 u1} (Set.hasCoeToSort.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (ChartedSpace.atlas.{u1, u2} H _inst_1 M _inst_2 _inst_3)) (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (coeSubtype.{max (succ u2) (succ u1)} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (fun (x : LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) => Membership.Mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (Set.hasMem.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) x (ChartedSpace.atlas.{u1, u2} H _inst_1 M _inst_2 _inst_3)))))) (achart.{u1, u2} H M _inst_1 _inst_2 _inst_3 x)) (ChartedSpace.chartAt.{u1, u2} H _inst_1 M _inst_2 _inst_3 x)
-but is expected to have type
-  forall (H : Type.{u2}) {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] (x : M), Eq.{max (succ u2) (succ u1)} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (Subtype.val.{succ (max u2 u1)} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (fun (x : LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) => Membership.mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) (Set.instMembershipSet.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) x (ChartedSpace.atlas.{u2, u1} H _inst_1 M _inst_2 _inst_3)) (achart.{u2, u1} H M _inst_1 _inst_2 _inst_3 x)) (ChartedSpace.chartAt.{u2, u1} H _inst_1 M _inst_2 _inst_3 x)
-Case conversion may be inaccurate. Consider using '#align coe_achart coe_achartₓ'. -/
 @[simp, mfld_simps]
 theorem coe_achart (x : M) : (achart H x : LocalHomeomorph M H) = chartAt H x :=
   rfl
 #align coe_achart coe_achart
 
-/- warning: achart_val -> achart_val is a dubious translation:
-lean 3 declaration is
-  forall (H : Type.{u1}) {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] (x : M), Eq.{max (succ u2) (succ u1)} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (Subtype.val.{succ (max u2 u1)} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (fun (x : LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) => Membership.Mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (Set.hasMem.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) x (ChartedSpace.atlas.{u1, u2} H _inst_1 M _inst_2 _inst_3)) (achart.{u1, u2} H M _inst_1 _inst_2 _inst_3 x)) (ChartedSpace.chartAt.{u1, u2} H _inst_1 M _inst_2 _inst_3 x)
-but is expected to have type
-  forall (H : Type.{u2}) {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] (x : M), Eq.{max (succ u2) (succ u1)} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (Subtype.val.{max (succ u2) (succ u1)} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (fun (x : LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) => Membership.mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) (Set.instMembershipSet.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) x (ChartedSpace.atlas.{u2, u1} H _inst_1 M _inst_2 _inst_3)) (achart.{u2, u1} H M _inst_1 _inst_2 _inst_3 x)) (ChartedSpace.chartAt.{u2, u1} H _inst_1 M _inst_2 _inst_3 x)
-Case conversion may be inaccurate. Consider using '#align achart_val achart_valₓ'. -/
 @[simp, mfld_simps]
 theorem achart_val (x : M) : (achart H x).1 = chartAt H x :=
   rfl
 #align achart_val achart_val
 
-/- warning: mem_achart_source -> mem_achart_source is a dubious translation:
-lean 3 declaration is
-  forall (H : Type.{u1}) {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] (x : M), Membership.Mem.{u2, u2} M (Set.{u2} M) (Set.hasMem.{u2} M) x (LocalEquiv.source.{u2, u1} M H (LocalHomeomorph.toLocalEquiv.{u2, u1} M H _inst_2 _inst_1 (Subtype.val.{succ (max u2 u1)} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (fun (x : LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) => Membership.Mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (Set.hasMem.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) x (ChartedSpace.atlas.{u1, u2} H _inst_1 M _inst_2 _inst_3)) (achart.{u1, u2} H M _inst_1 _inst_2 _inst_3 x))))
-but is expected to have type
-  forall (H : Type.{u2}) {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] (x : M), Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) x (LocalEquiv.source.{u1, u2} M H (LocalHomeomorph.toLocalEquiv.{u1, u2} M H _inst_2 _inst_1 (Subtype.val.{max (succ u2) (succ u1)} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (fun (x : LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) => Membership.mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) (Set.instMembershipSet.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) x (ChartedSpace.atlas.{u2, u1} H _inst_1 M _inst_2 _inst_3)) (achart.{u2, u1} H M _inst_1 _inst_2 _inst_3 x))))
-Case conversion may be inaccurate. Consider using '#align mem_achart_source mem_achart_sourceₓ'. -/
 theorem mem_achart_source (x : M) : x ∈ (achart H x).1.source :=
   mem_chart_source H x
 #align mem_achart_source mem_achart_source
 
 open TopologicalSpace
 
-/- warning: charted_space.second_countable_of_countable_cover -> ChartedSpace.secondCountable_of_countable_cover is a dubious translation:
-lean 3 declaration is
-  forall (H : Type.{u1}) {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] [_inst_4 : TopologicalSpace.SecondCountableTopology.{u1} H _inst_1] {s : Set.{u2} M}, (Eq.{succ u2} (Set.{u2} M) (Set.iUnion.{u2, succ u2} M M (fun (x : M) => Set.iUnion.{u2, 0} M (Membership.Mem.{u2, u2} M (Set.{u2} M) (Set.hasMem.{u2} M) x s) (fun (hx : Membership.Mem.{u2, u2} M (Set.{u2} M) (Set.hasMem.{u2} M) x s) => LocalEquiv.source.{u2, u1} M H (LocalHomeomorph.toLocalEquiv.{u2, u1} M H _inst_2 _inst_1 (ChartedSpace.chartAt.{u1, u2} H _inst_1 M _inst_2 _inst_3 x))))) (Set.univ.{u2} M)) -> (Set.Countable.{u2} M s) -> (TopologicalSpace.SecondCountableTopology.{u2} M _inst_2)
-but is expected to have type
-  forall (H : Type.{u2}) {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] [_inst_4 : TopologicalSpace.SecondCountableTopology.{u2} H _inst_1] {s : Set.{u1} M}, (Eq.{succ u1} (Set.{u1} M) (Set.iUnion.{u1, succ u1} M M (fun (x : M) => Set.iUnion.{u1, 0} M (Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) x s) (fun (hx : Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) x s) => LocalEquiv.source.{u1, u2} M H (LocalHomeomorph.toLocalEquiv.{u1, u2} M H _inst_2 _inst_1 (ChartedSpace.chartAt.{u2, u1} H _inst_1 M _inst_2 _inst_3 x))))) (Set.univ.{u1} M)) -> (Set.Countable.{u1} M s) -> (TopologicalSpace.SecondCountableTopology.{u1} M _inst_2)
-Case conversion may be inaccurate. Consider using '#align charted_space.second_countable_of_countable_cover ChartedSpace.secondCountable_of_countable_coverₓ'. -/
 theorem ChartedSpace.secondCountable_of_countable_cover [SecondCountableTopology H] {s : Set M}
     (hs : (⋃ (x) (hx : x ∈ s), (chartAt H x).source) = univ) (hsc : s.Countable) :
     SecondCountableTopology M :=
@@ -704,12 +626,6 @@ theorem ChartedSpace.secondCountable_of_countable_cover [SecondCountableTopology
 
 variable (M)
 
-/- warning: charted_space.second_countable_of_sigma_compact -> ChartedSpace.secondCountable_of_sigma_compact is a dubious translation:
-lean 3 declaration is
-  forall (H : Type.{u1}) (M : Type.{u2}) [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] [_inst_4 : TopologicalSpace.SecondCountableTopology.{u1} H _inst_1] [_inst_5 : SigmaCompactSpace.{u2} M _inst_2], TopologicalSpace.SecondCountableTopology.{u2} M _inst_2
-but is expected to have type
-  forall (H : Type.{u2}) (M : Type.{u1}) [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] [_inst_4 : TopologicalSpace.SecondCountableTopology.{u2} H _inst_1] [_inst_5 : SigmaCompactSpace.{u1} M _inst_2], TopologicalSpace.SecondCountableTopology.{u1} M _inst_2
-Case conversion may be inaccurate. Consider using '#align charted_space.second_countable_of_sigma_compact ChartedSpace.secondCountable_of_sigma_compactₓ'. -/
 theorem ChartedSpace.secondCountable_of_sigma_compact [SecondCountableTopology H]
     [SigmaCompactSpace M] : SecondCountableTopology M :=
   by
@@ -719,12 +635,6 @@ theorem ChartedSpace.secondCountable_of_sigma_compact [SecondCountableTopology H
   exact ChartedSpace.secondCountable_of_countable_cover H hsU hsc
 #align charted_space.second_countable_of_sigma_compact ChartedSpace.secondCountable_of_sigma_compact
 
-/- warning: charted_space.locally_compact -> ChartedSpace.locallyCompact is a dubious translation:
-lean 3 declaration is
-  forall (H : Type.{u1}) (M : Type.{u2}) [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] [_inst_4 : LocallyCompactSpace.{u1} H _inst_1], LocallyCompactSpace.{u2} M _inst_2
-but is expected to have type
-  forall (H : Type.{u2}) (M : Type.{u1}) [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] [_inst_4 : LocallyCompactSpace.{u2} H _inst_1], LocallyCompactSpace.{u1} M _inst_2
-Case conversion may be inaccurate. Consider using '#align charted_space.locally_compact ChartedSpace.locallyCompactₓ'. -/
 /-- If a topological space admits an atlas with locally compact charts, then the space itself
 is locally compact. -/
 theorem ChartedSpace.locallyCompact [LocallyCompactSpace H] : LocallyCompactSpace M :=
@@ -743,12 +653,6 @@ theorem ChartedSpace.locallyCompact [LocallyCompactSpace H] : LocallyCompactSpac
   exact h₂.image_of_continuous_on ((chart_at H x).continuousOn_symm.mono h₃)
 #align charted_space.locally_compact ChartedSpace.locallyCompact
 
-/- warning: charted_space.locally_connected_space -> ChartedSpace.locallyConnectedSpace is a dubious translation:
-lean 3 declaration is
-  forall (H : Type.{u1}) (M : Type.{u2}) [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] [_inst_4 : LocallyConnectedSpace.{u1} H _inst_1], LocallyConnectedSpace.{u2} M _inst_2
-but is expected to have type
-  forall (H : Type.{u2}) (M : Type.{u1}) [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] [_inst_4 : LocallyConnectedSpace.{u2} H _inst_1], LocallyConnectedSpace.{u1} M _inst_2
-Case conversion may be inaccurate. Consider using '#align charted_space.locally_connected_space ChartedSpace.locallyConnectedSpaceₓ'. -/
 /-- If a topological space admits an atlas with locally connected charts, then the space itself is
 locally connected. -/
 theorem ChartedSpace.locallyConnectedSpace [LocallyConnectedSpace H] : LocallyConnectedSpace M :=
@@ -827,12 +731,6 @@ instance (H : Type _) [TopologicalSpace H] (H' : Type _) [TopologicalSpace H'] :
     TopologicalSpace (ModelProd H H') :=
   Prod.topologicalSpace
 
-/- warning: model_prod_range_prod_id -> modelProd_range_prod_id is a dubious translation:
-lean 3 declaration is
-  forall {H : Type.{u1}} {H' : Type.{u2}} {α : Type.{u3}} (f : H -> α), Eq.{succ (max u3 u2)} (Set.{max u3 u2} (Prod.{u3, u2} α H')) (Set.range.{max u3 u2, max (succ u1) (succ u2)} (Prod.{u3, u2} α H') (ModelProd.{u1, u2} H H') (fun (p : ModelProd.{u1, u2} H H') => Prod.mk.{u3, u2} α H' (f (Prod.fst.{u1, u2} H H' p)) (Prod.snd.{u1, u2} H H' p))) (Set.prod.{u3, u2} α H' (Set.range.{u3, succ u1} α H f) (Set.univ.{u2} H'))
-but is expected to have type
-  forall {H : Type.{u3}} {H' : Type.{u2}} {α : Type.{u1}} (f : H -> α), Eq.{max (succ u2) (succ u1)} (Set.{max u2 u1} (Prod.{u1, u2} α H')) (Set.range.{max u2 u1, max (succ u3) (succ u2)} (Prod.{u1, u2} α H') (ModelProd.{u3, u2} H H') (fun (p : ModelProd.{u3, u2} H H') => Prod.mk.{u1, u2} α H' (f (Prod.fst.{u3, u2} H H' p)) (Prod.snd.{u3, u2} H H' p))) (Set.prod.{u1, u2} α H' (Set.range.{u1, succ u3} α H f) (Set.univ.{u2} H'))
-Case conversion may be inaccurate. Consider using '#align model_prod_range_prod_id modelProd_range_prod_idₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 -- Next lemma shows up often when dealing with derivatives, register it as simp.
 @[simp, mfld_simps]
@@ -858,12 +756,6 @@ instance [∀ i, TopologicalSpace (Hi i)] : TopologicalSpace (ModelPi Hi) :=
 
 end
 
-/- warning: prod_charted_space -> prodChartedSpace is a dubious translation:
-lean 3 declaration is
-  forall (H : Type.{u1}) [_inst_1 : TopologicalSpace.{u1} H] (M : Type.{u2}) [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] (H' : Type.{u3}) [_inst_4 : TopologicalSpace.{u3} H'] (M' : Type.{u4}) [_inst_5 : TopologicalSpace.{u4} M'] [_inst_6 : ChartedSpace.{u3, u4} H' _inst_4 M' _inst_5], ChartedSpace.{max u1 u3, max u2 u4} (ModelProd.{u1, u3} H H') (ModelProd.topologicalSpace.{u1, u3} H _inst_1 H' _inst_4) (Prod.{u2, u4} M M') (Prod.topologicalSpace.{u2, u4} M M' _inst_2 _inst_5)
-but is expected to have type
-  forall (H : Type.{u1}) [_inst_1 : TopologicalSpace.{u1} H] (M : Type.{u2}) [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] (H' : Type.{u3}) [_inst_4 : TopologicalSpace.{u3} H'] (M' : Type.{u4}) [_inst_5 : TopologicalSpace.{u4} M'] [_inst_6 : ChartedSpace.{u3, u4} H' _inst_4 M' _inst_5], ChartedSpace.{max u3 u1, max u4 u2} (ModelProd.{u1, u3} H H') (instTopologicalSpaceModelProd.{u1, u3} H _inst_1 H' _inst_4) (Prod.{u2, u4} M M') (instTopologicalSpaceProd.{u2, u4} M M' _inst_2 _inst_5)
-Case conversion may be inaccurate. Consider using '#align prod_charted_space prodChartedSpaceₓ'. -/
 /-- The product of two charted spaces is naturally a charted space, with the canonical
 construction of the atlas of product maps. -/
 instance prodChartedSpace (H : Type _) [TopologicalSpace H] (M : Type _) [TopologicalSpace M]
@@ -881,24 +773,12 @@ section prodChartedSpace
 variable [TopologicalSpace H] [TopologicalSpace M] [ChartedSpace H M] [TopologicalSpace H']
   [TopologicalSpace M'] [ChartedSpace H' M'] {x : M × M'}
 
-/- warning: prod_charted_space_chart_at -> prodChartedSpace_chartAt is a dubious translation:
-lean 3 declaration is
-  forall {H : Type.{u1}} {H' : Type.{u2}} {M : Type.{u3}} {M' : Type.{u4}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u3} M] [_inst_3 : ChartedSpace.{u1, u3} H _inst_1 M _inst_2] [_inst_4 : TopologicalSpace.{u2} H'] [_inst_5 : TopologicalSpace.{u4} M'] [_inst_6 : ChartedSpace.{u2, u4} H' _inst_4 M' _inst_5] {x : Prod.{u3, u4} M M'}, Eq.{max (succ (max u3 u4)) (succ (max u1 u2))} (LocalHomeomorph.{max u3 u4, max u1 u2} (Prod.{u3, u4} M M') (ModelProd.{u1, u2} H H') (Prod.topologicalSpace.{u3, u4} M M' _inst_2 _inst_5) (ModelProd.topologicalSpace.{u1, u2} H _inst_1 H' _inst_4)) (ChartedSpace.chartAt.{max u1 u2, max u3 u4} (ModelProd.{u1, u2} H H') (ModelProd.topologicalSpace.{u1, u2} H _inst_1 H' _inst_4) (Prod.{u3, u4} M M') (Prod.topologicalSpace.{u3, u4} M M' _inst_2 _inst_5) (prodChartedSpace.{u1, u3, u2, u4} H _inst_1 M _inst_2 _inst_3 H' _inst_4 M' _inst_5 _inst_6) x) (LocalHomeomorph.prod.{u3, u1, u4, u2} M H M' H' _inst_2 _inst_1 _inst_5 _inst_4 (ChartedSpace.chartAt.{u1, u3} H _inst_1 M _inst_2 _inst_3 (Prod.fst.{u3, u4} M M' x)) (ChartedSpace.chartAt.{u2, u4} H' _inst_4 M' _inst_5 _inst_6 (Prod.snd.{u3, u4} M M' x)))
-but is expected to have type
-  forall {H : Type.{u4}} {H' : Type.{u3}} {M : Type.{u2}} {M' : Type.{u1}} [_inst_1 : TopologicalSpace.{u4} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u4, u2} H _inst_1 M _inst_2] [_inst_4 : TopologicalSpace.{u3} H'] [_inst_5 : TopologicalSpace.{u1} M'] [_inst_6 : ChartedSpace.{u3, u1} H' _inst_4 M' _inst_5] {x : Prod.{u2, u1} M M'}, Eq.{max (max (max (succ u4) (succ u3)) (succ u2)) (succ u1)} (LocalHomeomorph.{max u2 u1, max u3 u4} (Prod.{u2, u1} M M') (ModelProd.{u4, u3} H H') (instTopologicalSpaceProd.{u2, u1} M M' _inst_2 _inst_5) (instTopologicalSpaceModelProd.{u4, u3} H _inst_1 H' _inst_4)) (ChartedSpace.chartAt.{max u3 u4, max u2 u1} (ModelProd.{u4, u3} H H') (instTopologicalSpaceModelProd.{u4, u3} H _inst_1 H' _inst_4) (Prod.{u2, u1} M M') (instTopologicalSpaceProd.{u2, u1} M M' _inst_2 _inst_5) (prodChartedSpace.{u4, u2, u3, u1} H _inst_1 M _inst_2 _inst_3 H' _inst_4 M' _inst_5 _inst_6) x) (LocalHomeomorph.prod.{u2, u4, u1, u3} M H M' H' _inst_2 _inst_1 _inst_5 _inst_4 (ChartedSpace.chartAt.{u4, u2} H _inst_1 M _inst_2 _inst_3 (Prod.fst.{u2, u1} M M' x)) (ChartedSpace.chartAt.{u3, u1} H' _inst_4 M' _inst_5 _inst_6 (Prod.snd.{u2, u1} M M' x)))
-Case conversion may be inaccurate. Consider using '#align prod_charted_space_chart_at prodChartedSpace_chartAtₓ'. -/
 @[simp, mfld_simps]
 theorem prodChartedSpace_chartAt :
     chartAt (ModelProd H H') x = (chartAt H x.fst).Prod (chartAt H' x.snd) :=
   rfl
 #align prod_charted_space_chart_at prodChartedSpace_chartAt
 
-/- warning: charted_space_self_prod -> chartedSpaceSelf_prod is a dubious translation:
-lean 3 declaration is
-  forall {H : Type.{u1}} {H' : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_4 : TopologicalSpace.{u2} H'], Eq.{succ (max u1 u2)} (ChartedSpace.{max u1 u2, max u1 u2} (ModelProd.{u1, u2} H H') (ModelProd.topologicalSpace.{u1, u2} H _inst_1 H' _inst_4) (Prod.{u1, u2} H H') (Prod.topologicalSpace.{u1, u2} H H' _inst_1 _inst_4)) (prodChartedSpace.{u1, u1, u2, u2} H _inst_1 H _inst_1 (chartedSpaceSelf.{u1} H _inst_1) H' _inst_4 H' _inst_4 (chartedSpaceSelf.{u2} H' _inst_4)) (chartedSpaceSelf.{max u1 u2} (Prod.{u1, u2} H H') (ModelProd.topologicalSpace.{u1, u2} H _inst_1 H' _inst_4))
-but is expected to have type
-  forall {H : Type.{u2}} {H' : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_4 : TopologicalSpace.{u1} H'], Eq.{max (succ u2) (succ u1)} (ChartedSpace.{max u1 u2, max u1 u2} (ModelProd.{u2, u1} H H') (instTopologicalSpaceModelProd.{u2, u1} H _inst_1 H' _inst_4) (Prod.{u2, u1} H H') (instTopologicalSpaceProd.{u2, u1} H H' _inst_1 _inst_4)) (prodChartedSpace.{u2, u2, u1, u1} H _inst_1 H _inst_1 (chartedSpaceSelf.{u2} H _inst_1) H' _inst_4 H' _inst_4 (chartedSpaceSelf.{u1} H' _inst_4)) (chartedSpaceSelf.{max u1 u2} (Prod.{u2, u1} H H') (instTopologicalSpaceProd.{u2, u1} H H' _inst_1 _inst_4))
-Case conversion may be inaccurate. Consider using '#align charted_space_self_prod chartedSpaceSelf_prodₓ'. -/
 theorem chartedSpaceSelf_prod : prodChartedSpace H H H' H' = chartedSpaceSelf (H × H') := by ext1;
   · simp [prodChartedSpace, atlas]; · ext1; simp [chartAt_self_eq]; rfl
 #align charted_space_self_prod chartedSpaceSelf_prod
@@ -919,12 +799,6 @@ instance piChartedSpace {ι : Type _} [Fintype ι] (H : ι → Type _) [∀ i, T
 #align pi_charted_space piChartedSpace
 -/
 
-/- warning: pi_charted_space_chart_at -> piChartedSpace_chartAt is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} [_inst_1 : Fintype.{u1} ι] (H : ι -> Type.{u2}) [_inst_2 : forall (i : ι), TopologicalSpace.{u2} (H i)] (M : ι -> Type.{u3}) [_inst_3 : forall (i : ι), TopologicalSpace.{u3} (M i)] [_inst_4 : forall (i : ι), ChartedSpace.{u2, u3} (H i) (_inst_2 i) (M i) (_inst_3 i)] (f : forall (i : ι), M i), Eq.{max (succ (max u1 u3)) (succ (max u1 u2))} (LocalHomeomorph.{max u1 u3, max u1 u2} (forall (i : ι), M i) (ModelPi.{u1, u2} ι H) (Pi.topologicalSpace.{u1, u3} ι (fun (i : ι) => M i) (fun (a : ι) => _inst_3 a)) (ModelPi.topologicalSpace.{u1, u2} ι H (fun (i : ι) => _inst_2 i))) (ChartedSpace.chartAt.{max u1 u2, max u1 u3} (ModelPi.{u1, u2} ι H) (ModelPi.topologicalSpace.{u1, u2} ι H (fun (i : ι) => _inst_2 i)) (forall (i : ι), M i) (Pi.topologicalSpace.{u1, u3} ι (fun (i : ι) => M i) (fun (a : ι) => _inst_3 a)) (piChartedSpace.{u1, u2, u3} ι _inst_1 H (fun (i : ι) => _inst_2 i) (fun (i : ι) => M i) (fun (a : ι) => _inst_3 a) (fun (i : ι) => _inst_4 i)) f) (LocalHomeomorph.pi.{u1, u3, u2} ι _inst_1 (fun (i : ι) => M i) (fun (i : ι) => H i) (fun (i : ι) => _inst_3 i) (fun (a : ι) => (fun (i : ι) => _inst_2 i) a) (fun (i : ι) => ChartedSpace.chartAt.{u2, u3} (H i) ((fun (i : ι) => _inst_2 i) i) (M i) (_inst_3 i) (_inst_4 i) (f i)))
-but is expected to have type
-  forall {ι : Type.{u3}} [_inst_1 : Fintype.{u3} ι] (H : ι -> Type.{u2}) [_inst_2 : forall (i : ι), TopologicalSpace.{u2} (H i)] (M : ι -> Type.{u1}) [_inst_3 : forall (i : ι), TopologicalSpace.{u1} (M i)] [_inst_4 : forall (i : ι), ChartedSpace.{u2, u1} (H i) (_inst_2 i) (M i) (_inst_3 i)] (f : forall (i : ι), M i), Eq.{max (max (succ u3) (succ u2)) (succ u1)} (LocalHomeomorph.{max u3 u1, max u2 u3} (forall (i : ι), M i) (ModelPi.{u3, u2} ι H) (Pi.topologicalSpace.{u3, u1} ι (fun (i : ι) => M i) (fun (a : ι) => _inst_3 a)) (instTopologicalSpaceModelPi.{u3, u2} ι H (fun (i : ι) => _inst_2 i))) (ChartedSpace.chartAt.{max u2 u3, max u3 u1} (ModelPi.{u3, u2} ι H) (instTopologicalSpaceModelPi.{u3, u2} ι H (fun (i : ι) => _inst_2 i)) (forall (i : ι), M i) (Pi.topologicalSpace.{u3, u1} ι (fun (i : ι) => M i) (fun (a : ι) => _inst_3 a)) (piChartedSpace.{u3, u2, u1} ι _inst_1 H (fun (i : ι) => _inst_2 i) (fun (i : ι) => M i) (fun (a : ι) => _inst_3 a) (fun (i : ι) => _inst_4 i)) f) (LocalHomeomorph.pi.{u3, u1, u2} ι _inst_1 (fun (i : ι) => M i) (fun (i : ι) => H i) (fun (i : ι) => _inst_3 i) (fun (a : ι) => (fun (i : ι) => _inst_2 i) a) (fun (i : ι) => ChartedSpace.chartAt.{u2, u1} (H i) ((fun (i : ι) => _inst_2 i) i) (M i) (_inst_3 i) (_inst_4 i) (f i)))
-Case conversion may be inaccurate. Consider using '#align pi_charted_space_chart_at piChartedSpace_chartAtₓ'. -/
 @[simp, mfld_simps]
 theorem piChartedSpace_chartAt {ι : Type _} [Fintype ι] (H : ι → Type _)
     [∀ i, TopologicalSpace (H i)] (M : ι → Type _) [∀ i, TopologicalSpace (M i)]
@@ -968,12 +842,6 @@ protected def toTopologicalSpace : TopologicalSpace M :=
 #align charted_space_core.to_topological_space ChartedSpaceCore.toTopologicalSpace
 -/
 
-/- warning: charted_space_core.open_source' -> ChartedSpaceCore.open_source' is a dubious translation:
-lean 3 declaration is
-  forall {H : Type.{u1}} {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] (c : ChartedSpaceCore.{u1, u2} H _inst_1 M) {e : LocalEquiv.{u2, u1} M H}, (Membership.Mem.{max u2 u1, max u2 u1} (LocalEquiv.{u2, u1} M H) (Set.{max u2 u1} (LocalEquiv.{u2, u1} M H)) (Set.hasMem.{max u2 u1} (LocalEquiv.{u2, u1} M H)) e (ChartedSpaceCore.atlas.{u1, u2} H _inst_1 M c)) -> (IsOpen.{u2} M (ChartedSpaceCore.toTopologicalSpace.{u1, u2} H M _inst_1 c) (LocalEquiv.source.{u2, u1} M H e))
-but is expected to have type
-  forall {H : Type.{u2}} {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] (c : ChartedSpaceCore.{u2, u1} H _inst_1 M) {e : LocalEquiv.{u1, u2} M H}, (Membership.mem.{max u2 u1, max u2 u1} (LocalEquiv.{u1, u2} M H) (Set.{max u2 u1} (LocalEquiv.{u1, u2} M H)) (Set.instMembershipSet.{max u2 u1} (LocalEquiv.{u1, u2} M H)) e (ChartedSpaceCore.atlas.{u2, u1} H _inst_1 M c)) -> (IsOpen.{u1} M (ChartedSpaceCore.toTopologicalSpace.{u2, u1} H M _inst_1 c) (LocalEquiv.source.{u1, u2} M H e))
-Case conversion may be inaccurate. Consider using '#align charted_space_core.open_source' ChartedSpaceCore.open_source'ₓ'. -/
 theorem open_source' (he : e ∈ c.atlas) : is_open[c.toTopologicalSpace] e.source :=
   by
   apply TopologicalSpace.GenerateOpen.basic
@@ -982,12 +850,6 @@ theorem open_source' (he : e ∈ c.atlas) : is_open[c.toTopologicalSpace] e.sour
   simp only [Set.univ_inter, Set.preimage_univ]
 #align charted_space_core.open_source' ChartedSpaceCore.open_source'
 
-/- warning: charted_space_core.open_target -> ChartedSpaceCore.open_target is a dubious translation:
-lean 3 declaration is
-  forall {H : Type.{u1}} {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] (c : ChartedSpaceCore.{u1, u2} H _inst_1 M) {e : LocalEquiv.{u2, u1} M H}, (Membership.Mem.{max u2 u1, max u2 u1} (LocalEquiv.{u2, u1} M H) (Set.{max u2 u1} (LocalEquiv.{u2, u1} M H)) (Set.hasMem.{max u2 u1} (LocalEquiv.{u2, u1} M H)) e (ChartedSpaceCore.atlas.{u1, u2} H _inst_1 M c)) -> (IsOpen.{u1} H _inst_1 (LocalEquiv.target.{u2, u1} M H e))
-but is expected to have type
-  forall {H : Type.{u2}} {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] (c : ChartedSpaceCore.{u2, u1} H _inst_1 M) {e : LocalEquiv.{u1, u2} M H}, (Membership.mem.{max u2 u1, max u2 u1} (LocalEquiv.{u1, u2} M H) (Set.{max u2 u1} (LocalEquiv.{u1, u2} M H)) (Set.instMembershipSet.{max u2 u1} (LocalEquiv.{u1, u2} M H)) e (ChartedSpaceCore.atlas.{u2, u1} H _inst_1 M c)) -> (IsOpen.{u2} H _inst_1 (LocalEquiv.target.{u1, u2} M H e))
-Case conversion may be inaccurate. Consider using '#align charted_space_core.open_target ChartedSpaceCore.open_targetₓ'. -/
 theorem open_target (he : e ∈ c.atlas) : IsOpen e.target :=
   by
   have E : e.target ∩ e.symm ⁻¹' e.source = e.target :=
@@ -1066,12 +928,6 @@ class HasGroupoid {H : Type _} [TopologicalSpace H] (M : Type _) [TopologicalSpa
 #align has_groupoid HasGroupoid
 -/
 
-/- warning: structure_groupoid.compatible -> StructureGroupoid.compatible is a dubious translation:
-lean 3 declaration is
-  forall {H : Type.{u1}} [_inst_4 : TopologicalSpace.{u1} H] (G : StructureGroupoid.{u1} H _inst_4) {M : Type.{u2}} [_inst_5 : TopologicalSpace.{u2} M] [_inst_6 : ChartedSpace.{u1, u2} H _inst_4 M _inst_5] [_inst_7 : HasGroupoid.{u1, u2} H _inst_4 M _inst_5 _inst_6 G] {e : LocalHomeomorph.{u2, u1} M H _inst_5 _inst_4} {e' : LocalHomeomorph.{u2, u1} M H _inst_5 _inst_4}, (Membership.Mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_5 _inst_4) (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_5 _inst_4)) (Set.hasMem.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_5 _inst_4)) e (ChartedSpace.atlas.{u1, u2} H _inst_4 M _inst_5 _inst_6)) -> (Membership.Mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_5 _inst_4) (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_5 _inst_4)) (Set.hasMem.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_5 _inst_4)) e' (ChartedSpace.atlas.{u1, u2} H _inst_4 M _inst_5 _inst_6)) -> (Membership.Mem.{u1, u1} (LocalHomeomorph.{u1, u1} H H _inst_4 _inst_4) (StructureGroupoid.{u1} H _inst_4) (StructureGroupoid.hasMem.{u1} H _inst_4) (LocalHomeomorph.trans.{u1, u2, u1} H M H _inst_4 _inst_5 _inst_4 (LocalHomeomorph.symm.{u2, u1} M H _inst_5 _inst_4 e) e') G)
-but is expected to have type
-  forall {H : Type.{u2}} [_inst_4 : TopologicalSpace.{u2} H] (G : StructureGroupoid.{u2} H _inst_4) {M : Type.{u1}} [_inst_5 : TopologicalSpace.{u1} M] [_inst_6 : ChartedSpace.{u2, u1} H _inst_4 M _inst_5] [_inst_7 : HasGroupoid.{u2, u1} H _inst_4 M _inst_5 _inst_6 G] {e : LocalHomeomorph.{u1, u2} M H _inst_5 _inst_4} {e' : LocalHomeomorph.{u1, u2} M H _inst_5 _inst_4}, (Membership.mem.{max u2 u1, max u1 u2} (LocalHomeomorph.{u1, u2} M H _inst_5 _inst_4) (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_5 _inst_4)) (Set.instMembershipSet.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_5 _inst_4)) e (ChartedSpace.atlas.{u2, u1} H _inst_4 M _inst_5 _inst_6)) -> (Membership.mem.{max u2 u1, max u1 u2} (LocalHomeomorph.{u1, u2} M H _inst_5 _inst_4) (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_5 _inst_4)) (Set.instMembershipSet.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_5 _inst_4)) e' (ChartedSpace.atlas.{u2, u1} H _inst_4 M _inst_5 _inst_6)) -> (Membership.mem.{u2, u2} (LocalHomeomorph.{u2, u2} H H _inst_4 _inst_4) (StructureGroupoid.{u2} H _inst_4) (instMembershipLocalHomeomorphStructureGroupoid.{u2} H _inst_4) (LocalHomeomorph.trans.{u2, u1, u2} H M H _inst_4 _inst_5 _inst_4 (LocalHomeomorph.symm.{u1, u2} M H _inst_5 _inst_4 e) e') G)
-Case conversion may be inaccurate. Consider using '#align structure_groupoid.compatible StructureGroupoid.compatibleₓ'. -/
 /-- Reformulate in the `structure_groupoid` namespace the compatibility condition of charts in a
 charted space admitting a structure groupoid, to make it more easily accessible with dot
 notation. -/
@@ -1081,23 +937,11 @@ theorem StructureGroupoid.compatible {H : Type _} [TopologicalSpace H] (G : Stru
   HasGroupoid.compatible G he he'
 #align structure_groupoid.compatible StructureGroupoid.compatible
 
-/- warning: has_groupoid_of_le -> hasGroupoid_of_le is a dubious translation:
-lean 3 declaration is
-  forall {H : Type.{u1}} {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] {G₁ : StructureGroupoid.{u1} H _inst_1} {G₂ : StructureGroupoid.{u1} H _inst_1}, (HasGroupoid.{u1, u2} H _inst_1 M _inst_2 _inst_3 G₁) -> (LE.le.{u1} (StructureGroupoid.{u1} H _inst_1) (Preorder.toHasLe.{u1} (StructureGroupoid.{u1} H _inst_1) (PartialOrder.toPreorder.{u1} (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.partialOrder.{u1} H _inst_1))) G₁ G₂) -> (HasGroupoid.{u1, u2} H _inst_1 M _inst_2 _inst_3 G₂)
-but is expected to have type
-  forall {H : Type.{u2}} {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] {G₁ : StructureGroupoid.{u2} H _inst_1} {G₂ : StructureGroupoid.{u2} H _inst_1}, (HasGroupoid.{u2, u1} H _inst_1 M _inst_2 _inst_3 G₁) -> (LE.le.{u2} (StructureGroupoid.{u2} H _inst_1) (Preorder.toLE.{u2} (StructureGroupoid.{u2} H _inst_1) (PartialOrder.toPreorder.{u2} (StructureGroupoid.{u2} H _inst_1) (StructureGroupoid.partialOrder.{u2} H _inst_1))) G₁ G₂) -> (HasGroupoid.{u2, u1} H _inst_1 M _inst_2 _inst_3 G₂)
-Case conversion may be inaccurate. Consider using '#align has_groupoid_of_le hasGroupoid_of_leₓ'. -/
 theorem hasGroupoid_of_le {G₁ G₂ : StructureGroupoid H} (h : HasGroupoid M G₁) (hle : G₁ ≤ G₂) :
     HasGroupoid M G₂ :=
   ⟨fun e e' he he' => hle (h.compatible he he')⟩
 #align has_groupoid_of_le hasGroupoid_of_le
 
-/- warning: has_groupoid_of_pregroupoid -> hasGroupoid_of_pregroupoid is a dubious translation:
-lean 3 declaration is
-  forall {H : Type.{u1}} {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] (PG : Pregroupoid.{u1} H _inst_1), (forall {e : LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1} {e' : LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1}, (Membership.Mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (Set.hasMem.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) e (ChartedSpace.atlas.{u1, u2} H _inst_1 M _inst_2 _inst_3)) -> (Membership.Mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (Set.hasMem.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) e' (ChartedSpace.atlas.{u1, u2} H _inst_1 M _inst_2 _inst_3)) -> (Pregroupoid.Property.{u1} H _inst_1 PG (coeFn.{succ u1, succ u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (fun (_x : LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) => H -> H) (LocalHomeomorph.hasCoeToFun.{u1, u1} H H _inst_1 _inst_1) (LocalHomeomorph.trans.{u1, u2, u1} H M H _inst_1 _inst_2 _inst_1 (LocalHomeomorph.symm.{u2, u1} M H _inst_2 _inst_1 e) e')) (LocalEquiv.source.{u1, u1} H H (LocalHomeomorph.toLocalEquiv.{u1, u1} H H _inst_1 _inst_1 (LocalHomeomorph.trans.{u1, u2, u1} H M H _inst_1 _inst_2 _inst_1 (LocalHomeomorph.symm.{u2, u1} M H _inst_2 _inst_1 e) e'))))) -> (HasGroupoid.{u1, u2} H _inst_1 M _inst_2 _inst_3 (Pregroupoid.groupoid.{u1} H _inst_1 PG))
-but is expected to have type
-  forall {H : Type.{u2}} {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] (PG : Pregroupoid.{u2} H _inst_1), (forall {e : LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1} {e' : LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1}, (Membership.mem.{max u2 u1, max u1 u2} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) (Set.instMembershipSet.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) e (ChartedSpace.atlas.{u2, u1} H _inst_1 M _inst_2 _inst_3)) -> (Membership.mem.{max u2 u1, max u1 u2} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) (Set.instMembershipSet.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) e' (ChartedSpace.atlas.{u2, u1} H _inst_1 M _inst_2 _inst_3)) -> (Pregroupoid.property.{u2} H _inst_1 PG (LocalHomeomorph.toFun'.{u2, u2} H H _inst_1 _inst_1 (LocalHomeomorph.trans.{u2, u1, u2} H M H _inst_1 _inst_2 _inst_1 (LocalHomeomorph.symm.{u1, u2} M H _inst_2 _inst_1 e) e')) (LocalEquiv.source.{u2, u2} H H (LocalHomeomorph.toLocalEquiv.{u2, u2} H H _inst_1 _inst_1 (LocalHomeomorph.trans.{u2, u1, u2} H M H _inst_1 _inst_2 _inst_1 (LocalHomeomorph.symm.{u1, u2} M H _inst_2 _inst_1 e) e'))))) -> (HasGroupoid.{u2, u1} H _inst_1 M _inst_2 _inst_3 (Pregroupoid.groupoid.{u2} H _inst_1 PG))
-Case conversion may be inaccurate. Consider using '#align has_groupoid_of_pregroupoid hasGroupoid_of_pregroupoidₓ'. -/
 theorem hasGroupoid_of_pregroupoid (PG : Pregroupoid H)
     (h :
       ∀ {e e' : LocalHomeomorph M H},
@@ -1144,23 +988,11 @@ def StructureGroupoid.maximalAtlas : Set (LocalHomeomorph M H) :=
 
 variable {M}
 
-/- warning: structure_groupoid.subset_maximal_atlas -> StructureGroupoid.subset_maximalAtlas is a dubious translation:
-lean 3 declaration is
-  forall {H : Type.{u1}} {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] (G : StructureGroupoid.{u1} H _inst_1) [_inst_4 : HasGroupoid.{u1, u2} H _inst_1 M _inst_2 _inst_3 G], HasSubset.Subset.{max u2 u1} (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (Set.hasSubset.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (ChartedSpace.atlas.{u1, u2} H _inst_1 M _inst_2 _inst_3) (StructureGroupoid.maximalAtlas.{u1, u2} H M _inst_1 _inst_2 _inst_3 G)
-but is expected to have type
-  forall {H : Type.{u2}} {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] (G : StructureGroupoid.{u2} H _inst_1) [_inst_4 : HasGroupoid.{u2, u1} H _inst_1 M _inst_2 _inst_3 G], HasSubset.Subset.{max u1 u2} (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) (Set.instHasSubsetSet.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) (ChartedSpace.atlas.{u2, u1} H _inst_1 M _inst_2 _inst_3) (StructureGroupoid.maximalAtlas.{u2, u1} H M _inst_1 _inst_2 _inst_3 G)
-Case conversion may be inaccurate. Consider using '#align structure_groupoid.subset_maximal_atlas StructureGroupoid.subset_maximalAtlasₓ'. -/
 /-- The elements of the atlas belong to the maximal atlas for any structure groupoid -/
 theorem StructureGroupoid.subset_maximalAtlas [HasGroupoid M G] : atlas H M ⊆ G.maximalAtlas M :=
   fun e he e' he' => ⟨G.compatible he he', G.compatible he' he⟩
 #align structure_groupoid.subset_maximal_atlas StructureGroupoid.subset_maximalAtlas
 
-/- warning: structure_groupoid.chart_mem_maximal_atlas -> StructureGroupoid.chart_mem_maximalAtlas is a dubious translation:
-lean 3 declaration is
-  forall {H : Type.{u1}} {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] (G : StructureGroupoid.{u1} H _inst_1) [_inst_4 : HasGroupoid.{u1, u2} H _inst_1 M _inst_2 _inst_3 G] (x : M), Membership.Mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (Set.hasMem.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (ChartedSpace.chartAt.{u1, u2} H _inst_1 M _inst_2 _inst_3 x) (StructureGroupoid.maximalAtlas.{u1, u2} H M _inst_1 _inst_2 _inst_3 G)
-but is expected to have type
-  forall {H : Type.{u2}} {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] (G : StructureGroupoid.{u2} H _inst_1) [_inst_4 : HasGroupoid.{u2, u1} H _inst_1 M _inst_2 _inst_3 G] (x : M), Membership.mem.{max u1 u2, max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) (Set.instMembershipSet.{max u1 u2} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) (ChartedSpace.chartAt.{u2, u1} H _inst_1 M _inst_2 _inst_3 x) (StructureGroupoid.maximalAtlas.{u2, u1} H M _inst_1 _inst_2 _inst_3 G)
-Case conversion may be inaccurate. Consider using '#align structure_groupoid.chart_mem_maximal_atlas StructureGroupoid.chart_mem_maximalAtlasₓ'. -/
 theorem StructureGroupoid.chart_mem_maximalAtlas [HasGroupoid M G] (x : M) :
     chartAt H x ∈ G.maximalAtlas M :=
   G.subset_maximalAtlas (chart_mem_atlas H x)
@@ -1168,23 +1000,11 @@ theorem StructureGroupoid.chart_mem_maximalAtlas [HasGroupoid M G] (x : M) :
 
 variable {G}
 
-/- warning: mem_maximal_atlas_iff -> mem_maximalAtlas_iff is a dubious translation:
-lean 3 declaration is
-  forall {H : Type.{u1}} {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] {G : StructureGroupoid.{u1} H _inst_1} {e : LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1}, Iff (Membership.Mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (Set.hasMem.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) e (StructureGroupoid.maximalAtlas.{u1, u2} H M _inst_1 _inst_2 _inst_3 G)) (forall (e' : LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1), (Membership.Mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (Set.hasMem.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) e' (ChartedSpace.atlas.{u1, u2} H _inst_1 M _inst_2 _inst_3)) -> (And (Membership.Mem.{u1, u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.hasMem.{u1} H _inst_1) (LocalHomeomorph.trans.{u1, u2, u1} H M H _inst_1 _inst_2 _inst_1 (LocalHomeomorph.symm.{u2, u1} M H _inst_2 _inst_1 e) e') G) (Membership.Mem.{u1, u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.hasMem.{u1} H _inst_1) (LocalHomeomorph.trans.{u1, u2, u1} H M H _inst_1 _inst_2 _inst_1 (LocalHomeomorph.symm.{u2, u1} M H _inst_2 _inst_1 e') e) G)))
-but is expected to have type
-  forall {H : Type.{u2}} {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] {G : StructureGroupoid.{u2} H _inst_1} {e : LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1}, Iff (Membership.mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) (Set.instMembershipSet.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) e (StructureGroupoid.maximalAtlas.{u2, u1} H M _inst_1 _inst_2 _inst_3 G)) (forall (e' : LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1), (Membership.mem.{max u1 u2, max u1 u2} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) (Set.instMembershipSet.{max u1 u2} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) e' (ChartedSpace.atlas.{u2, u1} H _inst_1 M _inst_2 _inst_3)) -> (And (Membership.mem.{u2, u2} (LocalHomeomorph.{u2, u2} H H _inst_1 _inst_1) (StructureGroupoid.{u2} H _inst_1) (instMembershipLocalHomeomorphStructureGroupoid.{u2} H _inst_1) (LocalHomeomorph.trans.{u2, u1, u2} H M H _inst_1 _inst_2 _inst_1 (LocalHomeomorph.symm.{u1, u2} M H _inst_2 _inst_1 e) e') G) (Membership.mem.{u2, u2} (LocalHomeomorph.{u2, u2} H H _inst_1 _inst_1) (StructureGroupoid.{u2} H _inst_1) (instMembershipLocalHomeomorphStructureGroupoid.{u2} H _inst_1) (LocalHomeomorph.trans.{u2, u1, u2} H M H _inst_1 _inst_2 _inst_1 (LocalHomeomorph.symm.{u1, u2} M H _inst_2 _inst_1 e') e) G)))
-Case conversion may be inaccurate. Consider using '#align mem_maximal_atlas_iff mem_maximalAtlas_iffₓ'. -/
 theorem mem_maximalAtlas_iff {e : LocalHomeomorph M H} :
     e ∈ G.maximalAtlas M ↔ ∀ e' ∈ atlas H M, e.symm ≫ₕ e' ∈ G ∧ e'.symm ≫ₕ e ∈ G :=
   Iff.rfl
 #align mem_maximal_atlas_iff mem_maximalAtlas_iff
 
-/- warning: structure_groupoid.compatible_of_mem_maximal_atlas -> StructureGroupoid.compatible_of_mem_maximalAtlas is a dubious translation:
-lean 3 declaration is
-  forall {H : Type.{u1}} {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] {G : StructureGroupoid.{u1} H _inst_1} {e : LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1} {e' : LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1}, (Membership.Mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (Set.hasMem.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) e (StructureGroupoid.maximalAtlas.{u1, u2} H M _inst_1 _inst_2 _inst_3 G)) -> (Membership.Mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (Set.hasMem.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) e' (StructureGroupoid.maximalAtlas.{u1, u2} H M _inst_1 _inst_2 _inst_3 G)) -> (Membership.Mem.{u1, u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.hasMem.{u1} H _inst_1) (LocalHomeomorph.trans.{u1, u2, u1} H M H _inst_1 _inst_2 _inst_1 (LocalHomeomorph.symm.{u2, u1} M H _inst_2 _inst_1 e) e') G)
-but is expected to have type
-  forall {H : Type.{u2}} {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] {G : StructureGroupoid.{u2} H _inst_1} {e : LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1} {e' : LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1}, (Membership.mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) (Set.instMembershipSet.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) e (StructureGroupoid.maximalAtlas.{u2, u1} H M _inst_1 _inst_2 _inst_3 G)) -> (Membership.mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) (Set.instMembershipSet.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) e' (StructureGroupoid.maximalAtlas.{u2, u1} H M _inst_1 _inst_2 _inst_3 G)) -> (Membership.mem.{u2, u2} (LocalHomeomorph.{u2, u2} H H _inst_1 _inst_1) (StructureGroupoid.{u2} H _inst_1) (instMembershipLocalHomeomorphStructureGroupoid.{u2} H _inst_1) (LocalHomeomorph.trans.{u2, u1, u2} H M H _inst_1 _inst_2 _inst_1 (LocalHomeomorph.symm.{u1, u2} M H _inst_2 _inst_1 e) e') G)
-Case conversion may be inaccurate. Consider using '#align structure_groupoid.compatible_of_mem_maximal_atlas StructureGroupoid.compatible_of_mem_maximalAtlasₓ'. -/
 /-- Changing coordinates between two elements of the maximal atlas gives rise to an element
 of the structure groupoid. -/
 theorem StructureGroupoid.compatible_of_mem_maximalAtlas {e e' : LocalHomeomorph M H}
@@ -1254,46 +1074,22 @@ def singletonChartedSpace (h : e.source = Set.univ) : ChartedSpace H α
 #align local_homeomorph.singleton_charted_space LocalHomeomorph.singletonChartedSpace
 -/
 
-/- warning: local_homeomorph.singleton_charted_space_chart_at_eq -> LocalHomeomorph.singletonChartedSpace_chartAt_eq is a dubious translation:
-lean 3 declaration is
-  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] {α : Type.{u2}} [_inst_4 : TopologicalSpace.{u2} α] (e : LocalHomeomorph.{u2, u1} α H _inst_4 _inst_1) (h : Eq.{succ u2} (Set.{u2} α) (LocalEquiv.source.{u2, u1} α H (LocalHomeomorph.toLocalEquiv.{u2, u1} α H _inst_4 _inst_1 e)) (Set.univ.{u2} α)) {x : α}, Eq.{max (succ u2) (succ u1)} (LocalHomeomorph.{u2, u1} α H _inst_4 _inst_1) (ChartedSpace.chartAt.{u1, u2} H _inst_1 α _inst_4 (LocalHomeomorph.singletonChartedSpace.{u1, u2} H _inst_1 α _inst_4 e h) x) e
-but is expected to have type
-  forall {H : Type.{u2}} [_inst_1 : TopologicalSpace.{u2} H] {α : Type.{u1}} [_inst_4 : TopologicalSpace.{u1} α] (e : LocalHomeomorph.{u1, u2} α H _inst_4 _inst_1) (h : Eq.{succ u1} (Set.{u1} α) (LocalEquiv.source.{u1, u2} α H (LocalHomeomorph.toLocalEquiv.{u1, u2} α H _inst_4 _inst_1 e)) (Set.univ.{u1} α)) {x : α}, Eq.{max (succ u2) (succ u1)} (LocalHomeomorph.{u1, u2} α H _inst_4 _inst_1) (ChartedSpace.chartAt.{u2, u1} H _inst_1 α _inst_4 (LocalHomeomorph.singletonChartedSpace.{u2, u1} H _inst_1 α _inst_4 e h) x) e
-Case conversion may be inaccurate. Consider using '#align local_homeomorph.singleton_charted_space_chart_at_eq LocalHomeomorph.singletonChartedSpace_chartAt_eqₓ'. -/
 @[simp, mfld_simps]
 theorem singletonChartedSpace_chartAt_eq (h : e.source = Set.univ) {x : α} :
     @chartAt H _ α _ (e.singletonChartedSpace h) x = e :=
   rfl
 #align local_homeomorph.singleton_charted_space_chart_at_eq LocalHomeomorph.singletonChartedSpace_chartAt_eq
 
-/- warning: local_homeomorph.singleton_charted_space_chart_at_source -> LocalHomeomorph.singletonChartedSpace_chartAt_source is a dubious translation:
-lean 3 declaration is
-  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] {α : Type.{u2}} [_inst_4 : TopologicalSpace.{u2} α] (e : LocalHomeomorph.{u2, u1} α H _inst_4 _inst_1) (h : Eq.{succ u2} (Set.{u2} α) (LocalEquiv.source.{u2, u1} α H (LocalHomeomorph.toLocalEquiv.{u2, u1} α H _inst_4 _inst_1 e)) (Set.univ.{u2} α)) {x : α}, Eq.{succ u2} (Set.{u2} α) (LocalEquiv.source.{u2, u1} α H (LocalHomeomorph.toLocalEquiv.{u2, u1} α H _inst_4 _inst_1 (ChartedSpace.chartAt.{u1, u2} H _inst_1 α _inst_4 (LocalHomeomorph.singletonChartedSpace.{u1, u2} H _inst_1 α _inst_4 e h) x))) (Set.univ.{u2} α)
-but is expected to have type
-  forall {H : Type.{u2}} [_inst_1 : TopologicalSpace.{u2} H] {α : Type.{u1}} [_inst_4 : TopologicalSpace.{u1} α] (e : LocalHomeomorph.{u1, u2} α H _inst_4 _inst_1) (h : Eq.{succ u1} (Set.{u1} α) (LocalEquiv.source.{u1, u2} α H (LocalHomeomorph.toLocalEquiv.{u1, u2} α H _inst_4 _inst_1 e)) (Set.univ.{u1} α)) {x : α}, Eq.{succ u1} (Set.{u1} α) (LocalEquiv.source.{u1, u2} α H (LocalHomeomorph.toLocalEquiv.{u1, u2} α H _inst_4 _inst_1 (ChartedSpace.chartAt.{u2, u1} H _inst_1 α _inst_4 (LocalHomeomorph.singletonChartedSpace.{u2, u1} H _inst_1 α _inst_4 e h) x))) (Set.univ.{u1} α)
-Case conversion may be inaccurate. Consider using '#align local_homeomorph.singleton_charted_space_chart_at_source LocalHomeomorph.singletonChartedSpace_chartAt_sourceₓ'. -/
 theorem singletonChartedSpace_chartAt_source (h : e.source = Set.univ) {x : α} :
     (@chartAt H _ α _ (e.singletonChartedSpace h) x).source = Set.univ :=
   h
 #align local_homeomorph.singleton_charted_space_chart_at_source LocalHomeomorph.singletonChartedSpace_chartAt_source
 
-/- warning: local_homeomorph.singleton_charted_space_mem_atlas_eq -> LocalHomeomorph.singletonChartedSpace_mem_atlas_eq is a dubious translation:
-lean 3 declaration is
-  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] {α : Type.{u2}} [_inst_4 : TopologicalSpace.{u2} α] (e : LocalHomeomorph.{u2, u1} α H _inst_4 _inst_1) (h : Eq.{succ u2} (Set.{u2} α) (LocalEquiv.source.{u2, u1} α H (LocalHomeomorph.toLocalEquiv.{u2, u1} α H _inst_4 _inst_1 e)) (Set.univ.{u2} α)) (e' : LocalHomeomorph.{u2, u1} α H _inst_4 _inst_1), (Membership.Mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u2, u1} α H _inst_4 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} α H _inst_4 _inst_1)) (Set.hasMem.{max u2 u1} (LocalHomeomorph.{u2, u1} α H _inst_4 _inst_1)) e' (ChartedSpace.atlas.{u1, u2} H _inst_1 α _inst_4 (LocalHomeomorph.singletonChartedSpace.{u1, u2} H _inst_1 α _inst_4 e h))) -> (Eq.{max (succ u2) (succ u1)} (LocalHomeomorph.{u2, u1} α H _inst_4 _inst_1) e' e)
-but is expected to have type
-  forall {H : Type.{u2}} [_inst_1 : TopologicalSpace.{u2} H] {α : Type.{u1}} [_inst_4 : TopologicalSpace.{u1} α] (e : LocalHomeomorph.{u1, u2} α H _inst_4 _inst_1) (h : Eq.{succ u1} (Set.{u1} α) (LocalEquiv.source.{u1, u2} α H (LocalHomeomorph.toLocalEquiv.{u1, u2} α H _inst_4 _inst_1 e)) (Set.univ.{u1} α)) (e' : LocalHomeomorph.{u1, u2} α H _inst_4 _inst_1), (Membership.mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u1, u2} α H _inst_4 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} α H _inst_4 _inst_1)) (Set.instMembershipSet.{max u2 u1} (LocalHomeomorph.{u1, u2} α H _inst_4 _inst_1)) e' (ChartedSpace.atlas.{u2, u1} H _inst_1 α _inst_4 (LocalHomeomorph.singletonChartedSpace.{u2, u1} H _inst_1 α _inst_4 e h))) -> (Eq.{max (succ u2) (succ u1)} (LocalHomeomorph.{u1, u2} α H _inst_4 _inst_1) e' e)
-Case conversion may be inaccurate. Consider using '#align local_homeomorph.singleton_charted_space_mem_atlas_eq LocalHomeomorph.singletonChartedSpace_mem_atlas_eqₓ'. -/
 theorem singletonChartedSpace_mem_atlas_eq (h : e.source = Set.univ) (e' : LocalHomeomorph α H)
     (h' : e' ∈ (e.singletonChartedSpace h).atlas) : e' = e :=
   h'
 #align local_homeomorph.singleton_charted_space_mem_atlas_eq LocalHomeomorph.singletonChartedSpace_mem_atlas_eq
 
-/- warning: local_homeomorph.singleton_has_groupoid -> LocalHomeomorph.singleton_hasGroupoid is a dubious translation:
-lean 3 declaration is
-  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] {α : Type.{u2}} [_inst_4 : TopologicalSpace.{u2} α] (e : LocalHomeomorph.{u2, u1} α H _inst_4 _inst_1) (h : Eq.{succ u2} (Set.{u2} α) (LocalEquiv.source.{u2, u1} α H (LocalHomeomorph.toLocalEquiv.{u2, u1} α H _inst_4 _inst_1 e)) (Set.univ.{u2} α)) (G : StructureGroupoid.{u1} H _inst_1) [_inst_5 : ClosedUnderRestriction.{u1} H _inst_1 G], HasGroupoid.{u1, u2} H _inst_1 α _inst_4 (LocalHomeomorph.singletonChartedSpace.{u1, u2} H _inst_1 α _inst_4 e h) G
-but is expected to have type
-  forall {H : Type.{u2}} [_inst_1 : TopologicalSpace.{u2} H] {α : Type.{u1}} [_inst_4 : TopologicalSpace.{u1} α] (e : LocalHomeomorph.{u1, u2} α H _inst_4 _inst_1) (h : Eq.{succ u1} (Set.{u1} α) (LocalEquiv.source.{u1, u2} α H (LocalHomeomorph.toLocalEquiv.{u1, u2} α H _inst_4 _inst_1 e)) (Set.univ.{u1} α)) (G : StructureGroupoid.{u2} H _inst_1) [_inst_5 : ClosedUnderRestriction.{u2} H _inst_1 G], HasGroupoid.{u2, u1} H _inst_1 α _inst_4 (LocalHomeomorph.singletonChartedSpace.{u2, u1} H _inst_1 α _inst_4 e h) G
-Case conversion may be inaccurate. Consider using '#align local_homeomorph.singleton_has_groupoid LocalHomeomorph.singleton_hasGroupoidₓ'. -/
 /-- Given a local homeomorphism `e` from a space `α` into `H`, if its source covers the whole
 space `α`, then the induced charted space structure on `α` is `has_groupoid G` for any structure
 groupoid `G` which is closed under restrictions. -/
@@ -1323,23 +1119,11 @@ def singletonChartedSpace {f : α → H} (h : OpenEmbedding f) : ChartedSpace H
 #align open_embedding.singleton_charted_space OpenEmbedding.singletonChartedSpace
 -/
 
-/- warning: open_embedding.singleton_charted_space_chart_at_eq -> OpenEmbedding.singletonChartedSpace_chartAt_eq is a dubious translation:
-lean 3 declaration is
-  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] {α : Type.{u2}} [_inst_4 : TopologicalSpace.{u2} α] [_inst_5 : Nonempty.{succ u2} α] {f : α -> H} (h : OpenEmbedding.{u2, u1} α H _inst_4 _inst_1 f) {x : α}, Eq.{max (succ u2) (succ u1)} (α -> H) (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalHomeomorph.{u2, u1} α H _inst_4 _inst_1) (fun (_x : LocalHomeomorph.{u2, u1} α H _inst_4 _inst_1) => α -> H) (LocalHomeomorph.hasCoeToFun.{u2, u1} α H _inst_4 _inst_1) (ChartedSpace.chartAt.{u1, u2} H _inst_1 α _inst_4 (OpenEmbedding.singletonChartedSpace.{u1, u2} H _inst_1 α _inst_4 _inst_5 f h) x)) f
-but is expected to have type
-  forall {H : Type.{u2}} [_inst_1 : TopologicalSpace.{u2} H] {α : Type.{u1}} [_inst_4 : TopologicalSpace.{u1} α] [_inst_5 : Nonempty.{succ u1} α] {f : α -> H} (h : OpenEmbedding.{u1, u2} α H _inst_4 _inst_1 f) {x : α}, Eq.{max (succ u2) (succ u1)} (α -> H) (LocalHomeomorph.toFun'.{u1, u2} α H _inst_4 _inst_1 (ChartedSpace.chartAt.{u2, u1} H _inst_1 α _inst_4 (OpenEmbedding.singletonChartedSpace.{u2, u1} H _inst_1 α _inst_4 _inst_5 f h) x)) f
-Case conversion may be inaccurate. Consider using '#align open_embedding.singleton_charted_space_chart_at_eq OpenEmbedding.singletonChartedSpace_chartAt_eqₓ'. -/
 theorem singletonChartedSpace_chartAt_eq {f : α → H} (h : OpenEmbedding f) {x : α} :
     ⇑(@chartAt H _ α _ h.singletonChartedSpace x) = f :=
   rfl
 #align open_embedding.singleton_charted_space_chart_at_eq OpenEmbedding.singletonChartedSpace_chartAt_eq
 
-/- warning: open_embedding.singleton_has_groupoid -> OpenEmbedding.singleton_hasGroupoid is a dubious translation:
-lean 3 declaration is
-  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] {α : Type.{u2}} [_inst_4 : TopologicalSpace.{u2} α] [_inst_5 : Nonempty.{succ u2} α] {f : α -> H} (h : OpenEmbedding.{u2, u1} α H _inst_4 _inst_1 f) (G : StructureGroupoid.{u1} H _inst_1) [_inst_6 : ClosedUnderRestriction.{u1} H _inst_1 G], HasGroupoid.{u1, u2} H _inst_1 α _inst_4 (OpenEmbedding.singletonChartedSpace.{u1, u2} H _inst_1 α _inst_4 _inst_5 f h) G
-but is expected to have type
-  forall {H : Type.{u2}} [_inst_1 : TopologicalSpace.{u2} H] {α : Type.{u1}} [_inst_4 : TopologicalSpace.{u1} α] [_inst_5 : Nonempty.{succ u1} α] {f : α -> H} (h : OpenEmbedding.{u1, u2} α H _inst_4 _inst_1 f) (G : StructureGroupoid.{u2} H _inst_1) [_inst_6 : ClosedUnderRestriction.{u2} H _inst_1 G], HasGroupoid.{u2, u1} H _inst_1 α _inst_4 (OpenEmbedding.singletonChartedSpace.{u2, u1} H _inst_1 α _inst_4 _inst_5 f h) G
-Case conversion may be inaccurate. Consider using '#align open_embedding.singleton_has_groupoid OpenEmbedding.singleton_hasGroupoidₓ'. -/
 theorem singleton_hasGroupoid {f : α → H} (h : OpenEmbedding f) (G : StructureGroupoid H)
     [ClosedUnderRestriction G] : @HasGroupoid _ _ _ _ h.singletonChartedSpace G :=
   (h.toLocalHomeomorph f).singleton_hasGroupoid (by simp) G
Diff
@@ -229,13 +229,8 @@ theorem StructureGroupoid.eq_on_source (G : StructureGroupoid H) {e e' : LocalHo
 #print StructureGroupoid.partialOrder /-
 /-- Partial order on the set of groupoids, given by inclusion of the members of the groupoid -/
 instance StructureGroupoid.partialOrder : PartialOrder (StructureGroupoid H) :=
-  PartialOrder.lift StructureGroupoid.members fun a b h =>
-    by
-    cases a
-    cases b
-    dsimp at h
-    induction h
-    rfl
+  PartialOrder.lift StructureGroupoid.members fun a b h => by cases a; cases b; dsimp at h;
+    induction h; rfl
 #align structure_groupoid.partial_order StructureGroupoid.partialOrder
 -/
 
@@ -270,8 +265,7 @@ def idGroupoid (H : Type u) [TopologicalSpace H] : StructureGroupoid H
   id_mem' := mem_union_left _ rfl
   locality' e he := by
     cases' e.source.eq_empty_or_nonempty with h h
-    · right
-      exact h
+    · right; exact h
     · left
       rcases h with ⟨x, hx⟩
       rcases he x hx with ⟨s, open_s, xs, hs⟩
@@ -282,13 +276,9 @@ def idGroupoid (H : Type u) [TopologicalSpace H] : StructureGroupoid H
       cases hs
       · replace hs : LocalHomeomorph.restr e s = LocalHomeomorph.refl H
         · simpa only using hs
-        have : (e.restr s).source = univ := by
-          rw [hs]
-          simp
+        have : (e.restr s).source = univ := by rw [hs]; simp
         change e.to_local_equiv.source ∩ interior s = univ at this
-        have : univ ⊆ interior s := by
-          rw [← this]
-          exact inter_subset_right _ _
+        have : univ ⊆ interior s := by rw [← this]; exact inter_subset_right _ _
         have : s = univ := by rwa [open_s.interior_eq, univ_subset_iff] at this
         simpa only [this, restr_univ] using hs
       · exfalso
@@ -365,16 +355,14 @@ def Pregroupoid.groupoid (PG : Pregroupoid H) : StructureGroupoid H
       rcases he x xu with ⟨s, s_open, xs, hs⟩
       refine' ⟨s, s_open, xs, _⟩
       convert hs.1 using 1
-      dsimp [LocalHomeomorph.restr]
-      rw [s_open.interior_eq]
+      dsimp [LocalHomeomorph.restr]; rw [s_open.interior_eq]
     · apply PG.locality e.open_target fun x xu => _
       rcases he (e.symm x) (e.map_target xu) with ⟨s, s_open, xs, hs⟩
       refine' ⟨e.target ∩ e.symm ⁻¹' s, _, ⟨xu, xs⟩, _⟩
       · exact ContinuousOn.preimage_open_of_open e.continuous_inv_fun e.open_target s_open
       · rw [← inter_assoc, inter_self]
         convert hs.2 using 1
-        dsimp [LocalHomeomorph.restr]
-        rw [s_open.interior_eq]
+        dsimp [LocalHomeomorph.restr]; rw [s_open.interior_eq]
   eq_on_source' e e' he ee' := by
     constructor
     · apply PG.congr e'.open_source ee'.2
@@ -489,10 +477,8 @@ def idRestrGroupoid : StructureGroupoid H
     intro x hx
     rcases h x hx with ⟨s, hs, hxs, s', hs', hes'⟩
     have hes : x ∈ (e.restr s).source := by
-      rw [e.restr_source]
-      refine' ⟨hx, _⟩
-      rw [hs.interior_eq]
-      exact hxs
+      rw [e.restr_source]; refine' ⟨hx, _⟩
+      rw [hs.interior_eq]; exact hxs
     simpa only [mfld_simps] using LocalHomeomorph.EqOnSource.eqOn hes' hes
   eq_on_source' := by
     rintro e e' ⟨s, hs, hse⟩ hee'
@@ -913,13 +899,8 @@ lean 3 declaration is
 but is expected to have type
   forall {H : Type.{u2}} {H' : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_4 : TopologicalSpace.{u1} H'], Eq.{max (succ u2) (succ u1)} (ChartedSpace.{max u1 u2, max u1 u2} (ModelProd.{u2, u1} H H') (instTopologicalSpaceModelProd.{u2, u1} H _inst_1 H' _inst_4) (Prod.{u2, u1} H H') (instTopologicalSpaceProd.{u2, u1} H H' _inst_1 _inst_4)) (prodChartedSpace.{u2, u2, u1, u1} H _inst_1 H _inst_1 (chartedSpaceSelf.{u2} H _inst_1) H' _inst_4 H' _inst_4 (chartedSpaceSelf.{u1} H' _inst_4)) (chartedSpaceSelf.{max u1 u2} (Prod.{u2, u1} H H') (instTopologicalSpaceProd.{u2, u1} H H' _inst_1 _inst_4))
 Case conversion may be inaccurate. Consider using '#align charted_space_self_prod chartedSpaceSelf_prodₓ'. -/
-theorem chartedSpaceSelf_prod : prodChartedSpace H H H' H' = chartedSpaceSelf (H × H') :=
-  by
-  ext1
-  · simp [prodChartedSpace, atlas]
-  · ext1
-    simp [chartAt_self_eq]
-    rfl
+theorem chartedSpaceSelf_prod : prodChartedSpace H H H' H' = chartedSpaceSelf (H × H') := by ext1;
+  · simp [prodChartedSpace, atlas]; · ext1; simp [chartAt_self_eq]; rfl
 #align charted_space_self_prod chartedSpaceSelf_prod
 
 end prodChartedSpace
@@ -1047,10 +1028,7 @@ protected def localHomeomorph (e : LocalEquiv M H) (he : e ∈ c.atlas) :
       have A :
         e' ∘ e.symm ⁻¹' s ∩ (e.target ∩ e.symm ⁻¹' e'.source) =
           e.target ∩ (e' ∘ e.symm ⁻¹' s ∩ e.symm ⁻¹' e'.source) :=
-        by
-        rw [← inter_assoc, ← inter_assoc]
-        congr 1
-        exact inter_comm _ _
+        by rw [← inter_assoc, ← inter_assoc]; congr 1; exact inter_comm _ _
       simpa [LocalEquiv.trans_source, preimage_inter, preimage_comp.symm, A] using this }
 #align charted_space_core.local_homeomorph ChartedSpaceCore.localHomeomorph
 -/
@@ -1217,9 +1195,7 @@ theorem StructureGroupoid.compatible_of_mem_maximalAtlas {e e' : LocalHomeomorph
   let s := e.target ∩ e.symm ⁻¹' f.source
   have hs : IsOpen s := by
     apply e.symm.continuous_to_fun.preimage_open_of_open <;> apply open_source
-  have xs : x ∈ s := by
-    dsimp at hx
-    simp [s, hx]
+  have xs : x ∈ s := by dsimp at hx; simp [s, hx]
   refine' ⟨s, hs, xs, _⟩
   have A : e.symm ≫ₕ f ∈ G := (mem_maximalAtlas_iff.1 he f (chart_mem_atlas _ _)).1
   have B : f.symm ≫ₕ e' ∈ G := (mem_maximalAtlas_iff.1 he' f (chart_mem_atlas _ _)).2
@@ -1386,12 +1362,8 @@ instance : ChartedSpace H s
     where
   atlas := ⋃ x : s, {@LocalHomeomorph.subtypeRestr _ _ _ _ (chartAt H x.1) s ⟨x⟩}
   chartAt x := @LocalHomeomorph.subtypeRestr _ _ _ _ (chartAt H x.1) s ⟨x⟩
-  mem_chart_source x := by
-    simp only [mfld_simps]
-    exact mem_chart_source H x.1
-  chart_mem_atlas x := by
-    simp only [mem_Union, mem_singleton_iff]
-    use x
+  mem_chart_source x := by simp only [mfld_simps]; exact mem_chart_source H x.1
+  chart_mem_atlas x := by simp only [mem_Union, mem_singleton_iff]; use x
 
 /-- If a groupoid `G` is `closed_under_restriction`, then an open subset of a space which is
 `has_groupoid G` is naturally `has_groupoid G`. -/
Diff
@@ -239,11 +239,15 @@ instance StructureGroupoid.partialOrder : PartialOrder (StructureGroupoid H) :=
 #align structure_groupoid.partial_order StructureGroupoid.partialOrder
 -/
 
-#print StructureGroupoid.le_iff /-
+/- warning: structure_groupoid.le_iff -> StructureGroupoid.le_iff is a dubious translation:
+lean 3 declaration is
+  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] {G₁ : StructureGroupoid.{u1} H _inst_1} {G₂ : StructureGroupoid.{u1} H _inst_1}, Iff (LE.le.{u1} (StructureGroupoid.{u1} H _inst_1) (Preorder.toHasLe.{u1} (StructureGroupoid.{u1} H _inst_1) (PartialOrder.toPreorder.{u1} (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.partialOrder.{u1} H _inst_1))) G₁ G₂) (forall (e : LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1), (Membership.Mem.{u1, u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.hasMem.{u1} H _inst_1) e G₁) -> (Membership.Mem.{u1, u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.hasMem.{u1} H _inst_1) e G₂))
+but is expected to have type
+  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] {G₁ : StructureGroupoid.{u1} H _inst_1} {G₂ : StructureGroupoid.{u1} H _inst_1}, Iff (LE.le.{u1} (StructureGroupoid.{u1} H _inst_1) (Preorder.toLE.{u1} (StructureGroupoid.{u1} H _inst_1) (PartialOrder.toPreorder.{u1} (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.partialOrder.{u1} H _inst_1))) G₁ G₂) (forall (e : LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1), (Membership.mem.{u1, u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (StructureGroupoid.{u1} H _inst_1) (instMembershipLocalHomeomorphStructureGroupoid.{u1} H _inst_1) e G₁) -> (Membership.mem.{u1, u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (StructureGroupoid.{u1} H _inst_1) (instMembershipLocalHomeomorphStructureGroupoid.{u1} H _inst_1) e G₂))
+Case conversion may be inaccurate. Consider using '#align structure_groupoid.le_iff StructureGroupoid.le_iffₓ'. -/
 theorem StructureGroupoid.le_iff {G₁ G₂ : StructureGroupoid H} : G₁ ≤ G₂ ↔ ∀ e, e ∈ G₁ → e ∈ G₂ :=
   Iff.rfl
 #align structure_groupoid.le_iff StructureGroupoid.le_iff
--/
 
 #print idGroupoid /-
 /-- The trivial groupoid, containing only the identity (and maps with empty source, as this is
@@ -390,7 +394,12 @@ theorem mem_groupoid_of_pregroupoid {PG : Pregroupoid H} {e : LocalHomeomorph H
 #align mem_groupoid_of_pregroupoid mem_groupoid_of_pregroupoid
 -/
 
-#print groupoid_of_pregroupoid_le /-
+/- warning: groupoid_of_pregroupoid_le -> groupoid_of_pregroupoid_le is a dubious translation:
+lean 3 declaration is
+  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] (PG₁ : Pregroupoid.{u1} H _inst_1) (PG₂ : Pregroupoid.{u1} H _inst_1), (forall (f : H -> H) (s : Set.{u1} H), (Pregroupoid.Property.{u1} H _inst_1 PG₁ f s) -> (Pregroupoid.Property.{u1} H _inst_1 PG₂ f s)) -> (LE.le.{u1} (StructureGroupoid.{u1} H _inst_1) (Preorder.toHasLe.{u1} (StructureGroupoid.{u1} H _inst_1) (PartialOrder.toPreorder.{u1} (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.partialOrder.{u1} H _inst_1))) (Pregroupoid.groupoid.{u1} H _inst_1 PG₁) (Pregroupoid.groupoid.{u1} H _inst_1 PG₂))
+but is expected to have type
+  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] (PG₁ : Pregroupoid.{u1} H _inst_1) (PG₂ : Pregroupoid.{u1} H _inst_1), (forall (f : H -> H) (s : Set.{u1} H), (Pregroupoid.property.{u1} H _inst_1 PG₁ f s) -> (Pregroupoid.property.{u1} H _inst_1 PG₂ f s)) -> (LE.le.{u1} (StructureGroupoid.{u1} H _inst_1) (Preorder.toLE.{u1} (StructureGroupoid.{u1} H _inst_1) (PartialOrder.toPreorder.{u1} (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.partialOrder.{u1} H _inst_1))) (Pregroupoid.groupoid.{u1} H _inst_1 PG₁) (Pregroupoid.groupoid.{u1} H _inst_1 PG₂))
+Case conversion may be inaccurate. Consider using '#align groupoid_of_pregroupoid_le groupoid_of_pregroupoid_leₓ'. -/
 theorem groupoid_of_pregroupoid_le (PG₁ PG₂ : Pregroupoid H)
     (h : ∀ f s, PG₁.property f s → PG₂.property f s) : PG₁.groupoid ≤ PG₂.groupoid :=
   by
@@ -398,7 +407,6 @@ theorem groupoid_of_pregroupoid_le (PG₁ PG₂ : Pregroupoid H)
   rw [mem_groupoid_of_pregroupoid] at he⊢
   exact ⟨h _ _ he.1, h _ _ he.2⟩
 #align groupoid_of_pregroupoid_le groupoid_of_pregroupoid_le
--/
 
 /- warning: mem_pregroupoid_of_eq_on_source -> mem_pregroupoid_of_eq_on_source is a dubious translation:
 lean 3 declaration is
@@ -509,7 +517,12 @@ instance closedUnderRestriction_idRestrGroupoid : ClosedUnderRestriction (@idRes
 #align closed_under_restriction_id_restr_groupoid closedUnderRestriction_idRestrGroupoid
 -/
 
-#print closedUnderRestriction_iff_id_le /-
+/- warning: closed_under_restriction_iff_id_le -> closedUnderRestriction_iff_id_le is a dubious translation:
+lean 3 declaration is
+  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] (G : StructureGroupoid.{u1} H _inst_1), Iff (ClosedUnderRestriction.{u1} H _inst_1 G) (LE.le.{u1} (StructureGroupoid.{u1} H _inst_1) (Preorder.toHasLe.{u1} (StructureGroupoid.{u1} H _inst_1) (PartialOrder.toPreorder.{u1} (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.partialOrder.{u1} H _inst_1))) (idRestrGroupoid.{u1} H _inst_1) G)
+but is expected to have type
+  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] (G : StructureGroupoid.{u1} H _inst_1), Iff (ClosedUnderRestriction.{u1} H _inst_1 G) (LE.le.{u1} (StructureGroupoid.{u1} H _inst_1) (Preorder.toLE.{u1} (StructureGroupoid.{u1} H _inst_1) (PartialOrder.toPreorder.{u1} (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.partialOrder.{u1} H _inst_1))) (idRestrGroupoid.{u1} H _inst_1) G)
+Case conversion may be inaccurate. Consider using '#align closed_under_restriction_iff_id_le closedUnderRestriction_iff_id_leₓ'. -/
 /-- A groupoid is closed under restriction if and only if it contains the trivial restriction-closed
 groupoid. -/
 theorem closedUnderRestriction_iff_id_le (G : StructureGroupoid H) :
@@ -532,7 +545,6 @@ theorem closedUnderRestriction_iff_id_le (G : StructureGroupoid H) :
     apply structure_groupoid.le_iff.mp h
     exact idRestrGroupoid_mem hs
 #align closed_under_restriction_iff_id_le closedUnderRestriction_iff_id_le
--/
 
 /-- The groupoid of all local homeomorphisms on a topological space `H` is closed under restriction.
 -/
@@ -1093,7 +1105,7 @@ theorem StructureGroupoid.compatible {H : Type _} [TopologicalSpace H] (G : Stru
 
 /- warning: has_groupoid_of_le -> hasGroupoid_of_le is a dubious translation:
 lean 3 declaration is
-  forall {H : Type.{u1}} {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] {G₁ : StructureGroupoid.{u1} H _inst_1} {G₂ : StructureGroupoid.{u1} H _inst_1}, (HasGroupoid.{u1, u2} H _inst_1 M _inst_2 _inst_3 G₁) -> (LE.le.{u1} (StructureGroupoid.{u1} H _inst_1) (Preorder.toLE.{u1} (StructureGroupoid.{u1} H _inst_1) (PartialOrder.toPreorder.{u1} (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.partialOrder.{u1} H _inst_1))) G₁ G₂) -> (HasGroupoid.{u1, u2} H _inst_1 M _inst_2 _inst_3 G₂)
+  forall {H : Type.{u1}} {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] {G₁ : StructureGroupoid.{u1} H _inst_1} {G₂ : StructureGroupoid.{u1} H _inst_1}, (HasGroupoid.{u1, u2} H _inst_1 M _inst_2 _inst_3 G₁) -> (LE.le.{u1} (StructureGroupoid.{u1} H _inst_1) (Preorder.toHasLe.{u1} (StructureGroupoid.{u1} H _inst_1) (PartialOrder.toPreorder.{u1} (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.partialOrder.{u1} H _inst_1))) G₁ G₂) -> (HasGroupoid.{u1, u2} H _inst_1 M _inst_2 _inst_3 G₂)
 but is expected to have type
   forall {H : Type.{u2}} {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] {G₁ : StructureGroupoid.{u2} H _inst_1} {G₂ : StructureGroupoid.{u2} H _inst_1}, (HasGroupoid.{u2, u1} H _inst_1 M _inst_2 _inst_3 G₁) -> (LE.le.{u2} (StructureGroupoid.{u2} H _inst_1) (Preorder.toLE.{u2} (StructureGroupoid.{u2} H _inst_1) (PartialOrder.toPreorder.{u2} (StructureGroupoid.{u2} H _inst_1) (StructureGroupoid.partialOrder.{u2} H _inst_1))) G₁ G₂) -> (HasGroupoid.{u2, u1} H _inst_1 M _inst_2 _inst_3 G₂)
 Case conversion may be inaccurate. Consider using '#align has_groupoid_of_le hasGroupoid_of_leₓ'. -/
Diff
@@ -688,9 +688,9 @@ open TopologicalSpace
 
 /- warning: charted_space.second_countable_of_countable_cover -> ChartedSpace.secondCountable_of_countable_cover is a dubious translation:
 lean 3 declaration is
-  forall (H : Type.{u1}) {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] [_inst_4 : TopologicalSpace.SecondCountableTopology.{u1} H _inst_1] {s : Set.{u2} M}, (Eq.{succ u2} (Set.{u2} M) (Set.unionᵢ.{u2, succ u2} M M (fun (x : M) => Set.unionᵢ.{u2, 0} M (Membership.Mem.{u2, u2} M (Set.{u2} M) (Set.hasMem.{u2} M) x s) (fun (hx : Membership.Mem.{u2, u2} M (Set.{u2} M) (Set.hasMem.{u2} M) x s) => LocalEquiv.source.{u2, u1} M H (LocalHomeomorph.toLocalEquiv.{u2, u1} M H _inst_2 _inst_1 (ChartedSpace.chartAt.{u1, u2} H _inst_1 M _inst_2 _inst_3 x))))) (Set.univ.{u2} M)) -> (Set.Countable.{u2} M s) -> (TopologicalSpace.SecondCountableTopology.{u2} M _inst_2)
+  forall (H : Type.{u1}) {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] [_inst_4 : TopologicalSpace.SecondCountableTopology.{u1} H _inst_1] {s : Set.{u2} M}, (Eq.{succ u2} (Set.{u2} M) (Set.iUnion.{u2, succ u2} M M (fun (x : M) => Set.iUnion.{u2, 0} M (Membership.Mem.{u2, u2} M (Set.{u2} M) (Set.hasMem.{u2} M) x s) (fun (hx : Membership.Mem.{u2, u2} M (Set.{u2} M) (Set.hasMem.{u2} M) x s) => LocalEquiv.source.{u2, u1} M H (LocalHomeomorph.toLocalEquiv.{u2, u1} M H _inst_2 _inst_1 (ChartedSpace.chartAt.{u1, u2} H _inst_1 M _inst_2 _inst_3 x))))) (Set.univ.{u2} M)) -> (Set.Countable.{u2} M s) -> (TopologicalSpace.SecondCountableTopology.{u2} M _inst_2)
 but is expected to have type
-  forall (H : Type.{u2}) {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] [_inst_4 : TopologicalSpace.SecondCountableTopology.{u2} H _inst_1] {s : Set.{u1} M}, (Eq.{succ u1} (Set.{u1} M) (Set.unionᵢ.{u1, succ u1} M M (fun (x : M) => Set.unionᵢ.{u1, 0} M (Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) x s) (fun (hx : Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) x s) => LocalEquiv.source.{u1, u2} M H (LocalHomeomorph.toLocalEquiv.{u1, u2} M H _inst_2 _inst_1 (ChartedSpace.chartAt.{u2, u1} H _inst_1 M _inst_2 _inst_3 x))))) (Set.univ.{u1} M)) -> (Set.Countable.{u1} M s) -> (TopologicalSpace.SecondCountableTopology.{u1} M _inst_2)
+  forall (H : Type.{u2}) {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] [_inst_4 : TopologicalSpace.SecondCountableTopology.{u2} H _inst_1] {s : Set.{u1} M}, (Eq.{succ u1} (Set.{u1} M) (Set.iUnion.{u1, succ u1} M M (fun (x : M) => Set.iUnion.{u1, 0} M (Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) x s) (fun (hx : Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) x s) => LocalEquiv.source.{u1, u2} M H (LocalHomeomorph.toLocalEquiv.{u1, u2} M H _inst_2 _inst_1 (ChartedSpace.chartAt.{u2, u1} H _inst_1 M _inst_2 _inst_3 x))))) (Set.univ.{u1} M)) -> (Set.Countable.{u1} M s) -> (TopologicalSpace.SecondCountableTopology.{u1} M _inst_2)
 Case conversion may be inaccurate. Consider using '#align charted_space.second_countable_of_countable_cover ChartedSpace.secondCountable_of_countable_coverₓ'. -/
 theorem ChartedSpace.secondCountable_of_countable_cover [SecondCountableTopology H] {s : Set M}
     (hs : (⋃ (x) (hx : x ∈ s), (chartAt H x).source) = univ) (hsc : s.Countable) :
Diff
@@ -451,11 +451,11 @@ class ClosedUnderRestriction (G : StructureGroupoid H) : Prop where
 #align closed_under_restriction ClosedUnderRestriction
 -/
 
-#print closed_under_restriction' /-
-theorem closed_under_restriction' {G : StructureGroupoid H} [ClosedUnderRestriction G]
+#print closedUnderRestriction' /-
+theorem closedUnderRestriction' {G : StructureGroupoid H} [ClosedUnderRestriction G]
     {e : LocalHomeomorph H H} (he : e ∈ G) {s : Set H} (hs : IsOpen s) : e.restr s ∈ G :=
   ClosedUnderRestriction.closedUnderRestriction he s hs
-#align closed_under_restriction' closed_under_restriction'
+#align closed_under_restriction' closedUnderRestriction'
 -/
 
 #print idRestrGroupoid /-
@@ -520,7 +520,7 @@ theorem closedUnderRestriction_iff_id_le (G : StructureGroupoid H) :
     apply structure_groupoid.le_iff.mpr
     rintro e ⟨s, hs, hes⟩
     refine' G.eq_on_source _ hes
-    convert closed_under_restriction' G.id_mem hs
+    convert closedUnderRestriction' G.id_mem hs
     change s = _ ∩ _
     rw [hs.interior_eq]
     simp only [mfld_simps]
@@ -1392,7 +1392,7 @@ instance [ClosedUnderRestriction G] : HasGroupoid s G
     rw [he, he']
     convert G.eq_on_source _
         (subtype_restr_symm_trans_subtype_restr s (chart_at H x) (chart_at H x'))
-    apply closed_under_restriction'
+    apply closedUnderRestriction'
     · exact G.compatible (chart_mem_atlas H x) (chart_mem_atlas H x')
     · exact preimage_open_of_open_symm (chart_at H x) s.2
 
Diff
@@ -545,10 +545,10 @@ end Groupoid
 
 
 #print ChartedSpace /-
-/- ./././Mathport/Syntax/Translate/Command.lean:388:30: infer kinds are unsupported in Lean 4: #[`atlas] [] -/
-/- ./././Mathport/Syntax/Translate/Command.lean:388:30: infer kinds are unsupported in Lean 4: #[`chartAt] [] -/
-/- ./././Mathport/Syntax/Translate/Command.lean:388:30: infer kinds are unsupported in Lean 4: #[`mem_chart_source] [] -/
-/- ./././Mathport/Syntax/Translate/Command.lean:388:30: infer kinds are unsupported in Lean 4: #[`chart_mem_atlas] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`atlas] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`chartAt] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`mem_chart_source] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`chart_mem_atlas] [] -/
 /-- A charted space is a topological space endowed with an atlas, i.e., a set of local
 homeomorphisms taking value in a model space `H`, called charts, such that the domains of the charts
 cover the whole space. We express the covering property by chosing for each `x` a member
@@ -1067,7 +1067,7 @@ section HasGroupoid
 variable [TopologicalSpace H] [TopologicalSpace M] [ChartedSpace H M]
 
 #print HasGroupoid /-
-/- ./././Mathport/Syntax/Translate/Command.lean:388:30: infer kinds are unsupported in Lean 4: #[`compatible] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`compatible] [] -/
 /-- A charted space has an atlas in a groupoid `G` if the change of coordinates belong to the
 groupoid -/
 class HasGroupoid {H : Type _} [TopologicalSpace H] (M : Type _) [TopologicalSpace M]
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Sébastien Gouëzel
 
 ! This file was ported from Lean 3 source module geometry.manifold.charted_space
-! leanprover-community/mathlib commit bcfa726826abd57587355b4b5b7e78ad6527b7e4
+! leanprover-community/mathlib commit 814d76e2247d5ba8bc024843552da1278bfe9e5c
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -13,6 +13,9 @@ import Mathbin.Topology.LocalHomeomorph
 /-!
 # Charted spaces
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 A smooth manifold is a topological space `M` locally modelled on a euclidean space (or a euclidean
 half-space for manifolds with boundaries, or an infinite dimensional vector space for more general
 notions of manifolds), i.e., the manifold is covered by open subsets on which there are local
Diff
@@ -165,6 +165,7 @@ We use primes in the structure names as we will reformulate them below (without
 -/
 
 
+#print StructureGroupoid /-
 /-- A structure groupoid is a set of local homeomorphisms of a topological space stable under
 composition and inverse. They appear in the definition of the smoothness class of a manifold. -/
 structure StructureGroupoid (H : Type u) [TopologicalSpace H] where
@@ -177,36 +178,52 @@ structure StructureGroupoid (H : Type u) [TopologicalSpace H] where
       (∀ x ∈ e.source, ∃ s, IsOpen s ∧ x ∈ s ∧ e.restr s ∈ members) → e ∈ members
   eq_on_source' : ∀ e e' : LocalHomeomorph H H, e ∈ members → e' ≈ e → e' ∈ members
 #align structure_groupoid StructureGroupoid
+-/
 
 variable [TopologicalSpace H]
 
 instance : Membership (LocalHomeomorph H H) (StructureGroupoid H) :=
   ⟨fun (e : LocalHomeomorph H H) (G : StructureGroupoid H) => e ∈ G.members⟩
 
+#print StructureGroupoid.trans /-
 theorem StructureGroupoid.trans (G : StructureGroupoid H) {e e' : LocalHomeomorph H H} (he : e ∈ G)
     (he' : e' ∈ G) : e ≫ₕ e' ∈ G :=
   G.trans' e e' he he'
 #align structure_groupoid.trans StructureGroupoid.trans
+-/
 
+#print StructureGroupoid.symm /-
 theorem StructureGroupoid.symm (G : StructureGroupoid H) {e : LocalHomeomorph H H} (he : e ∈ G) :
     e.symm ∈ G :=
   G.symm' e he
 #align structure_groupoid.symm StructureGroupoid.symm
+-/
 
+#print StructureGroupoid.id_mem /-
 theorem StructureGroupoid.id_mem (G : StructureGroupoid H) : LocalHomeomorph.refl H ∈ G :=
   G.id_mem'
 #align structure_groupoid.id_mem StructureGroupoid.id_mem
+-/
 
+#print StructureGroupoid.locality /-
 theorem StructureGroupoid.locality (G : StructureGroupoid H) {e : LocalHomeomorph H H}
     (h : ∀ x ∈ e.source, ∃ s, IsOpen s ∧ x ∈ s ∧ e.restr s ∈ G) : e ∈ G :=
   G.locality' e h
 #align structure_groupoid.locality StructureGroupoid.locality
+-/
 
+/- warning: structure_groupoid.eq_on_source -> StructureGroupoid.eq_on_source is a dubious translation:
+lean 3 declaration is
+  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] (G : StructureGroupoid.{u1} H _inst_1) {e : LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1} {e' : LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1}, (Membership.Mem.{u1, u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.hasMem.{u1} H _inst_1) e G) -> (HasEquivₓ.Equiv.{succ u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (setoidHasEquiv.{succ u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (LocalHomeomorph.setoid.{u1, u1} H H _inst_1 _inst_1)) e' e) -> (Membership.Mem.{u1, u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.hasMem.{u1} H _inst_1) e' G)
+but is expected to have type
+  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] (G : StructureGroupoid.{u1} H _inst_1) {e : LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1} {e' : LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1}, (Membership.mem.{u1, u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (StructureGroupoid.{u1} H _inst_1) (instMembershipLocalHomeomorphStructureGroupoid.{u1} H _inst_1) e G) -> (HasEquiv.Equiv.{succ u1, 0} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (instHasEquiv.{succ u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (LocalHomeomorph.eqOnSourceSetoid.{u1, u1} H H _inst_1 _inst_1)) e' e) -> (Membership.mem.{u1, u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (StructureGroupoid.{u1} H _inst_1) (instMembershipLocalHomeomorphStructureGroupoid.{u1} H _inst_1) e' G)
+Case conversion may be inaccurate. Consider using '#align structure_groupoid.eq_on_source StructureGroupoid.eq_on_sourceₓ'. -/
 theorem StructureGroupoid.eq_on_source (G : StructureGroupoid H) {e e' : LocalHomeomorph H H}
     (he : e ∈ G) (h : e' ≈ e) : e' ∈ G :=
   G.eq_on_source' e e' he h
 #align structure_groupoid.eq_on_source StructureGroupoid.eq_on_source
 
+#print StructureGroupoid.partialOrder /-
 /-- Partial order on the set of groupoids, given by inclusion of the members of the groupoid -/
 instance StructureGroupoid.partialOrder : PartialOrder (StructureGroupoid H) :=
   PartialOrder.lift StructureGroupoid.members fun a b h =>
@@ -217,11 +234,15 @@ instance StructureGroupoid.partialOrder : PartialOrder (StructureGroupoid H) :=
     induction h
     rfl
 #align structure_groupoid.partial_order StructureGroupoid.partialOrder
+-/
 
+#print StructureGroupoid.le_iff /-
 theorem StructureGroupoid.le_iff {G₁ G₂ : StructureGroupoid H} : G₁ ≤ G₂ ↔ ∀ e, e ∈ G₁ → e ∈ G₂ :=
   Iff.rfl
 #align structure_groupoid.le_iff StructureGroupoid.le_iff
+-/
 
+#print idGroupoid /-
 /-- The trivial groupoid, containing only the identity (and maps with empty source, as this is
 necessary from the definition) -/
 def idGroupoid (H : Type u) [TopologicalSpace H] : StructureGroupoid H
@@ -278,6 +299,7 @@ def idGroupoid (H : Type u) [TopologicalSpace H] : StructureGroupoid H
       change e.to_local_equiv.source = ∅ at he
       rwa [Set.mem_setOf_eq, he'e.source_eq]
 #align id_groupoid idGroupoid
+-/
 
 /-- Every structure groupoid contains the identity groupoid -/
 instance : OrderBot (StructureGroupoid H)
@@ -298,6 +320,7 @@ instance : OrderBot (StructureGroupoid H)
 instance (H : Type u) [TopologicalSpace H] : Inhabited (StructureGroupoid H) :=
   ⟨idGroupoid H⟩
 
+#print Pregroupoid /-
 /-- To construct a groupoid, one may consider classes of local homeos such that both the function
 and its inverse have some property. If this property is stable under composition,
 one gets a groupoid. `pregroupoid` bundles the properties needed for this construction, with the
@@ -313,7 +336,9 @@ structure Pregroupoid (H : Type _) [TopologicalSpace H] where
     ∀ {f u}, IsOpen u → (∀ x ∈ u, ∃ v, IsOpen v ∧ x ∈ v ∧ property f (u ∩ v)) → property f u
   congr : ∀ {f g : H → H} {u}, IsOpen u → (∀ x ∈ u, g x = f x) → property f u → property g u
 #align pregroupoid Pregroupoid
+-/
 
+#print Pregroupoid.groupoid /-
 /-- Construct a groupoid of local homeos for which the map and its inverse have some property,
 from a pregroupoid asserting that this property is stable under composition. -/
 def Pregroupoid.groupoid (PG : Pregroupoid H) : StructureGroupoid H
@@ -353,12 +378,16 @@ def Pregroupoid.groupoid (PG : Pregroupoid H) : StructureGroupoid H
       rw [A.1]
       rfl
 #align pregroupoid.groupoid Pregroupoid.groupoid
+-/
 
+#print mem_groupoid_of_pregroupoid /-
 theorem mem_groupoid_of_pregroupoid {PG : Pregroupoid H} {e : LocalHomeomorph H H} :
     e ∈ PG.groupoid ↔ PG.property e e.source ∧ PG.property e.symm e.target :=
   Iff.rfl
 #align mem_groupoid_of_pregroupoid mem_groupoid_of_pregroupoid
+-/
 
+#print groupoid_of_pregroupoid_le /-
 theorem groupoid_of_pregroupoid_le (PG₁ PG₂ : Pregroupoid H)
     (h : ∀ f s, PG₁.property f s → PG₂.property f s) : PG₁.groupoid ≤ PG₂.groupoid :=
   by
@@ -366,7 +395,14 @@ theorem groupoid_of_pregroupoid_le (PG₁ PG₂ : Pregroupoid H)
   rw [mem_groupoid_of_pregroupoid] at he⊢
   exact ⟨h _ _ he.1, h _ _ he.2⟩
 #align groupoid_of_pregroupoid_le groupoid_of_pregroupoid_le
+-/
 
+/- warning: mem_pregroupoid_of_eq_on_source -> mem_pregroupoid_of_eq_on_source is a dubious translation:
+lean 3 declaration is
+  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] (PG : Pregroupoid.{u1} H _inst_1) {e : LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1} {e' : LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1}, (HasEquivₓ.Equiv.{succ u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (setoidHasEquiv.{succ u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (LocalHomeomorph.setoid.{u1, u1} H H _inst_1 _inst_1)) e e') -> (Pregroupoid.Property.{u1} H _inst_1 PG (coeFn.{succ u1, succ u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (fun (_x : LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) => H -> H) (LocalHomeomorph.hasCoeToFun.{u1, u1} H H _inst_1 _inst_1) e) (LocalEquiv.source.{u1, u1} H H (LocalHomeomorph.toLocalEquiv.{u1, u1} H H _inst_1 _inst_1 e))) -> (Pregroupoid.Property.{u1} H _inst_1 PG (coeFn.{succ u1, succ u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (fun (_x : LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) => H -> H) (LocalHomeomorph.hasCoeToFun.{u1, u1} H H _inst_1 _inst_1) e') (LocalEquiv.source.{u1, u1} H H (LocalHomeomorph.toLocalEquiv.{u1, u1} H H _inst_1 _inst_1 e')))
+but is expected to have type
+  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] (PG : Pregroupoid.{u1} H _inst_1) {e : LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1} {e' : LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1}, (HasEquiv.Equiv.{succ u1, 0} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (instHasEquiv.{succ u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (LocalHomeomorph.eqOnSourceSetoid.{u1, u1} H H _inst_1 _inst_1)) e e') -> (Pregroupoid.property.{u1} H _inst_1 PG (LocalHomeomorph.toFun'.{u1, u1} H H _inst_1 _inst_1 e) (LocalEquiv.source.{u1, u1} H H (LocalHomeomorph.toLocalEquiv.{u1, u1} H H _inst_1 _inst_1 e))) -> (Pregroupoid.property.{u1} H _inst_1 PG (LocalHomeomorph.toFun'.{u1, u1} H H _inst_1 _inst_1 e') (LocalEquiv.source.{u1, u1} H H (LocalHomeomorph.toLocalEquiv.{u1, u1} H H _inst_1 _inst_1 e')))
+Case conversion may be inaccurate. Consider using '#align mem_pregroupoid_of_eq_on_source mem_pregroupoid_of_eq_on_sourceₓ'. -/
 theorem mem_pregroupoid_of_eq_on_source (PG : Pregroupoid H) {e e' : LocalHomeomorph H H}
     (he' : e ≈ e') (he : PG.property e e.source) : PG.property e' e'.source :=
   by
@@ -374,6 +410,7 @@ theorem mem_pregroupoid_of_eq_on_source (PG : Pregroupoid H) {e e' : LocalHomeom
   exact PG.congr e.open_source he'.eq_on.symm he
 #align mem_pregroupoid_of_eq_on_source mem_pregroupoid_of_eq_on_source
 
+#print continuousPregroupoid /-
 /-- The pregroupoid of all local maps on a topological space `H` -/
 @[reducible]
 def continuousPregroupoid (H : Type _) [TopologicalSpace H] : Pregroupoid H
@@ -384,14 +421,17 @@ def continuousPregroupoid (H : Type _) [TopologicalSpace H] : Pregroupoid H
   locality f u u_open h := trivial
   congr f g u u_open hcongr hf := trivial
 #align continuous_pregroupoid continuousPregroupoid
+-/
 
 instance (H : Type _) [TopologicalSpace H] : Inhabited (Pregroupoid H) :=
   ⟨continuousPregroupoid H⟩
 
+#print continuousGroupoid /-
 /-- The groupoid of all local homeomorphisms on a topological space `H` -/
 def continuousGroupoid (H : Type _) [TopologicalSpace H] : StructureGroupoid H :=
   Pregroupoid.groupoid (continuousPregroupoid H)
 #align continuous_groupoid continuousGroupoid
+-/
 
 /-- Every structure groupoid is contained in the groupoid of all local homeomorphisms -/
 instance : OrderTop (StructureGroupoid H)
@@ -399,18 +439,23 @@ instance : OrderTop (StructureGroupoid H)
   top := continuousGroupoid H
   le_top u f hf := by constructor <;> exact by decide
 
+#print ClosedUnderRestriction /-
 /-- A groupoid is closed under restriction if it contains all restrictions of its element local
 homeomorphisms to open subsets of the source. -/
 class ClosedUnderRestriction (G : StructureGroupoid H) : Prop where
   ClosedUnderRestriction :
     ∀ {e : LocalHomeomorph H H}, e ∈ G → ∀ s : Set H, IsOpen s → e.restr s ∈ G
 #align closed_under_restriction ClosedUnderRestriction
+-/
 
+#print closed_under_restriction' /-
 theorem closed_under_restriction' {G : StructureGroupoid H} [ClosedUnderRestriction G]
     {e : LocalHomeomorph H H} (he : e ∈ G) {s : Set H} (hs : IsOpen s) : e.restr s ∈ G :=
   ClosedUnderRestriction.closedUnderRestriction he s hs
 #align closed_under_restriction' closed_under_restriction'
+-/
 
+#print idRestrGroupoid /-
 /-- The trivial restriction-closed groupoid, containing only local homeomorphisms equivalent to the
 restriction of the identity to the various open subsets. -/
 def idRestrGroupoid : StructureGroupoid H
@@ -442,11 +487,15 @@ def idRestrGroupoid : StructureGroupoid H
     rintro e e' ⟨s, hs, hse⟩ hee'
     exact ⟨s, hs, Setoid.trans hee' hse⟩
 #align id_restr_groupoid idRestrGroupoid
+-/
 
+#print idRestrGroupoid_mem /-
 theorem idRestrGroupoid_mem {s : Set H} (hs : IsOpen s) : ofSet s hs ∈ @idRestrGroupoid H _ :=
   ⟨s, hs, by rfl⟩
 #align id_restr_groupoid_mem idRestrGroupoid_mem
+-/
 
+#print closedUnderRestriction_idRestrGroupoid /-
 /-- The trivial restriction-closed groupoid is indeed `closed_under_restriction`. -/
 instance closedUnderRestriction_idRestrGroupoid : ClosedUnderRestriction (@idRestrGroupoid H _) :=
   ⟨by
@@ -455,7 +504,9 @@ instance closedUnderRestriction_idRestrGroupoid : ClosedUnderRestriction (@idRes
     refine' Setoid.trans (LocalHomeomorph.EqOnSource.restr he s) _
     exact ⟨by simp only [hs.interior_eq, mfld_simps], by simp only [mfld_simps]⟩⟩
 #align closed_under_restriction_id_restr_groupoid closedUnderRestriction_idRestrGroupoid
+-/
 
+#print closedUnderRestriction_iff_id_le /-
 /-- A groupoid is closed under restriction if and only if it contains the trivial restriction-closed
 groupoid. -/
 theorem closedUnderRestriction_iff_id_le (G : StructureGroupoid H) :
@@ -478,6 +529,7 @@ theorem closedUnderRestriction_iff_id_le (G : StructureGroupoid H) :
     apply structure_groupoid.le_iff.mp h
     exact idRestrGroupoid_mem hs
 #align closed_under_restriction_iff_id_le closedUnderRestriction_iff_id_le
+-/
 
 /-- The groupoid of all local homeomorphisms on a topological space `H` is closed under restriction.
 -/
@@ -489,6 +541,7 @@ end Groupoid
 /-! ### Charted spaces -/
 
 
+#print ChartedSpace /-
 /- ./././Mathport/Syntax/Translate/Command.lean:388:30: infer kinds are unsupported in Lean 4: #[`atlas] [] -/
 /- ./././Mathport/Syntax/Translate/Command.lean:388:30: infer kinds are unsupported in Lean 4: #[`chartAt] [] -/
 /- ./././Mathport/Syntax/Translate/Command.lean:388:30: infer kinds are unsupported in Lean 4: #[`mem_chart_source] [] -/
@@ -509,6 +562,7 @@ class ChartedSpace (H : Type _) [TopologicalSpace H] (M : Type _) [TopologicalSp
   mem_chart_source : ∀ x, x ∈ (chart_at x).source
   chart_mem_atlas : ∀ x, chart_at x ∈ atlas
 #align charted_space ChartedSpace
+-/
 
 export ChartedSpace ()
 
@@ -516,6 +570,7 @@ attribute [simp, mfld_simps] mem_chart_source chart_mem_atlas
 
 section ChartedSpace
 
+#print chartedSpaceSelf /-
 /-- Any space is a charted_space modelled over itself, by just using the identity chart -/
 instance chartedSpaceSelf (H : Type _) [TopologicalSpace H] : ChartedSpace H H
     where
@@ -524,62 +579,117 @@ instance chartedSpaceSelf (H : Type _) [TopologicalSpace H] : ChartedSpace H H
   mem_chart_source x := mem_univ x
   chart_mem_atlas x := mem_singleton _
 #align charted_space_self chartedSpaceSelf
+-/
 
+#print chartedSpaceSelf_atlas /-
 /-- In the trivial charted_space structure of a space modelled over itself through the identity, the
 atlas members are just the identity -/
 @[simp, mfld_simps]
 theorem chartedSpaceSelf_atlas {H : Type _} [TopologicalSpace H] {e : LocalHomeomorph H H} :
     e ∈ atlas H H ↔ e = LocalHomeomorph.refl H := by simp [atlas, ChartedSpace.atlas]
 #align charted_space_self_atlas chartedSpaceSelf_atlas
+-/
 
+#print chartAt_self_eq /-
 /-- In the model space, chart_at is always the identity -/
 theorem chartAt_self_eq {H : Type _} [TopologicalSpace H] {x : H} :
     chartAt H x = LocalHomeomorph.refl H := by simpa using chart_mem_atlas H x
 #align chart_at_self_eq chartAt_self_eq
+-/
 
 section
 
 variable (H) [TopologicalSpace H] [TopologicalSpace M] [ChartedSpace H M]
 
+/- warning: mem_chart_target -> mem_chart_target is a dubious translation:
+lean 3 declaration is
+  forall (H : Type.{u1}) {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] (x : M), Membership.Mem.{u1, u1} H (Set.{u1} H) (Set.hasMem.{u1} H) (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (fun (_x : LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) => M -> H) (LocalHomeomorph.hasCoeToFun.{u2, u1} M H _inst_2 _inst_1) (ChartedSpace.chartAt.{u1, u2} H _inst_1 M _inst_2 _inst_3 x) x) (LocalEquiv.target.{u2, u1} M H (LocalHomeomorph.toLocalEquiv.{u2, u1} M H _inst_2 _inst_1 (ChartedSpace.chartAt.{u1, u2} H _inst_1 M _inst_2 _inst_3 x)))
+but is expected to have type
+  forall (H : Type.{u2}) {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] (x : M), Membership.mem.{u2, u2} H (Set.{u2} H) (Set.instMembershipSet.{u2} H) (LocalHomeomorph.toFun'.{u1, u2} M H _inst_2 _inst_1 (ChartedSpace.chartAt.{u2, u1} H _inst_1 M _inst_2 _inst_3 x) x) (LocalEquiv.target.{u1, u2} M H (LocalHomeomorph.toLocalEquiv.{u1, u2} M H _inst_2 _inst_1 (ChartedSpace.chartAt.{u2, u1} H _inst_1 M _inst_2 _inst_3 x)))
+Case conversion may be inaccurate. Consider using '#align mem_chart_target mem_chart_targetₓ'. -/
 theorem mem_chart_target (x : M) : chartAt H x x ∈ (chartAt H x).target :=
   (chartAt H x).map_source (mem_chart_source _ _)
 #align mem_chart_target mem_chart_target
 
+/- warning: chart_source_mem_nhds -> chart_source_mem_nhds is a dubious translation:
+lean 3 declaration is
+  forall (H : Type.{u1}) {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] (x : M), Membership.Mem.{u2, u2} (Set.{u2} M) (Filter.{u2} M) (Filter.hasMem.{u2} M) (LocalEquiv.source.{u2, u1} M H (LocalHomeomorph.toLocalEquiv.{u2, u1} M H _inst_2 _inst_1 (ChartedSpace.chartAt.{u1, u2} H _inst_1 M _inst_2 _inst_3 x))) (nhds.{u2} M _inst_2 x)
+but is expected to have type
+  forall (H : Type.{u2}) {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] (x : M), Membership.mem.{u1, u1} (Set.{u1} M) (Filter.{u1} M) (instMembershipSetFilter.{u1} M) (LocalEquiv.source.{u1, u2} M H (LocalHomeomorph.toLocalEquiv.{u1, u2} M H _inst_2 _inst_1 (ChartedSpace.chartAt.{u2, u1} H _inst_1 M _inst_2 _inst_3 x))) (nhds.{u1} M _inst_2 x)
+Case conversion may be inaccurate. Consider using '#align chart_source_mem_nhds chart_source_mem_nhdsₓ'. -/
 theorem chart_source_mem_nhds (x : M) : (chartAt H x).source ∈ 𝓝 x :=
   (chartAt H x).open_source.mem_nhds <| mem_chart_source H x
 #align chart_source_mem_nhds chart_source_mem_nhds
 
+/- warning: chart_target_mem_nhds -> chart_target_mem_nhds is a dubious translation:
+lean 3 declaration is
+  forall (H : Type.{u1}) {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] (x : M), Membership.Mem.{u1, u1} (Set.{u1} H) (Filter.{u1} H) (Filter.hasMem.{u1} H) (LocalEquiv.target.{u2, u1} M H (LocalHomeomorph.toLocalEquiv.{u2, u1} M H _inst_2 _inst_1 (ChartedSpace.chartAt.{u1, u2} H _inst_1 M _inst_2 _inst_3 x))) (nhds.{u1} H _inst_1 (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (fun (_x : LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) => M -> H) (LocalHomeomorph.hasCoeToFun.{u2, u1} M H _inst_2 _inst_1) (ChartedSpace.chartAt.{u1, u2} H _inst_1 M _inst_2 _inst_3 x) x))
+but is expected to have type
+  forall (H : Type.{u2}) {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] (x : M), Membership.mem.{u2, u2} (Set.{u2} H) (Filter.{u2} H) (instMembershipSetFilter.{u2} H) (LocalEquiv.target.{u1, u2} M H (LocalHomeomorph.toLocalEquiv.{u1, u2} M H _inst_2 _inst_1 (ChartedSpace.chartAt.{u2, u1} H _inst_1 M _inst_2 _inst_3 x))) (nhds.{u2} H _inst_1 (LocalHomeomorph.toFun'.{u1, u2} M H _inst_2 _inst_1 (ChartedSpace.chartAt.{u2, u1} H _inst_1 M _inst_2 _inst_3 x) x))
+Case conversion may be inaccurate. Consider using '#align chart_target_mem_nhds chart_target_mem_nhdsₓ'. -/
 theorem chart_target_mem_nhds (x : M) : (chartAt H x).target ∈ 𝓝 (chartAt H x x) :=
   (chartAt H x).open_target.mem_nhds <| mem_chart_target H x
 #align chart_target_mem_nhds chart_target_mem_nhds
 
+#print achart /-
 /-- `achart H x` is the chart at `x`, considered as an element of the atlas.
 Especially useful for working with `basic_smooth_vector_bundle_core` -/
 def achart (x : M) : atlas H M :=
   ⟨chartAt H x, chart_mem_atlas H x⟩
 #align achart achart
+-/
 
+/- warning: achart_def -> achart_def is a dubious translation:
+lean 3 declaration is
+  forall (H : Type.{u1}) {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] (x : M), Eq.{succ (max u2 u1)} (coeSort.{succ (max u2 u1), succ (succ (max u2 u1))} (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) Type.{max u2 u1} (Set.hasCoeToSort.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (ChartedSpace.atlas.{u1, u2} H _inst_1 M _inst_2 _inst_3)) (achart.{u1, u2} H M _inst_1 _inst_2 _inst_3 x) (Subtype.mk.{succ (max u2 u1)} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (fun (x : LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) => Membership.Mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (Set.hasMem.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) x (ChartedSpace.atlas.{u1, u2} H _inst_1 M _inst_2 _inst_3)) (ChartedSpace.chartAt.{u1, u2} H _inst_1 M _inst_2 _inst_3 x) (ChartedSpace.chart_mem_atlas.{u1, u2} H _inst_1 M _inst_2 _inst_3 x))
+but is expected to have type
+  forall (H : Type.{u2}) {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] (x : M), Eq.{max (succ u2) (succ u1)} (Set.Elem.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (ChartedSpace.atlas.{u2, u1} H _inst_1 M _inst_2 _inst_3)) (achart.{u2, u1} H M _inst_1 _inst_2 _inst_3 x) (Subtype.mk.{max (succ u2) (succ u1)} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (fun (x : LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) => Membership.mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) (Set.instMembershipSet.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) x (ChartedSpace.atlas.{u2, u1} H _inst_1 M _inst_2 _inst_3)) (ChartedSpace.chartAt.{u2, u1} H _inst_1 M _inst_2 _inst_3 x) (ChartedSpace.chart_mem_atlas.{u2, u1} H _inst_1 M _inst_2 _inst_3 x))
+Case conversion may be inaccurate. Consider using '#align achart_def achart_defₓ'. -/
 theorem achart_def (x : M) : achart H x = ⟨chartAt H x, chart_mem_atlas H x⟩ :=
   rfl
 #align achart_def achart_def
 
+/- warning: coe_achart -> coe_achart is a dubious translation:
+lean 3 declaration is
+  forall (H : Type.{u1}) {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] (x : M), Eq.{max (succ u2) (succ u1)} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) ((fun (a : Type.{max u2 u1}) (b : Sort.{max (succ u2) (succ u1)}) [self : HasLiftT.{succ (max u2 u1), max (succ u2) (succ u1)} a b] => self.0) (coeSort.{succ (max u2 u1), succ (succ (max u2 u1))} (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) Type.{max u2 u1} (Set.hasCoeToSort.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (ChartedSpace.atlas.{u1, u2} H _inst_1 M _inst_2 _inst_3)) (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (HasLiftT.mk.{succ (max u2 u1), max (succ u2) (succ u1)} (coeSort.{succ (max u2 u1), succ (succ (max u2 u1))} (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) Type.{max u2 u1} (Set.hasCoeToSort.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (ChartedSpace.atlas.{u1, u2} H _inst_1 M _inst_2 _inst_3)) (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (CoeTCₓ.coe.{succ (max u2 u1), max (succ u2) (succ u1)} (coeSort.{succ (max u2 u1), succ (succ (max u2 u1))} (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) Type.{max u2 u1} (Set.hasCoeToSort.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (ChartedSpace.atlas.{u1, u2} H _inst_1 M _inst_2 _inst_3)) (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (coeBase.{succ (max u2 u1), max (succ u2) (succ u1)} (coeSort.{succ (max u2 u1), succ (succ (max u2 u1))} (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) Type.{max u2 u1} (Set.hasCoeToSort.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (ChartedSpace.atlas.{u1, u2} H _inst_1 M _inst_2 _inst_3)) (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (coeSubtype.{max (succ u2) (succ u1)} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (fun (x : LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) => Membership.Mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (Set.hasMem.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) x (ChartedSpace.atlas.{u1, u2} H _inst_1 M _inst_2 _inst_3)))))) (achart.{u1, u2} H M _inst_1 _inst_2 _inst_3 x)) (ChartedSpace.chartAt.{u1, u2} H _inst_1 M _inst_2 _inst_3 x)
+but is expected to have type
+  forall (H : Type.{u2}) {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] (x : M), Eq.{max (succ u2) (succ u1)} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (Subtype.val.{succ (max u2 u1)} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (fun (x : LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) => Membership.mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) (Set.instMembershipSet.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) x (ChartedSpace.atlas.{u2, u1} H _inst_1 M _inst_2 _inst_3)) (achart.{u2, u1} H M _inst_1 _inst_2 _inst_3 x)) (ChartedSpace.chartAt.{u2, u1} H _inst_1 M _inst_2 _inst_3 x)
+Case conversion may be inaccurate. Consider using '#align coe_achart coe_achartₓ'. -/
 @[simp, mfld_simps]
 theorem coe_achart (x : M) : (achart H x : LocalHomeomorph M H) = chartAt H x :=
   rfl
 #align coe_achart coe_achart
 
+/- warning: achart_val -> achart_val is a dubious translation:
+lean 3 declaration is
+  forall (H : Type.{u1}) {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] (x : M), Eq.{max (succ u2) (succ u1)} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (Subtype.val.{succ (max u2 u1)} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (fun (x : LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) => Membership.Mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (Set.hasMem.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) x (ChartedSpace.atlas.{u1, u2} H _inst_1 M _inst_2 _inst_3)) (achart.{u1, u2} H M _inst_1 _inst_2 _inst_3 x)) (ChartedSpace.chartAt.{u1, u2} H _inst_1 M _inst_2 _inst_3 x)
+but is expected to have type
+  forall (H : Type.{u2}) {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] (x : M), Eq.{max (succ u2) (succ u1)} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (Subtype.val.{max (succ u2) (succ u1)} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (fun (x : LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) => Membership.mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) (Set.instMembershipSet.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) x (ChartedSpace.atlas.{u2, u1} H _inst_1 M _inst_2 _inst_3)) (achart.{u2, u1} H M _inst_1 _inst_2 _inst_3 x)) (ChartedSpace.chartAt.{u2, u1} H _inst_1 M _inst_2 _inst_3 x)
+Case conversion may be inaccurate. Consider using '#align achart_val achart_valₓ'. -/
 @[simp, mfld_simps]
 theorem achart_val (x : M) : (achart H x).1 = chartAt H x :=
   rfl
 #align achart_val achart_val
 
+/- warning: mem_achart_source -> mem_achart_source is a dubious translation:
+lean 3 declaration is
+  forall (H : Type.{u1}) {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] (x : M), Membership.Mem.{u2, u2} M (Set.{u2} M) (Set.hasMem.{u2} M) x (LocalEquiv.source.{u2, u1} M H (LocalHomeomorph.toLocalEquiv.{u2, u1} M H _inst_2 _inst_1 (Subtype.val.{succ (max u2 u1)} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (fun (x : LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) => Membership.Mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (Set.hasMem.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) x (ChartedSpace.atlas.{u1, u2} H _inst_1 M _inst_2 _inst_3)) (achart.{u1, u2} H M _inst_1 _inst_2 _inst_3 x))))
+but is expected to have type
+  forall (H : Type.{u2}) {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] (x : M), Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) x (LocalEquiv.source.{u1, u2} M H (LocalHomeomorph.toLocalEquiv.{u1, u2} M H _inst_2 _inst_1 (Subtype.val.{max (succ u2) (succ u1)} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (fun (x : LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) => Membership.mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) (Set.instMembershipSet.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) x (ChartedSpace.atlas.{u2, u1} H _inst_1 M _inst_2 _inst_3)) (achart.{u2, u1} H M _inst_1 _inst_2 _inst_3 x))))
+Case conversion may be inaccurate. Consider using '#align mem_achart_source mem_achart_sourceₓ'. -/
 theorem mem_achart_source (x : M) : x ∈ (achart H x).1.source :=
   mem_chart_source H x
 #align mem_achart_source mem_achart_source
 
 open TopologicalSpace
 
-theorem ChartedSpace.second_countable_of_countable_cover [SecondCountableTopology H] {s : Set M}
+/- warning: charted_space.second_countable_of_countable_cover -> ChartedSpace.secondCountable_of_countable_cover is a dubious translation:
+lean 3 declaration is
+  forall (H : Type.{u1}) {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] [_inst_4 : TopologicalSpace.SecondCountableTopology.{u1} H _inst_1] {s : Set.{u2} M}, (Eq.{succ u2} (Set.{u2} M) (Set.unionᵢ.{u2, succ u2} M M (fun (x : M) => Set.unionᵢ.{u2, 0} M (Membership.Mem.{u2, u2} M (Set.{u2} M) (Set.hasMem.{u2} M) x s) (fun (hx : Membership.Mem.{u2, u2} M (Set.{u2} M) (Set.hasMem.{u2} M) x s) => LocalEquiv.source.{u2, u1} M H (LocalHomeomorph.toLocalEquiv.{u2, u1} M H _inst_2 _inst_1 (ChartedSpace.chartAt.{u1, u2} H _inst_1 M _inst_2 _inst_3 x))))) (Set.univ.{u2} M)) -> (Set.Countable.{u2} M s) -> (TopologicalSpace.SecondCountableTopology.{u2} M _inst_2)
+but is expected to have type
+  forall (H : Type.{u2}) {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] [_inst_4 : TopologicalSpace.SecondCountableTopology.{u2} H _inst_1] {s : Set.{u1} M}, (Eq.{succ u1} (Set.{u1} M) (Set.unionᵢ.{u1, succ u1} M M (fun (x : M) => Set.unionᵢ.{u1, 0} M (Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) x s) (fun (hx : Membership.mem.{u1, u1} M (Set.{u1} M) (Set.instMembershipSet.{u1} M) x s) => LocalEquiv.source.{u1, u2} M H (LocalHomeomorph.toLocalEquiv.{u1, u2} M H _inst_2 _inst_1 (ChartedSpace.chartAt.{u2, u1} H _inst_1 M _inst_2 _inst_3 x))))) (Set.univ.{u1} M)) -> (Set.Countable.{u1} M s) -> (TopologicalSpace.SecondCountableTopology.{u1} M _inst_2)
+Case conversion may be inaccurate. Consider using '#align charted_space.second_countable_of_countable_cover ChartedSpace.secondCountable_of_countable_coverₓ'. -/
+theorem ChartedSpace.secondCountable_of_countable_cover [SecondCountableTopology H] {s : Set M}
     (hs : (⋃ (x) (hx : x ∈ s), (chartAt H x).source) = univ) (hsc : s.Countable) :
     SecondCountableTopology M :=
   by
@@ -589,22 +699,34 @@ theorem ChartedSpace.second_countable_of_countable_cover [SecondCountableTopolog
   rw [bUnion_eq_Union] at hs
   exact
     second_countable_topology_of_countable_cover (fun x : s => (chart_at H (x : M)).open_source) hs
-#align charted_space.second_countable_of_countable_cover ChartedSpace.second_countable_of_countable_cover
+#align charted_space.second_countable_of_countable_cover ChartedSpace.secondCountable_of_countable_cover
 
 variable (M)
 
-theorem ChartedSpace.second_countable_of_sigma_compact [SecondCountableTopology H]
+/- warning: charted_space.second_countable_of_sigma_compact -> ChartedSpace.secondCountable_of_sigma_compact is a dubious translation:
+lean 3 declaration is
+  forall (H : Type.{u1}) (M : Type.{u2}) [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] [_inst_4 : TopologicalSpace.SecondCountableTopology.{u1} H _inst_1] [_inst_5 : SigmaCompactSpace.{u2} M _inst_2], TopologicalSpace.SecondCountableTopology.{u2} M _inst_2
+but is expected to have type
+  forall (H : Type.{u2}) (M : Type.{u1}) [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] [_inst_4 : TopologicalSpace.SecondCountableTopology.{u2} H _inst_1] [_inst_5 : SigmaCompactSpace.{u1} M _inst_2], TopologicalSpace.SecondCountableTopology.{u1} M _inst_2
+Case conversion may be inaccurate. Consider using '#align charted_space.second_countable_of_sigma_compact ChartedSpace.secondCountable_of_sigma_compactₓ'. -/
+theorem ChartedSpace.secondCountable_of_sigma_compact [SecondCountableTopology H]
     [SigmaCompactSpace M] : SecondCountableTopology M :=
   by
   obtain ⟨s, hsc, hsU⟩ :
     ∃ s, Set.Countable s ∧ (⋃ (x) (hx : x ∈ s), (chart_at H x).source) = univ :=
     countable_cover_nhds_of_sigma_compact fun x : M => chart_source_mem_nhds H x
-  exact ChartedSpace.second_countable_of_countable_cover H hsU hsc
-#align charted_space.second_countable_of_sigma_compact ChartedSpace.second_countable_of_sigma_compact
-
+  exact ChartedSpace.secondCountable_of_countable_cover H hsU hsc
+#align charted_space.second_countable_of_sigma_compact ChartedSpace.secondCountable_of_sigma_compact
+
+/- warning: charted_space.locally_compact -> ChartedSpace.locallyCompact is a dubious translation:
+lean 3 declaration is
+  forall (H : Type.{u1}) (M : Type.{u2}) [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] [_inst_4 : LocallyCompactSpace.{u1} H _inst_1], LocallyCompactSpace.{u2} M _inst_2
+but is expected to have type
+  forall (H : Type.{u2}) (M : Type.{u1}) [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] [_inst_4 : LocallyCompactSpace.{u2} H _inst_1], LocallyCompactSpace.{u1} M _inst_2
+Case conversion may be inaccurate. Consider using '#align charted_space.locally_compact ChartedSpace.locallyCompactₓ'. -/
 /-- If a topological space admits an atlas with locally compact charts, then the space itself
 is locally compact. -/
-theorem ChartedSpace.locally_compact [LocallyCompactSpace H] : LocallyCompactSpace M :=
+theorem ChartedSpace.locallyCompact [LocallyCompactSpace H] : LocallyCompactSpace M :=
   by
   have :
     ∀ x : M,
@@ -618,8 +740,14 @@ theorem ChartedSpace.locally_compact [LocallyCompactSpace H] : LocallyCompactSpa
   refine' locallyCompactSpace_of_hasBasis this _
   rintro x s ⟨h₁, h₂, h₃⟩
   exact h₂.image_of_continuous_on ((chart_at H x).continuousOn_symm.mono h₃)
-#align charted_space.locally_compact ChartedSpace.locally_compact
-
+#align charted_space.locally_compact ChartedSpace.locallyCompact
+
+/- warning: charted_space.locally_connected_space -> ChartedSpace.locallyConnectedSpace is a dubious translation:
+lean 3 declaration is
+  forall (H : Type.{u1}) (M : Type.{u2}) [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] [_inst_4 : LocallyConnectedSpace.{u1} H _inst_1], LocallyConnectedSpace.{u2} M _inst_2
+but is expected to have type
+  forall (H : Type.{u2}) (M : Type.{u1}) [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] [_inst_4 : LocallyConnectedSpace.{u2} H _inst_1], LocallyConnectedSpace.{u1} M _inst_2
+Case conversion may be inaccurate. Consider using '#align charted_space.locally_connected_space ChartedSpace.locallyConnectedSpaceₓ'. -/
 /-- If a topological space admits an atlas with locally connected charts, then the space itself is
 locally connected. -/
 theorem ChartedSpace.locallyConnectedSpace [LocallyConnectedSpace H] : LocallyConnectedSpace M :=
@@ -637,6 +765,7 @@ theorem ChartedSpace.locallyConnectedSpace [LocallyConnectedSpace H] : LocallyCo
     exact hsconn.is_preconnected.image _ ((E x).continuousOn_symm.mono hssubset)
 #align charted_space.locally_connected_space ChartedSpace.locallyConnectedSpace
 
+#print ChartedSpace.comp /-
 /-- If `M` is modelled on `H'` and `H'` is itself modelled on `H`, then we can consider `M` as being
 modelled on `H`. -/
 def ChartedSpace.comp (H : Type _) [TopologicalSpace H] (H' : Type _) [TopologicalSpace H']
@@ -647,6 +776,7 @@ def ChartedSpace.comp (H : Type _) [TopologicalSpace H] (H' : Type _) [Topologic
   mem_chart_source p := by simp only [mfld_simps]
   chart_mem_atlas p := ⟨chartAt H' p, chartAt H _, chart_mem_atlas H' p, chart_mem_atlas H _, rfl⟩
 #align charted_space.comp ChartedSpace.comp
+-/
 
 end
 
@@ -666,30 +796,42 @@ of `id` and `id` is not defeq to `id`), which is bad as we know. This expedient
 solves this problem. -/
 
 
+#print ModelProd /-
 /-- Same thing as `H × H'` We introduce it for technical reasons,
 see note [Manifold type tags]. -/
 def ModelProd (H : Type _) (H' : Type _) :=
   H × H'
 #align model_prod ModelProd
+-/
 
+#print ModelPi /-
 /-- Same thing as `Π i, H i` We introduce it for technical reasons,
 see note [Manifold type tags]. -/
 def ModelPi {ι : Type _} (H : ι → Type _) :=
   ∀ i, H i
 #align model_pi ModelPi
+-/
 
 section
 
 attribute [local reducible] ModelProd
 
+#print modelProdInhabited /-
 instance modelProdInhabited [Inhabited H] [Inhabited H'] : Inhabited (ModelProd H H') :=
   Prod.inhabited
 #align model_prod_inhabited modelProdInhabited
+-/
 
 instance (H : Type _) [TopologicalSpace H] (H' : Type _) [TopologicalSpace H'] :
     TopologicalSpace (ModelProd H H') :=
   Prod.topologicalSpace
 
+/- warning: model_prod_range_prod_id -> modelProd_range_prod_id is a dubious translation:
+lean 3 declaration is
+  forall {H : Type.{u1}} {H' : Type.{u2}} {α : Type.{u3}} (f : H -> α), Eq.{succ (max u3 u2)} (Set.{max u3 u2} (Prod.{u3, u2} α H')) (Set.range.{max u3 u2, max (succ u1) (succ u2)} (Prod.{u3, u2} α H') (ModelProd.{u1, u2} H H') (fun (p : ModelProd.{u1, u2} H H') => Prod.mk.{u3, u2} α H' (f (Prod.fst.{u1, u2} H H' p)) (Prod.snd.{u1, u2} H H' p))) (Set.prod.{u3, u2} α H' (Set.range.{u3, succ u1} α H f) (Set.univ.{u2} H'))
+but is expected to have type
+  forall {H : Type.{u3}} {H' : Type.{u2}} {α : Type.{u1}} (f : H -> α), Eq.{max (succ u2) (succ u1)} (Set.{max u2 u1} (Prod.{u1, u2} α H')) (Set.range.{max u2 u1, max (succ u3) (succ u2)} (Prod.{u1, u2} α H') (ModelProd.{u3, u2} H H') (fun (p : ModelProd.{u3, u2} H H') => Prod.mk.{u1, u2} α H' (f (Prod.fst.{u3, u2} H H' p)) (Prod.snd.{u3, u2} H H' p))) (Set.prod.{u1, u2} α H' (Set.range.{u1, succ u3} α H f) (Set.univ.{u2} H'))
+Case conversion may be inaccurate. Consider using '#align model_prod_range_prod_id modelProd_range_prod_idₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 -- Next lemma shows up often when dealing with derivatives, register it as simp.
 @[simp, mfld_simps]
@@ -704,15 +846,23 @@ section
 
 variable {ι : Type _} {Hi : ι → Type _}
 
+#print modelPiInhabited /-
 instance modelPiInhabited [∀ i, Inhabited (Hi i)] : Inhabited (ModelPi Hi) :=
   Pi.inhabited _
 #align model_pi_inhabited modelPiInhabited
+-/
 
 instance [∀ i, TopologicalSpace (Hi i)] : TopologicalSpace (ModelPi Hi) :=
   Pi.topologicalSpace
 
 end
 
+/- warning: prod_charted_space -> prodChartedSpace is a dubious translation:
+lean 3 declaration is
+  forall (H : Type.{u1}) [_inst_1 : TopologicalSpace.{u1} H] (M : Type.{u2}) [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] (H' : Type.{u3}) [_inst_4 : TopologicalSpace.{u3} H'] (M' : Type.{u4}) [_inst_5 : TopologicalSpace.{u4} M'] [_inst_6 : ChartedSpace.{u3, u4} H' _inst_4 M' _inst_5], ChartedSpace.{max u1 u3, max u2 u4} (ModelProd.{u1, u3} H H') (ModelProd.topologicalSpace.{u1, u3} H _inst_1 H' _inst_4) (Prod.{u2, u4} M M') (Prod.topologicalSpace.{u2, u4} M M' _inst_2 _inst_5)
+but is expected to have type
+  forall (H : Type.{u1}) [_inst_1 : TopologicalSpace.{u1} H] (M : Type.{u2}) [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] (H' : Type.{u3}) [_inst_4 : TopologicalSpace.{u3} H'] (M' : Type.{u4}) [_inst_5 : TopologicalSpace.{u4} M'] [_inst_6 : ChartedSpace.{u3, u4} H' _inst_4 M' _inst_5], ChartedSpace.{max u3 u1, max u4 u2} (ModelProd.{u1, u3} H H') (instTopologicalSpaceModelProd.{u1, u3} H _inst_1 H' _inst_4) (Prod.{u2, u4} M M') (instTopologicalSpaceProd.{u2, u4} M M' _inst_2 _inst_5)
+Case conversion may be inaccurate. Consider using '#align prod_charted_space prodChartedSpaceₓ'. -/
 /-- The product of two charted spaces is naturally a charted space, with the canonical
 construction of the atlas of product maps. -/
 instance prodChartedSpace (H : Type _) [TopologicalSpace H] (M : Type _) [TopologicalSpace M]
@@ -730,12 +880,24 @@ section prodChartedSpace
 variable [TopologicalSpace H] [TopologicalSpace M] [ChartedSpace H M] [TopologicalSpace H']
   [TopologicalSpace M'] [ChartedSpace H' M'] {x : M × M'}
 
+/- warning: prod_charted_space_chart_at -> prodChartedSpace_chartAt is a dubious translation:
+lean 3 declaration is
+  forall {H : Type.{u1}} {H' : Type.{u2}} {M : Type.{u3}} {M' : Type.{u4}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u3} M] [_inst_3 : ChartedSpace.{u1, u3} H _inst_1 M _inst_2] [_inst_4 : TopologicalSpace.{u2} H'] [_inst_5 : TopologicalSpace.{u4} M'] [_inst_6 : ChartedSpace.{u2, u4} H' _inst_4 M' _inst_5] {x : Prod.{u3, u4} M M'}, Eq.{max (succ (max u3 u4)) (succ (max u1 u2))} (LocalHomeomorph.{max u3 u4, max u1 u2} (Prod.{u3, u4} M M') (ModelProd.{u1, u2} H H') (Prod.topologicalSpace.{u3, u4} M M' _inst_2 _inst_5) (ModelProd.topologicalSpace.{u1, u2} H _inst_1 H' _inst_4)) (ChartedSpace.chartAt.{max u1 u2, max u3 u4} (ModelProd.{u1, u2} H H') (ModelProd.topologicalSpace.{u1, u2} H _inst_1 H' _inst_4) (Prod.{u3, u4} M M') (Prod.topologicalSpace.{u3, u4} M M' _inst_2 _inst_5) (prodChartedSpace.{u1, u3, u2, u4} H _inst_1 M _inst_2 _inst_3 H' _inst_4 M' _inst_5 _inst_6) x) (LocalHomeomorph.prod.{u3, u1, u4, u2} M H M' H' _inst_2 _inst_1 _inst_5 _inst_4 (ChartedSpace.chartAt.{u1, u3} H _inst_1 M _inst_2 _inst_3 (Prod.fst.{u3, u4} M M' x)) (ChartedSpace.chartAt.{u2, u4} H' _inst_4 M' _inst_5 _inst_6 (Prod.snd.{u3, u4} M M' x)))
+but is expected to have type
+  forall {H : Type.{u4}} {H' : Type.{u3}} {M : Type.{u2}} {M' : Type.{u1}} [_inst_1 : TopologicalSpace.{u4} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u4, u2} H _inst_1 M _inst_2] [_inst_4 : TopologicalSpace.{u3} H'] [_inst_5 : TopologicalSpace.{u1} M'] [_inst_6 : ChartedSpace.{u3, u1} H' _inst_4 M' _inst_5] {x : Prod.{u2, u1} M M'}, Eq.{max (max (max (succ u4) (succ u3)) (succ u2)) (succ u1)} (LocalHomeomorph.{max u2 u1, max u3 u4} (Prod.{u2, u1} M M') (ModelProd.{u4, u3} H H') (instTopologicalSpaceProd.{u2, u1} M M' _inst_2 _inst_5) (instTopologicalSpaceModelProd.{u4, u3} H _inst_1 H' _inst_4)) (ChartedSpace.chartAt.{max u3 u4, max u2 u1} (ModelProd.{u4, u3} H H') (instTopologicalSpaceModelProd.{u4, u3} H _inst_1 H' _inst_4) (Prod.{u2, u1} M M') (instTopologicalSpaceProd.{u2, u1} M M' _inst_2 _inst_5) (prodChartedSpace.{u4, u2, u3, u1} H _inst_1 M _inst_2 _inst_3 H' _inst_4 M' _inst_5 _inst_6) x) (LocalHomeomorph.prod.{u2, u4, u1, u3} M H M' H' _inst_2 _inst_1 _inst_5 _inst_4 (ChartedSpace.chartAt.{u4, u2} H _inst_1 M _inst_2 _inst_3 (Prod.fst.{u2, u1} M M' x)) (ChartedSpace.chartAt.{u3, u1} H' _inst_4 M' _inst_5 _inst_6 (Prod.snd.{u2, u1} M M' x)))
+Case conversion may be inaccurate. Consider using '#align prod_charted_space_chart_at prodChartedSpace_chartAtₓ'. -/
 @[simp, mfld_simps]
 theorem prodChartedSpace_chartAt :
     chartAt (ModelProd H H') x = (chartAt H x.fst).Prod (chartAt H' x.snd) :=
   rfl
 #align prod_charted_space_chart_at prodChartedSpace_chartAt
 
+/- warning: charted_space_self_prod -> chartedSpaceSelf_prod is a dubious translation:
+lean 3 declaration is
+  forall {H : Type.{u1}} {H' : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_4 : TopologicalSpace.{u2} H'], Eq.{succ (max u1 u2)} (ChartedSpace.{max u1 u2, max u1 u2} (ModelProd.{u1, u2} H H') (ModelProd.topologicalSpace.{u1, u2} H _inst_1 H' _inst_4) (Prod.{u1, u2} H H') (Prod.topologicalSpace.{u1, u2} H H' _inst_1 _inst_4)) (prodChartedSpace.{u1, u1, u2, u2} H _inst_1 H _inst_1 (chartedSpaceSelf.{u1} H _inst_1) H' _inst_4 H' _inst_4 (chartedSpaceSelf.{u2} H' _inst_4)) (chartedSpaceSelf.{max u1 u2} (Prod.{u1, u2} H H') (ModelProd.topologicalSpace.{u1, u2} H _inst_1 H' _inst_4))
+but is expected to have type
+  forall {H : Type.{u2}} {H' : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_4 : TopologicalSpace.{u1} H'], Eq.{max (succ u2) (succ u1)} (ChartedSpace.{max u1 u2, max u1 u2} (ModelProd.{u2, u1} H H') (instTopologicalSpaceModelProd.{u2, u1} H _inst_1 H' _inst_4) (Prod.{u2, u1} H H') (instTopologicalSpaceProd.{u2, u1} H H' _inst_1 _inst_4)) (prodChartedSpace.{u2, u2, u1, u1} H _inst_1 H _inst_1 (chartedSpaceSelf.{u2} H _inst_1) H' _inst_4 H' _inst_4 (chartedSpaceSelf.{u1} H' _inst_4)) (chartedSpaceSelf.{max u1 u2} (Prod.{u2, u1} H H') (instTopologicalSpaceProd.{u2, u1} H H' _inst_1 _inst_4))
+Case conversion may be inaccurate. Consider using '#align charted_space_self_prod chartedSpaceSelf_prodₓ'. -/
 theorem chartedSpaceSelf_prod : prodChartedSpace H H H' H' = chartedSpaceSelf (H × H') :=
   by
   ext1
@@ -747,6 +909,7 @@ theorem chartedSpaceSelf_prod : prodChartedSpace H H H' H' = chartedSpaceSelf (H
 
 end prodChartedSpace
 
+#print piChartedSpace /-
 /-- The product of a finite family of charted spaces is naturally a charted space, with the
 canonical construction of the atlas of finite product maps. -/
 instance piChartedSpace {ι : Type _} [Fintype ι] (H : ι → Type _) [∀ i, TopologicalSpace (H i)]
@@ -758,7 +921,14 @@ instance piChartedSpace {ι : Type _} [Fintype ι] (H : ι → Type _) [∀ i, T
   mem_chart_source f i hi := mem_chart_source (H i) (f i)
   chart_mem_atlas f := mem_image_of_mem _ fun i hi => chart_mem_atlas (H i) (f i)
 #align pi_charted_space piChartedSpace
+-/
 
+/- warning: pi_charted_space_chart_at -> piChartedSpace_chartAt is a dubious translation:
+lean 3 declaration is
+  forall {ι : Type.{u1}} [_inst_1 : Fintype.{u1} ι] (H : ι -> Type.{u2}) [_inst_2 : forall (i : ι), TopologicalSpace.{u2} (H i)] (M : ι -> Type.{u3}) [_inst_3 : forall (i : ι), TopologicalSpace.{u3} (M i)] [_inst_4 : forall (i : ι), ChartedSpace.{u2, u3} (H i) (_inst_2 i) (M i) (_inst_3 i)] (f : forall (i : ι), M i), Eq.{max (succ (max u1 u3)) (succ (max u1 u2))} (LocalHomeomorph.{max u1 u3, max u1 u2} (forall (i : ι), M i) (ModelPi.{u1, u2} ι H) (Pi.topologicalSpace.{u1, u3} ι (fun (i : ι) => M i) (fun (a : ι) => _inst_3 a)) (ModelPi.topologicalSpace.{u1, u2} ι H (fun (i : ι) => _inst_2 i))) (ChartedSpace.chartAt.{max u1 u2, max u1 u3} (ModelPi.{u1, u2} ι H) (ModelPi.topologicalSpace.{u1, u2} ι H (fun (i : ι) => _inst_2 i)) (forall (i : ι), M i) (Pi.topologicalSpace.{u1, u3} ι (fun (i : ι) => M i) (fun (a : ι) => _inst_3 a)) (piChartedSpace.{u1, u2, u3} ι _inst_1 H (fun (i : ι) => _inst_2 i) (fun (i : ι) => M i) (fun (a : ι) => _inst_3 a) (fun (i : ι) => _inst_4 i)) f) (LocalHomeomorph.pi.{u1, u3, u2} ι _inst_1 (fun (i : ι) => M i) (fun (i : ι) => H i) (fun (i : ι) => _inst_3 i) (fun (a : ι) => (fun (i : ι) => _inst_2 i) a) (fun (i : ι) => ChartedSpace.chartAt.{u2, u3} (H i) ((fun (i : ι) => _inst_2 i) i) (M i) (_inst_3 i) (_inst_4 i) (f i)))
+but is expected to have type
+  forall {ι : Type.{u3}} [_inst_1 : Fintype.{u3} ι] (H : ι -> Type.{u2}) [_inst_2 : forall (i : ι), TopologicalSpace.{u2} (H i)] (M : ι -> Type.{u1}) [_inst_3 : forall (i : ι), TopologicalSpace.{u1} (M i)] [_inst_4 : forall (i : ι), ChartedSpace.{u2, u1} (H i) (_inst_2 i) (M i) (_inst_3 i)] (f : forall (i : ι), M i), Eq.{max (max (succ u3) (succ u2)) (succ u1)} (LocalHomeomorph.{max u3 u1, max u2 u3} (forall (i : ι), M i) (ModelPi.{u3, u2} ι H) (Pi.topologicalSpace.{u3, u1} ι (fun (i : ι) => M i) (fun (a : ι) => _inst_3 a)) (instTopologicalSpaceModelPi.{u3, u2} ι H (fun (i : ι) => _inst_2 i))) (ChartedSpace.chartAt.{max u2 u3, max u3 u1} (ModelPi.{u3, u2} ι H) (instTopologicalSpaceModelPi.{u3, u2} ι H (fun (i : ι) => _inst_2 i)) (forall (i : ι), M i) (Pi.topologicalSpace.{u3, u1} ι (fun (i : ι) => M i) (fun (a : ι) => _inst_3 a)) (piChartedSpace.{u3, u2, u1} ι _inst_1 H (fun (i : ι) => _inst_2 i) (fun (i : ι) => M i) (fun (a : ι) => _inst_3 a) (fun (i : ι) => _inst_4 i)) f) (LocalHomeomorph.pi.{u3, u1, u2} ι _inst_1 (fun (i : ι) => M i) (fun (i : ι) => H i) (fun (i : ι) => _inst_3 i) (fun (a : ι) => (fun (i : ι) => _inst_2 i) a) (fun (i : ι) => ChartedSpace.chartAt.{u2, u1} (H i) ((fun (i : ι) => _inst_2 i) i) (M i) (_inst_3 i) (_inst_4 i) (f i)))
+Case conversion may be inaccurate. Consider using '#align pi_charted_space_chart_at piChartedSpace_chartAtₓ'. -/
 @[simp, mfld_simps]
 theorem piChartedSpace_chartAt {ι : Type _} [Fintype ι] (H : ι → Type _)
     [∀ i, TopologicalSpace (H i)] (M : ι → Type _) [∀ i, TopologicalSpace (M i)]
@@ -772,6 +942,7 @@ end ChartedSpace
 /-! ### Constructing a topology from an atlas -/
 
 
+#print ChartedSpaceCore /-
 /-- Sometimes, one may want to construct a charted space structure on a space which does not yet
 have a topological structure, where the topology would come from the charts. For this, one needs
 charts that are only local equivs, and continuity properties for their composition.
@@ -787,17 +958,26 @@ structure ChartedSpaceCore (H : Type _) [TopologicalSpace H] (M : Type _) where
     ∀ e e' : LocalEquiv M H,
       e ∈ atlas → e' ∈ atlas → ContinuousOn (e.symm.trans e') (e.symm.trans e').source
 #align charted_space_core ChartedSpaceCore
+-/
 
 namespace ChartedSpaceCore
 
 variable [TopologicalSpace H] (c : ChartedSpaceCore H M) {e : LocalEquiv M H}
 
+#print ChartedSpaceCore.toTopologicalSpace /-
 /-- Topology generated by a set of charts on a Type. -/
 protected def toTopologicalSpace : TopologicalSpace M :=
   TopologicalSpace.generateFrom <|
     ⋃ (e : LocalEquiv M H) (he : e ∈ c.atlas) (s : Set H) (s_open : IsOpen s), {e ⁻¹' s ∩ e.source}
 #align charted_space_core.to_topological_space ChartedSpaceCore.toTopologicalSpace
+-/
 
+/- warning: charted_space_core.open_source' -> ChartedSpaceCore.open_source' is a dubious translation:
+lean 3 declaration is
+  forall {H : Type.{u1}} {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] (c : ChartedSpaceCore.{u1, u2} H _inst_1 M) {e : LocalEquiv.{u2, u1} M H}, (Membership.Mem.{max u2 u1, max u2 u1} (LocalEquiv.{u2, u1} M H) (Set.{max u2 u1} (LocalEquiv.{u2, u1} M H)) (Set.hasMem.{max u2 u1} (LocalEquiv.{u2, u1} M H)) e (ChartedSpaceCore.atlas.{u1, u2} H _inst_1 M c)) -> (IsOpen.{u2} M (ChartedSpaceCore.toTopologicalSpace.{u1, u2} H M _inst_1 c) (LocalEquiv.source.{u2, u1} M H e))
+but is expected to have type
+  forall {H : Type.{u2}} {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] (c : ChartedSpaceCore.{u2, u1} H _inst_1 M) {e : LocalEquiv.{u1, u2} M H}, (Membership.mem.{max u2 u1, max u2 u1} (LocalEquiv.{u1, u2} M H) (Set.{max u2 u1} (LocalEquiv.{u1, u2} M H)) (Set.instMembershipSet.{max u2 u1} (LocalEquiv.{u1, u2} M H)) e (ChartedSpaceCore.atlas.{u2, u1} H _inst_1 M c)) -> (IsOpen.{u1} M (ChartedSpaceCore.toTopologicalSpace.{u2, u1} H M _inst_1 c) (LocalEquiv.source.{u1, u2} M H e))
+Case conversion may be inaccurate. Consider using '#align charted_space_core.open_source' ChartedSpaceCore.open_source'ₓ'. -/
 theorem open_source' (he : e ∈ c.atlas) : is_open[c.toTopologicalSpace] e.source :=
   by
   apply TopologicalSpace.GenerateOpen.basic
@@ -806,6 +986,12 @@ theorem open_source' (he : e ∈ c.atlas) : is_open[c.toTopologicalSpace] e.sour
   simp only [Set.univ_inter, Set.preimage_univ]
 #align charted_space_core.open_source' ChartedSpaceCore.open_source'
 
+/- warning: charted_space_core.open_target -> ChartedSpaceCore.open_target is a dubious translation:
+lean 3 declaration is
+  forall {H : Type.{u1}} {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] (c : ChartedSpaceCore.{u1, u2} H _inst_1 M) {e : LocalEquiv.{u2, u1} M H}, (Membership.Mem.{max u2 u1, max u2 u1} (LocalEquiv.{u2, u1} M H) (Set.{max u2 u1} (LocalEquiv.{u2, u1} M H)) (Set.hasMem.{max u2 u1} (LocalEquiv.{u2, u1} M H)) e (ChartedSpaceCore.atlas.{u1, u2} H _inst_1 M c)) -> (IsOpen.{u1} H _inst_1 (LocalEquiv.target.{u2, u1} M H e))
+but is expected to have type
+  forall {H : Type.{u2}} {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] (c : ChartedSpaceCore.{u2, u1} H _inst_1 M) {e : LocalEquiv.{u1, u2} M H}, (Membership.mem.{max u2 u1, max u2 u1} (LocalEquiv.{u1, u2} M H) (Set.{max u2 u1} (LocalEquiv.{u1, u2} M H)) (Set.instMembershipSet.{max u2 u1} (LocalEquiv.{u1, u2} M H)) e (ChartedSpaceCore.atlas.{u2, u1} H _inst_1 M c)) -> (IsOpen.{u2} H _inst_1 (LocalEquiv.target.{u1, u2} M H e))
+Case conversion may be inaccurate. Consider using '#align charted_space_core.open_target ChartedSpaceCore.open_targetₓ'. -/
 theorem open_target (he : e ∈ c.atlas) : IsOpen e.target :=
   by
   have E : e.target ∩ e.symm ⁻¹' e.source = e.target :=
@@ -814,6 +1000,7 @@ theorem open_target (he : e ∈ c.atlas) : IsOpen e.target :=
   simpa [LocalEquiv.trans_source, E] using c.open_source e e he he
 #align charted_space_core.open_target ChartedSpaceCore.open_target
 
+#print ChartedSpaceCore.localHomeomorph /-
 /-- An element of the atlas in a charted space without topology becomes a local homeomorphism
 for the topology constructed from this atlas. The `local_homeomorph` version is given in this
 definition. -/
@@ -851,7 +1038,9 @@ protected def localHomeomorph (e : LocalEquiv M H) (he : e ∈ c.atlas) :
         exact inter_comm _ _
       simpa [LocalEquiv.trans_source, preimage_inter, preimage_comp.symm, A] using this }
 #align charted_space_core.local_homeomorph ChartedSpaceCore.localHomeomorph
+-/
 
+#print ChartedSpaceCore.toChartedSpace /-
 /-- Given a charted space without topology, endow it with a genuine charted space structure with
 respect to the topology constructed from the atlas. -/
 def toChartedSpace : @ChartedSpace H _ M c.toTopologicalSpace
@@ -863,6 +1052,7 @@ def toChartedSpace : @ChartedSpace H _ M c.toTopologicalSpace
     simp only [mem_Union, mem_singleton_iff]
     exact ⟨c.chart_at x, c.chart_mem_atlas x, rfl⟩
 #align charted_space_core.to_charted_space ChartedSpaceCore.toChartedSpace
+-/
 
 end ChartedSpaceCore
 
@@ -873,6 +1063,7 @@ section HasGroupoid
 
 variable [TopologicalSpace H] [TopologicalSpace M] [ChartedSpace H M]
 
+#print HasGroupoid /-
 /- ./././Mathport/Syntax/Translate/Command.lean:388:30: infer kinds are unsupported in Lean 4: #[`compatible] [] -/
 /-- A charted space has an atlas in a groupoid `G` if the change of coordinates belong to the
 groupoid -/
@@ -880,7 +1071,14 @@ class HasGroupoid {H : Type _} [TopologicalSpace H] (M : Type _) [TopologicalSpa
   [ChartedSpace H M] (G : StructureGroupoid H) : Prop where
   compatible : ∀ {e e' : LocalHomeomorph M H}, e ∈ atlas H M → e' ∈ atlas H M → e.symm ≫ₕ e' ∈ G
 #align has_groupoid HasGroupoid
+-/
 
+/- warning: structure_groupoid.compatible -> StructureGroupoid.compatible is a dubious translation:
+lean 3 declaration is
+  forall {H : Type.{u1}} [_inst_4 : TopologicalSpace.{u1} H] (G : StructureGroupoid.{u1} H _inst_4) {M : Type.{u2}} [_inst_5 : TopologicalSpace.{u2} M] [_inst_6 : ChartedSpace.{u1, u2} H _inst_4 M _inst_5] [_inst_7 : HasGroupoid.{u1, u2} H _inst_4 M _inst_5 _inst_6 G] {e : LocalHomeomorph.{u2, u1} M H _inst_5 _inst_4} {e' : LocalHomeomorph.{u2, u1} M H _inst_5 _inst_4}, (Membership.Mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_5 _inst_4) (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_5 _inst_4)) (Set.hasMem.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_5 _inst_4)) e (ChartedSpace.atlas.{u1, u2} H _inst_4 M _inst_5 _inst_6)) -> (Membership.Mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_5 _inst_4) (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_5 _inst_4)) (Set.hasMem.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_5 _inst_4)) e' (ChartedSpace.atlas.{u1, u2} H _inst_4 M _inst_5 _inst_6)) -> (Membership.Mem.{u1, u1} (LocalHomeomorph.{u1, u1} H H _inst_4 _inst_4) (StructureGroupoid.{u1} H _inst_4) (StructureGroupoid.hasMem.{u1} H _inst_4) (LocalHomeomorph.trans.{u1, u2, u1} H M H _inst_4 _inst_5 _inst_4 (LocalHomeomorph.symm.{u2, u1} M H _inst_5 _inst_4 e) e') G)
+but is expected to have type
+  forall {H : Type.{u2}} [_inst_4 : TopologicalSpace.{u2} H] (G : StructureGroupoid.{u2} H _inst_4) {M : Type.{u1}} [_inst_5 : TopologicalSpace.{u1} M] [_inst_6 : ChartedSpace.{u2, u1} H _inst_4 M _inst_5] [_inst_7 : HasGroupoid.{u2, u1} H _inst_4 M _inst_5 _inst_6 G] {e : LocalHomeomorph.{u1, u2} M H _inst_5 _inst_4} {e' : LocalHomeomorph.{u1, u2} M H _inst_5 _inst_4}, (Membership.mem.{max u2 u1, max u1 u2} (LocalHomeomorph.{u1, u2} M H _inst_5 _inst_4) (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_5 _inst_4)) (Set.instMembershipSet.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_5 _inst_4)) e (ChartedSpace.atlas.{u2, u1} H _inst_4 M _inst_5 _inst_6)) -> (Membership.mem.{max u2 u1, max u1 u2} (LocalHomeomorph.{u1, u2} M H _inst_5 _inst_4) (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_5 _inst_4)) (Set.instMembershipSet.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_5 _inst_4)) e' (ChartedSpace.atlas.{u2, u1} H _inst_4 M _inst_5 _inst_6)) -> (Membership.mem.{u2, u2} (LocalHomeomorph.{u2, u2} H H _inst_4 _inst_4) (StructureGroupoid.{u2} H _inst_4) (instMembershipLocalHomeomorphStructureGroupoid.{u2} H _inst_4) (LocalHomeomorph.trans.{u2, u1, u2} H M H _inst_4 _inst_5 _inst_4 (LocalHomeomorph.symm.{u1, u2} M H _inst_5 _inst_4 e) e') G)
+Case conversion may be inaccurate. Consider using '#align structure_groupoid.compatible StructureGroupoid.compatibleₓ'. -/
 /-- Reformulate in the `structure_groupoid` namespace the compatibility condition of charts in a
 charted space admitting a structure groupoid, to make it more easily accessible with dot
 notation. -/
@@ -890,11 +1088,23 @@ theorem StructureGroupoid.compatible {H : Type _} [TopologicalSpace H] (G : Stru
   HasGroupoid.compatible G he he'
 #align structure_groupoid.compatible StructureGroupoid.compatible
 
+/- warning: has_groupoid_of_le -> hasGroupoid_of_le is a dubious translation:
+lean 3 declaration is
+  forall {H : Type.{u1}} {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] {G₁ : StructureGroupoid.{u1} H _inst_1} {G₂ : StructureGroupoid.{u1} H _inst_1}, (HasGroupoid.{u1, u2} H _inst_1 M _inst_2 _inst_3 G₁) -> (LE.le.{u1} (StructureGroupoid.{u1} H _inst_1) (Preorder.toLE.{u1} (StructureGroupoid.{u1} H _inst_1) (PartialOrder.toPreorder.{u1} (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.partialOrder.{u1} H _inst_1))) G₁ G₂) -> (HasGroupoid.{u1, u2} H _inst_1 M _inst_2 _inst_3 G₂)
+but is expected to have type
+  forall {H : Type.{u2}} {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] {G₁ : StructureGroupoid.{u2} H _inst_1} {G₂ : StructureGroupoid.{u2} H _inst_1}, (HasGroupoid.{u2, u1} H _inst_1 M _inst_2 _inst_3 G₁) -> (LE.le.{u2} (StructureGroupoid.{u2} H _inst_1) (Preorder.toLE.{u2} (StructureGroupoid.{u2} H _inst_1) (PartialOrder.toPreorder.{u2} (StructureGroupoid.{u2} H _inst_1) (StructureGroupoid.partialOrder.{u2} H _inst_1))) G₁ G₂) -> (HasGroupoid.{u2, u1} H _inst_1 M _inst_2 _inst_3 G₂)
+Case conversion may be inaccurate. Consider using '#align has_groupoid_of_le hasGroupoid_of_leₓ'. -/
 theorem hasGroupoid_of_le {G₁ G₂ : StructureGroupoid H} (h : HasGroupoid M G₁) (hle : G₁ ≤ G₂) :
     HasGroupoid M G₂ :=
   ⟨fun e e' he he' => hle (h.compatible he he')⟩
 #align has_groupoid_of_le hasGroupoid_of_le
 
+/- warning: has_groupoid_of_pregroupoid -> hasGroupoid_of_pregroupoid is a dubious translation:
+lean 3 declaration is
+  forall {H : Type.{u1}} {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] (PG : Pregroupoid.{u1} H _inst_1), (forall {e : LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1} {e' : LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1}, (Membership.Mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (Set.hasMem.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) e (ChartedSpace.atlas.{u1, u2} H _inst_1 M _inst_2 _inst_3)) -> (Membership.Mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (Set.hasMem.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) e' (ChartedSpace.atlas.{u1, u2} H _inst_1 M _inst_2 _inst_3)) -> (Pregroupoid.Property.{u1} H _inst_1 PG (coeFn.{succ u1, succ u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (fun (_x : LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) => H -> H) (LocalHomeomorph.hasCoeToFun.{u1, u1} H H _inst_1 _inst_1) (LocalHomeomorph.trans.{u1, u2, u1} H M H _inst_1 _inst_2 _inst_1 (LocalHomeomorph.symm.{u2, u1} M H _inst_2 _inst_1 e) e')) (LocalEquiv.source.{u1, u1} H H (LocalHomeomorph.toLocalEquiv.{u1, u1} H H _inst_1 _inst_1 (LocalHomeomorph.trans.{u1, u2, u1} H M H _inst_1 _inst_2 _inst_1 (LocalHomeomorph.symm.{u2, u1} M H _inst_2 _inst_1 e) e'))))) -> (HasGroupoid.{u1, u2} H _inst_1 M _inst_2 _inst_3 (Pregroupoid.groupoid.{u1} H _inst_1 PG))
+but is expected to have type
+  forall {H : Type.{u2}} {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] (PG : Pregroupoid.{u2} H _inst_1), (forall {e : LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1} {e' : LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1}, (Membership.mem.{max u2 u1, max u1 u2} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) (Set.instMembershipSet.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) e (ChartedSpace.atlas.{u2, u1} H _inst_1 M _inst_2 _inst_3)) -> (Membership.mem.{max u2 u1, max u1 u2} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) (Set.instMembershipSet.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) e' (ChartedSpace.atlas.{u2, u1} H _inst_1 M _inst_2 _inst_3)) -> (Pregroupoid.property.{u2} H _inst_1 PG (LocalHomeomorph.toFun'.{u2, u2} H H _inst_1 _inst_1 (LocalHomeomorph.trans.{u2, u1, u2} H M H _inst_1 _inst_2 _inst_1 (LocalHomeomorph.symm.{u1, u2} M H _inst_2 _inst_1 e) e')) (LocalEquiv.source.{u2, u2} H H (LocalHomeomorph.toLocalEquiv.{u2, u2} H H _inst_1 _inst_1 (LocalHomeomorph.trans.{u2, u1, u2} H M H _inst_1 _inst_2 _inst_1 (LocalHomeomorph.symm.{u1, u2} M H _inst_2 _inst_1 e) e'))))) -> (HasGroupoid.{u2, u1} H _inst_1 M _inst_2 _inst_3 (Pregroupoid.groupoid.{u2} H _inst_1 PG))
+Case conversion may be inaccurate. Consider using '#align has_groupoid_of_pregroupoid hasGroupoid_of_pregroupoidₓ'. -/
 theorem hasGroupoid_of_pregroupoid (PG : Pregroupoid H)
     (h :
       ∀ {e e' : LocalHomeomorph M H},
@@ -903,6 +1113,7 @@ theorem hasGroupoid_of_pregroupoid (PG : Pregroupoid H)
   ⟨fun e e' he he' => mem_groupoid_of_pregroupoid.mpr ⟨h he he', h he' he⟩⟩
 #align has_groupoid_of_pregroupoid hasGroupoid_of_pregroupoid
 
+#print hasGroupoid_model_space /-
 /-- The trivial charted space structure on the model space is compatible with any groupoid -/
 instance hasGroupoid_model_space (H : Type _) [TopologicalSpace H] (G : StructureGroupoid H) :
     HasGroupoid H G
@@ -913,7 +1124,9 @@ instance hasGroupoid_model_space (H : Type _) [TopologicalSpace H] (G : Structur
     rw [chartedSpaceSelf_atlas] at he he'
     simp [he, he', StructureGroupoid.id_mem]
 #align has_groupoid_model_space hasGroupoid_model_space
+-/
 
+#print hasGroupoid_continuousGroupoid /-
 /-- Any charted space structure is compatible with the groupoid of all local homeomorphisms -/
 instance hasGroupoid_continuousGroupoid : HasGroupoid M (continuousGroupoid H) :=
   ⟨by
@@ -921,25 +1134,40 @@ instance hasGroupoid_continuousGroupoid : HasGroupoid M (continuousGroupoid H) :
     rw [continuousGroupoid, mem_groupoid_of_pregroupoid]
     simp only [and_self_iff]⟩
 #align has_groupoid_continuous_groupoid hasGroupoid_continuousGroupoid
+-/
 
 section MaximalAtlas
 
 variable (M) (G : StructureGroupoid H)
 
+#print StructureGroupoid.maximalAtlas /-
 /-- Given a charted space admitting a structure groupoid, the maximal atlas associated to this
 structure groupoid is the set of all local charts that are compatible with the atlas, i.e., such
 that changing coordinates with an atlas member gives an element of the groupoid. -/
 def StructureGroupoid.maximalAtlas : Set (LocalHomeomorph M H) :=
   { e | ∀ e' ∈ atlas H M, e.symm ≫ₕ e' ∈ G ∧ e'.symm ≫ₕ e ∈ G }
 #align structure_groupoid.maximal_atlas StructureGroupoid.maximalAtlas
+-/
 
 variable {M}
 
+/- warning: structure_groupoid.subset_maximal_atlas -> StructureGroupoid.subset_maximalAtlas is a dubious translation:
+lean 3 declaration is
+  forall {H : Type.{u1}} {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] (G : StructureGroupoid.{u1} H _inst_1) [_inst_4 : HasGroupoid.{u1, u2} H _inst_1 M _inst_2 _inst_3 G], HasSubset.Subset.{max u2 u1} (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (Set.hasSubset.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (ChartedSpace.atlas.{u1, u2} H _inst_1 M _inst_2 _inst_3) (StructureGroupoid.maximalAtlas.{u1, u2} H M _inst_1 _inst_2 _inst_3 G)
+but is expected to have type
+  forall {H : Type.{u2}} {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] (G : StructureGroupoid.{u2} H _inst_1) [_inst_4 : HasGroupoid.{u2, u1} H _inst_1 M _inst_2 _inst_3 G], HasSubset.Subset.{max u1 u2} (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) (Set.instHasSubsetSet.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) (ChartedSpace.atlas.{u2, u1} H _inst_1 M _inst_2 _inst_3) (StructureGroupoid.maximalAtlas.{u2, u1} H M _inst_1 _inst_2 _inst_3 G)
+Case conversion may be inaccurate. Consider using '#align structure_groupoid.subset_maximal_atlas StructureGroupoid.subset_maximalAtlasₓ'. -/
 /-- The elements of the atlas belong to the maximal atlas for any structure groupoid -/
 theorem StructureGroupoid.subset_maximalAtlas [HasGroupoid M G] : atlas H M ⊆ G.maximalAtlas M :=
   fun e he e' he' => ⟨G.compatible he he', G.compatible he' he⟩
 #align structure_groupoid.subset_maximal_atlas StructureGroupoid.subset_maximalAtlas
 
+/- warning: structure_groupoid.chart_mem_maximal_atlas -> StructureGroupoid.chart_mem_maximalAtlas is a dubious translation:
+lean 3 declaration is
+  forall {H : Type.{u1}} {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] (G : StructureGroupoid.{u1} H _inst_1) [_inst_4 : HasGroupoid.{u1, u2} H _inst_1 M _inst_2 _inst_3 G] (x : M), Membership.Mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (Set.hasMem.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (ChartedSpace.chartAt.{u1, u2} H _inst_1 M _inst_2 _inst_3 x) (StructureGroupoid.maximalAtlas.{u1, u2} H M _inst_1 _inst_2 _inst_3 G)
+but is expected to have type
+  forall {H : Type.{u2}} {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] (G : StructureGroupoid.{u2} H _inst_1) [_inst_4 : HasGroupoid.{u2, u1} H _inst_1 M _inst_2 _inst_3 G] (x : M), Membership.mem.{max u1 u2, max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) (Set.instMembershipSet.{max u1 u2} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) (ChartedSpace.chartAt.{u2, u1} H _inst_1 M _inst_2 _inst_3 x) (StructureGroupoid.maximalAtlas.{u2, u1} H M _inst_1 _inst_2 _inst_3 G)
+Case conversion may be inaccurate. Consider using '#align structure_groupoid.chart_mem_maximal_atlas StructureGroupoid.chart_mem_maximalAtlasₓ'. -/
 theorem StructureGroupoid.chart_mem_maximalAtlas [HasGroupoid M G] (x : M) :
     chartAt H x ∈ G.maximalAtlas M :=
   G.subset_maximalAtlas (chart_mem_atlas H x)
@@ -947,11 +1175,23 @@ theorem StructureGroupoid.chart_mem_maximalAtlas [HasGroupoid M G] (x : M) :
 
 variable {G}
 
+/- warning: mem_maximal_atlas_iff -> mem_maximalAtlas_iff is a dubious translation:
+lean 3 declaration is
+  forall {H : Type.{u1}} {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] {G : StructureGroupoid.{u1} H _inst_1} {e : LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1}, Iff (Membership.Mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (Set.hasMem.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) e (StructureGroupoid.maximalAtlas.{u1, u2} H M _inst_1 _inst_2 _inst_3 G)) (forall (e' : LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1), (Membership.Mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (Set.hasMem.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) e' (ChartedSpace.atlas.{u1, u2} H _inst_1 M _inst_2 _inst_3)) -> (And (Membership.Mem.{u1, u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.hasMem.{u1} H _inst_1) (LocalHomeomorph.trans.{u1, u2, u1} H M H _inst_1 _inst_2 _inst_1 (LocalHomeomorph.symm.{u2, u1} M H _inst_2 _inst_1 e) e') G) (Membership.Mem.{u1, u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.hasMem.{u1} H _inst_1) (LocalHomeomorph.trans.{u1, u2, u1} H M H _inst_1 _inst_2 _inst_1 (LocalHomeomorph.symm.{u2, u1} M H _inst_2 _inst_1 e') e) G)))
+but is expected to have type
+  forall {H : Type.{u2}} {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] {G : StructureGroupoid.{u2} H _inst_1} {e : LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1}, Iff (Membership.mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) (Set.instMembershipSet.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) e (StructureGroupoid.maximalAtlas.{u2, u1} H M _inst_1 _inst_2 _inst_3 G)) (forall (e' : LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1), (Membership.mem.{max u1 u2, max u1 u2} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) (Set.instMembershipSet.{max u1 u2} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) e' (ChartedSpace.atlas.{u2, u1} H _inst_1 M _inst_2 _inst_3)) -> (And (Membership.mem.{u2, u2} (LocalHomeomorph.{u2, u2} H H _inst_1 _inst_1) (StructureGroupoid.{u2} H _inst_1) (instMembershipLocalHomeomorphStructureGroupoid.{u2} H _inst_1) (LocalHomeomorph.trans.{u2, u1, u2} H M H _inst_1 _inst_2 _inst_1 (LocalHomeomorph.symm.{u1, u2} M H _inst_2 _inst_1 e) e') G) (Membership.mem.{u2, u2} (LocalHomeomorph.{u2, u2} H H _inst_1 _inst_1) (StructureGroupoid.{u2} H _inst_1) (instMembershipLocalHomeomorphStructureGroupoid.{u2} H _inst_1) (LocalHomeomorph.trans.{u2, u1, u2} H M H _inst_1 _inst_2 _inst_1 (LocalHomeomorph.symm.{u1, u2} M H _inst_2 _inst_1 e') e) G)))
+Case conversion may be inaccurate. Consider using '#align mem_maximal_atlas_iff mem_maximalAtlas_iffₓ'. -/
 theorem mem_maximalAtlas_iff {e : LocalHomeomorph M H} :
     e ∈ G.maximalAtlas M ↔ ∀ e' ∈ atlas H M, e.symm ≫ₕ e' ∈ G ∧ e'.symm ≫ₕ e ∈ G :=
   Iff.rfl
 #align mem_maximal_atlas_iff mem_maximalAtlas_iff
 
+/- warning: structure_groupoid.compatible_of_mem_maximal_atlas -> StructureGroupoid.compatible_of_mem_maximalAtlas is a dubious translation:
+lean 3 declaration is
+  forall {H : Type.{u1}} {M : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} H] [_inst_2 : TopologicalSpace.{u2} M] [_inst_3 : ChartedSpace.{u1, u2} H _inst_1 M _inst_2] {G : StructureGroupoid.{u1} H _inst_1} {e : LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1} {e' : LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1}, (Membership.Mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (Set.hasMem.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) e (StructureGroupoid.maximalAtlas.{u1, u2} H M _inst_1 _inst_2 _inst_3 G)) -> (Membership.Mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) (Set.hasMem.{max u2 u1} (LocalHomeomorph.{u2, u1} M H _inst_2 _inst_1)) e' (StructureGroupoid.maximalAtlas.{u1, u2} H M _inst_1 _inst_2 _inst_3 G)) -> (Membership.Mem.{u1, u1} (LocalHomeomorph.{u1, u1} H H _inst_1 _inst_1) (StructureGroupoid.{u1} H _inst_1) (StructureGroupoid.hasMem.{u1} H _inst_1) (LocalHomeomorph.trans.{u1, u2, u1} H M H _inst_1 _inst_2 _inst_1 (LocalHomeomorph.symm.{u2, u1} M H _inst_2 _inst_1 e) e') G)
+but is expected to have type
+  forall {H : Type.{u2}} {M : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} H] [_inst_2 : TopologicalSpace.{u1} M] [_inst_3 : ChartedSpace.{u2, u1} H _inst_1 M _inst_2] {G : StructureGroupoid.{u2} H _inst_1} {e : LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1} {e' : LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1}, (Membership.mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) (Set.instMembershipSet.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) e (StructureGroupoid.maximalAtlas.{u2, u1} H M _inst_1 _inst_2 _inst_3 G)) -> (Membership.mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) (Set.instMembershipSet.{max u2 u1} (LocalHomeomorph.{u1, u2} M H _inst_2 _inst_1)) e' (StructureGroupoid.maximalAtlas.{u2, u1} H M _inst_1 _inst_2 _inst_3 G)) -> (Membership.mem.{u2, u2} (LocalHomeomorph.{u2, u2} H H _inst_1 _inst_1) (StructureGroupoid.{u2} H _inst_1) (instMembershipLocalHomeomorphStructureGroupoid.{u2} H _inst_1) (LocalHomeomorph.trans.{u2, u1, u2} H M H _inst_1 _inst_2 _inst_1 (LocalHomeomorph.symm.{u1, u2} M H _inst_2 _inst_1 e) e') G)
+Case conversion may be inaccurate. Consider using '#align structure_groupoid.compatible_of_mem_maximal_atlas StructureGroupoid.compatible_of_mem_maximalAtlasₓ'. -/
 /-- Changing coordinates between two elements of the maximal atlas gives rise to an element
 of the structure groupoid. -/
 theorem StructureGroupoid.compatible_of_mem_maximalAtlas {e e' : LocalHomeomorph M H}
@@ -983,17 +1223,21 @@ theorem StructureGroupoid.compatible_of_mem_maximalAtlas {e e' : LocalHomeomorph
 
 variable (G)
 
+#print StructureGroupoid.id_mem_maximalAtlas /-
 /-- In the model space, the identity is in any maximal atlas. -/
 theorem StructureGroupoid.id_mem_maximalAtlas : LocalHomeomorph.refl H ∈ G.maximalAtlas H :=
   G.subset_maximalAtlas <| by simp
 #align structure_groupoid.id_mem_maximal_atlas StructureGroupoid.id_mem_maximalAtlas
+-/
 
+#print StructureGroupoid.mem_maximalAtlas_of_mem_groupoid /-
 /-- In the model space, any element of the groupoid is in the maximal atlas. -/
 theorem StructureGroupoid.mem_maximalAtlas_of_mem_groupoid {f : LocalHomeomorph H H} (hf : f ∈ G) :
     f ∈ G.maximalAtlas H := by
   rintro e (rfl : e = LocalHomeomorph.refl H)
   exact ⟨G.trans (G.symm hf) G.id_mem, G.trans (G.symm G.id_mem) hf⟩
 #align structure_groupoid.mem_maximal_atlas_of_mem_groupoid StructureGroupoid.mem_maximalAtlas_of_mem_groupoid
+-/
 
 end MaximalAtlas
 
@@ -1005,6 +1249,7 @@ namespace LocalHomeomorph
 
 variable (e : LocalHomeomorph α H)
 
+#print LocalHomeomorph.singletonChartedSpace /-
 /-- If a single local homeomorphism `e` from a space `α` into `H` has source covering the whole
 space `α`, then that local homeomorphism induces an `H`-charted space structure on `α`.
 (This condition is equivalent to `e` being an open embedding of `α` into `H`; see
@@ -1016,23 +1261,48 @@ def singletonChartedSpace (h : e.source = Set.univ) : ChartedSpace H α
   mem_chart_source _ := by simp only [h, mfld_simps]
   chart_mem_atlas _ := by tauto
 #align local_homeomorph.singleton_charted_space LocalHomeomorph.singletonChartedSpace
+-/
 
+/- warning: local_homeomorph.singleton_charted_space_chart_at_eq -> LocalHomeomorph.singletonChartedSpace_chartAt_eq is a dubious translation:
+lean 3 declaration is
+  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] {α : Type.{u2}} [_inst_4 : TopologicalSpace.{u2} α] (e : LocalHomeomorph.{u2, u1} α H _inst_4 _inst_1) (h : Eq.{succ u2} (Set.{u2} α) (LocalEquiv.source.{u2, u1} α H (LocalHomeomorph.toLocalEquiv.{u2, u1} α H _inst_4 _inst_1 e)) (Set.univ.{u2} α)) {x : α}, Eq.{max (succ u2) (succ u1)} (LocalHomeomorph.{u2, u1} α H _inst_4 _inst_1) (ChartedSpace.chartAt.{u1, u2} H _inst_1 α _inst_4 (LocalHomeomorph.singletonChartedSpace.{u1, u2} H _inst_1 α _inst_4 e h) x) e
+but is expected to have type
+  forall {H : Type.{u2}} [_inst_1 : TopologicalSpace.{u2} H] {α : Type.{u1}} [_inst_4 : TopologicalSpace.{u1} α] (e : LocalHomeomorph.{u1, u2} α H _inst_4 _inst_1) (h : Eq.{succ u1} (Set.{u1} α) (LocalEquiv.source.{u1, u2} α H (LocalHomeomorph.toLocalEquiv.{u1, u2} α H _inst_4 _inst_1 e)) (Set.univ.{u1} α)) {x : α}, Eq.{max (succ u2) (succ u1)} (LocalHomeomorph.{u1, u2} α H _inst_4 _inst_1) (ChartedSpace.chartAt.{u2, u1} H _inst_1 α _inst_4 (LocalHomeomorph.singletonChartedSpace.{u2, u1} H _inst_1 α _inst_4 e h) x) e
+Case conversion may be inaccurate. Consider using '#align local_homeomorph.singleton_charted_space_chart_at_eq LocalHomeomorph.singletonChartedSpace_chartAt_eqₓ'. -/
 @[simp, mfld_simps]
 theorem singletonChartedSpace_chartAt_eq (h : e.source = Set.univ) {x : α} :
     @chartAt H _ α _ (e.singletonChartedSpace h) x = e :=
   rfl
 #align local_homeomorph.singleton_charted_space_chart_at_eq LocalHomeomorph.singletonChartedSpace_chartAt_eq
 
+/- warning: local_homeomorph.singleton_charted_space_chart_at_source -> LocalHomeomorph.singletonChartedSpace_chartAt_source is a dubious translation:
+lean 3 declaration is
+  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] {α : Type.{u2}} [_inst_4 : TopologicalSpace.{u2} α] (e : LocalHomeomorph.{u2, u1} α H _inst_4 _inst_1) (h : Eq.{succ u2} (Set.{u2} α) (LocalEquiv.source.{u2, u1} α H (LocalHomeomorph.toLocalEquiv.{u2, u1} α H _inst_4 _inst_1 e)) (Set.univ.{u2} α)) {x : α}, Eq.{succ u2} (Set.{u2} α) (LocalEquiv.source.{u2, u1} α H (LocalHomeomorph.toLocalEquiv.{u2, u1} α H _inst_4 _inst_1 (ChartedSpace.chartAt.{u1, u2} H _inst_1 α _inst_4 (LocalHomeomorph.singletonChartedSpace.{u1, u2} H _inst_1 α _inst_4 e h) x))) (Set.univ.{u2} α)
+but is expected to have type
+  forall {H : Type.{u2}} [_inst_1 : TopologicalSpace.{u2} H] {α : Type.{u1}} [_inst_4 : TopologicalSpace.{u1} α] (e : LocalHomeomorph.{u1, u2} α H _inst_4 _inst_1) (h : Eq.{succ u1} (Set.{u1} α) (LocalEquiv.source.{u1, u2} α H (LocalHomeomorph.toLocalEquiv.{u1, u2} α H _inst_4 _inst_1 e)) (Set.univ.{u1} α)) {x : α}, Eq.{succ u1} (Set.{u1} α) (LocalEquiv.source.{u1, u2} α H (LocalHomeomorph.toLocalEquiv.{u1, u2} α H _inst_4 _inst_1 (ChartedSpace.chartAt.{u2, u1} H _inst_1 α _inst_4 (LocalHomeomorph.singletonChartedSpace.{u2, u1} H _inst_1 α _inst_4 e h) x))) (Set.univ.{u1} α)
+Case conversion may be inaccurate. Consider using '#align local_homeomorph.singleton_charted_space_chart_at_source LocalHomeomorph.singletonChartedSpace_chartAt_sourceₓ'. -/
 theorem singletonChartedSpace_chartAt_source (h : e.source = Set.univ) {x : α} :
     (@chartAt H _ α _ (e.singletonChartedSpace h) x).source = Set.univ :=
   h
 #align local_homeomorph.singleton_charted_space_chart_at_source LocalHomeomorph.singletonChartedSpace_chartAt_source
 
+/- warning: local_homeomorph.singleton_charted_space_mem_atlas_eq -> LocalHomeomorph.singletonChartedSpace_mem_atlas_eq is a dubious translation:
+lean 3 declaration is
+  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] {α : Type.{u2}} [_inst_4 : TopologicalSpace.{u2} α] (e : LocalHomeomorph.{u2, u1} α H _inst_4 _inst_1) (h : Eq.{succ u2} (Set.{u2} α) (LocalEquiv.source.{u2, u1} α H (LocalHomeomorph.toLocalEquiv.{u2, u1} α H _inst_4 _inst_1 e)) (Set.univ.{u2} α)) (e' : LocalHomeomorph.{u2, u1} α H _inst_4 _inst_1), (Membership.Mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u2, u1} α H _inst_4 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u2, u1} α H _inst_4 _inst_1)) (Set.hasMem.{max u2 u1} (LocalHomeomorph.{u2, u1} α H _inst_4 _inst_1)) e' (ChartedSpace.atlas.{u1, u2} H _inst_1 α _inst_4 (LocalHomeomorph.singletonChartedSpace.{u1, u2} H _inst_1 α _inst_4 e h))) -> (Eq.{max (succ u2) (succ u1)} (LocalHomeomorph.{u2, u1} α H _inst_4 _inst_1) e' e)
+but is expected to have type
+  forall {H : Type.{u2}} [_inst_1 : TopologicalSpace.{u2} H] {α : Type.{u1}} [_inst_4 : TopologicalSpace.{u1} α] (e : LocalHomeomorph.{u1, u2} α H _inst_4 _inst_1) (h : Eq.{succ u1} (Set.{u1} α) (LocalEquiv.source.{u1, u2} α H (LocalHomeomorph.toLocalEquiv.{u1, u2} α H _inst_4 _inst_1 e)) (Set.univ.{u1} α)) (e' : LocalHomeomorph.{u1, u2} α H _inst_4 _inst_1), (Membership.mem.{max u2 u1, max u2 u1} (LocalHomeomorph.{u1, u2} α H _inst_4 _inst_1) (Set.{max u2 u1} (LocalHomeomorph.{u1, u2} α H _inst_4 _inst_1)) (Set.instMembershipSet.{max u2 u1} (LocalHomeomorph.{u1, u2} α H _inst_4 _inst_1)) e' (ChartedSpace.atlas.{u2, u1} H _inst_1 α _inst_4 (LocalHomeomorph.singletonChartedSpace.{u2, u1} H _inst_1 α _inst_4 e h))) -> (Eq.{max (succ u2) (succ u1)} (LocalHomeomorph.{u1, u2} α H _inst_4 _inst_1) e' e)
+Case conversion may be inaccurate. Consider using '#align local_homeomorph.singleton_charted_space_mem_atlas_eq LocalHomeomorph.singletonChartedSpace_mem_atlas_eqₓ'. -/
 theorem singletonChartedSpace_mem_atlas_eq (h : e.source = Set.univ) (e' : LocalHomeomorph α H)
     (h' : e' ∈ (e.singletonChartedSpace h).atlas) : e' = e :=
   h'
 #align local_homeomorph.singleton_charted_space_mem_atlas_eq LocalHomeomorph.singletonChartedSpace_mem_atlas_eq
 
+/- warning: local_homeomorph.singleton_has_groupoid -> LocalHomeomorph.singleton_hasGroupoid is a dubious translation:
+lean 3 declaration is
+  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] {α : Type.{u2}} [_inst_4 : TopologicalSpace.{u2} α] (e : LocalHomeomorph.{u2, u1} α H _inst_4 _inst_1) (h : Eq.{succ u2} (Set.{u2} α) (LocalEquiv.source.{u2, u1} α H (LocalHomeomorph.toLocalEquiv.{u2, u1} α H _inst_4 _inst_1 e)) (Set.univ.{u2} α)) (G : StructureGroupoid.{u1} H _inst_1) [_inst_5 : ClosedUnderRestriction.{u1} H _inst_1 G], HasGroupoid.{u1, u2} H _inst_1 α _inst_4 (LocalHomeomorph.singletonChartedSpace.{u1, u2} H _inst_1 α _inst_4 e h) G
+but is expected to have type
+  forall {H : Type.{u2}} [_inst_1 : TopologicalSpace.{u2} H] {α : Type.{u1}} [_inst_4 : TopologicalSpace.{u1} α] (e : LocalHomeomorph.{u1, u2} α H _inst_4 _inst_1) (h : Eq.{succ u1} (Set.{u1} α) (LocalEquiv.source.{u1, u2} α H (LocalHomeomorph.toLocalEquiv.{u1, u2} α H _inst_4 _inst_1 e)) (Set.univ.{u1} α)) (G : StructureGroupoid.{u2} H _inst_1) [_inst_5 : ClosedUnderRestriction.{u2} H _inst_1 G], HasGroupoid.{u2, u1} H _inst_1 α _inst_4 (LocalHomeomorph.singletonChartedSpace.{u2, u1} H _inst_1 α _inst_4 e h) G
+Case conversion may be inaccurate. Consider using '#align local_homeomorph.singleton_has_groupoid LocalHomeomorph.singleton_hasGroupoidₓ'. -/
 /-- Given a local homeomorphism `e` from a space `α` into `H`, if its source covers the whole
 space `α`, then the induced charted space structure on `α` is `has_groupoid G` for any structure
 groupoid `G` which is closed under restrictions. -/
@@ -1054,17 +1324,31 @@ namespace OpenEmbedding
 
 variable [Nonempty α]
 
+#print OpenEmbedding.singletonChartedSpace /-
 /-- An open embedding of `α` into `H` induces an `H`-charted space structure on `α`.
 See `local_homeomorph.singleton_charted_space` -/
 def singletonChartedSpace {f : α → H} (h : OpenEmbedding f) : ChartedSpace H α :=
   (h.toLocalHomeomorph f).singletonChartedSpace (by simp)
 #align open_embedding.singleton_charted_space OpenEmbedding.singletonChartedSpace
+-/
 
+/- warning: open_embedding.singleton_charted_space_chart_at_eq -> OpenEmbedding.singletonChartedSpace_chartAt_eq is a dubious translation:
+lean 3 declaration is
+  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] {α : Type.{u2}} [_inst_4 : TopologicalSpace.{u2} α] [_inst_5 : Nonempty.{succ u2} α] {f : α -> H} (h : OpenEmbedding.{u2, u1} α H _inst_4 _inst_1 f) {x : α}, Eq.{max (succ u2) (succ u1)} (α -> H) (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalHomeomorph.{u2, u1} α H _inst_4 _inst_1) (fun (_x : LocalHomeomorph.{u2, u1} α H _inst_4 _inst_1) => α -> H) (LocalHomeomorph.hasCoeToFun.{u2, u1} α H _inst_4 _inst_1) (ChartedSpace.chartAt.{u1, u2} H _inst_1 α _inst_4 (OpenEmbedding.singletonChartedSpace.{u1, u2} H _inst_1 α _inst_4 _inst_5 f h) x)) f
+but is expected to have type
+  forall {H : Type.{u2}} [_inst_1 : TopologicalSpace.{u2} H] {α : Type.{u1}} [_inst_4 : TopologicalSpace.{u1} α] [_inst_5 : Nonempty.{succ u1} α] {f : α -> H} (h : OpenEmbedding.{u1, u2} α H _inst_4 _inst_1 f) {x : α}, Eq.{max (succ u2) (succ u1)} (α -> H) (LocalHomeomorph.toFun'.{u1, u2} α H _inst_4 _inst_1 (ChartedSpace.chartAt.{u2, u1} H _inst_1 α _inst_4 (OpenEmbedding.singletonChartedSpace.{u2, u1} H _inst_1 α _inst_4 _inst_5 f h) x)) f
+Case conversion may be inaccurate. Consider using '#align open_embedding.singleton_charted_space_chart_at_eq OpenEmbedding.singletonChartedSpace_chartAt_eqₓ'. -/
 theorem singletonChartedSpace_chartAt_eq {f : α → H} (h : OpenEmbedding f) {x : α} :
     ⇑(@chartAt H _ α _ h.singletonChartedSpace x) = f :=
   rfl
 #align open_embedding.singleton_charted_space_chart_at_eq OpenEmbedding.singletonChartedSpace_chartAt_eq
 
+/- warning: open_embedding.singleton_has_groupoid -> OpenEmbedding.singleton_hasGroupoid is a dubious translation:
+lean 3 declaration is
+  forall {H : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} H] {α : Type.{u2}} [_inst_4 : TopologicalSpace.{u2} α] [_inst_5 : Nonempty.{succ u2} α] {f : α -> H} (h : OpenEmbedding.{u2, u1} α H _inst_4 _inst_1 f) (G : StructureGroupoid.{u1} H _inst_1) [_inst_6 : ClosedUnderRestriction.{u1} H _inst_1 G], HasGroupoid.{u1, u2} H _inst_1 α _inst_4 (OpenEmbedding.singletonChartedSpace.{u1, u2} H _inst_1 α _inst_4 _inst_5 f h) G
+but is expected to have type
+  forall {H : Type.{u2}} [_inst_1 : TopologicalSpace.{u2} H] {α : Type.{u1}} [_inst_4 : TopologicalSpace.{u1} α] [_inst_5 : Nonempty.{succ u1} α] {f : α -> H} (h : OpenEmbedding.{u1, u2} α H _inst_4 _inst_1 f) (G : StructureGroupoid.{u2} H _inst_1) [_inst_6 : ClosedUnderRestriction.{u2} H _inst_1 G], HasGroupoid.{u2, u1} H _inst_1 α _inst_4 (OpenEmbedding.singletonChartedSpace.{u2, u1} H _inst_1 α _inst_4 _inst_5 f h) G
+Case conversion may be inaccurate. Consider using '#align open_embedding.singleton_has_groupoid OpenEmbedding.singleton_hasGroupoidₓ'. -/
 theorem singleton_hasGroupoid {f : α → H} (h : OpenEmbedding f) (G : StructureGroupoid H)
     [ClosedUnderRestriction G] : @HasGroupoid _ _ _ _ h.singletonChartedSpace G :=
   (h.toLocalHomeomorph f).singleton_hasGroupoid (by simp) G
@@ -1114,6 +1398,7 @@ end TopologicalSpace.Opens
 /-! ### Structomorphisms -/
 
 
+#print Structomorph /-
 /-- A `G`-diffeomorphism between two charted spaces is a homeomorphism which, when read in the
 charts, belongs to `G`. We avoid the word diffeomorph as it is too related to the smooth category,
 and use structomorph instead. -/
@@ -1125,10 +1410,12 @@ structure Structomorph (G : StructureGroupoid H) (M : Type _) (M' : Type _) [Top
       ∀ c' : LocalHomeomorph M' H,
         c ∈ atlas H M → c' ∈ atlas H M' → c.symm ≫ₕ to_homeomorph.toLocalHomeomorph ≫ₕ c' ∈ G
 #align structomorph Structomorph
+-/
 
 variable [TopologicalSpace M'] [TopologicalSpace M''] {G : StructureGroupoid H} [ChartedSpace H M']
   [ChartedSpace H M'']
 
+#print Structomorph.refl /-
 /-- The identity is a diffeomorphism of any charted space, for any groupoid. -/
 def Structomorph.refl (M : Type _) [TopologicalSpace M] [ChartedSpace H M] [HasGroupoid M G] :
     Structomorph G M M :=
@@ -1139,7 +1426,9 @@ def Structomorph.refl (M : Type _) [TopologicalSpace M] [ChartedSpace H M] [HasG
       rw [LocalHomeomorph.refl_trans]
       exact HasGroupoid.compatible G hc hc' }
 #align structomorph.refl Structomorph.refl
+-/
 
+#print Structomorph.symm /-
 /-- The inverse of a structomorphism is a structomorphism -/
 def Structomorph.symm (e : Structomorph G M M') : Structomorph G M' M :=
   { e.toHomeomorph.symm with
@@ -1150,7 +1439,9 @@ def Structomorph.symm (e : Structomorph G M M') : Structomorph G M' M :=
       rwa [trans_symm_eq_symm_trans_symm, trans_symm_eq_symm_trans_symm, symm_symm, trans_assoc] at
         this }
 #align structomorph.symm Structomorph.symm
+-/
 
+#print Structomorph.trans /-
 /-- The composition of structomorphisms is a structomorphism -/
 def Structomorph.trans (e : Structomorph G M M') (e' : Structomorph G M' M'') :
     Structomorph G M M'' :=
@@ -1199,6 +1490,7 @@ def Structomorph.trans (e : Structomorph G M M') (e' : Structomorph G M' M'') :
       have : F₂ ∈ G := G.eq_on_source A (Setoid.symm this)
       exact this }
 #align structomorph.trans Structomorph.trans
+-/
 
 end HasGroupoid
 
Diff
@@ -1103,8 +1103,8 @@ instance [ClosedUnderRestriction G] : HasGroupoid s G
     simp only [hc.symm, mem_singleton_iff, Subtype.val_eq_coe] at he
     simp only [hc'.symm, mem_singleton_iff, Subtype.val_eq_coe] at he'
     rw [he, he']
-    convert
-      G.eq_on_source _ (subtype_restr_symm_trans_subtype_restr s (chart_at H x) (chart_at H x'))
+    convert G.eq_on_source _
+        (subtype_restr_symm_trans_subtype_restr s (chart_at H x) (chart_at H x'))
     apply closed_under_restriction'
     · exact G.compatible (chart_mem_atlas H x) (chart_mem_atlas H x')
     · exact preimage_open_of_open_symm (chart_at H x) s.2

Changes in mathlib4

mathlib3
mathlib4
doc(Manifold/Charted): document the fields of Pregroupoid (#11930)

Similar to #9827.

Diff
@@ -342,12 +342,19 @@ both the function and its inverse have some property. If this property is stable
 one gets a groupoid. `Pregroupoid` bundles the properties needed for this construction, with the
 groupoid of smooth functions with smooth inverses as an application. -/
 structure Pregroupoid (H : Type*) [TopologicalSpace H] where
+  /-- Property describing membership in this groupoid: the pregroupoid "contains"
+    all functions `H → H` having the pregroupoid property on some `s : Set H` -/
   property : (H → H) → Set H → Prop
+  /-- The pregroupoid property is stable under composition -/
   comp : ∀ {f g u v}, property f u → property g v →
     IsOpen u → IsOpen v → IsOpen (u ∩ f ⁻¹' v) → property (g ∘ f) (u ∩ f ⁻¹' v)
+  /-- Pregroupoids contain the identity map (on `univ`) -/
   id_mem : property id univ
+  /-- The pregroupoid property is "local", in the sense that `f` has the pregroupoid property on `u`
+  iff its restriction to each open subset of `u` has it -/
   locality :
     ∀ {f u}, IsOpen u → (∀ x ∈ u, ∃ v, IsOpen v ∧ x ∈ v ∧ property f (u ∩ v)) → property f u
+  /-- If `f = g` on `u` and `property f u`, then `property g u` -/
   congr : ∀ {f g : H → H} {u}, IsOpen u → (∀ x ∈ u, g x = f x) → property f u → property g u
 #align pregroupoid Pregroupoid
 
chore: classify porting notes referring to missing linters (#12098)

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

Diff
@@ -853,7 +853,8 @@ end ChartedSpace
 have a topological structure, where the topology would come from the charts. For this, one needs
 charts that are only partial equivs, and continuity properties for their composition.
 This is formalised in `ChartedSpaceCore`. -/
--- @[nolint has_nonempty_instance]  -- Porting note: commented out
+-- Porting note(#5171): this linter isn't ported yet.
+-- @[nolint has_nonempty_instance]
 structure ChartedSpaceCore (H : Type*) [TopologicalSpace H] (M : Type*) where
   atlas : Set (PartialEquiv M H)
   chartAt : M → PartialEquiv M H
@@ -1249,7 +1250,8 @@ lemma StructureGroupoid.restriction_in_maximalAtlas {e : PartialHomeomorph M H}
 /-- A `G`-diffeomorphism between two charted spaces is a homeomorphism which, when read in the
 charts, belongs to `G`. We avoid the word diffeomorph as it is too related to the smooth category,
 and use structomorph instead. -/
--- @[nolint has_nonempty_instance]  -- Porting note: commented out
+-- Porting note(#5171): this linter isn't ported yet.
+-- @[nolint has_nonempty_instance]
 structure Structomorph (G : StructureGroupoid H) (M : Type*) (M' : Type*) [TopologicalSpace M]
   [TopologicalSpace M'] [ChartedSpace H M] [ChartedSpace H M'] extends Homeomorph M M' where
   mem_groupoid : ∀ c : PartialHomeomorph M H, ∀ c' : PartialHomeomorph M' H, c ∈ atlas H M →
golf: replace some apply foo.mpr by rw [foo] (#11515)

Sometimes, that line can be golfed into the next line. Inspired by a comment of @loefflerd; any decisions are my own.

Diff
@@ -513,7 +513,7 @@ theorem closedUnderRestriction_iff_id_le (G : StructureGroupoid H) :
     ClosedUnderRestriction G ↔ idRestrGroupoid ≤ G := by
   constructor
   · intro _i
-    apply StructureGroupoid.le_iff.mpr
+    rw [StructureGroupoid.le_iff]
     rintro e ⟨s, hs, hes⟩
     refine' G.mem_of_eqOnSource _ hes
     convert closedUnderRestriction' G.id_mem hs
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
@@ -1164,7 +1164,6 @@ namespace TopologicalSpace.Opens
 open TopologicalSpace
 
 variable (G : StructureGroupoid H) [HasGroupoid M G]
-
 variable (s : Opens M)
 
 /-- An open subset of a charted space is naturally a charted space. -/
chore(*): Fintype -> Finite, drop Decidable (#11423)

Also, in some cases drop unneeded Fintype arguments.

Diff
@@ -827,7 +827,7 @@ end prodChartedSpace
 
 /-- The product of a finite family of charted spaces is naturally a charted space, with the
 canonical construction of the atlas of finite product maps. -/
-instance piChartedSpace {ι : Type*} [Fintype ι] (H : ι → Type*) [∀ i, TopologicalSpace (H i)]
+instance piChartedSpace {ι : Type*} [Finite ι] (H : ι → Type*) [∀ i, TopologicalSpace (H i)]
     (M : ι → Type*) [∀ i, TopologicalSpace (M i)] [∀ i, ChartedSpace (H i) (M i)] :
     ChartedSpace (ModelPi H) (∀ i, M i) where
   atlas := PartialHomeomorph.pi '' Set.pi univ fun _ ↦ atlas (H _) (M _)
@@ -837,7 +837,7 @@ instance piChartedSpace {ι : Type*} [Fintype ι] (H : ι → Type*) [∀ i, Top
 #align pi_charted_space piChartedSpace
 
 @[simp, mfld_simps]
-theorem piChartedSpace_chartAt {ι : Type*} [Fintype ι] (H : ι → Type*)
+theorem piChartedSpace_chartAt {ι : Type*} [Finite ι] (H : ι → Type*)
     [∀ i, TopologicalSpace (H i)] (M : ι → Type*) [∀ i, TopologicalSpace (M i)]
     [∀ i, ChartedSpace (H i) (M i)] (f : ∀ i, M i) :
     chartAt (H := ModelPi H) f = PartialHomeomorph.pi fun i ↦ chartAt (H i) (f i) :=
chore: move Mathlib to v4.7.0-rc1 (#11162)

This is a very large PR, but it has been reviewed piecemeal already in PRs to the bump/v4.7.0 branch as we update to intermediate nightlies.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: damiano <adomani@gmail.com>

Diff
@@ -894,7 +894,8 @@ for the topology constructed from this atlas. The `PartialHomeomorph` version is
 definition. -/
 protected def partialHomeomorph (e : PartialEquiv M H) (he : e ∈ c.atlas) :
     @PartialHomeomorph M H c.toTopologicalSpace _ :=
-  { c.toTopologicalSpace, e with
+  { __ := c.toTopologicalSpace
+    __ := e
     open_source := by convert c.open_source' he
     open_target := by convert c.open_target he
     continuousOn_toFun := by
@@ -927,7 +928,7 @@ protected def partialHomeomorph (e : PartialEquiv M H) (he : e ∈ c.atlas) :
 /-- Given a charted space without topology, endow it with a genuine charted space structure with
 respect to the topology constructed from the atlas. -/
 def toChartedSpace : @ChartedSpace H _ M c.toTopologicalSpace :=
-  { c.toTopologicalSpace with
+  { __ := c.toTopologicalSpace
     atlas := ⋃ (e : PartialEquiv M H) (he : e ∈ c.atlas), {c.partialHomeomorph e he}
     chartAt := fun x ↦ c.partialHomeomorph (c.chartAt x) (c.chart_mem_atlas x)
     mem_chart_source := fun x ↦ c.mem_chart_source x
@@ -1122,7 +1123,7 @@ space `α`, then the induced charted space structure on `α` is `HasGroupoid G`
 groupoid `G` which is closed under restrictions. -/
 theorem singleton_hasGroupoid (h : e.source = Set.univ) (G : StructureGroupoid H)
     [ClosedUnderRestriction G] : @HasGroupoid _ _ _ _ (e.singletonChartedSpace h) G :=
-  { e.singletonChartedSpace h with
+  { __ := e.singletonChartedSpace h
     compatible := by
       intro e' e'' he' he''
       rw [e.singletonChartedSpace_mem_atlas_eq h e' he',
chore: prepare Lean version bump with explicit simp (#10999)

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

Diff
@@ -699,7 +699,7 @@ theorem ChartedSpace.locallyConnectedSpace [LocallyConnectedSpace H] : LocallyCo
   refine' locallyConnectedSpace_of_connected_bases (fun x s ↦ (e x).symm '' s)
       (fun x s ↦ (IsOpen s ∧ e x x ∈ s ∧ IsConnected s) ∧ s ⊆ (e x).target) _ _
   · intro x
-    simpa only [PartialHomeomorph.symm_map_nhds_eq, mem_chart_source] using
+    simpa only [e, PartialHomeomorph.symm_map_nhds_eq, mem_chart_source] using
       ((LocallyConnectedSpace.open_connected_basis (e x x)).restrict_subset
         ((e x).open_target.mem_nhds (mem_chart_target H x))).map (e x).symm
   · rintro x s ⟨⟨-, -, hsconn⟩, hssubset⟩
@@ -914,14 +914,14 @@ protected def partialHomeomorph (e : PartialEquiv M H) (he : e ∈ c.atlas) :
       rw [ts]
       let f := e.symm.trans e'
       have : IsOpen (f ⁻¹' s ∩ f.source) := by
-        simpa [inter_comm] using (continuousOn_open_iff (c.open_source e e' he e'_atlas)).1
+        simpa [f, inter_comm] using (continuousOn_open_iff (c.open_source e e' he e'_atlas)).1
           (c.continuousOn_toFun e e' he e'_atlas) s s_open
       have A : e' ∘ e.symm ⁻¹' s ∩ (e.target ∩ e.symm ⁻¹' e'.source) =
           e.target ∩ (e' ∘ e.symm ⁻¹' s ∩ e.symm ⁻¹' e'.source) := by
         rw [← inter_assoc, ← inter_assoc]
         congr 1
         exact inter_comm _ _
-      simpa [PartialEquiv.trans_source, preimage_inter, preimage_comp.symm, A] using this }
+      simpa [f, PartialEquiv.trans_source, preimage_inter, preimage_comp.symm, A] using this }
 #align charted_space_core.local_homeomorph ChartedSpaceCore.partialHomeomorph
 
 /-- Given a charted space without topology, endow it with a genuine charted space structure with
@@ -1041,7 +1041,7 @@ theorem StructureGroupoid.compatible_of_mem_maximalAtlas {e e' : PartialHomeomor
   have hs : IsOpen s := by
     apply e.symm.continuousOn_toFun.isOpen_inter_preimage <;> apply open_source
   have xs : x ∈ s := by
-    simp only [mem_inter_iff, mem_preimage, mem_chart_source, and_true]
+    simp only [s, f, mem_inter_iff, mem_preimage, mem_chart_source, and_true]
     exact ((mem_inter_iff _ _ _).1 hx).1
   refine' ⟨s, hs, xs, _⟩
   have A : e.symm ≫ₕ f ∈ G := (mem_maximalAtlas_iff.1 he f (chart_mem_atlas _ _)).1
@@ -1305,7 +1305,8 @@ def Structomorph.trans (e : Structomorph G M M') (e' : Structomorph G M' M'') :
         apply (c.symm ≫ₕ f₁).continuousOn_toFun.isOpen_inter_preimage <;> apply open_source
       have : x ∈ s := by
         constructor
-        · simp only [trans_source, preimage_univ, inter_univ, Homeomorph.toPartialHomeomorph_source]
+        · simp only [f₁, trans_source, preimage_univ, inter_univ,
+            Homeomorph.toPartialHomeomorph_source]
           rw [trans_source] at hx
           exact hx.1
         · exact hg₂
@@ -1314,7 +1315,8 @@ def Structomorph.trans (e : Structomorph G M M') (e' : Structomorph G M' M'') :
       have A : F₁ ∈ G := G.trans (e.mem_groupoid c g hc hg₁) (e'.mem_groupoid g c' hg₁ hc')
       let F₂ := (c.symm ≫ₕ f ≫ₕ c').restr s
       have : F₁ ≈ F₂ := calc
-        F₁ ≈ c.symm ≫ₕ f₁ ≫ₕ (g ≫ₕ g.symm) ≫ₕ f₂ ≫ₕ c' := by simp only [trans_assoc, _root_.refl]
+        F₁ ≈ c.symm ≫ₕ f₁ ≫ₕ (g ≫ₕ g.symm) ≫ₕ f₂ ≫ₕ c' := by
+            simp only [F₁, trans_assoc, _root_.refl]
         _ ≈ c.symm ≫ₕ f₁ ≫ₕ ofSet g.source g.open_source ≫ₕ f₂ ≫ₕ c' :=
           EqOnSource.trans' (_root_.refl _) (EqOnSource.trans' (_root_.refl _)
             (EqOnSource.trans' (self_trans_symm g) (_root_.refl _)))
@@ -1324,7 +1326,7 @@ def Structomorph.trans (e : Structomorph G M M') (e' : Structomorph G M' M'') :
         _ ≈ ((c.symm ≫ₕ f₁) ≫ₕ f₂ ≫ₕ c').restr s := by rw [restr_trans]
         _ ≈ (c.symm ≫ₕ (f₁ ≫ₕ f₂) ≫ₕ c').restr s :=
           by simp only [EqOnSource.restr, trans_assoc, _root_.refl]
-        _ ≈ F₂ := by simp only [feq, _root_.refl]
+        _ ≈ F₂ := by simp only [F₂, feq, _root_.refl]
       have : F₂ ∈ G := G.mem_of_eqOnSource A (Setoid.symm this)
       exact this }
 #align structomorph.trans Structomorph.trans
@@ -1345,7 +1347,7 @@ theorem StructureGroupoid.restriction_mem_maximalAtlas_subtype
   rw [PartialHomeomorph.subtypeRestr_def, PartialHomeomorph.trans_refl]
   let goal := e.toHomeomorphSourceTarget.toPartialHomeomorph ≫ₕ (t.partialHomeomorphSubtypeCoe this)
   have : goal ≈ e.subtypeRestr (s := s) hs :=
-    (goal.eqOnSource_iff (e.subtypeRestr (s := s) hs)).mpr ⟨by simp, by intro _ _; rfl⟩
+    (goal.eqOnSource_iff (e.subtypeRestr (s := s) hs)).mpr ⟨by simp [s, goal], by intro _ _; rfl⟩
   exact G.mem_maximalAtlas_of_eqOnSource (M := s) this (G.restriction_in_maximalAtlas he hs)
 
 /-- Each chart of a charted space is a structomorphism between its source and target. -/
chore: remove stream-of-consciousness uses of have, replace and suffices (#10640)

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

This follows on from #6964.

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

Diff
@@ -294,8 +294,8 @@ def idGroupoid (H : Type u) [TopologicalSpace H] : StructureGroupoid H where
         rw [restr_source, open_s.interior_eq]
         exact ⟨hx, xs⟩
       cases' hs with hs hs
-      · replace hs : PartialHomeomorph.restr e s = PartialHomeomorph.refl H
-        · simpa only using hs
+      · replace hs : PartialHomeomorph.restr e s = PartialHomeomorph.refl H := by
+          simpa only using hs
         have : (e.restr s).source = univ := by
           rw [hs]
           simp
feat: charts are structomorphisms (#8160)

This is the ChartedSpace analogue of contMDiffOn_extChartAt and contMDiffOn_extChartAt_symm; proving this revealed a few gaps in other API. This may be useful for showing open subsets of a manifold are submanifolds.

Co-authored-by: grunweg <grunweg@posteo.de>

Diff
@@ -112,7 +112,7 @@ composition of partial equivs with `≫`.
 
 noncomputable section
 
-open Topology
+open TopologicalSpace Topology
 
 universe u
 
@@ -992,6 +992,15 @@ instance hasGroupoid_continuousGroupoid : HasGroupoid M (continuousGroupoid H) :
   simp only [and_self_iff]
 #align has_groupoid_continuous_groupoid hasGroupoid_continuousGroupoid
 
+/-- If `G` is closed under restriction, the transition function between
+  the restriction of two charts `e` and `e'` lies in `G`. -/
+theorem StructureGroupoid.trans_restricted {e e' : PartialHomeomorph M H} {G : StructureGroupoid H}
+    (he : e ∈ atlas H M) (he' : e' ∈ atlas H M)
+    [HasGroupoid M G] [ClosedUnderRestriction G] {s : Opens M} (hs : Nonempty s) :
+    (e.subtypeRestr hs).symm ≫ₕ e'.subtypeRestr hs ∈ G :=
+  G.mem_of_eqOnSource (closedUnderRestriction' (G.compatible he he')
+    (e.isOpen_inter_preimage_symm s.2)) (e.subtypeRestr_symm_trans_subtypeRestr hs e')
+
 section MaximalAtlas
 
 variable (M) (G : StructureGroupoid H)
@@ -1048,6 +1057,15 @@ theorem StructureGroupoid.compatible_of_mem_maximalAtlas {e e' : PartialHomeomor
   exact G.mem_of_eqOnSource C (Setoid.symm D)
 #align structure_groupoid.compatible_of_mem_maximal_atlas StructureGroupoid.compatible_of_mem_maximalAtlas
 
+open PartialHomeomorph in
+/-- The maximal atlas of a structure groupoid is stable under equivalence. -/
+lemma StructureGroupoid.mem_maximalAtlas_of_eqOnSource {e e' : PartialHomeomorph M H} (h : e' ≈ e)
+    (he : e ∈ G.maximalAtlas M) : e' ∈ G.maximalAtlas M := by
+  intro e'' he''
+  obtain ⟨l, r⟩ := mem_maximalAtlas_iff.mp he e'' he''
+  exact ⟨G.mem_of_eqOnSource l (EqOnSource.trans' (EqOnSource.symm' h) (e''.eqOnSource_refl)),
+         G.mem_of_eqOnSource r (EqOnSource.trans' (e''.symm).eqOnSource_refl h)⟩
+
 variable (G)
 
 /-- In the model space, the identity is in any maximal atlas. -/
@@ -1158,6 +1176,21 @@ protected instance instChartedSpace : ChartedSpace H s where
     use x
 #align topological_space.opens.charted_space TopologicalSpace.Opens.instChartedSpace
 
+/-- If `s` is a non-empty open subset of `M`, every chart of `s` is the restriction
+ of some chart on `M`. -/
+lemma chart_eq {s : Opens M} (hs : Nonempty s) {e : PartialHomeomorph s H} (he : e ∈ atlas H s) :
+    ∃ x : s, e = (chartAt H (x : M)).subtypeRestr hs := by
+  rcases he with ⟨xset, ⟨x, hx⟩, he⟩
+  exact ⟨x, mem_singleton_iff.mp (by convert hx ▸ he)⟩
+
+/-- If `t` is a non-empty open subset of `H`,
+  every chart of `t` is the restriction of some chart on `H`. -/
+-- XXX: can I unify this with `chart_eq`?
+lemma chart_eq' {t : Opens H} (ht : Nonempty t) {e' : PartialHomeomorph t H}
+    (he' : e' ∈ atlas H t) : ∃ x : t, e' = (chartAt H ↑x).subtypeRestr ht := by
+  rcases he' with ⟨xset, ⟨x, hx⟩, he'⟩
+  exact ⟨x, mem_singleton_iff.mp (by convert hx ▸ he')⟩
+
 /-- If a groupoid `G` is `ClosedUnderRestriction`, then an open subset of a space which is
 `HasGroupoid G` is naturally `HasGroupoid G`. -/
 protected instance instHasGroupoid [ClosedUnderRestriction G] : HasGroupoid s G where
@@ -1194,6 +1227,23 @@ theorem chartAt_inclusion_symm_eventuallyEq {U V : Opens M} (hUV : U ≤ V) {x :
 #align topological_space.opens.chart_at_inclusion_symm_eventually_eq TopologicalSpace.Opens.chartAt_inclusion_symm_eventuallyEq
 end TopologicalSpace.Opens
 
+/-- Restricting a chart of `M` to an open subset `s` yields a chart in the maximal atlas of `s`.
+
+NB. We cannot deduce membership in `atlas H s` in general: by definition, this atlas contains
+precisely the restriction of each preferred chart at `x ∈ s` --- whereas `atlas H M`
+can contain more charts than these. -/
+lemma StructureGroupoid.restriction_in_maximalAtlas {e : PartialHomeomorph M H}
+    (he : e ∈ atlas H M) {s : Opens M} (hs : Nonempty s) {G : StructureGroupoid H} [HasGroupoid M G]
+    [ClosedUnderRestriction G] : e.subtypeRestr hs ∈ G.maximalAtlas s := by
+  intro e' he'
+  -- `e'` is the restriction of some chart of `M` at `x`,
+  obtain ⟨x, this⟩ := Opens.chart_eq hs he'
+  rw [this]
+  -- The transition functions between the unrestricted charts lie in the groupoid,
+  -- the transition functions of the restriction are the restriction of the transition function.
+  exact ⟨G.trans_restricted he (chart_mem_atlas H (x : M)) hs,
+         G.trans_restricted (chart_mem_atlas H (x : M)) he hs⟩
+
 /-! ### Structomorphisms -/
 
 /-- A `G`-diffeomorphism between two charted spaces is a homeomorphism which, when read in the
@@ -1279,4 +1329,46 @@ def Structomorph.trans (e : Structomorph G M M') (e' : Structomorph G M' M'') :
       exact this }
 #align structomorph.trans Structomorph.trans
 
+/-- Restricting a chart to its source `s ⊆ M` yields a chart in the maximal atlas of `s`. -/
+theorem StructureGroupoid.restriction_mem_maximalAtlas_subtype
+    {e : PartialHomeomorph M H} (he : e ∈ atlas H M)
+    (hs : Nonempty e.source) [HasGroupoid M G] [ClosedUnderRestriction G] :
+    let s := { carrier := e.source, is_open' := e.open_source : Opens M };
+    let t := { carrier := e.target, is_open' := e.open_target : Opens H };
+    ∀ c' ∈ atlas H t, e.toHomeomorphSourceTarget.toPartialHomeomorph ≫ₕ c' ∈ G.maximalAtlas s := by
+  intro s t c' hc'
+  have : Nonempty t := nonempty_coe_sort.mpr (e.mapsTo.nonempty (nonempty_coe_sort.mp hs))
+  obtain ⟨x, hc'⟩ := Opens.chart_eq this hc'
+  -- As H has only one chart, `chartAt H x` is the identity: i.e., `c'` is the inclusion.
+  rw [hc', (chartAt_self_eq)]
+  -- Our expression equals this chart, at least on its source.
+  rw [PartialHomeomorph.subtypeRestr_def, PartialHomeomorph.trans_refl]
+  let goal := e.toHomeomorphSourceTarget.toPartialHomeomorph ≫ₕ (t.partialHomeomorphSubtypeCoe this)
+  have : goal ≈ e.subtypeRestr (s := s) hs :=
+    (goal.eqOnSource_iff (e.subtypeRestr (s := s) hs)).mpr ⟨by simp, by intro _ _; rfl⟩
+  exact G.mem_maximalAtlas_of_eqOnSource (M := s) this (G.restriction_in_maximalAtlas he hs)
+
+/-- Each chart of a charted space is a structomorphism between its source and target. -/
+def PartialHomeomorph.toStructomorph {e : PartialHomeomorph M H} (he : e ∈ atlas H M)
+    [HasGroupoid M G] [ClosedUnderRestriction G] :
+    let s : Opens M := { carrier := e.source, is_open' := e.open_source }
+    let t : Opens H := { carrier := e.target, is_open' := e.open_target }
+    Structomorph G s t := by
+  intro s t
+  by_cases h : Nonempty e.source
+  · exact { e.toHomeomorphSourceTarget with
+      mem_groupoid :=
+        -- The atlas of H on itself has only one chart, hence c' is the inclusion.
+        -- Then, compatibility of `G` *almost* yields our claim --- except that `e` is a chart
+        -- on `M` and `c` is one on `s`: we need to show that restricting `e` to `s` and composing
+        -- with `c'` yields a chart in the maximal atlas of `s`.
+        fun c c' hc hc' ↦ G.compatible_of_mem_maximalAtlas (G.subset_maximalAtlas hc)
+          (G.restriction_mem_maximalAtlas_subtype he h c' hc') }
+  · have : IsEmpty s := not_nonempty_iff.mp h
+    have : IsEmpty t := isEmpty_coe_sort.mpr
+      (by convert e.image_source_eq_target ▸ image_eq_empty.mpr (isEmpty_coe_sort.mp this))
+    exact { Homeomorph.empty with
+      -- `c'` cannot exist: it would be the restriction of `chartAt H x` at some `x ∈ t`.
+      mem_groupoid := fun _ c' _ ⟨_, ⟨x, _⟩, _⟩ ↦ (this.false x).elim }
+
 end HasGroupoid
doc: add docstrings for ChartedSpace.{atlas,chartAt} and their aliases (#10169)
Diff
@@ -555,16 +555,20 @@ sometimes as a real manifold over `ℝ^(2n)`.
 -/
 @[ext]
 class ChartedSpace (H : Type*) [TopologicalSpace H] (M : Type*) [TopologicalSpace M] where
+  /-- The atlas of charts in the `ChartedSpace`. -/
   protected atlas : Set (PartialHomeomorph M H)
+  /-- The preferred chart at each point in the charted space. -/
   protected chartAt : M → PartialHomeomorph M H
   protected mem_chart_source : ∀ x, x ∈ (chartAt x).source
   protected chart_mem_atlas : ∀ x, chartAt x ∈ atlas
 #align charted_space ChartedSpace
 
+/-- The atlas of charts in a `ChartedSpace`. -/
 abbrev atlas (H : Type*) [TopologicalSpace H] (M : Type*) [TopologicalSpace M]
     [ChartedSpace H M] : Set (PartialHomeomorph M H) :=
   ChartedSpace.atlas
 
+/-- The preferred chart at a point `x` in a charted space `M`. -/
 abbrev chartAt (H : Type*) [TopologicalSpace H] {M : Type*} [TopologicalSpace M]
     [ChartedSpace H M] (x : M) : PartialHomeomorph M H :=
   ChartedSpace.chartAt x
refactor(PartialHomeomorph): make (s : Opens \alpha) implicit (#10082)

It is always used in conjunction with a hypothesis hs about s.

In Lean 3, these arguments were kept explicit on purpose: given a definition myDef {x : α} (hx : MyProp x), if the proof of hx was nontrivial (not a variable), Lean would pretty-print it as myDef _.

In Lean 4, setting pp.proofs.withType or pp.proofs to true makes such terms pretty-print as myDef (x : MyProp). Hence, this workaround is no longer necessary.

Follow-up to #9894.

Diff
@@ -1146,8 +1146,8 @@ variable (s : Opens M)
 
 /-- An open subset of a charted space is naturally a charted space. -/
 protected instance instChartedSpace : ChartedSpace H s where
-  atlas := ⋃ x : s, {(chartAt H x.1).subtypeRestr s ⟨x⟩}
-  chartAt x := (chartAt H x.1).subtypeRestr s ⟨x⟩
+  atlas := ⋃ x : s, {(chartAt H x.1).subtypeRestr ⟨x⟩}
+  chartAt x := (chartAt H x.1).subtypeRestr ⟨x⟩
   mem_chart_source x := ⟨trivial, mem_chart_source H x.1⟩
   chart_mem_atlas x := by
     simp only [mem_iUnion, mem_singleton_iff]
@@ -1163,7 +1163,7 @@ protected instance instHasGroupoid [ClosedUnderRestriction G] : HasGroupoid s G
     rw [hc'.symm, mem_singleton_iff] at he'
     rw [he, he']
     refine' G.mem_of_eqOnSource _
-      (subtypeRestr_symm_trans_subtypeRestr s _ (chartAt H x) (chartAt H x'))
+      (subtypeRestr_symm_trans_subtypeRestr (s := s) _ (chartAt H x) (chartAt H x'))
     apply closedUnderRestriction'
     · exact G.compatible (chart_mem_atlas _ _) (chart_mem_atlas _ _)
     · exact isOpen_inter_preimage_symm (chartAt _ _) s.2
@@ -1172,18 +1172,18 @@ protected instance instHasGroupoid [ClosedUnderRestriction G] : HasGroupoid s G
 theorem chartAt_subtype_val_symm_eventuallyEq (U : Opens M) {x : U} :
     (chartAt H x.val).symm =ᶠ[𝓝 (chartAt H x.val x.val)] Subtype.val ∘ (chartAt H x).symm := by
   set e := chartAt H x.val
-  have heUx_nhds : (e.subtypeRestr U ⟨x⟩).target ∈ 𝓝 (e x) := by
-    apply (e.subtypeRestr U ⟨x⟩).open_target.mem_nhds
+  have heUx_nhds : (e.subtypeRestr ⟨x⟩).target ∈ 𝓝 (e x) := by
+    apply (e.subtypeRestr ⟨x⟩).open_target.mem_nhds
     exact e.map_subtype_source ⟨x⟩ (mem_chart_source _ _)
-  exact Filter.eventuallyEq_of_mem heUx_nhds (e.subtypeRestr_symm_eqOn U ⟨x⟩)
+  exact Filter.eventuallyEq_of_mem heUx_nhds (e.subtypeRestr_symm_eqOn ⟨x⟩)
 
 theorem chartAt_inclusion_symm_eventuallyEq {U V : Opens M} (hUV : U ≤ V) {x : U} :
     (chartAt H (Set.inclusion hUV x)).symm
     =ᶠ[𝓝 (chartAt H (Set.inclusion hUV x) (Set.inclusion hUV x))]
     Set.inclusion hUV ∘ (chartAt H x).symm := by
   set e := chartAt H (x : M)
-  have heUx_nhds : (e.subtypeRestr U ⟨x⟩).target ∈ 𝓝 (e x) := by
-    apply (e.subtypeRestr U ⟨x⟩).open_target.mem_nhds
+  have heUx_nhds : (e.subtypeRestr ⟨x⟩).target ∈ 𝓝 (e x) := by
+    apply (e.subtypeRestr ⟨x⟩).open_target.mem_nhds
     exact e.map_subtype_source ⟨x⟩ (mem_chart_source _ _)
   exact Filter.eventuallyEq_of_mem heUx_nhds <| e.subtypeRestr_symm_eqOn_of_le ⟨x⟩
     ⟨Set.inclusion hUV x⟩ hUV
refactor(PartialHomeomorph): make [Nonempty s] explicit (#9894)

Subsets aren't going to have Nonempty instances on them, typically, so one would have to manually construct a term of [Nonempty s] whenever PartialHomeomorph.subtypeRestr is used. Turning this instance argument explicit, (hs : Nonempty s) would help us avoid [@PartialHomeomorph](https://github.com/PartialHomeomorph).subtypeRestr _ _ _ _ constructions or haveI : Nonempty ....

Its only downstream effect currently is in ChartedSpace.lean.

Diff
@@ -1146,8 +1146,8 @@ variable (s : Opens M)
 
 /-- An open subset of a charted space is naturally a charted space. -/
 protected instance instChartedSpace : ChartedSpace H s where
-  atlas := ⋃ x : s, {@PartialHomeomorph.subtypeRestr _ _ _ _ (chartAt H x.1) s ⟨x⟩}
-  chartAt x := @PartialHomeomorph.subtypeRestr _ _ _ _ (chartAt H x.1) s ⟨x⟩
+  atlas := ⋃ x : s, {(chartAt H x.1).subtypeRestr s ⟨x⟩}
+  chartAt x := (chartAt H x.1).subtypeRestr s ⟨x⟩
   mem_chart_source x := ⟨trivial, mem_chart_source H x.1⟩
   chart_mem_atlas x := by
     simp only [mem_iUnion, mem_singleton_iff]
@@ -1159,12 +1159,11 @@ protected instance instChartedSpace : ChartedSpace H s where
 protected instance instHasGroupoid [ClosedUnderRestriction G] : HasGroupoid s G where
   compatible := by
     rintro e e' ⟨_, ⟨x, hc⟩, he⟩ ⟨_, ⟨x', hc'⟩, he'⟩
-    haveI : Nonempty s := ⟨x⟩
     rw [hc.symm, mem_singleton_iff] at he
     rw [hc'.symm, mem_singleton_iff] at he'
     rw [he, he']
     refine' G.mem_of_eqOnSource _
-      (subtypeRestr_symm_trans_subtypeRestr s (chartAt H x) (chartAt H x'))
+      (subtypeRestr_symm_trans_subtypeRestr s _ (chartAt H x) (chartAt H x'))
     apply closedUnderRestriction'
     · exact G.compatible (chart_mem_atlas _ _) (chart_mem_atlas _ _)
     · exact isOpen_inter_preimage_symm (chartAt _ _) s.2
@@ -1172,29 +1171,23 @@ protected instance instHasGroupoid [ClosedUnderRestriction G] : HasGroupoid s G
 
 theorem chartAt_subtype_val_symm_eventuallyEq (U : Opens M) {x : U} :
     (chartAt H x.val).symm =ᶠ[𝓝 (chartAt H x.val x.val)] Subtype.val ∘ (chartAt H x).symm := by
-  set i : U → M := Subtype.val
   set e := chartAt H x.val
-  haveI : Nonempty U := ⟨x⟩
-  haveI : Nonempty M := ⟨i x⟩
-  have heUx_nhds : (e.subtypeRestr U).target ∈ 𝓝 (e x) := by
-    apply (e.subtypeRestr U).open_target.mem_nhds
-    exact e.map_subtype_source (mem_chart_source _ _)
-  exact Filter.eventuallyEq_of_mem heUx_nhds (e.subtypeRestr_symm_eqOn U)
+  have heUx_nhds : (e.subtypeRestr U ⟨x⟩).target ∈ 𝓝 (e x) := by
+    apply (e.subtypeRestr U ⟨x⟩).open_target.mem_nhds
+    exact e.map_subtype_source ⟨x⟩ (mem_chart_source _ _)
+  exact Filter.eventuallyEq_of_mem heUx_nhds (e.subtypeRestr_symm_eqOn U ⟨x⟩)
 
 theorem chartAt_inclusion_symm_eventuallyEq {U V : Opens M} (hUV : U ≤ V) {x : U} :
     (chartAt H (Set.inclusion hUV x)).symm
     =ᶠ[𝓝 (chartAt H (Set.inclusion hUV x) (Set.inclusion hUV x))]
     Set.inclusion hUV ∘ (chartAt H x).symm := by
-  set i := Set.inclusion hUV
   set e := chartAt H (x : M)
-  haveI : Nonempty U := ⟨x⟩
-  haveI : Nonempty V := ⟨i x⟩
-  have heUx_nhds : (e.subtypeRestr U).target ∈ 𝓝 (e x) := by
-    apply (e.subtypeRestr U).open_target.mem_nhds
-    exact e.map_subtype_source (mem_chart_source _ _)
-  exact Filter.eventuallyEq_of_mem heUx_nhds (e.subtypeRestr_symm_eqOn_of_le hUV)
+  have heUx_nhds : (e.subtypeRestr U ⟨x⟩).target ∈ 𝓝 (e x) := by
+    apply (e.subtypeRestr U ⟨x⟩).open_target.mem_nhds
+    exact e.map_subtype_source ⟨x⟩ (mem_chart_source _ _)
+  exact Filter.eventuallyEq_of_mem heUx_nhds <| e.subtypeRestr_symm_eqOn_of_le ⟨x⟩
+    ⟨Set.inclusion hUV x⟩ hUV
 #align topological_space.opens.chart_at_inclusion_symm_eventually_eq TopologicalSpace.Opens.chartAt_inclusion_symm_eventuallyEq
-
 end TopologicalSpace.Opens
 
 /-! ### Structomorphisms -/
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
@@ -167,7 +167,7 @@ structure StructureGroupoid (H : Type u) [TopologicalSpace H] where
   id_mem' : PartialHomeomorph.refl H ∈ members
   locality' : ∀ e : PartialHomeomorph H H,
     (∀ x ∈ e.source, ∃ s, IsOpen s ∧ x ∈ s ∧ e.restr s ∈ members) → e ∈ members
-  eq_on_source' : ∀ e e' : PartialHomeomorph H H, e ∈ members → e' ≈ e → e' ∈ members
+  mem_of_eqOnSource' : ∀ e e' : PartialHomeomorph H H, e ∈ members → e' ≈ e → e' ∈ members
 #align structure_groupoid StructureGroupoid
 
 variable [TopologicalSpace H]
@@ -198,8 +198,8 @@ instance : Inf (StructureGroupoid H) :=
         refine And.intro hs.left (And.intro hs.right.left ?_)
       · exact hs.right.right.left
       · exact hs.right.right.right)
-    (eq_on_source' := fun e e' he hee' =>
-      ⟨G.eq_on_source' e e' he.left hee', G'.eq_on_source' e e' he.right hee'⟩)⟩
+    (mem_of_eqOnSource' := fun e e' he hee' =>
+      ⟨G.mem_of_eqOnSource' e e' he.left hee', G'.mem_of_eqOnSource' e e' he.right hee'⟩)⟩
 
 instance : InfSet (StructureGroupoid H) :=
   ⟨fun S => StructureGroupoid.mk
@@ -223,10 +223,10 @@ instance : InfSet (StructureGroupoid H) :=
       intro x hex
       rcases he x hex with ⟨s, hs⟩
       exact ⟨s, ⟨hs.left, ⟨hs.right.left, hs.right.right i hi⟩⟩⟩)
-    (eq_on_source' := by
+    (mem_of_eqOnSource' := by
       simp only [mem_iInter]
       intro e e' he he'e
-      exact fun i hi => i.eq_on_source' e e' (he i hi) he'e)⟩
+      exact fun i hi => i.mem_of_eqOnSource' e e' (he i hi) he'e)⟩
 
 theorem StructureGroupoid.trans (G : StructureGroupoid H) {e e' : PartialHomeomorph H H}
     (he : e ∈ G) (he' : e' ∈ G) : e ≫ₕ e' ∈ G :=
@@ -247,10 +247,10 @@ theorem StructureGroupoid.locality (G : StructureGroupoid H) {e : PartialHomeomo
   G.locality' e h
 #align structure_groupoid.locality StructureGroupoid.locality
 
-theorem StructureGroupoid.eq_on_source (G : StructureGroupoid H) {e e' : PartialHomeomorph H H}
+theorem StructureGroupoid.mem_of_eqOnSource (G : StructureGroupoid H) {e e' : PartialHomeomorph H H}
     (he : e ∈ G) (h : e' ≈ e) : e' ∈ G :=
-  G.eq_on_source' e e' he h
-#align structure_groupoid.eq_on_source StructureGroupoid.eq_on_source
+  G.mem_of_eqOnSource' e e' he h
+#align structure_groupoid.eq_on_source StructureGroupoid.mem_of_eqOnSource
 
 /-- Partial order on the set of groupoids, given by inclusion of the members of the groupoid. -/
 instance StructureGroupoid.partialOrder : PartialOrder (StructureGroupoid H) :=
@@ -308,7 +308,7 @@ def idGroupoid (H : Type u) [TopologicalSpace H] : StructureGroupoid H where
       · exfalso
         rw [mem_setOf_eq] at hs
         rwa [hs] at x's
-  eq_on_source' e e' he he'e := by
+  mem_of_eqOnSource' e e' he he'e := by
     cases' he with he he
     · left
       have : e = e' := by
@@ -379,7 +379,7 @@ def Pregroupoid.groupoid (PG : Pregroupoid H) : StructureGroupoid H where
         convert hs.2 using 1
         dsimp [PartialHomeomorph.restr]
         rw [s_open.interior_eq]
-  eq_on_source' e e' he ee' := by
+  mem_of_eqOnSource' e e' he ee' := by
     constructor
     · apply PG.congr e'.open_source ee'.2
       simp only [ee'.1, he.1]
@@ -405,11 +405,11 @@ theorem groupoid_of_pregroupoid_le (PG₁ PG₂ : Pregroupoid H)
   exact ⟨h _ _ he.1, h _ _ he.2⟩
 #align groupoid_of_pregroupoid_le groupoid_of_pregroupoid_le
 
-theorem mem_pregroupoid_of_eq_on_source (PG : Pregroupoid H) {e e' : PartialHomeomorph H H}
+theorem mem_pregroupoid_of_eqOnSource (PG : Pregroupoid H) {e e' : PartialHomeomorph H H}
     (he' : e ≈ e') (he : PG.property e e.source) : PG.property e' e'.source := by
   rw [← he'.1]
   exact PG.congr e.open_source he'.eqOn.symm he
-#align mem_pregroupoid_of_eq_on_source mem_pregroupoid_of_eq_on_source
+#align mem_pregroupoid_of_eq_on_source mem_pregroupoid_of_eqOnSource
 
 /-- The pregroupoid of all partial maps on a topological space `H`. -/
 @[reducible]
@@ -489,7 +489,7 @@ def idRestrGroupoid : StructureGroupoid H where
       rw [hs.interior_eq]
       exact hxs
     simpa only [mfld_simps] using PartialHomeomorph.EqOnSource.eqOn hes' hes
-  eq_on_source' := by
+  mem_of_eqOnSource' := by
     rintro e e' ⟨s, hs, hse⟩ hee'
     exact ⟨s, hs, Setoid.trans hee' hse⟩
 #align id_restr_groupoid idRestrGroupoid
@@ -515,7 +515,7 @@ theorem closedUnderRestriction_iff_id_le (G : StructureGroupoid H) :
   · intro _i
     apply StructureGroupoid.le_iff.mpr
     rintro e ⟨s, hs, hes⟩
-    refine' G.eq_on_source _ hes
+    refine' G.mem_of_eqOnSource _ hes
     convert closedUnderRestriction' G.id_mem hs
     -- Porting note: was
     -- change s = _ ∩ _
@@ -1041,7 +1041,7 @@ theorem StructureGroupoid.compatible_of_mem_maximalAtlas {e e' : PartialHomeomor
     _ ≈ (e.symm ≫ₕ ofSet f.source f.open_source) ≫ₕ e' := by rw [trans_assoc]
     _ ≈ e.symm.restr s ≫ₕ e' := by rw [trans_of_set']; apply refl
     _ ≈ (e.symm ≫ₕ e').restr s := by rw [restr_trans]
-  exact G.eq_on_source C (Setoid.symm D)
+  exact G.mem_of_eqOnSource C (Setoid.symm D)
 #align structure_groupoid.compatible_of_mem_maximal_atlas StructureGroupoid.compatible_of_mem_maximalAtlas
 
 variable (G)
@@ -1105,7 +1105,7 @@ theorem singleton_hasGroupoid (h : e.source = Set.univ) (G : StructureGroupoid H
       intro e' e'' he' he''
       rw [e.singletonChartedSpace_mem_atlas_eq h e' he',
         e.singletonChartedSpace_mem_atlas_eq h e'' he'']
-      refine' G.eq_on_source _ e.symm_trans_self
+      refine' G.mem_of_eqOnSource _ e.symm_trans_self
       have hle : idRestrGroupoid ≤ G := (closedUnderRestriction_iff_id_le G).mp (by assumption)
       exact StructureGroupoid.le_iff.mp hle _ (idRestrGroupoid_mem _) }
 #align local_homeomorph.singleton_has_groupoid PartialHomeomorph.singleton_hasGroupoid
@@ -1163,7 +1163,8 @@ protected instance instHasGroupoid [ClosedUnderRestriction G] : HasGroupoid s G
     rw [hc.symm, mem_singleton_iff] at he
     rw [hc'.symm, mem_singleton_iff] at he'
     rw [he, he']
-    refine' G.eq_on_source _ (subtypeRestr_symm_trans_subtypeRestr s (chartAt H x) (chartAt H x'))
+    refine' G.mem_of_eqOnSource _
+      (subtypeRestr_symm_trans_subtypeRestr s (chartAt H x) (chartAt H x'))
     apply closedUnderRestriction'
     · exact G.compatible (chart_mem_atlas _ _) (chart_mem_atlas _ _)
     · exact isOpen_inter_preimage_symm (chartAt _ _) s.2
@@ -1277,7 +1278,7 @@ def Structomorph.trans (e : Structomorph G M M') (e' : Structomorph G M' M'') :
         _ ≈ (c.symm ≫ₕ (f₁ ≫ₕ f₂) ≫ₕ c').restr s :=
           by simp only [EqOnSource.restr, trans_assoc, _root_.refl]
         _ ≈ F₂ := by simp only [feq, _root_.refl]
-      have : F₂ ∈ G := G.eq_on_source A (Setoid.symm this)
+      have : F₂ ∈ G := G.mem_of_eqOnSource A (Setoid.symm this)
       exact this }
 #align structomorph.trans Structomorph.trans
 
feat: subset of a charted space is open iff each image in charts is (#9672)

From sphere-eversion; I just cleaned it up slightly and submitted it.

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

Diff
@@ -619,6 +619,16 @@ theorem chart_target_mem_nhds (x : M) : (chartAt H x).target ∈ 𝓝 (chartAt H
   (chartAt H x).open_target.mem_nhds <| mem_chart_target H x
 #align chart_target_mem_nhds chart_target_mem_nhds
 
+variable (M) in
+@[simp]
+theorem iUnion_source_chartAt : (⋃ x : M, (chartAt H x).source) = (univ : Set M) :=
+  eq_univ_iff_forall.mpr fun x ↦ mem_iUnion.mpr ⟨x, mem_chart_source H x⟩
+
+theorem ChartedSpace.isOpen_iff (s : Set M) :
+    IsOpen s ↔ ∀ x : M, IsOpen <| chartAt H x '' ((chartAt H x).source ∩ s) := by
+  rw [isOpen_iff_of_cover (fun i ↦ (chartAt H i).open_source) (iUnion_source_chartAt H M)]
+  simp only [(chartAt H _).isOpen_image_iff_of_subset_source (inter_subset_left _ _)]
+
 /-- `achart H x` is the chart at `x`, considered as an element of the atlas.
 Especially useful for working with `BasicSmoothVectorBundleCore`. -/
 def achart (x : M) : atlas H M :=
chore(Geometry/Manifold/ChartedSpace): remove autoImplicit true (#9671)

It's just used once for one declaration. While at it, also remove two opens which are unused.

Diff
@@ -110,12 +110,9 @@ In the locale `Manifold`, we denote the composition of partial homeomorphisms wi
 composition of partial equivs with `≫`.
 -/
 
-set_option autoImplicit true
-
-
 noncomputable section
 
-open Classical Topology Filter
+open Topology
 
 universe u
 
@@ -792,7 +789,7 @@ instance prodChartedSpace (H : Type*) [TopologicalSpace H] (M : Type*) [Topologi
 section prodChartedSpace
 
 @[ext]
-theorem ModelProd.ext {x y : ModelProd α β} (h₁ : x.1 = y.1) (h₂ : x.2 = y.2) : x = y :=
+theorem ModelProd.ext {x y : ModelProd H H'} (h₁ : x.1 = y.1) (h₂ : x.2 = y.2) : x = y :=
   Prod.ext h₁ h₂
 
 variable [TopologicalSpace H] [TopologicalSpace M] [ChartedSpace H M] [TopologicalSpace H']
chore(Geometry/Manifold): use dot notation for IsOpen lemmas more (#9567)

While at it, switch from refine' to refine (easy cases only) in the lines I'm touching anyway.

Diff
@@ -472,7 +472,7 @@ def idRestrGroupoid : StructureGroupoid H where
   members := { e | ∃ (s : Set H) (h : IsOpen s), e ≈ PartialHomeomorph.ofSet s h }
   trans' := by
     rintro e e' ⟨s, hs, hse⟩ ⟨s', hs', hse'⟩
-    refine' ⟨s ∩ s', IsOpen.inter hs hs', _⟩
+    refine ⟨s ∩ s', hs.inter hs', ?_⟩
     have := PartialHomeomorph.EqOnSource.trans' hse hse'
     rwa [PartialHomeomorph.ofSet_trans_ofSet] at this
   symm' := by
@@ -505,7 +505,7 @@ theorem idRestrGroupoid_mem {s : Set H} (hs : IsOpen s) : ofSet s hs ∈ @idRest
 instance closedUnderRestriction_idRestrGroupoid : ClosedUnderRestriction (@idRestrGroupoid H _) :=
   ⟨by
     rintro e ⟨s', hs', he⟩ s hs
-    use s' ∩ s, IsOpen.inter hs' hs
+    use s' ∩ s, hs'.inter hs
     refine' Setoid.trans (PartialHomeomorph.EqOnSource.restr he s) _
     exact ⟨by simp only [hs.interior_eq, mfld_simps], by simp only [mfld_simps, eqOn_refl]⟩⟩
 #align closed_under_restriction_id_restr_groupoid closedUnderRestriction_idRestrGroupoid
chore(LocallyCompact): rename the "of basis" constructor (#9327)

Rename locallyCompactSpace_of_hasBasis to LocallyCompactSpace.of_hasBasis to allow the new-style dot notation.

Diff
@@ -676,7 +676,7 @@ theorem ChartedSpace.locallyCompactSpace [LocallyCompactSpace H] : LocallyCompac
     rw [← (chartAt H x).symm_map_nhds_eq (mem_chart_source H x)]
     exact ((compact_basis_nhds (chartAt H x x)).hasBasis_self_subset
       (chart_target_mem_nhds H x)).map _
-  refine locallyCompactSpace_of_hasBasis this ?_
+  refine .of_hasBasis this ?_
   rintro x s ⟨_, h₂, h₃⟩
   exact h₂.image_of_continuousOn ((chartAt H x).continuousOn_symm.mono h₃)
 #align charted_space.locally_compact ChartedSpace.locallyCompactSpace
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
@@ -881,7 +881,7 @@ theorem open_target (he : e ∈ c.atlas) : IsOpen e.target := by
 /-- An element of the atlas in a charted space without topology becomes a partial homeomorphism
 for the topology constructed from this atlas. The `PartialHomeomorph` version is given in this
 definition. -/
-protected def localHomeomorph (e : PartialEquiv M H) (he : e ∈ c.atlas) :
+protected def partialHomeomorph (e : PartialEquiv M H) (he : e ∈ c.atlas) :
     @PartialHomeomorph M H c.toTopologicalSpace _ :=
   { c.toTopologicalSpace, e with
     open_source := by convert c.open_source' he
@@ -911,14 +911,14 @@ protected def localHomeomorph (e : PartialEquiv M H) (he : e ∈ c.atlas) :
         congr 1
         exact inter_comm _ _
       simpa [PartialEquiv.trans_source, preimage_inter, preimage_comp.symm, A] using this }
-#align charted_space_core.local_homeomorph ChartedSpaceCore.localHomeomorph
+#align charted_space_core.local_homeomorph ChartedSpaceCore.partialHomeomorph
 
 /-- Given a charted space without topology, endow it with a genuine charted space structure with
 respect to the topology constructed from the atlas. -/
 def toChartedSpace : @ChartedSpace H _ M c.toTopologicalSpace :=
   { c.toTopologicalSpace with
-    atlas := ⋃ (e : PartialEquiv M H) (he : e ∈ c.atlas), {c.localHomeomorph e he}
-    chartAt := fun x ↦ c.localHomeomorph (c.chartAt x) (c.chart_mem_atlas x)
+    atlas := ⋃ (e : PartialEquiv M H) (he : e ∈ c.atlas), {c.partialHomeomorph e he}
+    chartAt := fun x ↦ c.partialHomeomorph (c.chartAt x) (c.chart_mem_atlas x)
     mem_chart_source := fun x ↦ c.mem_chart_source x
     chart_mem_atlas := fun x ↦ by
       simp only [mem_iUnion, mem_singleton_iff]
chore: rename in PartialEquiv, Homeomorph, PartialHomeomorph (#9430)

Items 4-5 in reference Zulip

Also added symm and trans definitions for PartialEquiv, Homeomorph, and PartialHomeomorph.

Diff
@@ -1030,7 +1030,7 @@ theorem StructureGroupoid.compatible_of_mem_maximalAtlas {e e' : PartialHomeomor
   have D : (e.symm ≫ₕ f) ≫ₕ f.symm ≫ₕ e' ≈ (e.symm ≫ₕ e').restr s := calc
     (e.symm ≫ₕ f) ≫ₕ f.symm ≫ₕ e' = e.symm ≫ₕ (f ≫ₕ f.symm) ≫ₕ e' := by simp only [trans_assoc]
     _ ≈ e.symm ≫ₕ ofSet f.source f.open_source ≫ₕ e' :=
-      EqOnSource.trans' (refl _) (EqOnSource.trans' (trans_self_symm _) (refl _))
+      EqOnSource.trans' (refl _) (EqOnSource.trans' (self_trans_symm _) (refl _))
     _ ≈ (e.symm ≫ₕ ofSet f.source f.open_source) ≫ₕ e' := by rw [trans_assoc]
     _ ≈ e.symm.restr s ≫ₕ e' := by rw [trans_of_set']; apply refl
     _ ≈ (e.symm ≫ₕ e').restr s := by rw [restr_trans]
@@ -1098,7 +1098,7 @@ theorem singleton_hasGroupoid (h : e.source = Set.univ) (G : StructureGroupoid H
       intro e' e'' he' he''
       rw [e.singletonChartedSpace_mem_atlas_eq h e' he',
         e.singletonChartedSpace_mem_atlas_eq h e'' he'']
-      refine' G.eq_on_source _ e.trans_symm_self
+      refine' G.eq_on_source _ e.symm_trans_self
       have hle : idRestrGroupoid ≤ G := (closedUnderRestriction_iff_id_le G).mp (by assumption)
       exact StructureGroupoid.le_iff.mp hle _ (idRestrGroupoid_mem _) }
 #align local_homeomorph.singleton_has_groupoid PartialHomeomorph.singleton_hasGroupoid
@@ -1262,7 +1262,7 @@ def Structomorph.trans (e : Structomorph G M M') (e' : Structomorph G M' M'') :
         F₁ ≈ c.symm ≫ₕ f₁ ≫ₕ (g ≫ₕ g.symm) ≫ₕ f₂ ≫ₕ c' := by simp only [trans_assoc, _root_.refl]
         _ ≈ c.symm ≫ₕ f₁ ≫ₕ ofSet g.source g.open_source ≫ₕ f₂ ≫ₕ c' :=
           EqOnSource.trans' (_root_.refl _) (EqOnSource.trans' (_root_.refl _)
-            (EqOnSource.trans' (trans_self_symm g) (_root_.refl _)))
+            (EqOnSource.trans' (self_trans_symm g) (_root_.refl _)))
         _ ≈ ((c.symm ≫ₕ f₁) ≫ₕ ofSet g.source g.open_source) ≫ₕ f₂ ≫ₕ c' :=
           by simp only [trans_assoc, _root_.refl]
         _ ≈ (c.symm ≫ₕ f₁).restr s ≫ₕ f₂ ≫ₕ c' := by rw [trans_of_set']
refactor(*): change definition of Set.image2 etc (#9275)
  • Redefine Set.image2 to use ∃ a ∈ s, ∃ b ∈ t, f a b = c instead of ∃ a b, a ∈ s ∧ b ∈ t ∧ f a b = c.
  • Redefine Set.seq as Set.image2. The new definition is equal to the old one but rw [Set.seq] gives a different result.
  • Redefine Filter.map₂ to use ∃ u ∈ f, ∃ v ∈ g, image2 m u v ⊆ s instead of ∃ u v, u ∈ f ∧ v ∈ g ∧ ...
  • Update lemmas like Set.mem_image2, Finset.mem_image₂, Set.mem_mul, Finset.mem_div etc

The two reasons to make the change are:

  • ∃ a ∈ s, ∃ b ∈ t, _ is a simp-normal form, and
  • it looks a bit nicer.
Diff
@@ -703,7 +703,7 @@ def ChartedSpace.comp (H : Type*) [TopologicalSpace H] (H' : Type*) [Topological
   atlas := image2 PartialHomeomorph.trans (atlas H' M) (atlas H H')
   chartAt p := (chartAt H' p).trans (chartAt H (chartAt H' p p))
   mem_chart_source p := by simp only [mfld_simps]
-  chart_mem_atlas p := ⟨chartAt _ p, chartAt _ _, chart_mem_atlas _ p, chart_mem_atlas _ _, rfl⟩
+  chart_mem_atlas p := ⟨chartAt _ p, chart_mem_atlas _ p, chartAt _ _, chart_mem_atlas _ _, rfl⟩
 #align charted_space.comp ChartedSpace.comp
 
 theorem chartAt_comp (H : Type*) [TopologicalSpace H] (H' : Type*) [TopologicalSpace H']
chore: audit remaining uses of "local homeomorphism" in comments (#9245)

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

Follow-up to #8982; complements #9238.

Diff
@@ -31,22 +31,22 @@ therefore two different ingredients in a charted space:
 We separate these two parts in the definition: the charted space structure is just the set of
 charts, and then the different smoothness requirements (smooth manifold, orientable manifold,
 contact manifold, and so on) are additional properties of these charts. These properties are
-formalized through the notion of structure groupoid, i.e., a set of local homeomorphisms stable
+formalized through the notion of structure groupoid, i.e., a set of partial homeomorphisms stable
 under composition and inverse, to which the change of coordinates should belong.
 
 ## Main definitions
 
-* `StructureGroupoid H` : a subset of local homeomorphisms of `H` stable under composition,
-  inverse and restriction (ex: local diffeos).
-* `continuousGroupoid H` : the groupoid of all local homeomorphisms of `H`.
+* `StructureGroupoid H` : a subset of partial homeomorphisms of `H` stable under composition,
+  inverse and restriction (ex: partial diffeomorphisms).
+* `continuousGroupoid H` : the groupoid of all partial homeomorphisms of `H`.
 * `ChartedSpace H M` : charted space structure on `M` modelled on `H`, given by an atlas of
-  local homeomorphisms from `M` to `H` whose sources cover `M`. This is a type class.
+  partial homeomorphisms from `M` to `H` whose sources cover `M`. This is a type class.
 * `HasGroupoid M G` : when `G` is a structure groupoid on `H` and `M` is a charted space
   modelled on `H`, require that all coordinate changes belong to `G`. This is a type class.
 * `atlas H M` : when `M` is a charted space modelled on `H`, the atlas of this charted
   space structure, i.e., the set of charts.
 * `G.maximalAtlas M` : when `M` is a charted space modelled on `H` and admitting `G` as a
-  structure groupoid, one can consider all the local homeomorphisms from `M` to `H` such that
+  structure groupoid, one can consider all the partial homeomorphisms from `M` to `H` such that
   changing coordinate from any chart to them belongs to `G`. This is a larger atlas, called the
   maximal atlas (for the groupoid `G`).
 * `Structomorph G M M'` : the type of diffeomorphisms between the charted spaces `M` and `M'` for
@@ -59,7 +59,7 @@ This charted space structure is compatible with any groupoid.
 
 Additional useful definitions:
 
-* `Pregroupoid H` : a subset of local maps of `H` stable under composition and
+* `Pregroupoid H` : a subset of partial maps of `H` stable under composition and
   restriction, but not inverse (ex: smooth maps)
 * `Pregroupoid.groupoid` : construct a groupoid from a pregroupoid, by requiring that a map and
   its inverse both belong to the pregroupoid (ex: construct diffeos from smooth maps)
@@ -71,9 +71,9 @@ Additional useful definitions:
   maximal atlas associated to the groupoid `G`, the composition of `e.symm` and `e'` belongs to the
   `G` if `M` admits `G` as a structure groupoid.
 * `ChartedSpaceCore.toChartedSpace`: consider a space without a topology, but endowed with a set
-  of charts (which are local equivs) for which the change of coordinates are local homeos. Then
-  one can construct a topology on the space for which the charts become local homeos, defining
-  a genuine charted space structure.
+  of charts (which are partial equivs) for which the change of coordinates are partial homeos.
+  Then one can construct a topology on the space for which the charts become partial homeos,
+  defining a genuine charted space structure.
 
 ## Implementation notes
 
@@ -98,7 +98,7 @@ otherwise, there would be an instance from manifolds to topological spaces, whic
 instance search for topological spaces would try to find manifold structures involving a yet
 unknown model space, leading to problems. However, we also introduce the latter approach,
 through a structure `ChartedSpaceCore` making it possible to construct a topology out of a set of
-local equivs with compatibility conditions (but we do not register it as an instance).
+partial equivs with compatibility conditions (but we do not register it as an instance).
 
 In the definition of a charted space, the model space is written as an explicit parameter as there
 can be several model spaces for a given topological space. For instance, a complex manifold
@@ -106,8 +106,8 @@ can be several model spaces for a given topological space. For instance, a compl
 
 ## Notations
 
-In the locale `Manifold`, we denote the composition of local homeomorphisms with `≫ₕ`, and the
-composition of local equivs with `≫`.
+In the locale `Manifold`, we denote the composition of partial homeomorphisms with `≫ₕ`, and the
+composition of partial equivs with `≫`.
 -/
 
 set_option autoImplicit true
@@ -121,7 +121,7 @@ universe u
 
 variable {H : Type u} {H' : Type*} {M : Type*} {M' : Type*} {M'' : Type*}
 
-/- Notational shortcut for the composition of local homeomorphisms and local equivs, i.e.,
+/- Notational shortcut for the composition of partial homeomorphisms and partial equivs, i.e.,
 `PartialHomeomorph.trans` and `PartialEquiv.trans`.
 Note that, as is usual for equivs, the composition is from left to right, hence the direction of
 the arrow. -/
@@ -145,13 +145,13 @@ groupoid is naturally a vector bundle) I prefer that the members of the groupoid
 defined on sets of the form `s × E`. There is a typeclass `ClosedUnderRestriction` for groupoids
 which have the restriction property.
 
-The only nontrivial requirement is locality: if a local homeomorphism belongs to the groupoid
+The only nontrivial requirement is locality: if a partial homeomorphism belongs to the groupoid
 around each point in its domain of definition, then it belongs to the groupoid. Without this
 requirement, the composition of structomorphisms does not have to be a structomorphism. Note that
-this implies that a local homeomorphism with empty source belongs to any structure groupoid, as
+this implies that a partial homeomorphism with empty source belongs to any structure groupoid, as
 it trivially satisfies this condition.
 
-There is also a technical point, related to the fact that a local homeomorphism is by definition a
+There is also a technical point, related to the fact that a partial homeomorphism is by definition a
 global map which is a homeomorphism when restricted to its source subset (and its values outside
 of the source are not relevant). Therefore, we also require that being a member of the groupoid only
 depends on the values on the source.
@@ -161,7 +161,7 @@ We use primes in the structure names as we will reformulate them below (without
 -/
 
 
-/-- A structure groupoid is a set of local homeomorphisms of a topological space stable under
+/-- A structure groupoid is a set of partial homeomorphisms of a topological space stable under
 composition and inverse. They appear in the definition of the smoothness class of a manifold. -/
 structure StructureGroupoid (H : Type u) [TopologicalSpace H] where
   members : Set (PartialHomeomorph H H)
@@ -340,8 +340,8 @@ instance instStructureGroupoidOrderBot : OrderBot (StructureGroupoid H) where
 
 instance : Inhabited (StructureGroupoid H) := ⟨idGroupoid H⟩
 
-/-- To construct a groupoid, one may consider classes of local homeos such that both the function
-and its inverse have some property. If this property is stable under composition,
+/-- To construct a groupoid, one may consider classes of partial homeomorphisms such that
+both the function and its inverse have some property. If this property is stable under composition,
 one gets a groupoid. `Pregroupoid` bundles the properties needed for this construction, with the
 groupoid of smooth functions with smooth inverses as an application. -/
 structure Pregroupoid (H : Type*) [TopologicalSpace H] where
@@ -354,7 +354,7 @@ structure Pregroupoid (H : Type*) [TopologicalSpace H] where
   congr : ∀ {f g : H → H} {u}, IsOpen u → (∀ x ∈ u, g x = f x) → property f u → property g u
 #align pregroupoid Pregroupoid
 
-/-- Construct a groupoid of local homeos for which the map and its inverse have some property,
+/-- Construct a groupoid of partial homeos for which the map and its inverse have some property,
 from a pregroupoid asserting that this property is stable under composition. -/
 def Pregroupoid.groupoid (PG : Pregroupoid H) : StructureGroupoid H where
   members := { e : PartialHomeomorph H H | PG.property e e.source ∧ PG.property e.symm e.target }
@@ -414,7 +414,7 @@ theorem mem_pregroupoid_of_eq_on_source (PG : Pregroupoid H) {e e' : PartialHome
   exact PG.congr e.open_source he'.eqOn.symm he
 #align mem_pregroupoid_of_eq_on_source mem_pregroupoid_of_eq_on_source
 
-/-- The pregroupoid of all local maps on a topological space `H`. -/
+/-- The pregroupoid of all partial maps on a topological space `H`. -/
 @[reducible]
 def continuousPregroupoid (H : Type*) [TopologicalSpace H] : Pregroupoid H where
   property _ _ := True
@@ -427,12 +427,12 @@ def continuousPregroupoid (H : Type*) [TopologicalSpace H] : Pregroupoid H where
 instance (H : Type*) [TopologicalSpace H] : Inhabited (Pregroupoid H) :=
   ⟨continuousPregroupoid H⟩
 
-/-- The groupoid of all local homeomorphisms on a topological space `H`. -/
+/-- The groupoid of all partial homeomorphisms on a topological space `H`. -/
 def continuousGroupoid (H : Type*) [TopologicalSpace H] : StructureGroupoid H :=
   Pregroupoid.groupoid (continuousPregroupoid H)
 #align continuous_groupoid continuousGroupoid
 
-/-- Every structure groupoid is contained in the groupoid of all local homeomorphisms. -/
+/-- Every structure groupoid is contained in the groupoid of all partial homeomorphisms. -/
 instance instStructureGroupoidOrderTop : OrderTop (StructureGroupoid H) where
   top := continuousGroupoid H
   le_top _ _ _ := ⟨trivial, trivial⟩
@@ -466,8 +466,8 @@ theorem closedUnderRestriction' {G : StructureGroupoid H} [ClosedUnderRestrictio
   ClosedUnderRestriction.closedUnderRestriction he s hs
 #align closed_under_restriction' closedUnderRestriction'
 
-/-- The trivial restriction-closed groupoid, containing only local homeomorphisms equivalent to the
-restriction of the identity to the various open subsets. -/
+/-- The trivial restriction-closed groupoid, containing only partial homeomorphisms equivalent
+to the restriction of the identity to the various open subsets. -/
 def idRestrGroupoid : StructureGroupoid H where
   members := { e | ∃ (s : Set H) (h : IsOpen s), e ≈ PartialHomeomorph.ofSet s h }
   trans' := by
@@ -537,8 +537,8 @@ theorem closedUnderRestriction_iff_id_le (G : StructureGroupoid H) :
     exact idRestrGroupoid_mem hs
 #align closed_under_restriction_iff_id_le closedUnderRestriction_iff_id_le
 
-/-- The groupoid of all local homeomorphisms on a topological space `H` is closed under restriction.
--/
+/-- The groupoid of all partial homeomorphisms on a topological space `H`
+is closed under restriction. -/
 instance : ClosedUnderRestriction (continuousGroupoid H) :=
   (closedUnderRestriction_iff_id_le _).mpr le_top
 
@@ -719,7 +719,7 @@ library_note "Manifold type tags" /-- For technical reasons we introduce two typ
 * `ModelPi H` is the same as `∀ i, H i`, where `H : ι → Type*` and `ι` is a finite type.
 
 In both cases the reason is the same, so we explain it only in the case of the product. A charted
-space `M` with model `H` is a set of local charts from `M` to `H` covering the space. Every space is
+space `M` with model `H` is a set of charts from `M` to `H` covering the space. Every space is
 registered as a charted space over itself, using the only chart `id`, in `chartedSpaceSelf`. You
 can also define a product of charted space `M` and `M'` (with model space `H × H'`) by taking the
 products of the charts. Now, on `H × H'`, there are two charted space structures with model space
@@ -840,7 +840,7 @@ end ChartedSpace
 
 /-- Sometimes, one may want to construct a charted space structure on a space which does not yet
 have a topological structure, where the topology would come from the charts. For this, one needs
-charts that are only local equivs, and continuity properties for their composition.
+charts that are only partial equivs, and continuity properties for their composition.
 This is formalised in `ChartedSpaceCore`. -/
 -- @[nolint has_nonempty_instance]  -- Porting note: commented out
 structure ChartedSpaceCore (H : Type*) [TopologicalSpace H] (M : Type*) where
@@ -878,8 +878,8 @@ theorem open_target (he : e ∈ c.atlas) : IsOpen e.target := by
   simpa [PartialEquiv.trans_source, E] using c.open_source e e he he
 #align charted_space_core.open_target ChartedSpaceCore.open_target
 
-/-- An element of the atlas in a charted space without topology becomes a local homeomorphism
-for the topology constructed from this atlas. The `localHomeomorph` version is given in this
+/-- An element of the atlas in a charted space without topology becomes a partial homeomorphism
+for the topology constructed from this atlas. The `PartialHomeomorph` version is given in this
 definition. -/
 protected def localHomeomorph (e : PartialEquiv M H) (he : e ∈ c.atlas) :
     @PartialHomeomorph M H c.toTopologicalSpace _ :=
@@ -974,7 +974,7 @@ instance hasGroupoid_model_space (H : Type*) [TopologicalSpace H] (G : Structure
     simp [he, he', StructureGroupoid.id_mem]
 #align has_groupoid_model_space hasGroupoid_model_space
 
-/-- Any charted space structure is compatible with the groupoid of all local homeomorphisms. -/
+/-- Any charted space structure is compatible with the groupoid of all partial homeomorphisms. -/
 instance hasGroupoid_continuousGroupoid : HasGroupoid M (continuousGroupoid H) := by
   refine' ⟨fun _ _ ↦ _⟩
   rw [continuousGroupoid, mem_groupoid_of_pregroupoid]
@@ -986,7 +986,7 @@ section MaximalAtlas
 variable (M) (G : StructureGroupoid H)
 
 /-- Given a charted space admitting a structure groupoid, the maximal atlas associated to this
-structure groupoid is the set of all local charts that are compatible with the atlas, i.e., such
+structure groupoid is the set of all charts that are compatible with the atlas, i.e., such
 that changing coordinates with an atlas member gives an element of the groupoid. -/
 def StructureGroupoid.maximalAtlas : Set (PartialHomeomorph M H) :=
   { e | ∀ e' ∈ atlas H M, e.symm ≫ₕ e' ∈ G ∧ e'.symm ≫ₕ e ∈ G }
@@ -1061,8 +1061,8 @@ namespace PartialHomeomorph
 
 variable (e : PartialHomeomorph α H)
 
-/-- If a single local homeomorphism `e` from a space `α` into `H` has source covering the whole
-space `α`, then that local homeomorphism induces an `H`-charted space structure on `α`.
+/-- If a single partial homeomorphism `e` from a space `α` into `H` has source covering the whole
+space `α`, then that partial homeomorphism induces an `H`-charted space structure on `α`.
 (This condition is equivalent to `e` being an open embedding of `α` into `H`; see
 `OpenEmbedding.singletonChartedSpace`.) -/
 def singletonChartedSpace (h : e.source = Set.univ) : ChartedSpace H α where
@@ -1088,7 +1088,7 @@ theorem singletonChartedSpace_mem_atlas_eq (h : e.source = Set.univ) (e' : Parti
   h'
 #align local_homeomorph.singleton_charted_space_mem_atlas_eq PartialHomeomorph.singletonChartedSpace_mem_atlas_eq
 
-/-- Given a local homeomorphism `e` from a space `α` into `H`, if its source covers the whole
+/-- Given a partial homeomorphism `e` from a space `α` into `H`, if its source covers the whole
 space `α`, then the induced charted space structure on `α` is `HasGroupoid G` for any structure
 groupoid `G` which is closed under restrictions. -/
 theorem singleton_hasGroupoid (h : e.source = Set.univ) (G : StructureGroupoid H)
chore: remove uses of cases' (#9171)

I literally went through and regex'd some uses of cases', replacing them with rcases; this is meant to be a low effort PR as I hope that tools can do this in the future.

rcases is an easier replacement than cases, though with better tools we could in future do a second pass converting simple rcases added here (and existing ones) to cases.

Diff
@@ -287,7 +287,7 @@ def idGroupoid (H : Type u) [TopologicalSpace H] : StructureGroupoid H where
       simpa only [e.toPartialEquiv.image_source_eq_target.symm, mfld_simps] using E
   id_mem' := mem_union_left _ rfl
   locality' e he := by
-    cases' e.source.eq_empty_or_nonempty with h h
+    rcases e.source.eq_empty_or_nonempty with h | h
     · right
       exact h
     · left
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
@@ -122,12 +122,12 @@ universe u
 variable {H : Type u} {H' : Type*} {M : Type*} {M' : Type*} {M'' : Type*}
 
 /- Notational shortcut for the composition of local homeomorphisms and local equivs, i.e.,
-`PartialHomeomorph.trans` and `LocalEquiv.trans`.
+`PartialHomeomorph.trans` and `PartialEquiv.trans`.
 Note that, as is usual for equivs, the composition is from left to right, hence the direction of
 the arrow. -/
 scoped[Manifold] infixr:100 " ≫ₕ " => PartialHomeomorph.trans
 
-scoped[Manifold] infixr:100 " ≫ " => LocalEquiv.trans
+scoped[Manifold] infixr:100 " ≫ " => PartialEquiv.trans
 
 open Set PartialHomeomorph Manifold  -- Porting note: Added `Manifold`
 
@@ -284,7 +284,7 @@ def idGroupoid (H : Type u) [TopologicalSpace H] : StructureGroupoid H where
     cases' (mem_union _ _ _).1 he with E E
     · simp [mem_singleton_iff.mp E]
     · right
-      simpa only [e.toLocalEquiv.image_source_eq_target.symm, mfld_simps] using E
+      simpa only [e.toPartialEquiv.image_source_eq_target.symm, mfld_simps] using E
   id_mem' := mem_union_left _ rfl
   locality' e he := by
     cases' e.source.eq_empty_or_nonempty with h h
@@ -302,7 +302,7 @@ def idGroupoid (H : Type u) [TopologicalSpace H] : StructureGroupoid H where
         have : (e.restr s).source = univ := by
           rw [hs]
           simp
-        have : e.toLocalEquiv.source ∩ interior s = univ := this
+        have : e.toPartialEquiv.source ∩ interior s = univ := this
         have : univ ⊆ interior s := by
           rw [← this]
           exact inter_subset_right _ _
@@ -319,7 +319,7 @@ def idGroupoid (H : Type u) [TopologicalSpace H] : StructureGroupoid H where
           rw [Set.mem_singleton_iff.1 he] <;> rfl
       rwa [← this]
     · right
-      have he : e.toLocalEquiv.source = ∅ := he
+      have he : e.toPartialEquiv.source = ∅ := he
       rwa [Set.mem_setOf_eq, EqOnSource.source_eq he'e]
 #align id_groupoid idGroupoid
 
@@ -392,7 +392,7 @@ def Pregroupoid.groupoid (PG : Pregroupoid H) : StructureGroupoid H where
       -- convert he.2
       -- rw [A.1]
       -- rfl
-      rw [A.1, symm_toLocalEquiv, LocalEquiv.symm_source]
+      rw [A.1, symm_toPartialEquiv, PartialEquiv.symm_source]
       exact he.2
 #align pregroupoid.groupoid Pregroupoid.groupoid
 
@@ -844,23 +844,23 @@ charts that are only local equivs, and continuity properties for their compositi
 This is formalised in `ChartedSpaceCore`. -/
 -- @[nolint has_nonempty_instance]  -- Porting note: commented out
 structure ChartedSpaceCore (H : Type*) [TopologicalSpace H] (M : Type*) where
-  atlas : Set (LocalEquiv M H)
-  chartAt : M → LocalEquiv M H
+  atlas : Set (PartialEquiv M H)
+  chartAt : M → PartialEquiv M H
   mem_chart_source : ∀ x, x ∈ (chartAt x).source
   chart_mem_atlas : ∀ x, chartAt x ∈ atlas
-  open_source : ∀ e e' : LocalEquiv M H, e ∈ atlas → e' ∈ atlas → IsOpen (e.symm.trans e').source
-  continuousOn_toFun : ∀ e e' : LocalEquiv M H, e ∈ atlas → e' ∈ atlas →
+  open_source : ∀ e e' : PartialEquiv M H, e ∈ atlas → e' ∈ atlas → IsOpen (e.symm.trans e').source
+  continuousOn_toFun : ∀ e e' : PartialEquiv M H, e ∈ atlas → e' ∈ atlas →
     ContinuousOn (e.symm.trans e') (e.symm.trans e').source
 #align charted_space_core ChartedSpaceCore
 
 namespace ChartedSpaceCore
 
-variable [TopologicalSpace H] (c : ChartedSpaceCore H M) {e : LocalEquiv M H}
+variable [TopologicalSpace H] (c : ChartedSpaceCore H M) {e : PartialEquiv M H}
 
 /-- Topology generated by a set of charts on a Type. -/
 protected def toTopologicalSpace : TopologicalSpace M :=
   TopologicalSpace.generateFrom <|
-    ⋃ (e : LocalEquiv M H) (_ : e ∈ c.atlas) (s : Set H) (_ : IsOpen s),
+    ⋃ (e : PartialEquiv M H) (_ : e ∈ c.atlas) (s : Set H) (_ : IsOpen s),
       {e ⁻¹' s ∩ e.source}
 #align charted_space_core.to_topological_space ChartedSpaceCore.toTopologicalSpace
 
@@ -874,14 +874,14 @@ theorem open_source' (he : e ∈ c.atlas) : IsOpen[c.toTopologicalSpace] e.sourc
 theorem open_target (he : e ∈ c.atlas) : IsOpen e.target := by
   have E : e.target ∩ e.symm ⁻¹' e.source = e.target :=
     Subset.antisymm (inter_subset_left _ _) fun x hx ↦
-      ⟨hx, LocalEquiv.target_subset_preimage_source _ hx⟩
-  simpa [LocalEquiv.trans_source, E] using c.open_source e e he he
+      ⟨hx, PartialEquiv.target_subset_preimage_source _ hx⟩
+  simpa [PartialEquiv.trans_source, E] using c.open_source e e he he
 #align charted_space_core.open_target ChartedSpaceCore.open_target
 
 /-- An element of the atlas in a charted space without topology becomes a local homeomorphism
 for the topology constructed from this atlas. The `localHomeomorph` version is given in this
 definition. -/
-protected def localHomeomorph (e : LocalEquiv M H) (he : e ∈ c.atlas) :
+protected def localHomeomorph (e : PartialEquiv M H) (he : e ∈ c.atlas) :
     @PartialHomeomorph M H c.toTopologicalSpace _ :=
   { c.toTopologicalSpace, e with
     open_source := by convert c.open_source' he
@@ -910,14 +910,14 @@ protected def localHomeomorph (e : LocalEquiv M H) (he : e ∈ c.atlas) :
         rw [← inter_assoc, ← inter_assoc]
         congr 1
         exact inter_comm _ _
-      simpa [LocalEquiv.trans_source, preimage_inter, preimage_comp.symm, A] using this }
+      simpa [PartialEquiv.trans_source, preimage_inter, preimage_comp.symm, A] using this }
 #align charted_space_core.local_homeomorph ChartedSpaceCore.localHomeomorph
 
 /-- Given a charted space without topology, endow it with a genuine charted space structure with
 respect to the topology constructed from the atlas. -/
 def toChartedSpace : @ChartedSpace H _ M c.toTopologicalSpace :=
   { c.toTopologicalSpace with
-    atlas := ⋃ (e : LocalEquiv M H) (he : e ∈ c.atlas), {c.localHomeomorph e he}
+    atlas := ⋃ (e : PartialEquiv M H) (he : e ∈ c.atlas), {c.localHomeomorph e he}
     chartAt := fun x ↦ c.localHomeomorph (c.chartAt x) (c.chart_mem_atlas x)
     mem_chart_source := fun x ↦ c.mem_chart_source x
     chart_mem_atlas := fun x ↦ by
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
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Sébastien Gouëzel
 -/
 import Mathlib.Init.Align
-import Mathlib.Topology.LocalHomeomorph
+import Mathlib.Topology.PartialHomeomorph
 
 #align_import geometry.manifold.charted_space from "leanprover-community/mathlib"@"431589bce478b2229eba14b14a283250428217db"
 
@@ -122,14 +122,14 @@ universe u
 variable {H : Type u} {H' : Type*} {M : Type*} {M' : Type*} {M'' : Type*}
 
 /- Notational shortcut for the composition of local homeomorphisms and local equivs, i.e.,
-`LocalHomeomorph.trans` and `LocalEquiv.trans`.
+`PartialHomeomorph.trans` and `LocalEquiv.trans`.
 Note that, as is usual for equivs, the composition is from left to right, hence the direction of
 the arrow. -/
-scoped[Manifold] infixr:100 " ≫ₕ " => LocalHomeomorph.trans
+scoped[Manifold] infixr:100 " ≫ₕ " => PartialHomeomorph.trans
 
 scoped[Manifold] infixr:100 " ≫ " => LocalEquiv.trans
 
-open Set LocalHomeomorph Manifold  -- Porting note: Added `Manifold`
+open Set PartialHomeomorph Manifold  -- Porting note: Added `Manifold`
 
 /-! ### Structure groupoids -/
 
@@ -164,21 +164,21 @@ We use primes in the structure names as we will reformulate them below (without
 /-- A structure groupoid is a set of local homeomorphisms of a topological space stable under
 composition and inverse. They appear in the definition of the smoothness class of a manifold. -/
 structure StructureGroupoid (H : Type u) [TopologicalSpace H] where
-  members : Set (LocalHomeomorph H H)
-  trans' : ∀ e e' : LocalHomeomorph H H, e ∈ members → e' ∈ members → e ≫ₕ e' ∈ members
-  symm' : ∀ e : LocalHomeomorph H H, e ∈ members → e.symm ∈ members
-  id_mem' : LocalHomeomorph.refl H ∈ members
-  locality' : ∀ e : LocalHomeomorph H H,
+  members : Set (PartialHomeomorph H H)
+  trans' : ∀ e e' : PartialHomeomorph H H, e ∈ members → e' ∈ members → e ≫ₕ e' ∈ members
+  symm' : ∀ e : PartialHomeomorph H H, e ∈ members → e.symm ∈ members
+  id_mem' : PartialHomeomorph.refl H ∈ members
+  locality' : ∀ e : PartialHomeomorph H H,
     (∀ x ∈ e.source, ∃ s, IsOpen s ∧ x ∈ s ∧ e.restr s ∈ members) → e ∈ members
-  eq_on_source' : ∀ e e' : LocalHomeomorph H H, e ∈ members → e' ≈ e → e' ∈ members
+  eq_on_source' : ∀ e e' : PartialHomeomorph H H, e ∈ members → e' ≈ e → e' ∈ members
 #align structure_groupoid StructureGroupoid
 
 variable [TopologicalSpace H]
 
-instance : Membership (LocalHomeomorph H H) (StructureGroupoid H) :=
-  ⟨fun (e : LocalHomeomorph H H) (G : StructureGroupoid H) ↦ e ∈ G.members⟩
+instance : Membership (PartialHomeomorph H H) (StructureGroupoid H) :=
+  ⟨fun (e : PartialHomeomorph H H) (G : StructureGroupoid H) ↦ e ∈ G.members⟩
 
-instance (H : Type u) [TopologicalSpace H] : SetLike (StructureGroupoid H) (LocalHomeomorph H H)
+instance (H : Type u) [TopologicalSpace H] : SetLike (StructureGroupoid H) (PartialHomeomorph H H)
     where
   coe s := s.members
   coe_injective' N O h := by cases N; cases O; congr
@@ -231,26 +231,26 @@ instance : InfSet (StructureGroupoid H) :=
       intro e e' he he'e
       exact fun i hi => i.eq_on_source' e e' (he i hi) he'e)⟩
 
-theorem StructureGroupoid.trans (G : StructureGroupoid H) {e e' : LocalHomeomorph H H} (he : e ∈ G)
-    (he' : e' ∈ G) : e ≫ₕ e' ∈ G :=
+theorem StructureGroupoid.trans (G : StructureGroupoid H) {e e' : PartialHomeomorph H H}
+    (he : e ∈ G) (he' : e' ∈ G) : e ≫ₕ e' ∈ G :=
   G.trans' e e' he he'
 #align structure_groupoid.trans StructureGroupoid.trans
 
-theorem StructureGroupoid.symm (G : StructureGroupoid H) {e : LocalHomeomorph H H} (he : e ∈ G) :
+theorem StructureGroupoid.symm (G : StructureGroupoid H) {e : PartialHomeomorph H H} (he : e ∈ G) :
     e.symm ∈ G :=
   G.symm' e he
 #align structure_groupoid.symm StructureGroupoid.symm
 
-theorem StructureGroupoid.id_mem (G : StructureGroupoid H) : LocalHomeomorph.refl H ∈ G :=
+theorem StructureGroupoid.id_mem (G : StructureGroupoid H) : PartialHomeomorph.refl H ∈ G :=
   G.id_mem'
 #align structure_groupoid.id_mem StructureGroupoid.id_mem
 
-theorem StructureGroupoid.locality (G : StructureGroupoid H) {e : LocalHomeomorph H H}
+theorem StructureGroupoid.locality (G : StructureGroupoid H) {e : PartialHomeomorph H H}
     (h : ∀ x ∈ e.source, ∃ s, IsOpen s ∧ x ∈ s ∧ e.restr s ∈ G) : e ∈ G :=
   G.locality' e h
 #align structure_groupoid.locality StructureGroupoid.locality
 
-theorem StructureGroupoid.eq_on_source (G : StructureGroupoid H) {e e' : LocalHomeomorph H H}
+theorem StructureGroupoid.eq_on_source (G : StructureGroupoid H) {e e' : PartialHomeomorph H H}
     (he : e ∈ G) (h : e' ≈ e) : e' ∈ G :=
   G.eq_on_source' e e' he h
 #align structure_groupoid.eq_on_source StructureGroupoid.eq_on_source
@@ -272,13 +272,13 @@ theorem StructureGroupoid.le_iff {G₁ G₂ : StructureGroupoid H} : G₁ ≤ G
 /-- The trivial groupoid, containing only the identity (and maps with empty source, as this is
 necessary from the definition). -/
 def idGroupoid (H : Type u) [TopologicalSpace H] : StructureGroupoid H where
-  members := {LocalHomeomorph.refl H} ∪ { e : LocalHomeomorph H H | e.source = ∅ }
+  members := {PartialHomeomorph.refl H} ∪ { e : PartialHomeomorph H H | e.source = ∅ }
   trans' e e' he he' := by
     cases' he with he he
     · simpa only [mem_singleton_iff.1 he, refl_trans]
     · have : (e ≫ₕ e').source ⊆ e.source := sep_subset _ _
       rw [he] at this
-      have : e ≫ₕ e' ∈ { e : LocalHomeomorph H H | e.source = ∅ } := eq_bot_iff.2 this
+      have : e ≫ₕ e' ∈ { e : PartialHomeomorph H H | e.source = ∅ } := eq_bot_iff.2 this
       exact (mem_union _ _ _).2 (Or.inr this)
   symm' e he := by
     cases' (mem_union _ _ _).1 he with E E
@@ -297,7 +297,7 @@ def idGroupoid (H : Type u) [TopologicalSpace H] : StructureGroupoid H where
         rw [restr_source, open_s.interior_eq]
         exact ⟨hx, xs⟩
       cases' hs with hs hs
-      · replace hs : LocalHomeomorph.restr e s = LocalHomeomorph.refl H
+      · replace hs : PartialHomeomorph.restr e s = PartialHomeomorph.refl H
         · simpa only using hs
         have : (e.restr s).source = univ := by
           rw [hs]
@@ -328,7 +328,7 @@ instance instStructureGroupoidOrderBot : OrderBot (StructureGroupoid H) where
   bot := idGroupoid H
   bot_le := by
     intro u f hf
-    have hf : f ∈ {LocalHomeomorph.refl H} ∪ { e : LocalHomeomorph H H | e.source = ∅ } := hf
+    have hf : f ∈ {PartialHomeomorph.refl H} ∪ { e : PartialHomeomorph H H | e.source = ∅ } := hf
     simp only [singleton_union, mem_setOf_eq, mem_insert_iff] at hf
     cases' hf with hf hf
     · rw [hf]
@@ -357,7 +357,7 @@ structure Pregroupoid (H : Type*) [TopologicalSpace H] where
 /-- Construct a groupoid of local homeos for which the map and its inverse have some property,
 from a pregroupoid asserting that this property is stable under composition. -/
 def Pregroupoid.groupoid (PG : Pregroupoid H) : StructureGroupoid H where
-  members := { e : LocalHomeomorph H H | PG.property e e.source ∧ PG.property e.symm e.target }
+  members := { e : PartialHomeomorph H H | PG.property e e.source ∧ PG.property e.symm e.target }
   trans' e e' he he' := by
     constructor
     · apply PG.comp he.1 he'.1 e.open_source e'.open_source
@@ -372,7 +372,7 @@ def Pregroupoid.groupoid (PG : Pregroupoid H) : StructureGroupoid H where
       rcases he x xu with ⟨s, s_open, xs, hs⟩
       refine' ⟨s, s_open, xs, _⟩
       convert hs.1 using 1
-      dsimp [LocalHomeomorph.restr]
+      dsimp [PartialHomeomorph.restr]
       rw [s_open.interior_eq]
     · refine' PG.locality e.open_target fun x xu ↦ _
       rcases he (e.symm x) (e.map_target xu) with ⟨s, s_open, xs, hs⟩
@@ -380,7 +380,7 @@ def Pregroupoid.groupoid (PG : Pregroupoid H) : StructureGroupoid H where
       · exact ContinuousOn.isOpen_inter_preimage e.continuousOn_invFun e.open_target s_open
       · rw [← inter_assoc, inter_self]
         convert hs.2 using 1
-        dsimp [LocalHomeomorph.restr]
+        dsimp [PartialHomeomorph.restr]
         rw [s_open.interior_eq]
   eq_on_source' e e' he ee' := by
     constructor
@@ -396,7 +396,7 @@ def Pregroupoid.groupoid (PG : Pregroupoid H) : StructureGroupoid H where
       exact he.2
 #align pregroupoid.groupoid Pregroupoid.groupoid
 
-theorem mem_groupoid_of_pregroupoid {PG : Pregroupoid H} {e : LocalHomeomorph H H} :
+theorem mem_groupoid_of_pregroupoid {PG : Pregroupoid H} {e : PartialHomeomorph H H} :
     e ∈ PG.groupoid ↔ PG.property e e.source ∧ PG.property e.symm e.target :=
   Iff.rfl
 #align mem_groupoid_of_pregroupoid mem_groupoid_of_pregroupoid
@@ -408,7 +408,7 @@ theorem groupoid_of_pregroupoid_le (PG₁ PG₂ : Pregroupoid H)
   exact ⟨h _ _ he.1, h _ _ he.2⟩
 #align groupoid_of_pregroupoid_le groupoid_of_pregroupoid_le
 
-theorem mem_pregroupoid_of_eq_on_source (PG : Pregroupoid H) {e e' : LocalHomeomorph H H}
+theorem mem_pregroupoid_of_eq_on_source (PG : Pregroupoid H) {e e' : PartialHomeomorph H H}
     (he' : e ≈ e') (he : PG.property e e.source) : PG.property e' e'.source := by
   rw [← he'.1]
   exact PG.congr e.open_source he'.eqOn.symm he
@@ -458,28 +458,28 @@ instance : CompleteLattice (StructureGroupoid H) :=
 homeomorphisms to open subsets of the source. -/
 class ClosedUnderRestriction (G : StructureGroupoid H) : Prop where
   closedUnderRestriction :
-    ∀ {e : LocalHomeomorph H H}, e ∈ G → ∀ s : Set H, IsOpen s → e.restr s ∈ G
+    ∀ {e : PartialHomeomorph H H}, e ∈ G → ∀ s : Set H, IsOpen s → e.restr s ∈ G
 #align closed_under_restriction ClosedUnderRestriction
 
 theorem closedUnderRestriction' {G : StructureGroupoid H} [ClosedUnderRestriction G]
-    {e : LocalHomeomorph H H} (he : e ∈ G) {s : Set H} (hs : IsOpen s) : e.restr s ∈ G :=
+    {e : PartialHomeomorph H H} (he : e ∈ G) {s : Set H} (hs : IsOpen s) : e.restr s ∈ G :=
   ClosedUnderRestriction.closedUnderRestriction he s hs
 #align closed_under_restriction' closedUnderRestriction'
 
 /-- The trivial restriction-closed groupoid, containing only local homeomorphisms equivalent to the
 restriction of the identity to the various open subsets. -/
 def idRestrGroupoid : StructureGroupoid H where
-  members := { e | ∃ (s : Set H) (h : IsOpen s), e ≈ LocalHomeomorph.ofSet s h }
+  members := { e | ∃ (s : Set H) (h : IsOpen s), e ≈ PartialHomeomorph.ofSet s h }
   trans' := by
     rintro e e' ⟨s, hs, hse⟩ ⟨s', hs', hse'⟩
     refine' ⟨s ∩ s', IsOpen.inter hs hs', _⟩
-    have := LocalHomeomorph.EqOnSource.trans' hse hse'
-    rwa [LocalHomeomorph.ofSet_trans_ofSet] at this
+    have := PartialHomeomorph.EqOnSource.trans' hse hse'
+    rwa [PartialHomeomorph.ofSet_trans_ofSet] at this
   symm' := by
     rintro e ⟨s, hs, hse⟩
     refine' ⟨s, hs, _⟩
     rw [← ofSet_symm]
-    exact LocalHomeomorph.EqOnSource.symm' hse
+    exact PartialHomeomorph.EqOnSource.symm' hse
   id_mem' := ⟨univ, isOpen_univ, by simp only [mfld_simps, refl]⟩
   locality' := by
     intro e h
@@ -491,7 +491,7 @@ def idRestrGroupoid : StructureGroupoid H where
       refine' ⟨hx, _⟩
       rw [hs.interior_eq]
       exact hxs
-    simpa only [mfld_simps] using LocalHomeomorph.EqOnSource.eqOn hes' hes
+    simpa only [mfld_simps] using PartialHomeomorph.EqOnSource.eqOn hes' hes
   eq_on_source' := by
     rintro e e' ⟨s, hs, hse⟩ hee'
     exact ⟨s, hs, Setoid.trans hee' hse⟩
@@ -506,7 +506,7 @@ instance closedUnderRestriction_idRestrGroupoid : ClosedUnderRestriction (@idRes
   ⟨by
     rintro e ⟨s', hs', he⟩ s hs
     use s' ∩ s, IsOpen.inter hs' hs
-    refine' Setoid.trans (LocalHomeomorph.EqOnSource.restr he s) _
+    refine' Setoid.trans (PartialHomeomorph.EqOnSource.restr he s) _
     exact ⟨by simp only [hs.interior_eq, mfld_simps], by simp only [mfld_simps, eqOn_refl]⟩⟩
 #align closed_under_restriction_id_restr_groupoid closedUnderRestriction_idRestrGroupoid
 
@@ -525,13 +525,13 @@ theorem closedUnderRestriction_iff_id_le (G : StructureGroupoid H) :
     -- rw [hs.interior_eq]
     -- simp only [mfld_simps]
     ext
-    · rw [LocalHomeomorph.restr_apply, LocalHomeomorph.refl_apply, id, ofSet_apply, id_eq]
+    · rw [PartialHomeomorph.restr_apply, PartialHomeomorph.refl_apply, id, ofSet_apply, id_eq]
     · simp [hs]
     · simp [hs.interior_eq]
   · intro h
     constructor
     intro e he s hs
-    rw [← ofSet_trans (e : LocalHomeomorph H H) hs]
+    rw [← ofSet_trans (e : PartialHomeomorph H H) hs]
     refine' G.trans _ he
     apply StructureGroupoid.le_iff.mp h
     exact idRestrGroupoid_mem hs
@@ -558,18 +558,18 @@ sometimes as a real manifold over `ℝ^(2n)`.
 -/
 @[ext]
 class ChartedSpace (H : Type*) [TopologicalSpace H] (M : Type*) [TopologicalSpace M] where
-  protected atlas : Set (LocalHomeomorph M H)
-  protected chartAt : M → LocalHomeomorph M H
+  protected atlas : Set (PartialHomeomorph M H)
+  protected chartAt : M → PartialHomeomorph M H
   protected mem_chart_source : ∀ x, x ∈ (chartAt x).source
   protected chart_mem_atlas : ∀ x, chartAt x ∈ atlas
 #align charted_space ChartedSpace
 
 abbrev atlas (H : Type*) [TopologicalSpace H] (M : Type*) [TopologicalSpace M]
-    [ChartedSpace H M] : Set (LocalHomeomorph M H) :=
+    [ChartedSpace H M] : Set (PartialHomeomorph M H) :=
   ChartedSpace.atlas
 
 abbrev chartAt (H : Type*) [TopologicalSpace H] {M : Type*} [TopologicalSpace M]
-    [ChartedSpace H M] (x : M) : LocalHomeomorph M H :=
+    [ChartedSpace H M] (x : M) : PartialHomeomorph M H :=
   ChartedSpace.chartAt x
 
 @[simp, mfld_simps]
@@ -586,8 +586,8 @@ section ChartedSpace
 
 /-- Any space is a `ChartedSpace` modelled over itself, by just using the identity chart. -/
 instance chartedSpaceSelf (H : Type*) [TopologicalSpace H] : ChartedSpace H H where
-  atlas := {LocalHomeomorph.refl H}
-  chartAt _ := LocalHomeomorph.refl H
+  atlas := {PartialHomeomorph.refl H}
+  chartAt _ := PartialHomeomorph.refl H
   mem_chart_source x := mem_univ x
   chart_mem_atlas _ := mem_singleton _
 #align charted_space_self chartedSpaceSelf
@@ -595,14 +595,14 @@ instance chartedSpaceSelf (H : Type*) [TopologicalSpace H] : ChartedSpace H H wh
 /-- In the trivial `ChartedSpace` structure of a space modelled over itself through the identity,
 the atlas members are just the identity. -/
 @[simp, mfld_simps]
-theorem chartedSpaceSelf_atlas {H : Type*} [TopologicalSpace H] {e : LocalHomeomorph H H} :
-    e ∈ atlas H H ↔ e = LocalHomeomorph.refl H :=
+theorem chartedSpaceSelf_atlas {H : Type*} [TopologicalSpace H] {e : PartialHomeomorph H H} :
+    e ∈ atlas H H ↔ e = PartialHomeomorph.refl H :=
   Iff.rfl
 #align charted_space_self_atlas chartedSpaceSelf_atlas
 
 /-- In the model space, `chartAt` is always the identity. -/
 theorem chartAt_self_eq {H : Type*} [TopologicalSpace H] {x : H} :
-    chartAt H x = LocalHomeomorph.refl H := rfl
+    chartAt H x = PartialHomeomorph.refl H := rfl
 #align chart_at_self_eq chartAt_self_eq
 
 section
@@ -633,7 +633,7 @@ theorem achart_def (x : M) : achart H x = ⟨chartAt H x, chart_mem_atlas H x⟩
 #align achart_def achart_def
 
 @[simp, mfld_simps]
-theorem coe_achart (x : M) : (achart H x : LocalHomeomorph M H) = chartAt H x :=
+theorem coe_achart (x : M) : (achart H x : PartialHomeomorph M H) = chartAt H x :=
   rfl
 #align coe_achart coe_achart
 
@@ -684,11 +684,11 @@ theorem ChartedSpace.locallyCompactSpace [LocallyCompactSpace H] : LocallyCompac
 /-- If a topological space admits an atlas with locally connected charts, then the space itself is
 locally connected. -/
 theorem ChartedSpace.locallyConnectedSpace [LocallyConnectedSpace H] : LocallyConnectedSpace M := by
-  let e : M → LocalHomeomorph M H := chartAt H
+  let e : M → PartialHomeomorph M H := chartAt H
   refine' locallyConnectedSpace_of_connected_bases (fun x s ↦ (e x).symm '' s)
       (fun x s ↦ (IsOpen s ∧ e x x ∈ s ∧ IsConnected s) ∧ s ⊆ (e x).target) _ _
   · intro x
-    simpa only [LocalHomeomorph.symm_map_nhds_eq, mem_chart_source] using
+    simpa only [PartialHomeomorph.symm_map_nhds_eq, mem_chart_source] using
       ((LocallyConnectedSpace.open_connected_basis (e x x)).restrict_subset
         ((e x).open_target.mem_nhds (mem_chart_target H x))).map (e x).symm
   · rintro x s ⟨⟨-, -, hsconn⟩, hssubset⟩
@@ -700,7 +700,7 @@ modelled on `H`. -/
 def ChartedSpace.comp (H : Type*) [TopologicalSpace H] (H' : Type*) [TopologicalSpace H']
     (M : Type*) [TopologicalSpace M] [ChartedSpace H H'] [ChartedSpace H' M] :
     ChartedSpace H M where
-  atlas := image2 LocalHomeomorph.trans (atlas H' M) (atlas H H')
+  atlas := image2 PartialHomeomorph.trans (atlas H' M) (atlas H H')
   chartAt p := (chartAt H' p).trans (chartAt H (chartAt H' p p))
   mem_chart_source p := by simp only [mfld_simps]
   chart_mem_atlas p := ⟨chartAt _ p, chartAt _ _, chart_mem_atlas _ p, chart_mem_atlas _ _, rfl⟩
@@ -783,7 +783,7 @@ construction of the atlas of product maps. -/
 instance prodChartedSpace (H : Type*) [TopologicalSpace H] (M : Type*) [TopologicalSpace M]
     [ChartedSpace H M] (H' : Type*) [TopologicalSpace H'] (M' : Type*) [TopologicalSpace M']
     [ChartedSpace H' M'] : ChartedSpace (ModelProd H H') (M × M') where
-  atlas := image2 LocalHomeomorph.prod (atlas H M) (atlas H' M')
+  atlas := image2 PartialHomeomorph.prod (atlas H M) (atlas H' M')
   chartAt x := (chartAt H x.1).prod (chartAt H' x.2)
   mem_chart_source x := ⟨mem_chart_source H x.1, mem_chart_source H' x.2⟩
   chart_mem_atlas x := mem_image2_of_mem (chart_mem_atlas H x.1) (chart_mem_atlas H' x.2)
@@ -819,8 +819,8 @@ canonical construction of the atlas of finite product maps. -/
 instance piChartedSpace {ι : Type*} [Fintype ι] (H : ι → Type*) [∀ i, TopologicalSpace (H i)]
     (M : ι → Type*) [∀ i, TopologicalSpace (M i)] [∀ i, ChartedSpace (H i) (M i)] :
     ChartedSpace (ModelPi H) (∀ i, M i) where
-  atlas := LocalHomeomorph.pi '' Set.pi univ fun _ ↦ atlas (H _) (M _)
-  chartAt f := LocalHomeomorph.pi fun i ↦ chartAt (H i) (f i)
+  atlas := PartialHomeomorph.pi '' Set.pi univ fun _ ↦ atlas (H _) (M _)
+  chartAt f := PartialHomeomorph.pi fun i ↦ chartAt (H i) (f i)
   mem_chart_source f i _ := mem_chart_source (H i) (f i)
   chart_mem_atlas f := mem_image_of_mem _ fun i _ ↦ chart_mem_atlas (H i) (f i)
 #align pi_charted_space piChartedSpace
@@ -829,7 +829,7 @@ instance piChartedSpace {ι : Type*} [Fintype ι] (H : ι → Type*) [∀ i, Top
 theorem piChartedSpace_chartAt {ι : Type*} [Fintype ι] (H : ι → Type*)
     [∀ i, TopologicalSpace (H i)] (M : ι → Type*) [∀ i, TopologicalSpace (M i)]
     [∀ i, ChartedSpace (H i) (M i)] (f : ∀ i, M i) :
-    chartAt (H := ModelPi H) f = LocalHomeomorph.pi fun i ↦ chartAt (H i) (f i) :=
+    chartAt (H := ModelPi H) f = PartialHomeomorph.pi fun i ↦ chartAt (H i) (f i) :=
   rfl
 #align pi_charted_space_chart_at piChartedSpace_chartAt
 
@@ -882,7 +882,7 @@ theorem open_target (he : e ∈ c.atlas) : IsOpen e.target := by
 for the topology constructed from this atlas. The `localHomeomorph` version is given in this
 definition. -/
 protected def localHomeomorph (e : LocalEquiv M H) (he : e ∈ c.atlas) :
-    @LocalHomeomorph M H c.toTopologicalSpace _ :=
+    @PartialHomeomorph M H c.toTopologicalSpace _ :=
   { c.toTopologicalSpace, e with
     open_source := by convert c.open_source' he
     open_target := by convert c.open_target he
@@ -938,7 +938,7 @@ variable [TopologicalSpace H] [TopologicalSpace M] [ChartedSpace H M]
 groupoid. -/
 class HasGroupoid {H : Type*} [TopologicalSpace H] (M : Type*) [TopologicalSpace M]
     [ChartedSpace H M] (G : StructureGroupoid H) : Prop where
-  compatible : ∀ {e e' : LocalHomeomorph M H}, e ∈ atlas H M → e' ∈ atlas H M → e.symm ≫ₕ e' ∈ G
+  compatible : ∀ {e e' : PartialHomeomorph M H}, e ∈ atlas H M → e' ∈ atlas H M → e.symm ≫ₕ e' ∈ G
 #align has_groupoid HasGroupoid
 
 /-- Reformulate in the `StructureGroupoid` namespace the compatibility condition of charts in a
@@ -946,7 +946,7 @@ charted space admitting a structure groupoid, to make it more easily accessible
 notation. -/
 theorem StructureGroupoid.compatible {H : Type*} [TopologicalSpace H] (G : StructureGroupoid H)
     {M : Type*} [TopologicalSpace M] [ChartedSpace H M] [HasGroupoid M G]
-    {e e' : LocalHomeomorph M H} (he : e ∈ atlas H M) (he' : e' ∈ atlas H M) : e.symm ≫ₕ e' ∈ G :=
+    {e e' : PartialHomeomorph M H} (he : e ∈ atlas H M) (he' : e' ∈ atlas H M) : e.symm ≫ₕ e' ∈ G :=
   HasGroupoid.compatible he he'
 #align structure_groupoid.compatible StructureGroupoid.compatible
 
@@ -960,7 +960,7 @@ theorem hasGroupoid_inf_iff {G₁ G₂ : StructureGroupoid H} : HasGroupoid M (G
   ⟨(fun h ↦ ⟨hasGroupoid_of_le h inf_le_left, hasGroupoid_of_le h inf_le_right⟩),
   fun ⟨h1, h2⟩ ↦ { compatible := fun he he' ↦ ⟨h1.compatible he he', h2.compatible he he'⟩ }⟩
 
-theorem hasGroupoid_of_pregroupoid (PG : Pregroupoid H) (h : ∀ {e e' : LocalHomeomorph M H},
+theorem hasGroupoid_of_pregroupoid (PG : Pregroupoid H) (h : ∀ {e e' : PartialHomeomorph M H},
     e ∈ atlas H M → e' ∈ atlas H M → PG.property (e.symm ≫ₕ e') (e.symm ≫ₕ e').source) :
     HasGroupoid M PG.groupoid :=
   ⟨fun he he' ↦ mem_groupoid_of_pregroupoid.mpr ⟨h he he', h he' he⟩⟩
@@ -988,7 +988,7 @@ variable (M) (G : StructureGroupoid H)
 /-- Given a charted space admitting a structure groupoid, the maximal atlas associated to this
 structure groupoid is the set of all local charts that are compatible with the atlas, i.e., such
 that changing coordinates with an atlas member gives an element of the groupoid. -/
-def StructureGroupoid.maximalAtlas : Set (LocalHomeomorph M H) :=
+def StructureGroupoid.maximalAtlas : Set (PartialHomeomorph M H) :=
   { e | ∀ e' ∈ atlas H M, e.symm ≫ₕ e' ∈ G ∧ e'.symm ≫ₕ e ∈ G }
 #align structure_groupoid.maximal_atlas StructureGroupoid.maximalAtlas
 
@@ -1006,14 +1006,14 @@ theorem StructureGroupoid.chart_mem_maximalAtlas [HasGroupoid M G] (x : M) :
 
 variable {G}
 
-theorem mem_maximalAtlas_iff {e : LocalHomeomorph M H} :
+theorem mem_maximalAtlas_iff {e : PartialHomeomorph M H} :
     e ∈ G.maximalAtlas M ↔ ∀ e' ∈ atlas H M, e.symm ≫ₕ e' ∈ G ∧ e'.symm ≫ₕ e ∈ G :=
   Iff.rfl
 #align mem_maximal_atlas_iff mem_maximalAtlas_iff
 
 /-- Changing coordinates between two elements of the maximal atlas gives rise to an element
 of the structure groupoid. -/
-theorem StructureGroupoid.compatible_of_mem_maximalAtlas {e e' : LocalHomeomorph M H}
+theorem StructureGroupoid.compatible_of_mem_maximalAtlas {e e' : PartialHomeomorph M H}
     (he : e ∈ G.maximalAtlas M) (he' : e' ∈ G.maximalAtlas M) : e.symm ≫ₕ e' ∈ G := by
   refine' G.locality fun x hx ↦ _
   set f := chartAt (H := H) (e.symm x)
@@ -1040,14 +1040,14 @@ theorem StructureGroupoid.compatible_of_mem_maximalAtlas {e e' : LocalHomeomorph
 variable (G)
 
 /-- In the model space, the identity is in any maximal atlas. -/
-theorem StructureGroupoid.id_mem_maximalAtlas : LocalHomeomorph.refl H ∈ G.maximalAtlas H :=
+theorem StructureGroupoid.id_mem_maximalAtlas : PartialHomeomorph.refl H ∈ G.maximalAtlas H :=
   G.subset_maximalAtlas <| by simp
 #align structure_groupoid.id_mem_maximal_atlas StructureGroupoid.id_mem_maximalAtlas
 
 /-- In the model space, any element of the groupoid is in the maximal atlas. -/
-theorem StructureGroupoid.mem_maximalAtlas_of_mem_groupoid {f : LocalHomeomorph H H} (hf : f ∈ G) :
-    f ∈ G.maximalAtlas H := by
-  rintro e (rfl : e = LocalHomeomorph.refl H)
+theorem StructureGroupoid.mem_maximalAtlas_of_mem_groupoid {f : PartialHomeomorph H H}
+    (hf : f ∈ G) : f ∈ G.maximalAtlas H := by
+  rintro e (rfl : e = PartialHomeomorph.refl H)
   exact ⟨G.trans (G.symm hf) G.id_mem, G.trans (G.symm G.id_mem) hf⟩
 #align structure_groupoid.mem_maximal_atlas_of_mem_groupoid StructureGroupoid.mem_maximalAtlas_of_mem_groupoid
 
@@ -1057,9 +1057,9 @@ section Singleton
 
 variable {α : Type*} [TopologicalSpace α]
 
-namespace LocalHomeomorph
+namespace PartialHomeomorph
 
-variable (e : LocalHomeomorph α H)
+variable (e : PartialHomeomorph α H)
 
 /-- If a single local homeomorphism `e` from a space `α` into `H` has source covering the whole
 space `α`, then that local homeomorphism induces an `H`-charted space structure on `α`.
@@ -1070,23 +1070,23 @@ def singletonChartedSpace (h : e.source = Set.univ) : ChartedSpace H α where
   chartAt _ := e
   mem_chart_source _ := by rw [h]; apply mem_univ
   chart_mem_atlas _ := by tauto
-#align local_homeomorph.singleton_charted_space LocalHomeomorph.singletonChartedSpace
+#align local_homeomorph.singleton_charted_space PartialHomeomorph.singletonChartedSpace
 
 @[simp, mfld_simps]
 theorem singletonChartedSpace_chartAt_eq (h : e.source = Set.univ) {x : α} :
     @chartAt H _ α _ (e.singletonChartedSpace h) x = e :=
   rfl
-#align local_homeomorph.singleton_charted_space_chart_at_eq LocalHomeomorph.singletonChartedSpace_chartAt_eq
+#align local_homeomorph.singleton_charted_space_chart_at_eq PartialHomeomorph.singletonChartedSpace_chartAt_eq
 
 theorem singletonChartedSpace_chartAt_source (h : e.source = Set.univ) {x : α} :
     (@chartAt H _ α _ (e.singletonChartedSpace h) x).source = Set.univ :=
   h
-#align local_homeomorph.singleton_charted_space_chart_at_source LocalHomeomorph.singletonChartedSpace_chartAt_source
+#align local_homeomorph.singleton_charted_space_chart_at_source PartialHomeomorph.singletonChartedSpace_chartAt_source
 
-theorem singletonChartedSpace_mem_atlas_eq (h : e.source = Set.univ) (e' : LocalHomeomorph α H)
+theorem singletonChartedSpace_mem_atlas_eq (h : e.source = Set.univ) (e' : PartialHomeomorph α H)
     (h' : e' ∈ (e.singletonChartedSpace h).atlas) : e' = e :=
   h'
-#align local_homeomorph.singleton_charted_space_mem_atlas_eq LocalHomeomorph.singletonChartedSpace_mem_atlas_eq
+#align local_homeomorph.singleton_charted_space_mem_atlas_eq PartialHomeomorph.singletonChartedSpace_mem_atlas_eq
 
 /-- Given a local homeomorphism `e` from a space `α` into `H`, if its source covers the whole
 space `α`, then the induced charted space structure on `α` is `HasGroupoid G` for any structure
@@ -1101,18 +1101,18 @@ theorem singleton_hasGroupoid (h : e.source = Set.univ) (G : StructureGroupoid H
       refine' G.eq_on_source _ e.trans_symm_self
       have hle : idRestrGroupoid ≤ G := (closedUnderRestriction_iff_id_le G).mp (by assumption)
       exact StructureGroupoid.le_iff.mp hle _ (idRestrGroupoid_mem _) }
-#align local_homeomorph.singleton_has_groupoid LocalHomeomorph.singleton_hasGroupoid
+#align local_homeomorph.singleton_has_groupoid PartialHomeomorph.singleton_hasGroupoid
 
-end LocalHomeomorph
+end PartialHomeomorph
 
 namespace OpenEmbedding
 
 variable [Nonempty α]
 
 /-- An open embedding of `α` into `H` induces an `H`-charted space structure on `α`.
-See `LocalHomeomorph.singletonChartedSpace`. -/
+See `PartialHomeomorph.singletonChartedSpace`. -/
 def singletonChartedSpace {f : α → H} (h : OpenEmbedding f) : ChartedSpace H α :=
-  (h.toLocalHomeomorph f).singletonChartedSpace (toLocalHomeomorph_source _ _)
+  (h.toPartialHomeomorph f).singletonChartedSpace (toPartialHomeomorph_source _ _)
 #align open_embedding.singleton_charted_space OpenEmbedding.singletonChartedSpace
 
 theorem singletonChartedSpace_chartAt_eq {f : α → H} (h : OpenEmbedding f) {x : α} :
@@ -1122,7 +1122,7 @@ theorem singletonChartedSpace_chartAt_eq {f : α → H} (h : OpenEmbedding f) {x
 
 theorem singleton_hasGroupoid {f : α → H} (h : OpenEmbedding f) (G : StructureGroupoid H)
     [ClosedUnderRestriction G] : @HasGroupoid _ _ _ _ h.singletonChartedSpace G :=
-  (h.toLocalHomeomorph f).singleton_hasGroupoid (toLocalHomeomorph_source _ _) G
+  (h.toPartialHomeomorph f).singleton_hasGroupoid (toPartialHomeomorph_source _ _) G
 #align open_embedding.singleton_has_groupoid OpenEmbedding.singleton_hasGroupoid
 
 end OpenEmbedding
@@ -1139,8 +1139,8 @@ variable (s : Opens M)
 
 /-- An open subset of a charted space is naturally a charted space. -/
 protected instance instChartedSpace : ChartedSpace H s where
-  atlas := ⋃ x : s, {@LocalHomeomorph.subtypeRestr _ _ _ _ (chartAt H x.1) s ⟨x⟩}
-  chartAt x := @LocalHomeomorph.subtypeRestr _ _ _ _ (chartAt H x.1) s ⟨x⟩
+  atlas := ⋃ x : s, {@PartialHomeomorph.subtypeRestr _ _ _ _ (chartAt H x.1) s ⟨x⟩}
+  chartAt x := @PartialHomeomorph.subtypeRestr _ _ _ _ (chartAt H x.1) s ⟨x⟩
   mem_chart_source x := ⟨trivial, mem_chart_source H x.1⟩
   chart_mem_atlas x := by
     simp only [mem_iUnion, mem_singleton_iff]
@@ -1197,8 +1197,8 @@ and use structomorph instead. -/
 -- @[nolint has_nonempty_instance]  -- Porting note: commented out
 structure Structomorph (G : StructureGroupoid H) (M : Type*) (M' : Type*) [TopologicalSpace M]
   [TopologicalSpace M'] [ChartedSpace H M] [ChartedSpace H M'] extends Homeomorph M M' where
-  mem_groupoid : ∀ c : LocalHomeomorph M H, ∀ c' : LocalHomeomorph M' H, c ∈ atlas H M →
-    c' ∈ atlas H M' → c.symm ≫ₕ toHomeomorph.toLocalHomeomorph ≫ₕ c' ∈ G
+  mem_groupoid : ∀ c : PartialHomeomorph M H, ∀ c' : PartialHomeomorph M' H, c ∈ atlas H M →
+    c' ∈ atlas H M' → c.symm ≫ₕ toHomeomorph.toPartialHomeomorph ≫ₕ c' ∈ G
 #align structomorph Structomorph
 
 variable [TopologicalSpace M'] [TopologicalSpace M''] {G : StructureGroupoid H} [ChartedSpace H M']
@@ -1209,8 +1209,8 @@ def Structomorph.refl (M : Type*) [TopologicalSpace M] [ChartedSpace H M] [HasGr
     Structomorph G M M :=
   { Homeomorph.refl M with
     mem_groupoid := fun c c' hc hc' ↦ by
-      change LocalHomeomorph.symm c ≫ₕ LocalHomeomorph.refl M ≫ₕ c' ∈ G
-      rw [LocalHomeomorph.refl_trans]
+      change PartialHomeomorph.symm c ≫ₕ PartialHomeomorph.refl M ≫ₕ c' ∈ G
+      rw [PartialHomeomorph.refl_trans]
       exact G.compatible hc hc' }
 #align structomorph.refl Structomorph.refl
 
@@ -1219,7 +1219,7 @@ def Structomorph.symm (e : Structomorph G M M') : Structomorph G M' M :=
   { e.toHomeomorph.symm with
     mem_groupoid := by
       intro c c' hc hc'
-      have : (c'.symm ≫ₕ e.toHomeomorph.toLocalHomeomorph ≫ₕ c).symm ∈ G :=
+      have : (c'.symm ≫ₕ e.toHomeomorph.toPartialHomeomorph ≫ₕ c).symm ∈ G :=
         G.symm (e.mem_groupoid c' c hc' hc)
       rwa [trans_symm_eq_symm_trans_symm, trans_symm_eq_symm_trans_symm, symm_symm, trans_assoc]
         at this }
@@ -1236,10 +1236,10 @@ def Structomorph.trans (e : Structomorph G M M') (e' : Structomorph G M' M'') :
       their composition is smooth, and it coincides with c' ∘ e' ∘ e ∘ c⁻¹ around x. -/
       intro c c' hc hc'
       refine' G.locality fun x hx ↦ _
-      let f₁ := e.toHomeomorph.toLocalHomeomorph
-      let f₂ := e'.toHomeomorph.toLocalHomeomorph
-      let f := (e.toHomeomorph.trans e'.toHomeomorph).toLocalHomeomorph
-      have feq : f = f₁ ≫ₕ f₂ := Homeomorph.trans_toLocalHomeomorph _ _
+      let f₁ := e.toHomeomorph.toPartialHomeomorph
+      let f₂ := e'.toHomeomorph.toPartialHomeomorph
+      let f := (e.toHomeomorph.trans e'.toHomeomorph).toPartialHomeomorph
+      have feq : f = f₁ ≫ₕ f₂ := Homeomorph.trans_toPartialHomeomorph _ _
       -- define the atlas g around y
       let y := (c.symm ≫ₕ f₁) x
       let g := chartAt (H := H) y
@@ -1250,7 +1250,7 @@ def Structomorph.trans (e : Structomorph G M M') (e' : Structomorph G M' M'') :
         apply (c.symm ≫ₕ f₁).continuousOn_toFun.isOpen_inter_preimage <;> apply open_source
       have : x ∈ s := by
         constructor
-        · simp only [trans_source, preimage_univ, inter_univ, Homeomorph.toLocalHomeomorph_source]
+        · simp only [trans_source, preimage_univ, inter_univ, Homeomorph.toPartialHomeomorph_source]
           rw [trans_source] at hx
           exact hx.1
         · exact hg₂
feat: a function with vanishing integral against smooth functions supported in U is ae zero in U (#8805)

A stronger version of #8800, the differences are:

  • assume either IsSigmaCompact U or SigmaCompactSpace M;

  • only need test functions satisfying tsupport g ⊆ U rather than support g ⊆ U;

  • requires LocallyIntegrableOn U rather than LocallyIntegrable on the whole space.

Also fills in some missing APIs around the manifold and measure theory libraries.

Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Junyan Xu <junyanxu.math@gmail.com>

Diff
@@ -1162,6 +1162,17 @@ protected instance instHasGroupoid [ClosedUnderRestriction G] : HasGroupoid s G
     · exact isOpen_inter_preimage_symm (chartAt _ _) s.2
 #align topological_space.opens.has_groupoid TopologicalSpace.Opens.instHasGroupoid
 
+theorem chartAt_subtype_val_symm_eventuallyEq (U : Opens M) {x : U} :
+    (chartAt H x.val).symm =ᶠ[𝓝 (chartAt H x.val x.val)] Subtype.val ∘ (chartAt H x).symm := by
+  set i : U → M := Subtype.val
+  set e := chartAt H x.val
+  haveI : Nonempty U := ⟨x⟩
+  haveI : Nonempty M := ⟨i x⟩
+  have heUx_nhds : (e.subtypeRestr U).target ∈ 𝓝 (e x) := by
+    apply (e.subtypeRestr U).open_target.mem_nhds
+    exact e.map_subtype_source (mem_chart_source _ _)
+  exact Filter.eventuallyEq_of_mem heUx_nhds (e.subtypeRestr_symm_eqOn U)
+
 theorem chartAt_inclusion_symm_eventuallyEq {U V : Opens M} (hUV : U ≤ V) {x : U} :
     (chartAt H (Set.inclusion hUV x)).symm
     =ᶠ[𝓝 (chartAt H (Set.inclusion hUV x) (Set.inclusion hUV x))]
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
@@ -361,9 +361,9 @@ def Pregroupoid.groupoid (PG : Pregroupoid H) : StructureGroupoid H where
   trans' e e' he he' := by
     constructor
     · apply PG.comp he.1 he'.1 e.open_source e'.open_source
-      apply e.continuous_toFun.isOpen_inter_preimage e.open_source e'.open_source
+      apply e.continuousOn_toFun.isOpen_inter_preimage e.open_source e'.open_source
     · apply PG.comp he'.2 he.2 e'.open_target e.open_target
-      apply e'.continuous_invFun.isOpen_inter_preimage e'.open_target e.open_target
+      apply e'.continuousOn_invFun.isOpen_inter_preimage e'.open_target e.open_target
   symm' e he := ⟨he.2, he.1⟩
   id_mem' := ⟨PG.id_mem, PG.id_mem⟩
   locality' e he := by
@@ -377,7 +377,7 @@ def Pregroupoid.groupoid (PG : Pregroupoid H) : StructureGroupoid H where
     · refine' PG.locality e.open_target fun x xu ↦ _
       rcases he (e.symm x) (e.map_target xu) with ⟨s, s_open, xs, hs⟩
       refine' ⟨e.target ∩ e.symm ⁻¹' s, _, ⟨xu, xs⟩, _⟩
-      · exact ContinuousOn.isOpen_inter_preimage e.continuous_invFun e.open_target s_open
+      · exact ContinuousOn.isOpen_inter_preimage e.continuousOn_invFun e.open_target s_open
       · rw [← inter_assoc, inter_self]
         convert hs.2 using 1
         dsimp [LocalHomeomorph.restr]
@@ -849,7 +849,7 @@ structure ChartedSpaceCore (H : Type*) [TopologicalSpace H] (M : Type*) where
   mem_chart_source : ∀ x, x ∈ (chartAt x).source
   chart_mem_atlas : ∀ x, chartAt x ∈ atlas
   open_source : ∀ e e' : LocalEquiv M H, e ∈ atlas → e' ∈ atlas → IsOpen (e.symm.trans e').source
-  continuous_toFun : ∀ e e' : LocalEquiv M H, e ∈ atlas → e' ∈ atlas →
+  continuousOn_toFun : ∀ e e' : LocalEquiv M H, e ∈ atlas → e' ∈ atlas →
     ContinuousOn (e.symm.trans e') (e.symm.trans e').source
 #align charted_space_core ChartedSpaceCore
 
@@ -886,7 +886,7 @@ protected def localHomeomorph (e : LocalEquiv M H) (he : e ∈ c.atlas) :
   { c.toTopologicalSpace, e with
     open_source := by convert c.open_source' he
     open_target := by convert c.open_target he
-    continuous_toFun := by
+    continuousOn_toFun := by
       letI : TopologicalSpace M := c.toTopologicalSpace
       rw [continuousOn_open_iff (c.open_source' he)]
       intro s s_open
@@ -894,7 +894,7 @@ protected def localHomeomorph (e : LocalEquiv M H) (he : e ∈ c.atlas) :
       apply TopologicalSpace.GenerateOpen.basic
       simp only [exists_prop, mem_iUnion, mem_singleton_iff]
       exact ⟨e, he, ⟨s, s_open, rfl⟩⟩
-    continuous_invFun := by
+    continuousOn_invFun := by
       letI : TopologicalSpace M := c.toTopologicalSpace
       apply continuousOn_isOpen_of_generateFrom
       intro t ht
@@ -904,7 +904,7 @@ protected def localHomeomorph (e : LocalEquiv M H) (he : e ∈ c.atlas) :
       let f := e.symm.trans e'
       have : IsOpen (f ⁻¹' s ∩ f.source) := by
         simpa [inter_comm] using (continuousOn_open_iff (c.open_source e e' he e'_atlas)).1
-          (c.continuous_toFun e e' he e'_atlas) s s_open
+          (c.continuousOn_toFun e e' he e'_atlas) s s_open
       have A : e' ∘ e.symm ⁻¹' s ∩ (e.target ∩ e.symm ⁻¹' e'.source) =
           e.target ∩ (e' ∘ e.symm ⁻¹' s ∩ e.symm ⁻¹' e'.source) := by
         rw [← inter_assoc, ← inter_assoc]
@@ -1019,7 +1019,7 @@ theorem StructureGroupoid.compatible_of_mem_maximalAtlas {e e' : LocalHomeomorph
   set f := chartAt (H := H) (e.symm x)
   let s := e.target ∩ e.symm ⁻¹' f.source
   have hs : IsOpen s := by
-    apply e.symm.continuous_toFun.isOpen_inter_preimage <;> apply open_source
+    apply e.symm.continuousOn_toFun.isOpen_inter_preimage <;> apply open_source
   have xs : x ∈ s := by
     simp only [mem_inter_iff, mem_preimage, mem_chart_source, and_true]
     exact ((mem_inter_iff _ _ _).1 hx).1
@@ -1236,7 +1236,7 @@ def Structomorph.trans (e : Structomorph G M M') (e' : Structomorph G M' M'') :
       have hg₂ := mem_chart_source (H := H) y
       let s := (c.symm ≫ₕ f₁).source ∩ c.symm ≫ₕ f₁ ⁻¹' g.source
       have open_s : IsOpen s := by
-        apply (c.symm ≫ₕ f₁).continuous_toFun.isOpen_inter_preimage <;> apply open_source
+        apply (c.symm ≫ₕ f₁).continuousOn_toFun.isOpen_inter_preimage <;> apply open_source
       have : x ∈ s := by
         constructor
         · simp only [trans_source, preimage_univ, inter_univ, Homeomorph.toLocalHomeomorph_source]
chore: rename lemmas containing "of_open" to match the naming convention (#8229)

Mostly, this means replacing "of_open" by "of_isOpen". A few lemmas names were misleading and are corrected differently. Zulip discussion.

Diff
@@ -361,9 +361,9 @@ def Pregroupoid.groupoid (PG : Pregroupoid H) : StructureGroupoid H where
   trans' e e' he he' := by
     constructor
     · apply PG.comp he.1 he'.1 e.open_source e'.open_source
-      apply e.continuous_toFun.preimage_open_of_open e.open_source e'.open_source
+      apply e.continuous_toFun.isOpen_inter_preimage e.open_source e'.open_source
     · apply PG.comp he'.2 he.2 e'.open_target e.open_target
-      apply e'.continuous_invFun.preimage_open_of_open e'.open_target e.open_target
+      apply e'.continuous_invFun.isOpen_inter_preimage e'.open_target e.open_target
   symm' e he := ⟨he.2, he.1⟩
   id_mem' := ⟨PG.id_mem, PG.id_mem⟩
   locality' e he := by
@@ -377,7 +377,7 @@ def Pregroupoid.groupoid (PG : Pregroupoid H) : StructureGroupoid H where
     · refine' PG.locality e.open_target fun x xu ↦ _
       rcases he (e.symm x) (e.map_target xu) with ⟨s, s_open, xs, hs⟩
       refine' ⟨e.target ∩ e.symm ⁻¹' s, _, ⟨xu, xs⟩, _⟩
-      · exact ContinuousOn.preimage_open_of_open e.continuous_invFun e.open_target s_open
+      · exact ContinuousOn.isOpen_inter_preimage e.continuous_invFun e.open_target s_open
       · rw [← inter_assoc, inter_self]
         convert hs.2 using 1
         dsimp [LocalHomeomorph.restr]
@@ -896,7 +896,7 @@ protected def localHomeomorph (e : LocalEquiv M H) (he : e ∈ c.atlas) :
       exact ⟨e, he, ⟨s, s_open, rfl⟩⟩
     continuous_invFun := by
       letI : TopologicalSpace M := c.toTopologicalSpace
-      apply continuousOn_open_of_generateFrom
+      apply continuousOn_isOpen_of_generateFrom
       intro t ht
       simp only [exists_prop, mem_iUnion, mem_singleton_iff] at ht
       rcases ht with ⟨e', e'_atlas, s, s_open, ts⟩
@@ -1019,7 +1019,7 @@ theorem StructureGroupoid.compatible_of_mem_maximalAtlas {e e' : LocalHomeomorph
   set f := chartAt (H := H) (e.symm x)
   let s := e.target ∩ e.symm ⁻¹' f.source
   have hs : IsOpen s := by
-    apply e.symm.continuous_toFun.preimage_open_of_open <;> apply open_source
+    apply e.symm.continuous_toFun.isOpen_inter_preimage <;> apply open_source
   have xs : x ∈ s := by
     simp only [mem_inter_iff, mem_preimage, mem_chart_source, and_true]
     exact ((mem_inter_iff _ _ _).1 hx).1
@@ -1159,7 +1159,7 @@ protected instance instHasGroupoid [ClosedUnderRestriction G] : HasGroupoid s G
     refine' G.eq_on_source _ (subtypeRestr_symm_trans_subtypeRestr s (chartAt H x) (chartAt H x'))
     apply closedUnderRestriction'
     · exact G.compatible (chart_mem_atlas _ _) (chart_mem_atlas _ _)
-    · exact preimage_open_of_open_symm (chartAt _ _) s.2
+    · exact isOpen_inter_preimage_symm (chartAt _ _) s.2
 #align topological_space.opens.has_groupoid TopologicalSpace.Opens.instHasGroupoid
 
 theorem chartAt_inclusion_symm_eventuallyEq {U V : Opens M} (hUV : U ≤ V) {x : U} :
@@ -1236,7 +1236,7 @@ def Structomorph.trans (e : Structomorph G M M') (e' : Structomorph G M' M'') :
       have hg₂ := mem_chart_source (H := H) y
       let s := (c.symm ≫ₕ f₁).source ∩ c.symm ≫ₕ f₁ ⁻¹' g.source
       have open_s : IsOpen s := by
-        apply (c.symm ≫ₕ f₁).continuous_toFun.preimage_open_of_open <;> apply open_source
+        apply (c.symm ≫ₕ f₁).continuous_toFun.isOpen_inter_preimage <;> apply open_source
       have : x ∈ s := by
         constructor
         · simp only [trans_source, preimage_univ, inter_univ, Homeomorph.toLocalHomeomorph_source]
chore: bump to v4.3.0-rc2 (#8366)

PR contents

This is the supremum of

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

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

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

Lean PRs involved in this bump

In particular this includes adjustments for the Lean PRs

leanprover/lean4#2778

We can get rid of all the

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

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

leanprover/lean4#2722

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

leanprover/lean4#2783

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

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

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

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

Diff
@@ -1153,7 +1153,6 @@ protected instance instHasGroupoid [ClosedUnderRestriction G] : HasGroupoid s G
   compatible := by
     rintro e e' ⟨_, ⟨x, hc⟩, he⟩ ⟨_, ⟨x', hc'⟩, he'⟩
     haveI : Nonempty s := ⟨x⟩
-    have asdf := he
     rw [hc.symm, mem_singleton_iff] at he
     rw [hc'.symm, mem_singleton_iff] at he'
     rw [he, he']
chore: rename eq_of_eq_on_source_univ to eq_of_eqOnSource_univ (#8121)

Matches the naming convention, zulip discussion.

This is probably a left-over from the port; in mathlib3, the hypothesis and the lemma were named using "eq_on_source".

In passing, we also

  • add missing periods to all docstrings involved
  • add a docstring for the LocalHomeomorph version (matching its LocalEquiv clone)
  • fix a missed rename in a doc comment.
Diff
@@ -315,7 +315,7 @@ def idGroupoid (H : Type u) [TopologicalSpace H] : StructureGroupoid H where
     cases' he with he he
     · left
       have : e = e' := by
-        refine' eq_of_eq_on_source_univ (Setoid.symm he'e) _ _ <;>
+        refine' eq_of_eqOnSource_univ (Setoid.symm he'e) _ _ <;>
           rw [Set.mem_singleton_iff.1 he] <;> rfl
       rwa [← this]
     · right
chore: exactly 4 spaces in theorems (#7328)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -961,7 +961,7 @@ theorem hasGroupoid_inf_iff {G₁ G₂ : StructureGroupoid H} : HasGroupoid M (G
   fun ⟨h1, h2⟩ ↦ { compatible := fun he he' ↦ ⟨h1.compatible he he', h2.compatible he he'⟩ }⟩
 
 theorem hasGroupoid_of_pregroupoid (PG : Pregroupoid H) (h : ∀ {e e' : LocalHomeomorph M H},
-      e ∈ atlas H M → e' ∈ atlas H M → PG.property (e.symm ≫ₕ e') (e.symm ≫ₕ e').source) :
+    e ∈ atlas H M → e' ∈ atlas H M → PG.property (e.symm ≫ₕ e') (e.symm ≫ₕ e').source) :
     HasGroupoid M PG.groupoid :=
   ⟨fun he he' ↦ mem_groupoid_of_pregroupoid.mpr ⟨h he he', h he' he⟩⟩
 #align has_groupoid_of_pregroupoid hasGroupoid_of_pregroupoid
feat: Add analytic structure groupoid on models with corners (#6386)

Co-authored-by: Michael Lee <michael_lee1@brown.edu>

Diff
@@ -178,6 +178,59 @@ variable [TopologicalSpace H]
 instance : Membership (LocalHomeomorph H H) (StructureGroupoid H) :=
   ⟨fun (e : LocalHomeomorph H H) (G : StructureGroupoid H) ↦ e ∈ G.members⟩
 
+instance (H : Type u) [TopologicalSpace H] : SetLike (StructureGroupoid H) (LocalHomeomorph H H)
+    where
+  coe s := s.members
+  coe_injective' N O h := by cases N; cases O; congr
+
+instance : Inf (StructureGroupoid H) :=
+  ⟨fun G G' => StructureGroupoid.mk
+    (members := G.members ∩ G'.members)
+    (trans' := fun e e' he he' =>
+      ⟨G.trans' e e' he.left he'.left, G'.trans' e e' he.right he'.right⟩)
+    (symm' := fun e he => ⟨G.symm' e he.left, G'.symm' e he.right⟩)
+    (id_mem' := ⟨G.id_mem', G'.id_mem'⟩)
+    (locality' := by
+      intro e hx
+      apply (mem_inter_iff e G.members G'.members).mpr
+      refine And.intro (G.locality' e ?_) (G'.locality' e ?_)
+      all_goals
+        intro x hex
+        rcases hx x hex with ⟨s, hs⟩
+        use s
+        refine And.intro hs.left (And.intro hs.right.left ?_)
+      · exact hs.right.right.left
+      · exact hs.right.right.right)
+    (eq_on_source' := fun e e' he hee' =>
+      ⟨G.eq_on_source' e e' he.left hee', G'.eq_on_source' e e' he.right hee'⟩)⟩
+
+instance : InfSet (StructureGroupoid H) :=
+  ⟨fun S => StructureGroupoid.mk
+    (members := ⋂ s ∈ S, s.members)
+    (trans' := by
+      simp only [mem_iInter]
+      intro e e' he he' i hi
+      exact i.trans' e e' (he i hi) (he' i hi))
+    (symm' := by
+      simp only [mem_iInter]
+      intro e he i hi
+      exact i.symm' e (he i hi))
+    (id_mem' := by
+      simp only [mem_iInter]
+      intro i _
+      exact i.id_mem')
+    (locality' := by
+      simp only [mem_iInter]
+      intro e he i hi
+      refine i.locality' e ?_
+      intro x hex
+      rcases he x hex with ⟨s, hs⟩
+      exact ⟨s, ⟨hs.left, ⟨hs.right.left, hs.right.right i hi⟩⟩⟩)
+    (eq_on_source' := by
+      simp only [mem_iInter]
+      intro e e' he he'e
+      exact fun i hi => i.eq_on_source' e e' (he i hi) he'e)⟩
+
 theorem StructureGroupoid.trans (G : StructureGroupoid H) {e e' : LocalHomeomorph H H} (he : e ∈ G)
     (he' : e' ∈ G) : e ≫ₕ e' ∈ G :=
   G.trans' e e' he he'
@@ -271,7 +324,7 @@ def idGroupoid (H : Type u) [TopologicalSpace H] : StructureGroupoid H where
 #align id_groupoid idGroupoid
 
 /-- Every structure groupoid contains the identity groupoid. -/
-instance : OrderBot (StructureGroupoid H) where
+instance instStructureGroupoidOrderBot : OrderBot (StructureGroupoid H) where
   bot := idGroupoid H
   bot_le := by
     intro u f hf
@@ -285,8 +338,7 @@ instance : OrderBot (StructureGroupoid H) where
       rw [hf, mem_empty_iff_false] at hx
       exact hx.elim
 
-instance (H : Type u) [TopologicalSpace H] : Inhabited (StructureGroupoid H) :=
-  ⟨idGroupoid H⟩
+instance : Inhabited (StructureGroupoid H) := ⟨idGroupoid H⟩
 
 /-- To construct a groupoid, one may consider classes of local homeos such that both the function
 and its inverse have some property. If this property is stable under composition,
@@ -381,10 +433,27 @@ def continuousGroupoid (H : Type*) [TopologicalSpace H] : StructureGroupoid H :=
 #align continuous_groupoid continuousGroupoid
 
 /-- Every structure groupoid is contained in the groupoid of all local homeomorphisms. -/
-instance : OrderTop (StructureGroupoid H) where
+instance instStructureGroupoidOrderTop : OrderTop (StructureGroupoid H) where
   top := continuousGroupoid H
   le_top _ _ _ := ⟨trivial, trivial⟩
 
+instance : CompleteLattice (StructureGroupoid H) :=
+  { SetLike.instPartialOrder,
+    completeLatticeOfInf _ (by
+      refine' fun s =>
+      ⟨fun S Ss F hF => mem_iInter₂.mp hF S Ss,
+      fun T Tl F fT => mem_iInter₂.mpr (fun i his => Tl his fT)⟩) with
+    le := (· ≤ ·)
+    lt := (· < ·)
+    bot := instStructureGroupoidOrderBot.bot
+    bot_le := instStructureGroupoidOrderBot.bot_le
+    top := instStructureGroupoidOrderTop.top
+    le_top := instStructureGroupoidOrderTop.le_top
+    inf := (· ⊓ ·)
+    le_inf := fun N₁ N₂ N₃ h₁₂ h₁₃ m hm ↦ ⟨h₁₂ hm, h₁₃ hm⟩
+    inf_le_left := fun _ _ _ ↦ And.left
+    inf_le_right := fun _ _ _ ↦ And.right }
+
 /-- A groupoid is closed under restriction if it contains all restrictions of its element local
 homeomorphisms to open subsets of the source. -/
 class ClosedUnderRestriction (G : StructureGroupoid H) : Prop where
@@ -886,6 +955,11 @@ theorem hasGroupoid_of_le {G₁ G₂ : StructureGroupoid H} (h : HasGroupoid M G
   ⟨fun he he' ↦ hle (h.compatible he he')⟩
 #align has_groupoid_of_le hasGroupoid_of_le
 
+theorem hasGroupoid_inf_iff {G₁ G₂ : StructureGroupoid H} : HasGroupoid M (G₁ ⊓ G₂) ↔
+    HasGroupoid M G₁ ∧ HasGroupoid M G₂ :=
+  ⟨(fun h ↦ ⟨hasGroupoid_of_le h inf_le_left, hasGroupoid_of_le h inf_le_right⟩),
+  fun ⟨h1, h2⟩ ↦ { compatible := fun he he' ↦ ⟨h1.compatible he he', h2.compatible he he'⟩ }⟩
+
 theorem hasGroupoid_of_pregroupoid (PG : Pregroupoid H) (h : ∀ {e e' : LocalHomeomorph M H},
       e ∈ atlas H M → e' ∈ atlas H M → PG.property (e.symm ≫ₕ e') (e.symm ≫ₕ e').source) :
     HasGroupoid M PG.groupoid :=
chore: rename 2 lemmas (#6767)
  • ChartedSpace.locallyCompactChartedSpace.locallyCompactSpace
  • ModelWithCorners.locally_compactModelWithCorners.locallyCompactSpace
Diff
@@ -600,7 +600,7 @@ theorem ChartedSpace.secondCountable_of_sigma_compact [SecondCountableTopology H
 
 /-- If a topological space admits an atlas with locally compact charts, then the space itself
 is locally compact. -/
-theorem ChartedSpace.locallyCompact [LocallyCompactSpace H] : LocallyCompactSpace M := by
+theorem ChartedSpace.locallyCompactSpace [LocallyCompactSpace H] : LocallyCompactSpace M := by
   have : ∀ x : M, (𝓝 x).HasBasis
       (fun s ↦ s ∈ 𝓝 (chartAt H x x) ∧ IsCompact s ∧ s ⊆ (chartAt H x).target)
       fun s ↦ (chartAt H x).symm '' s := fun x ↦ by
@@ -610,7 +610,7 @@ theorem ChartedSpace.locallyCompact [LocallyCompactSpace H] : LocallyCompactSpac
   refine locallyCompactSpace_of_hasBasis this ?_
   rintro x s ⟨_, h₂, h₃⟩
   exact h₂.image_of_continuousOn ((chartAt H x).continuousOn_symm.mono h₃)
-#align charted_space.locally_compact ChartedSpace.locallyCompact
+#align charted_space.locally_compact ChartedSpace.locallyCompactSpace
 
 /-- If a topological space admits an atlas with locally connected charts, then the space itself is
 locally connected. -/
fix: reduce imports for scripts (#6716)

As noted on Zulip, a from-scratch build of mathlib after lake exe cache get will compile all of Std due to some unnecessary imports. With a few well chosen import reductions we only end up having to compile ~20 files instead of ~300 files (compile meaning Compiling, generating the arch-dependent .o files that are not in the cache).

Diff
@@ -3,6 +3,7 @@ Copyright (c) 2019 Sébastien Gouëzel. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Sébastien Gouëzel
 -/
+import Mathlib.Init.Align
 import Mathlib.Topology.LocalHomeomorph
 
 #align_import geometry.manifold.charted_space from "leanprover-community/mathlib"@"431589bce478b2229eba14b14a283250428217db"
fix: disable autoImplicit globally (#6528)

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

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

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

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

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

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

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

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

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

Diff
@@ -109,6 +109,8 @@ In the locale `Manifold`, we denote the composition of local homeomorphisms with
 composition of local equivs with `≫`.
 -/
 
+set_option autoImplicit true
+
 
 noncomputable section
 
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
@@ -52,7 +52,7 @@ under composition and inverse, to which the change of coordinates should belong.
   the groupoid `G`. We avoid the word diffeomorphism, keeping it for the smooth category.
 
 As a basic example, we give the instance
-`instance chartedSpaceSelf (H : Type _) [TopologicalSpace H] : ChartedSpace H H`
+`instance chartedSpaceSelf (H : Type*) [TopologicalSpace H] : ChartedSpace H H`
 saying that a topological space is a charted space over itself, with the identity as unique chart.
 This charted space structure is compatible with any groupoid.
 
@@ -116,7 +116,7 @@ open Classical Topology Filter
 
 universe u
 
-variable {H : Type u} {H' : Type _} {M : Type _} {M' : Type _} {M'' : Type _}
+variable {H : Type u} {H' : Type*} {M : Type*} {M' : Type*} {M'' : Type*}
 
 /- Notational shortcut for the composition of local homeomorphisms and local equivs, i.e.,
 `LocalHomeomorph.trans` and `LocalEquiv.trans`.
@@ -289,7 +289,7 @@ instance (H : Type u) [TopologicalSpace H] : Inhabited (StructureGroupoid H) :=
 and its inverse have some property. If this property is stable under composition,
 one gets a groupoid. `Pregroupoid` bundles the properties needed for this construction, with the
 groupoid of smooth functions with smooth inverses as an application. -/
-structure Pregroupoid (H : Type _) [TopologicalSpace H] where
+structure Pregroupoid (H : Type*) [TopologicalSpace H] where
   property : (H → H) → Set H → Prop
   comp : ∀ {f g u v}, property f u → property g v →
     IsOpen u → IsOpen v → IsOpen (u ∩ f ⁻¹' v) → property (g ∘ f) (u ∩ f ⁻¹' v)
@@ -361,7 +361,7 @@ theorem mem_pregroupoid_of_eq_on_source (PG : Pregroupoid H) {e e' : LocalHomeom
 
 /-- The pregroupoid of all local maps on a topological space `H`. -/
 @[reducible]
-def continuousPregroupoid (H : Type _) [TopologicalSpace H] : Pregroupoid H where
+def continuousPregroupoid (H : Type*) [TopologicalSpace H] : Pregroupoid H where
   property _ _ := True
   comp _ _ _ _ _ := trivial
   id_mem := trivial
@@ -369,11 +369,11 @@ def continuousPregroupoid (H : Type _) [TopologicalSpace H] : Pregroupoid H wher
   congr _ _ _ := trivial
 #align continuous_pregroupoid continuousPregroupoid
 
-instance (H : Type _) [TopologicalSpace H] : Inhabited (Pregroupoid H) :=
+instance (H : Type*) [TopologicalSpace H] : Inhabited (Pregroupoid H) :=
   ⟨continuousPregroupoid H⟩
 
 /-- The groupoid of all local homeomorphisms on a topological space `H`. -/
-def continuousGroupoid (H : Type _) [TopologicalSpace H] : StructureGroupoid H :=
+def continuousGroupoid (H : Type*) [TopologicalSpace H] : StructureGroupoid H :=
   Pregroupoid.groupoid (continuousPregroupoid H)
 #align continuous_groupoid continuousGroupoid
 
@@ -485,35 +485,35 @@ given topological space. For instance, a complex manifold (modelled over `ℂ^n`
 sometimes as a real manifold over `ℝ^(2n)`.
 -/
 @[ext]
-class ChartedSpace (H : Type _) [TopologicalSpace H] (M : Type _) [TopologicalSpace M] where
+class ChartedSpace (H : Type*) [TopologicalSpace H] (M : Type*) [TopologicalSpace M] where
   protected atlas : Set (LocalHomeomorph M H)
   protected chartAt : M → LocalHomeomorph M H
   protected mem_chart_source : ∀ x, x ∈ (chartAt x).source
   protected chart_mem_atlas : ∀ x, chartAt x ∈ atlas
 #align charted_space ChartedSpace
 
-abbrev atlas (H : Type _) [TopologicalSpace H] (M : Type _) [TopologicalSpace M]
+abbrev atlas (H : Type*) [TopologicalSpace H] (M : Type*) [TopologicalSpace M]
     [ChartedSpace H M] : Set (LocalHomeomorph M H) :=
   ChartedSpace.atlas
 
-abbrev chartAt (H : Type _) [TopologicalSpace H] {M : Type _} [TopologicalSpace M]
+abbrev chartAt (H : Type*) [TopologicalSpace H] {M : Type*} [TopologicalSpace M]
     [ChartedSpace H M] (x : M) : LocalHomeomorph M H :=
   ChartedSpace.chartAt x
 
 @[simp, mfld_simps]
-lemma mem_chart_source (H : Type _) {M : Type _} [TopologicalSpace H] [TopologicalSpace M]
+lemma mem_chart_source (H : Type*) {M : Type*} [TopologicalSpace H] [TopologicalSpace M]
     [ChartedSpace H M] (x : M) : x ∈ (chartAt H x).source :=
   ChartedSpace.mem_chart_source x
 
 @[simp, mfld_simps]
-lemma chart_mem_atlas (H : Type _) {M : Type _} [TopologicalSpace H] [TopologicalSpace M]
+lemma chart_mem_atlas (H : Type*) {M : Type*} [TopologicalSpace H] [TopologicalSpace M]
     [ChartedSpace H M] (x : M) : chartAt H x ∈ atlas H M :=
   ChartedSpace.chart_mem_atlas x
 
 section ChartedSpace
 
 /-- Any space is a `ChartedSpace` modelled over itself, by just using the identity chart. -/
-instance chartedSpaceSelf (H : Type _) [TopologicalSpace H] : ChartedSpace H H where
+instance chartedSpaceSelf (H : Type*) [TopologicalSpace H] : ChartedSpace H H where
   atlas := {LocalHomeomorph.refl H}
   chartAt _ := LocalHomeomorph.refl H
   mem_chart_source x := mem_univ x
@@ -523,13 +523,13 @@ instance chartedSpaceSelf (H : Type _) [TopologicalSpace H] : ChartedSpace H H w
 /-- In the trivial `ChartedSpace` structure of a space modelled over itself through the identity,
 the atlas members are just the identity. -/
 @[simp, mfld_simps]
-theorem chartedSpaceSelf_atlas {H : Type _} [TopologicalSpace H] {e : LocalHomeomorph H H} :
+theorem chartedSpaceSelf_atlas {H : Type*} [TopologicalSpace H] {e : LocalHomeomorph H H} :
     e ∈ atlas H H ↔ e = LocalHomeomorph.refl H :=
   Iff.rfl
 #align charted_space_self_atlas chartedSpaceSelf_atlas
 
 /-- In the model space, `chartAt` is always the identity. -/
-theorem chartAt_self_eq {H : Type _} [TopologicalSpace H] {x : H} :
+theorem chartAt_self_eq {H : Type*} [TopologicalSpace H] {x : H} :
     chartAt H x = LocalHomeomorph.refl H := rfl
 #align chart_at_self_eq chartAt_self_eq
 
@@ -625,8 +625,8 @@ theorem ChartedSpace.locallyConnectedSpace [LocallyConnectedSpace H] : LocallyCo
 
 /-- If `M` is modelled on `H'` and `H'` is itself modelled on `H`, then we can consider `M` as being
 modelled on `H`. -/
-def ChartedSpace.comp (H : Type _) [TopologicalSpace H] (H' : Type _) [TopologicalSpace H']
-    (M : Type _) [TopologicalSpace M] [ChartedSpace H H'] [ChartedSpace H' M] :
+def ChartedSpace.comp (H : Type*) [TopologicalSpace H] (H' : Type*) [TopologicalSpace H']
+    (M : Type*) [TopologicalSpace M] [ChartedSpace H H'] [ChartedSpace H' M] :
     ChartedSpace H M where
   atlas := image2 LocalHomeomorph.trans (atlas H' M) (atlas H H')
   chartAt p := (chartAt H' p).trans (chartAt H (chartAt H' p p))
@@ -634,8 +634,8 @@ def ChartedSpace.comp (H : Type _) [TopologicalSpace H] (H' : Type _) [Topologic
   chart_mem_atlas p := ⟨chartAt _ p, chartAt _ _, chart_mem_atlas _ p, chart_mem_atlas _ _, rfl⟩
 #align charted_space.comp ChartedSpace.comp
 
-theorem chartAt_comp (H : Type _) [TopologicalSpace H] (H' : Type _) [TopologicalSpace H']
-    {M : Type _} [TopologicalSpace M] [ChartedSpace H H'] [ChartedSpace H' M] (x : M) :
+theorem chartAt_comp (H : Type*) [TopologicalSpace H] (H' : Type*) [TopologicalSpace H']
+    {M : Type*} [TopologicalSpace M] [ChartedSpace H H'] [ChartedSpace H' M] (x : M) :
     (letI := ChartedSpace.comp H H' M; chartAt H x) = chartAt H' x ≫ₕ chartAt H (chartAt H' x x) :=
   rfl
 
@@ -644,7 +644,7 @@ end
 library_note "Manifold type tags" /-- For technical reasons we introduce two type tags:
 
 * `ModelProd H H'` is the same as `H × H'`;
-* `ModelPi H` is the same as `∀ i, H i`, where `H : ι → Type _` and `ι` is a finite type.
+* `ModelPi H` is the same as `∀ i, H i`, where `H : ι → Type*` and `ι` is a finite type.
 
 In both cases the reason is the same, so we explain it only in the case of the product. A charted
 space `M` with model `H` is a set of local charts from `M` to `H` covering the space. Every space is
@@ -659,13 +659,13 @@ solves this problem. -/
 
 /-- Same thing as `H × H'`. We introduce it for technical reasons,
 see note [Manifold type tags]. -/
-def ModelProd (H : Type _) (H' : Type _) :=
+def ModelProd (H : Type*) (H' : Type*) :=
   H × H'
 #align model_prod ModelProd
 
 /-- Same thing as `∀ i, H i`. We introduce it for technical reasons,
 see note [Manifold type tags]. -/
-def ModelPi {ι : Type _} (H : ι → Type _) :=
+def ModelPi {ι : Type*} (H : ι → Type*) :=
   ∀ i, H i
 #align model_pi ModelPi
 
@@ -677,14 +677,14 @@ instance modelProdInhabited [Inhabited H] [Inhabited H'] : Inhabited (ModelProd
   instInhabitedProd
 #align model_prod_inhabited modelProdInhabited
 
-instance (H : Type _) [TopologicalSpace H] (H' : Type _) [TopologicalSpace H'] :
+instance (H : Type*) [TopologicalSpace H] (H' : Type*) [TopologicalSpace H'] :
     TopologicalSpace (ModelProd H H') :=
   instTopologicalSpaceProd
 
 -- Porting note: simpNF false positive
 -- Next lemma shows up often when dealing with derivatives, register it as simp.
 @[simp, mfld_simps, nolint simpNF]
-theorem modelProd_range_prod_id {H : Type _} {H' : Type _} {α : Type _} (f : H → α) :
+theorem modelProd_range_prod_id {H : Type*} {H' : Type*} {α : Type*} (f : H → α) :
     (range fun p : ModelProd H H' ↦ (f p.1, p.2)) = range f ×ˢ (univ : Set H') := by
   rw [prod_range_univ_eq]
   rfl
@@ -694,7 +694,7 @@ end
 
 section
 
-variable {ι : Type _} {Hi : ι → Type _}
+variable {ι : Type*} {Hi : ι → Type*}
 
 -- Porting note: Old proof was `Pi.inhabited _`.
 instance modelPiInhabited [∀ i, Inhabited (Hi i)] : Inhabited (ModelPi Hi) :=
@@ -708,8 +708,8 @@ end
 
 /-- The product of two charted spaces is naturally a charted space, with the canonical
 construction of the atlas of product maps. -/
-instance prodChartedSpace (H : Type _) [TopologicalSpace H] (M : Type _) [TopologicalSpace M]
-    [ChartedSpace H M] (H' : Type _) [TopologicalSpace H'] (M' : Type _) [TopologicalSpace M']
+instance prodChartedSpace (H : Type*) [TopologicalSpace H] (M : Type*) [TopologicalSpace M]
+    [ChartedSpace H M] (H' : Type*) [TopologicalSpace H'] (M' : Type*) [TopologicalSpace M']
     [ChartedSpace H' M'] : ChartedSpace (ModelProd H H') (M × M') where
   atlas := image2 LocalHomeomorph.prod (atlas H M) (atlas H' M')
   chartAt x := (chartAt H x.1).prod (chartAt H' x.2)
@@ -744,8 +744,8 @@ end prodChartedSpace
 
 /-- The product of a finite family of charted spaces is naturally a charted space, with the
 canonical construction of the atlas of finite product maps. -/
-instance piChartedSpace {ι : Type _} [Fintype ι] (H : ι → Type _) [∀ i, TopologicalSpace (H i)]
-    (M : ι → Type _) [∀ i, TopologicalSpace (M i)] [∀ i, ChartedSpace (H i) (M i)] :
+instance piChartedSpace {ι : Type*} [Fintype ι] (H : ι → Type*) [∀ i, TopologicalSpace (H i)]
+    (M : ι → Type*) [∀ i, TopologicalSpace (M i)] [∀ i, ChartedSpace (H i) (M i)] :
     ChartedSpace (ModelPi H) (∀ i, M i) where
   atlas := LocalHomeomorph.pi '' Set.pi univ fun _ ↦ atlas (H _) (M _)
   chartAt f := LocalHomeomorph.pi fun i ↦ chartAt (H i) (f i)
@@ -754,8 +754,8 @@ instance piChartedSpace {ι : Type _} [Fintype ι] (H : ι → Type _) [∀ i, T
 #align pi_charted_space piChartedSpace
 
 @[simp, mfld_simps]
-theorem piChartedSpace_chartAt {ι : Type _} [Fintype ι] (H : ι → Type _)
-    [∀ i, TopologicalSpace (H i)] (M : ι → Type _) [∀ i, TopologicalSpace (M i)]
+theorem piChartedSpace_chartAt {ι : Type*} [Fintype ι] (H : ι → Type*)
+    [∀ i, TopologicalSpace (H i)] (M : ι → Type*) [∀ i, TopologicalSpace (M i)]
     [∀ i, ChartedSpace (H i) (M i)] (f : ∀ i, M i) :
     chartAt (H := ModelPi H) f = LocalHomeomorph.pi fun i ↦ chartAt (H i) (f i) :=
   rfl
@@ -771,7 +771,7 @@ have a topological structure, where the topology would come from the charts. For
 charts that are only local equivs, and continuity properties for their composition.
 This is formalised in `ChartedSpaceCore`. -/
 -- @[nolint has_nonempty_instance]  -- Porting note: commented out
-structure ChartedSpaceCore (H : Type _) [TopologicalSpace H] (M : Type _) where
+structure ChartedSpaceCore (H : Type*) [TopologicalSpace H] (M : Type*) where
   atlas : Set (LocalEquiv M H)
   chartAt : M → LocalEquiv M H
   mem_chart_source : ∀ x, x ∈ (chartAt x).source
@@ -864,7 +864,7 @@ variable [TopologicalSpace H] [TopologicalSpace M] [ChartedSpace H M]
 
 /-- A charted space has an atlas in a groupoid `G` if the change of coordinates belong to the
 groupoid. -/
-class HasGroupoid {H : Type _} [TopologicalSpace H] (M : Type _) [TopologicalSpace M]
+class HasGroupoid {H : Type*} [TopologicalSpace H] (M : Type*) [TopologicalSpace M]
     [ChartedSpace H M] (G : StructureGroupoid H) : Prop where
   compatible : ∀ {e e' : LocalHomeomorph M H}, e ∈ atlas H M → e' ∈ atlas H M → e.symm ≫ₕ e' ∈ G
 #align has_groupoid HasGroupoid
@@ -872,8 +872,8 @@ class HasGroupoid {H : Type _} [TopologicalSpace H] (M : Type _) [TopologicalSpa
 /-- Reformulate in the `StructureGroupoid` namespace the compatibility condition of charts in a
 charted space admitting a structure groupoid, to make it more easily accessible with dot
 notation. -/
-theorem StructureGroupoid.compatible {H : Type _} [TopologicalSpace H] (G : StructureGroupoid H)
-    {M : Type _} [TopologicalSpace M] [ChartedSpace H M] [HasGroupoid M G]
+theorem StructureGroupoid.compatible {H : Type*} [TopologicalSpace H] (G : StructureGroupoid H)
+    {M : Type*} [TopologicalSpace M] [ChartedSpace H M] [HasGroupoid M G]
     {e e' : LocalHomeomorph M H} (he : e ∈ atlas H M) (he' : e' ∈ atlas H M) : e.symm ≫ₕ e' ∈ G :=
   HasGroupoid.compatible he he'
 #align structure_groupoid.compatible StructureGroupoid.compatible
@@ -890,7 +890,7 @@ theorem hasGroupoid_of_pregroupoid (PG : Pregroupoid H) (h : ∀ {e e' : LocalHo
 #align has_groupoid_of_pregroupoid hasGroupoid_of_pregroupoid
 
 /-- The trivial charted space structure on the model space is compatible with any groupoid. -/
-instance hasGroupoid_model_space (H : Type _) [TopologicalSpace H] (G : StructureGroupoid H) :
+instance hasGroupoid_model_space (H : Type*) [TopologicalSpace H] (G : StructureGroupoid H) :
     HasGroupoid H G where
   compatible {e e'} he he' := by
     rw [chartedSpaceSelf_atlas] at he he'
@@ -978,7 +978,7 @@ end MaximalAtlas
 
 section Singleton
 
-variable {α : Type _} [TopologicalSpace α]
+variable {α : Type*} [TopologicalSpace α]
 
 namespace LocalHomeomorph
 
@@ -1108,7 +1108,7 @@ end TopologicalSpace.Opens
 charts, belongs to `G`. We avoid the word diffeomorph as it is too related to the smooth category,
 and use structomorph instead. -/
 -- @[nolint has_nonempty_instance]  -- Porting note: commented out
-structure Structomorph (G : StructureGroupoid H) (M : Type _) (M' : Type _) [TopologicalSpace M]
+structure Structomorph (G : StructureGroupoid H) (M : Type*) (M' : Type*) [TopologicalSpace M]
   [TopologicalSpace M'] [ChartedSpace H M] [ChartedSpace H M'] extends Homeomorph M M' where
   mem_groupoid : ∀ c : LocalHomeomorph M H, ∀ c' : LocalHomeomorph M' H, c ∈ atlas H M →
     c' ∈ atlas H M' → c.symm ≫ₕ toHomeomorph.toLocalHomeomorph ≫ₕ c' ∈ G
@@ -1118,7 +1118,7 @@ variable [TopologicalSpace M'] [TopologicalSpace M''] {G : StructureGroupoid H}
   [ChartedSpace H M'']
 
 /-- The identity is a diffeomorphism of any charted space, for any groupoid. -/
-def Structomorph.refl (M : Type _) [TopologicalSpace M] [ChartedSpace H M] [HasGroupoid M G] :
+def Structomorph.refl (M : Type*) [TopologicalSpace M] [ChartedSpace H M] [HasGroupoid M G] :
     Structomorph G M M :=
   { Homeomorph.refl M with
     mem_groupoid := fun c c' hc hc' ↦ by
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) 2019 Sébastien Gouëzel. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Sébastien Gouëzel
-
-! This file was ported from Lean 3 source module geometry.manifold.charted_space
-! leanprover-community/mathlib commit 431589bce478b2229eba14b14a283250428217db
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Topology.LocalHomeomorph
 
+#align_import geometry.manifold.charted_space from "leanprover-community/mathlib"@"431589bce478b2229eba14b14a283250428217db"
+
 /-!
 # Charted spaces
 
fix: precedences of ⨆⋃⋂⨅ (#5614)
Diff
@@ -580,7 +580,7 @@ theorem mem_achart_source (x : M) : x ∈ (achart H x).1.source :=
 open TopologicalSpace
 
 theorem ChartedSpace.secondCountable_of_countable_cover [SecondCountableTopology H] {s : Set M}
-    (hs : (⋃ (x) (_ : x ∈ s), (chartAt H x).source) = univ) (hsc : s.Countable) :
+    (hs : ⋃ (x) (_ : x ∈ s), (chartAt H x).source = univ) (hsc : s.Countable) :
     SecondCountableTopology M := by
   haveI : ∀ x : M, SecondCountableTopology (chartAt H x).source :=
     fun x ↦ (chartAt (H := H) x).secondCountableTopology_source
@@ -593,7 +593,7 @@ variable (M)
 
 theorem ChartedSpace.secondCountable_of_sigma_compact [SecondCountableTopology H]
     [SigmaCompactSpace M] : SecondCountableTopology M := by
-  obtain ⟨s, hsc, hsU⟩ : ∃ s, Set.Countable s ∧ (⋃ (x) (_ : x ∈ s), (chartAt H x).source) = univ :=
+  obtain ⟨s, hsc, hsU⟩ : ∃ s, Set.Countable s ∧ ⋃ (x) (_ : x ∈ s), (chartAt H x).source = univ :=
     countable_cover_nhds_of_sigma_compact fun x : M ↦ chart_source_mem_nhds H x
   exact ChartedSpace.secondCountable_of_countable_cover H hsU hsc
 #align charted_space.second_countable_of_sigma_compact ChartedSpace.secondCountable_of_sigma_compact
feat: port Geometry.Manifold.VectorBundle.Tangent (#5448)

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

Diff
@@ -722,6 +722,10 @@ instance prodChartedSpace (H : Type _) [TopologicalSpace H] (M : Type _) [Topolo
 
 section prodChartedSpace
 
+@[ext]
+theorem ModelProd.ext {x y : ModelProd α β} (h₁ : x.1 = y.1) (h₂ : x.2 = y.2) : x = y :=
+  Prod.ext h₁ h₂
+
 variable [TopologicalSpace H] [TopologicalSpace M] [ChartedSpace H M] [TopologicalSpace H']
   [TopologicalSpace M'] [ChartedSpace H' M'] {x : M × M'}
 
feat: port Geometry.Manifold.VectorBundle.Basic (#5444)

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

Diff
@@ -637,6 +637,11 @@ def ChartedSpace.comp (H : Type _) [TopologicalSpace H] (H' : Type _) [Topologic
   chart_mem_atlas p := ⟨chartAt _ p, chartAt _ _, chart_mem_atlas _ p, chart_mem_atlas _ _, rfl⟩
 #align charted_space.comp ChartedSpace.comp
 
+theorem chartAt_comp (H : Type _) [TopologicalSpace H] (H' : Type _) [TopologicalSpace H']
+    {M : Type _} [TopologicalSpace M] [ChartedSpace H H'] [ChartedSpace H' M] (x : M) :
+    (letI := ChartedSpace.comp H H' M; chartAt H x) = chartAt H' x ≫ₕ chartAt H (chartAt H' x x) :=
+  rfl
+
 end
 
 library_note "Manifold type tags" /-- For technical reasons we introduce two type tags:
chore: clean up spacing around at and goals (#5387)

Changes are of the form

  • some_tactic at h⊢ -> some_tactic at h ⊢
  • some_tactic at h -> some_tactic at h
Diff
@@ -352,7 +352,7 @@ theorem mem_groupoid_of_pregroupoid {PG : Pregroupoid H} {e : LocalHomeomorph H
 theorem groupoid_of_pregroupoid_le (PG₁ PG₂ : Pregroupoid H)
     (h : ∀ f s, PG₁.property f s → PG₂.property f s) : PG₁.groupoid ≤ PG₂.groupoid := by
   refine' StructureGroupoid.le_iff.2 fun e he ↦ _
-  rw [mem_groupoid_of_pregroupoid] at he⊢
+  rw [mem_groupoid_of_pregroupoid] at he ⊢
   exact ⟨h _ _ he.1, h _ _ he.2⟩
 #align groupoid_of_pregroupoid_le groupoid_of_pregroupoid_le
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Sébastien Gouëzel
 
 ! This file was ported from Lean 3 source module geometry.manifold.charted_space
-! leanprover-community/mathlib commit bcfa726826abd57587355b4b5b7e78ad6527b7e4
+! leanprover-community/mathlib commit 431589bce478b2229eba14b14a283250428217db
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -1080,6 +1080,20 @@ protected instance instHasGroupoid [ClosedUnderRestriction G] : HasGroupoid s G
     · exact preimage_open_of_open_symm (chartAt _ _) s.2
 #align topological_space.opens.has_groupoid TopologicalSpace.Opens.instHasGroupoid
 
+theorem chartAt_inclusion_symm_eventuallyEq {U V : Opens M} (hUV : U ≤ V) {x : U} :
+    (chartAt H (Set.inclusion hUV x)).symm
+    =ᶠ[𝓝 (chartAt H (Set.inclusion hUV x) (Set.inclusion hUV x))]
+    Set.inclusion hUV ∘ (chartAt H x).symm := by
+  set i := Set.inclusion hUV
+  set e := chartAt H (x : M)
+  haveI : Nonempty U := ⟨x⟩
+  haveI : Nonempty V := ⟨i x⟩
+  have heUx_nhds : (e.subtypeRestr U).target ∈ 𝓝 (e x) := by
+    apply (e.subtypeRestr U).open_target.mem_nhds
+    exact e.map_subtype_source (mem_chart_source _ _)
+  exact Filter.eventuallyEq_of_mem heUx_nhds (e.subtypeRestr_symm_eqOn_of_le hUV)
+#align topological_space.opens.chart_at_inclusion_symm_eventually_eq TopologicalSpace.Opens.chartAt_inclusion_symm_eventuallyEq
+
 end TopologicalSpace.Opens
 
 /-! ### Structomorphisms -/
refactor: add abbreviations with explicit arguments (#4641)

Lean 4 does not support [] fields in classes, so some definitions like ChartedSpace.atlas have fewer explicit arguments than they used to have in Lean 3. This PR adds abbreviations in the root namespace with explicit arguments.

Diff
@@ -489,15 +489,29 @@ sometimes as a real manifold over `ℝ^(2n)`.
 -/
 @[ext]
 class ChartedSpace (H : Type _) [TopologicalSpace H] (M : Type _) [TopologicalSpace M] where
-  atlas : Set (LocalHomeomorph M H)
-  chartAt : M → LocalHomeomorph M H
-  mem_chart_source : ∀ x, x ∈ (chartAt x).source
-  chart_mem_atlas : ∀ x, chartAt x ∈ atlas
+  protected atlas : Set (LocalHomeomorph M H)
+  protected chartAt : M → LocalHomeomorph M H
+  protected mem_chart_source : ∀ x, x ∈ (chartAt x).source
+  protected chart_mem_atlas : ∀ x, chartAt x ∈ atlas
 #align charted_space ChartedSpace
 
-export ChartedSpace (atlas chartAt mem_chart_source chart_mem_atlas)
+abbrev atlas (H : Type _) [TopologicalSpace H] (M : Type _) [TopologicalSpace M]
+    [ChartedSpace H M] : Set (LocalHomeomorph M H) :=
+  ChartedSpace.atlas
+
+abbrev chartAt (H : Type _) [TopologicalSpace H] {M : Type _} [TopologicalSpace M]
+    [ChartedSpace H M] (x : M) : LocalHomeomorph M H :=
+  ChartedSpace.chartAt x
+
+@[simp, mfld_simps]
+lemma mem_chart_source (H : Type _) {M : Type _} [TopologicalSpace H] [TopologicalSpace M]
+    [ChartedSpace H M] (x : M) : x ∈ (chartAt H x).source :=
+  ChartedSpace.mem_chart_source x
 
-attribute [simp, mfld_simps] mem_chart_source chart_mem_atlas
+@[simp, mfld_simps]
+lemma chart_mem_atlas (H : Type _) {M : Type _} [TopologicalSpace H] [TopologicalSpace M]
+    [ChartedSpace H M] (x : M) : chartAt H x ∈ atlas H M :=
+  ChartedSpace.chart_mem_atlas x
 
 section ChartedSpace
 
@@ -513,13 +527,13 @@ instance chartedSpaceSelf (H : Type _) [TopologicalSpace H] : ChartedSpace H H w
 the atlas members are just the identity. -/
 @[simp, mfld_simps]
 theorem chartedSpaceSelf_atlas {H : Type _} [TopologicalSpace H] {e : LocalHomeomorph H H} :
-    e ∈ atlas ↔ e = LocalHomeomorph.refl H := by
-  simp only [atlas, mem_singleton_iff]
+    e ∈ atlas H H ↔ e = LocalHomeomorph.refl H :=
+  Iff.rfl
 #align charted_space_self_atlas chartedSpaceSelf_atlas
 
 /-- In the model space, `chartAt` is always the identity. -/
 theorem chartAt_self_eq {H : Type _} [TopologicalSpace H] {x : H} :
-    chartAt x = LocalHomeomorph.refl H := rfl
+    chartAt H x = LocalHomeomorph.refl H := rfl
 #align chart_at_self_eq chartAt_self_eq
 
 section
@@ -527,59 +541,59 @@ section
 variable (H) [TopologicalSpace H] [TopologicalSpace M] [ChartedSpace H M]
 
 -- Porting note: Added `(H := H)` to avoid typeclass instance problem.
-theorem mem_chart_target (x : M) : chartAt (H := H) x x ∈ (chartAt x).target :=
-  (chartAt x).map_source (mem_chart_source _)
+theorem mem_chart_target (x : M) : chartAt H x x ∈ (chartAt H x).target :=
+  (chartAt H x).map_source (mem_chart_source _ _)
 #align mem_chart_target mem_chart_target
 
-theorem chart_source_mem_nhds (x : M) : (chartAt (H := H) x).source ∈ 𝓝 x :=
-  (chartAt x).open_source.mem_nhds <| mem_chart_source x
+theorem chart_source_mem_nhds (x : M) : (chartAt H x).source ∈ 𝓝 x :=
+  (chartAt H x).open_source.mem_nhds <| mem_chart_source H x
 #align chart_source_mem_nhds chart_source_mem_nhds
 
-theorem chart_target_mem_nhds (x : M) : (chartAt (H := H) x).target ∈ 𝓝 (chartAt x x) :=
-  (chartAt x).open_target.mem_nhds <| mem_chart_target H x
+theorem chart_target_mem_nhds (x : M) : (chartAt H x).target ∈ 𝓝 (chartAt H x x) :=
+  (chartAt H x).open_target.mem_nhds <| mem_chart_target H x
 #align chart_target_mem_nhds chart_target_mem_nhds
 
 /-- `achart H x` is the chart at `x`, considered as an element of the atlas.
 Especially useful for working with `BasicSmoothVectorBundleCore`. -/
-def achart (x : M) : atlas (H := H) (M := M) :=
-  ⟨chartAt x, chart_mem_atlas x⟩
+def achart (x : M) : atlas H M :=
+  ⟨chartAt H x, chart_mem_atlas H x⟩
 #align achart achart
 
-theorem achart_def (x : M) : achart H x = ⟨chartAt x, chart_mem_atlas x⟩ :=
+theorem achart_def (x : M) : achart H x = ⟨chartAt H x, chart_mem_atlas H x⟩ :=
   rfl
 #align achart_def achart_def
 
 @[simp, mfld_simps]
-theorem coe_achart (x : M) : (achart H x : LocalHomeomorph M H) = chartAt x :=
+theorem coe_achart (x : M) : (achart H x : LocalHomeomorph M H) = chartAt H x :=
   rfl
 #align coe_achart coe_achart
 
 @[simp, mfld_simps]
-theorem achart_val (x : M) : (achart H x).1 = chartAt x :=
+theorem achart_val (x : M) : (achart H x).1 = chartAt H x :=
   rfl
 #align achart_val achart_val
 
 theorem mem_achart_source (x : M) : x ∈ (achart H x).1.source :=
-  mem_chart_source x
+  mem_chart_source H x
 #align mem_achart_source mem_achart_source
 
 open TopologicalSpace
 
 theorem ChartedSpace.secondCountable_of_countable_cover [SecondCountableTopology H] {s : Set M}
-    (hs : (⋃ (x) (_ : x ∈ s), (chartAt (H := H) x).source) = univ) (hsc : s.Countable) :
+    (hs : (⋃ (x) (_ : x ∈ s), (chartAt H x).source) = univ) (hsc : s.Countable) :
     SecondCountableTopology M := by
-  haveI : ∀ x : M, SecondCountableTopology (chartAt x).source :=
+  haveI : ∀ x : M, SecondCountableTopology (chartAt H x).source :=
     fun x ↦ (chartAt (H := H) x).secondCountableTopology_source
   haveI := hsc.toEncodable
   rw [biUnion_eq_iUnion] at hs
-  exact secondCountableTopology_of_countable_cover (fun x : s ↦ (chartAt (x : M)).open_source) hs
+  exact secondCountableTopology_of_countable_cover (fun x : s ↦ (chartAt H (x : M)).open_source) hs
 #align charted_space.second_countable_of_countable_cover ChartedSpace.secondCountable_of_countable_cover
 
 variable (M)
 
 theorem ChartedSpace.secondCountable_of_sigma_compact [SecondCountableTopology H]
     [SigmaCompactSpace M] : SecondCountableTopology M := by
-  obtain ⟨s, hsc, hsU⟩ : ∃ s, Set.Countable s ∧ (⋃ (x) (hx : x ∈ s), (chartAt x).source) = univ :=
+  obtain ⟨s, hsc, hsU⟩ : ∃ s, Set.Countable s ∧ (⋃ (x) (_ : x ∈ s), (chartAt H x).source) = univ :=
     countable_cover_nhds_of_sigma_compact fun x : M ↦ chart_source_mem_nhds H x
   exact ChartedSpace.secondCountable_of_countable_cover H hsU hsc
 #align charted_space.second_countable_of_sigma_compact ChartedSpace.secondCountable_of_sigma_compact
@@ -588,29 +602,28 @@ theorem ChartedSpace.secondCountable_of_sigma_compact [SecondCountableTopology H
 is locally compact. -/
 theorem ChartedSpace.locallyCompact [LocallyCompactSpace H] : LocallyCompactSpace M := by
   have : ∀ x : M, (𝓝 x).HasBasis
-      (fun s ↦ s ∈ 𝓝 (chartAt x x) ∧ IsCompact s ∧ s ⊆ (chartAt x).target)
-      fun s ↦ (chartAt x).symm '' s := by
-    intro x
-    rw [← (chartAt (H := H) x).symm_map_nhds_eq (mem_chart_source x)]
-    exact
-      ((compact_basis_nhds (chartAt x x)).hasBasis_self_subset (chart_target_mem_nhds H x)).map _
-  refine' locallyCompactSpace_of_hasBasis this _
+      (fun s ↦ s ∈ 𝓝 (chartAt H x x) ∧ IsCompact s ∧ s ⊆ (chartAt H x).target)
+      fun s ↦ (chartAt H x).symm '' s := fun x ↦ by
+    rw [← (chartAt H x).symm_map_nhds_eq (mem_chart_source H x)]
+    exact ((compact_basis_nhds (chartAt H x x)).hasBasis_self_subset
+      (chart_target_mem_nhds H x)).map _
+  refine locallyCompactSpace_of_hasBasis this ?_
   rintro x s ⟨_, h₂, h₃⟩
-  exact h₂.image_of_continuousOn ((chartAt x).continuousOn_symm.mono h₃)
+  exact h₂.image_of_continuousOn ((chartAt H x).continuousOn_symm.mono h₃)
 #align charted_space.locally_compact ChartedSpace.locallyCompact
 
 /-- If a topological space admits an atlas with locally connected charts, then the space itself is
 locally connected. -/
 theorem ChartedSpace.locallyConnectedSpace [LocallyConnectedSpace H] : LocallyConnectedSpace M := by
-  let E : M → LocalHomeomorph M H := chartAt
-  refine' locallyConnectedSpace_of_connected_bases (fun x s ↦ (E x).symm '' s)
-      (fun x s ↦ (IsOpen s ∧ E x x ∈ s ∧ IsConnected s) ∧ s ⊆ (E x).target) _ _
+  let e : M → LocalHomeomorph M H := chartAt H
+  refine' locallyConnectedSpace_of_connected_bases (fun x s ↦ (e x).symm '' s)
+      (fun x s ↦ (IsOpen s ∧ e x x ∈ s ∧ IsConnected s) ∧ s ⊆ (e x).target) _ _
   · intro x
     simpa only [LocalHomeomorph.symm_map_nhds_eq, mem_chart_source] using
-      ((LocallyConnectedSpace.open_connected_basis (E x x)).restrict_subset
-        ((E x).open_target.mem_nhds (mem_chart_target H x))).map (E x).symm
+      ((LocallyConnectedSpace.open_connected_basis (e x x)).restrict_subset
+        ((e x).open_target.mem_nhds (mem_chart_target H x))).map (e x).symm
   · rintro x s ⟨⟨-, -, hsconn⟩, hssubset⟩
-    exact hsconn.isPreconnected.image _ ((E x).continuousOn_symm.mono hssubset)
+    exact hsconn.isPreconnected.image _ ((e x).continuousOn_symm.mono hssubset)
 #align charted_space.locally_connected_space ChartedSpace.locallyConnectedSpace
 
 /-- If `M` is modelled on `H'` and `H'` is itself modelled on `H`, then we can consider `M` as being
@@ -618,10 +631,10 @@ modelled on `H`. -/
 def ChartedSpace.comp (H : Type _) [TopologicalSpace H] (H' : Type _) [TopologicalSpace H']
     (M : Type _) [TopologicalSpace M] [ChartedSpace H H'] [ChartedSpace H' M] :
     ChartedSpace H M where
-  atlas := image2 LocalHomeomorph.trans (atlas (H := H')) atlas
-  chartAt := fun p : M ↦ (chartAt p).trans (chartAt (chartAt p p))
+  atlas := image2 LocalHomeomorph.trans (atlas H' M) (atlas H H')
+  chartAt p := (chartAt H' p).trans (chartAt H (chartAt H' p p))
   mem_chart_source p := by simp only [mfld_simps]
-  chart_mem_atlas p := ⟨chartAt p, chartAt _, chart_mem_atlas p, chart_mem_atlas _, rfl⟩
+  chart_mem_atlas p := ⟨chartAt _ p, chartAt _ _, chart_mem_atlas _ p, chart_mem_atlas _ _, rfl⟩
 #align charted_space.comp ChartedSpace.comp
 
 end
@@ -696,10 +709,10 @@ construction of the atlas of product maps. -/
 instance prodChartedSpace (H : Type _) [TopologicalSpace H] (M : Type _) [TopologicalSpace M]
     [ChartedSpace H M] (H' : Type _) [TopologicalSpace H'] (M' : Type _) [TopologicalSpace M']
     [ChartedSpace H' M'] : ChartedSpace (ModelProd H H') (M × M') where
-  atlas := image2 LocalHomeomorph.prod atlas atlas
-  chartAt x := (chartAt x.1).prod (chartAt x.2)
-  mem_chart_source x := ⟨mem_chart_source x.1, mem_chart_source x.2⟩
-  chart_mem_atlas x := mem_image2_of_mem (chart_mem_atlas x.1) (chart_mem_atlas x.2)
+  atlas := image2 LocalHomeomorph.prod (atlas H M) (atlas H' M')
+  chartAt x := (chartAt H x.1).prod (chartAt H' x.2)
+  mem_chart_source x := ⟨mem_chart_source H x.1, mem_chart_source H' x.2⟩
+  chart_mem_atlas x := mem_image2_of_mem (chart_mem_atlas H x.1) (chart_mem_atlas H' x.2)
 #align prod_charted_space prodChartedSpace
 
 section prodChartedSpace
@@ -709,13 +722,13 @@ variable [TopologicalSpace H] [TopologicalSpace M] [ChartedSpace H M] [Topologic
 
 @[simp, mfld_simps]
 theorem prodChartedSpace_chartAt :
-    chartAt (H := ModelProd H H') x = (chartAt x.fst).prod (chartAt x.snd) :=
+    chartAt (ModelProd H H') x = (chartAt H x.fst).prod (chartAt H' x.snd) :=
   rfl
 #align prod_charted_space_chart_at prodChartedSpace_chartAt
 
 theorem chartedSpaceSelf_prod : prodChartedSpace H H H' H' = chartedSpaceSelf (H × H') := by
   ext1
-  · simp [prodChartedSpace, atlas]
+  · simp [prodChartedSpace, atlas, ChartedSpace.atlas]
   · ext1
     simp only [prodChartedSpace_chartAt, chartAt_self_eq, refl_prod_refl]
     rfl
@@ -728,17 +741,17 @@ canonical construction of the atlas of finite product maps. -/
 instance piChartedSpace {ι : Type _} [Fintype ι] (H : ι → Type _) [∀ i, TopologicalSpace (H i)]
     (M : ι → Type _) [∀ i, TopologicalSpace (M i)] [∀ i, ChartedSpace (H i) (M i)] :
     ChartedSpace (ModelPi H) (∀ i, M i) where
-  atlas := LocalHomeomorph.pi '' Set.pi univ fun _ ↦ atlas
-  chartAt f := LocalHomeomorph.pi fun i ↦ chartAt (f i)
-  mem_chart_source f i _ := mem_chart_source (f i)
-  chart_mem_atlas f := mem_image_of_mem _ fun i _ ↦ chart_mem_atlas (f i)
+  atlas := LocalHomeomorph.pi '' Set.pi univ fun _ ↦ atlas (H _) (M _)
+  chartAt f := LocalHomeomorph.pi fun i ↦ chartAt (H i) (f i)
+  mem_chart_source f i _ := mem_chart_source (H i) (f i)
+  chart_mem_atlas f := mem_image_of_mem _ fun i _ ↦ chart_mem_atlas (H i) (f i)
 #align pi_charted_space piChartedSpace
 
 @[simp, mfld_simps]
 theorem piChartedSpace_chartAt {ι : Type _} [Fintype ι] (H : ι → Type _)
     [∀ i, TopologicalSpace (H i)] (M : ι → Type _) [∀ i, TopologicalSpace (M i)]
     [∀ i, ChartedSpace (H i) (M i)] (f : ∀ i, M i) :
-    chartAt (H := ModelPi H) f = LocalHomeomorph.pi fun i ↦ chartAt (f i) :=
+    chartAt (H := ModelPi H) f = LocalHomeomorph.pi fun i ↦ chartAt (H i) (f i) :=
   rfl
 #align pi_charted_space_chart_at piChartedSpace_chartAt
 
@@ -847,7 +860,7 @@ variable [TopologicalSpace H] [TopologicalSpace M] [ChartedSpace H M]
 groupoid. -/
 class HasGroupoid {H : Type _} [TopologicalSpace H] (M : Type _) [TopologicalSpace M]
     [ChartedSpace H M] (G : StructureGroupoid H) : Prop where
-  compatible : ∀ {e e' : LocalHomeomorph M H}, e ∈ atlas → e' ∈ atlas → e.symm ≫ₕ e' ∈ G
+  compatible : ∀ {e e' : LocalHomeomorph M H}, e ∈ atlas H M → e' ∈ atlas H M → e.symm ≫ₕ e' ∈ G
 #align has_groupoid HasGroupoid
 
 /-- Reformulate in the `StructureGroupoid` namespace the compatibility condition of charts in a
@@ -855,7 +868,7 @@ charted space admitting a structure groupoid, to make it more easily accessible
 notation. -/
 theorem StructureGroupoid.compatible {H : Type _} [TopologicalSpace H] (G : StructureGroupoid H)
     {M : Type _} [TopologicalSpace M] [ChartedSpace H M] [HasGroupoid M G]
-    {e e' : LocalHomeomorph M H} (he : e ∈ atlas) (he' : e' ∈ atlas) : e.symm ≫ₕ e' ∈ G :=
+    {e e' : LocalHomeomorph M H} (he : e ∈ atlas H M) (he' : e' ∈ atlas H M) : e.symm ≫ₕ e' ∈ G :=
   HasGroupoid.compatible he he'
 #align structure_groupoid.compatible StructureGroupoid.compatible
 
@@ -865,7 +878,7 @@ theorem hasGroupoid_of_le {G₁ G₂ : StructureGroupoid H} (h : HasGroupoid M G
 #align has_groupoid_of_le hasGroupoid_of_le
 
 theorem hasGroupoid_of_pregroupoid (PG : Pregroupoid H) (h : ∀ {e e' : LocalHomeomorph M H},
-      e ∈ atlas → e' ∈ atlas → PG.property (e.symm ≫ₕ e') (e.symm ≫ₕ e').source) :
+      e ∈ atlas H M → e' ∈ atlas H M → PG.property (e.symm ≫ₕ e') (e.symm ≫ₕ e').source) :
     HasGroupoid M PG.groupoid :=
   ⟨fun he he' ↦ mem_groupoid_of_pregroupoid.mpr ⟨h he he', h he' he⟩⟩
 #align has_groupoid_of_pregroupoid hasGroupoid_of_pregroupoid
@@ -874,8 +887,6 @@ theorem hasGroupoid_of_pregroupoid (PG : Pregroupoid H) (h : ∀ {e e' : LocalHo
 instance hasGroupoid_model_space (H : Type _) [TopologicalSpace H] (G : StructureGroupoid H) :
     HasGroupoid H G where
   compatible {e e'} he he' := by
-    replace he : e ∈ atlas := he
-    replace he' : e' ∈ atlas := he'
     rw [chartedSpaceSelf_atlas] at he he'
     simp [he, he', StructureGroupoid.id_mem]
 #align has_groupoid_model_space hasGroupoid_model_space
@@ -895,25 +906,25 @@ variable (M) (G : StructureGroupoid H)
 structure groupoid is the set of all local charts that are compatible with the atlas, i.e., such
 that changing coordinates with an atlas member gives an element of the groupoid. -/
 def StructureGroupoid.maximalAtlas : Set (LocalHomeomorph M H) :=
-  { e | ∀ e' ∈ atlas, e.symm ≫ₕ e' ∈ G ∧ e'.symm ≫ₕ e ∈ G }
+  { e | ∀ e' ∈ atlas H M, e.symm ≫ₕ e' ∈ G ∧ e'.symm ≫ₕ e ∈ G }
 #align structure_groupoid.maximal_atlas StructureGroupoid.maximalAtlas
 
 variable {M}
 
 /-- The elements of the atlas belong to the maximal atlas for any structure groupoid. -/
-theorem StructureGroupoid.subset_maximalAtlas [HasGroupoid M G] : atlas ⊆ G.maximalAtlas M :=
+theorem StructureGroupoid.subset_maximalAtlas [HasGroupoid M G] : atlas H M ⊆ G.maximalAtlas M :=
   fun _ he _ he' ↦ ⟨G.compatible he he', G.compatible he' he⟩
 #align structure_groupoid.subset_maximal_atlas StructureGroupoid.subset_maximalAtlas
 
 theorem StructureGroupoid.chart_mem_maximalAtlas [HasGroupoid M G] (x : M) :
-    chartAt x ∈ G.maximalAtlas M :=
-  G.subset_maximalAtlas (chart_mem_atlas x)
+    chartAt H x ∈ G.maximalAtlas M :=
+  G.subset_maximalAtlas (chart_mem_atlas H x)
 #align structure_groupoid.chart_mem_maximal_atlas StructureGroupoid.chart_mem_maximalAtlas
 
 variable {G}
 
 theorem mem_maximalAtlas_iff {e : LocalHomeomorph M H} :
-    e ∈ G.maximalAtlas M ↔ ∀ e' ∈ atlas, e.symm ≫ₕ e' ∈ G ∧ e'.symm ≫ₕ e ∈ G :=
+    e ∈ G.maximalAtlas M ↔ ∀ e' ∈ atlas H M, e.symm ≫ₕ e' ∈ G ∧ e'.symm ≫ₕ e ∈ G :=
   Iff.rfl
 #align mem_maximal_atlas_iff mem_maximalAtlas_iff
 
@@ -930,8 +941,8 @@ theorem StructureGroupoid.compatible_of_mem_maximalAtlas {e e' : LocalHomeomorph
     simp only [mem_inter_iff, mem_preimage, mem_chart_source, and_true]
     exact ((mem_inter_iff _ _ _).1 hx).1
   refine' ⟨s, hs, xs, _⟩
-  have A : e.symm ≫ₕ f ∈ G := (mem_maximalAtlas_iff.1 he f (chart_mem_atlas _)).1
-  have B : f.symm ≫ₕ e' ∈ G := (mem_maximalAtlas_iff.1 he' f (chart_mem_atlas _)).2
+  have A : e.symm ≫ₕ f ∈ G := (mem_maximalAtlas_iff.1 he f (chart_mem_atlas _ _)).1
+  have B : f.symm ≫ₕ e' ∈ G := (mem_maximalAtlas_iff.1 he' f (chart_mem_atlas _ _)).2
   have C : (e.symm ≫ₕ f) ≫ₕ f.symm ≫ₕ e' ∈ G := G.trans A B
   have D : (e.symm ≫ₕ f) ≫ₕ f.symm ≫ₕ e' ≈ (e.symm ≫ₕ e').restr s := calc
     (e.symm ≫ₕ f) ≫ₕ f.symm ≫ₕ e' = e.symm ≫ₕ (f ≫ₕ f.symm) ≫ₕ e' := by simp only [trans_assoc]
@@ -1044,17 +1055,18 @@ variable (G : StructureGroupoid H) [HasGroupoid M G]
 variable (s : Opens M)
 
 /-- An open subset of a charted space is naturally a charted space. -/
-instance : ChartedSpace H s where
-  atlas := ⋃ x : s, {@LocalHomeomorph.subtypeRestr _ _ _ _ (chartAt x.1) s ⟨x⟩}
-  chartAt x := @LocalHomeomorph.subtypeRestr _ _ _ _ (chartAt x.1) s ⟨x⟩
-  mem_chart_source x := ⟨trivial, mem_chart_source x.1⟩
+protected instance instChartedSpace : ChartedSpace H s where
+  atlas := ⋃ x : s, {@LocalHomeomorph.subtypeRestr _ _ _ _ (chartAt H x.1) s ⟨x⟩}
+  chartAt x := @LocalHomeomorph.subtypeRestr _ _ _ _ (chartAt H x.1) s ⟨x⟩
+  mem_chart_source x := ⟨trivial, mem_chart_source H x.1⟩
   chart_mem_atlas x := by
     simp only [mem_iUnion, mem_singleton_iff]
     use x
+#align topological_space.opens.charted_space TopologicalSpace.Opens.instChartedSpace
 
 /-- If a groupoid `G` is `ClosedUnderRestriction`, then an open subset of a space which is
 `HasGroupoid G` is naturally `HasGroupoid G`. -/
-instance [ClosedUnderRestriction G] : HasGroupoid s G where
+protected instance instHasGroupoid [ClosedUnderRestriction G] : HasGroupoid s G where
   compatible := by
     rintro e e' ⟨_, ⟨x, hc⟩, he⟩ ⟨_, ⟨x', hc'⟩, he'⟩
     haveI : Nonempty s := ⟨x⟩
@@ -1062,24 +1074,24 @@ instance [ClosedUnderRestriction G] : HasGroupoid s G where
     rw [hc.symm, mem_singleton_iff] at he
     rw [hc'.symm, mem_singleton_iff] at he'
     rw [he, he']
-    refine' G.eq_on_source _ (subtypeRestr_symm_trans_subtypeRestr s (chartAt x) (chartAt x'))
+    refine' G.eq_on_source _ (subtypeRestr_symm_trans_subtypeRestr s (chartAt H x) (chartAt H x'))
     apply closedUnderRestriction'
-    · exact G.compatible (chart_mem_atlas _) (chart_mem_atlas _)
-    · exact preimage_open_of_open_symm (chartAt _) s.2
+    · exact G.compatible (chart_mem_atlas _ _) (chart_mem_atlas _ _)
+    · exact preimage_open_of_open_symm (chartAt _ _) s.2
+#align topological_space.opens.has_groupoid TopologicalSpace.Opens.instHasGroupoid
 
 end TopologicalSpace.Opens
 
 /-! ### Structomorphisms -/
 
-
 /-- A `G`-diffeomorphism between two charted spaces is a homeomorphism which, when read in the
 charts, belongs to `G`. We avoid the word diffeomorph as it is too related to the smooth category,
 and use structomorph instead. -/
 -- @[nolint has_nonempty_instance]  -- Porting note: commented out
 structure Structomorph (G : StructureGroupoid H) (M : Type _) (M' : Type _) [TopologicalSpace M]
   [TopologicalSpace M'] [ChartedSpace H M] [ChartedSpace H M'] extends Homeomorph M M' where
-  mem_groupoid : ∀ c : LocalHomeomorph M H, ∀ c' : LocalHomeomorph M' H, c ∈ atlas → c' ∈ atlas →
-    c.symm ≫ₕ toHomeomorph.toLocalHomeomorph ≫ₕ c' ∈ G
+  mem_groupoid : ∀ c : LocalHomeomorph M H, ∀ c' : LocalHomeomorph M' H, c ∈ atlas H M →
+    c' ∈ atlas H M' → c.symm ≫ₕ toHomeomorph.toLocalHomeomorph ≫ₕ c' ∈ G
 #align structomorph Structomorph
 
 variable [TopologicalSpace M'] [TopologicalSpace M''] {G : StructureGroupoid H} [ChartedSpace H M']
@@ -1092,7 +1104,7 @@ def Structomorph.refl (M : Type _) [TopologicalSpace M] [ChartedSpace H M] [HasG
     mem_groupoid := fun c c' hc hc' ↦ by
       change LocalHomeomorph.symm c ≫ₕ LocalHomeomorph.refl M ≫ₕ c' ∈ G
       rw [LocalHomeomorph.refl_trans]
-      exact HasGroupoid.compatible hc hc' }
+      exact G.compatible hc hc' }
 #align structomorph.refl Structomorph.refl
 
 /-- The inverse of a structomorphism is a structomorphism. -/
style: allow _ for an argument in notation3 & replace _foo with _ in notation3 (#4652)
Diff
@@ -566,7 +566,7 @@ theorem mem_achart_source (x : M) : x ∈ (achart H x).1.source :=
 open TopologicalSpace
 
 theorem ChartedSpace.secondCountable_of_countable_cover [SecondCountableTopology H] {s : Set M}
-    (hs : (⋃ (x) (_hx : x ∈ s), (chartAt (H := H) x).source) = univ) (hsc : s.Countable) :
+    (hs : (⋃ (x) (_ : x ∈ s), (chartAt (H := H) x).source) = univ) (hsc : s.Countable) :
     SecondCountableTopology M := by
   haveI : ∀ x : M, SecondCountableTopology (chartAt x).source :=
     fun x ↦ (chartAt (H := H) x).secondCountableTopology_source
@@ -769,7 +769,7 @@ variable [TopologicalSpace H] (c : ChartedSpaceCore H M) {e : LocalEquiv M H}
 /-- Topology generated by a set of charts on a Type. -/
 protected def toTopologicalSpace : TopologicalSpace M :=
   TopologicalSpace.generateFrom <|
-    ⋃ (e : LocalEquiv M H) (_he : e ∈ c.atlas) (s : Set H) (_s_open : IsOpen s),
+    ⋃ (e : LocalEquiv M H) (_ : e ∈ c.atlas) (s : Set H) (_ : IsOpen s),
       {e ⁻¹' s ∩ e.source}
 #align charted_space_core.to_topological_space ChartedSpaceCore.toTopologicalSpace
 
chore: reenable eta, bump to nightly 2023-05-16 (#3414)

Now that leanprover/lean4#2210 has been merged, this PR:

  • removes all the set_option synthInstance.etaExperiment true commands (and some etaExperiment% term elaborators)
  • removes many but not quite all set_option maxHeartbeats commands
  • makes various other changes required to cope with leanprover/lean4#2210.

Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Matthew Ballard <matt@mrb.email>

Diff
@@ -302,14 +302,6 @@ structure Pregroupoid (H : Type _) [TopologicalSpace H] where
   congr : ∀ {f g : H → H} {u}, IsOpen u → (∀ x ∈ u, g x = f x) → property f u → property g u
 #align pregroupoid Pregroupoid
 
--- Porting note:
--- simplify fails on left-hand side:
--- failed to synthesize
---   Subsingleton ((H → H) → Set H → Prop)
--- (deterministic) timeout at 'typeclass', maximum number of heartbeats (20000) has been reached
---  (use 'set_option synthInstance.maxHeartbeats <num>' to set the limit)
-attribute [nolint simpNF] Pregroupoid.mk.injEq
-
 /-- Construct a groupoid of local homeos for which the map and its inverse have some property,
 from a pregroupoid asserting that this property is stable under composition. -/
 def Pregroupoid.groupoid (PG : Pregroupoid H) : StructureGroupoid H where
chore: Rename to sSup/iSup (#3938)

As discussed on Zulip

Renames

  • supₛsSup
  • infₛsInf
  • supᵢiSup
  • infᵢiInf
  • bsupₛbsSup
  • binfₛbsInf
  • bsupᵢbiSup
  • binfᵢbiInf
  • csupₛcsSup
  • cinfₛcsInf
  • csupᵢciSup
  • cinfᵢciInf
  • unionₛsUnion
  • interₛsInter
  • unionᵢiUnion
  • interᵢiInter
  • bunionₛbsUnion
  • binterₛbsInter
  • bunionᵢbiUnion
  • binterᵢbiInter

Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>

Diff
@@ -579,7 +579,7 @@ theorem ChartedSpace.secondCountable_of_countable_cover [SecondCountableTopology
   haveI : ∀ x : M, SecondCountableTopology (chartAt x).source :=
     fun x ↦ (chartAt (H := H) x).secondCountableTopology_source
   haveI := hsc.toEncodable
-  rw [bunionᵢ_eq_unionᵢ] at hs
+  rw [biUnion_eq_iUnion] at hs
   exact secondCountableTopology_of_countable_cover (fun x : s ↦ (chartAt (x : M)).open_source) hs
 #align charted_space.second_countable_of_countable_cover ChartedSpace.secondCountable_of_countable_cover
 
@@ -783,7 +783,7 @@ protected def toTopologicalSpace : TopologicalSpace M :=
 
 theorem open_source' (he : e ∈ c.atlas) : IsOpen[c.toTopologicalSpace] e.source := by
   apply TopologicalSpace.GenerateOpen.basic
-  simp only [exists_prop, mem_unionᵢ, mem_singleton_iff]
+  simp only [exists_prop, mem_iUnion, mem_singleton_iff]
   refine' ⟨e, he, univ, isOpen_univ, _⟩
   simp only [Set.univ_inter, Set.preimage_univ]
 #align charted_space_core.open_source' ChartedSpaceCore.open_source'
@@ -809,13 +809,13 @@ protected def localHomeomorph (e : LocalEquiv M H) (he : e ∈ c.atlas) :
       intro s s_open
       rw [inter_comm]
       apply TopologicalSpace.GenerateOpen.basic
-      simp only [exists_prop, mem_unionᵢ, mem_singleton_iff]
+      simp only [exists_prop, mem_iUnion, mem_singleton_iff]
       exact ⟨e, he, ⟨s, s_open, rfl⟩⟩
     continuous_invFun := by
       letI : TopologicalSpace M := c.toTopologicalSpace
       apply continuousOn_open_of_generateFrom
       intro t ht
-      simp only [exists_prop, mem_unionᵢ, mem_singleton_iff] at ht
+      simp only [exists_prop, mem_iUnion, mem_singleton_iff] at ht
       rcases ht with ⟨e', e'_atlas, s, s_open, ts⟩
       rw [ts]
       let f := e.symm.trans e'
@@ -838,7 +838,7 @@ def toChartedSpace : @ChartedSpace H _ M c.toTopologicalSpace :=
     chartAt := fun x ↦ c.localHomeomorph (c.chartAt x) (c.chart_mem_atlas x)
     mem_chart_source := fun x ↦ c.mem_chart_source x
     chart_mem_atlas := fun x ↦ by
-      simp only [mem_unionᵢ, mem_singleton_iff]
+      simp only [mem_iUnion, mem_singleton_iff]
       exact ⟨c.chartAt x, c.chart_mem_atlas x, rfl⟩}
 #align charted_space_core.to_charted_space ChartedSpaceCore.toChartedSpace
 
@@ -1057,7 +1057,7 @@ instance : ChartedSpace H s where
   chartAt x := @LocalHomeomorph.subtypeRestr _ _ _ _ (chartAt x.1) s ⟨x⟩
   mem_chart_source x := ⟨trivial, mem_chart_source x.1⟩
   chart_mem_atlas x := by
-    simp only [mem_unionᵢ, mem_singleton_iff]
+    simp only [mem_iUnion, mem_singleton_iff]
     use x
 
 /-- If a groupoid `G` is `ClosedUnderRestriction`, then an open subset of a space which is
chore: tidy various files (#3606)
Diff
@@ -115,9 +115,7 @@ composition of local equivs with `≫`.
 
 noncomputable section
 
-open Classical Topology
-
-open Filter
+open Classical Topology Filter
 
 universe u
 
@@ -402,10 +400,10 @@ class ClosedUnderRestriction (G : StructureGroupoid H) : Prop where
     ∀ {e : LocalHomeomorph H H}, e ∈ G → ∀ s : Set H, IsOpen s → e.restr s ∈ G
 #align closed_under_restriction ClosedUnderRestriction
 
-theorem closed_under_restriction' {G : StructureGroupoid H} [ClosedUnderRestriction G]
+theorem closedUnderRestriction' {G : StructureGroupoid H} [ClosedUnderRestriction G]
     {e : LocalHomeomorph H H} (he : e ∈ G) {s : Set H} (hs : IsOpen s) : e.restr s ∈ G :=
   ClosedUnderRestriction.closedUnderRestriction he s hs
-#align closed_under_restriction' closed_under_restriction'
+#align closed_under_restriction' closedUnderRestriction'
 
 /-- The trivial restriction-closed groupoid, containing only local homeomorphisms equivalent to the
 restriction of the identity to the various open subsets. -/
@@ -460,7 +458,7 @@ theorem closedUnderRestriction_iff_id_le (G : StructureGroupoid H) :
     apply StructureGroupoid.le_iff.mpr
     rintro e ⟨s, hs, hes⟩
     refine' G.eq_on_source _ hes
-    convert closed_under_restriction' G.id_mem hs
+    convert closedUnderRestriction' G.id_mem hs
     -- Porting note: was
     -- change s = _ ∩ _
     -- rw [hs.interior_eq]
@@ -1073,7 +1071,7 @@ instance [ClosedUnderRestriction G] : HasGroupoid s G where
     rw [hc'.symm, mem_singleton_iff] at he'
     rw [he, he']
     refine' G.eq_on_source _ (subtypeRestr_symm_trans_subtypeRestr s (chartAt x) (chartAt x'))
-    apply closed_under_restriction'
+    apply closedUnderRestriction'
     · exact G.compatible (chart_mem_atlas _) (chart_mem_atlas _)
     · exact preimage_open_of_open_symm (chartAt _) s.2
 
feat: port pi_fin.reflect instance (#3430)

This was skipped during the initial port of this file.

There are some golfing discussions here on Zulip that we could revisit later

Co-authored-by: Gabriel Ebner <gebner@gebner.org>

Diff
@@ -947,9 +947,9 @@ theorem StructureGroupoid.compatible_of_mem_maximalAtlas {e e' : LocalHomeomorph
     (e.symm ≫ₕ f) ≫ₕ f.symm ≫ₕ e' = e.symm ≫ₕ (f ≫ₕ f.symm) ≫ₕ e' := by simp only [trans_assoc]
     _ ≈ e.symm ≫ₕ ofSet f.source f.open_source ≫ₕ e' :=
       EqOnSource.trans' (refl _) (EqOnSource.trans' (trans_self_symm _) (refl _))
-    _ ≈ (e.symm ≫ₕ ofSet f.source f.open_source) ≫ₕ e' := by rw [trans_assoc]; apply refl
+    _ ≈ (e.symm ≫ₕ ofSet f.source f.open_source) ≫ₕ e' := by rw [trans_assoc]
     _ ≈ e.symm.restr s ≫ₕ e' := by rw [trans_of_set']; apply refl
-    _ ≈ (e.symm ≫ₕ e').restr s := by rw [restr_trans]; apply refl
+    _ ≈ (e.symm ≫ₕ e').restr s := by rw [restr_trans]
   exact G.eq_on_source C (Setoid.symm D)
 #align structure_groupoid.compatible_of_mem_maximal_atlas StructureGroupoid.compatible_of_mem_maximalAtlas
 
@@ -1156,8 +1156,8 @@ def Structomorph.trans (e : Structomorph G M M') (e' : Structomorph G M' M'') :
             (EqOnSource.trans' (trans_self_symm g) (_root_.refl _)))
         _ ≈ ((c.symm ≫ₕ f₁) ≫ₕ ofSet g.source g.open_source) ≫ₕ f₂ ≫ₕ c' :=
           by simp only [trans_assoc, _root_.refl]
-        _ ≈ (c.symm ≫ₕ f₁).restr s ≫ₕ f₂ ≫ₕ c' := by rw [trans_of_set']; apply _root_.refl
-        _ ≈ ((c.symm ≫ₕ f₁) ≫ₕ f₂ ≫ₕ c').restr s := by rw [restr_trans]; apply _root_.refl
+        _ ≈ (c.symm ≫ₕ f₁).restr s ≫ₕ f₂ ≫ₕ c' := by rw [trans_of_set']
+        _ ≈ ((c.symm ≫ₕ f₁) ≫ₕ f₂ ≫ₕ c').restr s := by rw [restr_trans]
         _ ≈ (c.symm ≫ₕ (f₁ ≫ₕ f₂) ≫ₕ c').restr s :=
           by simp only [EqOnSource.restr, trans_assoc, _root_.refl]
         _ ≈ F₂ := by simp only [feq, _root_.refl]
feat: port Geometry.Manifold.ChartedSpace (#2365)

Co-authored-by: int-y1 <jason_yuen2007@hotmail.com>

Dependencies 8 + 323

324 files ported (97.6%)
142732 lines ported (96.6%)
Show graph

The unported dependencies are