logic.equiv.local_equivMathlib.Logic.Equiv.PartialEquiv

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)

(last sync)

refactor(*): move all mk_simp_attribute commands to 1 file (#19223)
Diff
@@ -68,29 +68,6 @@ then it should use `e.source ∩ s` or `e.target ∩ t`, not `s ∩ e.source` or
 
 -/
 
-mk_simp_attribute mfld_simps "The simpset `mfld_simps` records several simp lemmas that are
-especially useful in manifolds. It is a subset of the whole set of simp lemmas, but it makes it
-possible to have quicker proofs (when used with `squeeze_simp` or `simp only`) while retaining
-readability.
-
-The typical use case is the following, in a file on manifolds:
-If `simp [foo, bar]` is slow, replace it with `squeeze_simp [foo, bar] with mfld_simps` and paste
-its output. The list of lemmas should be reasonable (contrary to the output of
-`squeeze_simp [foo, bar]` which might contain tens of lemmas), and the outcome should be quick
-enough.
-"
-
--- register in the simpset `mfld_simps` several lemmas that are often useful when dealing
--- with manifolds
-attribute [mfld_simps] id.def function.comp.left_id set.mem_set_of_eq set.image_eq_empty
-set.univ_inter set.preimage_univ set.prod_mk_mem_set_prod_eq and_true set.mem_univ
-set.mem_image_of_mem true_and set.mem_inter_iff set.mem_preimage function.comp_app
-set.inter_subset_left set.mem_prod set.range_id set.range_prod_map and_self set.mem_range_self
-eq_self_iff_true forall_const forall_true_iff set.inter_univ set.preimage_id function.comp.right_id
-not_false_iff and_imp set.prod_inter_prod set.univ_prod_univ true_or or_true prod.map_mk
-set.preimage_inter heq_iff_eq equiv.sigma_equiv_prod_apply equiv.sigma_equiv_prod_symm_apply
-subtype.coe_mk equiv.to_fun_as_coe equiv.inv_fun_as_coe
-
 /-- Common `@[simps]` configuration options used for manifold-related declarations. -/
 def mfld_cfg : simps_cfg := {attrs := [`simp, `mfld_simps], fully_applied := ff}
 

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(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
@@ -526,7 +526,7 @@ theorem symm_eq_on_of_inter_eq_of_eqOn {e' : PartialEquiv α β} (h : e.IsImage
   by
   rw [← h.image_eq]
   rintro y ⟨x, hx, rfl⟩
-  have hx' := hx; rw [hs] at hx' 
+  have hx' := hx; rw [hs] at hx'
   rw [e.left_inv hx.1, Heq hx, e'.left_inv hx'.1]
 #align local_equiv.is_image.symm_eq_on_of_inter_eq_of_eq_on PartialEquiv.IsImage.symm_eq_on_of_inter_eq_of_eqOn
 -/
@@ -646,7 +646,7 @@ protected theorem ext {e e' : PartialEquiv α β} (h : ∀ x, e x = e' x)
   have B : (e.symm : β → α) = e'.symm := by ext x; exact hsymm x
   have I : e '' e.source = e.target := e.image_source_eq_target
   have I' : e' '' e'.source = e'.target := e'.image_source_eq_target
-  rw [A, hs, I'] at I 
+  rw [A, hs, I'] at I
   cases e <;> cases e'
   simp_all
 #align local_equiv.ext PartialEquiv.ext
@@ -1049,7 +1049,7 @@ theorem EqOnSource.trans' {e e' : PartialEquiv α β} {f f' : PartialEquiv β γ
   · rw [trans_source'', trans_source'', ← he.target_eq, ← hf.1]
     exact (he.symm'.eq_on.mono <| inter_subset_left _ _).image_eq
   · intro x hx
-    rw [trans_source] at hx 
+    rw [trans_source] at hx
     simp [(he.2 hx.1).symm, hf.2 hx.2]
 #align local_equiv.eq_on_source.trans' PartialEquiv.EqOnSource.trans'
 -/
@@ -1061,7 +1061,7 @@ theorem EqOnSource.restr {e e' : PartialEquiv α β} (he : e ≈ e') (s : Set α
   constructor
   · simp [he.1]
   · intro x hx
-    simp only [mem_inter_iff, restr_source] at hx 
+    simp only [mem_inter_iff, restr_source] at hx
     exact he.2 hx.1
 #align local_equiv.eq_on_source.restr PartialEquiv.EqOnSource.restr
 -/
@@ -1079,7 +1079,7 @@ theorem trans_self_symm : e.trans e.symm ≈ PartialEquiv.ofSet e.source :=
   by
   have A : (e.trans e.symm).source = e.source := by mfld_set_tac
   refine' ⟨by simp [A], fun x hx => _⟩
-  rw [A] at hx 
+  rw [A] at hx
   simp only [hx, mfld_simps]
 #align local_equiv.trans_self_symm PartialEquiv.trans_self_symm
 
@@ -1116,10 +1116,10 @@ def prod (e : PartialEquiv α β) (e' : PartialEquiv γ δ) : PartialEquiv (α 
   target := e.target ×ˢ e'.target
   toFun p := (e p.1, e' p.2)
   invFun p := (e.symm p.1, e'.symm p.2)
-  map_source' p hp := by simp at hp ; simp [hp]
-  map_target' p hp := by simp at hp ; simp [map_target, hp]
-  left_inv' p hp := by simp at hp ; simp [hp]
-  right_inv' p hp := by simp at hp ; simp [hp]
+  map_source' p hp := by simp at hp; simp [hp]
+  map_target' p hp := by simp at hp; simp [map_target, hp]
+  left_inv' p hp := by simp at hp; simp [hp]
+  right_inv' p hp := by simp at hp; simp [hp]
 #align local_equiv.prod PartialEquiv.prod
 -/
 
Diff
@@ -1073,7 +1073,6 @@ theorem EqOnSource.source_inter_preimage_eq {e e' : PartialEquiv α β} (he : e
 #align local_equiv.eq_on_source.source_inter_preimage_eq PartialEquiv.EqOnSource.source_inter_preimage_eq
 -/
 
-#print PartialEquiv.trans_self_symm /-
 /-- Composition of a local equiv and its inverse is equivalent to the restriction of the identity
 to the source -/
 theorem trans_self_symm : e.trans e.symm ≈ PartialEquiv.ofSet e.source :=
@@ -1083,15 +1082,12 @@ theorem trans_self_symm : e.trans e.symm ≈ PartialEquiv.ofSet e.source :=
   rw [A] at hx 
   simp only [hx, mfld_simps]
 #align local_equiv.trans_self_symm PartialEquiv.trans_self_symm
--/
 
-#print PartialEquiv.trans_symm_self /-
 /-- Composition of the inverse of a local equiv and this local equiv is equivalent to the
 restriction of the identity to the target -/
 theorem trans_symm_self : e.symm.trans e ≈ PartialEquiv.ofSet e.target :=
   trans_self_symm e.symm
 #align local_equiv.trans_symm_self PartialEquiv.trans_symm_self
--/
 
 #print PartialEquiv.eq_of_eqOnSource_univ /-
 /-- Two equivalent local equivs are equal when the source and target are univ -/
Diff
@@ -109,12 +109,12 @@ open Function Set
 
 variable {α : Type _} {β : Type _} {γ : Type _} {δ : Type _}
 
-#print LocalEquiv /-
+#print PartialEquiv /-
 /-- Local equivalence between subsets `source` and `target` of α and β respectively. The (global)
 maps `to_fun : α → β` and `inv_fun : β → α` map `source` to `target` and conversely, and are inverse
 to each other there. The values of `to_fun` outside of `source` and of `inv_fun` outside of `target`
 are irrelevant. -/
-structure LocalEquiv (α : Type _) (β : Type _) where
+structure PartialEquiv (α : Type _) (β : Type _) where
   toFun : α → β
   invFun : β → α
   source : Set α
@@ -123,20 +123,20 @@ structure LocalEquiv (α : Type _) (β : Type _) where
   map_target' : ∀ ⦃x⦄, x ∈ target → inv_fun x ∈ source
   left_inv' : ∀ ⦃x⦄, x ∈ source → inv_fun (to_fun x) = x
   right_inv' : ∀ ⦃x⦄, x ∈ target → to_fun (inv_fun x) = x
-#align local_equiv LocalEquiv
+#align local_equiv PartialEquiv
 -/
 
-namespace LocalEquiv
+namespace PartialEquiv
 
-variable (e : LocalEquiv α β) (e' : LocalEquiv β γ)
+variable (e : PartialEquiv α β) (e' : PartialEquiv β γ)
 
-instance [Inhabited α] [Inhabited β] : Inhabited (LocalEquiv α β) :=
+instance [Inhabited α] [Inhabited β] : Inhabited (PartialEquiv α β) :=
   ⟨⟨const α default, const β default, ∅, ∅, mapsTo_empty _ _, mapsTo_empty _ _, eqOn_empty _ _,
       eqOn_empty _ _⟩⟩
 
-#print LocalEquiv.symm /-
+#print PartialEquiv.symm /-
 /-- The inverse of a local equiv -/
-protected def symm : LocalEquiv β α where
+protected def symm : PartialEquiv β α where
   toFun := e.invFun
   invFun := e.toFun
   source := e.target
@@ -145,130 +145,131 @@ protected def symm : LocalEquiv β α where
   map_target' := e.map_source'
   left_inv' := e.right_inv'
   right_inv' := e.left_inv'
-#align local_equiv.symm LocalEquiv.symm
+#align local_equiv.symm PartialEquiv.symm
 -/
 
-instance : CoeFun (LocalEquiv α β) fun _ => α → β :=
-  ⟨LocalEquiv.toFun⟩
+instance : CoeFun (PartialEquiv α β) fun _ => α → β :=
+  ⟨PartialEquiv.toFun⟩
 
-#print LocalEquiv.Simps.symm_apply /-
+#print PartialEquiv.Simps.symm_apply /-
 /-- See Note [custom simps projection] -/
-def Simps.symm_apply (e : LocalEquiv α β) : β → α :=
+def Simps.symm_apply (e : PartialEquiv α β) : β → α :=
   e.symm
-#align local_equiv.simps.symm_apply LocalEquiv.Simps.symm_apply
+#align local_equiv.simps.symm_apply PartialEquiv.Simps.symm_apply
 -/
 
-initialize_simps_projections LocalEquiv (toFun → apply, invFun → symm_apply)
+initialize_simps_projections PartialEquiv (toFun → apply, invFun → symm_apply)
 
 @[simp, mfld_simps]
-theorem coe_mk (f : α → β) (g s t ml mr il ir) : (LocalEquiv.mk f g s t ml mr il ir : α → β) = f :=
+theorem coe_mk (f : α → β) (g s t ml mr il ir) :
+    (PartialEquiv.mk f g s t ml mr il ir : α → β) = f :=
   rfl
-#align local_equiv.coe_mk LocalEquiv.coe_mk
+#align local_equiv.coe_mk PartialEquiv.coe_mk
 
-#print LocalEquiv.coe_symm_mk /-
+#print PartialEquiv.coe_symm_mk /-
 @[simp, mfld_simps]
 theorem coe_symm_mk (f : α → β) (g s t ml mr il ir) :
-    ((LocalEquiv.mk f g s t ml mr il ir).symm : β → α) = g :=
+    ((PartialEquiv.mk f g s t ml mr il ir).symm : β → α) = g :=
   rfl
-#align local_equiv.coe_symm_mk LocalEquiv.coe_symm_mk
+#align local_equiv.coe_symm_mk PartialEquiv.coe_symm_mk
 -/
 
 @[simp, mfld_simps]
 theorem toFun_as_coe : e.toFun = e :=
   rfl
-#align local_equiv.to_fun_as_coe LocalEquiv.toFun_as_coe
+#align local_equiv.to_fun_as_coe PartialEquiv.toFun_as_coe
 
-#print LocalEquiv.invFun_as_coe /-
+#print PartialEquiv.invFun_as_coe /-
 @[simp, mfld_simps]
 theorem invFun_as_coe : e.invFun = e.symm :=
   rfl
-#align local_equiv.inv_fun_as_coe LocalEquiv.invFun_as_coe
+#align local_equiv.inv_fun_as_coe PartialEquiv.invFun_as_coe
 -/
 
-#print LocalEquiv.map_source /-
+#print PartialEquiv.map_source /-
 @[simp, mfld_simps]
 theorem map_source {x : α} (h : x ∈ e.source) : e x ∈ e.target :=
   e.map_source' h
-#align local_equiv.map_source LocalEquiv.map_source
+#align local_equiv.map_source PartialEquiv.map_source
 -/
 
-#print LocalEquiv.map_target /-
+#print PartialEquiv.map_target /-
 @[simp, mfld_simps]
 theorem map_target {x : β} (h : x ∈ e.target) : e.symm x ∈ e.source :=
   e.map_target' h
-#align local_equiv.map_target LocalEquiv.map_target
+#align local_equiv.map_target PartialEquiv.map_target
 -/
 
-#print LocalEquiv.left_inv /-
+#print PartialEquiv.left_inv /-
 @[simp, mfld_simps]
 theorem left_inv {x : α} (h : x ∈ e.source) : e.symm (e x) = x :=
   e.left_inv' h
-#align local_equiv.left_inv LocalEquiv.left_inv
+#align local_equiv.left_inv PartialEquiv.left_inv
 -/
 
-#print LocalEquiv.right_inv /-
+#print PartialEquiv.right_inv /-
 @[simp, mfld_simps]
 theorem right_inv {x : β} (h : x ∈ e.target) : e (e.symm x) = x :=
   e.right_inv' h
-#align local_equiv.right_inv LocalEquiv.right_inv
+#align local_equiv.right_inv PartialEquiv.right_inv
 -/
 
-#print LocalEquiv.eq_symm_apply /-
+#print PartialEquiv.eq_symm_apply /-
 theorem eq_symm_apply {x : α} {y : β} (hx : x ∈ e.source) (hy : y ∈ e.target) :
     x = e.symm y ↔ e x = y :=
   ⟨fun h => by rw [← e.right_inv hy, h], fun h => by rw [← e.left_inv hx, h]⟩
-#align local_equiv.eq_symm_apply LocalEquiv.eq_symm_apply
+#align local_equiv.eq_symm_apply PartialEquiv.eq_symm_apply
 -/
 
-#print LocalEquiv.mapsTo /-
+#print PartialEquiv.mapsTo /-
 protected theorem mapsTo : MapsTo e e.source e.target := fun x => e.map_source
-#align local_equiv.maps_to LocalEquiv.mapsTo
+#align local_equiv.maps_to PartialEquiv.mapsTo
 -/
 
-#print LocalEquiv.symm_mapsTo /-
+#print PartialEquiv.symm_mapsTo /-
 theorem symm_mapsTo : MapsTo e.symm e.target e.source :=
   e.symm.MapsTo
-#align local_equiv.symm_maps_to LocalEquiv.symm_mapsTo
+#align local_equiv.symm_maps_to PartialEquiv.symm_mapsTo
 -/
 
-#print LocalEquiv.leftInvOn /-
+#print PartialEquiv.leftInvOn /-
 protected theorem leftInvOn : LeftInvOn e.symm e e.source := fun x => e.left_inv
-#align local_equiv.left_inv_on LocalEquiv.leftInvOn
+#align local_equiv.left_inv_on PartialEquiv.leftInvOn
 -/
 
-#print LocalEquiv.rightInvOn /-
+#print PartialEquiv.rightInvOn /-
 protected theorem rightInvOn : RightInvOn e.symm e e.target := fun x => e.right_inv
-#align local_equiv.right_inv_on LocalEquiv.rightInvOn
+#align local_equiv.right_inv_on PartialEquiv.rightInvOn
 -/
 
-#print LocalEquiv.invOn /-
+#print PartialEquiv.invOn /-
 protected theorem invOn : InvOn e.symm e e.source e.target :=
   ⟨e.LeftInvOn, e.RightInvOn⟩
-#align local_equiv.inv_on LocalEquiv.invOn
+#align local_equiv.inv_on PartialEquiv.invOn
 -/
 
-#print LocalEquiv.injOn /-
+#print PartialEquiv.injOn /-
 protected theorem injOn : InjOn e e.source :=
   e.LeftInvOn.InjOn
-#align local_equiv.inj_on LocalEquiv.injOn
+#align local_equiv.inj_on PartialEquiv.injOn
 -/
 
-#print LocalEquiv.bijOn /-
+#print PartialEquiv.bijOn /-
 protected theorem bijOn : BijOn e e.source e.target :=
   e.InvOn.BijOn e.MapsTo e.symm_mapsTo
-#align local_equiv.bij_on LocalEquiv.bijOn
+#align local_equiv.bij_on PartialEquiv.bijOn
 -/
 
-#print LocalEquiv.surjOn /-
+#print PartialEquiv.surjOn /-
 protected theorem surjOn : SurjOn e e.source e.target :=
   e.BijOn.SurjOn
-#align local_equiv.surj_on LocalEquiv.surjOn
+#align local_equiv.surj_on PartialEquiv.surjOn
 -/
 
-#print Equiv.toLocalEquiv /-
+#print Equiv.toPartialEquiv /-
 /-- Associating a local_equiv to an equiv-/
 @[simps (config := mfld_cfg)]
-def Equiv.toLocalEquiv (e : α ≃ β) : LocalEquiv α β
+def Equiv.toPartialEquiv (e : α ≃ β) : PartialEquiv α β
     where
   toFun := e
   invFun := e.symm
@@ -278,20 +279,20 @@ def Equiv.toLocalEquiv (e : α ≃ β) : LocalEquiv α β
   map_target' y hy := mem_univ _
   left_inv' x hx := e.left_inv x
   right_inv' x hx := e.right_inv x
-#align equiv.to_local_equiv Equiv.toLocalEquiv
+#align equiv.to_local_equiv Equiv.toPartialEquiv
 -/
 
-#print LocalEquiv.inhabitedOfEmpty /-
-instance inhabitedOfEmpty [IsEmpty α] [IsEmpty β] : Inhabited (LocalEquiv α β) :=
-  ⟨((Equiv.equivEmpty α).trans (Equiv.equivEmpty β).symm).toLocalEquiv⟩
-#align local_equiv.inhabited_of_empty LocalEquiv.inhabitedOfEmpty
+#print PartialEquiv.inhabitedOfEmpty /-
+instance inhabitedOfEmpty [IsEmpty α] [IsEmpty β] : Inhabited (PartialEquiv α β) :=
+  ⟨((Equiv.equivEmpty α).trans (Equiv.equivEmpty β).symm).toPartialEquiv⟩
+#align local_equiv.inhabited_of_empty PartialEquiv.inhabitedOfEmpty
 -/
 
-#print LocalEquiv.copy /-
+#print PartialEquiv.copy /-
 /-- Create a copy of a `local_equiv` providing better definitional equalities. -/
 @[simps (config := { fullyApplied := false })]
-def copy (e : LocalEquiv α β) (f : α → β) (hf : ⇑e = f) (g : β → α) (hg : ⇑e.symm = g) (s : Set α)
-    (hs : e.source = s) (t : Set β) (ht : e.target = t) : LocalEquiv α β
+def copy (e : PartialEquiv α β) (f : α → β) (hf : ⇑e = f) (g : β → α) (hg : ⇑e.symm = g) (s : Set α)
+    (hs : e.source = s) (t : Set β) (ht : e.target = t) : PartialEquiv α β
     where
   toFun := f
   invFun := g
@@ -301,17 +302,17 @@ def copy (e : LocalEquiv α β) (f : α → β) (hf : ⇑e = f) (g : β → α)
   map_target' y := hs ▸ ht ▸ hg ▸ e.map_target
   left_inv' x := hs ▸ hf ▸ hg ▸ e.left_inv
   right_inv' x := ht ▸ hf ▸ hg ▸ e.right_inv
-#align local_equiv.copy LocalEquiv.copy
+#align local_equiv.copy PartialEquiv.copy
 -/
 
-#print LocalEquiv.copy_eq /-
-theorem copy_eq (e : LocalEquiv α β) (f : α → β) (hf : ⇑e = f) (g : β → α) (hg : ⇑e.symm = g)
+#print PartialEquiv.copy_eq /-
+theorem copy_eq (e : PartialEquiv α β) (f : α → β) (hf : ⇑e = f) (g : β → α) (hg : ⇑e.symm = g)
     (s : Set α) (hs : e.source = s) (t : Set β) (ht : e.target = t) :
     e.copy f hf g hg s hs t ht = e := by substs f g s t; cases e; rfl
-#align local_equiv.copy_eq LocalEquiv.copy_eq
+#align local_equiv.copy_eq PartialEquiv.copy_eq
 -/
 
-#print LocalEquiv.toEquiv /-
+#print PartialEquiv.toEquiv /-
 /-- Associating to a local_equiv an equiv between the source and the target -/
 protected def toEquiv : Equiv e.source e.target
     where
@@ -319,48 +320,48 @@ protected def toEquiv : Equiv e.source e.target
   invFun y := ⟨e.symm y, e.map_target y.Mem⟩
   left_inv := fun ⟨x, hx⟩ => Subtype.eq <| e.left_inv hx
   right_inv := fun ⟨y, hy⟩ => Subtype.eq <| e.right_inv hy
-#align local_equiv.to_equiv LocalEquiv.toEquiv
+#align local_equiv.to_equiv PartialEquiv.toEquiv
 -/
 
-#print LocalEquiv.symm_source /-
+#print PartialEquiv.symm_source /-
 @[simp, mfld_simps]
 theorem symm_source : e.symm.source = e.target :=
   rfl
-#align local_equiv.symm_source LocalEquiv.symm_source
+#align local_equiv.symm_source PartialEquiv.symm_source
 -/
 
-#print LocalEquiv.symm_target /-
+#print PartialEquiv.symm_target /-
 @[simp, mfld_simps]
 theorem symm_target : e.symm.target = e.source :=
   rfl
-#align local_equiv.symm_target LocalEquiv.symm_target
+#align local_equiv.symm_target PartialEquiv.symm_target
 -/
 
-#print LocalEquiv.symm_symm /-
+#print PartialEquiv.symm_symm /-
 @[simp, mfld_simps]
 theorem symm_symm : e.symm.symm = e := by cases e; rfl
-#align local_equiv.symm_symm LocalEquiv.symm_symm
+#align local_equiv.symm_symm PartialEquiv.symm_symm
 -/
 
-#print LocalEquiv.image_source_eq_target /-
+#print PartialEquiv.image_source_eq_target /-
 theorem image_source_eq_target : e '' e.source = e.target :=
   e.BijOn.image_eq
-#align local_equiv.image_source_eq_target LocalEquiv.image_source_eq_target
+#align local_equiv.image_source_eq_target PartialEquiv.image_source_eq_target
 -/
 
-#print LocalEquiv.forall_mem_target /-
+#print PartialEquiv.forall_mem_target /-
 theorem forall_mem_target {p : β → Prop} : (∀ y ∈ e.target, p y) ↔ ∀ x ∈ e.source, p (e x) := by
   rw [← image_source_eq_target, ball_image_iff]
-#align local_equiv.forall_mem_target LocalEquiv.forall_mem_target
+#align local_equiv.forall_mem_target PartialEquiv.forall_mem_target
 -/
 
-#print LocalEquiv.exists_mem_target /-
+#print PartialEquiv.exists_mem_target /-
 theorem exists_mem_target {p : β → Prop} : (∃ y ∈ e.target, p y) ↔ ∃ x ∈ e.source, p (e x) := by
   rw [← image_source_eq_target, bex_image_iff]
-#align local_equiv.exists_mem_target LocalEquiv.exists_mem_target
+#align local_equiv.exists_mem_target PartialEquiv.exists_mem_target
 -/
 
-#print LocalEquiv.IsImage /-
+#print PartialEquiv.IsImage /-
 /-- We say that `t : set β` is an image of `s : set α` under a local equivalence if
 any of the following equivalent conditions hold:
 
@@ -370,54 +371,54 @@ any of the following equivalent conditions hold:
 -/
 def IsImage (s : Set α) (t : Set β) : Prop :=
   ∀ ⦃x⦄, x ∈ e.source → (e x ∈ t ↔ x ∈ s)
-#align local_equiv.is_image LocalEquiv.IsImage
+#align local_equiv.is_image PartialEquiv.IsImage
 -/
 
 namespace IsImage
 
 variable {e} {s : Set α} {t : Set β} {x : α} {y : β}
 
-#print LocalEquiv.IsImage.apply_mem_iff /-
+#print PartialEquiv.IsImage.apply_mem_iff /-
 theorem apply_mem_iff (h : e.IsImage s t) (hx : x ∈ e.source) : e x ∈ t ↔ x ∈ s :=
   h hx
-#align local_equiv.is_image.apply_mem_iff LocalEquiv.IsImage.apply_mem_iff
+#align local_equiv.is_image.apply_mem_iff PartialEquiv.IsImage.apply_mem_iff
 -/
 
-#print LocalEquiv.IsImage.symm_apply_mem_iff /-
+#print PartialEquiv.IsImage.symm_apply_mem_iff /-
 theorem symm_apply_mem_iff (h : e.IsImage s t) : ∀ ⦃y⦄, y ∈ e.target → (e.symm y ∈ s ↔ y ∈ t) :=
   e.forall_mem_target.mpr fun x hx => by rw [e.left_inv hx, h hx]
-#align local_equiv.is_image.symm_apply_mem_iff LocalEquiv.IsImage.symm_apply_mem_iff
+#align local_equiv.is_image.symm_apply_mem_iff PartialEquiv.IsImage.symm_apply_mem_iff
 -/
 
-#print LocalEquiv.IsImage.symm /-
+#print PartialEquiv.IsImage.symm /-
 protected theorem symm (h : e.IsImage s t) : e.symm.IsImage t s :=
   h.symm_apply_mem_iff
-#align local_equiv.is_image.symm LocalEquiv.IsImage.symm
+#align local_equiv.is_image.symm PartialEquiv.IsImage.symm
 -/
 
-#print LocalEquiv.IsImage.symm_iff /-
+#print PartialEquiv.IsImage.symm_iff /-
 @[simp]
 theorem symm_iff : e.symm.IsImage t s ↔ e.IsImage s t :=
   ⟨fun h => h.symm, fun h => h.symm⟩
-#align local_equiv.is_image.symm_iff LocalEquiv.IsImage.symm_iff
+#align local_equiv.is_image.symm_iff PartialEquiv.IsImage.symm_iff
 -/
 
-#print LocalEquiv.IsImage.mapsTo /-
+#print PartialEquiv.IsImage.mapsTo /-
 protected theorem mapsTo (h : e.IsImage s t) : MapsTo e (e.source ∩ s) (e.target ∩ t) := fun x hx =>
   ⟨e.MapsTo hx.1, (h hx.1).2 hx.2⟩
-#align local_equiv.is_image.maps_to LocalEquiv.IsImage.mapsTo
+#align local_equiv.is_image.maps_to PartialEquiv.IsImage.mapsTo
 -/
 
-#print LocalEquiv.IsImage.symm_mapsTo /-
+#print PartialEquiv.IsImage.symm_mapsTo /-
 theorem symm_mapsTo (h : e.IsImage s t) : MapsTo e.symm (e.target ∩ t) (e.source ∩ s) :=
   h.symm.MapsTo
-#align local_equiv.is_image.symm_maps_to LocalEquiv.IsImage.symm_mapsTo
+#align local_equiv.is_image.symm_maps_to PartialEquiv.IsImage.symm_mapsTo
 -/
 
-#print LocalEquiv.IsImage.restr /-
+#print PartialEquiv.IsImage.restr /-
 /-- Restrict a `local_equiv` to a pair of corresponding sets. -/
 @[simps (config := { fullyApplied := false })]
-def restr (h : e.IsImage s t) : LocalEquiv α β
+def restr (h : e.IsImage s t) : PartialEquiv α β
     where
   toFun := e
   invFun := e.symm
@@ -427,80 +428,80 @@ def restr (h : e.IsImage s t) : LocalEquiv α β
   map_target' := h.symm_mapsTo
   left_inv' := e.LeftInvOn.mono (inter_subset_left _ _)
   right_inv' := e.RightInvOn.mono (inter_subset_left _ _)
-#align local_equiv.is_image.restr LocalEquiv.IsImage.restr
+#align local_equiv.is_image.restr PartialEquiv.IsImage.restr
 -/
 
-#print LocalEquiv.IsImage.image_eq /-
+#print PartialEquiv.IsImage.image_eq /-
 theorem image_eq (h : e.IsImage s t) : e '' (e.source ∩ s) = e.target ∩ t :=
   h.restr.image_source_eq_target
-#align local_equiv.is_image.image_eq LocalEquiv.IsImage.image_eq
+#align local_equiv.is_image.image_eq PartialEquiv.IsImage.image_eq
 -/
 
-#print LocalEquiv.IsImage.symm_image_eq /-
+#print PartialEquiv.IsImage.symm_image_eq /-
 theorem symm_image_eq (h : e.IsImage s t) : e.symm '' (e.target ∩ t) = e.source ∩ s :=
   h.symm.image_eq
-#align local_equiv.is_image.symm_image_eq LocalEquiv.IsImage.symm_image_eq
+#align local_equiv.is_image.symm_image_eq PartialEquiv.IsImage.symm_image_eq
 -/
 
-#print LocalEquiv.IsImage.iff_preimage_eq /-
+#print PartialEquiv.IsImage.iff_preimage_eq /-
 theorem iff_preimage_eq : e.IsImage s t ↔ e.source ∩ e ⁻¹' t = e.source ∩ s := by
   simp only [is_image, Set.ext_iff, mem_inter_iff, and_congr_right_iff, mem_preimage]
-#align local_equiv.is_image.iff_preimage_eq LocalEquiv.IsImage.iff_preimage_eq
+#align local_equiv.is_image.iff_preimage_eq PartialEquiv.IsImage.iff_preimage_eq
 -/
 
 alias ⟨preimage_eq, of_preimage_eq⟩ := iff_preimage_eq
-#align local_equiv.is_image.preimage_eq LocalEquiv.IsImage.preimage_eq
-#align local_equiv.is_image.of_preimage_eq LocalEquiv.IsImage.of_preimage_eq
+#align local_equiv.is_image.preimage_eq PartialEquiv.IsImage.preimage_eq
+#align local_equiv.is_image.of_preimage_eq PartialEquiv.IsImage.of_preimage_eq
 
-#print LocalEquiv.IsImage.iff_symm_preimage_eq /-
+#print PartialEquiv.IsImage.iff_symm_preimage_eq /-
 theorem iff_symm_preimage_eq : e.IsImage s t ↔ e.target ∩ e.symm ⁻¹' s = e.target ∩ t :=
   symm_iff.symm.trans iff_preimage_eq
-#align local_equiv.is_image.iff_symm_preimage_eq LocalEquiv.IsImage.iff_symm_preimage_eq
+#align local_equiv.is_image.iff_symm_preimage_eq PartialEquiv.IsImage.iff_symm_preimage_eq
 -/
 
 alias ⟨symm_preimage_eq, of_symm_preimage_eq⟩ := iff_symm_preimage_eq
-#align local_equiv.is_image.symm_preimage_eq LocalEquiv.IsImage.symm_preimage_eq
-#align local_equiv.is_image.of_symm_preimage_eq LocalEquiv.IsImage.of_symm_preimage_eq
+#align local_equiv.is_image.symm_preimage_eq PartialEquiv.IsImage.symm_preimage_eq
+#align local_equiv.is_image.of_symm_preimage_eq PartialEquiv.IsImage.of_symm_preimage_eq
 
-#print LocalEquiv.IsImage.of_image_eq /-
+#print PartialEquiv.IsImage.of_image_eq /-
 theorem of_image_eq (h : e '' (e.source ∩ s) = e.target ∩ t) : e.IsImage s t :=
   of_symm_preimage_eq <| Eq.trans (of_symm_preimage_eq rfl).image_eq.symm h
-#align local_equiv.is_image.of_image_eq LocalEquiv.IsImage.of_image_eq
+#align local_equiv.is_image.of_image_eq PartialEquiv.IsImage.of_image_eq
 -/
 
-#print LocalEquiv.IsImage.of_symm_image_eq /-
+#print PartialEquiv.IsImage.of_symm_image_eq /-
 theorem of_symm_image_eq (h : e.symm '' (e.target ∩ t) = e.source ∩ s) : e.IsImage s t :=
   of_preimage_eq <| Eq.trans (of_preimage_eq rfl).symm_image_eq.symm h
-#align local_equiv.is_image.of_symm_image_eq LocalEquiv.IsImage.of_symm_image_eq
+#align local_equiv.is_image.of_symm_image_eq PartialEquiv.IsImage.of_symm_image_eq
 -/
 
-#print LocalEquiv.IsImage.compl /-
+#print PartialEquiv.IsImage.compl /-
 protected theorem compl (h : e.IsImage s t) : e.IsImage (sᶜ) (tᶜ) := fun x hx => not_congr (h hx)
-#align local_equiv.is_image.compl LocalEquiv.IsImage.compl
+#align local_equiv.is_image.compl PartialEquiv.IsImage.compl
 -/
 
-#print LocalEquiv.IsImage.inter /-
+#print PartialEquiv.IsImage.inter /-
 protected theorem inter {s' t'} (h : e.IsImage s t) (h' : e.IsImage s' t') :
     e.IsImage (s ∩ s') (t ∩ t') := fun x hx => and_congr (h hx) (h' hx)
-#align local_equiv.is_image.inter LocalEquiv.IsImage.inter
+#align local_equiv.is_image.inter PartialEquiv.IsImage.inter
 -/
 
-#print LocalEquiv.IsImage.union /-
+#print PartialEquiv.IsImage.union /-
 protected theorem union {s' t'} (h : e.IsImage s t) (h' : e.IsImage s' t') :
     e.IsImage (s ∪ s') (t ∪ t') := fun x hx => or_congr (h hx) (h' hx)
-#align local_equiv.is_image.union LocalEquiv.IsImage.union
+#align local_equiv.is_image.union PartialEquiv.IsImage.union
 -/
 
-#print LocalEquiv.IsImage.diff /-
+#print PartialEquiv.IsImage.diff /-
 protected theorem diff {s' t'} (h : e.IsImage s t) (h' : e.IsImage s' t') :
     e.IsImage (s \ s') (t \ t') :=
   h.inter h'.compl
-#align local_equiv.is_image.diff LocalEquiv.IsImage.diff
+#align local_equiv.is_image.diff PartialEquiv.IsImage.diff
 -/
 
-#print LocalEquiv.IsImage.leftInvOn_piecewise /-
-theorem leftInvOn_piecewise {e' : LocalEquiv α β} [∀ i, Decidable (i ∈ s)] [∀ i, Decidable (i ∈ t)]
-    (h : e.IsImage s t) (h' : e'.IsImage s t) :
+#print PartialEquiv.IsImage.leftInvOn_piecewise /-
+theorem leftInvOn_piecewise {e' : PartialEquiv α β} [∀ i, Decidable (i ∈ s)]
+    [∀ i, Decidable (i ∈ t)] (h : e.IsImage s t) (h' : e'.IsImage s t) :
     LeftInvOn (t.piecewise e.symm e'.symm) (s.piecewise e e') (s.ite e.source e'.source) :=
   by
   rintro x (⟨he, hs⟩ | ⟨he, hs : x ∉ s⟩)
@@ -508,18 +509,18 @@ theorem leftInvOn_piecewise {e' : LocalEquiv α β} [∀ i, Decidable (i ∈ s)]
   ·
     rw [piecewise_eq_of_not_mem _ _ _ hs, piecewise_eq_of_not_mem _ _ _ ((h'.compl he).2 hs),
       e'.left_inv he]
-#align local_equiv.is_image.left_inv_on_piecewise LocalEquiv.IsImage.leftInvOn_piecewise
+#align local_equiv.is_image.left_inv_on_piecewise PartialEquiv.IsImage.leftInvOn_piecewise
 -/
 
-#print LocalEquiv.IsImage.inter_eq_of_inter_eq_of_eqOn /-
-theorem inter_eq_of_inter_eq_of_eqOn {e' : LocalEquiv α β} (h : e.IsImage s t) (h' : e'.IsImage s t)
-    (hs : e.source ∩ s = e'.source ∩ s) (Heq : EqOn e e' (e.source ∩ s)) :
+#print PartialEquiv.IsImage.inter_eq_of_inter_eq_of_eqOn /-
+theorem inter_eq_of_inter_eq_of_eqOn {e' : PartialEquiv α β} (h : e.IsImage s t)
+    (h' : e'.IsImage s t) (hs : e.source ∩ s = e'.source ∩ s) (Heq : EqOn e e' (e.source ∩ s)) :
     e.target ∩ t = e'.target ∩ t := by rw [← h.image_eq, ← h'.image_eq, ← hs, Heq.image_eq]
-#align local_equiv.is_image.inter_eq_of_inter_eq_of_eq_on LocalEquiv.IsImage.inter_eq_of_inter_eq_of_eqOn
+#align local_equiv.is_image.inter_eq_of_inter_eq_of_eq_on PartialEquiv.IsImage.inter_eq_of_inter_eq_of_eqOn
 -/
 
-#print LocalEquiv.IsImage.symm_eq_on_of_inter_eq_of_eqOn /-
-theorem symm_eq_on_of_inter_eq_of_eqOn {e' : LocalEquiv α β} (h : e.IsImage s t)
+#print PartialEquiv.IsImage.symm_eq_on_of_inter_eq_of_eqOn /-
+theorem symm_eq_on_of_inter_eq_of_eqOn {e' : PartialEquiv α β} (h : e.IsImage s t)
     (hs : e.source ∩ s = e'.source ∩ s) (Heq : EqOn e e' (e.source ∩ s)) :
     EqOn e.symm e'.symm (e.target ∩ t) :=
   by
@@ -527,118 +528,118 @@ theorem symm_eq_on_of_inter_eq_of_eqOn {e' : LocalEquiv α β} (h : e.IsImage s
   rintro y ⟨x, hx, rfl⟩
   have hx' := hx; rw [hs] at hx' 
   rw [e.left_inv hx.1, Heq hx, e'.left_inv hx'.1]
-#align local_equiv.is_image.symm_eq_on_of_inter_eq_of_eq_on LocalEquiv.IsImage.symm_eq_on_of_inter_eq_of_eqOn
+#align local_equiv.is_image.symm_eq_on_of_inter_eq_of_eq_on PartialEquiv.IsImage.symm_eq_on_of_inter_eq_of_eqOn
 -/
 
 end IsImage
 
-#print LocalEquiv.isImage_source_target /-
+#print PartialEquiv.isImage_source_target /-
 theorem isImage_source_target : e.IsImage e.source e.target := fun x hx => by simp [hx]
-#align local_equiv.is_image_source_target LocalEquiv.isImage_source_target
+#align local_equiv.is_image_source_target PartialEquiv.isImage_source_target
 -/
 
-#print LocalEquiv.isImage_source_target_of_disjoint /-
-theorem isImage_source_target_of_disjoint (e' : LocalEquiv α β) (hs : Disjoint e.source e'.source)
+#print PartialEquiv.isImage_source_target_of_disjoint /-
+theorem isImage_source_target_of_disjoint (e' : PartialEquiv α β) (hs : Disjoint e.source e'.source)
     (ht : Disjoint e.target e'.target) : e.IsImage e'.source e'.target :=
   IsImage.of_image_eq <| by rw [hs.inter_eq, ht.inter_eq, image_empty]
-#align local_equiv.is_image_source_target_of_disjoint LocalEquiv.isImage_source_target_of_disjoint
+#align local_equiv.is_image_source_target_of_disjoint PartialEquiv.isImage_source_target_of_disjoint
 -/
 
-#print LocalEquiv.image_source_inter_eq' /-
+#print PartialEquiv.image_source_inter_eq' /-
 theorem image_source_inter_eq' (s : Set α) : e '' (e.source ∩ s) = e.target ∩ e.symm ⁻¹' s := by
   rw [inter_comm, e.left_inv_on.image_inter', image_source_eq_target, inter_comm]
-#align local_equiv.image_source_inter_eq' LocalEquiv.image_source_inter_eq'
+#align local_equiv.image_source_inter_eq' PartialEquiv.image_source_inter_eq'
 -/
 
-#print LocalEquiv.image_source_inter_eq /-
+#print PartialEquiv.image_source_inter_eq /-
 theorem image_source_inter_eq (s : Set α) :
     e '' (e.source ∩ s) = e.target ∩ e.symm ⁻¹' (e.source ∩ s) := by
   rw [inter_comm, e.left_inv_on.image_inter, image_source_eq_target, inter_comm]
-#align local_equiv.image_source_inter_eq LocalEquiv.image_source_inter_eq
+#align local_equiv.image_source_inter_eq PartialEquiv.image_source_inter_eq
 -/
 
-#print LocalEquiv.image_eq_target_inter_inv_preimage /-
+#print PartialEquiv.image_eq_target_inter_inv_preimage /-
 theorem image_eq_target_inter_inv_preimage {s : Set α} (h : s ⊆ e.source) :
     e '' s = e.target ∩ e.symm ⁻¹' s := by
   rw [← e.image_source_inter_eq', inter_eq_self_of_subset_right h]
-#align local_equiv.image_eq_target_inter_inv_preimage LocalEquiv.image_eq_target_inter_inv_preimage
+#align local_equiv.image_eq_target_inter_inv_preimage PartialEquiv.image_eq_target_inter_inv_preimage
 -/
 
-#print LocalEquiv.symm_image_eq_source_inter_preimage /-
+#print PartialEquiv.symm_image_eq_source_inter_preimage /-
 theorem symm_image_eq_source_inter_preimage {s : Set β} (h : s ⊆ e.target) :
     e.symm '' s = e.source ∩ e ⁻¹' s :=
   e.symm.image_eq_target_inter_inv_preimage h
-#align local_equiv.symm_image_eq_source_inter_preimage LocalEquiv.symm_image_eq_source_inter_preimage
+#align local_equiv.symm_image_eq_source_inter_preimage PartialEquiv.symm_image_eq_source_inter_preimage
 -/
 
-#print LocalEquiv.symm_image_target_inter_eq /-
+#print PartialEquiv.symm_image_target_inter_eq /-
 theorem symm_image_target_inter_eq (s : Set β) :
     e.symm '' (e.target ∩ s) = e.source ∩ e ⁻¹' (e.target ∩ s) :=
   e.symm.image_source_inter_eq _
-#align local_equiv.symm_image_target_inter_eq LocalEquiv.symm_image_target_inter_eq
+#align local_equiv.symm_image_target_inter_eq PartialEquiv.symm_image_target_inter_eq
 -/
 
-#print LocalEquiv.symm_image_target_inter_eq' /-
+#print PartialEquiv.symm_image_target_inter_eq' /-
 theorem symm_image_target_inter_eq' (s : Set β) : e.symm '' (e.target ∩ s) = e.source ∩ e ⁻¹' s :=
   e.symm.image_source_inter_eq' _
-#align local_equiv.symm_image_target_inter_eq' LocalEquiv.symm_image_target_inter_eq'
+#align local_equiv.symm_image_target_inter_eq' PartialEquiv.symm_image_target_inter_eq'
 -/
 
-#print LocalEquiv.source_inter_preimage_inv_preimage /-
+#print PartialEquiv.source_inter_preimage_inv_preimage /-
 theorem source_inter_preimage_inv_preimage (s : Set α) :
     e.source ∩ e ⁻¹' (e.symm ⁻¹' s) = e.source ∩ s :=
   Set.ext fun x => and_congr_right_iff.2 fun hx => by simp only [mem_preimage, e.left_inv hx]
-#align local_equiv.source_inter_preimage_inv_preimage LocalEquiv.source_inter_preimage_inv_preimage
+#align local_equiv.source_inter_preimage_inv_preimage PartialEquiv.source_inter_preimage_inv_preimage
 -/
 
-#print LocalEquiv.source_inter_preimage_target_inter /-
+#print PartialEquiv.source_inter_preimage_target_inter /-
 theorem source_inter_preimage_target_inter (s : Set β) :
     e.source ∩ e ⁻¹' (e.target ∩ s) = e.source ∩ e ⁻¹' s :=
   ext fun x => ⟨fun hx => ⟨hx.1, hx.2.2⟩, fun hx => ⟨hx.1, e.map_source hx.1, hx.2⟩⟩
-#align local_equiv.source_inter_preimage_target_inter LocalEquiv.source_inter_preimage_target_inter
+#align local_equiv.source_inter_preimage_target_inter PartialEquiv.source_inter_preimage_target_inter
 -/
 
-#print LocalEquiv.target_inter_inv_preimage_preimage /-
+#print PartialEquiv.target_inter_inv_preimage_preimage /-
 theorem target_inter_inv_preimage_preimage (s : Set β) :
     e.target ∩ e.symm ⁻¹' (e ⁻¹' s) = e.target ∩ s :=
   e.symm.source_inter_preimage_inv_preimage _
-#align local_equiv.target_inter_inv_preimage_preimage LocalEquiv.target_inter_inv_preimage_preimage
+#align local_equiv.target_inter_inv_preimage_preimage PartialEquiv.target_inter_inv_preimage_preimage
 -/
 
-#print LocalEquiv.symm_image_image_of_subset_source /-
+#print PartialEquiv.symm_image_image_of_subset_source /-
 theorem symm_image_image_of_subset_source {s : Set α} (h : s ⊆ e.source) : e.symm '' (e '' s) = s :=
   (e.LeftInvOn.mono h).image_image
-#align local_equiv.symm_image_image_of_subset_source LocalEquiv.symm_image_image_of_subset_source
+#align local_equiv.symm_image_image_of_subset_source PartialEquiv.symm_image_image_of_subset_source
 -/
 
-#print LocalEquiv.image_symm_image_of_subset_target /-
+#print PartialEquiv.image_symm_image_of_subset_target /-
 theorem image_symm_image_of_subset_target {s : Set β} (h : s ⊆ e.target) : e '' (e.symm '' s) = s :=
   e.symm.symm_image_image_of_subset_source h
-#align local_equiv.image_symm_image_of_subset_target LocalEquiv.image_symm_image_of_subset_target
+#align local_equiv.image_symm_image_of_subset_target PartialEquiv.image_symm_image_of_subset_target
 -/
 
-#print LocalEquiv.source_subset_preimage_target /-
+#print PartialEquiv.source_subset_preimage_target /-
 theorem source_subset_preimage_target : e.source ⊆ e ⁻¹' e.target :=
   e.MapsTo
-#align local_equiv.source_subset_preimage_target LocalEquiv.source_subset_preimage_target
+#align local_equiv.source_subset_preimage_target PartialEquiv.source_subset_preimage_target
 -/
 
-#print LocalEquiv.symm_image_target_eq_source /-
+#print PartialEquiv.symm_image_target_eq_source /-
 theorem symm_image_target_eq_source : e.symm '' e.target = e.source :=
   e.symm.image_source_eq_target
-#align local_equiv.symm_image_target_eq_source LocalEquiv.symm_image_target_eq_source
+#align local_equiv.symm_image_target_eq_source PartialEquiv.symm_image_target_eq_source
 -/
 
-#print LocalEquiv.target_subset_preimage_source /-
+#print PartialEquiv.target_subset_preimage_source /-
 theorem target_subset_preimage_source : e.target ⊆ e.symm ⁻¹' e.source :=
   e.symm_mapsTo
-#align local_equiv.target_subset_preimage_source LocalEquiv.target_subset_preimage_source
+#align local_equiv.target_subset_preimage_source PartialEquiv.target_subset_preimage_source
 -/
 
-#print LocalEquiv.ext /-
+#print PartialEquiv.ext /-
 /-- Two local equivs that have the same `source`, same `to_fun` and same `inv_fun`, coincide. -/
 @[ext]
-protected theorem ext {e e' : LocalEquiv α β} (h : ∀ x, e x = e' x)
+protected theorem ext {e e' : PartialEquiv α β} (h : ∀ x, e x = e' x)
     (hsymm : ∀ x, e.symm x = e'.symm x) (hs : e.source = e'.source) : e = e' :=
   by
   have A : (e : α → β) = e' := by ext x; exact h x
@@ -648,109 +649,109 @@ protected theorem ext {e e' : LocalEquiv α β} (h : ∀ x, e x = e' x)
   rw [A, hs, I'] at I 
   cases e <;> cases e'
   simp_all
-#align local_equiv.ext LocalEquiv.ext
+#align local_equiv.ext PartialEquiv.ext
 -/
 
-#print LocalEquiv.restr /-
+#print PartialEquiv.restr /-
 /-- Restricting a local equivalence to e.source ∩ s -/
-protected def restr (s : Set α) : LocalEquiv α β :=
+protected def restr (s : Set α) : PartialEquiv α β :=
   (@IsImage.of_symm_preimage_eq α β e s (e.symm ⁻¹' s) rfl).restr
-#align local_equiv.restr LocalEquiv.restr
+#align local_equiv.restr PartialEquiv.restr
 -/
 
-#print LocalEquiv.restr_coe /-
+#print PartialEquiv.restr_coe /-
 @[simp, mfld_simps]
 theorem restr_coe (s : Set α) : (e.restr s : α → β) = e :=
   rfl
-#align local_equiv.restr_coe LocalEquiv.restr_coe
+#align local_equiv.restr_coe PartialEquiv.restr_coe
 -/
 
-#print LocalEquiv.restr_coe_symm /-
+#print PartialEquiv.restr_coe_symm /-
 @[simp, mfld_simps]
 theorem restr_coe_symm (s : Set α) : ((e.restr s).symm : β → α) = e.symm :=
   rfl
-#align local_equiv.restr_coe_symm LocalEquiv.restr_coe_symm
+#align local_equiv.restr_coe_symm PartialEquiv.restr_coe_symm
 -/
 
-#print LocalEquiv.restr_source /-
+#print PartialEquiv.restr_source /-
 @[simp, mfld_simps]
 theorem restr_source (s : Set α) : (e.restr s).source = e.source ∩ s :=
   rfl
-#align local_equiv.restr_source LocalEquiv.restr_source
+#align local_equiv.restr_source PartialEquiv.restr_source
 -/
 
-#print LocalEquiv.restr_target /-
+#print PartialEquiv.restr_target /-
 @[simp, mfld_simps]
 theorem restr_target (s : Set α) : (e.restr s).target = e.target ∩ e.symm ⁻¹' s :=
   rfl
-#align local_equiv.restr_target LocalEquiv.restr_target
+#align local_equiv.restr_target PartialEquiv.restr_target
 -/
 
-#print LocalEquiv.restr_eq_of_source_subset /-
-theorem restr_eq_of_source_subset {e : LocalEquiv α β} {s : Set α} (h : e.source ⊆ s) :
+#print PartialEquiv.restr_eq_of_source_subset /-
+theorem restr_eq_of_source_subset {e : PartialEquiv α β} {s : Set α} (h : e.source ⊆ s) :
     e.restr s = e :=
-  LocalEquiv.ext (fun _ => rfl) (fun _ => rfl) (by simp [inter_eq_self_of_subset_left h])
-#align local_equiv.restr_eq_of_source_subset LocalEquiv.restr_eq_of_source_subset
+  PartialEquiv.ext (fun _ => rfl) (fun _ => rfl) (by simp [inter_eq_self_of_subset_left h])
+#align local_equiv.restr_eq_of_source_subset PartialEquiv.restr_eq_of_source_subset
 -/
 
-#print LocalEquiv.restr_univ /-
+#print PartialEquiv.restr_univ /-
 @[simp, mfld_simps]
-theorem restr_univ {e : LocalEquiv α β} : e.restr univ = e :=
+theorem restr_univ {e : PartialEquiv α β} : e.restr univ = e :=
   restr_eq_of_source_subset (subset_univ _)
-#align local_equiv.restr_univ LocalEquiv.restr_univ
+#align local_equiv.restr_univ PartialEquiv.restr_univ
 -/
 
-#print LocalEquiv.refl /-
+#print PartialEquiv.refl /-
 /-- The identity local equiv -/
-protected def refl (α : Type _) : LocalEquiv α α :=
-  (Equiv.refl α).toLocalEquiv
-#align local_equiv.refl LocalEquiv.refl
+protected def refl (α : Type _) : PartialEquiv α α :=
+  (Equiv.refl α).toPartialEquiv
+#align local_equiv.refl PartialEquiv.refl
 -/
 
-#print LocalEquiv.refl_source /-
+#print PartialEquiv.refl_source /-
 @[simp, mfld_simps]
-theorem refl_source : (LocalEquiv.refl α).source = univ :=
+theorem refl_source : (PartialEquiv.refl α).source = univ :=
   rfl
-#align local_equiv.refl_source LocalEquiv.refl_source
+#align local_equiv.refl_source PartialEquiv.refl_source
 -/
 
-#print LocalEquiv.refl_target /-
+#print PartialEquiv.refl_target /-
 @[simp, mfld_simps]
-theorem refl_target : (LocalEquiv.refl α).target = univ :=
+theorem refl_target : (PartialEquiv.refl α).target = univ :=
   rfl
-#align local_equiv.refl_target LocalEquiv.refl_target
+#align local_equiv.refl_target PartialEquiv.refl_target
 -/
 
-#print LocalEquiv.refl_coe /-
+#print PartialEquiv.refl_coe /-
 @[simp, mfld_simps]
-theorem refl_coe : (LocalEquiv.refl α : α → α) = id :=
+theorem refl_coe : (PartialEquiv.refl α : α → α) = id :=
   rfl
-#align local_equiv.refl_coe LocalEquiv.refl_coe
+#align local_equiv.refl_coe PartialEquiv.refl_coe
 -/
 
-#print LocalEquiv.refl_symm /-
+#print PartialEquiv.refl_symm /-
 @[simp, mfld_simps]
-theorem refl_symm : (LocalEquiv.refl α).symm = LocalEquiv.refl α :=
+theorem refl_symm : (PartialEquiv.refl α).symm = PartialEquiv.refl α :=
   rfl
-#align local_equiv.refl_symm LocalEquiv.refl_symm
+#align local_equiv.refl_symm PartialEquiv.refl_symm
 -/
 
-#print LocalEquiv.refl_restr_source /-
+#print PartialEquiv.refl_restr_source /-
 @[simp, mfld_simps]
-theorem refl_restr_source (s : Set α) : ((LocalEquiv.refl α).restr s).source = s := by simp
-#align local_equiv.refl_restr_source LocalEquiv.refl_restr_source
+theorem refl_restr_source (s : Set α) : ((PartialEquiv.refl α).restr s).source = s := by simp
+#align local_equiv.refl_restr_source PartialEquiv.refl_restr_source
 -/
 
-#print LocalEquiv.refl_restr_target /-
+#print PartialEquiv.refl_restr_target /-
 @[simp, mfld_simps]
-theorem refl_restr_target (s : Set α) : ((LocalEquiv.refl α).restr s).target = s := by
+theorem refl_restr_target (s : Set α) : ((PartialEquiv.refl α).restr s).target = s := by
   change univ ∩ id ⁻¹' s = s; simp
-#align local_equiv.refl_restr_target LocalEquiv.refl_restr_target
+#align local_equiv.refl_restr_target PartialEquiv.refl_restr_target
 -/
 
-#print LocalEquiv.ofSet /-
+#print PartialEquiv.ofSet /-
 /-- The identity local equiv on a set `s` -/
-def ofSet (s : Set α) : LocalEquiv α α where
+def ofSet (s : Set α) : PartialEquiv α α where
   toFun := id
   invFun := id
   source := s
@@ -759,41 +760,41 @@ def ofSet (s : Set α) : LocalEquiv α α where
   map_target' x hx := hx
   left_inv' x hx := rfl
   right_inv' x hx := rfl
-#align local_equiv.of_set LocalEquiv.ofSet
+#align local_equiv.of_set PartialEquiv.ofSet
 -/
 
-#print LocalEquiv.ofSet_source /-
+#print PartialEquiv.ofSet_source /-
 @[simp, mfld_simps]
-theorem ofSet_source (s : Set α) : (LocalEquiv.ofSet s).source = s :=
+theorem ofSet_source (s : Set α) : (PartialEquiv.ofSet s).source = s :=
   rfl
-#align local_equiv.of_set_source LocalEquiv.ofSet_source
+#align local_equiv.of_set_source PartialEquiv.ofSet_source
 -/
 
-#print LocalEquiv.ofSet_target /-
+#print PartialEquiv.ofSet_target /-
 @[simp, mfld_simps]
-theorem ofSet_target (s : Set α) : (LocalEquiv.ofSet s).target = s :=
+theorem ofSet_target (s : Set α) : (PartialEquiv.ofSet s).target = s :=
   rfl
-#align local_equiv.of_set_target LocalEquiv.ofSet_target
+#align local_equiv.of_set_target PartialEquiv.ofSet_target
 -/
 
-#print LocalEquiv.ofSet_coe /-
+#print PartialEquiv.ofSet_coe /-
 @[simp, mfld_simps]
-theorem ofSet_coe (s : Set α) : (LocalEquiv.ofSet s : α → α) = id :=
+theorem ofSet_coe (s : Set α) : (PartialEquiv.ofSet s : α → α) = id :=
   rfl
-#align local_equiv.of_set_coe LocalEquiv.ofSet_coe
+#align local_equiv.of_set_coe PartialEquiv.ofSet_coe
 -/
 
-#print LocalEquiv.ofSet_symm /-
+#print PartialEquiv.ofSet_symm /-
 @[simp, mfld_simps]
-theorem ofSet_symm (s : Set α) : (LocalEquiv.ofSet s).symm = LocalEquiv.ofSet s :=
+theorem ofSet_symm (s : Set α) : (PartialEquiv.ofSet s).symm = PartialEquiv.ofSet s :=
   rfl
-#align local_equiv.of_set_symm LocalEquiv.ofSet_symm
+#align local_equiv.of_set_symm PartialEquiv.ofSet_symm
 -/
 
-#print LocalEquiv.trans' /-
+#print PartialEquiv.trans' /-
 /-- Composing two local equivs if the target of the first coincides with the source of the
 second. -/
-protected def trans' (e' : LocalEquiv β γ) (h : e.target = e'.source) : LocalEquiv α γ
+protected def trans' (e' : PartialEquiv β γ) (h : e.target = e'.source) : PartialEquiv α γ
     where
   toFun := e' ∘ e
   invFun := e.symm ∘ e'.symm
@@ -803,243 +804,245 @@ protected def trans' (e' : LocalEquiv β γ) (h : e.target = e'.source) : LocalE
   map_target' y hy := by simp [h, hy]
   left_inv' x hx := by simp [hx, h.symm]
   right_inv' y hy := by simp [hy, h]
-#align local_equiv.trans' LocalEquiv.trans'
+#align local_equiv.trans' PartialEquiv.trans'
 -/
 
-#print LocalEquiv.trans /-
+#print PartialEquiv.trans /-
 /-- Composing two local equivs, by restricting to the maximal domain where their composition
 is well defined. -/
-protected def trans : LocalEquiv α γ :=
-  LocalEquiv.trans' (e.symm.restr e'.source).symm (e'.restr e.target) (inter_comm _ _)
-#align local_equiv.trans LocalEquiv.trans
+protected def trans : PartialEquiv α γ :=
+  PartialEquiv.trans' (e.symm.restr e'.source).symm (e'.restr e.target) (inter_comm _ _)
+#align local_equiv.trans PartialEquiv.trans
 -/
 
-#print LocalEquiv.coe_trans /-
+#print PartialEquiv.coe_trans /-
 @[simp, mfld_simps]
 theorem coe_trans : (e.trans e' : α → γ) = e' ∘ e :=
   rfl
-#align local_equiv.coe_trans LocalEquiv.coe_trans
+#align local_equiv.coe_trans PartialEquiv.coe_trans
 -/
 
-#print LocalEquiv.coe_trans_symm /-
+#print PartialEquiv.coe_trans_symm /-
 @[simp, mfld_simps]
 theorem coe_trans_symm : ((e.trans e').symm : γ → α) = e.symm ∘ e'.symm :=
   rfl
-#align local_equiv.coe_trans_symm LocalEquiv.coe_trans_symm
+#align local_equiv.coe_trans_symm PartialEquiv.coe_trans_symm
 -/
 
-#print LocalEquiv.trans_apply /-
+#print PartialEquiv.trans_apply /-
 theorem trans_apply {x : α} : (e.trans e') x = e' (e x) :=
   rfl
-#align local_equiv.trans_apply LocalEquiv.trans_apply
+#align local_equiv.trans_apply PartialEquiv.trans_apply
 -/
 
-#print LocalEquiv.trans_symm_eq_symm_trans_symm /-
+#print PartialEquiv.trans_symm_eq_symm_trans_symm /-
 theorem trans_symm_eq_symm_trans_symm : (e.trans e').symm = e'.symm.trans e.symm := by
   cases e <;> cases e' <;> rfl
-#align local_equiv.trans_symm_eq_symm_trans_symm LocalEquiv.trans_symm_eq_symm_trans_symm
+#align local_equiv.trans_symm_eq_symm_trans_symm PartialEquiv.trans_symm_eq_symm_trans_symm
 -/
 
-#print LocalEquiv.trans_source /-
+#print PartialEquiv.trans_source /-
 @[simp, mfld_simps]
 theorem trans_source : (e.trans e').source = e.source ∩ e ⁻¹' e'.source :=
   rfl
-#align local_equiv.trans_source LocalEquiv.trans_source
+#align local_equiv.trans_source PartialEquiv.trans_source
 -/
 
-#print LocalEquiv.trans_source' /-
+#print PartialEquiv.trans_source' /-
 theorem trans_source' : (e.trans e').source = e.source ∩ e ⁻¹' (e.target ∩ e'.source) := by
   mfld_set_tac
-#align local_equiv.trans_source' LocalEquiv.trans_source'
+#align local_equiv.trans_source' PartialEquiv.trans_source'
 -/
 
-#print LocalEquiv.trans_source'' /-
+#print PartialEquiv.trans_source'' /-
 theorem trans_source'' : (e.trans e').source = e.symm '' (e.target ∩ e'.source) := by
   rw [e.trans_source', e.symm_image_target_inter_eq]
-#align local_equiv.trans_source'' LocalEquiv.trans_source''
+#align local_equiv.trans_source'' PartialEquiv.trans_source''
 -/
 
-#print LocalEquiv.image_trans_source /-
+#print PartialEquiv.image_trans_source /-
 theorem image_trans_source : e '' (e.trans e').source = e.target ∩ e'.source :=
   (e.symm.restr e'.source).symm.image_source_eq_target
-#align local_equiv.image_trans_source LocalEquiv.image_trans_source
+#align local_equiv.image_trans_source PartialEquiv.image_trans_source
 -/
 
-#print LocalEquiv.trans_target /-
+#print PartialEquiv.trans_target /-
 @[simp, mfld_simps]
 theorem trans_target : (e.trans e').target = e'.target ∩ e'.symm ⁻¹' e.target :=
   rfl
-#align local_equiv.trans_target LocalEquiv.trans_target
+#align local_equiv.trans_target PartialEquiv.trans_target
 -/
 
-#print LocalEquiv.trans_target' /-
+#print PartialEquiv.trans_target' /-
 theorem trans_target' : (e.trans e').target = e'.target ∩ e'.symm ⁻¹' (e'.source ∩ e.target) :=
   trans_source' e'.symm e.symm
-#align local_equiv.trans_target' LocalEquiv.trans_target'
+#align local_equiv.trans_target' PartialEquiv.trans_target'
 -/
 
-#print LocalEquiv.trans_target'' /-
+#print PartialEquiv.trans_target'' /-
 theorem trans_target'' : (e.trans e').target = e' '' (e'.source ∩ e.target) :=
   trans_source'' e'.symm e.symm
-#align local_equiv.trans_target'' LocalEquiv.trans_target''
+#align local_equiv.trans_target'' PartialEquiv.trans_target''
 -/
 
-#print LocalEquiv.inv_image_trans_target /-
+#print PartialEquiv.inv_image_trans_target /-
 theorem inv_image_trans_target : e'.symm '' (e.trans e').target = e'.source ∩ e.target :=
   image_trans_source e'.symm e.symm
-#align local_equiv.inv_image_trans_target LocalEquiv.inv_image_trans_target
+#align local_equiv.inv_image_trans_target PartialEquiv.inv_image_trans_target
 -/
 
-#print LocalEquiv.trans_assoc /-
-theorem trans_assoc (e'' : LocalEquiv γ δ) : (e.trans e').trans e'' = e.trans (e'.trans e'') :=
-  LocalEquiv.ext (fun x => rfl) (fun x => rfl)
+#print PartialEquiv.trans_assoc /-
+theorem trans_assoc (e'' : PartialEquiv γ δ) : (e.trans e').trans e'' = e.trans (e'.trans e'') :=
+  PartialEquiv.ext (fun x => rfl) (fun x => rfl)
     (by simp [trans_source, @preimage_comp α β γ, inter_assoc])
-#align local_equiv.trans_assoc LocalEquiv.trans_assoc
+#align local_equiv.trans_assoc PartialEquiv.trans_assoc
 -/
 
-#print LocalEquiv.trans_refl /-
+#print PartialEquiv.trans_refl /-
 @[simp, mfld_simps]
-theorem trans_refl : e.trans (LocalEquiv.refl β) = e :=
-  LocalEquiv.ext (fun x => rfl) (fun x => rfl) (by simp [trans_source])
-#align local_equiv.trans_refl LocalEquiv.trans_refl
+theorem trans_refl : e.trans (PartialEquiv.refl β) = e :=
+  PartialEquiv.ext (fun x => rfl) (fun x => rfl) (by simp [trans_source])
+#align local_equiv.trans_refl PartialEquiv.trans_refl
 -/
 
-#print LocalEquiv.refl_trans /-
+#print PartialEquiv.refl_trans /-
 @[simp, mfld_simps]
-theorem refl_trans : (LocalEquiv.refl α).trans e = e :=
-  LocalEquiv.ext (fun x => rfl) (fun x => rfl) (by simp [trans_source, preimage_id])
-#align local_equiv.refl_trans LocalEquiv.refl_trans
+theorem refl_trans : (PartialEquiv.refl α).trans e = e :=
+  PartialEquiv.ext (fun x => rfl) (fun x => rfl) (by simp [trans_source, preimage_id])
+#align local_equiv.refl_trans PartialEquiv.refl_trans
 -/
 
-#print LocalEquiv.trans_refl_restr /-
-theorem trans_refl_restr (s : Set β) : e.trans ((LocalEquiv.refl β).restr s) = e.restr (e ⁻¹' s) :=
-  LocalEquiv.ext (fun x => rfl) (fun x => rfl) (by simp [trans_source])
-#align local_equiv.trans_refl_restr LocalEquiv.trans_refl_restr
+#print PartialEquiv.trans_refl_restr /-
+theorem trans_refl_restr (s : Set β) :
+    e.trans ((PartialEquiv.refl β).restr s) = e.restr (e ⁻¹' s) :=
+  PartialEquiv.ext (fun x => rfl) (fun x => rfl) (by simp [trans_source])
+#align local_equiv.trans_refl_restr PartialEquiv.trans_refl_restr
 -/
 
-#print LocalEquiv.trans_refl_restr' /-
+#print PartialEquiv.trans_refl_restr' /-
 theorem trans_refl_restr' (s : Set β) :
-    e.trans ((LocalEquiv.refl β).restr s) = e.restr (e.source ∩ e ⁻¹' s) :=
-  (LocalEquiv.ext (fun x => rfl) fun x => rfl) <| by simp [trans_source];
+    e.trans ((PartialEquiv.refl β).restr s) = e.restr (e.source ∩ e ⁻¹' s) :=
+  (PartialEquiv.ext (fun x => rfl) fun x => rfl) <| by simp [trans_source];
     rw [← inter_assoc, inter_self]
-#align local_equiv.trans_refl_restr' LocalEquiv.trans_refl_restr'
+#align local_equiv.trans_refl_restr' PartialEquiv.trans_refl_restr'
 -/
 
-#print LocalEquiv.restr_trans /-
+#print PartialEquiv.restr_trans /-
 theorem restr_trans (s : Set α) : (e.restr s).trans e' = (e.trans e').restr s :=
-  (LocalEquiv.ext (fun x => rfl) fun x => rfl) <| by simp [trans_source, inter_comm];
+  (PartialEquiv.ext (fun x => rfl) fun x => rfl) <| by simp [trans_source, inter_comm];
     rwa [inter_assoc]
-#align local_equiv.restr_trans LocalEquiv.restr_trans
+#align local_equiv.restr_trans PartialEquiv.restr_trans
 -/
 
-#print LocalEquiv.mem_symm_trans_source /-
+#print PartialEquiv.mem_symm_trans_source /-
 /-- A lemma commonly useful when `e` and `e'` are charts of a manifold. -/
-theorem mem_symm_trans_source {e' : LocalEquiv α γ} {x : α} (he : x ∈ e.source)
+theorem mem_symm_trans_source {e' : PartialEquiv α γ} {x : α} (he : x ∈ e.source)
     (he' : x ∈ e'.source) : e x ∈ (e.symm.trans e').source :=
-  ⟨e.MapsTo he, by rwa [mem_preimage, LocalEquiv.symm_symm, e.left_inv he]⟩
-#align local_equiv.mem_symm_trans_source LocalEquiv.mem_symm_trans_source
+  ⟨e.MapsTo he, by rwa [mem_preimage, PartialEquiv.symm_symm, e.left_inv he]⟩
+#align local_equiv.mem_symm_trans_source PartialEquiv.mem_symm_trans_source
 -/
 
-#print LocalEquiv.transEquiv /-
+#print PartialEquiv.transEquiv /-
 /-- Postcompose a local equivalence with an equivalence.
 We modify the source and target to have better definitional behavior. -/
 @[simps]
-def transEquiv (e' : β ≃ γ) : LocalEquiv α γ :=
-  (e.trans e'.toLocalEquiv).copy _ rfl _ rfl e.source (inter_univ _) (e'.symm ⁻¹' e.target)
+def transEquiv (e' : β ≃ γ) : PartialEquiv α γ :=
+  (e.trans e'.toPartialEquiv).copy _ rfl _ rfl e.source (inter_univ _) (e'.symm ⁻¹' e.target)
     (univ_inter _)
-#align local_equiv.trans_equiv LocalEquiv.transEquiv
+#align local_equiv.trans_equiv PartialEquiv.transEquiv
 -/
 
-#print LocalEquiv.transEquiv_eq_trans /-
-theorem transEquiv_eq_trans (e' : β ≃ γ) : e.transEquiv e' = e.trans e'.toLocalEquiv :=
+#print PartialEquiv.transEquiv_eq_trans /-
+theorem transEquiv_eq_trans (e' : β ≃ γ) : e.transEquiv e' = e.trans e'.toPartialEquiv :=
   copy_eq _ _ _ _ _ _ _ _ _
-#align local_equiv.trans_equiv_eq_trans LocalEquiv.transEquiv_eq_trans
+#align local_equiv.trans_equiv_eq_trans PartialEquiv.transEquiv_eq_trans
 -/
 
-#print Equiv.transLocalEquiv /-
+#print Equiv.transPartialEquiv /-
 /-- Precompose a local equivalence with an equivalence.
 We modify the source and target to have better definitional behavior. -/
 @[simps]
-def Equiv.transLocalEquiv (e : α ≃ β) : LocalEquiv α γ :=
-  (e.toLocalEquiv.trans e').copy _ rfl _ rfl (e ⁻¹' e'.source) (univ_inter _) e'.target
+def Equiv.transPartialEquiv (e : α ≃ β) : PartialEquiv α γ :=
+  (e.toPartialEquiv.trans e').copy _ rfl _ rfl (e ⁻¹' e'.source) (univ_inter _) e'.target
     (inter_univ _)
-#align equiv.trans_local_equiv Equiv.transLocalEquiv
+#align equiv.trans_local_equiv Equiv.transPartialEquiv
 -/
 
-#print Equiv.transLocalEquiv_eq_trans /-
-theorem Equiv.transLocalEquiv_eq_trans (e : α ≃ β) :
-    e.transLocalEquiv e' = e.toLocalEquiv.trans e' :=
+#print Equiv.transPartialEquiv_eq_trans /-
+theorem Equiv.transPartialEquiv_eq_trans (e : α ≃ β) :
+    e.transPartialEquiv e' = e.toPartialEquiv.trans e' :=
   copy_eq _ _ _ _ _ _ _ _ _
-#align equiv.trans_local_equiv_eq_trans Equiv.transLocalEquiv_eq_trans
+#align equiv.trans_local_equiv_eq_trans Equiv.transPartialEquiv_eq_trans
 -/
 
-#print LocalEquiv.EqOnSource /-
+#print PartialEquiv.EqOnSource /-
 /-- `eq_on_source e e'` means that `e` and `e'` have the same source, and coincide there. Then `e`
 and `e'` should really be considered the same local equiv. -/
-def EqOnSource (e e' : LocalEquiv α β) : Prop :=
+def EqOnSource (e e' : PartialEquiv α β) : Prop :=
   e.source = e'.source ∧ e.source.EqOn e e'
-#align local_equiv.eq_on_source LocalEquiv.EqOnSource
+#align local_equiv.eq_on_source PartialEquiv.EqOnSource
 -/
 
-#print LocalEquiv.eqOnSourceSetoid /-
+#print PartialEquiv.eqOnSourceSetoid /-
 /-- `eq_on_source` is an equivalence relation -/
-instance eqOnSourceSetoid : Setoid (LocalEquiv α β)
+instance eqOnSourceSetoid : Setoid (PartialEquiv α β)
     where
   R := EqOnSource
   iseqv :=
     ⟨fun e => by simp [eq_on_source], fun e e' h => by simp [eq_on_source, h.1.symm];
       exact fun x hx => (h.2 hx).symm, fun e e' e'' h h' =>
       ⟨by rwa [← h'.1, ← h.1], fun x hx => by rw [← h'.2, h.2 hx]; rwa [← h.1]⟩⟩
-#align local_equiv.eq_on_source_setoid LocalEquiv.eqOnSourceSetoid
+#align local_equiv.eq_on_source_setoid PartialEquiv.eqOnSourceSetoid
 -/
 
-#print LocalEquiv.eqOnSource_refl /-
+#print PartialEquiv.eqOnSource_refl /-
 theorem eqOnSource_refl : e ≈ e :=
   Setoid.refl _
-#align local_equiv.eq_on_source_refl LocalEquiv.eqOnSource_refl
+#align local_equiv.eq_on_source_refl PartialEquiv.eqOnSource_refl
 -/
 
-#print LocalEquiv.EqOnSource.source_eq /-
+#print PartialEquiv.EqOnSource.source_eq /-
 /-- Two equivalent local equivs have the same source -/
-theorem EqOnSource.source_eq {e e' : LocalEquiv α β} (h : e ≈ e') : e.source = e'.source :=
+theorem EqOnSource.source_eq {e e' : PartialEquiv α β} (h : e ≈ e') : e.source = e'.source :=
   h.1
-#align local_equiv.eq_on_source.source_eq LocalEquiv.EqOnSource.source_eq
+#align local_equiv.eq_on_source.source_eq PartialEquiv.EqOnSource.source_eq
 -/
 
-#print LocalEquiv.EqOnSource.eqOn /-
+#print PartialEquiv.EqOnSource.eqOn /-
 /-- Two equivalent local equivs coincide on the source -/
-theorem EqOnSource.eqOn {e e' : LocalEquiv α β} (h : e ≈ e') : e.source.EqOn e e' :=
+theorem EqOnSource.eqOn {e e' : PartialEquiv α β} (h : e ≈ e') : e.source.EqOn e e' :=
   h.2
-#align local_equiv.eq_on_source.eq_on LocalEquiv.EqOnSource.eqOn
+#align local_equiv.eq_on_source.eq_on PartialEquiv.EqOnSource.eqOn
 -/
 
-#print LocalEquiv.EqOnSource.target_eq /-
+#print PartialEquiv.EqOnSource.target_eq /-
 /-- Two equivalent local equivs have the same target -/
-theorem EqOnSource.target_eq {e e' : LocalEquiv α β} (h : e ≈ e') : e.target = e'.target := by
+theorem EqOnSource.target_eq {e e' : PartialEquiv α β} (h : e ≈ e') : e.target = e'.target := by
   simp only [← image_source_eq_target, ← h.source_eq, h.2.image_eq]
-#align local_equiv.eq_on_source.target_eq LocalEquiv.EqOnSource.target_eq
+#align local_equiv.eq_on_source.target_eq PartialEquiv.EqOnSource.target_eq
 -/
 
-#print LocalEquiv.EqOnSource.symm' /-
+#print PartialEquiv.EqOnSource.symm' /-
 /-- If two local equivs are equivalent, so are their inverses. -/
-theorem EqOnSource.symm' {e e' : LocalEquiv α β} (h : e ≈ e') : e.symm ≈ e'.symm :=
+theorem EqOnSource.symm' {e e' : PartialEquiv α β} (h : e ≈ e') : e.symm ≈ e'.symm :=
   by
   refine' ⟨h.target_eq, eq_on_of_left_inv_on_of_right_inv_on e.left_inv_on _ _⟩ <;>
     simp only [symm_source, h.target_eq, h.source_eq, e'.symm_maps_to]
   exact e'.right_inv_on.congr_right e'.symm_maps_to (h.source_eq ▸ h.eq_on.symm)
-#align local_equiv.eq_on_source.symm' LocalEquiv.EqOnSource.symm'
+#align local_equiv.eq_on_source.symm' PartialEquiv.EqOnSource.symm'
 -/
 
-#print LocalEquiv.EqOnSource.symm_eqOn /-
+#print PartialEquiv.EqOnSource.symm_eqOn /-
 /-- Two equivalent local equivs have coinciding inverses on the target -/
-theorem EqOnSource.symm_eqOn {e e' : LocalEquiv α β} (h : e ≈ e') : EqOn e.symm e'.symm e.target :=
+theorem EqOnSource.symm_eqOn {e e' : PartialEquiv α β} (h : e ≈ e') :
+    EqOn e.symm e'.symm e.target :=
   h.symm'.EqOn
-#align local_equiv.eq_on_source.symm_eq_on LocalEquiv.EqOnSource.symm_eqOn
+#align local_equiv.eq_on_source.symm_eq_on PartialEquiv.EqOnSource.symm_eqOn
 -/
 
-#print LocalEquiv.EqOnSource.trans' /-
+#print PartialEquiv.EqOnSource.trans' /-
 /-- Composition of local equivs respects equivalence -/
-theorem EqOnSource.trans' {e e' : LocalEquiv α β} {f f' : LocalEquiv β γ} (he : e ≈ e')
+theorem EqOnSource.trans' {e e' : PartialEquiv α β} {f f' : PartialEquiv β γ} (he : e ≈ e')
     (hf : f ≈ f') : e.trans f ≈ e'.trans f' :=
   by
   constructor
@@ -1048,70 +1051,70 @@ theorem EqOnSource.trans' {e e' : LocalEquiv α β} {f f' : LocalEquiv β γ} (h
   · intro x hx
     rw [trans_source] at hx 
     simp [(he.2 hx.1).symm, hf.2 hx.2]
-#align local_equiv.eq_on_source.trans' LocalEquiv.EqOnSource.trans'
+#align local_equiv.eq_on_source.trans' PartialEquiv.EqOnSource.trans'
 -/
 
-#print LocalEquiv.EqOnSource.restr /-
+#print PartialEquiv.EqOnSource.restr /-
 /-- Restriction of local equivs respects equivalence -/
-theorem EqOnSource.restr {e e' : LocalEquiv α β} (he : e ≈ e') (s : Set α) :
+theorem EqOnSource.restr {e e' : PartialEquiv α β} (he : e ≈ e') (s : Set α) :
     e.restr s ≈ e'.restr s := by
   constructor
   · simp [he.1]
   · intro x hx
     simp only [mem_inter_iff, restr_source] at hx 
     exact he.2 hx.1
-#align local_equiv.eq_on_source.restr LocalEquiv.EqOnSource.restr
+#align local_equiv.eq_on_source.restr PartialEquiv.EqOnSource.restr
 -/
 
-#print LocalEquiv.EqOnSource.source_inter_preimage_eq /-
+#print PartialEquiv.EqOnSource.source_inter_preimage_eq /-
 /-- Preimages are respected by equivalence -/
-theorem EqOnSource.source_inter_preimage_eq {e e' : LocalEquiv α β} (he : e ≈ e') (s : Set β) :
+theorem EqOnSource.source_inter_preimage_eq {e e' : PartialEquiv α β} (he : e ≈ e') (s : Set β) :
     e.source ∩ e ⁻¹' s = e'.source ∩ e' ⁻¹' s := by rw [he.eq_on.inter_preimage_eq, he.source_eq]
-#align local_equiv.eq_on_source.source_inter_preimage_eq LocalEquiv.EqOnSource.source_inter_preimage_eq
+#align local_equiv.eq_on_source.source_inter_preimage_eq PartialEquiv.EqOnSource.source_inter_preimage_eq
 -/
 
-#print LocalEquiv.trans_self_symm /-
+#print PartialEquiv.trans_self_symm /-
 /-- Composition of a local equiv and its inverse is equivalent to the restriction of the identity
 to the source -/
-theorem trans_self_symm : e.trans e.symm ≈ LocalEquiv.ofSet e.source :=
+theorem trans_self_symm : e.trans e.symm ≈ PartialEquiv.ofSet e.source :=
   by
   have A : (e.trans e.symm).source = e.source := by mfld_set_tac
   refine' ⟨by simp [A], fun x hx => _⟩
   rw [A] at hx 
   simp only [hx, mfld_simps]
-#align local_equiv.trans_self_symm LocalEquiv.trans_self_symm
+#align local_equiv.trans_self_symm PartialEquiv.trans_self_symm
 -/
 
-#print LocalEquiv.trans_symm_self /-
+#print PartialEquiv.trans_symm_self /-
 /-- Composition of the inverse of a local equiv and this local equiv is equivalent to the
 restriction of the identity to the target -/
-theorem trans_symm_self : e.symm.trans e ≈ LocalEquiv.ofSet e.target :=
+theorem trans_symm_self : e.symm.trans e ≈ PartialEquiv.ofSet e.target :=
   trans_self_symm e.symm
-#align local_equiv.trans_symm_self LocalEquiv.trans_symm_self
+#align local_equiv.trans_symm_self PartialEquiv.trans_symm_self
 -/
 
-#print LocalEquiv.eq_of_eqOnSource_univ /-
+#print PartialEquiv.eq_of_eqOnSource_univ /-
 /-- Two equivalent local equivs are equal when the source and target are univ -/
-theorem eq_of_eqOnSource_univ (e e' : LocalEquiv α β) (h : e ≈ e') (s : e.source = univ)
+theorem eq_of_eqOnSource_univ (e e' : PartialEquiv α β) (h : e ≈ e') (s : e.source = univ)
     (t : e.target = univ) : e = e' :=
   by
-  apply LocalEquiv.ext (fun x => _) (fun x => _) h.1
+  apply PartialEquiv.ext (fun x => _) (fun x => _) h.1
   · apply h.2
     rw [s]
     exact mem_univ _
   · apply h.symm'.2
     rw [symm_source, t]
     exact mem_univ _
-#align local_equiv.eq_of_eq_on_source_univ LocalEquiv.eq_of_eqOnSource_univ
+#align local_equiv.eq_of_eq_on_source_univ PartialEquiv.eq_of_eqOnSource_univ
 -/
 
 section Prod
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print LocalEquiv.prod /-
+#print PartialEquiv.prod /-
 /-- The product of two local equivs, as a local equiv on the product. -/
-def prod (e : LocalEquiv α β) (e' : LocalEquiv γ δ) : LocalEquiv (α × γ) (β × δ)
+def prod (e : PartialEquiv α β) (e' : PartialEquiv γ δ) : PartialEquiv (α × γ) (β × δ)
     where
   source := e.source ×ˢ e'.source
   target := e.target ×ˢ e'.target
@@ -1121,76 +1124,77 @@ def prod (e : LocalEquiv α β) (e' : LocalEquiv γ δ) : LocalEquiv (α × γ)
   map_target' p hp := by simp at hp ; simp [map_target, hp]
   left_inv' p hp := by simp at hp ; simp [hp]
   right_inv' p hp := by simp at hp ; simp [hp]
-#align local_equiv.prod LocalEquiv.prod
+#align local_equiv.prod PartialEquiv.prod
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print LocalEquiv.prod_source /-
+#print PartialEquiv.prod_source /-
 @[simp, mfld_simps]
-theorem prod_source (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
+theorem prod_source (e : PartialEquiv α β) (e' : PartialEquiv γ δ) :
     (e.Prod e').source = e.source ×ˢ e'.source :=
   rfl
-#align local_equiv.prod_source LocalEquiv.prod_source
+#align local_equiv.prod_source PartialEquiv.prod_source
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print LocalEquiv.prod_target /-
+#print PartialEquiv.prod_target /-
 @[simp, mfld_simps]
-theorem prod_target (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
+theorem prod_target (e : PartialEquiv α β) (e' : PartialEquiv γ δ) :
     (e.Prod e').target = e.target ×ˢ e'.target :=
   rfl
-#align local_equiv.prod_target LocalEquiv.prod_target
+#align local_equiv.prod_target PartialEquiv.prod_target
 -/
 
-#print LocalEquiv.prod_coe /-
+#print PartialEquiv.prod_coe /-
 @[simp, mfld_simps]
-theorem prod_coe (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
+theorem prod_coe (e : PartialEquiv α β) (e' : PartialEquiv γ δ) :
     (e.Prod e' : α × γ → β × δ) = fun p => (e p.1, e' p.2) :=
   rfl
-#align local_equiv.prod_coe LocalEquiv.prod_coe
+#align local_equiv.prod_coe PartialEquiv.prod_coe
 -/
 
-#print LocalEquiv.prod_coe_symm /-
-theorem prod_coe_symm (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
+#print PartialEquiv.prod_coe_symm /-
+theorem prod_coe_symm (e : PartialEquiv α β) (e' : PartialEquiv γ δ) :
     ((e.Prod e').symm : β × δ → α × γ) = fun p => (e.symm p.1, e'.symm p.2) :=
   rfl
-#align local_equiv.prod_coe_symm LocalEquiv.prod_coe_symm
+#align local_equiv.prod_coe_symm PartialEquiv.prod_coe_symm
 -/
 
-#print LocalEquiv.prod_symm /-
+#print PartialEquiv.prod_symm /-
 @[simp, mfld_simps]
-theorem prod_symm (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
+theorem prod_symm (e : PartialEquiv α β) (e' : PartialEquiv γ δ) :
     (e.Prod e').symm = e.symm.Prod e'.symm := by ext x <;> simp [prod_coe_symm]
-#align local_equiv.prod_symm LocalEquiv.prod_symm
+#align local_equiv.prod_symm PartialEquiv.prod_symm
 -/
 
-#print LocalEquiv.refl_prod_refl /-
+#print PartialEquiv.refl_prod_refl /-
 @[simp, mfld_simps]
-theorem refl_prod_refl : (LocalEquiv.refl α).Prod (LocalEquiv.refl β) = LocalEquiv.refl (α × β) :=
-  by ext1 ⟨x, y⟩; · rfl; · rintro ⟨x, y⟩; rfl; exact univ_prod_univ
-#align local_equiv.refl_prod_refl LocalEquiv.refl_prod_refl
+theorem refl_prod_refl :
+    (PartialEquiv.refl α).Prod (PartialEquiv.refl β) = PartialEquiv.refl (α × β) := by ext1 ⟨x, y⟩;
+  · rfl; · rintro ⟨x, y⟩; rfl; exact univ_prod_univ
+#align local_equiv.refl_prod_refl PartialEquiv.refl_prod_refl
 -/
 
-#print LocalEquiv.prod_trans /-
+#print PartialEquiv.prod_trans /-
 @[simp, mfld_simps]
-theorem prod_trans {η : Type _} {ε : Type _} (e : LocalEquiv α β) (f : LocalEquiv β γ)
-    (e' : LocalEquiv δ η) (f' : LocalEquiv η ε) :
+theorem prod_trans {η : Type _} {ε : Type _} (e : PartialEquiv α β) (f : PartialEquiv β γ)
+    (e' : PartialEquiv δ η) (f' : PartialEquiv η ε) :
     (e.Prod e').trans (f.Prod f') = (e.trans f).Prod (e'.trans f') := by
   ext x <;> simp [ext_iff] <;> tauto
-#align local_equiv.prod_trans LocalEquiv.prod_trans
+#align local_equiv.prod_trans PartialEquiv.prod_trans
 -/
 
 end Prod
 
-#print LocalEquiv.piecewise /-
+#print PartialEquiv.piecewise /-
 /-- Combine two `local_equiv`s using `set.piecewise`. The source of the new `local_equiv` is
 `s.ite e.source e'.source = e.source ∩ s ∪ e'.source \ s`, and similarly for target.  The function
 sends `e.source ∩ s` to `e.target ∩ t` using `e` and `e'.source \ s` to `e'.target \ t` using `e'`,
 and similarly for the inverse function. The definition assumes `e.is_image s t` and
 `e'.is_image s t`. -/
 @[simps (config := { fullyApplied := false })]
-def piecewise (e e' : LocalEquiv α β) (s : Set α) (t : Set β) [∀ x, Decidable (x ∈ s)]
-    [∀ y, Decidable (y ∈ t)] (H : e.IsImage s t) (H' : e'.IsImage s t) : LocalEquiv α β
+def piecewise (e e' : PartialEquiv α β) (s : Set α) (t : Set β) [∀ x, Decidable (x ∈ s)]
+    [∀ y, Decidable (y ∈ t)] (H : e.IsImage s t) (H' : e'.IsImage s t) : PartialEquiv α β
     where
   toFun := s.piecewise e e'
   invFun := t.piecewise e.symm e'.symm
@@ -1200,50 +1204,50 @@ def piecewise (e e' : LocalEquiv α β) (s : Set α) (t : Set β) [∀ x, Decida
   map_target' := H.symm.MapsTo.piecewise_ite H'.symm.compl.MapsTo
   left_inv' := H.leftInvOn_piecewise H'
   right_inv' := H.symm.leftInvOn_piecewise H'.symm
-#align local_equiv.piecewise LocalEquiv.piecewise
+#align local_equiv.piecewise PartialEquiv.piecewise
 -/
 
-#print LocalEquiv.symm_piecewise /-
-theorem symm_piecewise (e e' : LocalEquiv α β) {s : Set α} {t : Set β} [∀ x, Decidable (x ∈ s)]
+#print PartialEquiv.symm_piecewise /-
+theorem symm_piecewise (e e' : PartialEquiv α β) {s : Set α} {t : Set β} [∀ x, Decidable (x ∈ s)]
     [∀ y, Decidable (y ∈ t)] (H : e.IsImage s t) (H' : e'.IsImage s t) :
     (e.piecewise e' s t H H').symm = e.symm.piecewise e'.symm t s H.symm H'.symm :=
   rfl
-#align local_equiv.symm_piecewise LocalEquiv.symm_piecewise
+#align local_equiv.symm_piecewise PartialEquiv.symm_piecewise
 -/
 
-#print LocalEquiv.disjointUnion /-
+#print PartialEquiv.disjointUnion /-
 /-- Combine two `local_equiv`s with disjoint sources and disjoint targets. We reuse
 `local_equiv.piecewise`, then override `source` and `target` to ensure better definitional
 equalities. -/
 @[simps (config := { fullyApplied := false })]
-def disjointUnion (e e' : LocalEquiv α β) (hs : Disjoint e.source e'.source)
+def disjointUnion (e e' : PartialEquiv α β) (hs : Disjoint e.source e'.source)
     (ht : Disjoint e.target e'.target) [∀ x, Decidable (x ∈ e.source)]
-    [∀ y, Decidable (y ∈ e.target)] : LocalEquiv α β :=
+    [∀ y, Decidable (y ∈ e.target)] : PartialEquiv α β :=
   (e.piecewise e' e.source e.target e.isImage_source_target <|
         e'.isImage_source_target_of_disjoint _ hs.symm ht.symm).copy
     _ rfl _ rfl (e.source ∪ e'.source) (ite_left _ _) (e.target ∪ e'.target) (ite_left _ _)
-#align local_equiv.disjoint_union LocalEquiv.disjointUnion
+#align local_equiv.disjoint_union PartialEquiv.disjointUnion
 -/
 
-#print LocalEquiv.disjointUnion_eq_piecewise /-
-theorem disjointUnion_eq_piecewise (e e' : LocalEquiv α β) (hs : Disjoint e.source e'.source)
+#print PartialEquiv.disjointUnion_eq_piecewise /-
+theorem disjointUnion_eq_piecewise (e e' : PartialEquiv α β) (hs : Disjoint e.source e'.source)
     (ht : Disjoint e.target e'.target) [∀ x, Decidable (x ∈ e.source)]
     [∀ y, Decidable (y ∈ e.target)] :
     e.disjointUnion e' hs ht =
       e.piecewise e' e.source e.target e.isImage_source_target
         (e'.isImage_source_target_of_disjoint _ hs.symm ht.symm) :=
   copy_eq _ _ _ _ _ _ _ _ _
-#align local_equiv.disjoint_union_eq_piecewise LocalEquiv.disjointUnion_eq_piecewise
+#align local_equiv.disjoint_union_eq_piecewise PartialEquiv.disjointUnion_eq_piecewise
 -/
 
 section Pi
 
-variable {ι : Type _} {αi βi : ι → Type _} (ei : ∀ i, LocalEquiv (αi i) (βi i))
+variable {ι : Type _} {αi βi : ι → Type _} (ei : ∀ i, PartialEquiv (αi i) (βi i))
 
-#print LocalEquiv.pi /-
+#print PartialEquiv.pi /-
 /-- The product of a family of local equivs, as a local equiv on the pi type. -/
 @[simps (config := mfld_cfg)]
-protected def pi : LocalEquiv (∀ i, αi i) (∀ i, βi i)
+protected def pi : PartialEquiv (∀ i, αi i) (∀ i, βi i)
     where
   toFun f i := ei i (f i)
   invFun f i := (ei i).symm (f i)
@@ -1253,22 +1257,23 @@ protected def pi : LocalEquiv (∀ i, αi i) (∀ i, βi i)
   map_target' f hf i hi := (ei i).map_target (hf i hi)
   left_inv' f hf := funext fun i => (ei i).left_inv (hf i trivial)
   right_inv' f hf := funext fun i => (ei i).right_inv (hf i trivial)
-#align local_equiv.pi LocalEquiv.pi
+#align local_equiv.pi PartialEquiv.pi
 -/
 
 end Pi
 
-end LocalEquiv
+end PartialEquiv
 
 namespace Set
 
-#print Set.BijOn.toLocalEquiv /-
+#print Set.BijOn.toPartialEquiv /-
 -- All arguments are explicit to avoid missing information in the pretty printer output
 /-- A bijection between two sets `s : set α` and `t : set β` provides a local equivalence
 between `α` and `β`. -/
 @[simps (config := { fullyApplied := false })]
-noncomputable def BijOn.toLocalEquiv [Nonempty α] (f : α → β) (s : Set α) (t : Set β)
-    (hf : BijOn f s t) : LocalEquiv α β where
+noncomputable def BijOn.toPartialEquiv [Nonempty α] (f : α → β) (s : Set α) (t : Set β)
+    (hf : BijOn f s t) : PartialEquiv α β
+    where
   toFun := f
   invFun := invFunOn f s
   source := s
@@ -1277,16 +1282,16 @@ noncomputable def BijOn.toLocalEquiv [Nonempty α] (f : α → β) (s : Set α)
   map_target' := hf.SurjOn.mapsTo_invFunOn
   left_inv' := hf.invOn_invFunOn.1
   right_inv' := hf.invOn_invFunOn.2
-#align set.bij_on.to_local_equiv Set.BijOn.toLocalEquiv
+#align set.bij_on.to_local_equiv Set.BijOn.toPartialEquiv
 -/
 
-#print Set.InjOn.toLocalEquiv /-
+#print Set.InjOn.toPartialEquiv /-
 /-- A map injective on a subset of its domain provides a local equivalence. -/
 @[simp, mfld_simps]
-noncomputable def InjOn.toLocalEquiv [Nonempty α] (f : α → β) (s : Set α) (hf : InjOn f s) :
-    LocalEquiv α β :=
-  hf.bijOn_image.toLocalEquiv f s (f '' s)
-#align set.inj_on.to_local_equiv Set.InjOn.toLocalEquiv
+noncomputable def InjOn.toPartialEquiv [Nonempty α] (f : α → β) (s : Set α) (hf : InjOn f s) :
+    PartialEquiv α β :=
+  hf.bijOn_image.toPartialEquiv f s (f '' s)
+#align set.inj_on.to_local_equiv Set.InjOn.toPartialEquiv
 -/
 
 end Set
@@ -1297,26 +1302,27 @@ namespace Equiv
 equiv to that of the equiv. -/
 variable (e : α ≃ β) (e' : β ≃ γ)
 
-#print Equiv.refl_toLocalEquiv /-
+#print Equiv.refl_toPartialEquiv /-
 @[simp, mfld_simps]
-theorem refl_toLocalEquiv : (Equiv.refl α).toLocalEquiv = LocalEquiv.refl α :=
+theorem refl_toPartialEquiv : (Equiv.refl α).toPartialEquiv = PartialEquiv.refl α :=
   rfl
-#align equiv.refl_to_local_equiv Equiv.refl_toLocalEquiv
+#align equiv.refl_to_local_equiv Equiv.refl_toPartialEquiv
 -/
 
-#print Equiv.symm_toLocalEquiv /-
+#print Equiv.symm_toPartialEquiv /-
 @[simp, mfld_simps]
-theorem symm_toLocalEquiv : e.symm.toLocalEquiv = e.toLocalEquiv.symm :=
+theorem symm_toPartialEquiv : e.symm.toPartialEquiv = e.toPartialEquiv.symm :=
   rfl
-#align equiv.symm_to_local_equiv Equiv.symm_toLocalEquiv
+#align equiv.symm_to_local_equiv Equiv.symm_toPartialEquiv
 -/
 
-#print Equiv.trans_toLocalEquiv /-
+#print Equiv.trans_toPartialEquiv /-
 @[simp, mfld_simps]
-theorem trans_toLocalEquiv : (e.trans e').toLocalEquiv = e.toLocalEquiv.trans e'.toLocalEquiv :=
-  LocalEquiv.ext (fun x => rfl) (fun x => rfl)
-    (by simp [LocalEquiv.trans_source, Equiv.toLocalEquiv])
-#align equiv.trans_to_local_equiv Equiv.trans_toLocalEquiv
+theorem trans_toPartialEquiv :
+    (e.trans e').toPartialEquiv = e.toPartialEquiv.trans e'.toPartialEquiv :=
+  PartialEquiv.ext (fun x => rfl) (fun x => rfl)
+    (by simp [PartialEquiv.trans_source, Equiv.toPartialEquiv])
+#align equiv.trans_to_local_equiv Equiv.trans_toPartialEquiv
 -/
 
 end Equiv
Diff
@@ -1090,9 +1090,9 @@ theorem trans_symm_self : e.symm.trans e ≈ LocalEquiv.ofSet e.target :=
 #align local_equiv.trans_symm_self LocalEquiv.trans_symm_self
 -/
 
-#print LocalEquiv.eq_of_eq_on_source_univ /-
+#print LocalEquiv.eq_of_eqOnSource_univ /-
 /-- Two equivalent local equivs are equal when the source and target are univ -/
-theorem eq_of_eq_on_source_univ (e e' : LocalEquiv α β) (h : e ≈ e') (s : e.source = univ)
+theorem eq_of_eqOnSource_univ (e e' : LocalEquiv α β) (h : e ≈ e') (s : e.source = univ)
     (t : e.target = univ) : e = e' :=
   by
   apply LocalEquiv.ext (fun x => _) (fun x => _) h.1
@@ -1102,7 +1102,7 @@ theorem eq_of_eq_on_source_univ (e e' : LocalEquiv α β) (h : e ≈ e') (s : e.
   · apply h.symm'.2
     rw [symm_source, t]
     exact mem_univ _
-#align local_equiv.eq_of_eq_on_source_univ LocalEquiv.eq_of_eq_on_source_univ
+#align local_equiv.eq_of_eq_on_source_univ LocalEquiv.eq_of_eqOnSource_univ
 -/
 
 section Prod
Diff
@@ -3,8 +3,8 @@ 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.Data.Set.Function
-import Mathbin.Logic.Equiv.Defs
+import Data.Set.Function
+import Logic.Equiv.Defs
 
 #align_import logic.equiv.local_equiv from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4"
 
@@ -81,8 +81,8 @@ def mfld_cfg : SimpsCfg where
 
 namespace Tactic.Interactive
 
-/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
-/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:337:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:337:4: warning: unsupported (TODO): `[tacs] -/
 -- PLEASE REPORT THIS TO MATHPORT DEVS, THIS SHOULD NOT HAPPEN.
 -- failed to format: unknown constant 'term.pseudo.antiquot'
 /--
Diff
@@ -448,7 +448,7 @@ theorem iff_preimage_eq : e.IsImage s t ↔ e.source ∩ e ⁻¹' t = e.source 
 #align local_equiv.is_image.iff_preimage_eq LocalEquiv.IsImage.iff_preimage_eq
 -/
 
-alias iff_preimage_eq ↔ preimage_eq of_preimage_eq
+alias ⟨preimage_eq, of_preimage_eq⟩ := iff_preimage_eq
 #align local_equiv.is_image.preimage_eq LocalEquiv.IsImage.preimage_eq
 #align local_equiv.is_image.of_preimage_eq LocalEquiv.IsImage.of_preimage_eq
 
@@ -458,7 +458,7 @@ theorem iff_symm_preimage_eq : e.IsImage s t ↔ e.target ∩ e.symm ⁻¹' s =
 #align local_equiv.is_image.iff_symm_preimage_eq LocalEquiv.IsImage.iff_symm_preimage_eq
 -/
 
-alias iff_symm_preimage_eq ↔ symm_preimage_eq of_symm_preimage_eq
+alias ⟨symm_preimage_eq, of_symm_preimage_eq⟩ := iff_symm_preimage_eq
 #align local_equiv.is_image.symm_preimage_eq LocalEquiv.IsImage.symm_preimage_eq
 #align local_equiv.is_image.of_symm_preimage_eq LocalEquiv.IsImage.of_symm_preimage_eq
 
Diff
@@ -2,15 +2,12 @@
 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 logic.equiv.local_equiv
-! leanprover-community/mathlib commit 48fb5b5280e7c81672afc9524185ae994553ebf4
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Data.Set.Function
 import Mathbin.Logic.Equiv.Defs
 
+#align_import logic.equiv.local_equiv from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4"
+
 /-!
 # Local equivalences
 
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 logic.equiv.local_equiv
-! leanprover-community/mathlib commit be24ec5de6701447e5df5ca75400ffee19d65659
+! leanprover-community/mathlib commit 48fb5b5280e7c81672afc9524185ae994553ebf4
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -74,34 +74,6 @@ then it should use `e.source ∩ s` or `e.target ∩ t`, not `s ∩ e.source` or
 -/
 
 
--- PLEASE REPORT THIS TO MATHPORT DEVS, THIS SHOULD NOT HAPPEN.
--- failed to format: unknown constant 'Lean.Meta._root_.Lean.Parser.Command.registerSimpAttr'
-/--
-    The simpset `mfld_simps` records several simp lemmas that are
-    especially useful in manifolds. It is a subset of the whole set of simp lemmas, but it makes it
-    possible to have quicker proofs (when used with `squeeze_simp` or `simp only`) while retaining
-    readability.
-    
-    The typical use case is the following, in a file on manifolds:
-    If `simp [foo, bar]` is slow, replace it with `squeeze_simp [foo, bar] with mfld_simps` and paste
-    its output. The list of lemmas should be reasonable (contrary to the output of
-    `squeeze_simp [foo, bar]` which might contain tens of lemmas), and the outcome should be quick
-    enough.
-     -/
-  register_simp_attr
-  mfld_simps
-
--- register in the simpset `mfld_simps` several lemmas that are often useful when dealing
--- with manifolds
-attribute [mfld_simps] id.def Function.comp.left_id Set.mem_setOf_eq Set.image_eq_empty
-  Set.univ_inter Set.preimage_univ Set.prod_mk_mem_set_prod_eq and_true_iff Set.mem_univ
-  Set.mem_image_of_mem true_and_iff Set.mem_inter_iff Set.mem_preimage Function.comp_apply
-  Set.inter_subset_left Set.mem_prod Set.range_id Set.range_prod_map and_self_iff Set.mem_range_self
-  eq_self_iff_true forall_const forall_true_iff Set.inter_univ Set.preimage_id
-  Function.comp.right_id not_false_iff and_imp Set.prod_inter_prod Set.univ_prod_univ true_or_iff
-  or_true_iff Prod.map_mk Set.preimage_inter heq_iff_eq Equiv.sigmaEquivProd_apply
-  Equiv.sigmaEquivProd_symm_apply Subtype.coe_mk Equiv.toFun_as_coe Equiv.invFun_as_coe
-
 #print mfld_cfg /-
 /-- Common `@[simps]` configuration options used for manifold-related declarations. -/
 def mfld_cfg : SimpsCfg where
Diff
@@ -102,11 +102,13 @@ attribute [mfld_simps] id.def Function.comp.left_id Set.mem_setOf_eq Set.image_e
   or_true_iff Prod.map_mk Set.preimage_inter heq_iff_eq Equiv.sigmaEquivProd_apply
   Equiv.sigmaEquivProd_symm_apply Subtype.coe_mk Equiv.toFun_as_coe Equiv.invFun_as_coe
 
+#print mfld_cfg /-
 /-- Common `@[simps]` configuration options used for manifold-related declarations. -/
 def mfld_cfg : SimpsCfg where
   attrs := [`simp, `mfld_simps]
   fullyApplied := false
 #align mfld_cfg mfld_cfg
+-/
 
 namespace Tactic.Interactive
 
@@ -194,26 +196,32 @@ theorem coe_mk (f : α → β) (g s t ml mr il ir) : (LocalEquiv.mk f g s t ml m
   rfl
 #align local_equiv.coe_mk LocalEquiv.coe_mk
 
+#print LocalEquiv.coe_symm_mk /-
 @[simp, mfld_simps]
 theorem coe_symm_mk (f : α → β) (g s t ml mr il ir) :
     ((LocalEquiv.mk f g s t ml mr il ir).symm : β → α) = g :=
   rfl
 #align local_equiv.coe_symm_mk LocalEquiv.coe_symm_mk
+-/
 
 @[simp, mfld_simps]
 theorem toFun_as_coe : e.toFun = e :=
   rfl
 #align local_equiv.to_fun_as_coe LocalEquiv.toFun_as_coe
 
+#print LocalEquiv.invFun_as_coe /-
 @[simp, mfld_simps]
 theorem invFun_as_coe : e.invFun = e.symm :=
   rfl
 #align local_equiv.inv_fun_as_coe LocalEquiv.invFun_as_coe
+-/
 
+#print LocalEquiv.map_source /-
 @[simp, mfld_simps]
 theorem map_source {x : α} (h : x ∈ e.source) : e x ∈ e.target :=
   e.map_source' h
 #align local_equiv.map_source LocalEquiv.map_source
+-/
 
 #print LocalEquiv.map_target /-
 @[simp, mfld_simps]
@@ -222,10 +230,12 @@ theorem map_target {x : β} (h : x ∈ e.target) : e.symm x ∈ e.source :=
 #align local_equiv.map_target LocalEquiv.map_target
 -/
 
+#print LocalEquiv.left_inv /-
 @[simp, mfld_simps]
 theorem left_inv {x : α} (h : x ∈ e.source) : e.symm (e x) = x :=
   e.left_inv' h
 #align local_equiv.left_inv LocalEquiv.left_inv
+-/
 
 #print LocalEquiv.right_inv /-
 @[simp, mfld_simps]
@@ -234,13 +244,17 @@ theorem right_inv {x : β} (h : x ∈ e.target) : e (e.symm x) = x :=
 #align local_equiv.right_inv LocalEquiv.right_inv
 -/
 
+#print LocalEquiv.eq_symm_apply /-
 theorem eq_symm_apply {x : α} {y : β} (hx : x ∈ e.source) (hy : y ∈ e.target) :
     x = e.symm y ↔ e x = y :=
   ⟨fun h => by rw [← e.right_inv hy, h], fun h => by rw [← e.left_inv hx, h]⟩
 #align local_equiv.eq_symm_apply LocalEquiv.eq_symm_apply
+-/
 
+#print LocalEquiv.mapsTo /-
 protected theorem mapsTo : MapsTo e e.source e.target := fun x => e.map_source
 #align local_equiv.maps_to LocalEquiv.mapsTo
+-/
 
 #print LocalEquiv.symm_mapsTo /-
 theorem symm_mapsTo : MapsTo e.symm e.target e.source :=
@@ -248,27 +262,39 @@ theorem symm_mapsTo : MapsTo e.symm e.target e.source :=
 #align local_equiv.symm_maps_to LocalEquiv.symm_mapsTo
 -/
 
+#print LocalEquiv.leftInvOn /-
 protected theorem leftInvOn : LeftInvOn e.symm e e.source := fun x => e.left_inv
 #align local_equiv.left_inv_on LocalEquiv.leftInvOn
+-/
 
+#print LocalEquiv.rightInvOn /-
 protected theorem rightInvOn : RightInvOn e.symm e e.target := fun x => e.right_inv
 #align local_equiv.right_inv_on LocalEquiv.rightInvOn
+-/
 
+#print LocalEquiv.invOn /-
 protected theorem invOn : InvOn e.symm e e.source e.target :=
   ⟨e.LeftInvOn, e.RightInvOn⟩
 #align local_equiv.inv_on LocalEquiv.invOn
+-/
 
+#print LocalEquiv.injOn /-
 protected theorem injOn : InjOn e e.source :=
   e.LeftInvOn.InjOn
 #align local_equiv.inj_on LocalEquiv.injOn
+-/
 
+#print LocalEquiv.bijOn /-
 protected theorem bijOn : BijOn e e.source e.target :=
   e.InvOn.BijOn e.MapsTo e.symm_mapsTo
 #align local_equiv.bij_on LocalEquiv.bijOn
+-/
 
+#print LocalEquiv.surjOn /-
 protected theorem surjOn : SurjOn e e.source e.target :=
   e.BijOn.SurjOn
 #align local_equiv.surj_on LocalEquiv.surjOn
+-/
 
 #print Equiv.toLocalEquiv /-
 /-- Associating a local_equiv to an equiv-/
@@ -309,10 +335,12 @@ def copy (e : LocalEquiv α β) (f : α → β) (hf : ⇑e = f) (g : β → α)
 #align local_equiv.copy LocalEquiv.copy
 -/
 
+#print LocalEquiv.copy_eq /-
 theorem copy_eq (e : LocalEquiv α β) (f : α → β) (hf : ⇑e = f) (g : β → α) (hg : ⇑e.symm = g)
     (s : Set α) (hs : e.source = s) (t : Set β) (ht : e.target = t) :
     e.copy f hf g hg s hs t ht = e := by substs f g s t; cases e; rfl
 #align local_equiv.copy_eq LocalEquiv.copy_eq
+-/
 
 #print LocalEquiv.toEquiv /-
 /-- Associating to a local_equiv an equiv between the source and the target -/
@@ -332,14 +360,18 @@ theorem symm_source : e.symm.source = e.target :=
 #align local_equiv.symm_source LocalEquiv.symm_source
 -/
 
+#print LocalEquiv.symm_target /-
 @[simp, mfld_simps]
 theorem symm_target : e.symm.target = e.source :=
   rfl
 #align local_equiv.symm_target LocalEquiv.symm_target
+-/
 
+#print LocalEquiv.symm_symm /-
 @[simp, mfld_simps]
 theorem symm_symm : e.symm.symm = e := by cases e; rfl
 #align local_equiv.symm_symm LocalEquiv.symm_symm
+-/
 
 #print LocalEquiv.image_source_eq_target /-
 theorem image_source_eq_target : e '' e.source = e.target :=
@@ -353,9 +385,11 @@ theorem forall_mem_target {p : β → Prop} : (∀ y ∈ e.target, p y) ↔ ∀
 #align local_equiv.forall_mem_target LocalEquiv.forall_mem_target
 -/
 
+#print LocalEquiv.exists_mem_target /-
 theorem exists_mem_target {p : β → Prop} : (∃ y ∈ e.target, p y) ↔ ∃ x ∈ e.source, p (e x) := by
   rw [← image_source_eq_target, bex_image_iff]
 #align local_equiv.exists_mem_target LocalEquiv.exists_mem_target
+-/
 
 #print LocalEquiv.IsImage /-
 /-- We say that `t : set β` is an image of `s : set α` under a local equivalence if
@@ -374,17 +408,23 @@ namespace IsImage
 
 variable {e} {s : Set α} {t : Set β} {x : α} {y : β}
 
+#print LocalEquiv.IsImage.apply_mem_iff /-
 theorem apply_mem_iff (h : e.IsImage s t) (hx : x ∈ e.source) : e x ∈ t ↔ x ∈ s :=
   h hx
 #align local_equiv.is_image.apply_mem_iff LocalEquiv.IsImage.apply_mem_iff
+-/
 
+#print LocalEquiv.IsImage.symm_apply_mem_iff /-
 theorem symm_apply_mem_iff (h : e.IsImage s t) : ∀ ⦃y⦄, y ∈ e.target → (e.symm y ∈ s ↔ y ∈ t) :=
   e.forall_mem_target.mpr fun x hx => by rw [e.left_inv hx, h hx]
 #align local_equiv.is_image.symm_apply_mem_iff LocalEquiv.IsImage.symm_apply_mem_iff
+-/
 
+#print LocalEquiv.IsImage.symm /-
 protected theorem symm (h : e.IsImage s t) : e.symm.IsImage t s :=
   h.symm_apply_mem_iff
 #align local_equiv.is_image.symm LocalEquiv.IsImage.symm
+-/
 
 #print LocalEquiv.IsImage.symm_iff /-
 @[simp]
@@ -393,13 +433,17 @@ theorem symm_iff : e.symm.IsImage t s ↔ e.IsImage s t :=
 #align local_equiv.is_image.symm_iff LocalEquiv.IsImage.symm_iff
 -/
 
+#print LocalEquiv.IsImage.mapsTo /-
 protected theorem mapsTo (h : e.IsImage s t) : MapsTo e (e.source ∩ s) (e.target ∩ t) := fun x hx =>
   ⟨e.MapsTo hx.1, (h hx.1).2 hx.2⟩
 #align local_equiv.is_image.maps_to LocalEquiv.IsImage.mapsTo
+-/
 
+#print LocalEquiv.IsImage.symm_mapsTo /-
 theorem symm_mapsTo (h : e.IsImage s t) : MapsTo e.symm (e.target ∩ t) (e.source ∩ s) :=
   h.symm.MapsTo
 #align local_equiv.is_image.symm_maps_to LocalEquiv.IsImage.symm_mapsTo
+-/
 
 #print LocalEquiv.IsImage.restr /-
 /-- Restrict a `local_equiv` to a pair of corresponding sets. -/
@@ -417,54 +461,75 @@ def restr (h : e.IsImage s t) : LocalEquiv α β
 #align local_equiv.is_image.restr LocalEquiv.IsImage.restr
 -/
 
+#print LocalEquiv.IsImage.image_eq /-
 theorem image_eq (h : e.IsImage s t) : e '' (e.source ∩ s) = e.target ∩ t :=
   h.restr.image_source_eq_target
 #align local_equiv.is_image.image_eq LocalEquiv.IsImage.image_eq
+-/
 
+#print LocalEquiv.IsImage.symm_image_eq /-
 theorem symm_image_eq (h : e.IsImage s t) : e.symm '' (e.target ∩ t) = e.source ∩ s :=
   h.symm.image_eq
 #align local_equiv.is_image.symm_image_eq LocalEquiv.IsImage.symm_image_eq
+-/
 
+#print LocalEquiv.IsImage.iff_preimage_eq /-
 theorem iff_preimage_eq : e.IsImage s t ↔ e.source ∩ e ⁻¹' t = e.source ∩ s := by
   simp only [is_image, Set.ext_iff, mem_inter_iff, and_congr_right_iff, mem_preimage]
 #align local_equiv.is_image.iff_preimage_eq LocalEquiv.IsImage.iff_preimage_eq
+-/
 
 alias iff_preimage_eq ↔ preimage_eq of_preimage_eq
 #align local_equiv.is_image.preimage_eq LocalEquiv.IsImage.preimage_eq
 #align local_equiv.is_image.of_preimage_eq LocalEquiv.IsImage.of_preimage_eq
 
+#print LocalEquiv.IsImage.iff_symm_preimage_eq /-
 theorem iff_symm_preimage_eq : e.IsImage s t ↔ e.target ∩ e.symm ⁻¹' s = e.target ∩ t :=
   symm_iff.symm.trans iff_preimage_eq
 #align local_equiv.is_image.iff_symm_preimage_eq LocalEquiv.IsImage.iff_symm_preimage_eq
+-/
 
 alias iff_symm_preimage_eq ↔ symm_preimage_eq of_symm_preimage_eq
 #align local_equiv.is_image.symm_preimage_eq LocalEquiv.IsImage.symm_preimage_eq
 #align local_equiv.is_image.of_symm_preimage_eq LocalEquiv.IsImage.of_symm_preimage_eq
 
+#print LocalEquiv.IsImage.of_image_eq /-
 theorem of_image_eq (h : e '' (e.source ∩ s) = e.target ∩ t) : e.IsImage s t :=
   of_symm_preimage_eq <| Eq.trans (of_symm_preimage_eq rfl).image_eq.symm h
 #align local_equiv.is_image.of_image_eq LocalEquiv.IsImage.of_image_eq
+-/
 
+#print LocalEquiv.IsImage.of_symm_image_eq /-
 theorem of_symm_image_eq (h : e.symm '' (e.target ∩ t) = e.source ∩ s) : e.IsImage s t :=
   of_preimage_eq <| Eq.trans (of_preimage_eq rfl).symm_image_eq.symm h
 #align local_equiv.is_image.of_symm_image_eq LocalEquiv.IsImage.of_symm_image_eq
+-/
 
+#print LocalEquiv.IsImage.compl /-
 protected theorem compl (h : e.IsImage s t) : e.IsImage (sᶜ) (tᶜ) := fun x hx => not_congr (h hx)
 #align local_equiv.is_image.compl LocalEquiv.IsImage.compl
+-/
 
+#print LocalEquiv.IsImage.inter /-
 protected theorem inter {s' t'} (h : e.IsImage s t) (h' : e.IsImage s' t') :
     e.IsImage (s ∩ s') (t ∩ t') := fun x hx => and_congr (h hx) (h' hx)
 #align local_equiv.is_image.inter LocalEquiv.IsImage.inter
+-/
 
+#print LocalEquiv.IsImage.union /-
 protected theorem union {s' t'} (h : e.IsImage s t) (h' : e.IsImage s' t') :
     e.IsImage (s ∪ s') (t ∪ t') := fun x hx => or_congr (h hx) (h' hx)
 #align local_equiv.is_image.union LocalEquiv.IsImage.union
+-/
 
+#print LocalEquiv.IsImage.diff /-
 protected theorem diff {s' t'} (h : e.IsImage s t) (h' : e.IsImage s' t') :
     e.IsImage (s \ s') (t \ t') :=
   h.inter h'.compl
 #align local_equiv.is_image.diff LocalEquiv.IsImage.diff
+-/
 
+#print LocalEquiv.IsImage.leftInvOn_piecewise /-
 theorem leftInvOn_piecewise {e' : LocalEquiv α β} [∀ i, Decidable (i ∈ s)] [∀ i, Decidable (i ∈ t)]
     (h : e.IsImage s t) (h' : e'.IsImage s t) :
     LeftInvOn (t.piecewise e.symm e'.symm) (s.piecewise e e') (s.ite e.source e'.source) :=
@@ -475,12 +540,16 @@ theorem leftInvOn_piecewise {e' : LocalEquiv α β} [∀ i, Decidable (i ∈ s)]
     rw [piecewise_eq_of_not_mem _ _ _ hs, piecewise_eq_of_not_mem _ _ _ ((h'.compl he).2 hs),
       e'.left_inv he]
 #align local_equiv.is_image.left_inv_on_piecewise LocalEquiv.IsImage.leftInvOn_piecewise
+-/
 
+#print LocalEquiv.IsImage.inter_eq_of_inter_eq_of_eqOn /-
 theorem inter_eq_of_inter_eq_of_eqOn {e' : LocalEquiv α β} (h : e.IsImage s t) (h' : e'.IsImage s t)
     (hs : e.source ∩ s = e'.source ∩ s) (Heq : EqOn e e' (e.source ∩ s)) :
     e.target ∩ t = e'.target ∩ t := by rw [← h.image_eq, ← h'.image_eq, ← hs, Heq.image_eq]
 #align local_equiv.is_image.inter_eq_of_inter_eq_of_eq_on LocalEquiv.IsImage.inter_eq_of_inter_eq_of_eqOn
+-/
 
+#print LocalEquiv.IsImage.symm_eq_on_of_inter_eq_of_eqOn /-
 theorem symm_eq_on_of_inter_eq_of_eqOn {e' : LocalEquiv α β} (h : e.IsImage s t)
     (hs : e.source ∩ s = e'.source ∩ s) (Heq : EqOn e e' (e.source ∩ s)) :
     EqOn e.symm e'.symm (e.target ∩ t) :=
@@ -490,63 +559,88 @@ theorem symm_eq_on_of_inter_eq_of_eqOn {e' : LocalEquiv α β} (h : e.IsImage s
   have hx' := hx; rw [hs] at hx' 
   rw [e.left_inv hx.1, Heq hx, e'.left_inv hx'.1]
 #align local_equiv.is_image.symm_eq_on_of_inter_eq_of_eq_on LocalEquiv.IsImage.symm_eq_on_of_inter_eq_of_eqOn
+-/
 
 end IsImage
 
+#print LocalEquiv.isImage_source_target /-
 theorem isImage_source_target : e.IsImage e.source e.target := fun x hx => by simp [hx]
 #align local_equiv.is_image_source_target LocalEquiv.isImage_source_target
+-/
 
+#print LocalEquiv.isImage_source_target_of_disjoint /-
 theorem isImage_source_target_of_disjoint (e' : LocalEquiv α β) (hs : Disjoint e.source e'.source)
     (ht : Disjoint e.target e'.target) : e.IsImage e'.source e'.target :=
   IsImage.of_image_eq <| by rw [hs.inter_eq, ht.inter_eq, image_empty]
 #align local_equiv.is_image_source_target_of_disjoint LocalEquiv.isImage_source_target_of_disjoint
+-/
 
+#print LocalEquiv.image_source_inter_eq' /-
 theorem image_source_inter_eq' (s : Set α) : e '' (e.source ∩ s) = e.target ∩ e.symm ⁻¹' s := by
   rw [inter_comm, e.left_inv_on.image_inter', image_source_eq_target, inter_comm]
 #align local_equiv.image_source_inter_eq' LocalEquiv.image_source_inter_eq'
+-/
 
+#print LocalEquiv.image_source_inter_eq /-
 theorem image_source_inter_eq (s : Set α) :
     e '' (e.source ∩ s) = e.target ∩ e.symm ⁻¹' (e.source ∩ s) := by
   rw [inter_comm, e.left_inv_on.image_inter, image_source_eq_target, inter_comm]
 #align local_equiv.image_source_inter_eq LocalEquiv.image_source_inter_eq
+-/
 
+#print LocalEquiv.image_eq_target_inter_inv_preimage /-
 theorem image_eq_target_inter_inv_preimage {s : Set α} (h : s ⊆ e.source) :
     e '' s = e.target ∩ e.symm ⁻¹' s := by
   rw [← e.image_source_inter_eq', inter_eq_self_of_subset_right h]
 #align local_equiv.image_eq_target_inter_inv_preimage LocalEquiv.image_eq_target_inter_inv_preimage
+-/
 
+#print LocalEquiv.symm_image_eq_source_inter_preimage /-
 theorem symm_image_eq_source_inter_preimage {s : Set β} (h : s ⊆ e.target) :
     e.symm '' s = e.source ∩ e ⁻¹' s :=
   e.symm.image_eq_target_inter_inv_preimage h
 #align local_equiv.symm_image_eq_source_inter_preimage LocalEquiv.symm_image_eq_source_inter_preimage
+-/
 
+#print LocalEquiv.symm_image_target_inter_eq /-
 theorem symm_image_target_inter_eq (s : Set β) :
     e.symm '' (e.target ∩ s) = e.source ∩ e ⁻¹' (e.target ∩ s) :=
   e.symm.image_source_inter_eq _
 #align local_equiv.symm_image_target_inter_eq LocalEquiv.symm_image_target_inter_eq
+-/
 
+#print LocalEquiv.symm_image_target_inter_eq' /-
 theorem symm_image_target_inter_eq' (s : Set β) : e.symm '' (e.target ∩ s) = e.source ∩ e ⁻¹' s :=
   e.symm.image_source_inter_eq' _
 #align local_equiv.symm_image_target_inter_eq' LocalEquiv.symm_image_target_inter_eq'
+-/
 
+#print LocalEquiv.source_inter_preimage_inv_preimage /-
 theorem source_inter_preimage_inv_preimage (s : Set α) :
     e.source ∩ e ⁻¹' (e.symm ⁻¹' s) = e.source ∩ s :=
   Set.ext fun x => and_congr_right_iff.2 fun hx => by simp only [mem_preimage, e.left_inv hx]
 #align local_equiv.source_inter_preimage_inv_preimage LocalEquiv.source_inter_preimage_inv_preimage
+-/
 
+#print LocalEquiv.source_inter_preimage_target_inter /-
 theorem source_inter_preimage_target_inter (s : Set β) :
     e.source ∩ e ⁻¹' (e.target ∩ s) = e.source ∩ e ⁻¹' s :=
   ext fun x => ⟨fun hx => ⟨hx.1, hx.2.2⟩, fun hx => ⟨hx.1, e.map_source hx.1, hx.2⟩⟩
 #align local_equiv.source_inter_preimage_target_inter LocalEquiv.source_inter_preimage_target_inter
+-/
 
+#print LocalEquiv.target_inter_inv_preimage_preimage /-
 theorem target_inter_inv_preimage_preimage (s : Set β) :
     e.target ∩ e.symm ⁻¹' (e ⁻¹' s) = e.target ∩ s :=
   e.symm.source_inter_preimage_inv_preimage _
 #align local_equiv.target_inter_inv_preimage_preimage LocalEquiv.target_inter_inv_preimage_preimage
+-/
 
+#print LocalEquiv.symm_image_image_of_subset_source /-
 theorem symm_image_image_of_subset_source {s : Set α} (h : s ⊆ e.source) : e.symm '' (e '' s) = s :=
   (e.LeftInvOn.mono h).image_image
 #align local_equiv.symm_image_image_of_subset_source LocalEquiv.symm_image_image_of_subset_source
+-/
 
 #print LocalEquiv.image_symm_image_of_subset_target /-
 theorem image_symm_image_of_subset_target {s : Set β} (h : s ⊆ e.target) : e '' (e.symm '' s) = s :=
@@ -554,13 +648,17 @@ theorem image_symm_image_of_subset_target {s : Set β} (h : s ⊆ e.target) : e
 #align local_equiv.image_symm_image_of_subset_target LocalEquiv.image_symm_image_of_subset_target
 -/
 
+#print LocalEquiv.source_subset_preimage_target /-
 theorem source_subset_preimage_target : e.source ⊆ e ⁻¹' e.target :=
   e.MapsTo
 #align local_equiv.source_subset_preimage_target LocalEquiv.source_subset_preimage_target
+-/
 
+#print LocalEquiv.symm_image_target_eq_source /-
 theorem symm_image_target_eq_source : e.symm '' e.target = e.source :=
   e.symm.image_source_eq_target
 #align local_equiv.symm_image_target_eq_source LocalEquiv.symm_image_target_eq_source
+-/
 
 #print LocalEquiv.target_subset_preimage_source /-
 theorem target_subset_preimage_source : e.target ⊆ e.symm ⁻¹' e.source :=
@@ -568,6 +666,7 @@ theorem target_subset_preimage_source : e.target ⊆ e.symm ⁻¹' e.source :=
 #align local_equiv.target_subset_preimage_source LocalEquiv.target_subset_preimage_source
 -/
 
+#print LocalEquiv.ext /-
 /-- Two local equivs that have the same `source`, same `to_fun` and same `inv_fun`, coincide. -/
 @[ext]
 protected theorem ext {e e' : LocalEquiv α β} (h : ∀ x, e x = e' x)
@@ -581,6 +680,7 @@ protected theorem ext {e e' : LocalEquiv α β} (h : ∀ x, e x = e' x)
   cases e <;> cases e'
   simp_all
 #align local_equiv.ext LocalEquiv.ext
+-/
 
 #print LocalEquiv.restr /-
 /-- Restricting a local equivalence to e.source ∩ s -/
@@ -589,35 +689,47 @@ protected def restr (s : Set α) : LocalEquiv α β :=
 #align local_equiv.restr LocalEquiv.restr
 -/
 
+#print LocalEquiv.restr_coe /-
 @[simp, mfld_simps]
 theorem restr_coe (s : Set α) : (e.restr s : α → β) = e :=
   rfl
 #align local_equiv.restr_coe LocalEquiv.restr_coe
+-/
 
+#print LocalEquiv.restr_coe_symm /-
 @[simp, mfld_simps]
 theorem restr_coe_symm (s : Set α) : ((e.restr s).symm : β → α) = e.symm :=
   rfl
 #align local_equiv.restr_coe_symm LocalEquiv.restr_coe_symm
+-/
 
+#print LocalEquiv.restr_source /-
 @[simp, mfld_simps]
 theorem restr_source (s : Set α) : (e.restr s).source = e.source ∩ s :=
   rfl
 #align local_equiv.restr_source LocalEquiv.restr_source
+-/
 
+#print LocalEquiv.restr_target /-
 @[simp, mfld_simps]
 theorem restr_target (s : Set α) : (e.restr s).target = e.target ∩ e.symm ⁻¹' s :=
   rfl
 #align local_equiv.restr_target LocalEquiv.restr_target
+-/
 
+#print LocalEquiv.restr_eq_of_source_subset /-
 theorem restr_eq_of_source_subset {e : LocalEquiv α β} {s : Set α} (h : e.source ⊆ s) :
     e.restr s = e :=
   LocalEquiv.ext (fun _ => rfl) (fun _ => rfl) (by simp [inter_eq_self_of_subset_left h])
 #align local_equiv.restr_eq_of_source_subset LocalEquiv.restr_eq_of_source_subset
+-/
 
+#print LocalEquiv.restr_univ /-
 @[simp, mfld_simps]
 theorem restr_univ {e : LocalEquiv α β} : e.restr univ = e :=
   restr_eq_of_source_subset (subset_univ _)
 #align local_equiv.restr_univ LocalEquiv.restr_univ
+-/
 
 #print LocalEquiv.refl /-
 /-- The identity local equiv -/
@@ -733,72 +845,102 @@ protected def trans : LocalEquiv α γ :=
 #align local_equiv.trans LocalEquiv.trans
 -/
 
+#print LocalEquiv.coe_trans /-
 @[simp, mfld_simps]
 theorem coe_trans : (e.trans e' : α → γ) = e' ∘ e :=
   rfl
 #align local_equiv.coe_trans LocalEquiv.coe_trans
+-/
 
+#print LocalEquiv.coe_trans_symm /-
 @[simp, mfld_simps]
 theorem coe_trans_symm : ((e.trans e').symm : γ → α) = e.symm ∘ e'.symm :=
   rfl
 #align local_equiv.coe_trans_symm LocalEquiv.coe_trans_symm
+-/
 
+#print LocalEquiv.trans_apply /-
 theorem trans_apply {x : α} : (e.trans e') x = e' (e x) :=
   rfl
 #align local_equiv.trans_apply LocalEquiv.trans_apply
+-/
 
+#print LocalEquiv.trans_symm_eq_symm_trans_symm /-
 theorem trans_symm_eq_symm_trans_symm : (e.trans e').symm = e'.symm.trans e.symm := by
   cases e <;> cases e' <;> rfl
 #align local_equiv.trans_symm_eq_symm_trans_symm LocalEquiv.trans_symm_eq_symm_trans_symm
+-/
 
+#print LocalEquiv.trans_source /-
 @[simp, mfld_simps]
 theorem trans_source : (e.trans e').source = e.source ∩ e ⁻¹' e'.source :=
   rfl
 #align local_equiv.trans_source LocalEquiv.trans_source
+-/
 
+#print LocalEquiv.trans_source' /-
 theorem trans_source' : (e.trans e').source = e.source ∩ e ⁻¹' (e.target ∩ e'.source) := by
   mfld_set_tac
 #align local_equiv.trans_source' LocalEquiv.trans_source'
+-/
 
+#print LocalEquiv.trans_source'' /-
 theorem trans_source'' : (e.trans e').source = e.symm '' (e.target ∩ e'.source) := by
   rw [e.trans_source', e.symm_image_target_inter_eq]
 #align local_equiv.trans_source'' LocalEquiv.trans_source''
+-/
 
+#print LocalEquiv.image_trans_source /-
 theorem image_trans_source : e '' (e.trans e').source = e.target ∩ e'.source :=
   (e.symm.restr e'.source).symm.image_source_eq_target
 #align local_equiv.image_trans_source LocalEquiv.image_trans_source
+-/
 
+#print LocalEquiv.trans_target /-
 @[simp, mfld_simps]
 theorem trans_target : (e.trans e').target = e'.target ∩ e'.symm ⁻¹' e.target :=
   rfl
 #align local_equiv.trans_target LocalEquiv.trans_target
+-/
 
+#print LocalEquiv.trans_target' /-
 theorem trans_target' : (e.trans e').target = e'.target ∩ e'.symm ⁻¹' (e'.source ∩ e.target) :=
   trans_source' e'.symm e.symm
 #align local_equiv.trans_target' LocalEquiv.trans_target'
+-/
 
+#print LocalEquiv.trans_target'' /-
 theorem trans_target'' : (e.trans e').target = e' '' (e'.source ∩ e.target) :=
   trans_source'' e'.symm e.symm
 #align local_equiv.trans_target'' LocalEquiv.trans_target''
+-/
 
+#print LocalEquiv.inv_image_trans_target /-
 theorem inv_image_trans_target : e'.symm '' (e.trans e').target = e'.source ∩ e.target :=
   image_trans_source e'.symm e.symm
 #align local_equiv.inv_image_trans_target LocalEquiv.inv_image_trans_target
+-/
 
+#print LocalEquiv.trans_assoc /-
 theorem trans_assoc (e'' : LocalEquiv γ δ) : (e.trans e').trans e'' = e.trans (e'.trans e'') :=
   LocalEquiv.ext (fun x => rfl) (fun x => rfl)
     (by simp [trans_source, @preimage_comp α β γ, inter_assoc])
 #align local_equiv.trans_assoc LocalEquiv.trans_assoc
+-/
 
+#print LocalEquiv.trans_refl /-
 @[simp, mfld_simps]
 theorem trans_refl : e.trans (LocalEquiv.refl β) = e :=
   LocalEquiv.ext (fun x => rfl) (fun x => rfl) (by simp [trans_source])
 #align local_equiv.trans_refl LocalEquiv.trans_refl
+-/
 
+#print LocalEquiv.refl_trans /-
 @[simp, mfld_simps]
 theorem refl_trans : (LocalEquiv.refl α).trans e = e :=
   LocalEquiv.ext (fun x => rfl) (fun x => rfl) (by simp [trans_source, preimage_id])
 #align local_equiv.refl_trans LocalEquiv.refl_trans
+-/
 
 #print LocalEquiv.trans_refl_restr /-
 theorem trans_refl_restr (s : Set β) : e.trans ((LocalEquiv.refl β).restr s) = e.restr (e ⁻¹' s) :=
@@ -806,22 +948,28 @@ theorem trans_refl_restr (s : Set β) : e.trans ((LocalEquiv.refl β).restr s) =
 #align local_equiv.trans_refl_restr LocalEquiv.trans_refl_restr
 -/
 
+#print LocalEquiv.trans_refl_restr' /-
 theorem trans_refl_restr' (s : Set β) :
     e.trans ((LocalEquiv.refl β).restr s) = e.restr (e.source ∩ e ⁻¹' s) :=
   (LocalEquiv.ext (fun x => rfl) fun x => rfl) <| by simp [trans_source];
     rw [← inter_assoc, inter_self]
 #align local_equiv.trans_refl_restr' LocalEquiv.trans_refl_restr'
+-/
 
+#print LocalEquiv.restr_trans /-
 theorem restr_trans (s : Set α) : (e.restr s).trans e' = (e.trans e').restr s :=
   (LocalEquiv.ext (fun x => rfl) fun x => rfl) <| by simp [trans_source, inter_comm];
     rwa [inter_assoc]
 #align local_equiv.restr_trans LocalEquiv.restr_trans
+-/
 
+#print LocalEquiv.mem_symm_trans_source /-
 /-- A lemma commonly useful when `e` and `e'` are charts of a manifold. -/
 theorem mem_symm_trans_source {e' : LocalEquiv α γ} {x : α} (he : x ∈ e.source)
     (he' : x ∈ e'.source) : e x ∈ (e.symm.trans e').source :=
   ⟨e.MapsTo he, by rwa [mem_preimage, LocalEquiv.symm_symm, e.left_inv he]⟩
 #align local_equiv.mem_symm_trans_source LocalEquiv.mem_symm_trans_source
+-/
 
 #print LocalEquiv.transEquiv /-
 /-- Postcompose a local equivalence with an equivalence.
@@ -833,9 +981,11 @@ def transEquiv (e' : β ≃ γ) : LocalEquiv α γ :=
 #align local_equiv.trans_equiv LocalEquiv.transEquiv
 -/
 
+#print LocalEquiv.transEquiv_eq_trans /-
 theorem transEquiv_eq_trans (e' : β ≃ γ) : e.transEquiv e' = e.trans e'.toLocalEquiv :=
   copy_eq _ _ _ _ _ _ _ _ _
 #align local_equiv.trans_equiv_eq_trans LocalEquiv.transEquiv_eq_trans
+-/
 
 #print Equiv.transLocalEquiv /-
 /-- Precompose a local equivalence with an equivalence.
@@ -847,10 +997,12 @@ def Equiv.transLocalEquiv (e : α ≃ β) : LocalEquiv α γ :=
 #align equiv.trans_local_equiv Equiv.transLocalEquiv
 -/
 
+#print Equiv.transLocalEquiv_eq_trans /-
 theorem Equiv.transLocalEquiv_eq_trans (e : α ≃ β) :
     e.transLocalEquiv e' = e.toLocalEquiv.trans e' :=
   copy_eq _ _ _ _ _ _ _ _ _
 #align equiv.trans_local_equiv_eq_trans Equiv.transLocalEquiv_eq_trans
+-/
 
 #print LocalEquiv.EqOnSource /-
 /-- `eq_on_source e e'` means that `e` and `e'` have the same source, and coincide there. Then `e`
@@ -872,25 +1024,34 @@ instance eqOnSourceSetoid : Setoid (LocalEquiv α β)
 #align local_equiv.eq_on_source_setoid LocalEquiv.eqOnSourceSetoid
 -/
 
+#print LocalEquiv.eqOnSource_refl /-
 theorem eqOnSource_refl : e ≈ e :=
   Setoid.refl _
 #align local_equiv.eq_on_source_refl LocalEquiv.eqOnSource_refl
+-/
 
+#print LocalEquiv.EqOnSource.source_eq /-
 /-- Two equivalent local equivs have the same source -/
 theorem EqOnSource.source_eq {e e' : LocalEquiv α β} (h : e ≈ e') : e.source = e'.source :=
   h.1
 #align local_equiv.eq_on_source.source_eq LocalEquiv.EqOnSource.source_eq
+-/
 
+#print LocalEquiv.EqOnSource.eqOn /-
 /-- Two equivalent local equivs coincide on the source -/
 theorem EqOnSource.eqOn {e e' : LocalEquiv α β} (h : e ≈ e') : e.source.EqOn e e' :=
   h.2
 #align local_equiv.eq_on_source.eq_on LocalEquiv.EqOnSource.eqOn
+-/
 
+#print LocalEquiv.EqOnSource.target_eq /-
 /-- Two equivalent local equivs have the same target -/
 theorem EqOnSource.target_eq {e e' : LocalEquiv α β} (h : e ≈ e') : e.target = e'.target := by
   simp only [← image_source_eq_target, ← h.source_eq, h.2.image_eq]
 #align local_equiv.eq_on_source.target_eq LocalEquiv.EqOnSource.target_eq
+-/
 
+#print LocalEquiv.EqOnSource.symm' /-
 /-- If two local equivs are equivalent, so are their inverses. -/
 theorem EqOnSource.symm' {e e' : LocalEquiv α β} (h : e ≈ e') : e.symm ≈ e'.symm :=
   by
@@ -898,12 +1059,16 @@ theorem EqOnSource.symm' {e e' : LocalEquiv α β} (h : e ≈ e') : e.symm ≈ e
     simp only [symm_source, h.target_eq, h.source_eq, e'.symm_maps_to]
   exact e'.right_inv_on.congr_right e'.symm_maps_to (h.source_eq ▸ h.eq_on.symm)
 #align local_equiv.eq_on_source.symm' LocalEquiv.EqOnSource.symm'
+-/
 
+#print LocalEquiv.EqOnSource.symm_eqOn /-
 /-- Two equivalent local equivs have coinciding inverses on the target -/
 theorem EqOnSource.symm_eqOn {e e' : LocalEquiv α β} (h : e ≈ e') : EqOn e.symm e'.symm e.target :=
   h.symm'.EqOn
 #align local_equiv.eq_on_source.symm_eq_on LocalEquiv.EqOnSource.symm_eqOn
+-/
 
+#print LocalEquiv.EqOnSource.trans' /-
 /-- Composition of local equivs respects equivalence -/
 theorem EqOnSource.trans' {e e' : LocalEquiv α β} {f f' : LocalEquiv β γ} (he : e ≈ e')
     (hf : f ≈ f') : e.trans f ≈ e'.trans f' :=
@@ -915,7 +1080,9 @@ theorem EqOnSource.trans' {e e' : LocalEquiv α β} {f f' : LocalEquiv β γ} (h
     rw [trans_source] at hx 
     simp [(he.2 hx.1).symm, hf.2 hx.2]
 #align local_equiv.eq_on_source.trans' LocalEquiv.EqOnSource.trans'
+-/
 
+#print LocalEquiv.EqOnSource.restr /-
 /-- Restriction of local equivs respects equivalence -/
 theorem EqOnSource.restr {e e' : LocalEquiv α β} (he : e ≈ e') (s : Set α) :
     e.restr s ≈ e'.restr s := by
@@ -925,12 +1092,16 @@ theorem EqOnSource.restr {e e' : LocalEquiv α β} (he : e ≈ e') (s : Set α)
     simp only [mem_inter_iff, restr_source] at hx 
     exact he.2 hx.1
 #align local_equiv.eq_on_source.restr LocalEquiv.EqOnSource.restr
+-/
 
+#print LocalEquiv.EqOnSource.source_inter_preimage_eq /-
 /-- Preimages are respected by equivalence -/
 theorem EqOnSource.source_inter_preimage_eq {e e' : LocalEquiv α β} (he : e ≈ e') (s : Set β) :
     e.source ∩ e ⁻¹' s = e'.source ∩ e' ⁻¹' s := by rw [he.eq_on.inter_preimage_eq, he.source_eq]
 #align local_equiv.eq_on_source.source_inter_preimage_eq LocalEquiv.EqOnSource.source_inter_preimage_eq
+-/
 
+#print LocalEquiv.trans_self_symm /-
 /-- Composition of a local equiv and its inverse is equivalent to the restriction of the identity
 to the source -/
 theorem trans_self_symm : e.trans e.symm ≈ LocalEquiv.ofSet e.source :=
@@ -940,6 +1111,7 @@ theorem trans_self_symm : e.trans e.symm ≈ LocalEquiv.ofSet e.source :=
   rw [A] at hx 
   simp only [hx, mfld_simps]
 #align local_equiv.trans_self_symm LocalEquiv.trans_self_symm
+-/
 
 #print LocalEquiv.trans_symm_self /-
 /-- Composition of the inverse of a local equiv and this local equiv is equivalent to the
@@ -949,6 +1121,7 @@ theorem trans_symm_self : e.symm.trans e ≈ LocalEquiv.ofSet e.target :=
 #align local_equiv.trans_symm_self LocalEquiv.trans_symm_self
 -/
 
+#print LocalEquiv.eq_of_eq_on_source_univ /-
 /-- Two equivalent local equivs are equal when the source and target are univ -/
 theorem eq_of_eq_on_source_univ (e e' : LocalEquiv α β) (h : e ≈ e') (s : e.source = univ)
     (t : e.target = univ) : e = e' :=
@@ -961,6 +1134,7 @@ theorem eq_of_eq_on_source_univ (e e' : LocalEquiv α β) (h : e ≈ e') (s : e.
     rw [symm_source, t]
     exact mem_univ _
 #align local_equiv.eq_of_eq_on_source_univ LocalEquiv.eq_of_eq_on_source_univ
+-/
 
 section Prod
 
@@ -982,46 +1156,60 @@ def prod (e : LocalEquiv α β) (e' : LocalEquiv γ δ) : LocalEquiv (α × γ)
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print LocalEquiv.prod_source /-
 @[simp, mfld_simps]
 theorem prod_source (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
     (e.Prod e').source = e.source ×ˢ e'.source :=
   rfl
 #align local_equiv.prod_source LocalEquiv.prod_source
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print LocalEquiv.prod_target /-
 @[simp, mfld_simps]
 theorem prod_target (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
     (e.Prod e').target = e.target ×ˢ e'.target :=
   rfl
 #align local_equiv.prod_target LocalEquiv.prod_target
+-/
 
+#print LocalEquiv.prod_coe /-
 @[simp, mfld_simps]
 theorem prod_coe (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
     (e.Prod e' : α × γ → β × δ) = fun p => (e p.1, e' p.2) :=
   rfl
 #align local_equiv.prod_coe LocalEquiv.prod_coe
+-/
 
+#print LocalEquiv.prod_coe_symm /-
 theorem prod_coe_symm (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
     ((e.Prod e').symm : β × δ → α × γ) = fun p => (e.symm p.1, e'.symm p.2) :=
   rfl
 #align local_equiv.prod_coe_symm LocalEquiv.prod_coe_symm
+-/
 
+#print LocalEquiv.prod_symm /-
 @[simp, mfld_simps]
 theorem prod_symm (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
     (e.Prod e').symm = e.symm.Prod e'.symm := by ext x <;> simp [prod_coe_symm]
 #align local_equiv.prod_symm LocalEquiv.prod_symm
+-/
 
+#print LocalEquiv.refl_prod_refl /-
 @[simp, mfld_simps]
 theorem refl_prod_refl : (LocalEquiv.refl α).Prod (LocalEquiv.refl β) = LocalEquiv.refl (α × β) :=
   by ext1 ⟨x, y⟩; · rfl; · rintro ⟨x, y⟩; rfl; exact univ_prod_univ
 #align local_equiv.refl_prod_refl LocalEquiv.refl_prod_refl
+-/
 
+#print LocalEquiv.prod_trans /-
 @[simp, mfld_simps]
 theorem prod_trans {η : Type _} {ε : Type _} (e : LocalEquiv α β) (f : LocalEquiv β γ)
     (e' : LocalEquiv δ η) (f' : LocalEquiv η ε) :
     (e.Prod e').trans (f.Prod f') = (e.trans f).Prod (e'.trans f') := by
   ext x <;> simp [ext_iff] <;> tauto
 #align local_equiv.prod_trans LocalEquiv.prod_trans
+-/
 
 end Prod
 
@@ -1046,12 +1234,15 @@ def piecewise (e e' : LocalEquiv α β) (s : Set α) (t : Set β) [∀ x, Decida
 #align local_equiv.piecewise LocalEquiv.piecewise
 -/
 
+#print LocalEquiv.symm_piecewise /-
 theorem symm_piecewise (e e' : LocalEquiv α β) {s : Set α} {t : Set β} [∀ x, Decidable (x ∈ s)]
     [∀ y, Decidable (y ∈ t)] (H : e.IsImage s t) (H' : e'.IsImage s t) :
     (e.piecewise e' s t H H').symm = e.symm.piecewise e'.symm t s H.symm H'.symm :=
   rfl
 #align local_equiv.symm_piecewise LocalEquiv.symm_piecewise
+-/
 
+#print LocalEquiv.disjointUnion /-
 /-- Combine two `local_equiv`s with disjoint sources and disjoint targets. We reuse
 `local_equiv.piecewise`, then override `source` and `target` to ensure better definitional
 equalities. -/
@@ -1063,7 +1254,9 @@ def disjointUnion (e e' : LocalEquiv α β) (hs : Disjoint e.source e'.source)
         e'.isImage_source_target_of_disjoint _ hs.symm ht.symm).copy
     _ rfl _ rfl (e.source ∪ e'.source) (ite_left _ _) (e.target ∪ e'.target) (ite_left _ _)
 #align local_equiv.disjoint_union LocalEquiv.disjointUnion
+-/
 
+#print LocalEquiv.disjointUnion_eq_piecewise /-
 theorem disjointUnion_eq_piecewise (e e' : LocalEquiv α β) (hs : Disjoint e.source e'.source)
     (ht : Disjoint e.target e'.target) [∀ x, Decidable (x ∈ e.source)]
     [∀ y, Decidable (y ∈ e.target)] :
@@ -1072,6 +1265,7 @@ theorem disjointUnion_eq_piecewise (e e' : LocalEquiv α β) (hs : Disjoint e.so
         (e'.isImage_source_target_of_disjoint _ hs.symm ht.symm) :=
   copy_eq _ _ _ _ _ _ _ _ _
 #align local_equiv.disjoint_union_eq_piecewise LocalEquiv.disjointUnion_eq_piecewise
+-/
 
 section Pi
 
@@ -1141,16 +1335,20 @@ theorem refl_toLocalEquiv : (Equiv.refl α).toLocalEquiv = LocalEquiv.refl α :=
 #align equiv.refl_to_local_equiv Equiv.refl_toLocalEquiv
 -/
 
+#print Equiv.symm_toLocalEquiv /-
 @[simp, mfld_simps]
 theorem symm_toLocalEquiv : e.symm.toLocalEquiv = e.toLocalEquiv.symm :=
   rfl
 #align equiv.symm_to_local_equiv Equiv.symm_toLocalEquiv
+-/
 
+#print Equiv.trans_toLocalEquiv /-
 @[simp, mfld_simps]
 theorem trans_toLocalEquiv : (e.trans e').toLocalEquiv = e.toLocalEquiv.trans e'.toLocalEquiv :=
   LocalEquiv.ext (fun x => rfl) (fun x => rfl)
     (by simp [LocalEquiv.trans_source, Equiv.toLocalEquiv])
 #align equiv.trans_to_local_equiv Equiv.trans_toLocalEquiv
+-/
 
 end Equiv
 
Diff
@@ -110,8 +110,8 @@ def mfld_cfg : SimpsCfg where
 
 namespace Tactic.Interactive
 
-/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
-/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
 -- PLEASE REPORT THIS TO MATHPORT DEVS, THIS SHOULD NOT HAPPEN.
 -- failed to format: unknown constant 'term.pseudo.antiquot'
 /--
Diff
@@ -74,13 +74,8 @@ then it should use `e.source ∩ s` or `e.target ∩ t`, not `s ∩ e.source` or
 -/
 
 
-/- failed to parenthesize: unknown constant 'Lean.Meta._root_.Lean.Parser.Command.registerSimpAttr'
-[PrettyPrinter.parenthesize.input] (Lean.Meta._root_.Lean.Parser.Command.registerSimpAttr
-     [(Command.docComment
-       "/--"
-       "The simpset `mfld_simps` records several simp lemmas that are\nespecially useful in manifolds. It is a subset of the whole set of simp lemmas, but it makes it\npossible to have quicker proofs (when used with `squeeze_simp` or `simp only`) while retaining\nreadability.\n\nThe typical use case is the following, in a file on manifolds:\nIf `simp [foo, bar]` is slow, replace it with `squeeze_simp [foo, bar] with mfld_simps` and paste\nits output. The list of lemmas should be reasonable (contrary to the output of\n`squeeze_simp [foo, bar]` which might contain tens of lemmas), and the outcome should be quick\nenough.\n -/")]
-     "register_simp_attr"
-     `mfld_simps)-/-- failed to format: unknown constant 'Lean.Meta._root_.Lean.Parser.Command.registerSimpAttr'
+-- PLEASE REPORT THIS TO MATHPORT DEVS, THIS SHOULD NOT HAPPEN.
+-- failed to format: unknown constant 'Lean.Meta._root_.Lean.Parser.Command.registerSimpAttr'
 /--
     The simpset `mfld_simps` records several simp lemmas that are
     especially useful in manifolds. It is a subset of the whole set of simp lemmas, but it makes it
@@ -117,6 +112,7 @@ namespace Tactic.Interactive
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
+-- PLEASE REPORT THIS TO MATHPORT DEVS, THIS SHOULD NOT HAPPEN.
 -- failed to format: unknown constant 'term.pseudo.antiquot'
 /--
       A very basic tactic to show that sets showing up in manifolds coincide or are included in
Diff
@@ -98,8 +98,14 @@ then it should use `e.source ∩ s` or `e.target ∩ t`, not `s ∩ e.source` or
 
 -- register in the simpset `mfld_simps` several lemmas that are often useful when dealing
 -- with manifolds
-attribute [mfld_simps]
-  id.def Function.comp.left_id Set.mem_setOf_eq Set.image_eq_empty Set.univ_inter Set.preimage_univ Set.prod_mk_mem_set_prod_eq and_true_iff Set.mem_univ Set.mem_image_of_mem true_and_iff Set.mem_inter_iff Set.mem_preimage Function.comp_apply Set.inter_subset_left Set.mem_prod Set.range_id Set.range_prod_map and_self_iff Set.mem_range_self eq_self_iff_true forall_const forall_true_iff Set.inter_univ Set.preimage_id Function.comp.right_id not_false_iff and_imp Set.prod_inter_prod Set.univ_prod_univ true_or_iff or_true_iff Prod.map_mk Set.preimage_inter heq_iff_eq Equiv.sigmaEquivProd_apply Equiv.sigmaEquivProd_symm_apply Subtype.coe_mk Equiv.toFun_as_coe Equiv.invFun_as_coe
+attribute [mfld_simps] id.def Function.comp.left_id Set.mem_setOf_eq Set.image_eq_empty
+  Set.univ_inter Set.preimage_univ Set.prod_mk_mem_set_prod_eq and_true_iff Set.mem_univ
+  Set.mem_image_of_mem true_and_iff Set.mem_inter_iff Set.mem_preimage Function.comp_apply
+  Set.inter_subset_left Set.mem_prod Set.range_id Set.range_prod_map and_self_iff Set.mem_range_self
+  eq_self_iff_true forall_const forall_true_iff Set.inter_univ Set.preimage_id
+  Function.comp.right_id not_false_iff and_imp Set.prod_inter_prod Set.univ_prod_univ true_or_iff
+  or_true_iff Prod.map_mk Set.preimage_inter heq_iff_eq Equiv.sigmaEquivProd_apply
+  Equiv.sigmaEquivProd_symm_apply Subtype.coe_mk Equiv.toFun_as_coe Equiv.invFun_as_coe
 
 /-- Common `@[simps]` configuration options used for manifold-related declarations. -/
 def mfld_cfg : SimpsCfg where
@@ -485,7 +491,7 @@ theorem symm_eq_on_of_inter_eq_of_eqOn {e' : LocalEquiv α β} (h : e.IsImage s
   by
   rw [← h.image_eq]
   rintro y ⟨x, hx, rfl⟩
-  have hx' := hx; rw [hs] at hx'
+  have hx' := hx; rw [hs] at hx' 
   rw [e.left_inv hx.1, Heq hx, e'.left_inv hx'.1]
 #align local_equiv.is_image.symm_eq_on_of_inter_eq_of_eq_on LocalEquiv.IsImage.symm_eq_on_of_inter_eq_of_eqOn
 
@@ -575,7 +581,7 @@ protected theorem ext {e e' : LocalEquiv α β} (h : ∀ x, e x = e' x)
   have B : (e.symm : β → α) = e'.symm := by ext x; exact hsymm x
   have I : e '' e.source = e.target := e.image_source_eq_target
   have I' : e' '' e'.source = e'.target := e'.image_source_eq_target
-  rw [A, hs, I'] at I
+  rw [A, hs, I'] at I 
   cases e <;> cases e'
   simp_all
 #align local_equiv.ext LocalEquiv.ext
@@ -910,7 +916,7 @@ theorem EqOnSource.trans' {e e' : LocalEquiv α β} {f f' : LocalEquiv β γ} (h
   · rw [trans_source'', trans_source'', ← he.target_eq, ← hf.1]
     exact (he.symm'.eq_on.mono <| inter_subset_left _ _).image_eq
   · intro x hx
-    rw [trans_source] at hx
+    rw [trans_source] at hx 
     simp [(he.2 hx.1).symm, hf.2 hx.2]
 #align local_equiv.eq_on_source.trans' LocalEquiv.EqOnSource.trans'
 
@@ -920,7 +926,7 @@ theorem EqOnSource.restr {e e' : LocalEquiv α β} (he : e ≈ e') (s : Set α)
   constructor
   · simp [he.1]
   · intro x hx
-    simp only [mem_inter_iff, restr_source] at hx
+    simp only [mem_inter_iff, restr_source] at hx 
     exact he.2 hx.1
 #align local_equiv.eq_on_source.restr LocalEquiv.EqOnSource.restr
 
@@ -935,7 +941,7 @@ theorem trans_self_symm : e.trans e.symm ≈ LocalEquiv.ofSet e.source :=
   by
   have A : (e.trans e.symm).source = e.source := by mfld_set_tac
   refine' ⟨by simp [A], fun x hx => _⟩
-  rw [A] at hx
+  rw [A] at hx 
   simp only [hx, mfld_simps]
 #align local_equiv.trans_self_symm LocalEquiv.trans_self_symm
 
@@ -972,10 +978,10 @@ def prod (e : LocalEquiv α β) (e' : LocalEquiv γ δ) : LocalEquiv (α × γ)
   target := e.target ×ˢ e'.target
   toFun p := (e p.1, e' p.2)
   invFun p := (e.symm p.1, e'.symm p.2)
-  map_source' p hp := by simp at hp; simp [hp]
-  map_target' p hp := by simp at hp; simp [map_target, hp]
-  left_inv' p hp := by simp at hp; simp [hp]
-  right_inv' p hp := by simp at hp; simp [hp]
+  map_source' p hp := by simp at hp ; simp [hp]
+  map_target' p hp := by simp at hp ; simp [map_target, hp]
+  left_inv' p hp := by simp at hp ; simp [hp]
+  right_inv' p hp := by simp at hp ; simp [hp]
 #align local_equiv.prod LocalEquiv.prod
 -/
 
Diff
@@ -187,13 +187,10 @@ def Simps.symm_apply (e : LocalEquiv α β) : β → α :=
 
 initialize_simps_projections LocalEquiv (toFun → apply, invFun → symm_apply)
 
-/- warning: local_equiv.coe_mk clashes with [anonymous] -> [anonymous]
-Case conversion may be inaccurate. Consider using '#align local_equiv.coe_mk [anonymous]ₓ'. -/
 @[simp, mfld_simps]
-theorem [anonymous] (f : α → β) (g s t ml mr il ir) :
-    (LocalEquiv.mk f g s t ml mr il ir : α → β) = f :=
+theorem coe_mk (f : α → β) (g s t ml mr il ir) : (LocalEquiv.mk f g s t ml mr il ir : α → β) = f :=
   rfl
-#align local_equiv.coe_mk [anonymous]
+#align local_equiv.coe_mk LocalEquiv.coe_mk
 
 @[simp, mfld_simps]
 theorem coe_symm_mk (f : α → β) (g s t ml mr il ir) :
@@ -201,12 +198,10 @@ theorem coe_symm_mk (f : α → β) (g s t ml mr il ir) :
   rfl
 #align local_equiv.coe_symm_mk LocalEquiv.coe_symm_mk
 
-/- warning: local_equiv.to_fun_as_coe clashes with [anonymous] -> [anonymous]
-Case conversion may be inaccurate. Consider using '#align local_equiv.to_fun_as_coe [anonymous]ₓ'. -/
 @[simp, mfld_simps]
-theorem [anonymous] : e.toFun = e :=
+theorem toFun_as_coe : e.toFun = e :=
   rfl
-#align local_equiv.to_fun_as_coe [anonymous]
+#align local_equiv.to_fun_as_coe LocalEquiv.toFun_as_coe
 
 @[simp, mfld_simps]
 theorem invFun_as_coe : e.invFun = e.symm :=
Diff
@@ -101,12 +101,6 @@ then it should use `e.source ∩ s` or `e.target ∩ t`, not `s ∩ e.source` or
 attribute [mfld_simps]
   id.def Function.comp.left_id Set.mem_setOf_eq Set.image_eq_empty Set.univ_inter Set.preimage_univ Set.prod_mk_mem_set_prod_eq and_true_iff Set.mem_univ Set.mem_image_of_mem true_and_iff Set.mem_inter_iff Set.mem_preimage Function.comp_apply Set.inter_subset_left Set.mem_prod Set.range_id Set.range_prod_map and_self_iff Set.mem_range_self eq_self_iff_true forall_const forall_true_iff Set.inter_univ Set.preimage_id Function.comp.right_id not_false_iff and_imp Set.prod_inter_prod Set.univ_prod_univ true_or_iff or_true_iff Prod.map_mk Set.preimage_inter heq_iff_eq Equiv.sigmaEquivProd_apply Equiv.sigmaEquivProd_symm_apply Subtype.coe_mk Equiv.toFun_as_coe Equiv.invFun_as_coe
 
-/- warning: mfld_cfg -> mfld_cfg is a dubious translation:
-lean 3 declaration is
-  SimpsCfg
-but is expected to have type
-  Simps.Config
-Case conversion may be inaccurate. Consider using '#align mfld_cfg mfld_cfgₓ'. -/
 /-- Common `@[simps]` configuration options used for manifold-related declarations. -/
 def mfld_cfg : SimpsCfg where
   attrs := [`simp, `mfld_simps]
@@ -194,11 +188,6 @@ def Simps.symm_apply (e : LocalEquiv α β) : β → α :=
 initialize_simps_projections LocalEquiv (toFun → apply, invFun → symm_apply)
 
 /- warning: local_equiv.coe_mk clashes with [anonymous] -> [anonymous]
-warning: local_equiv.coe_mk -> [anonymous] is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β) (g : β -> α) (s : Set.{u1} α) (t : Set.{u2} β) (ml : forall {{x : α}}, (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) (f x) t)) (mr : forall {{x : β}}, (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) x t) -> (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) (g x) s)) (il : forall {{x : α}}, (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (Eq.{succ u1} α (g (f x)) x)) (ir : forall {{x : β}}, (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) x t) -> (Eq.{succ u2} β (f (g x)) x)), Eq.{max (succ u1) (succ u2)} ((fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.mk.{u1, u2} α β f g s t ml mr il ir)) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) (LocalEquiv.mk.{u1, u2} α β f g s t ml mr il ir)) f
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}}, (Nat -> α -> β) -> Nat -> (List.{u1} α) -> (List.{u2} β)
 Case conversion may be inaccurate. Consider using '#align local_equiv.coe_mk [anonymous]ₓ'. -/
 @[simp, mfld_simps]
 theorem [anonymous] (f : α → β) (g s t ml mr il ir) :
@@ -206,12 +195,6 @@ theorem [anonymous] (f : α → β) (g s t ml mr il ir) :
   rfl
 #align local_equiv.coe_mk [anonymous]
 
-/- warning: local_equiv.coe_symm_mk -> LocalEquiv.coe_symm_mk is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β) (g : β -> α) (s : Set.{u1} α) (t : Set.{u2} β) (ml : forall {{x : α}}, (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) (f x) t)) (mr : forall {{x : β}}, (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) x t) -> (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) (g x) s)) (il : forall {{x : α}}, (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (Eq.{succ u1} α (g (f x)) x)) (ir : forall {{x : β}}, (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) x t) -> (Eq.{succ u2} β (f (g x)) x)), Eq.{max (succ u2) (succ u1)} ((fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.symm.{u1, u2} α β (LocalEquiv.mk.{u1, u2} α β f g s t ml mr il ir))) (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β (LocalEquiv.mk.{u1, u2} α β f g s t ml mr il ir))) g
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β) (g : β -> α) (s : Set.{u2} α) (t : Set.{u1} β) (ml : forall {{x : α}}, (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x s) -> (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) (f x) t)) (mr : forall {{x : β}}, (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) x t) -> (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) (g x) s)) (il : forall {{x : α}}, (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x s) -> (Eq.{succ u2} α (g (f x)) x)) (ir : forall {{x : β}}, (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) x t) -> (Eq.{succ u1} β (f (g x)) x)), Eq.{max (succ u2) (succ u1)} (β -> α) (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β (LocalEquiv.mk.{u2, u1} α β f g s t ml mr il ir))) g
-Case conversion may be inaccurate. Consider using '#align local_equiv.coe_symm_mk LocalEquiv.coe_symm_mkₓ'. -/
 @[simp, mfld_simps]
 theorem coe_symm_mk (f : α → β) (g s t ml mr il ir) :
     ((LocalEquiv.mk f g s t ml mr il ir).symm : β → α) = g :=
@@ -219,34 +202,17 @@ theorem coe_symm_mk (f : α → β) (g s t ml mr il ir) :
 #align local_equiv.coe_symm_mk LocalEquiv.coe_symm_mk
 
 /- warning: local_equiv.to_fun_as_coe clashes with [anonymous] -> [anonymous]
-warning: local_equiv.to_fun_as_coe -> [anonymous] is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β), Eq.{max (succ u1) (succ u2)} (α -> β) (LocalEquiv.toFun.{u1, u2} α β e) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}}, (Nat -> α -> β) -> Nat -> (List.{u1} α) -> (List.{u2} β)
 Case conversion may be inaccurate. Consider using '#align local_equiv.to_fun_as_coe [anonymous]ₓ'. -/
 @[simp, mfld_simps]
 theorem [anonymous] : e.toFun = e :=
   rfl
 #align local_equiv.to_fun_as_coe [anonymous]
 
-/- warning: local_equiv.inv_fun_as_coe -> LocalEquiv.invFun_as_coe is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β), Eq.{max (succ u2) (succ u1)} (β -> α) (LocalEquiv.invFun.{u1, u2} α β e) (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β), Eq.{max (succ u2) (succ u1)} (β -> α) (LocalEquiv.invFun.{u2, u1} α β e) (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e))
-Case conversion may be inaccurate. Consider using '#align local_equiv.inv_fun_as_coe LocalEquiv.invFun_as_coeₓ'. -/
 @[simp, mfld_simps]
 theorem invFun_as_coe : e.invFun = e.symm :=
   rfl
 #align local_equiv.inv_fun_as_coe LocalEquiv.invFun_as_coe
 
-/- warning: local_equiv.map_source -> LocalEquiv.map_source is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) {x : α}, (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x (LocalEquiv.source.{u1, u2} α β e)) -> (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e x) (LocalEquiv.target.{u1, u2} α β e))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β) {x : α}, (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x (LocalEquiv.source.{u2, u1} α β e)) -> (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) (LocalEquiv.toFun.{u2, u1} α β e x) (LocalEquiv.target.{u2, u1} α β e))
-Case conversion may be inaccurate. Consider using '#align local_equiv.map_source LocalEquiv.map_sourceₓ'. -/
 @[simp, mfld_simps]
 theorem map_source {x : α} (h : x ∈ e.source) : e x ∈ e.target :=
   e.map_source' h
@@ -259,12 +225,6 @@ theorem map_target {x : β} (h : x ∈ e.target) : e.symm x ∈ e.source :=
 #align local_equiv.map_target LocalEquiv.map_target
 -/
 
-/- warning: local_equiv.left_inv -> LocalEquiv.left_inv is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) {x : α}, (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x (LocalEquiv.source.{u1, u2} α β e)) -> (Eq.{succ u1} α (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e x)) x)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β) {x : α}, (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x (LocalEquiv.source.{u2, u1} α β e)) -> (Eq.{succ u2} α (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e) (LocalEquiv.toFun.{u2, u1} α β e x)) x)
-Case conversion may be inaccurate. Consider using '#align local_equiv.left_inv LocalEquiv.left_invₓ'. -/
 @[simp, mfld_simps]
 theorem left_inv {x : α} (h : x ∈ e.source) : e.symm (e x) = x :=
   e.left_inv' h
@@ -277,23 +237,11 @@ theorem right_inv {x : β} (h : x ∈ e.target) : e (e.symm x) = x :=
 #align local_equiv.right_inv LocalEquiv.right_inv
 -/
 
-/- warning: local_equiv.eq_symm_apply -> LocalEquiv.eq_symm_apply is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) {x : α} {y : β}, (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x (LocalEquiv.source.{u1, u2} α β e)) -> (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) y (LocalEquiv.target.{u1, u2} α β e)) -> (Iff (Eq.{succ u1} α x (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e) y)) (Eq.{succ u2} β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e x) y))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β) {x : α} {y : β}, (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x (LocalEquiv.source.{u2, u1} α β e)) -> (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) y (LocalEquiv.target.{u2, u1} α β e)) -> (Iff (Eq.{succ u2} α x (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e) y)) (Eq.{succ u1} β (LocalEquiv.toFun.{u2, u1} α β e x) y))
-Case conversion may be inaccurate. Consider using '#align local_equiv.eq_symm_apply LocalEquiv.eq_symm_applyₓ'. -/
 theorem eq_symm_apply {x : α} {y : β} (hx : x ∈ e.source) (hy : y ∈ e.target) :
     x = e.symm y ↔ e x = y :=
   ⟨fun h => by rw [← e.right_inv hy, h], fun h => by rw [← e.left_inv hx, h]⟩
 #align local_equiv.eq_symm_apply LocalEquiv.eq_symm_apply
 
-/- warning: local_equiv.maps_to -> LocalEquiv.mapsTo is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β), Set.MapsTo.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) (LocalEquiv.source.{u1, u2} α β e) (LocalEquiv.target.{u1, u2} α β e)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β), Set.MapsTo.{u2, u1} α β (LocalEquiv.toFun.{u2, u1} α β e) (LocalEquiv.source.{u2, u1} α β e) (LocalEquiv.target.{u2, u1} α β e)
-Case conversion may be inaccurate. Consider using '#align local_equiv.maps_to LocalEquiv.mapsToₓ'. -/
 protected theorem mapsTo : MapsTo e e.source e.target := fun x => e.map_source
 #align local_equiv.maps_to LocalEquiv.mapsTo
 
@@ -303,60 +251,24 @@ theorem symm_mapsTo : MapsTo e.symm e.target e.source :=
 #align local_equiv.symm_maps_to LocalEquiv.symm_mapsTo
 -/
 
-/- warning: local_equiv.left_inv_on -> LocalEquiv.leftInvOn is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β), Set.LeftInvOn.{u1, u2} α β (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e)) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) (LocalEquiv.source.{u1, u2} α β e)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β), Set.LeftInvOn.{u2, u1} α β (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e)) (LocalEquiv.toFun.{u2, u1} α β e) (LocalEquiv.source.{u2, u1} α β e)
-Case conversion may be inaccurate. Consider using '#align local_equiv.left_inv_on LocalEquiv.leftInvOnₓ'. -/
 protected theorem leftInvOn : LeftInvOn e.symm e e.source := fun x => e.left_inv
 #align local_equiv.left_inv_on LocalEquiv.leftInvOn
 
-/- warning: local_equiv.right_inv_on -> LocalEquiv.rightInvOn is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β), Set.RightInvOn.{u1, u2} α β (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e)) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) (LocalEquiv.target.{u1, u2} α β e)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β), Set.RightInvOn.{u2, u1} α β (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e)) (LocalEquiv.toFun.{u2, u1} α β e) (LocalEquiv.target.{u2, u1} α β e)
-Case conversion may be inaccurate. Consider using '#align local_equiv.right_inv_on LocalEquiv.rightInvOnₓ'. -/
 protected theorem rightInvOn : RightInvOn e.symm e e.target := fun x => e.right_inv
 #align local_equiv.right_inv_on LocalEquiv.rightInvOn
 
-/- warning: local_equiv.inv_on -> LocalEquiv.invOn is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β), Set.InvOn.{u1, u2} α β (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e)) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) (LocalEquiv.source.{u1, u2} α β e) (LocalEquiv.target.{u1, u2} α β e)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β), Set.InvOn.{u2, u1} α β (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e)) (LocalEquiv.toFun.{u2, u1} α β e) (LocalEquiv.source.{u2, u1} α β e) (LocalEquiv.target.{u2, u1} α β e)
-Case conversion may be inaccurate. Consider using '#align local_equiv.inv_on LocalEquiv.invOnₓ'. -/
 protected theorem invOn : InvOn e.symm e e.source e.target :=
   ⟨e.LeftInvOn, e.RightInvOn⟩
 #align local_equiv.inv_on LocalEquiv.invOn
 
-/- warning: local_equiv.inj_on -> LocalEquiv.injOn is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β), Set.InjOn.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) (LocalEquiv.source.{u1, u2} α β e)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β), Set.InjOn.{u2, u1} α β (LocalEquiv.toFun.{u2, u1} α β e) (LocalEquiv.source.{u2, u1} α β e)
-Case conversion may be inaccurate. Consider using '#align local_equiv.inj_on LocalEquiv.injOnₓ'. -/
 protected theorem injOn : InjOn e e.source :=
   e.LeftInvOn.InjOn
 #align local_equiv.inj_on LocalEquiv.injOn
 
-/- warning: local_equiv.bij_on -> LocalEquiv.bijOn is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β), Set.BijOn.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) (LocalEquiv.source.{u1, u2} α β e) (LocalEquiv.target.{u1, u2} α β e)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β), Set.BijOn.{u2, u1} α β (LocalEquiv.toFun.{u2, u1} α β e) (LocalEquiv.source.{u2, u1} α β e) (LocalEquiv.target.{u2, u1} α β e)
-Case conversion may be inaccurate. Consider using '#align local_equiv.bij_on LocalEquiv.bijOnₓ'. -/
 protected theorem bijOn : BijOn e e.source e.target :=
   e.InvOn.BijOn e.MapsTo e.symm_mapsTo
 #align local_equiv.bij_on LocalEquiv.bijOn
 
-/- warning: local_equiv.surj_on -> LocalEquiv.surjOn is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β), Set.SurjOn.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) (LocalEquiv.source.{u1, u2} α β e) (LocalEquiv.target.{u1, u2} α β e)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β), Set.SurjOn.{u2, u1} α β (LocalEquiv.toFun.{u2, u1} α β e) (LocalEquiv.source.{u2, u1} α β e) (LocalEquiv.target.{u2, u1} α β e)
-Case conversion may be inaccurate. Consider using '#align local_equiv.surj_on LocalEquiv.surjOnₓ'. -/
 protected theorem surjOn : SurjOn e e.source e.target :=
   e.BijOn.SurjOn
 #align local_equiv.surj_on LocalEquiv.surjOn
@@ -400,12 +312,6 @@ def copy (e : LocalEquiv α β) (f : α → β) (hf : ⇑e = f) (g : β → α)
 #align local_equiv.copy LocalEquiv.copy
 -/
 
-/- warning: local_equiv.copy_eq -> LocalEquiv.copy_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) (f : α -> β) (hf : Eq.{max (succ u1) (succ u2)} (α -> β) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (e : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) f) (g : β -> α) (hg : Eq.{max (succ u2) (succ u1)} (β -> α) (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e)) g) (s : Set.{u1} α) (hs : Eq.{succ u1} (Set.{u1} α) (LocalEquiv.source.{u1, u2} α β e) s) (t : Set.{u2} β) (ht : Eq.{succ u2} (Set.{u2} β) (LocalEquiv.target.{u1, u2} α β e) t), Eq.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (LocalEquiv.copy.{u1, u2} α β e f hf g hg s hs t ht) e
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β) (f : α -> β) (hf : Eq.{max (succ u2) (succ u1)} (α -> β) (LocalEquiv.toFun.{u2, u1} α β e) f) (g : β -> α) (hg : Eq.{max (succ u2) (succ u1)} (β -> α) (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e)) g) (s : Set.{u2} α) (hs : Eq.{succ u2} (Set.{u2} α) (LocalEquiv.source.{u2, u1} α β e) s) (t : Set.{u1} β) (ht : Eq.{succ u1} (Set.{u1} β) (LocalEquiv.target.{u2, u1} α β e) t), Eq.{max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} α β) (LocalEquiv.copy.{u2, u1} α β e f hf g hg s hs t ht) e
-Case conversion may be inaccurate. Consider using '#align local_equiv.copy_eq LocalEquiv.copy_eqₓ'. -/
 theorem copy_eq (e : LocalEquiv α β) (f : α → β) (hf : ⇑e = f) (g : β → α) (hg : ⇑e.symm = g)
     (s : Set α) (hs : e.source = s) (t : Set β) (ht : e.target = t) :
     e.copy f hf g hg s hs t ht = e := by substs f g s t; cases e; rfl
@@ -429,23 +335,11 @@ theorem symm_source : e.symm.source = e.target :=
 #align local_equiv.symm_source LocalEquiv.symm_source
 -/
 
-/- warning: local_equiv.symm_target -> LocalEquiv.symm_target is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β), Eq.{succ u1} (Set.{u1} α) (LocalEquiv.target.{u2, u1} β α (LocalEquiv.symm.{u1, u2} α β e)) (LocalEquiv.source.{u1, u2} α β e)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β), Eq.{succ u2} (Set.{u2} α) (LocalEquiv.target.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e)) (LocalEquiv.source.{u2, u1} α β e)
-Case conversion may be inaccurate. Consider using '#align local_equiv.symm_target LocalEquiv.symm_targetₓ'. -/
 @[simp, mfld_simps]
 theorem symm_target : e.symm.target = e.source :=
   rfl
 #align local_equiv.symm_target LocalEquiv.symm_target
 
-/- warning: local_equiv.symm_symm -> LocalEquiv.symm_symm is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β), Eq.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (LocalEquiv.symm.{u2, u1} β α (LocalEquiv.symm.{u1, u2} α β e)) e
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β), Eq.{max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} α β) (LocalEquiv.symm.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e)) e
-Case conversion may be inaccurate. Consider using '#align local_equiv.symm_symm LocalEquiv.symm_symmₓ'. -/
 @[simp, mfld_simps]
 theorem symm_symm : e.symm.symm = e := by cases e; rfl
 #align local_equiv.symm_symm LocalEquiv.symm_symm
@@ -462,12 +356,6 @@ theorem forall_mem_target {p : β → Prop} : (∀ y ∈ e.target, p y) ↔ ∀
 #align local_equiv.forall_mem_target LocalEquiv.forall_mem_target
 -/
 
-/- warning: local_equiv.exists_mem_target -> LocalEquiv.exists_mem_target is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) {p : β -> Prop}, Iff (Exists.{succ u2} β (fun (y : β) => Exists.{0} (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) y (LocalEquiv.target.{u1, u2} α β e)) (fun (H : Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) y (LocalEquiv.target.{u1, u2} α β e)) => p y))) (Exists.{succ u1} α (fun (x : α) => Exists.{0} (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x (LocalEquiv.source.{u1, u2} α β e)) (fun (H : Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x (LocalEquiv.source.{u1, u2} α β e)) => p (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e x))))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) {p : β -> Prop}, Iff (Exists.{succ u2} β (fun (y : β) => And (Membership.mem.{u2, u2} β (Set.{u2} β) (Set.instMembershipSet.{u2} β) y (LocalEquiv.target.{u1, u2} α β e)) (p y))) (Exists.{succ u1} α (fun (x : α) => And (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x (LocalEquiv.source.{u1, u2} α β e)) (p (LocalEquiv.toFun.{u1, u2} α β e x))))
-Case conversion may be inaccurate. Consider using '#align local_equiv.exists_mem_target LocalEquiv.exists_mem_targetₓ'. -/
 theorem exists_mem_target {p : β → Prop} : (∃ y ∈ e.target, p y) ↔ ∃ x ∈ e.source, p (e x) := by
   rw [← image_source_eq_target, bex_image_iff]
 #align local_equiv.exists_mem_target LocalEquiv.exists_mem_target
@@ -489,32 +377,14 @@ namespace IsImage
 
 variable {e} {s : Set α} {t : Set β} {x : α} {y : β}
 
-/- warning: local_equiv.is_image.apply_mem_iff -> LocalEquiv.IsImage.apply_mem_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {s : Set.{u1} α} {t : Set.{u2} β} {x : α}, (LocalEquiv.IsImage.{u1, u2} α β e s t) -> (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x (LocalEquiv.source.{u1, u2} α β e)) -> (Iff (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e x) t) (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {s : Set.{u2} α} {t : Set.{u1} β} {x : α}, (LocalEquiv.IsImage.{u2, u1} α β e s t) -> (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x (LocalEquiv.source.{u2, u1} α β e)) -> (Iff (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) (LocalEquiv.toFun.{u2, u1} α β e x) t) (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x s))
-Case conversion may be inaccurate. Consider using '#align local_equiv.is_image.apply_mem_iff LocalEquiv.IsImage.apply_mem_iffₓ'. -/
 theorem apply_mem_iff (h : e.IsImage s t) (hx : x ∈ e.source) : e x ∈ t ↔ x ∈ s :=
   h hx
 #align local_equiv.is_image.apply_mem_iff LocalEquiv.IsImage.apply_mem_iff
 
-/- warning: local_equiv.is_image.symm_apply_mem_iff -> LocalEquiv.IsImage.symm_apply_mem_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {s : Set.{u1} α} {t : Set.{u2} β}, (LocalEquiv.IsImage.{u1, u2} α β e s t) -> (forall {{y : β}}, (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) y (LocalEquiv.target.{u1, u2} α β e)) -> (Iff (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e) y) s) (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) y t)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {s : Set.{u2} α} {t : Set.{u1} β}, (LocalEquiv.IsImage.{u2, u1} α β e s t) -> (forall {{y : β}}, (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) y (LocalEquiv.target.{u2, u1} α β e)) -> (Iff (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e) y) s) (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) y t)))
-Case conversion may be inaccurate. Consider using '#align local_equiv.is_image.symm_apply_mem_iff LocalEquiv.IsImage.symm_apply_mem_iffₓ'. -/
 theorem symm_apply_mem_iff (h : e.IsImage s t) : ∀ ⦃y⦄, y ∈ e.target → (e.symm y ∈ s ↔ y ∈ t) :=
   e.forall_mem_target.mpr fun x hx => by rw [e.left_inv hx, h hx]
 #align local_equiv.is_image.symm_apply_mem_iff LocalEquiv.IsImage.symm_apply_mem_iff
 
-/- warning: local_equiv.is_image.symm -> LocalEquiv.IsImage.symm is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {s : Set.{u1} α} {t : Set.{u2} β}, (LocalEquiv.IsImage.{u1, u2} α β e s t) -> (LocalEquiv.IsImage.{u2, u1} β α (LocalEquiv.symm.{u1, u2} α β e) t s)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {s : Set.{u2} α} {t : Set.{u1} β}, (LocalEquiv.IsImage.{u2, u1} α β e s t) -> (LocalEquiv.IsImage.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e) t s)
-Case conversion may be inaccurate. Consider using '#align local_equiv.is_image.symm LocalEquiv.IsImage.symmₓ'. -/
 protected theorem symm (h : e.IsImage s t) : e.symm.IsImage t s :=
   h.symm_apply_mem_iff
 #align local_equiv.is_image.symm LocalEquiv.IsImage.symm
@@ -526,22 +396,10 @@ theorem symm_iff : e.symm.IsImage t s ↔ e.IsImage s t :=
 #align local_equiv.is_image.symm_iff LocalEquiv.IsImage.symm_iff
 -/
 
-/- warning: local_equiv.is_image.maps_to -> LocalEquiv.IsImage.mapsTo is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {s : Set.{u1} α} {t : Set.{u2} β}, (LocalEquiv.IsImage.{u1, u2} α β e s t) -> (Set.MapsTo.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) s) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.target.{u1, u2} α β e) t))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {s : Set.{u2} α} {t : Set.{u1} β}, (LocalEquiv.IsImage.{u2, u1} α β e s t) -> (Set.MapsTo.{u2, u1} α β (LocalEquiv.toFun.{u2, u1} α β e) (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) (LocalEquiv.source.{u2, u1} α β e) s) (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (LocalEquiv.target.{u2, u1} α β e) t))
-Case conversion may be inaccurate. Consider using '#align local_equiv.is_image.maps_to LocalEquiv.IsImage.mapsToₓ'. -/
 protected theorem mapsTo (h : e.IsImage s t) : MapsTo e (e.source ∩ s) (e.target ∩ t) := fun x hx =>
   ⟨e.MapsTo hx.1, (h hx.1).2 hx.2⟩
 #align local_equiv.is_image.maps_to LocalEquiv.IsImage.mapsTo
 
-/- warning: local_equiv.is_image.symm_maps_to -> LocalEquiv.IsImage.symm_mapsTo is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {s : Set.{u1} α} {t : Set.{u2} β}, (LocalEquiv.IsImage.{u1, u2} α β e s t) -> (Set.MapsTo.{u2, u1} β α (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e)) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.target.{u1, u2} α β e) t) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {s : Set.{u2} α} {t : Set.{u1} β}, (LocalEquiv.IsImage.{u2, u1} α β e s t) -> (Set.MapsTo.{u1, u2} β α (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e)) (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (LocalEquiv.target.{u2, u1} α β e) t) (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) (LocalEquiv.source.{u2, u1} α β e) s))
-Case conversion may be inaccurate. Consider using '#align local_equiv.is_image.symm_maps_to LocalEquiv.IsImage.symm_mapsToₓ'. -/
 theorem symm_mapsTo (h : e.IsImage s t) : MapsTo e.symm (e.target ∩ t) (e.source ∩ s) :=
   h.symm.MapsTo
 #align local_equiv.is_image.symm_maps_to LocalEquiv.IsImage.symm_mapsTo
@@ -562,144 +420,54 @@ def restr (h : e.IsImage s t) : LocalEquiv α β
 #align local_equiv.is_image.restr LocalEquiv.IsImage.restr
 -/
 
-/- warning: local_equiv.is_image.image_eq -> LocalEquiv.IsImage.image_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {s : Set.{u1} α} {t : Set.{u2} β}, (LocalEquiv.IsImage.{u1, u2} α β e s t) -> (Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) s)) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.target.{u1, u2} α β e) t))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {s : Set.{u2} α} {t : Set.{u1} β}, (LocalEquiv.IsImage.{u2, u1} α β e s t) -> (Eq.{succ u1} (Set.{u1} β) (Set.image.{u2, u1} α β (LocalEquiv.toFun.{u2, u1} α β e) (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) (LocalEquiv.source.{u2, u1} α β e) s)) (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (LocalEquiv.target.{u2, u1} α β e) t))
-Case conversion may be inaccurate. Consider using '#align local_equiv.is_image.image_eq LocalEquiv.IsImage.image_eqₓ'. -/
 theorem image_eq (h : e.IsImage s t) : e '' (e.source ∩ s) = e.target ∩ t :=
   h.restr.image_source_eq_target
 #align local_equiv.is_image.image_eq LocalEquiv.IsImage.image_eq
 
-/- warning: local_equiv.is_image.symm_image_eq -> LocalEquiv.IsImage.symm_image_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {s : Set.{u1} α} {t : Set.{u2} β}, (LocalEquiv.IsImage.{u1, u2} α β e s t) -> (Eq.{succ u1} (Set.{u1} α) (Set.image.{u2, u1} β α (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e)) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.target.{u1, u2} α β e) t)) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {s : Set.{u2} α} {t : Set.{u1} β}, (LocalEquiv.IsImage.{u2, u1} α β e s t) -> (Eq.{succ u2} (Set.{u2} α) (Set.image.{u1, u2} β α (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e)) (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (LocalEquiv.target.{u2, u1} α β e) t)) (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) (LocalEquiv.source.{u2, u1} α β e) s))
-Case conversion may be inaccurate. Consider using '#align local_equiv.is_image.symm_image_eq LocalEquiv.IsImage.symm_image_eqₓ'. -/
 theorem symm_image_eq (h : e.IsImage s t) : e.symm '' (e.target ∩ t) = e.source ∩ s :=
   h.symm.image_eq
 #align local_equiv.is_image.symm_image_eq LocalEquiv.IsImage.symm_image_eq
 
-/- warning: local_equiv.is_image.iff_preimage_eq -> LocalEquiv.IsImage.iff_preimage_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {s : Set.{u1} α} {t : Set.{u2} β}, Iff (LocalEquiv.IsImage.{u1, u2} α β e s t) (Eq.{succ u1} (Set.{u1} α) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) (Set.preimage.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) t)) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {s : Set.{u2} α} {t : Set.{u1} β}, Iff (LocalEquiv.IsImage.{u2, u1} α β e s t) (Eq.{succ u2} (Set.{u2} α) (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) (LocalEquiv.source.{u2, u1} α β e) (Set.preimage.{u2, u1} α β (LocalEquiv.toFun.{u2, u1} α β e) t)) (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) (LocalEquiv.source.{u2, u1} α β e) s))
-Case conversion may be inaccurate. Consider using '#align local_equiv.is_image.iff_preimage_eq LocalEquiv.IsImage.iff_preimage_eqₓ'. -/
 theorem iff_preimage_eq : e.IsImage s t ↔ e.source ∩ e ⁻¹' t = e.source ∩ s := by
   simp only [is_image, Set.ext_iff, mem_inter_iff, and_congr_right_iff, mem_preimage]
 #align local_equiv.is_image.iff_preimage_eq LocalEquiv.IsImage.iff_preimage_eq
 
-/- warning: local_equiv.is_image.preimage_eq -> LocalEquiv.IsImage.preimage_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {s : Set.{u1} α} {t : Set.{u2} β}, (LocalEquiv.IsImage.{u1, u2} α β e s t) -> (Eq.{succ u1} (Set.{u1} α) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) (Set.preimage.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) t)) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {s : Set.{u2} α} {t : Set.{u1} β}, (LocalEquiv.IsImage.{u2, u1} α β e s t) -> (Eq.{succ u2} (Set.{u2} α) (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) (LocalEquiv.source.{u2, u1} α β e) (Set.preimage.{u2, u1} α β (LocalEquiv.toFun.{u2, u1} α β e) t)) (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) (LocalEquiv.source.{u2, u1} α β e) s))
-Case conversion may be inaccurate. Consider using '#align local_equiv.is_image.preimage_eq LocalEquiv.IsImage.preimage_eqₓ'. -/
-/- warning: local_equiv.is_image.of_preimage_eq -> LocalEquiv.IsImage.of_preimage_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {s : Set.{u1} α} {t : Set.{u2} β}, (Eq.{succ u1} (Set.{u1} α) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) (Set.preimage.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) t)) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) s)) -> (LocalEquiv.IsImage.{u1, u2} α β e s t)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {s : Set.{u2} α} {t : Set.{u1} β}, (Eq.{succ u2} (Set.{u2} α) (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) (LocalEquiv.source.{u2, u1} α β e) (Set.preimage.{u2, u1} α β (LocalEquiv.toFun.{u2, u1} α β e) t)) (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) (LocalEquiv.source.{u2, u1} α β e) s)) -> (LocalEquiv.IsImage.{u2, u1} α β e s t)
-Case conversion may be inaccurate. Consider using '#align local_equiv.is_image.of_preimage_eq LocalEquiv.IsImage.of_preimage_eqₓ'. -/
 alias iff_preimage_eq ↔ preimage_eq of_preimage_eq
 #align local_equiv.is_image.preimage_eq LocalEquiv.IsImage.preimage_eq
 #align local_equiv.is_image.of_preimage_eq LocalEquiv.IsImage.of_preimage_eq
 
-/- warning: local_equiv.is_image.iff_symm_preimage_eq -> LocalEquiv.IsImage.iff_symm_preimage_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {s : Set.{u1} α} {t : Set.{u2} β}, Iff (LocalEquiv.IsImage.{u1, u2} α β e s t) (Eq.{succ u2} (Set.{u2} β) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.target.{u1, u2} α β e) (Set.preimage.{u2, u1} β α (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e)) s)) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.target.{u1, u2} α β e) t))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {s : Set.{u2} α} {t : Set.{u1} β}, Iff (LocalEquiv.IsImage.{u2, u1} α β e s t) (Eq.{succ u1} (Set.{u1} β) (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (LocalEquiv.target.{u2, u1} α β e) (Set.preimage.{u1, u2} β α (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e)) s)) (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (LocalEquiv.target.{u2, u1} α β e) t))
-Case conversion may be inaccurate. Consider using '#align local_equiv.is_image.iff_symm_preimage_eq LocalEquiv.IsImage.iff_symm_preimage_eqₓ'. -/
 theorem iff_symm_preimage_eq : e.IsImage s t ↔ e.target ∩ e.symm ⁻¹' s = e.target ∩ t :=
   symm_iff.symm.trans iff_preimage_eq
 #align local_equiv.is_image.iff_symm_preimage_eq LocalEquiv.IsImage.iff_symm_preimage_eq
 
-/- warning: local_equiv.is_image.symm_preimage_eq -> LocalEquiv.IsImage.symm_preimage_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {s : Set.{u1} α} {t : Set.{u2} β}, (LocalEquiv.IsImage.{u1, u2} α β e s t) -> (Eq.{succ u2} (Set.{u2} β) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.target.{u1, u2} α β e) (Set.preimage.{u2, u1} β α (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e)) s)) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.target.{u1, u2} α β e) t))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {s : Set.{u2} α} {t : Set.{u1} β}, (LocalEquiv.IsImage.{u2, u1} α β e s t) -> (Eq.{succ u1} (Set.{u1} β) (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (LocalEquiv.target.{u2, u1} α β e) (Set.preimage.{u1, u2} β α (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e)) s)) (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (LocalEquiv.target.{u2, u1} α β e) t))
-Case conversion may be inaccurate. Consider using '#align local_equiv.is_image.symm_preimage_eq LocalEquiv.IsImage.symm_preimage_eqₓ'. -/
-/- warning: local_equiv.is_image.of_symm_preimage_eq -> LocalEquiv.IsImage.of_symm_preimage_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {s : Set.{u1} α} {t : Set.{u2} β}, (Eq.{succ u2} (Set.{u2} β) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.target.{u1, u2} α β e) (Set.preimage.{u2, u1} β α (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e)) s)) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.target.{u1, u2} α β e) t)) -> (LocalEquiv.IsImage.{u1, u2} α β e s t)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {s : Set.{u2} α} {t : Set.{u1} β}, (Eq.{succ u1} (Set.{u1} β) (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (LocalEquiv.target.{u2, u1} α β e) (Set.preimage.{u1, u2} β α (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e)) s)) (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (LocalEquiv.target.{u2, u1} α β e) t)) -> (LocalEquiv.IsImage.{u2, u1} α β e s t)
-Case conversion may be inaccurate. Consider using '#align local_equiv.is_image.of_symm_preimage_eq LocalEquiv.IsImage.of_symm_preimage_eqₓ'. -/
 alias iff_symm_preimage_eq ↔ symm_preimage_eq of_symm_preimage_eq
 #align local_equiv.is_image.symm_preimage_eq LocalEquiv.IsImage.symm_preimage_eq
 #align local_equiv.is_image.of_symm_preimage_eq LocalEquiv.IsImage.of_symm_preimage_eq
 
-/- warning: local_equiv.is_image.of_image_eq -> LocalEquiv.IsImage.of_image_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {s : Set.{u1} α} {t : Set.{u2} β}, (Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) s)) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.target.{u1, u2} α β e) t)) -> (LocalEquiv.IsImage.{u1, u2} α β e s t)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {s : Set.{u1} α} {t : Set.{u2} β}, (Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β (LocalEquiv.toFun.{u1, u2} α β e) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) (LocalEquiv.source.{u1, u2} α β e) s)) (Inter.inter.{u2} (Set.{u2} β) (Set.instInterSet.{u2} β) (LocalEquiv.target.{u1, u2} α β e) t)) -> (LocalEquiv.IsImage.{u1, u2} α β e s t)
-Case conversion may be inaccurate. Consider using '#align local_equiv.is_image.of_image_eq LocalEquiv.IsImage.of_image_eqₓ'. -/
 theorem of_image_eq (h : e '' (e.source ∩ s) = e.target ∩ t) : e.IsImage s t :=
   of_symm_preimage_eq <| Eq.trans (of_symm_preimage_eq rfl).image_eq.symm h
 #align local_equiv.is_image.of_image_eq LocalEquiv.IsImage.of_image_eq
 
-/- warning: local_equiv.is_image.of_symm_image_eq -> LocalEquiv.IsImage.of_symm_image_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {s : Set.{u1} α} {t : Set.{u2} β}, (Eq.{succ u1} (Set.{u1} α) (Set.image.{u2, u1} β α (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e)) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.target.{u1, u2} α β e) t)) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) s)) -> (LocalEquiv.IsImage.{u1, u2} α β e s t)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {s : Set.{u2} α} {t : Set.{u1} β}, (Eq.{succ u2} (Set.{u2} α) (Set.image.{u1, u2} β α (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e)) (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (LocalEquiv.target.{u2, u1} α β e) t)) (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) (LocalEquiv.source.{u2, u1} α β e) s)) -> (LocalEquiv.IsImage.{u2, u1} α β e s t)
-Case conversion may be inaccurate. Consider using '#align local_equiv.is_image.of_symm_image_eq LocalEquiv.IsImage.of_symm_image_eqₓ'. -/
 theorem of_symm_image_eq (h : e.symm '' (e.target ∩ t) = e.source ∩ s) : e.IsImage s t :=
   of_preimage_eq <| Eq.trans (of_preimage_eq rfl).symm_image_eq.symm h
 #align local_equiv.is_image.of_symm_image_eq LocalEquiv.IsImage.of_symm_image_eq
 
-/- warning: local_equiv.is_image.compl -> LocalEquiv.IsImage.compl is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {s : Set.{u1} α} {t : Set.{u2} β}, (LocalEquiv.IsImage.{u1, u2} α β e s t) -> (LocalEquiv.IsImage.{u1, u2} α β e (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s) (HasCompl.compl.{u2} (Set.{u2} β) (BooleanAlgebra.toHasCompl.{u2} (Set.{u2} β) (Set.booleanAlgebra.{u2} β)) t))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {s : Set.{u2} α} {t : Set.{u1} β}, (LocalEquiv.IsImage.{u2, u1} α β e s t) -> (LocalEquiv.IsImage.{u2, u1} α β e (HasCompl.compl.{u2} (Set.{u2} α) (BooleanAlgebra.toHasCompl.{u2} (Set.{u2} α) (Set.instBooleanAlgebraSet.{u2} α)) s) (HasCompl.compl.{u1} (Set.{u1} β) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} β) (Set.instBooleanAlgebraSet.{u1} β)) t))
-Case conversion may be inaccurate. Consider using '#align local_equiv.is_image.compl LocalEquiv.IsImage.complₓ'. -/
 protected theorem compl (h : e.IsImage s t) : e.IsImage (sᶜ) (tᶜ) := fun x hx => not_congr (h hx)
 #align local_equiv.is_image.compl LocalEquiv.IsImage.compl
 
-/- warning: local_equiv.is_image.inter -> LocalEquiv.IsImage.inter is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {s : Set.{u1} α} {t : Set.{u2} β} {s' : Set.{u1} α} {t' : Set.{u2} β}, (LocalEquiv.IsImage.{u1, u2} α β e s t) -> (LocalEquiv.IsImage.{u1, u2} α β e s' t') -> (LocalEquiv.IsImage.{u1, u2} α β e (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) s s') (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) t t'))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {s : Set.{u2} α} {t : Set.{u1} β} {s' : Set.{u2} α} {t' : Set.{u1} β}, (LocalEquiv.IsImage.{u2, u1} α β e s t) -> (LocalEquiv.IsImage.{u2, u1} α β e s' t') -> (LocalEquiv.IsImage.{u2, u1} α β e (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) s s') (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) t t'))
-Case conversion may be inaccurate. Consider using '#align local_equiv.is_image.inter LocalEquiv.IsImage.interₓ'. -/
 protected theorem inter {s' t'} (h : e.IsImage s t) (h' : e.IsImage s' t') :
     e.IsImage (s ∩ s') (t ∩ t') := fun x hx => and_congr (h hx) (h' hx)
 #align local_equiv.is_image.inter LocalEquiv.IsImage.inter
 
-/- warning: local_equiv.is_image.union -> LocalEquiv.IsImage.union is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {s : Set.{u1} α} {t : Set.{u2} β} {s' : Set.{u1} α} {t' : Set.{u2} β}, (LocalEquiv.IsImage.{u1, u2} α β e s t) -> (LocalEquiv.IsImage.{u1, u2} α β e s' t') -> (LocalEquiv.IsImage.{u1, u2} α β e (Union.union.{u1} (Set.{u1} α) (Set.hasUnion.{u1} α) s s') (Union.union.{u2} (Set.{u2} β) (Set.hasUnion.{u2} β) t t'))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {s : Set.{u2} α} {t : Set.{u1} β} {s' : Set.{u2} α} {t' : Set.{u1} β}, (LocalEquiv.IsImage.{u2, u1} α β e s t) -> (LocalEquiv.IsImage.{u2, u1} α β e s' t') -> (LocalEquiv.IsImage.{u2, u1} α β e (Union.union.{u2} (Set.{u2} α) (Set.instUnionSet.{u2} α) s s') (Union.union.{u1} (Set.{u1} β) (Set.instUnionSet.{u1} β) t t'))
-Case conversion may be inaccurate. Consider using '#align local_equiv.is_image.union LocalEquiv.IsImage.unionₓ'. -/
 protected theorem union {s' t'} (h : e.IsImage s t) (h' : e.IsImage s' t') :
     e.IsImage (s ∪ s') (t ∪ t') := fun x hx => or_congr (h hx) (h' hx)
 #align local_equiv.is_image.union LocalEquiv.IsImage.union
 
-/- warning: local_equiv.is_image.diff -> LocalEquiv.IsImage.diff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {s : Set.{u1} α} {t : Set.{u2} β} {s' : Set.{u1} α} {t' : Set.{u2} β}, (LocalEquiv.IsImage.{u1, u2} α β e s t) -> (LocalEquiv.IsImage.{u1, u2} α β e s' t') -> (LocalEquiv.IsImage.{u1, u2} α β e (SDiff.sdiff.{u1} (Set.{u1} α) (BooleanAlgebra.toHasSdiff.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s s') (SDiff.sdiff.{u2} (Set.{u2} β) (BooleanAlgebra.toHasSdiff.{u2} (Set.{u2} β) (Set.booleanAlgebra.{u2} β)) t t'))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {s : Set.{u2} α} {t : Set.{u1} β} {s' : Set.{u2} α} {t' : Set.{u1} β}, (LocalEquiv.IsImage.{u2, u1} α β e s t) -> (LocalEquiv.IsImage.{u2, u1} α β e s' t') -> (LocalEquiv.IsImage.{u2, u1} α β e (SDiff.sdiff.{u2} (Set.{u2} α) (Set.instSDiffSet.{u2} α) s s') (SDiff.sdiff.{u1} (Set.{u1} β) (Set.instSDiffSet.{u1} β) t t'))
-Case conversion may be inaccurate. Consider using '#align local_equiv.is_image.diff LocalEquiv.IsImage.diffₓ'. -/
 protected theorem diff {s' t'} (h : e.IsImage s t) (h' : e.IsImage s' t') :
     e.IsImage (s \ s') (t \ t') :=
   h.inter h'.compl
 #align local_equiv.is_image.diff LocalEquiv.IsImage.diff
 
-/- warning: local_equiv.is_image.left_inv_on_piecewise -> LocalEquiv.IsImage.leftInvOn_piecewise is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {s : Set.{u1} α} {t : Set.{u2} β} {e' : LocalEquiv.{u1, u2} α β} [_inst_1 : forall (i : α), Decidable (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) i s)] [_inst_2 : forall (i : β), Decidable (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) i t)], (LocalEquiv.IsImage.{u1, u2} α β e s t) -> (LocalEquiv.IsImage.{u1, u2} α β e' s t) -> (Set.LeftInvOn.{u1, u2} α β (Set.piecewise.{u2, succ u1} β (fun (ᾰ : β) => α) t (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e)) (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e')) (fun (j : β) => _inst_2 j)) (Set.piecewise.{u1, succ u2} α (fun (ᾰ : α) => β) s (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e') (fun (j : α) => _inst_1 j)) (Set.ite.{u1} α s (LocalEquiv.source.{u1, u2} α β e) (LocalEquiv.source.{u1, u2} α β e')))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {s : Set.{u2} α} {t : Set.{u1} β} {e' : LocalEquiv.{u2, u1} α β} [_inst_1 : forall (i : α), Decidable (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) i s)] [_inst_2 : forall (i : β), Decidable (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) i t)], (LocalEquiv.IsImage.{u2, u1} α β e s t) -> (LocalEquiv.IsImage.{u2, u1} α β e' s t) -> (Set.LeftInvOn.{u2, u1} α β (Set.piecewise.{u1, succ u2} β (fun (ᾰ : β) => α) t (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e)) (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e')) (fun (j : β) => _inst_2 j)) (Set.piecewise.{u2, succ u1} α (fun (ᾰ : α) => β) s (LocalEquiv.toFun.{u2, u1} α β e) (LocalEquiv.toFun.{u2, u1} α β e') (fun (j : α) => _inst_1 j)) (Set.ite.{u2} α s (LocalEquiv.source.{u2, u1} α β e) (LocalEquiv.source.{u2, u1} α β e')))
-Case conversion may be inaccurate. Consider using '#align local_equiv.is_image.left_inv_on_piecewise LocalEquiv.IsImage.leftInvOn_piecewiseₓ'. -/
 theorem leftInvOn_piecewise {e' : LocalEquiv α β} [∀ i, Decidable (i ∈ s)] [∀ i, Decidable (i ∈ t)]
     (h : e.IsImage s t) (h' : e'.IsImage s t) :
     LeftInvOn (t.piecewise e.symm e'.symm) (s.piecewise e e') (s.ite e.source e'.source) :=
@@ -711,23 +479,11 @@ theorem leftInvOn_piecewise {e' : LocalEquiv α β} [∀ i, Decidable (i ∈ s)]
       e'.left_inv he]
 #align local_equiv.is_image.left_inv_on_piecewise LocalEquiv.IsImage.leftInvOn_piecewise
 
-/- warning: local_equiv.is_image.inter_eq_of_inter_eq_of_eq_on -> LocalEquiv.IsImage.inter_eq_of_inter_eq_of_eqOn is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {s : Set.{u1} α} {t : Set.{u2} β} {e' : LocalEquiv.{u1, u2} α β}, (LocalEquiv.IsImage.{u1, u2} α β e s t) -> (LocalEquiv.IsImage.{u1, u2} α β e' s t) -> (Eq.{succ u1} (Set.{u1} α) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) s) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e') s)) -> (Set.EqOn.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e') (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) s)) -> (Eq.{succ u2} (Set.{u2} β) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.target.{u1, u2} α β e) t) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.target.{u1, u2} α β e') t))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {s : Set.{u2} α} {t : Set.{u1} β} {e' : LocalEquiv.{u2, u1} α β}, (LocalEquiv.IsImage.{u2, u1} α β e s t) -> (LocalEquiv.IsImage.{u2, u1} α β e' s t) -> (Eq.{succ u2} (Set.{u2} α) (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) (LocalEquiv.source.{u2, u1} α β e) s) (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) (LocalEquiv.source.{u2, u1} α β e') s)) -> (Set.EqOn.{u2, u1} α β (LocalEquiv.toFun.{u2, u1} α β e) (LocalEquiv.toFun.{u2, u1} α β e') (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) (LocalEquiv.source.{u2, u1} α β e) s)) -> (Eq.{succ u1} (Set.{u1} β) (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (LocalEquiv.target.{u2, u1} α β e) t) (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (LocalEquiv.target.{u2, u1} α β e') t))
-Case conversion may be inaccurate. Consider using '#align local_equiv.is_image.inter_eq_of_inter_eq_of_eq_on LocalEquiv.IsImage.inter_eq_of_inter_eq_of_eqOnₓ'. -/
 theorem inter_eq_of_inter_eq_of_eqOn {e' : LocalEquiv α β} (h : e.IsImage s t) (h' : e'.IsImage s t)
     (hs : e.source ∩ s = e'.source ∩ s) (Heq : EqOn e e' (e.source ∩ s)) :
     e.target ∩ t = e'.target ∩ t := by rw [← h.image_eq, ← h'.image_eq, ← hs, Heq.image_eq]
 #align local_equiv.is_image.inter_eq_of_inter_eq_of_eq_on LocalEquiv.IsImage.inter_eq_of_inter_eq_of_eqOn
 
-/- warning: local_equiv.is_image.symm_eq_on_of_inter_eq_of_eq_on -> LocalEquiv.IsImage.symm_eq_on_of_inter_eq_of_eqOn is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {s : Set.{u1} α} {t : Set.{u2} β} {e' : LocalEquiv.{u1, u2} α β}, (LocalEquiv.IsImage.{u1, u2} α β e s t) -> (Eq.{succ u1} (Set.{u1} α) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) s) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e') s)) -> (Set.EqOn.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e') (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) s)) -> (Set.EqOn.{u2, u1} β α (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e)) (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e')) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.target.{u1, u2} α β e) t))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {s : Set.{u2} α} {t : Set.{u1} β} {e' : LocalEquiv.{u2, u1} α β}, (LocalEquiv.IsImage.{u2, u1} α β e s t) -> (Eq.{succ u2} (Set.{u2} α) (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) (LocalEquiv.source.{u2, u1} α β e) s) (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) (LocalEquiv.source.{u2, u1} α β e') s)) -> (Set.EqOn.{u2, u1} α β (LocalEquiv.toFun.{u2, u1} α β e) (LocalEquiv.toFun.{u2, u1} α β e') (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) (LocalEquiv.source.{u2, u1} α β e) s)) -> (Set.EqOn.{u1, u2} β α (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e)) (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e')) (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (LocalEquiv.target.{u2, u1} α β e) t))
-Case conversion may be inaccurate. Consider using '#align local_equiv.is_image.symm_eq_on_of_inter_eq_of_eq_on LocalEquiv.IsImage.symm_eq_on_of_inter_eq_of_eqOnₓ'. -/
 theorem symm_eq_on_of_inter_eq_of_eqOn {e' : LocalEquiv α β} (h : e.IsImage s t)
     (hs : e.source ∩ s = e'.source ∩ s) (Heq : EqOn e e' (e.source ∩ s)) :
     EqOn e.symm e'.symm (e.target ∩ t) :=
@@ -740,129 +496,57 @@ theorem symm_eq_on_of_inter_eq_of_eqOn {e' : LocalEquiv α β} (h : e.IsImage s
 
 end IsImage
 
-/- warning: local_equiv.is_image_source_target -> LocalEquiv.isImage_source_target is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β), LocalEquiv.IsImage.{u1, u2} α β e (LocalEquiv.source.{u1, u2} α β e) (LocalEquiv.target.{u1, u2} α β e)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β), LocalEquiv.IsImage.{u2, u1} α β e (LocalEquiv.source.{u2, u1} α β e) (LocalEquiv.target.{u2, u1} α β e)
-Case conversion may be inaccurate. Consider using '#align local_equiv.is_image_source_target LocalEquiv.isImage_source_targetₓ'. -/
 theorem isImage_source_target : e.IsImage e.source e.target := fun x hx => by simp [hx]
 #align local_equiv.is_image_source_target LocalEquiv.isImage_source_target
 
-/- warning: local_equiv.is_image_source_target_of_disjoint -> LocalEquiv.isImage_source_target_of_disjoint is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) (e' : LocalEquiv.{u1, u2} α β), (Disjoint.{u1} (Set.{u1} α) (SemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (Lattice.toSemilatticeInf.{u1} (Set.{u1} α) (GeneralizedCoheytingAlgebra.toLattice.{u1} (Set.{u1} α) (GeneralizedBooleanAlgebra.toGeneralizedCoheytingAlgebra.{u1} (Set.{u1} α) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)))))) (GeneralizedBooleanAlgebra.toOrderBot.{u1} (Set.{u1} α) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α))) (LocalEquiv.source.{u1, u2} α β e) (LocalEquiv.source.{u1, u2} α β e')) -> (Disjoint.{u2} (Set.{u2} β) (SemilatticeInf.toPartialOrder.{u2} (Set.{u2} β) (Lattice.toSemilatticeInf.{u2} (Set.{u2} β) (GeneralizedCoheytingAlgebra.toLattice.{u2} (Set.{u2} β) (GeneralizedBooleanAlgebra.toGeneralizedCoheytingAlgebra.{u2} (Set.{u2} β) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u2} (Set.{u2} β) (Set.booleanAlgebra.{u2} β)))))) (GeneralizedBooleanAlgebra.toOrderBot.{u2} (Set.{u2} β) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u2} (Set.{u2} β) (Set.booleanAlgebra.{u2} β))) (LocalEquiv.target.{u1, u2} α β e) (LocalEquiv.target.{u1, u2} α β e')) -> (LocalEquiv.IsImage.{u1, u2} α β e (LocalEquiv.source.{u1, u2} α β e') (LocalEquiv.target.{u1, u2} α β e'))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β) (e' : LocalEquiv.{u2, u1} α β), (Disjoint.{u2} (Set.{u2} α) (SemilatticeInf.toPartialOrder.{u2} (Set.{u2} α) (Lattice.toSemilatticeInf.{u2} (Set.{u2} α) (GeneralizedCoheytingAlgebra.toLattice.{u2} (Set.{u2} α) (CoheytingAlgebra.toGeneralizedCoheytingAlgebra.{u2} (Set.{u2} α) (BiheytingAlgebra.toCoheytingAlgebra.{u2} (Set.{u2} α) (BooleanAlgebra.toBiheytingAlgebra.{u2} (Set.{u2} α) (Set.instBooleanAlgebraSet.{u2} α))))))) (BoundedOrder.toOrderBot.{u2} (Set.{u2} α) (Preorder.toLE.{u2} (Set.{u2} α) (PartialOrder.toPreorder.{u2} (Set.{u2} α) (SemilatticeInf.toPartialOrder.{u2} (Set.{u2} α) (Lattice.toSemilatticeInf.{u2} (Set.{u2} α) (GeneralizedCoheytingAlgebra.toLattice.{u2} (Set.{u2} α) (CoheytingAlgebra.toGeneralizedCoheytingAlgebra.{u2} (Set.{u2} α) (BiheytingAlgebra.toCoheytingAlgebra.{u2} (Set.{u2} α) (BooleanAlgebra.toBiheytingAlgebra.{u2} (Set.{u2} α) (Set.instBooleanAlgebraSet.{u2} α))))))))) (BooleanAlgebra.toBoundedOrder.{u2} (Set.{u2} α) (Set.instBooleanAlgebraSet.{u2} α))) (LocalEquiv.source.{u2, u1} α β e) (LocalEquiv.source.{u2, u1} α β e')) -> (Disjoint.{u1} (Set.{u1} β) (SemilatticeInf.toPartialOrder.{u1} (Set.{u1} β) (Lattice.toSemilatticeInf.{u1} (Set.{u1} β) (GeneralizedCoheytingAlgebra.toLattice.{u1} (Set.{u1} β) (CoheytingAlgebra.toGeneralizedCoheytingAlgebra.{u1} (Set.{u1} β) (BiheytingAlgebra.toCoheytingAlgebra.{u1} (Set.{u1} β) (BooleanAlgebra.toBiheytingAlgebra.{u1} (Set.{u1} β) (Set.instBooleanAlgebraSet.{u1} β))))))) (BoundedOrder.toOrderBot.{u1} (Set.{u1} β) (Preorder.toLE.{u1} (Set.{u1} β) (PartialOrder.toPreorder.{u1} (Set.{u1} β) (SemilatticeInf.toPartialOrder.{u1} (Set.{u1} β) (Lattice.toSemilatticeInf.{u1} (Set.{u1} β) (GeneralizedCoheytingAlgebra.toLattice.{u1} (Set.{u1} β) (CoheytingAlgebra.toGeneralizedCoheytingAlgebra.{u1} (Set.{u1} β) (BiheytingAlgebra.toCoheytingAlgebra.{u1} (Set.{u1} β) (BooleanAlgebra.toBiheytingAlgebra.{u1} (Set.{u1} β) (Set.instBooleanAlgebraSet.{u1} β))))))))) (BooleanAlgebra.toBoundedOrder.{u1} (Set.{u1} β) (Set.instBooleanAlgebraSet.{u1} β))) (LocalEquiv.target.{u2, u1} α β e) (LocalEquiv.target.{u2, u1} α β e')) -> (LocalEquiv.IsImage.{u2, u1} α β e (LocalEquiv.source.{u2, u1} α β e') (LocalEquiv.target.{u2, u1} α β e'))
-Case conversion may be inaccurate. Consider using '#align local_equiv.is_image_source_target_of_disjoint LocalEquiv.isImage_source_target_of_disjointₓ'. -/
 theorem isImage_source_target_of_disjoint (e' : LocalEquiv α β) (hs : Disjoint e.source e'.source)
     (ht : Disjoint e.target e'.target) : e.IsImage e'.source e'.target :=
   IsImage.of_image_eq <| by rw [hs.inter_eq, ht.inter_eq, image_empty]
 #align local_equiv.is_image_source_target_of_disjoint LocalEquiv.isImage_source_target_of_disjoint
 
-/- warning: local_equiv.image_source_inter_eq' -> LocalEquiv.image_source_inter_eq' is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) (s : Set.{u1} α), Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) s)) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.target.{u1, u2} α β e) (Set.preimage.{u2, u1} β α (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e)) s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β) (s : Set.{u2} α), Eq.{succ u1} (Set.{u1} β) (Set.image.{u2, u1} α β (LocalEquiv.toFun.{u2, u1} α β e) (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) (LocalEquiv.source.{u2, u1} α β e) s)) (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (LocalEquiv.target.{u2, u1} α β e) (Set.preimage.{u1, u2} β α (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e)) s))
-Case conversion may be inaccurate. Consider using '#align local_equiv.image_source_inter_eq' LocalEquiv.image_source_inter_eq'ₓ'. -/
 theorem image_source_inter_eq' (s : Set α) : e '' (e.source ∩ s) = e.target ∩ e.symm ⁻¹' s := by
   rw [inter_comm, e.left_inv_on.image_inter', image_source_eq_target, inter_comm]
 #align local_equiv.image_source_inter_eq' LocalEquiv.image_source_inter_eq'
 
-/- warning: local_equiv.image_source_inter_eq -> LocalEquiv.image_source_inter_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) (s : Set.{u1} α), Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) s)) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.target.{u1, u2} α β e) (Set.preimage.{u2, u1} β α (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e)) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) s)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β) (s : Set.{u2} α), Eq.{succ u1} (Set.{u1} β) (Set.image.{u2, u1} α β (LocalEquiv.toFun.{u2, u1} α β e) (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) (LocalEquiv.source.{u2, u1} α β e) s)) (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (LocalEquiv.target.{u2, u1} α β e) (Set.preimage.{u1, u2} β α (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e)) (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) (LocalEquiv.source.{u2, u1} α β e) s)))
-Case conversion may be inaccurate. Consider using '#align local_equiv.image_source_inter_eq LocalEquiv.image_source_inter_eqₓ'. -/
 theorem image_source_inter_eq (s : Set α) :
     e '' (e.source ∩ s) = e.target ∩ e.symm ⁻¹' (e.source ∩ s) := by
   rw [inter_comm, e.left_inv_on.image_inter, image_source_eq_target, inter_comm]
 #align local_equiv.image_source_inter_eq LocalEquiv.image_source_inter_eq
 
-/- warning: local_equiv.image_eq_target_inter_inv_preimage -> LocalEquiv.image_eq_target_inter_inv_preimage is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) {s : Set.{u1} α}, (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) s (LocalEquiv.source.{u1, u2} α β e)) -> (Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) s) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.target.{u1, u2} α β e) (Set.preimage.{u2, u1} β α (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e)) s)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β) {s : Set.{u2} α}, (HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) s (LocalEquiv.source.{u2, u1} α β e)) -> (Eq.{succ u1} (Set.{u1} β) (Set.image.{u2, u1} α β (LocalEquiv.toFun.{u2, u1} α β e) s) (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (LocalEquiv.target.{u2, u1} α β e) (Set.preimage.{u1, u2} β α (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e)) s)))
-Case conversion may be inaccurate. Consider using '#align local_equiv.image_eq_target_inter_inv_preimage LocalEquiv.image_eq_target_inter_inv_preimageₓ'. -/
 theorem image_eq_target_inter_inv_preimage {s : Set α} (h : s ⊆ e.source) :
     e '' s = e.target ∩ e.symm ⁻¹' s := by
   rw [← e.image_source_inter_eq', inter_eq_self_of_subset_right h]
 #align local_equiv.image_eq_target_inter_inv_preimage LocalEquiv.image_eq_target_inter_inv_preimage
 
-/- warning: local_equiv.symm_image_eq_source_inter_preimage -> LocalEquiv.symm_image_eq_source_inter_preimage is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) {s : Set.{u2} β}, (HasSubset.Subset.{u2} (Set.{u2} β) (Set.hasSubset.{u2} β) s (LocalEquiv.target.{u1, u2} α β e)) -> (Eq.{succ u1} (Set.{u1} α) (Set.image.{u2, u1} β α (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e)) s) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) (Set.preimage.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) s)))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) {s : Set.{u2} β}, (HasSubset.Subset.{u2} (Set.{u2} β) (Set.instHasSubsetSet.{u2} β) s (LocalEquiv.target.{u1, u2} α β e)) -> (Eq.{succ u1} (Set.{u1} α) (Set.image.{u2, u1} β α (LocalEquiv.toFun.{u2, u1} β α (LocalEquiv.symm.{u1, u2} α β e)) s) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) (LocalEquiv.source.{u1, u2} α β e) (Set.preimage.{u1, u2} α β (LocalEquiv.toFun.{u1, u2} α β e) s)))
-Case conversion may be inaccurate. Consider using '#align local_equiv.symm_image_eq_source_inter_preimage LocalEquiv.symm_image_eq_source_inter_preimageₓ'. -/
 theorem symm_image_eq_source_inter_preimage {s : Set β} (h : s ⊆ e.target) :
     e.symm '' s = e.source ∩ e ⁻¹' s :=
   e.symm.image_eq_target_inter_inv_preimage h
 #align local_equiv.symm_image_eq_source_inter_preimage LocalEquiv.symm_image_eq_source_inter_preimage
 
-/- warning: local_equiv.symm_image_target_inter_eq -> LocalEquiv.symm_image_target_inter_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) (s : Set.{u2} β), Eq.{succ u1} (Set.{u1} α) (Set.image.{u2, u1} β α (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e)) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.target.{u1, u2} α β e) s)) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) (Set.preimage.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.target.{u1, u2} α β e) s)))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) (s : Set.{u2} β), Eq.{succ u1} (Set.{u1} α) (Set.image.{u2, u1} β α (LocalEquiv.toFun.{u2, u1} β α (LocalEquiv.symm.{u1, u2} α β e)) (Inter.inter.{u2} (Set.{u2} β) (Set.instInterSet.{u2} β) (LocalEquiv.target.{u1, u2} α β e) s)) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) (LocalEquiv.source.{u1, u2} α β e) (Set.preimage.{u1, u2} α β (LocalEquiv.toFun.{u1, u2} α β e) (Inter.inter.{u2} (Set.{u2} β) (Set.instInterSet.{u2} β) (LocalEquiv.target.{u1, u2} α β e) s)))
-Case conversion may be inaccurate. Consider using '#align local_equiv.symm_image_target_inter_eq LocalEquiv.symm_image_target_inter_eqₓ'. -/
 theorem symm_image_target_inter_eq (s : Set β) :
     e.symm '' (e.target ∩ s) = e.source ∩ e ⁻¹' (e.target ∩ s) :=
   e.symm.image_source_inter_eq _
 #align local_equiv.symm_image_target_inter_eq LocalEquiv.symm_image_target_inter_eq
 
-/- warning: local_equiv.symm_image_target_inter_eq' -> LocalEquiv.symm_image_target_inter_eq' is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) (s : Set.{u2} β), Eq.{succ u1} (Set.{u1} α) (Set.image.{u2, u1} β α (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e)) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.target.{u1, u2} α β e) s)) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) (Set.preimage.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) s))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) (s : Set.{u2} β), Eq.{succ u1} (Set.{u1} α) (Set.image.{u2, u1} β α (LocalEquiv.toFun.{u2, u1} β α (LocalEquiv.symm.{u1, u2} α β e)) (Inter.inter.{u2} (Set.{u2} β) (Set.instInterSet.{u2} β) (LocalEquiv.target.{u1, u2} α β e) s)) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) (LocalEquiv.source.{u1, u2} α β e) (Set.preimage.{u1, u2} α β (LocalEquiv.toFun.{u1, u2} α β e) s))
-Case conversion may be inaccurate. Consider using '#align local_equiv.symm_image_target_inter_eq' LocalEquiv.symm_image_target_inter_eq'ₓ'. -/
 theorem symm_image_target_inter_eq' (s : Set β) : e.symm '' (e.target ∩ s) = e.source ∩ e ⁻¹' s :=
   e.symm.image_source_inter_eq' _
 #align local_equiv.symm_image_target_inter_eq' LocalEquiv.symm_image_target_inter_eq'
 
-/- warning: local_equiv.source_inter_preimage_inv_preimage -> LocalEquiv.source_inter_preimage_inv_preimage is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) (s : Set.{u1} α), Eq.{succ u1} (Set.{u1} α) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) (Set.preimage.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) (Set.preimage.{u2, u1} β α (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e)) s))) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) s)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β) (s : Set.{u2} α), Eq.{succ u2} (Set.{u2} α) (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) (LocalEquiv.source.{u2, u1} α β e) (Set.preimage.{u2, u1} α β (LocalEquiv.toFun.{u2, u1} α β e) (Set.preimage.{u1, u2} β α (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e)) s))) (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) (LocalEquiv.source.{u2, u1} α β e) s)
-Case conversion may be inaccurate. Consider using '#align local_equiv.source_inter_preimage_inv_preimage LocalEquiv.source_inter_preimage_inv_preimageₓ'. -/
 theorem source_inter_preimage_inv_preimage (s : Set α) :
     e.source ∩ e ⁻¹' (e.symm ⁻¹' s) = e.source ∩ s :=
   Set.ext fun x => and_congr_right_iff.2 fun hx => by simp only [mem_preimage, e.left_inv hx]
 #align local_equiv.source_inter_preimage_inv_preimage LocalEquiv.source_inter_preimage_inv_preimage
 
-/- warning: local_equiv.source_inter_preimage_target_inter -> LocalEquiv.source_inter_preimage_target_inter is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) (s : Set.{u2} β), Eq.{succ u1} (Set.{u1} α) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) (Set.preimage.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.target.{u1, u2} α β e) s))) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) (Set.preimage.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) s))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) (s : Set.{u2} β), Eq.{succ u1} (Set.{u1} α) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) (LocalEquiv.source.{u1, u2} α β e) (Set.preimage.{u1, u2} α β (LocalEquiv.toFun.{u1, u2} α β e) (Inter.inter.{u2} (Set.{u2} β) (Set.instInterSet.{u2} β) (LocalEquiv.target.{u1, u2} α β e) s))) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) (LocalEquiv.source.{u1, u2} α β e) (Set.preimage.{u1, u2} α β (LocalEquiv.toFun.{u1, u2} α β e) s))
-Case conversion may be inaccurate. Consider using '#align local_equiv.source_inter_preimage_target_inter LocalEquiv.source_inter_preimage_target_interₓ'. -/
 theorem source_inter_preimage_target_inter (s : Set β) :
     e.source ∩ e ⁻¹' (e.target ∩ s) = e.source ∩ e ⁻¹' s :=
   ext fun x => ⟨fun hx => ⟨hx.1, hx.2.2⟩, fun hx => ⟨hx.1, e.map_source hx.1, hx.2⟩⟩
 #align local_equiv.source_inter_preimage_target_inter LocalEquiv.source_inter_preimage_target_inter
 
-/- warning: local_equiv.target_inter_inv_preimage_preimage -> LocalEquiv.target_inter_inv_preimage_preimage is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) (s : Set.{u2} β), Eq.{succ u2} (Set.{u2} β) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.target.{u1, u2} α β e) (Set.preimage.{u2, u1} β α (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e)) (Set.preimage.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) s))) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.target.{u1, u2} α β e) s)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) (s : Set.{u2} β), Eq.{succ u2} (Set.{u2} β) (Inter.inter.{u2} (Set.{u2} β) (Set.instInterSet.{u2} β) (LocalEquiv.target.{u1, u2} α β e) (Set.preimage.{u2, u1} β α (LocalEquiv.toFun.{u2, u1} β α (LocalEquiv.symm.{u1, u2} α β e)) (Set.preimage.{u1, u2} α β (LocalEquiv.toFun.{u1, u2} α β e) s))) (Inter.inter.{u2} (Set.{u2} β) (Set.instInterSet.{u2} β) (LocalEquiv.target.{u1, u2} α β e) s)
-Case conversion may be inaccurate. Consider using '#align local_equiv.target_inter_inv_preimage_preimage LocalEquiv.target_inter_inv_preimage_preimageₓ'. -/
 theorem target_inter_inv_preimage_preimage (s : Set β) :
     e.target ∩ e.symm ⁻¹' (e ⁻¹' s) = e.target ∩ s :=
   e.symm.source_inter_preimage_inv_preimage _
 #align local_equiv.target_inter_inv_preimage_preimage LocalEquiv.target_inter_inv_preimage_preimage
 
-/- warning: local_equiv.symm_image_image_of_subset_source -> LocalEquiv.symm_image_image_of_subset_source is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) {s : Set.{u1} α}, (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) s (LocalEquiv.source.{u1, u2} α β e)) -> (Eq.{succ u1} (Set.{u1} α) (Set.image.{u2, u1} β α (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e)) (Set.image.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) s)) s)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β) {s : Set.{u2} α}, (HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) s (LocalEquiv.source.{u2, u1} α β e)) -> (Eq.{succ u2} (Set.{u2} α) (Set.image.{u1, u2} β α (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e)) (Set.image.{u2, u1} α β (LocalEquiv.toFun.{u2, u1} α β e) s)) s)
-Case conversion may be inaccurate. Consider using '#align local_equiv.symm_image_image_of_subset_source LocalEquiv.symm_image_image_of_subset_sourceₓ'. -/
 theorem symm_image_image_of_subset_source {s : Set α} (h : s ⊆ e.source) : e.symm '' (e '' s) = s :=
   (e.LeftInvOn.mono h).image_image
 #align local_equiv.symm_image_image_of_subset_source LocalEquiv.symm_image_image_of_subset_source
@@ -873,22 +557,10 @@ theorem image_symm_image_of_subset_target {s : Set β} (h : s ⊆ e.target) : e
 #align local_equiv.image_symm_image_of_subset_target LocalEquiv.image_symm_image_of_subset_target
 -/
 
-/- warning: local_equiv.source_subset_preimage_target -> LocalEquiv.source_subset_preimage_target is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β), HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) (LocalEquiv.source.{u1, u2} α β e) (Set.preimage.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) (LocalEquiv.target.{u1, u2} α β e))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β), HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) (LocalEquiv.source.{u2, u1} α β e) (Set.preimage.{u2, u1} α β (LocalEquiv.toFun.{u2, u1} α β e) (LocalEquiv.target.{u2, u1} α β e))
-Case conversion may be inaccurate. Consider using '#align local_equiv.source_subset_preimage_target LocalEquiv.source_subset_preimage_targetₓ'. -/
 theorem source_subset_preimage_target : e.source ⊆ e ⁻¹' e.target :=
   e.MapsTo
 #align local_equiv.source_subset_preimage_target LocalEquiv.source_subset_preimage_target
 
-/- warning: local_equiv.symm_image_target_eq_source -> LocalEquiv.symm_image_target_eq_source is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β), Eq.{succ u1} (Set.{u1} α) (Set.image.{u2, u1} β α (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e)) (LocalEquiv.target.{u1, u2} α β e)) (LocalEquiv.source.{u1, u2} α β e)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β), Eq.{succ u2} (Set.{u2} α) (Set.image.{u1, u2} β α (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e)) (LocalEquiv.target.{u2, u1} α β e)) (LocalEquiv.source.{u2, u1} α β e)
-Case conversion may be inaccurate. Consider using '#align local_equiv.symm_image_target_eq_source LocalEquiv.symm_image_target_eq_sourceₓ'. -/
 theorem symm_image_target_eq_source : e.symm '' e.target = e.source :=
   e.symm.image_source_eq_target
 #align local_equiv.symm_image_target_eq_source LocalEquiv.symm_image_target_eq_source
@@ -899,12 +571,6 @@ theorem target_subset_preimage_source : e.target ⊆ e.symm ⁻¹' e.source :=
 #align local_equiv.target_subset_preimage_source LocalEquiv.target_subset_preimage_source
 -/
 
-/- warning: local_equiv.ext -> LocalEquiv.ext is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {e' : LocalEquiv.{u1, u2} α β}, (forall (x : α), Eq.{succ u2} β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e x) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e' x)) -> (forall (x : β), Eq.{succ u1} α (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e) x) (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e') x)) -> (Eq.{succ u1} (Set.{u1} α) (LocalEquiv.source.{u1, u2} α β e) (LocalEquiv.source.{u1, u2} α β e')) -> (Eq.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) e e')
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {e' : LocalEquiv.{u2, u1} α β}, (forall (x : α), Eq.{succ u1} β (LocalEquiv.toFun.{u2, u1} α β e x) (LocalEquiv.toFun.{u2, u1} α β e' x)) -> (forall (x : β), Eq.{succ u2} α (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e) x) (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e') x)) -> (Eq.{succ u2} (Set.{u2} α) (LocalEquiv.source.{u2, u1} α β e) (LocalEquiv.source.{u2, u1} α β e')) -> (Eq.{max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} α β) e e')
-Case conversion may be inaccurate. Consider using '#align local_equiv.ext LocalEquiv.extₓ'. -/
 /-- Two local equivs that have the same `source`, same `to_fun` and same `inv_fun`, coincide. -/
 @[ext]
 protected theorem ext {e e' : LocalEquiv α β} (h : ∀ x, e x = e' x)
@@ -926,67 +592,31 @@ protected def restr (s : Set α) : LocalEquiv α β :=
 #align local_equiv.restr LocalEquiv.restr
 -/
 
-/- warning: local_equiv.restr_coe -> LocalEquiv.restr_coe is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) (s : Set.{u1} α), Eq.{max (succ u1) (succ u2)} ((fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.restr.{u1, u2} α β e s)) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) (LocalEquiv.restr.{u1, u2} α β e s)) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β) (s : Set.{u2} α), Eq.{max (succ u2) (succ u1)} (α -> β) (LocalEquiv.toFun.{u2, u1} α β (LocalEquiv.restr.{u2, u1} α β e s)) (LocalEquiv.toFun.{u2, u1} α β e)
-Case conversion may be inaccurate. Consider using '#align local_equiv.restr_coe LocalEquiv.restr_coeₓ'. -/
 @[simp, mfld_simps]
 theorem restr_coe (s : Set α) : (e.restr s : α → β) = e :=
   rfl
 #align local_equiv.restr_coe LocalEquiv.restr_coe
 
-/- warning: local_equiv.restr_coe_symm -> LocalEquiv.restr_coe_symm is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) (s : Set.{u1} α), Eq.{max (succ u2) (succ u1)} ((fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.symm.{u1, u2} α β (LocalEquiv.restr.{u1, u2} α β e s))) (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β (LocalEquiv.restr.{u1, u2} α β e s))) (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β) (s : Set.{u2} α), Eq.{max (succ u2) (succ u1)} (β -> α) (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β (LocalEquiv.restr.{u2, u1} α β e s))) (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e))
-Case conversion may be inaccurate. Consider using '#align local_equiv.restr_coe_symm LocalEquiv.restr_coe_symmₓ'. -/
 @[simp, mfld_simps]
 theorem restr_coe_symm (s : Set α) : ((e.restr s).symm : β → α) = e.symm :=
   rfl
 #align local_equiv.restr_coe_symm LocalEquiv.restr_coe_symm
 
-/- warning: local_equiv.restr_source -> LocalEquiv.restr_source is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) (s : Set.{u1} α), Eq.{succ u1} (Set.{u1} α) (LocalEquiv.source.{u1, u2} α β (LocalEquiv.restr.{u1, u2} α β e s)) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) s)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β) (s : Set.{u2} α), Eq.{succ u2} (Set.{u2} α) (LocalEquiv.source.{u2, u1} α β (LocalEquiv.restr.{u2, u1} α β e s)) (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) (LocalEquiv.source.{u2, u1} α β e) s)
-Case conversion may be inaccurate. Consider using '#align local_equiv.restr_source LocalEquiv.restr_sourceₓ'. -/
 @[simp, mfld_simps]
 theorem restr_source (s : Set α) : (e.restr s).source = e.source ∩ s :=
   rfl
 #align local_equiv.restr_source LocalEquiv.restr_source
 
-/- warning: local_equiv.restr_target -> LocalEquiv.restr_target is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) (s : Set.{u1} α), Eq.{succ u2} (Set.{u2} β) (LocalEquiv.target.{u1, u2} α β (LocalEquiv.restr.{u1, u2} α β e s)) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.target.{u1, u2} α β e) (Set.preimage.{u2, u1} β α (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e)) s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β) (s : Set.{u2} α), Eq.{succ u1} (Set.{u1} β) (LocalEquiv.target.{u2, u1} α β (LocalEquiv.restr.{u2, u1} α β e s)) (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (LocalEquiv.target.{u2, u1} α β e) (Set.preimage.{u1, u2} β α (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e)) s))
-Case conversion may be inaccurate. Consider using '#align local_equiv.restr_target LocalEquiv.restr_targetₓ'. -/
 @[simp, mfld_simps]
 theorem restr_target (s : Set α) : (e.restr s).target = e.target ∩ e.symm ⁻¹' s :=
   rfl
 #align local_equiv.restr_target LocalEquiv.restr_target
 
-/- warning: local_equiv.restr_eq_of_source_subset -> LocalEquiv.restr_eq_of_source_subset is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {s : Set.{u1} α}, (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) (LocalEquiv.source.{u1, u2} α β e) s) -> (Eq.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (LocalEquiv.restr.{u1, u2} α β e s) e)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {s : Set.{u2} α}, (HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) (LocalEquiv.source.{u2, u1} α β e) s) -> (Eq.{max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} α β) (LocalEquiv.restr.{u2, u1} α β e s) e)
-Case conversion may be inaccurate. Consider using '#align local_equiv.restr_eq_of_source_subset LocalEquiv.restr_eq_of_source_subsetₓ'. -/
 theorem restr_eq_of_source_subset {e : LocalEquiv α β} {s : Set α} (h : e.source ⊆ s) :
     e.restr s = e :=
   LocalEquiv.ext (fun _ => rfl) (fun _ => rfl) (by simp [inter_eq_self_of_subset_left h])
 #align local_equiv.restr_eq_of_source_subset LocalEquiv.restr_eq_of_source_subset
 
-/- warning: local_equiv.restr_univ -> LocalEquiv.restr_univ is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β}, Eq.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (LocalEquiv.restr.{u1, u2} α β e (Set.univ.{u1} α)) e
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β}, Eq.{max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} α β) (LocalEquiv.restr.{u2, u1} α β e (Set.univ.{u2} α)) e
-Case conversion may be inaccurate. Consider using '#align local_equiv.restr_univ LocalEquiv.restr_univₓ'. -/
 @[simp, mfld_simps]
 theorem restr_univ {e : LocalEquiv α β} : e.restr univ = e :=
   restr_eq_of_source_subset (subset_univ _)
@@ -1106,158 +736,68 @@ protected def trans : LocalEquiv α γ :=
 #align local_equiv.trans LocalEquiv.trans
 -/
 
-/- warning: local_equiv.coe_trans -> LocalEquiv.coe_trans is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (e : LocalEquiv.{u1, u2} α β) (e' : LocalEquiv.{u2, u3} β γ), Eq.{max (succ u1) (succ u3)} ((fun (_x : LocalEquiv.{u1, u3} α γ) => α -> γ) (LocalEquiv.trans.{u1, u2, u3} α β γ e e')) (coeFn.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (LocalEquiv.{u1, u3} α γ) (fun (_x : LocalEquiv.{u1, u3} α γ) => α -> γ) (LocalEquiv.hasCoeToFun.{u1, u3} α γ) (LocalEquiv.trans.{u1, u2, u3} α β γ e e')) (Function.comp.{succ u1, succ u2, succ u3} α β γ (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (LocalEquiv.{u2, u3} β γ) (fun (_x : LocalEquiv.{u2, u3} β γ) => β -> γ) (LocalEquiv.hasCoeToFun.{u2, u3} β γ) e') (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e))
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u1}} {γ : Type.{u2}} (e : LocalEquiv.{u3, u1} α β) (e' : LocalEquiv.{u1, u2} β γ), Eq.{max (succ u3) (succ u2)} (α -> γ) (LocalEquiv.toFun.{u3, u2} α γ (LocalEquiv.trans.{u3, u1, u2} α β γ e e')) (Function.comp.{succ u3, succ u1, succ u2} α β γ (LocalEquiv.toFun.{u1, u2} β γ e') (LocalEquiv.toFun.{u3, u1} α β e))
-Case conversion may be inaccurate. Consider using '#align local_equiv.coe_trans LocalEquiv.coe_transₓ'. -/
 @[simp, mfld_simps]
 theorem coe_trans : (e.trans e' : α → γ) = e' ∘ e :=
   rfl
 #align local_equiv.coe_trans LocalEquiv.coe_trans
 
-/- warning: local_equiv.coe_trans_symm -> LocalEquiv.coe_trans_symm is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (e : LocalEquiv.{u1, u2} α β) (e' : LocalEquiv.{u2, u3} β γ), Eq.{max (succ u3) (succ u1)} ((fun (_x : LocalEquiv.{u3, u1} γ α) => γ -> α) (LocalEquiv.symm.{u1, u3} α γ (LocalEquiv.trans.{u1, u2, u3} α β γ e e'))) (coeFn.{max (succ u3) (succ u1), max (succ u3) (succ u1)} (LocalEquiv.{u3, u1} γ α) (fun (_x : LocalEquiv.{u3, u1} γ α) => γ -> α) (LocalEquiv.hasCoeToFun.{u3, u1} γ α) (LocalEquiv.symm.{u1, u3} α γ (LocalEquiv.trans.{u1, u2, u3} α β γ e e'))) (Function.comp.{succ u3, succ u2, succ u1} γ β α (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e)) (coeFn.{max (succ u3) (succ u2), max (succ u3) (succ u2)} (LocalEquiv.{u3, u2} γ β) (fun (_x : LocalEquiv.{u3, u2} γ β) => γ -> β) (LocalEquiv.hasCoeToFun.{u3, u2} γ β) (LocalEquiv.symm.{u2, u3} β γ e')))
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u1}} {γ : Type.{u2}} (e : LocalEquiv.{u3, u1} α β) (e' : LocalEquiv.{u1, u2} β γ), Eq.{max (succ u3) (succ u2)} (γ -> α) (LocalEquiv.toFun.{u2, u3} γ α (LocalEquiv.symm.{u3, u2} α γ (LocalEquiv.trans.{u3, u1, u2} α β γ e e'))) (Function.comp.{succ u2, succ u1, succ u3} γ β α (LocalEquiv.toFun.{u1, u3} β α (LocalEquiv.symm.{u3, u1} α β e)) (LocalEquiv.toFun.{u2, u1} γ β (LocalEquiv.symm.{u1, u2} β γ e')))
-Case conversion may be inaccurate. Consider using '#align local_equiv.coe_trans_symm LocalEquiv.coe_trans_symmₓ'. -/
 @[simp, mfld_simps]
 theorem coe_trans_symm : ((e.trans e').symm : γ → α) = e.symm ∘ e'.symm :=
   rfl
 #align local_equiv.coe_trans_symm LocalEquiv.coe_trans_symm
 
-/- warning: local_equiv.trans_apply -> LocalEquiv.trans_apply is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (e : LocalEquiv.{u1, u2} α β) (e' : LocalEquiv.{u2, u3} β γ) {x : α}, Eq.{succ u3} γ (coeFn.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (LocalEquiv.{u1, u3} α γ) (fun (_x : LocalEquiv.{u1, u3} α γ) => α -> γ) (LocalEquiv.hasCoeToFun.{u1, u3} α γ) (LocalEquiv.trans.{u1, u2, u3} α β γ e e') x) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (LocalEquiv.{u2, u3} β γ) (fun (_x : LocalEquiv.{u2, u3} β γ) => β -> γ) (LocalEquiv.hasCoeToFun.{u2, u3} β γ) e' (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e x))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {γ : Type.{u3}} (e : LocalEquiv.{u2, u1} α β) (e' : LocalEquiv.{u1, u3} β γ) {x : α}, Eq.{succ u3} γ (LocalEquiv.toFun.{u2, u3} α γ (LocalEquiv.trans.{u2, u1, u3} α β γ e e') x) (LocalEquiv.toFun.{u1, u3} β γ e' (LocalEquiv.toFun.{u2, u1} α β e x))
-Case conversion may be inaccurate. Consider using '#align local_equiv.trans_apply LocalEquiv.trans_applyₓ'. -/
 theorem trans_apply {x : α} : (e.trans e') x = e' (e x) :=
   rfl
 #align local_equiv.trans_apply LocalEquiv.trans_apply
 
-/- warning: local_equiv.trans_symm_eq_symm_trans_symm -> LocalEquiv.trans_symm_eq_symm_trans_symm is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (e : LocalEquiv.{u1, u2} α β) (e' : LocalEquiv.{u2, u3} β γ), Eq.{max (succ u3) (succ u1)} (LocalEquiv.{u3, u1} γ α) (LocalEquiv.symm.{u1, u3} α γ (LocalEquiv.trans.{u1, u2, u3} α β γ e e')) (LocalEquiv.trans.{u3, u2, u1} γ β α (LocalEquiv.symm.{u2, u3} β γ e') (LocalEquiv.symm.{u1, u2} α β e))
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u1}} {γ : Type.{u2}} (e : LocalEquiv.{u3, u1} α β) (e' : LocalEquiv.{u1, u2} β γ), Eq.{max (succ u3) (succ u2)} (LocalEquiv.{u2, u3} γ α) (LocalEquiv.symm.{u3, u2} α γ (LocalEquiv.trans.{u3, u1, u2} α β γ e e')) (LocalEquiv.trans.{u2, u1, u3} γ β α (LocalEquiv.symm.{u1, u2} β γ e') (LocalEquiv.symm.{u3, u1} α β e))
-Case conversion may be inaccurate. Consider using '#align local_equiv.trans_symm_eq_symm_trans_symm LocalEquiv.trans_symm_eq_symm_trans_symmₓ'. -/
 theorem trans_symm_eq_symm_trans_symm : (e.trans e').symm = e'.symm.trans e.symm := by
   cases e <;> cases e' <;> rfl
 #align local_equiv.trans_symm_eq_symm_trans_symm LocalEquiv.trans_symm_eq_symm_trans_symm
 
-/- warning: local_equiv.trans_source -> LocalEquiv.trans_source is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (e : LocalEquiv.{u1, u2} α β) (e' : LocalEquiv.{u2, u3} β γ), Eq.{succ u1} (Set.{u1} α) (LocalEquiv.source.{u1, u3} α γ (LocalEquiv.trans.{u1, u2, u3} α β γ e e')) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) (Set.preimage.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) (LocalEquiv.source.{u2, u3} β γ e')))
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u1}} {γ : Type.{u2}} (e : LocalEquiv.{u3, u1} α β) (e' : LocalEquiv.{u1, u2} β γ), Eq.{succ u3} (Set.{u3} α) (LocalEquiv.source.{u3, u2} α γ (LocalEquiv.trans.{u3, u1, u2} α β γ e e')) (Inter.inter.{u3} (Set.{u3} α) (Set.instInterSet.{u3} α) (LocalEquiv.source.{u3, u1} α β e) (Set.preimage.{u3, u1} α β (LocalEquiv.toFun.{u3, u1} α β e) (LocalEquiv.source.{u1, u2} β γ e')))
-Case conversion may be inaccurate. Consider using '#align local_equiv.trans_source LocalEquiv.trans_sourceₓ'. -/
 @[simp, mfld_simps]
 theorem trans_source : (e.trans e').source = e.source ∩ e ⁻¹' e'.source :=
   rfl
 #align local_equiv.trans_source LocalEquiv.trans_source
 
-/- warning: local_equiv.trans_source' -> LocalEquiv.trans_source' is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (e : LocalEquiv.{u1, u2} α β) (e' : LocalEquiv.{u2, u3} β γ), Eq.{succ u1} (Set.{u1} α) (LocalEquiv.source.{u1, u3} α γ (LocalEquiv.trans.{u1, u2, u3} α β γ e e')) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) (Set.preimage.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.target.{u1, u2} α β e) (LocalEquiv.source.{u2, u3} β γ e'))))
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u1}} {γ : Type.{u2}} (e : LocalEquiv.{u3, u1} α β) (e' : LocalEquiv.{u1, u2} β γ), Eq.{succ u3} (Set.{u3} α) (LocalEquiv.source.{u3, u2} α γ (LocalEquiv.trans.{u3, u1, u2} α β γ e e')) (Inter.inter.{u3} (Set.{u3} α) (Set.instInterSet.{u3} α) (LocalEquiv.source.{u3, u1} α β e) (Set.preimage.{u3, u1} α β (LocalEquiv.toFun.{u3, u1} α β e) (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (LocalEquiv.target.{u3, u1} α β e) (LocalEquiv.source.{u1, u2} β γ e'))))
-Case conversion may be inaccurate. Consider using '#align local_equiv.trans_source' LocalEquiv.trans_source'ₓ'. -/
 theorem trans_source' : (e.trans e').source = e.source ∩ e ⁻¹' (e.target ∩ e'.source) := by
   mfld_set_tac
 #align local_equiv.trans_source' LocalEquiv.trans_source'
 
-/- warning: local_equiv.trans_source'' -> LocalEquiv.trans_source'' is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (e : LocalEquiv.{u1, u2} α β) (e' : LocalEquiv.{u2, u3} β γ), Eq.{succ u1} (Set.{u1} α) (LocalEquiv.source.{u1, u3} α γ (LocalEquiv.trans.{u1, u2, u3} α β γ e e')) (Set.image.{u2, u1} β α (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e)) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.target.{u1, u2} α β e) (LocalEquiv.source.{u2, u3} β γ e')))
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u1}} {γ : Type.{u2}} (e : LocalEquiv.{u3, u1} α β) (e' : LocalEquiv.{u1, u2} β γ), Eq.{succ u3} (Set.{u3} α) (LocalEquiv.source.{u3, u2} α γ (LocalEquiv.trans.{u3, u1, u2} α β γ e e')) (Set.image.{u1, u3} β α (LocalEquiv.toFun.{u1, u3} β α (LocalEquiv.symm.{u3, u1} α β e)) (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (LocalEquiv.target.{u3, u1} α β e) (LocalEquiv.source.{u1, u2} β γ e')))
-Case conversion may be inaccurate. Consider using '#align local_equiv.trans_source'' LocalEquiv.trans_source''ₓ'. -/
 theorem trans_source'' : (e.trans e').source = e.symm '' (e.target ∩ e'.source) := by
   rw [e.trans_source', e.symm_image_target_inter_eq]
 #align local_equiv.trans_source'' LocalEquiv.trans_source''
 
-/- warning: local_equiv.image_trans_source -> LocalEquiv.image_trans_source is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (e : LocalEquiv.{u1, u2} α β) (e' : LocalEquiv.{u2, u3} β γ), Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) (LocalEquiv.source.{u1, u3} α γ (LocalEquiv.trans.{u1, u2, u3} α β γ e e'))) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.target.{u1, u2} α β e) (LocalEquiv.source.{u2, u3} β γ e'))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u3}} {γ : Type.{u1}} (e : LocalEquiv.{u2, u3} α β) (e' : LocalEquiv.{u3, u1} β γ), Eq.{succ u3} (Set.{u3} β) (Set.image.{u2, u3} α β (LocalEquiv.toFun.{u2, u3} α β e) (LocalEquiv.source.{u2, u1} α γ (LocalEquiv.trans.{u2, u3, u1} α β γ e e'))) (Inter.inter.{u3} (Set.{u3} β) (Set.instInterSet.{u3} β) (LocalEquiv.target.{u2, u3} α β e) (LocalEquiv.source.{u3, u1} β γ e'))
-Case conversion may be inaccurate. Consider using '#align local_equiv.image_trans_source LocalEquiv.image_trans_sourceₓ'. -/
 theorem image_trans_source : e '' (e.trans e').source = e.target ∩ e'.source :=
   (e.symm.restr e'.source).symm.image_source_eq_target
 #align local_equiv.image_trans_source LocalEquiv.image_trans_source
 
-/- warning: local_equiv.trans_target -> LocalEquiv.trans_target is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (e : LocalEquiv.{u1, u2} α β) (e' : LocalEquiv.{u2, u3} β γ), Eq.{succ u3} (Set.{u3} γ) (LocalEquiv.target.{u1, u3} α γ (LocalEquiv.trans.{u1, u2, u3} α β γ e e')) (Inter.inter.{u3} (Set.{u3} γ) (Set.hasInter.{u3} γ) (LocalEquiv.target.{u2, u3} β γ e') (Set.preimage.{u3, u2} γ β (coeFn.{max (succ u3) (succ u2), max (succ u3) (succ u2)} (LocalEquiv.{u3, u2} γ β) (fun (_x : LocalEquiv.{u3, u2} γ β) => γ -> β) (LocalEquiv.hasCoeToFun.{u3, u2} γ β) (LocalEquiv.symm.{u2, u3} β γ e')) (LocalEquiv.target.{u1, u2} α β e)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {γ : Type.{u3}} (e : LocalEquiv.{u2, u1} α β) (e' : LocalEquiv.{u1, u3} β γ), Eq.{succ u3} (Set.{u3} γ) (LocalEquiv.target.{u2, u3} α γ (LocalEquiv.trans.{u2, u1, u3} α β γ e e')) (Inter.inter.{u3} (Set.{u3} γ) (Set.instInterSet.{u3} γ) (LocalEquiv.target.{u1, u3} β γ e') (Set.preimage.{u3, u1} γ β (LocalEquiv.toFun.{u3, u1} γ β (LocalEquiv.symm.{u1, u3} β γ e')) (LocalEquiv.target.{u2, u1} α β e)))
-Case conversion may be inaccurate. Consider using '#align local_equiv.trans_target LocalEquiv.trans_targetₓ'. -/
 @[simp, mfld_simps]
 theorem trans_target : (e.trans e').target = e'.target ∩ e'.symm ⁻¹' e.target :=
   rfl
 #align local_equiv.trans_target LocalEquiv.trans_target
 
-/- warning: local_equiv.trans_target' -> LocalEquiv.trans_target' is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (e : LocalEquiv.{u1, u2} α β) (e' : LocalEquiv.{u2, u3} β γ), Eq.{succ u3} (Set.{u3} γ) (LocalEquiv.target.{u1, u3} α γ (LocalEquiv.trans.{u1, u2, u3} α β γ e e')) (Inter.inter.{u3} (Set.{u3} γ) (Set.hasInter.{u3} γ) (LocalEquiv.target.{u2, u3} β γ e') (Set.preimage.{u3, u2} γ β (coeFn.{max (succ u3) (succ u2), max (succ u3) (succ u2)} (LocalEquiv.{u3, u2} γ β) (fun (_x : LocalEquiv.{u3, u2} γ β) => γ -> β) (LocalEquiv.hasCoeToFun.{u3, u2} γ β) (LocalEquiv.symm.{u2, u3} β γ e')) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.source.{u2, u3} β γ e') (LocalEquiv.target.{u1, u2} α β e))))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {γ : Type.{u3}} (e : LocalEquiv.{u2, u1} α β) (e' : LocalEquiv.{u1, u3} β γ), Eq.{succ u3} (Set.{u3} γ) (LocalEquiv.target.{u2, u3} α γ (LocalEquiv.trans.{u2, u1, u3} α β γ e e')) (Inter.inter.{u3} (Set.{u3} γ) (Set.instInterSet.{u3} γ) (LocalEquiv.target.{u1, u3} β γ e') (Set.preimage.{u3, u1} γ β (LocalEquiv.toFun.{u3, u1} γ β (LocalEquiv.symm.{u1, u3} β γ e')) (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (LocalEquiv.source.{u1, u3} β γ e') (LocalEquiv.target.{u2, u1} α β e))))
-Case conversion may be inaccurate. Consider using '#align local_equiv.trans_target' LocalEquiv.trans_target'ₓ'. -/
 theorem trans_target' : (e.trans e').target = e'.target ∩ e'.symm ⁻¹' (e'.source ∩ e.target) :=
   trans_source' e'.symm e.symm
 #align local_equiv.trans_target' LocalEquiv.trans_target'
 
-/- warning: local_equiv.trans_target'' -> LocalEquiv.trans_target'' is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (e : LocalEquiv.{u1, u2} α β) (e' : LocalEquiv.{u2, u3} β γ), Eq.{succ u3} (Set.{u3} γ) (LocalEquiv.target.{u1, u3} α γ (LocalEquiv.trans.{u1, u2, u3} α β γ e e')) (Set.image.{u2, u3} β γ (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (LocalEquiv.{u2, u3} β γ) (fun (_x : LocalEquiv.{u2, u3} β γ) => β -> γ) (LocalEquiv.hasCoeToFun.{u2, u3} β γ) e') (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.source.{u2, u3} β γ e') (LocalEquiv.target.{u1, u2} α β e)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {γ : Type.{u3}} (e : LocalEquiv.{u2, u1} α β) (e' : LocalEquiv.{u1, u3} β γ), Eq.{succ u3} (Set.{u3} γ) (LocalEquiv.target.{u2, u3} α γ (LocalEquiv.trans.{u2, u1, u3} α β γ e e')) (Set.image.{u1, u3} β γ (LocalEquiv.toFun.{u1, u3} β γ e') (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (LocalEquiv.source.{u1, u3} β γ e') (LocalEquiv.target.{u2, u1} α β e)))
-Case conversion may be inaccurate. Consider using '#align local_equiv.trans_target'' LocalEquiv.trans_target''ₓ'. -/
 theorem trans_target'' : (e.trans e').target = e' '' (e'.source ∩ e.target) :=
   trans_source'' e'.symm e.symm
 #align local_equiv.trans_target'' LocalEquiv.trans_target''
 
-/- warning: local_equiv.inv_image_trans_target -> LocalEquiv.inv_image_trans_target is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (e : LocalEquiv.{u1, u2} α β) (e' : LocalEquiv.{u2, u3} β γ), Eq.{succ u2} (Set.{u2} β) (Set.image.{u3, u2} γ β (coeFn.{max (succ u3) (succ u2), max (succ u3) (succ u2)} (LocalEquiv.{u3, u2} γ β) (fun (_x : LocalEquiv.{u3, u2} γ β) => γ -> β) (LocalEquiv.hasCoeToFun.{u3, u2} γ β) (LocalEquiv.symm.{u2, u3} β γ e')) (LocalEquiv.target.{u1, u3} α γ (LocalEquiv.trans.{u1, u2, u3} α β γ e e'))) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (LocalEquiv.source.{u2, u3} β γ e') (LocalEquiv.target.{u1, u2} α β e))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u3}} {γ : Type.{u2}} (e : LocalEquiv.{u1, u3} α β) (e' : LocalEquiv.{u3, u2} β γ), Eq.{succ u3} (Set.{u3} β) (Set.image.{u2, u3} γ β (LocalEquiv.toFun.{u2, u3} γ β (LocalEquiv.symm.{u3, u2} β γ e')) (LocalEquiv.target.{u1, u2} α γ (LocalEquiv.trans.{u1, u3, u2} α β γ e e'))) (Inter.inter.{u3} (Set.{u3} β) (Set.instInterSet.{u3} β) (LocalEquiv.source.{u3, u2} β γ e') (LocalEquiv.target.{u1, u3} α β e))
-Case conversion may be inaccurate. Consider using '#align local_equiv.inv_image_trans_target LocalEquiv.inv_image_trans_targetₓ'. -/
 theorem inv_image_trans_target : e'.symm '' (e.trans e').target = e'.source ∩ e.target :=
   image_trans_source e'.symm e.symm
 #align local_equiv.inv_image_trans_target LocalEquiv.inv_image_trans_target
 
-/- warning: local_equiv.trans_assoc -> LocalEquiv.trans_assoc is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u4}} (e : LocalEquiv.{u1, u2} α β) (e' : LocalEquiv.{u2, u3} β γ) (e'' : LocalEquiv.{u3, u4} γ δ), Eq.{max (succ u1) (succ u4)} (LocalEquiv.{u1, u4} α δ) (LocalEquiv.trans.{u1, u3, u4} α γ δ (LocalEquiv.trans.{u1, u2, u3} α β γ e e') e'') (LocalEquiv.trans.{u1, u2, u4} α β δ e (LocalEquiv.trans.{u2, u3, u4} β γ δ e' e''))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {γ : Type.{u4}} {δ : Type.{u3}} (e : LocalEquiv.{u2, u1} α β) (e' : LocalEquiv.{u1, u4} β γ) (e'' : LocalEquiv.{u4, u3} γ δ), Eq.{max (succ u2) (succ u3)} (LocalEquiv.{u2, u3} α δ) (LocalEquiv.trans.{u2, u4, u3} α γ δ (LocalEquiv.trans.{u2, u1, u4} α β γ e e') e'') (LocalEquiv.trans.{u2, u1, u3} α β δ e (LocalEquiv.trans.{u1, u4, u3} β γ δ e' e''))
-Case conversion may be inaccurate. Consider using '#align local_equiv.trans_assoc LocalEquiv.trans_assocₓ'. -/
 theorem trans_assoc (e'' : LocalEquiv γ δ) : (e.trans e').trans e'' = e.trans (e'.trans e'') :=
   LocalEquiv.ext (fun x => rfl) (fun x => rfl)
     (by simp [trans_source, @preimage_comp α β γ, inter_assoc])
 #align local_equiv.trans_assoc LocalEquiv.trans_assoc
 
-/- warning: local_equiv.trans_refl -> LocalEquiv.trans_refl is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β), Eq.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (LocalEquiv.trans.{u1, u2, u2} α β β e (LocalEquiv.refl.{u2} β)) e
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β), Eq.{max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} α β) (LocalEquiv.trans.{u2, u1, u1} α β β e (LocalEquiv.refl.{u1} β)) e
-Case conversion may be inaccurate. Consider using '#align local_equiv.trans_refl LocalEquiv.trans_reflₓ'. -/
 @[simp, mfld_simps]
 theorem trans_refl : e.trans (LocalEquiv.refl β) = e :=
   LocalEquiv.ext (fun x => rfl) (fun x => rfl) (by simp [trans_source])
 #align local_equiv.trans_refl LocalEquiv.trans_refl
 
-/- warning: local_equiv.refl_trans -> LocalEquiv.refl_trans is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β), Eq.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (LocalEquiv.trans.{u1, u1, u2} α α β (LocalEquiv.refl.{u1} α) e) e
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β), Eq.{max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} α β) (LocalEquiv.trans.{u2, u2, u1} α α β (LocalEquiv.refl.{u2} α) e) e
-Case conversion may be inaccurate. Consider using '#align local_equiv.refl_trans LocalEquiv.refl_transₓ'. -/
 @[simp, mfld_simps]
 theorem refl_trans : (LocalEquiv.refl α).trans e = e :=
   LocalEquiv.ext (fun x => rfl) (fun x => rfl) (by simp [trans_source, preimage_id])
@@ -1269,35 +809,17 @@ theorem trans_refl_restr (s : Set β) : e.trans ((LocalEquiv.refl β).restr s) =
 #align local_equiv.trans_refl_restr LocalEquiv.trans_refl_restr
 -/
 
-/- warning: local_equiv.trans_refl_restr' -> LocalEquiv.trans_refl_restr' is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) (s : Set.{u2} β), Eq.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (LocalEquiv.trans.{u1, u2, u2} α β β e (LocalEquiv.restr.{u2, u2} β β (LocalEquiv.refl.{u2} β) s)) (LocalEquiv.restr.{u1, u2} α β e (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) (Set.preimage.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) s)))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) (s : Set.{u2} β), Eq.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (LocalEquiv.trans.{u1, u2, u2} α β β e (LocalEquiv.restr.{u2, u2} β β (LocalEquiv.refl.{u2} β) s)) (LocalEquiv.restr.{u1, u2} α β e (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) (LocalEquiv.source.{u1, u2} α β e) (Set.preimage.{u1, u2} α β (LocalEquiv.toFun.{u1, u2} α β e) s)))
-Case conversion may be inaccurate. Consider using '#align local_equiv.trans_refl_restr' LocalEquiv.trans_refl_restr'ₓ'. -/
 theorem trans_refl_restr' (s : Set β) :
     e.trans ((LocalEquiv.refl β).restr s) = e.restr (e.source ∩ e ⁻¹' s) :=
   (LocalEquiv.ext (fun x => rfl) fun x => rfl) <| by simp [trans_source];
     rw [← inter_assoc, inter_self]
 #align local_equiv.trans_refl_restr' LocalEquiv.trans_refl_restr'
 
-/- warning: local_equiv.restr_trans -> LocalEquiv.restr_trans is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (e : LocalEquiv.{u1, u2} α β) (e' : LocalEquiv.{u2, u3} β γ) (s : Set.{u1} α), Eq.{max (succ u1) (succ u3)} (LocalEquiv.{u1, u3} α γ) (LocalEquiv.trans.{u1, u2, u3} α β γ (LocalEquiv.restr.{u1, u2} α β e s) e') (LocalEquiv.restr.{u1, u3} α γ (LocalEquiv.trans.{u1, u2, u3} α β γ e e') s)
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u1}} {γ : Type.{u2}} (e : LocalEquiv.{u3, u1} α β) (e' : LocalEquiv.{u1, u2} β γ) (s : Set.{u3} α), Eq.{max (succ u3) (succ u2)} (LocalEquiv.{u3, u2} α γ) (LocalEquiv.trans.{u3, u1, u2} α β γ (LocalEquiv.restr.{u3, u1} α β e s) e') (LocalEquiv.restr.{u3, u2} α γ (LocalEquiv.trans.{u3, u1, u2} α β γ e e') s)
-Case conversion may be inaccurate. Consider using '#align local_equiv.restr_trans LocalEquiv.restr_transₓ'. -/
 theorem restr_trans (s : Set α) : (e.restr s).trans e' = (e.trans e').restr s :=
   (LocalEquiv.ext (fun x => rfl) fun x => rfl) <| by simp [trans_source, inter_comm];
     rwa [inter_assoc]
 #align local_equiv.restr_trans LocalEquiv.restr_trans
 
-/- warning: local_equiv.mem_symm_trans_source -> LocalEquiv.mem_symm_trans_source is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (e : LocalEquiv.{u1, u2} α β) {e' : LocalEquiv.{u1, u3} α γ} {x : α}, (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x (LocalEquiv.source.{u1, u2} α β e)) -> (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x (LocalEquiv.source.{u1, u3} α γ e')) -> (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e x) (LocalEquiv.source.{u2, u3} β γ (LocalEquiv.trans.{u2, u1, u3} β α γ (LocalEquiv.symm.{u1, u2} α β e) e')))
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u1}} {γ : Type.{u2}} (e : LocalEquiv.{u3, u1} α β) {e' : LocalEquiv.{u3, u2} α γ} {x : α}, (Membership.mem.{u3, u3} α (Set.{u3} α) (Set.instMembershipSet.{u3} α) x (LocalEquiv.source.{u3, u1} α β e)) -> (Membership.mem.{u3, u3} α (Set.{u3} α) (Set.instMembershipSet.{u3} α) x (LocalEquiv.source.{u3, u2} α γ e')) -> (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) (LocalEquiv.toFun.{u3, u1} α β e x) (LocalEquiv.source.{u1, u2} β γ (LocalEquiv.trans.{u1, u3, u2} β α γ (LocalEquiv.symm.{u3, u1} α β e) e')))
-Case conversion may be inaccurate. Consider using '#align local_equiv.mem_symm_trans_source LocalEquiv.mem_symm_trans_sourceₓ'. -/
 /-- A lemma commonly useful when `e` and `e'` are charts of a manifold. -/
 theorem mem_symm_trans_source {e' : LocalEquiv α γ} {x : α} (he : x ∈ e.source)
     (he' : x ∈ e'.source) : e x ∈ (e.symm.trans e').source :=
@@ -1314,12 +836,6 @@ def transEquiv (e' : β ≃ γ) : LocalEquiv α γ :=
 #align local_equiv.trans_equiv LocalEquiv.transEquiv
 -/
 
-/- warning: local_equiv.trans_equiv_eq_trans -> LocalEquiv.transEquiv_eq_trans is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (e : LocalEquiv.{u1, u2} α β) (e' : Equiv.{succ u2, succ u3} β γ), Eq.{max (succ u1) (succ u3)} (LocalEquiv.{u1, u3} α γ) (LocalEquiv.transEquiv.{u1, u2, u3} α β γ e e') (LocalEquiv.trans.{u1, u2, u3} α β γ e (Equiv.toLocalEquiv.{u2, u3} β γ e'))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u3}} {γ : Type.{u2}} (e : LocalEquiv.{u1, u3} α β) (e' : Equiv.{succ u3, succ u2} β γ), Eq.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α γ) (LocalEquiv.transEquiv.{u1, u3, u2} α β γ e e') (LocalEquiv.trans.{u1, u3, u2} α β γ e (Equiv.toLocalEquiv.{u3, u2} β γ e'))
-Case conversion may be inaccurate. Consider using '#align local_equiv.trans_equiv_eq_trans LocalEquiv.transEquiv_eq_transₓ'. -/
 theorem transEquiv_eq_trans (e' : β ≃ γ) : e.transEquiv e' = e.trans e'.toLocalEquiv :=
   copy_eq _ _ _ _ _ _ _ _ _
 #align local_equiv.trans_equiv_eq_trans LocalEquiv.transEquiv_eq_trans
@@ -1334,12 +850,6 @@ def Equiv.transLocalEquiv (e : α ≃ β) : LocalEquiv α γ :=
 #align equiv.trans_local_equiv Equiv.transLocalEquiv
 -/
 
-/- warning: equiv.trans_local_equiv_eq_trans -> Equiv.transLocalEquiv_eq_trans is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (e' : LocalEquiv.{u2, u3} β γ) (e : Equiv.{succ u1, succ u2} α β), Eq.{max (succ u1) (succ u3)} (LocalEquiv.{u1, u3} α γ) (Equiv.transLocalEquiv.{u1, u2, u3} α β γ e' e) (LocalEquiv.trans.{u1, u2, u3} α β γ (Equiv.toLocalEquiv.{u1, u2} α β e) e')
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u2}} {γ : Type.{u1}} (e' : LocalEquiv.{u2, u1} β γ) (e : Equiv.{succ u3, succ u2} α β), Eq.{max (succ u3) (succ u1)} (LocalEquiv.{u3, u1} α γ) (Equiv.transLocalEquiv.{u3, u2, u1} α β γ e' e) (LocalEquiv.trans.{u3, u2, u1} α β γ (Equiv.toLocalEquiv.{u3, u2} α β e) e')
-Case conversion may be inaccurate. Consider using '#align equiv.trans_local_equiv_eq_trans Equiv.transLocalEquiv_eq_transₓ'. -/
 theorem Equiv.transLocalEquiv_eq_trans (e : α ≃ β) :
     e.transLocalEquiv e' = e.toLocalEquiv.trans e' :=
   copy_eq _ _ _ _ _ _ _ _ _
@@ -1365,55 +875,25 @@ instance eqOnSourceSetoid : Setoid (LocalEquiv α β)
 #align local_equiv.eq_on_source_setoid LocalEquiv.eqOnSourceSetoid
 -/
 
-/- warning: local_equiv.eq_on_source_refl -> LocalEquiv.eqOnSource_refl is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β), HasEquivₓ.Equiv.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (setoidHasEquiv.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (LocalEquiv.eqOnSourceSetoid.{u1, u2} α β)) e e
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β), HasEquiv.Equiv.{max (succ u2) (succ u1), 0} (LocalEquiv.{u2, u1} α β) (instHasEquiv.{max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} α β) (LocalEquiv.eqOnSourceSetoid.{u2, u1} α β)) e e
-Case conversion may be inaccurate. Consider using '#align local_equiv.eq_on_source_refl LocalEquiv.eqOnSource_reflₓ'. -/
 theorem eqOnSource_refl : e ≈ e :=
   Setoid.refl _
 #align local_equiv.eq_on_source_refl LocalEquiv.eqOnSource_refl
 
-/- warning: local_equiv.eq_on_source.source_eq -> LocalEquiv.EqOnSource.source_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {e' : LocalEquiv.{u1, u2} α β}, (HasEquivₓ.Equiv.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (setoidHasEquiv.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (LocalEquiv.eqOnSourceSetoid.{u1, u2} α β)) e e') -> (Eq.{succ u1} (Set.{u1} α) (LocalEquiv.source.{u1, u2} α β e) (LocalEquiv.source.{u1, u2} α β e'))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {e' : LocalEquiv.{u2, u1} α β}, (HasEquiv.Equiv.{max (succ u2) (succ u1), 0} (LocalEquiv.{u2, u1} α β) (instHasEquiv.{max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} α β) (LocalEquiv.eqOnSourceSetoid.{u2, u1} α β)) e e') -> (Eq.{succ u2} (Set.{u2} α) (LocalEquiv.source.{u2, u1} α β e) (LocalEquiv.source.{u2, u1} α β e'))
-Case conversion may be inaccurate. Consider using '#align local_equiv.eq_on_source.source_eq LocalEquiv.EqOnSource.source_eqₓ'. -/
 /-- Two equivalent local equivs have the same source -/
 theorem EqOnSource.source_eq {e e' : LocalEquiv α β} (h : e ≈ e') : e.source = e'.source :=
   h.1
 #align local_equiv.eq_on_source.source_eq LocalEquiv.EqOnSource.source_eq
 
-/- warning: local_equiv.eq_on_source.eq_on -> LocalEquiv.EqOnSource.eqOn is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {e' : LocalEquiv.{u1, u2} α β}, (HasEquivₓ.Equiv.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (setoidHasEquiv.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (LocalEquiv.eqOnSourceSetoid.{u1, u2} α β)) e e') -> (Set.EqOn.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e') (LocalEquiv.source.{u1, u2} α β e))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {e' : LocalEquiv.{u2, u1} α β}, (HasEquiv.Equiv.{max (succ u2) (succ u1), 0} (LocalEquiv.{u2, u1} α β) (instHasEquiv.{max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} α β) (LocalEquiv.eqOnSourceSetoid.{u2, u1} α β)) e e') -> (Set.EqOn.{u2, u1} α β (LocalEquiv.toFun.{u2, u1} α β e) (LocalEquiv.toFun.{u2, u1} α β e') (LocalEquiv.source.{u2, u1} α β e))
-Case conversion may be inaccurate. Consider using '#align local_equiv.eq_on_source.eq_on LocalEquiv.EqOnSource.eqOnₓ'. -/
 /-- Two equivalent local equivs coincide on the source -/
 theorem EqOnSource.eqOn {e e' : LocalEquiv α β} (h : e ≈ e') : e.source.EqOn e e' :=
   h.2
 #align local_equiv.eq_on_source.eq_on LocalEquiv.EqOnSource.eqOn
 
-/- warning: local_equiv.eq_on_source.target_eq -> LocalEquiv.EqOnSource.target_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {e' : LocalEquiv.{u1, u2} α β}, (HasEquivₓ.Equiv.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (setoidHasEquiv.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (LocalEquiv.eqOnSourceSetoid.{u1, u2} α β)) e e') -> (Eq.{succ u2} (Set.{u2} β) (LocalEquiv.target.{u1, u2} α β e) (LocalEquiv.target.{u1, u2} α β e'))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {e' : LocalEquiv.{u2, u1} α β}, (HasEquiv.Equiv.{max (succ u2) (succ u1), 0} (LocalEquiv.{u2, u1} α β) (instHasEquiv.{max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} α β) (LocalEquiv.eqOnSourceSetoid.{u2, u1} α β)) e e') -> (Eq.{succ u1} (Set.{u1} β) (LocalEquiv.target.{u2, u1} α β e) (LocalEquiv.target.{u2, u1} α β e'))
-Case conversion may be inaccurate. Consider using '#align local_equiv.eq_on_source.target_eq LocalEquiv.EqOnSource.target_eqₓ'. -/
 /-- Two equivalent local equivs have the same target -/
 theorem EqOnSource.target_eq {e e' : LocalEquiv α β} (h : e ≈ e') : e.target = e'.target := by
   simp only [← image_source_eq_target, ← h.source_eq, h.2.image_eq]
 #align local_equiv.eq_on_source.target_eq LocalEquiv.EqOnSource.target_eq
 
-/- warning: local_equiv.eq_on_source.symm' -> LocalEquiv.EqOnSource.symm' is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {e' : LocalEquiv.{u1, u2} α β}, (HasEquivₓ.Equiv.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (setoidHasEquiv.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (LocalEquiv.eqOnSourceSetoid.{u1, u2} α β)) e e') -> (HasEquivₓ.Equiv.{max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (setoidHasEquiv.{max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (LocalEquiv.eqOnSourceSetoid.{u2, u1} β α)) (LocalEquiv.symm.{u1, u2} α β e) (LocalEquiv.symm.{u1, u2} α β e'))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {e' : LocalEquiv.{u2, u1} α β}, (HasEquiv.Equiv.{max (succ u2) (succ u1), 0} (LocalEquiv.{u2, u1} α β) (instHasEquiv.{max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} α β) (LocalEquiv.eqOnSourceSetoid.{u2, u1} α β)) e e') -> (HasEquiv.Equiv.{max (succ u2) (succ u1), 0} (LocalEquiv.{u1, u2} β α) (instHasEquiv.{max (succ u2) (succ u1)} (LocalEquiv.{u1, u2} β α) (LocalEquiv.eqOnSourceSetoid.{u1, u2} β α)) (LocalEquiv.symm.{u2, u1} α β e) (LocalEquiv.symm.{u2, u1} α β e'))
-Case conversion may be inaccurate. Consider using '#align local_equiv.eq_on_source.symm' LocalEquiv.EqOnSource.symm'ₓ'. -/
 /-- If two local equivs are equivalent, so are their inverses. -/
 theorem EqOnSource.symm' {e e' : LocalEquiv α β} (h : e ≈ e') : e.symm ≈ e'.symm :=
   by
@@ -1422,23 +902,11 @@ theorem EqOnSource.symm' {e e' : LocalEquiv α β} (h : e ≈ e') : e.symm ≈ e
   exact e'.right_inv_on.congr_right e'.symm_maps_to (h.source_eq ▸ h.eq_on.symm)
 #align local_equiv.eq_on_source.symm' LocalEquiv.EqOnSource.symm'
 
-/- warning: local_equiv.eq_on_source.symm_eq_on -> LocalEquiv.EqOnSource.symm_eqOn is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {e' : LocalEquiv.{u1, u2} α β}, (HasEquivₓ.Equiv.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (setoidHasEquiv.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (LocalEquiv.eqOnSourceSetoid.{u1, u2} α β)) e e') -> (Set.EqOn.{u2, u1} β α (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e)) (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e')) (LocalEquiv.target.{u1, u2} α β e))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {e' : LocalEquiv.{u2, u1} α β}, (HasEquiv.Equiv.{max (succ u2) (succ u1), 0} (LocalEquiv.{u2, u1} α β) (instHasEquiv.{max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} α β) (LocalEquiv.eqOnSourceSetoid.{u2, u1} α β)) e e') -> (Set.EqOn.{u1, u2} β α (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e)) (LocalEquiv.toFun.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e')) (LocalEquiv.target.{u2, u1} α β e))
-Case conversion may be inaccurate. Consider using '#align local_equiv.eq_on_source.symm_eq_on LocalEquiv.EqOnSource.symm_eqOnₓ'. -/
 /-- Two equivalent local equivs have coinciding inverses on the target -/
 theorem EqOnSource.symm_eqOn {e e' : LocalEquiv α β} (h : e ≈ e') : EqOn e.symm e'.symm e.target :=
   h.symm'.EqOn
 #align local_equiv.eq_on_source.symm_eq_on LocalEquiv.EqOnSource.symm_eqOn
 
-/- warning: local_equiv.eq_on_source.trans' -> LocalEquiv.EqOnSource.trans' is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {e : LocalEquiv.{u1, u2} α β} {e' : LocalEquiv.{u1, u2} α β} {f : LocalEquiv.{u2, u3} β γ} {f' : LocalEquiv.{u2, u3} β γ}, (HasEquivₓ.Equiv.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (setoidHasEquiv.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (LocalEquiv.eqOnSourceSetoid.{u1, u2} α β)) e e') -> (HasEquivₓ.Equiv.{max (succ u2) (succ u3)} (LocalEquiv.{u2, u3} β γ) (setoidHasEquiv.{max (succ u2) (succ u3)} (LocalEquiv.{u2, u3} β γ) (LocalEquiv.eqOnSourceSetoid.{u2, u3} β γ)) f f') -> (HasEquivₓ.Equiv.{max (succ u1) (succ u3)} (LocalEquiv.{u1, u3} α γ) (setoidHasEquiv.{max (succ u1) (succ u3)} (LocalEquiv.{u1, u3} α γ) (LocalEquiv.eqOnSourceSetoid.{u1, u3} α γ)) (LocalEquiv.trans.{u1, u2, u3} α β γ e f) (LocalEquiv.trans.{u1, u2, u3} α β γ e' f'))
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u2}} {γ : Type.{u1}} {e : LocalEquiv.{u3, u2} α β} {e' : LocalEquiv.{u3, u2} α β} {f : LocalEquiv.{u2, u1} β γ} {f' : LocalEquiv.{u2, u1} β γ}, (HasEquiv.Equiv.{max (succ u3) (succ u2), 0} (LocalEquiv.{u3, u2} α β) (instHasEquiv.{max (succ u3) (succ u2)} (LocalEquiv.{u3, u2} α β) (LocalEquiv.eqOnSourceSetoid.{u3, u2} α β)) e e') -> (HasEquiv.Equiv.{max (succ u2) (succ u1), 0} (LocalEquiv.{u2, u1} β γ) (instHasEquiv.{max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β γ) (LocalEquiv.eqOnSourceSetoid.{u2, u1} β γ)) f f') -> (HasEquiv.Equiv.{max (succ u3) (succ u1), 0} (LocalEquiv.{u3, u1} α γ) (instHasEquiv.{max (succ u3) (succ u1)} (LocalEquiv.{u3, u1} α γ) (LocalEquiv.eqOnSourceSetoid.{u3, u1} α γ)) (LocalEquiv.trans.{u3, u2, u1} α β γ e f) (LocalEquiv.trans.{u3, u2, u1} α β γ e' f'))
-Case conversion may be inaccurate. Consider using '#align local_equiv.eq_on_source.trans' LocalEquiv.EqOnSource.trans'ₓ'. -/
 /-- Composition of local equivs respects equivalence -/
 theorem EqOnSource.trans' {e e' : LocalEquiv α β} {f f' : LocalEquiv β γ} (he : e ≈ e')
     (hf : f ≈ f') : e.trans f ≈ e'.trans f' :=
@@ -1451,12 +919,6 @@ theorem EqOnSource.trans' {e e' : LocalEquiv α β} {f f' : LocalEquiv β γ} (h
     simp [(he.2 hx.1).symm, hf.2 hx.2]
 #align local_equiv.eq_on_source.trans' LocalEquiv.EqOnSource.trans'
 
-/- warning: local_equiv.eq_on_source.restr -> LocalEquiv.EqOnSource.restr is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {e' : LocalEquiv.{u1, u2} α β}, (HasEquivₓ.Equiv.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (setoidHasEquiv.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (LocalEquiv.eqOnSourceSetoid.{u1, u2} α β)) e e') -> (forall (s : Set.{u1} α), HasEquivₓ.Equiv.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (setoidHasEquiv.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (LocalEquiv.eqOnSourceSetoid.{u1, u2} α β)) (LocalEquiv.restr.{u1, u2} α β e s) (LocalEquiv.restr.{u1, u2} α β e' s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {e' : LocalEquiv.{u2, u1} α β}, (HasEquiv.Equiv.{max (succ u2) (succ u1), 0} (LocalEquiv.{u2, u1} α β) (instHasEquiv.{max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} α β) (LocalEquiv.eqOnSourceSetoid.{u2, u1} α β)) e e') -> (forall (s : Set.{u2} α), HasEquiv.Equiv.{max (succ u2) (succ u1), 0} (LocalEquiv.{u2, u1} α β) (instHasEquiv.{max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} α β) (LocalEquiv.eqOnSourceSetoid.{u2, u1} α β)) (LocalEquiv.restr.{u2, u1} α β e s) (LocalEquiv.restr.{u2, u1} α β e' s))
-Case conversion may be inaccurate. Consider using '#align local_equiv.eq_on_source.restr LocalEquiv.EqOnSource.restrₓ'. -/
 /-- Restriction of local equivs respects equivalence -/
 theorem EqOnSource.restr {e e' : LocalEquiv α β} (he : e ≈ e') (s : Set α) :
     e.restr s ≈ e'.restr s := by
@@ -1467,23 +929,11 @@ theorem EqOnSource.restr {e e' : LocalEquiv α β} (he : e ≈ e') (s : Set α)
     exact he.2 hx.1
 #align local_equiv.eq_on_source.restr LocalEquiv.EqOnSource.restr
 
-/- warning: local_equiv.eq_on_source.source_inter_preimage_eq -> LocalEquiv.EqOnSource.source_inter_preimage_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {e : LocalEquiv.{u1, u2} α β} {e' : LocalEquiv.{u1, u2} α β}, (HasEquivₓ.Equiv.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (setoidHasEquiv.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (LocalEquiv.eqOnSourceSetoid.{u1, u2} α β)) e e') -> (forall (s : Set.{u2} β), Eq.{succ u1} (Set.{u1} α) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e) (Set.preimage.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e) s)) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (LocalEquiv.source.{u1, u2} α β e') (Set.preimage.{u1, u2} α β (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e') s)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {e : LocalEquiv.{u2, u1} α β} {e' : LocalEquiv.{u2, u1} α β}, (HasEquiv.Equiv.{max (succ u2) (succ u1), 0} (LocalEquiv.{u2, u1} α β) (instHasEquiv.{max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} α β) (LocalEquiv.eqOnSourceSetoid.{u2, u1} α β)) e e') -> (forall (s : Set.{u1} β), Eq.{succ u2} (Set.{u2} α) (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) (LocalEquiv.source.{u2, u1} α β e) (Set.preimage.{u2, u1} α β (LocalEquiv.toFun.{u2, u1} α β e) s)) (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) (LocalEquiv.source.{u2, u1} α β e') (Set.preimage.{u2, u1} α β (LocalEquiv.toFun.{u2, u1} α β e') s)))
-Case conversion may be inaccurate. Consider using '#align local_equiv.eq_on_source.source_inter_preimage_eq LocalEquiv.EqOnSource.source_inter_preimage_eqₓ'. -/
 /-- Preimages are respected by equivalence -/
 theorem EqOnSource.source_inter_preimage_eq {e e' : LocalEquiv α β} (he : e ≈ e') (s : Set β) :
     e.source ∩ e ⁻¹' s = e'.source ∩ e' ⁻¹' s := by rw [he.eq_on.inter_preimage_eq, he.source_eq]
 #align local_equiv.eq_on_source.source_inter_preimage_eq LocalEquiv.EqOnSource.source_inter_preimage_eq
 
-/- warning: local_equiv.trans_self_symm -> LocalEquiv.trans_self_symm is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β), HasEquivₓ.Equiv.{succ u1} (LocalEquiv.{u1, u1} α α) (setoidHasEquiv.{succ u1} (LocalEquiv.{u1, u1} α α) (LocalEquiv.eqOnSourceSetoid.{u1, u1} α α)) (LocalEquiv.trans.{u1, u2, u1} α β α e (LocalEquiv.symm.{u1, u2} α β e)) (LocalEquiv.ofSet.{u1} α (LocalEquiv.source.{u1, u2} α β e))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β), HasEquiv.Equiv.{succ u2, 0} (LocalEquiv.{u2, u2} α α) (instHasEquiv.{succ u2} (LocalEquiv.{u2, u2} α α) (LocalEquiv.eqOnSourceSetoid.{u2, u2} α α)) (LocalEquiv.trans.{u2, u1, u2} α β α e (LocalEquiv.symm.{u2, u1} α β e)) (LocalEquiv.ofSet.{u2} α (LocalEquiv.source.{u2, u1} α β e))
-Case conversion may be inaccurate. Consider using '#align local_equiv.trans_self_symm LocalEquiv.trans_self_symmₓ'. -/
 /-- Composition of a local equiv and its inverse is equivalent to the restriction of the identity
 to the source -/
 theorem trans_self_symm : e.trans e.symm ≈ LocalEquiv.ofSet e.source :=
@@ -1502,12 +952,6 @@ theorem trans_symm_self : e.symm.trans e ≈ LocalEquiv.ofSet e.target :=
 #align local_equiv.trans_symm_self LocalEquiv.trans_symm_self
 -/
 
-/- warning: local_equiv.eq_of_eq_on_source_univ -> LocalEquiv.eq_of_eq_on_source_univ is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) (e' : LocalEquiv.{u1, u2} α β), (HasEquivₓ.Equiv.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (setoidHasEquiv.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (LocalEquiv.eqOnSourceSetoid.{u1, u2} α β)) e e') -> (Eq.{succ u1} (Set.{u1} α) (LocalEquiv.source.{u1, u2} α β e) (Set.univ.{u1} α)) -> (Eq.{succ u2} (Set.{u2} β) (LocalEquiv.target.{u1, u2} α β e) (Set.univ.{u2} β)) -> (Eq.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) e e')
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β) (e' : LocalEquiv.{u2, u1} α β), (HasEquiv.Equiv.{max (succ u2) (succ u1), 0} (LocalEquiv.{u2, u1} α β) (instHasEquiv.{max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} α β) (LocalEquiv.eqOnSourceSetoid.{u2, u1} α β)) e e') -> (Eq.{succ u2} (Set.{u2} α) (LocalEquiv.source.{u2, u1} α β e) (Set.univ.{u2} α)) -> (Eq.{succ u1} (Set.{u1} β) (LocalEquiv.target.{u2, u1} α β e) (Set.univ.{u1} β)) -> (Eq.{max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} α β) e e')
-Case conversion may be inaccurate. Consider using '#align local_equiv.eq_of_eq_on_source_univ LocalEquiv.eq_of_eq_on_source_univₓ'. -/
 /-- Two equivalent local equivs are equal when the source and target are univ -/
 theorem eq_of_eq_on_source_univ (e e' : LocalEquiv α β) (h : e ≈ e') (s : e.source = univ)
     (t : e.target = univ) : e = e' :=
@@ -1540,12 +984,6 @@ def prod (e : LocalEquiv α β) (e' : LocalEquiv γ δ) : LocalEquiv (α × γ)
 #align local_equiv.prod LocalEquiv.prod
 -/
 
-/- warning: local_equiv.prod_source -> LocalEquiv.prod_source is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u4}} (e : LocalEquiv.{u1, u2} α β) (e' : LocalEquiv.{u3, u4} γ δ), Eq.{succ (max u1 u3)} (Set.{max u1 u3} (Prod.{u1, u3} α γ)) (LocalEquiv.source.{max u1 u3, max u2 u4} (Prod.{u1, u3} α γ) (Prod.{u2, u4} β δ) (LocalEquiv.prod.{u1, u2, u3, u4} α β γ δ e e')) (Set.prod.{u1, u3} α γ (LocalEquiv.source.{u1, u2} α β e) (LocalEquiv.source.{u3, u4} γ δ e'))
-but is expected to have type
-  forall {α : Type.{u4}} {β : Type.{u3}} {γ : Type.{u2}} {δ : Type.{u1}} (e : LocalEquiv.{u4, u3} α β) (e' : LocalEquiv.{u2, u1} γ δ), Eq.{max (succ u4) (succ u2)} (Set.{max u4 u2} (Prod.{u4, u2} α γ)) (LocalEquiv.source.{max u4 u2, max u3 u1} (Prod.{u4, u2} α γ) (Prod.{u3, u1} β δ) (LocalEquiv.prod.{u4, u3, u2, u1} α β γ δ e e')) (Set.prod.{u4, u2} α γ (LocalEquiv.source.{u4, u3} α β e) (LocalEquiv.source.{u2, u1} γ δ e'))
-Case conversion may be inaccurate. Consider using '#align local_equiv.prod_source LocalEquiv.prod_sourceₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 @[simp, mfld_simps]
 theorem prod_source (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
@@ -1553,12 +991,6 @@ theorem prod_source (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
   rfl
 #align local_equiv.prod_source LocalEquiv.prod_source
 
-/- warning: local_equiv.prod_target -> LocalEquiv.prod_target is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u4}} (e : LocalEquiv.{u1, u2} α β) (e' : LocalEquiv.{u3, u4} γ δ), Eq.{succ (max u2 u4)} (Set.{max u2 u4} (Prod.{u2, u4} β δ)) (LocalEquiv.target.{max u1 u3, max u2 u4} (Prod.{u1, u3} α γ) (Prod.{u2, u4} β δ) (LocalEquiv.prod.{u1, u2, u3, u4} α β γ δ e e')) (Set.prod.{u2, u4} β δ (LocalEquiv.target.{u1, u2} α β e) (LocalEquiv.target.{u3, u4} γ δ e'))
-but is expected to have type
-  forall {α : Type.{u4}} {β : Type.{u3}} {γ : Type.{u2}} {δ : Type.{u1}} (e : LocalEquiv.{u4, u3} α β) (e' : LocalEquiv.{u2, u1} γ δ), Eq.{max (succ u3) (succ u1)} (Set.{max u3 u1} (Prod.{u3, u1} β δ)) (LocalEquiv.target.{max u4 u2, max u3 u1} (Prod.{u4, u2} α γ) (Prod.{u3, u1} β δ) (LocalEquiv.prod.{u4, u3, u2, u1} α β γ δ e e')) (Set.prod.{u3, u1} β δ (LocalEquiv.target.{u4, u3} α β e) (LocalEquiv.target.{u2, u1} γ δ e'))
-Case conversion may be inaccurate. Consider using '#align local_equiv.prod_target LocalEquiv.prod_targetₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 @[simp, mfld_simps]
 theorem prod_target (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
@@ -1566,57 +998,27 @@ theorem prod_target (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
   rfl
 #align local_equiv.prod_target LocalEquiv.prod_target
 
-/- warning: local_equiv.prod_coe -> LocalEquiv.prod_coe is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u4}} (e : LocalEquiv.{u1, u2} α β) (e' : LocalEquiv.{u3, u4} γ δ), Eq.{max (max (succ u1) (succ u3)) (succ u2) (succ u4)} ((fun (_x : LocalEquiv.{max u1 u3, max u2 u4} (Prod.{u1, u3} α γ) (Prod.{u2, u4} β δ)) => (Prod.{u1, u3} α γ) -> (Prod.{u2, u4} β δ)) (LocalEquiv.prod.{u1, u2, u3, u4} α β γ δ e e')) (coeFn.{max (succ (max u1 u3)) (succ (max u2 u4)), max (succ (max u1 u3)) (succ (max u2 u4))} (LocalEquiv.{max u1 u3, max u2 u4} (Prod.{u1, u3} α γ) (Prod.{u2, u4} β δ)) (fun (_x : LocalEquiv.{max u1 u3, max u2 u4} (Prod.{u1, u3} α γ) (Prod.{u2, u4} β δ)) => (Prod.{u1, u3} α γ) -> (Prod.{u2, u4} β δ)) (LocalEquiv.hasCoeToFun.{max u1 u3, max u2 u4} (Prod.{u1, u3} α γ) (Prod.{u2, u4} β δ)) (LocalEquiv.prod.{u1, u2, u3, u4} α β γ δ e e')) (fun (p : Prod.{u1, u3} α γ) => Prod.mk.{u2, u4} β δ (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (fun (_x : LocalEquiv.{u1, u2} α β) => α -> β) (LocalEquiv.hasCoeToFun.{u1, u2} α β) e (Prod.fst.{u1, u3} α γ p)) (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (LocalEquiv.{u3, u4} γ δ) (fun (_x : LocalEquiv.{u3, u4} γ δ) => γ -> δ) (LocalEquiv.hasCoeToFun.{u3, u4} γ δ) e' (Prod.snd.{u1, u3} α γ p)))
-but is expected to have type
-  forall {α : Type.{u4}} {β : Type.{u3}} {γ : Type.{u2}} {δ : Type.{u1}} (e : LocalEquiv.{u4, u3} α β) (e' : LocalEquiv.{u2, u1} γ δ), Eq.{max (max (max (succ u4) (succ u3)) (succ u2)) (succ u1)} ((Prod.{u4, u2} α γ) -> (Prod.{u3, u1} β δ)) (LocalEquiv.toFun.{max u4 u2, max u3 u1} (Prod.{u4, u2} α γ) (Prod.{u3, u1} β δ) (LocalEquiv.prod.{u4, u3, u2, u1} α β γ δ e e')) (fun (p : Prod.{u4, u2} α γ) => Prod.mk.{u3, u1} β δ (LocalEquiv.toFun.{u4, u3} α β e (Prod.fst.{u4, u2} α γ p)) (LocalEquiv.toFun.{u2, u1} γ δ e' (Prod.snd.{u4, u2} α γ p)))
-Case conversion may be inaccurate. Consider using '#align local_equiv.prod_coe LocalEquiv.prod_coeₓ'. -/
 @[simp, mfld_simps]
 theorem prod_coe (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
     (e.Prod e' : α × γ → β × δ) = fun p => (e p.1, e' p.2) :=
   rfl
 #align local_equiv.prod_coe LocalEquiv.prod_coe
 
-/- warning: local_equiv.prod_coe_symm -> LocalEquiv.prod_coe_symm is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u4}} (e : LocalEquiv.{u1, u2} α β) (e' : LocalEquiv.{u3, u4} γ δ), Eq.{max (max (succ u2) (succ u4)) (succ u1) (succ u3)} ((fun (_x : LocalEquiv.{max u2 u4, max u1 u3} (Prod.{u2, u4} β δ) (Prod.{u1, u3} α γ)) => (Prod.{u2, u4} β δ) -> (Prod.{u1, u3} α γ)) (LocalEquiv.symm.{max u1 u3, max u2 u4} (Prod.{u1, u3} α γ) (Prod.{u2, u4} β δ) (LocalEquiv.prod.{u1, u2, u3, u4} α β γ δ e e'))) (coeFn.{max (succ (max u2 u4)) (succ (max u1 u3)), max (succ (max u2 u4)) (succ (max u1 u3))} (LocalEquiv.{max u2 u4, max u1 u3} (Prod.{u2, u4} β δ) (Prod.{u1, u3} α γ)) (fun (_x : LocalEquiv.{max u2 u4, max u1 u3} (Prod.{u2, u4} β δ) (Prod.{u1, u3} α γ)) => (Prod.{u2, u4} β δ) -> (Prod.{u1, u3} α γ)) (LocalEquiv.hasCoeToFun.{max u2 u4, max u1 u3} (Prod.{u2, u4} β δ) (Prod.{u1, u3} α γ)) (LocalEquiv.symm.{max u1 u3, max u2 u4} (Prod.{u1, u3} α γ) (Prod.{u2, u4} β δ) (LocalEquiv.prod.{u1, u2, u3, u4} α β γ δ e e'))) (fun (p : Prod.{u2, u4} β δ) => Prod.mk.{u1, u3} α γ (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (fun (_x : LocalEquiv.{u2, u1} β α) => β -> α) (LocalEquiv.hasCoeToFun.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β e) (Prod.fst.{u2, u4} β δ p)) (coeFn.{max (succ u4) (succ u3), max (succ u4) (succ u3)} (LocalEquiv.{u4, u3} δ γ) (fun (_x : LocalEquiv.{u4, u3} δ γ) => δ -> γ) (LocalEquiv.hasCoeToFun.{u4, u3} δ γ) (LocalEquiv.symm.{u3, u4} γ δ e') (Prod.snd.{u2, u4} β δ p)))
-but is expected to have type
-  forall {α : Type.{u4}} {β : Type.{u3}} {γ : Type.{u2}} {δ : Type.{u1}} (e : LocalEquiv.{u4, u3} α β) (e' : LocalEquiv.{u2, u1} γ δ), Eq.{max (max (max (succ u4) (succ u3)) (succ u2)) (succ u1)} ((Prod.{u3, u1} β δ) -> (Prod.{u4, u2} α γ)) (LocalEquiv.toFun.{max u3 u1, max u4 u2} (Prod.{u3, u1} β δ) (Prod.{u4, u2} α γ) (LocalEquiv.symm.{max u4 u2, max u3 u1} (Prod.{u4, u2} α γ) (Prod.{u3, u1} β δ) (LocalEquiv.prod.{u4, u3, u2, u1} α β γ δ e e'))) (fun (p : Prod.{u3, u1} β δ) => Prod.mk.{u4, u2} α γ (LocalEquiv.toFun.{u3, u4} β α (LocalEquiv.symm.{u4, u3} α β e) (Prod.fst.{u3, u1} β δ p)) (LocalEquiv.toFun.{u1, u2} δ γ (LocalEquiv.symm.{u2, u1} γ δ e') (Prod.snd.{u3, u1} β δ p)))
-Case conversion may be inaccurate. Consider using '#align local_equiv.prod_coe_symm LocalEquiv.prod_coe_symmₓ'. -/
 theorem prod_coe_symm (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
     ((e.Prod e').symm : β × δ → α × γ) = fun p => (e.symm p.1, e'.symm p.2) :=
   rfl
 #align local_equiv.prod_coe_symm LocalEquiv.prod_coe_symm
 
-/- warning: local_equiv.prod_symm -> LocalEquiv.prod_symm is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u4}} (e : LocalEquiv.{u1, u2} α β) (e' : LocalEquiv.{u3, u4} γ δ), Eq.{max (succ (max u2 u4)) (succ (max u1 u3))} (LocalEquiv.{max u2 u4, max u1 u3} (Prod.{u2, u4} β δ) (Prod.{u1, u3} α γ)) (LocalEquiv.symm.{max u1 u3, max u2 u4} (Prod.{u1, u3} α γ) (Prod.{u2, u4} β δ) (LocalEquiv.prod.{u1, u2, u3, u4} α β γ δ e e')) (LocalEquiv.prod.{u2, u1, u4, u3} β α δ γ (LocalEquiv.symm.{u1, u2} α β e) (LocalEquiv.symm.{u3, u4} γ δ e'))
-but is expected to have type
-  forall {α : Type.{u4}} {β : Type.{u3}} {γ : Type.{u2}} {δ : Type.{u1}} (e : LocalEquiv.{u4, u3} α β) (e' : LocalEquiv.{u2, u1} γ δ), Eq.{max (max (max (succ u4) (succ u3)) (succ u2)) (succ u1)} (LocalEquiv.{max u3 u1, max u4 u2} (Prod.{u3, u1} β δ) (Prod.{u4, u2} α γ)) (LocalEquiv.symm.{max u4 u2, max u3 u1} (Prod.{u4, u2} α γ) (Prod.{u3, u1} β δ) (LocalEquiv.prod.{u4, u3, u2, u1} α β γ δ e e')) (LocalEquiv.prod.{u3, u4, u1, u2} β α δ γ (LocalEquiv.symm.{u4, u3} α β e) (LocalEquiv.symm.{u2, u1} γ δ e'))
-Case conversion may be inaccurate. Consider using '#align local_equiv.prod_symm LocalEquiv.prod_symmₓ'. -/
 @[simp, mfld_simps]
 theorem prod_symm (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
     (e.Prod e').symm = e.symm.Prod e'.symm := by ext x <;> simp [prod_coe_symm]
 #align local_equiv.prod_symm LocalEquiv.prod_symm
 
-/- warning: local_equiv.refl_prod_refl -> LocalEquiv.refl_prod_refl is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}}, Eq.{succ (max u1 u2)} (LocalEquiv.{max u1 u2, max u1 u2} (Prod.{u1, u2} α β) (Prod.{u1, u2} α β)) (LocalEquiv.prod.{u1, u1, u2, u2} α α β β (LocalEquiv.refl.{u1} α) (LocalEquiv.refl.{u2} β)) (LocalEquiv.refl.{max u1 u2} (Prod.{u1, u2} α β))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}}, Eq.{max (succ u2) (succ u1)} (LocalEquiv.{max u1 u2, max u1 u2} (Prod.{u2, u1} α β) (Prod.{u2, u1} α β)) (LocalEquiv.prod.{u2, u2, u1, u1} α α β β (LocalEquiv.refl.{u2} α) (LocalEquiv.refl.{u1} β)) (LocalEquiv.refl.{max u1 u2} (Prod.{u2, u1} α β))
-Case conversion may be inaccurate. Consider using '#align local_equiv.refl_prod_refl LocalEquiv.refl_prod_reflₓ'. -/
 @[simp, mfld_simps]
 theorem refl_prod_refl : (LocalEquiv.refl α).Prod (LocalEquiv.refl β) = LocalEquiv.refl (α × β) :=
   by ext1 ⟨x, y⟩; · rfl; · rintro ⟨x, y⟩; rfl; exact univ_prod_univ
 #align local_equiv.refl_prod_refl LocalEquiv.refl_prod_refl
 
-/- warning: local_equiv.prod_trans -> LocalEquiv.prod_trans is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u4}} {η : Type.{u5}} {ε : Type.{u6}} (e : LocalEquiv.{u1, u2} α β) (f : LocalEquiv.{u2, u3} β γ) (e' : LocalEquiv.{u4, u5} δ η) (f' : LocalEquiv.{u5, u6} η ε), Eq.{max (succ (max u1 u4)) (succ (max u3 u6))} (LocalEquiv.{max u1 u4, max u3 u6} (Prod.{u1, u4} α δ) (Prod.{u3, u6} γ ε)) (LocalEquiv.trans.{max u1 u4, max u2 u5, max u3 u6} (Prod.{u1, u4} α δ) (Prod.{u2, u5} β η) (Prod.{u3, u6} γ ε) (LocalEquiv.prod.{u1, u2, u4, u5} α β δ η e e') (LocalEquiv.prod.{u2, u3, u5, u6} β γ η ε f f')) (LocalEquiv.prod.{u1, u3, u4, u6} α γ δ ε (LocalEquiv.trans.{u1, u2, u3} α β γ e f) (LocalEquiv.trans.{u4, u5, u6} δ η ε e' f'))
-but is expected to have type
-  forall {α : Type.{u4}} {β : Type.{u3}} {γ : Type.{u2}} {δ : Type.{u1}} {η : Type.{u6}} {ε : Type.{u5}} (e : LocalEquiv.{u4, u3} α β) (f : LocalEquiv.{u3, u2} β γ) (e' : LocalEquiv.{u1, u6} δ η) (f' : LocalEquiv.{u6, u5} η ε), Eq.{max (max (max (succ u4) (succ u2)) (succ u1)) (succ u5)} (LocalEquiv.{max u4 u1, max u2 u5} (Prod.{u4, u1} α δ) (Prod.{u2, u5} γ ε)) (LocalEquiv.trans.{max u4 u1, max u3 u6, max u2 u5} (Prod.{u4, u1} α δ) (Prod.{u3, u6} β η) (Prod.{u2, u5} γ ε) (LocalEquiv.prod.{u4, u3, u1, u6} α β δ η e e') (LocalEquiv.prod.{u3, u2, u6, u5} β γ η ε f f')) (LocalEquiv.prod.{u4, u2, u1, u5} α γ δ ε (LocalEquiv.trans.{u4, u3, u2} α β γ e f) (LocalEquiv.trans.{u1, u6, u5} δ η ε e' f'))
-Case conversion may be inaccurate. Consider using '#align local_equiv.prod_trans LocalEquiv.prod_transₓ'. -/
 @[simp, mfld_simps]
 theorem prod_trans {η : Type _} {ε : Type _} (e : LocalEquiv α β) (f : LocalEquiv β γ)
     (e' : LocalEquiv δ η) (f' : LocalEquiv η ε) :
@@ -1647,24 +1049,12 @@ def piecewise (e e' : LocalEquiv α β) (s : Set α) (t : Set β) [∀ x, Decida
 #align local_equiv.piecewise LocalEquiv.piecewise
 -/
 
-/- warning: local_equiv.symm_piecewise -> LocalEquiv.symm_piecewise is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) (e' : LocalEquiv.{u1, u2} α β) {s : Set.{u1} α} {t : Set.{u2} β} [_inst_1 : forall (x : α), Decidable (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)] [_inst_2 : forall (y : β), Decidable (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) y t)] (H : LocalEquiv.IsImage.{u1, u2} α β e s t) (H' : LocalEquiv.IsImage.{u1, u2} α β e' s t), Eq.{max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (LocalEquiv.symm.{u1, u2} α β (LocalEquiv.piecewise.{u1, u2} α β e e' s t (fun (y : α) => _inst_1 y) (fun (x : β) => _inst_2 x) H H')) (LocalEquiv.piecewise.{u2, u1} β α (LocalEquiv.symm.{u1, u2} α β e) (LocalEquiv.symm.{u1, u2} α β e') t s (fun (x : β) => _inst_2 x) (fun (y : α) => _inst_1 y) (LocalEquiv.IsImage.symm.{u1, u2} α β e s t H) (LocalEquiv.IsImage.symm.{u1, u2} α β e' s t H'))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β) (e' : LocalEquiv.{u2, u1} α β) {s : Set.{u2} α} {t : Set.{u1} β} [_inst_1 : forall (x : α), Decidable (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x s)] [_inst_2 : forall (y : β), Decidable (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) y t)] (H : LocalEquiv.IsImage.{u2, u1} α β e s t) (H' : LocalEquiv.IsImage.{u2, u1} α β e' s t), Eq.{max (succ u2) (succ u1)} (LocalEquiv.{u1, u2} β α) (LocalEquiv.symm.{u2, u1} α β (LocalEquiv.piecewise.{u2, u1} α β e e' s t (fun (y : α) => _inst_1 y) (fun (x : β) => _inst_2 x) H H')) (LocalEquiv.piecewise.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e) (LocalEquiv.symm.{u2, u1} α β e') t s (fun (x : β) => _inst_2 x) (fun (y : α) => _inst_1 y) (LocalEquiv.IsImage.symm.{u1, u2} α β e s t H) (LocalEquiv.IsImage.symm.{u1, u2} α β e' s t H'))
-Case conversion may be inaccurate. Consider using '#align local_equiv.symm_piecewise LocalEquiv.symm_piecewiseₓ'. -/
 theorem symm_piecewise (e e' : LocalEquiv α β) {s : Set α} {t : Set β} [∀ x, Decidable (x ∈ s)]
     [∀ y, Decidable (y ∈ t)] (H : e.IsImage s t) (H' : e'.IsImage s t) :
     (e.piecewise e' s t H H').symm = e.symm.piecewise e'.symm t s H.symm H'.symm :=
   rfl
 #align local_equiv.symm_piecewise LocalEquiv.symm_piecewise
 
-/- warning: local_equiv.disjoint_union -> LocalEquiv.disjointUnion is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) (e' : LocalEquiv.{u1, u2} α β), (Disjoint.{u1} (Set.{u1} α) (SemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (Lattice.toSemilatticeInf.{u1} (Set.{u1} α) (GeneralizedCoheytingAlgebra.toLattice.{u1} (Set.{u1} α) (GeneralizedBooleanAlgebra.toGeneralizedCoheytingAlgebra.{u1} (Set.{u1} α) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)))))) (GeneralizedBooleanAlgebra.toOrderBot.{u1} (Set.{u1} α) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α))) (LocalEquiv.source.{u1, u2} α β e) (LocalEquiv.source.{u1, u2} α β e')) -> (Disjoint.{u2} (Set.{u2} β) (SemilatticeInf.toPartialOrder.{u2} (Set.{u2} β) (Lattice.toSemilatticeInf.{u2} (Set.{u2} β) (GeneralizedCoheytingAlgebra.toLattice.{u2} (Set.{u2} β) (GeneralizedBooleanAlgebra.toGeneralizedCoheytingAlgebra.{u2} (Set.{u2} β) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u2} (Set.{u2} β) (Set.booleanAlgebra.{u2} β)))))) (GeneralizedBooleanAlgebra.toOrderBot.{u2} (Set.{u2} β) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u2} (Set.{u2} β) (Set.booleanAlgebra.{u2} β))) (LocalEquiv.target.{u1, u2} α β e) (LocalEquiv.target.{u1, u2} α β e')) -> (forall [_inst_1 : forall (x : α), Decidable (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x (LocalEquiv.source.{u1, u2} α β e))] [_inst_2 : forall (y : β), Decidable (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) y (LocalEquiv.target.{u1, u2} α β e))], LocalEquiv.{u1, u2} α β)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) (e' : LocalEquiv.{u1, u2} α β), (Disjoint.{u1} (Set.{u1} α) (SemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (Lattice.toSemilatticeInf.{u1} (Set.{u1} α) (GeneralizedCoheytingAlgebra.toLattice.{u1} (Set.{u1} α) (CoheytingAlgebra.toGeneralizedCoheytingAlgebra.{u1} (Set.{u1} α) (BiheytingAlgebra.toCoheytingAlgebra.{u1} (Set.{u1} α) (BooleanAlgebra.toBiheytingAlgebra.{u1} (Set.{u1} α) (Set.instBooleanAlgebraSet.{u1} α))))))) (BoundedOrder.toOrderBot.{u1} (Set.{u1} α) (Preorder.toLE.{u1} (Set.{u1} α) (PartialOrder.toPreorder.{u1} (Set.{u1} α) (SemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (Lattice.toSemilatticeInf.{u1} (Set.{u1} α) (GeneralizedCoheytingAlgebra.toLattice.{u1} (Set.{u1} α) (CoheytingAlgebra.toGeneralizedCoheytingAlgebra.{u1} (Set.{u1} α) (BiheytingAlgebra.toCoheytingAlgebra.{u1} (Set.{u1} α) (BooleanAlgebra.toBiheytingAlgebra.{u1} (Set.{u1} α) (Set.instBooleanAlgebraSet.{u1} α))))))))) (BooleanAlgebra.toBoundedOrder.{u1} (Set.{u1} α) (Set.instBooleanAlgebraSet.{u1} α))) (LocalEquiv.source.{u1, u2} α β e) (LocalEquiv.source.{u1, u2} α β e')) -> (Disjoint.{u2} (Set.{u2} β) (SemilatticeInf.toPartialOrder.{u2} (Set.{u2} β) (Lattice.toSemilatticeInf.{u2} (Set.{u2} β) (GeneralizedCoheytingAlgebra.toLattice.{u2} (Set.{u2} β) (CoheytingAlgebra.toGeneralizedCoheytingAlgebra.{u2} (Set.{u2} β) (BiheytingAlgebra.toCoheytingAlgebra.{u2} (Set.{u2} β) (BooleanAlgebra.toBiheytingAlgebra.{u2} (Set.{u2} β) (Set.instBooleanAlgebraSet.{u2} β))))))) (BoundedOrder.toOrderBot.{u2} (Set.{u2} β) (Preorder.toLE.{u2} (Set.{u2} β) (PartialOrder.toPreorder.{u2} (Set.{u2} β) (SemilatticeInf.toPartialOrder.{u2} (Set.{u2} β) (Lattice.toSemilatticeInf.{u2} (Set.{u2} β) (GeneralizedCoheytingAlgebra.toLattice.{u2} (Set.{u2} β) (CoheytingAlgebra.toGeneralizedCoheytingAlgebra.{u2} (Set.{u2} β) (BiheytingAlgebra.toCoheytingAlgebra.{u2} (Set.{u2} β) (BooleanAlgebra.toBiheytingAlgebra.{u2} (Set.{u2} β) (Set.instBooleanAlgebraSet.{u2} β))))))))) (BooleanAlgebra.toBoundedOrder.{u2} (Set.{u2} β) (Set.instBooleanAlgebraSet.{u2} β))) (LocalEquiv.target.{u1, u2} α β e) (LocalEquiv.target.{u1, u2} α β e')) -> (forall [_inst_1 : forall (x : α), Decidable (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x (LocalEquiv.source.{u1, u2} α β e))] [_inst_2 : forall (y : β), Decidable (Membership.mem.{u2, u2} β (Set.{u2} β) (Set.instMembershipSet.{u2} β) y (LocalEquiv.target.{u1, u2} α β e))], LocalEquiv.{u1, u2} α β)
-Case conversion may be inaccurate. Consider using '#align local_equiv.disjoint_union LocalEquiv.disjointUnionₓ'. -/
 /-- Combine two `local_equiv`s with disjoint sources and disjoint targets. We reuse
 `local_equiv.piecewise`, then override `source` and `target` to ensure better definitional
 equalities. -/
@@ -1677,12 +1067,6 @@ def disjointUnion (e e' : LocalEquiv α β) (hs : Disjoint e.source e'.source)
     _ rfl _ rfl (e.source ∪ e'.source) (ite_left _ _) (e.target ∪ e'.target) (ite_left _ _)
 #align local_equiv.disjoint_union LocalEquiv.disjointUnion
 
-/- warning: local_equiv.disjoint_union_eq_piecewise -> LocalEquiv.disjointUnion_eq_piecewise is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : LocalEquiv.{u1, u2} α β) (e' : LocalEquiv.{u1, u2} α β) (hs : Disjoint.{u1} (Set.{u1} α) (SemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (Lattice.toSemilatticeInf.{u1} (Set.{u1} α) (GeneralizedCoheytingAlgebra.toLattice.{u1} (Set.{u1} α) (GeneralizedBooleanAlgebra.toGeneralizedCoheytingAlgebra.{u1} (Set.{u1} α) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)))))) (GeneralizedBooleanAlgebra.toOrderBot.{u1} (Set.{u1} α) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α))) (LocalEquiv.source.{u1, u2} α β e) (LocalEquiv.source.{u1, u2} α β e')) (ht : Disjoint.{u2} (Set.{u2} β) (SemilatticeInf.toPartialOrder.{u2} (Set.{u2} β) (Lattice.toSemilatticeInf.{u2} (Set.{u2} β) (GeneralizedCoheytingAlgebra.toLattice.{u2} (Set.{u2} β) (GeneralizedBooleanAlgebra.toGeneralizedCoheytingAlgebra.{u2} (Set.{u2} β) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u2} (Set.{u2} β) (Set.booleanAlgebra.{u2} β)))))) (GeneralizedBooleanAlgebra.toOrderBot.{u2} (Set.{u2} β) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u2} (Set.{u2} β) (Set.booleanAlgebra.{u2} β))) (LocalEquiv.target.{u1, u2} α β e) (LocalEquiv.target.{u1, u2} α β e')) [_inst_1 : forall (x : α), Decidable (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x (LocalEquiv.source.{u1, u2} α β e))] [_inst_2 : forall (y : β), Decidable (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) y (LocalEquiv.target.{u1, u2} α β e))], Eq.{max (succ u1) (succ u2)} (LocalEquiv.{u1, u2} α β) (LocalEquiv.disjointUnion.{u1, u2} α β e e' hs ht (fun (x : α) => _inst_1 x) (fun (y : β) => _inst_2 y)) (LocalEquiv.piecewise.{u1, u2} α β e e' (LocalEquiv.source.{u1, u2} α β e) (LocalEquiv.target.{u1, u2} α β e) (fun (x : α) => _inst_1 x) (fun (y : β) => _inst_2 y) (LocalEquiv.isImage_source_target.{u1, u2} α β e) (LocalEquiv.isImage_source_target_of_disjoint.{u1, u2} α β e' e (Disjoint.symm.{u1} (Set.{u1} α) (SemilatticeInf.toPartialOrder.{u1} (Set.{u1} α) (Lattice.toSemilatticeInf.{u1} (Set.{u1} α) (GeneralizedCoheytingAlgebra.toLattice.{u1} (Set.{u1} α) (GeneralizedBooleanAlgebra.toGeneralizedCoheytingAlgebra.{u1} (Set.{u1} α) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)))))) (GeneralizedBooleanAlgebra.toOrderBot.{u1} (Set.{u1} α) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α))) (LocalEquiv.source.{u1, u2} α β e) (LocalEquiv.source.{u1, u2} α β e') hs) (Disjoint.symm.{u2} (Set.{u2} β) (SemilatticeInf.toPartialOrder.{u2} (Set.{u2} β) (Lattice.toSemilatticeInf.{u2} (Set.{u2} β) (GeneralizedCoheytingAlgebra.toLattice.{u2} (Set.{u2} β) (GeneralizedBooleanAlgebra.toGeneralizedCoheytingAlgebra.{u2} (Set.{u2} β) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u2} (Set.{u2} β) (Set.booleanAlgebra.{u2} β)))))) (GeneralizedBooleanAlgebra.toOrderBot.{u2} (Set.{u2} β) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u2} (Set.{u2} β) (Set.booleanAlgebra.{u2} β))) (LocalEquiv.target.{u1, u2} α β e) (LocalEquiv.target.{u1, u2} α β e') ht)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β) (e' : LocalEquiv.{u2, u1} α β) (hs : Disjoint.{u2} (Set.{u2} α) (SemilatticeInf.toPartialOrder.{u2} (Set.{u2} α) (Lattice.toSemilatticeInf.{u2} (Set.{u2} α) (GeneralizedCoheytingAlgebra.toLattice.{u2} (Set.{u2} α) (CoheytingAlgebra.toGeneralizedCoheytingAlgebra.{u2} (Set.{u2} α) (BiheytingAlgebra.toCoheytingAlgebra.{u2} (Set.{u2} α) (BooleanAlgebra.toBiheytingAlgebra.{u2} (Set.{u2} α) (Set.instBooleanAlgebraSet.{u2} α))))))) (BoundedOrder.toOrderBot.{u2} (Set.{u2} α) (Preorder.toLE.{u2} (Set.{u2} α) (PartialOrder.toPreorder.{u2} (Set.{u2} α) (SemilatticeInf.toPartialOrder.{u2} (Set.{u2} α) (Lattice.toSemilatticeInf.{u2} (Set.{u2} α) (GeneralizedCoheytingAlgebra.toLattice.{u2} (Set.{u2} α) (CoheytingAlgebra.toGeneralizedCoheytingAlgebra.{u2} (Set.{u2} α) (BiheytingAlgebra.toCoheytingAlgebra.{u2} (Set.{u2} α) (BooleanAlgebra.toBiheytingAlgebra.{u2} (Set.{u2} α) (Set.instBooleanAlgebraSet.{u2} α))))))))) (BooleanAlgebra.toBoundedOrder.{u2} (Set.{u2} α) (Set.instBooleanAlgebraSet.{u2} α))) (LocalEquiv.source.{u2, u1} α β e) (LocalEquiv.source.{u2, u1} α β e')) (ht : Disjoint.{u1} (Set.{u1} β) (SemilatticeInf.toPartialOrder.{u1} (Set.{u1} β) (Lattice.toSemilatticeInf.{u1} (Set.{u1} β) (GeneralizedCoheytingAlgebra.toLattice.{u1} (Set.{u1} β) (CoheytingAlgebra.toGeneralizedCoheytingAlgebra.{u1} (Set.{u1} β) (BiheytingAlgebra.toCoheytingAlgebra.{u1} (Set.{u1} β) (BooleanAlgebra.toBiheytingAlgebra.{u1} (Set.{u1} β) (Set.instBooleanAlgebraSet.{u1} β))))))) (BoundedOrder.toOrderBot.{u1} (Set.{u1} β) (Preorder.toLE.{u1} (Set.{u1} β) (PartialOrder.toPreorder.{u1} (Set.{u1} β) (SemilatticeInf.toPartialOrder.{u1} (Set.{u1} β) (Lattice.toSemilatticeInf.{u1} (Set.{u1} β) (GeneralizedCoheytingAlgebra.toLattice.{u1} (Set.{u1} β) (CoheytingAlgebra.toGeneralizedCoheytingAlgebra.{u1} (Set.{u1} β) (BiheytingAlgebra.toCoheytingAlgebra.{u1} (Set.{u1} β) (BooleanAlgebra.toBiheytingAlgebra.{u1} (Set.{u1} β) (Set.instBooleanAlgebraSet.{u1} β))))))))) (BooleanAlgebra.toBoundedOrder.{u1} (Set.{u1} β) (Set.instBooleanAlgebraSet.{u1} β))) (LocalEquiv.target.{u2, u1} α β e) (LocalEquiv.target.{u2, u1} α β e')) [_inst_1 : forall (x : α), Decidable (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x (LocalEquiv.source.{u2, u1} α β e))] [_inst_2 : forall (y : β), Decidable (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) y (LocalEquiv.target.{u2, u1} α β e))], Eq.{max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} α β) (LocalEquiv.disjointUnion.{u2, u1} α β e e' hs ht (fun (x : α) => _inst_1 x) (fun (y : β) => _inst_2 y)) (LocalEquiv.piecewise.{u2, u1} α β e e' (LocalEquiv.source.{u2, u1} α β e) (LocalEquiv.target.{u2, u1} α β e) (fun (x : α) => _inst_1 x) (fun (y : β) => _inst_2 y) (LocalEquiv.isImage_source_target.{u1, u2} α β e) (LocalEquiv.isImage_source_target_of_disjoint.{u1, u2} α β e' e (Disjoint.symm.{u2} (Set.{u2} α) (SemilatticeInf.toPartialOrder.{u2} (Set.{u2} α) (Lattice.toSemilatticeInf.{u2} (Set.{u2} α) (GeneralizedCoheytingAlgebra.toLattice.{u2} (Set.{u2} α) (CoheytingAlgebra.toGeneralizedCoheytingAlgebra.{u2} (Set.{u2} α) (BiheytingAlgebra.toCoheytingAlgebra.{u2} (Set.{u2} α) (BooleanAlgebra.toBiheytingAlgebra.{u2} (Set.{u2} α) (Set.instBooleanAlgebraSet.{u2} α))))))) (BoundedOrder.toOrderBot.{u2} (Set.{u2} α) (Preorder.toLE.{u2} (Set.{u2} α) (PartialOrder.toPreorder.{u2} (Set.{u2} α) (SemilatticeInf.toPartialOrder.{u2} (Set.{u2} α) (Lattice.toSemilatticeInf.{u2} (Set.{u2} α) (GeneralizedCoheytingAlgebra.toLattice.{u2} (Set.{u2} α) (CoheytingAlgebra.toGeneralizedCoheytingAlgebra.{u2} (Set.{u2} α) (BiheytingAlgebra.toCoheytingAlgebra.{u2} (Set.{u2} α) (BooleanAlgebra.toBiheytingAlgebra.{u2} (Set.{u2} α) (Set.instBooleanAlgebraSet.{u2} α))))))))) (BooleanAlgebra.toBoundedOrder.{u2} (Set.{u2} α) (Set.instBooleanAlgebraSet.{u2} α))) (LocalEquiv.source.{u2, u1} α β e) (LocalEquiv.source.{u2, u1} α β e') hs) (Disjoint.symm.{u1} (Set.{u1} β) (SemilatticeInf.toPartialOrder.{u1} (Set.{u1} β) (Lattice.toSemilatticeInf.{u1} (Set.{u1} β) (GeneralizedCoheytingAlgebra.toLattice.{u1} (Set.{u1} β) (CoheytingAlgebra.toGeneralizedCoheytingAlgebra.{u1} (Set.{u1} β) (BiheytingAlgebra.toCoheytingAlgebra.{u1} (Set.{u1} β) (BooleanAlgebra.toBiheytingAlgebra.{u1} (Set.{u1} β) (Set.instBooleanAlgebraSet.{u1} β))))))) (BoundedOrder.toOrderBot.{u1} (Set.{u1} β) (Preorder.toLE.{u1} (Set.{u1} β) (PartialOrder.toPreorder.{u1} (Set.{u1} β) (SemilatticeInf.toPartialOrder.{u1} (Set.{u1} β) (Lattice.toSemilatticeInf.{u1} (Set.{u1} β) (GeneralizedCoheytingAlgebra.toLattice.{u1} (Set.{u1} β) (CoheytingAlgebra.toGeneralizedCoheytingAlgebra.{u1} (Set.{u1} β) (BiheytingAlgebra.toCoheytingAlgebra.{u1} (Set.{u1} β) (BooleanAlgebra.toBiheytingAlgebra.{u1} (Set.{u1} β) (Set.instBooleanAlgebraSet.{u1} β))))))))) (BooleanAlgebra.toBoundedOrder.{u1} (Set.{u1} β) (Set.instBooleanAlgebraSet.{u1} β))) (LocalEquiv.target.{u2, u1} α β e) (LocalEquiv.target.{u2, u1} α β e') ht)))
-Case conversion may be inaccurate. Consider using '#align local_equiv.disjoint_union_eq_piecewise LocalEquiv.disjointUnion_eq_piecewiseₓ'. -/
 theorem disjointUnion_eq_piecewise (e e' : LocalEquiv α β) (hs : Disjoint e.source e'.source)
     (ht : Disjoint e.target e'.target) [∀ x, Decidable (x ∈ e.source)]
     [∀ y, Decidable (y ∈ e.target)] :
@@ -1760,23 +1144,11 @@ theorem refl_toLocalEquiv : (Equiv.refl α).toLocalEquiv = LocalEquiv.refl α :=
 #align equiv.refl_to_local_equiv Equiv.refl_toLocalEquiv
 -/
 
-/- warning: equiv.symm_to_local_equiv -> Equiv.symm_toLocalEquiv is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β), Eq.{max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} β α) (Equiv.toLocalEquiv.{u2, u1} β α (Equiv.symm.{succ u1, succ u2} α β e)) (LocalEquiv.symm.{u1, u2} α β (Equiv.toLocalEquiv.{u1, u2} α β e))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : Equiv.{succ u2, succ u1} α β), Eq.{max (succ u2) (succ u1)} (LocalEquiv.{u1, u2} β α) (Equiv.toLocalEquiv.{u1, u2} β α (Equiv.symm.{succ u2, succ u1} α β e)) (LocalEquiv.symm.{u2, u1} α β (Equiv.toLocalEquiv.{u2, u1} α β e))
-Case conversion may be inaccurate. Consider using '#align equiv.symm_to_local_equiv Equiv.symm_toLocalEquivₓ'. -/
 @[simp, mfld_simps]
 theorem symm_toLocalEquiv : e.symm.toLocalEquiv = e.toLocalEquiv.symm :=
   rfl
 #align equiv.symm_to_local_equiv Equiv.symm_toLocalEquiv
 
-/- warning: equiv.trans_to_local_equiv -> Equiv.trans_toLocalEquiv is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (e : Equiv.{succ u1, succ u2} α β) (e' : Equiv.{succ u2, succ u3} β γ), Eq.{max (succ u1) (succ u3)} (LocalEquiv.{u1, u3} α γ) (Equiv.toLocalEquiv.{u1, u3} α γ (Equiv.trans.{succ u1, succ u2, succ u3} α β γ e e')) (LocalEquiv.trans.{u1, u2, u3} α β γ (Equiv.toLocalEquiv.{u1, u2} α β e) (Equiv.toLocalEquiv.{u2, u3} β γ e'))
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u1}} {γ : Type.{u2}} (e : Equiv.{succ u3, succ u1} α β) (e' : Equiv.{succ u1, succ u2} β γ), Eq.{max (succ u3) (succ u2)} (LocalEquiv.{u3, u2} α γ) (Equiv.toLocalEquiv.{u3, u2} α γ (Equiv.trans.{succ u3, succ u1, succ u2} α β γ e e')) (LocalEquiv.trans.{u3, u1, u2} α β γ (Equiv.toLocalEquiv.{u3, u1} α β e) (Equiv.toLocalEquiv.{u1, u2} β γ e'))
-Case conversion may be inaccurate. Consider using '#align equiv.trans_to_local_equiv Equiv.trans_toLocalEquivₓ'. -/
 @[simp, mfld_simps]
 theorem trans_toLocalEquiv : (e.trans e').toLocalEquiv = e.toLocalEquiv.trans e'.toLocalEquiv :=
   LocalEquiv.ext (fun x => rfl) (fun x => rfl)
Diff
@@ -408,10 +408,7 @@ but is expected to have type
 Case conversion may be inaccurate. Consider using '#align local_equiv.copy_eq LocalEquiv.copy_eqₓ'. -/
 theorem copy_eq (e : LocalEquiv α β) (f : α → β) (hf : ⇑e = f) (g : β → α) (hg : ⇑e.symm = g)
     (s : Set α) (hs : e.source = s) (t : Set β) (ht : e.target = t) :
-    e.copy f hf g hg s hs t ht = e := by
-  substs f g s t
-  cases e
-  rfl
+    e.copy f hf g hg s hs t ht = e := by substs f g s t; cases e; rfl
 #align local_equiv.copy_eq LocalEquiv.copy_eq
 
 #print LocalEquiv.toEquiv /-
@@ -450,9 +447,7 @@ but is expected to have type
   forall {α : Type.{u2}} {β : Type.{u1}} (e : LocalEquiv.{u2, u1} α β), Eq.{max (succ u2) (succ u1)} (LocalEquiv.{u2, u1} α β) (LocalEquiv.symm.{u1, u2} β α (LocalEquiv.symm.{u2, u1} α β e)) e
 Case conversion may be inaccurate. Consider using '#align local_equiv.symm_symm LocalEquiv.symm_symmₓ'. -/
 @[simp, mfld_simps]
-theorem symm_symm : e.symm.symm = e := by
-  cases e
-  rfl
+theorem symm_symm : e.symm.symm = e := by cases e; rfl
 #align local_equiv.symm_symm LocalEquiv.symm_symm
 
 #print LocalEquiv.image_source_eq_target /-
@@ -915,12 +910,8 @@ Case conversion may be inaccurate. Consider using '#align local_equiv.ext LocalE
 protected theorem ext {e e' : LocalEquiv α β} (h : ∀ x, e x = e' x)
     (hsymm : ∀ x, e.symm x = e'.symm x) (hs : e.source = e'.source) : e = e' :=
   by
-  have A : (e : α → β) = e' := by
-    ext x
-    exact h x
-  have B : (e.symm : β → α) = e'.symm := by
-    ext x
-    exact hsymm x
+  have A : (e : α → β) = e' := by ext x; exact h x
+  have B : (e.symm : β → α) = e'.symm := by ext x; exact hsymm x
   have I : e '' e.source = e.target := e.image_source_eq_target
   have I' : e' '' e'.source = e'.target := e'.image_source_eq_target
   rw [A, hs, I'] at I
@@ -1044,10 +1035,8 @@ theorem refl_restr_source (s : Set α) : ((LocalEquiv.refl α).restr s).source =
 
 #print LocalEquiv.refl_restr_target /-
 @[simp, mfld_simps]
-theorem refl_restr_target (s : Set α) : ((LocalEquiv.refl α).restr s).target = s :=
-  by
-  change univ ∩ id ⁻¹' s = s
-  simp
+theorem refl_restr_target (s : Set α) : ((LocalEquiv.refl α).restr s).target = s := by
+  change univ ∩ id ⁻¹' s = s; simp
 #align local_equiv.refl_restr_target LocalEquiv.refl_restr_target
 -/
 
@@ -1288,9 +1277,7 @@ but is expected to have type
 Case conversion may be inaccurate. Consider using '#align local_equiv.trans_refl_restr' LocalEquiv.trans_refl_restr'ₓ'. -/
 theorem trans_refl_restr' (s : Set β) :
     e.trans ((LocalEquiv.refl β).restr s) = e.restr (e.source ∩ e ⁻¹' s) :=
-  (LocalEquiv.ext (fun x => rfl) fun x => rfl) <|
-    by
-    simp [trans_source]
+  (LocalEquiv.ext (fun x => rfl) fun x => rfl) <| by simp [trans_source];
     rw [← inter_assoc, inter_self]
 #align local_equiv.trans_refl_restr' LocalEquiv.trans_refl_restr'
 
@@ -1301,9 +1288,7 @@ but is expected to have type
   forall {α : Type.{u3}} {β : Type.{u1}} {γ : Type.{u2}} (e : LocalEquiv.{u3, u1} α β) (e' : LocalEquiv.{u1, u2} β γ) (s : Set.{u3} α), Eq.{max (succ u3) (succ u2)} (LocalEquiv.{u3, u2} α γ) (LocalEquiv.trans.{u3, u1, u2} α β γ (LocalEquiv.restr.{u3, u1} α β e s) e') (LocalEquiv.restr.{u3, u2} α γ (LocalEquiv.trans.{u3, u1, u2} α β γ e e') s)
 Case conversion may be inaccurate. Consider using '#align local_equiv.restr_trans LocalEquiv.restr_transₓ'. -/
 theorem restr_trans (s : Set α) : (e.restr s).trans e' = (e.trans e').restr s :=
-  (LocalEquiv.ext (fun x => rfl) fun x => rfl) <|
-    by
-    simp [trans_source, inter_comm]
+  (LocalEquiv.ext (fun x => rfl) fun x => rfl) <| by simp [trans_source, inter_comm];
     rwa [inter_assoc]
 #align local_equiv.restr_trans LocalEquiv.restr_trans
 
@@ -1374,13 +1359,9 @@ instance eqOnSourceSetoid : Setoid (LocalEquiv α β)
     where
   R := EqOnSource
   iseqv :=
-    ⟨fun e => by simp [eq_on_source], fun e e' h =>
-      by
-      simp [eq_on_source, h.1.symm]
+    ⟨fun e => by simp [eq_on_source], fun e e' h => by simp [eq_on_source, h.1.symm];
       exact fun x hx => (h.2 hx).symm, fun e e' e'' h h' =>
-      ⟨by rwa [← h'.1, ← h.1], fun x hx => by
-        rw [← h'.2, h.2 hx]
-        rwa [← h.1]⟩⟩
+      ⟨by rwa [← h'.1, ← h.1], fun x hx => by rw [← h'.2, h.2 hx]; rwa [← h.1]⟩⟩
 #align local_equiv.eq_on_source_setoid LocalEquiv.eqOnSourceSetoid
 -/
 
@@ -1552,18 +1533,10 @@ def prod (e : LocalEquiv α β) (e' : LocalEquiv γ δ) : LocalEquiv (α × γ)
   target := e.target ×ˢ e'.target
   toFun p := (e p.1, e' p.2)
   invFun p := (e.symm p.1, e'.symm p.2)
-  map_source' p hp := by
-    simp at hp
-    simp [hp]
-  map_target' p hp := by
-    simp at hp
-    simp [map_target, hp]
-  left_inv' p hp := by
-    simp at hp
-    simp [hp]
-  right_inv' p hp := by
-    simp at hp
-    simp [hp]
+  map_source' p hp := by simp at hp; simp [hp]
+  map_target' p hp := by simp at hp; simp [map_target, hp]
+  left_inv' p hp := by simp at hp; simp [hp]
+  right_inv' p hp := by simp at hp; simp [hp]
 #align local_equiv.prod LocalEquiv.prod
 -/
 
@@ -1635,12 +1608,7 @@ but is expected to have type
 Case conversion may be inaccurate. Consider using '#align local_equiv.refl_prod_refl LocalEquiv.refl_prod_reflₓ'. -/
 @[simp, mfld_simps]
 theorem refl_prod_refl : (LocalEquiv.refl α).Prod (LocalEquiv.refl β) = LocalEquiv.refl (α × β) :=
-  by
-  ext1 ⟨x, y⟩
-  · rfl
-  · rintro ⟨x, y⟩
-    rfl
-  exact univ_prod_univ
+  by ext1 ⟨x, y⟩; · rfl; · rintro ⟨x, y⟩; rfl; exact univ_prod_univ
 #align local_equiv.refl_prod_refl LocalEquiv.refl_prod_refl
 
 /- warning: local_equiv.prod_trans -> LocalEquiv.prod_trans is a dubious translation:
Diff
@@ -115,8 +115,8 @@ def mfld_cfg : SimpsCfg where
 
 namespace Tactic.Interactive
 
-/- ./././Mathport/Syntax/Translate/Expr.lean:334:4: warning: unsupported (TODO): `[tacs] -/
-/- ./././Mathport/Syntax/Translate/Expr.lean:334:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
 -- failed to format: unknown constant 'term.pseudo.antiquot'
 /--
       A very basic tactic to show that sets showing up in manifolds coincide or are included in
@@ -184,11 +184,11 @@ protected def symm : LocalEquiv β α where
 instance : CoeFun (LocalEquiv α β) fun _ => α → β :=
   ⟨LocalEquiv.toFun⟩
 
-#print LocalEquiv.Simps.symmApply /-
+#print LocalEquiv.Simps.symm_apply /-
 /-- See Note [custom simps projection] -/
-def Simps.symmApply (e : LocalEquiv α β) : β → α :=
+def Simps.symm_apply (e : LocalEquiv α β) : β → α :=
   e.symm
-#align local_equiv.simps.symm_apply LocalEquiv.Simps.symmApply
+#align local_equiv.simps.symm_apply LocalEquiv.Simps.symm_apply
 -/
 
 initialize_simps_projections LocalEquiv (toFun → apply, invFun → symm_apply)

Changes in mathlib4

mathlib3
mathlib4
chore: more squeeze_simps arising from linter (#11259)

The squeezing continues! All found by the linter at #11246.

Diff
@@ -566,8 +566,7 @@ protected theorem ext {e e' : PartialEquiv α β} (h : ∀ x, e x = e' x)
   have I' : e' '' e'.source = e'.target := e'.image_source_eq_target
   rw [A, hs, I'] at I
   cases e; cases e'
-  simp [*] at *
-  simp [*]
+  simp_all
 #align local_equiv.ext PartialEquiv.ext
 
 /-- Restricting a partial equivalence to `e.source ∩ s` -/
@@ -898,18 +897,10 @@ def prod (e : PartialEquiv α β) (e' : PartialEquiv γ δ) : PartialEquiv (α 
   target := e.target ×ˢ e'.target
   toFun p := (e p.1, e' p.2)
   invFun p := (e.symm p.1, e'.symm p.2)
-  map_source' p hp := by
-    simp at hp
-    simp [hp]
-  map_target' p hp := by
-    simp at hp
-    simp [map_target, hp]
-  left_inv' p hp := by
-    simp at hp
-    simp [hp]
-  right_inv' p hp := by
-    simp at hp
-    simp [hp]
+  map_source' p hp := by simp_all
+  map_target' p hp := by simp_all
+  left_inv' p hp   := by simp_all
+  right_inv' p hp  := by simp_all
 #align local_equiv.prod PartialEquiv.prod
 
 @[simp, mfld_simps]
chore: Remove ball and bex from lemma names (#10816)

ball for "bounded forall" and bex for "bounded exists" are from experience very confusing abbreviations. This PR renames them to forall_mem and exists_mem in the few Set lemma names that mention them.

Also deprecate ball_image_of_ball, mem_image_elim, mem_image_elim_on since those lemmas are duplicates of the renamed lemmas (apart from argument order and implicitness, which I am also fixing by making the binder in the RHS of forall_mem_image semi-implicit), have obscure names and are completely unused.

Diff
@@ -343,11 +343,11 @@ theorem image_source_eq_target : e '' e.source = e.target :=
 #align local_equiv.image_source_eq_target PartialEquiv.image_source_eq_target
 
 theorem forall_mem_target {p : β → Prop} : (∀ y ∈ e.target, p y) ↔ ∀ x ∈ e.source, p (e x) := by
-  rw [← image_source_eq_target, ball_image_iff]
+  rw [← image_source_eq_target, forall_mem_image]
 #align local_equiv.forall_mem_target PartialEquiv.forall_mem_target
 
 theorem exists_mem_target {p : β → Prop} : (∃ y ∈ e.target, p y) ↔ ∃ x ∈ e.source, p (e x) := by
-  rw [← image_source_eq_target, bex_image_iff]
+  rw [← image_source_eq_target, exists_mem_image]
 #align local_equiv.exists_mem_target PartialEquiv.exists_mem_target
 
 /-- We say that `t : Set β` is an image of `s : Set α` under a partial equivalence if
style: homogenise porting notes (#11145)

Homogenises porting notes via capitalisation and addition of whitespace.

It makes the following changes:

  • converts "--porting note" into "-- Porting note";
  • converts "porting note" into "Porting note".
Diff
@@ -815,7 +815,7 @@ theorem EqOnSource.eqOn {e e' : PartialEquiv α β} (h : e ≈ e') : e.source.Eq
   h.2
 #align local_equiv.eq_on_source.eq_on PartialEquiv.EqOnSource.eqOn
 
---Porting note: A lot of dot notation failures here. Maybe we should not use `≈`
+-- Porting note: A lot of dot notation failures here. Maybe we should not use `≈`
 
 /-- Two equivalent partial equivs have the same target. -/
 theorem EqOnSource.target_eq {e e' : PartialEquiv α β} (h : e ≈ e') : e.target = e'.target := by
feat: add trans assoc type lemmas for (Partial)Equiv and (Partial)Homeomorph (#9506)

Let es denote Equivs and fs denote PartialEquivs. Let > denote Equiv.trans, PartialEquiv.trans, Equiv.transPartialEquiv, or PartialEquiv.transEquiv. We want to simplify expressions like e1 > e2 > f3 > f4 > e5 > e6 to (e1 > e2) > (f3 > f4) > (e5 > e6), so that simp lemmas about Equiv.trans and PartialEquiv.trans may apply. This means adding four lemmas:

  1. e1 > e2 > f3 = (e1 > e2) > f3
  2. (e1 > f2) > f3 = e1 > (f2 > f3)
  3. (1) with e and f flipped
  4. (2) with e and f flipped

The definitions Equiv.transPartialEquiv and PartialEquiv.transEquiv are moved to later in the document, so that they stay together with these lemmas. The argument order of these two definitions has also been reversed so as to match Equiv.trans and PartialEquiv.trans.

The same is done for Homeomorph/PartialHomeomorph.

Diff
@@ -788,39 +788,6 @@ theorem mem_symm_trans_source {e' : PartialEquiv α γ} {x : α} (he : x ∈ e.s
   ⟨e.mapsTo he, by rwa [mem_preimage, PartialEquiv.symm_symm, e.left_inv he]⟩
 #align local_equiv.mem_symm_trans_source PartialEquiv.mem_symm_trans_source
 
-/-- Postcompose a partial equivalence with an equivalence.
-We modify the source and target to have better definitional behavior. -/
-@[simps!]
-def transEquiv (e' : β ≃ γ) : PartialEquiv α γ :=
-  (e.trans e'.toPartialEquiv).copy _ rfl _ rfl e.source (inter_univ _) (e'.symm ⁻¹' e.target)
-    (univ_inter _)
-#align local_equiv.trans_equiv PartialEquiv.transEquiv
-#align local_equiv.trans_equiv_source PartialEquiv.transEquiv_source
-#align local_equiv.trans_equiv_apply PartialEquiv.transEquiv_apply
-#align local_equiv.trans_equiv_target PartialEquiv.transEquiv_target
-#align local_equiv.trans_equiv_symm_apply PartialEquiv.transEquiv_symm_apply
-
-theorem transEquiv_eq_trans (e' : β ≃ γ) : e.transEquiv e' = e.trans e'.toPartialEquiv :=
-  copy_eq ..
-#align local_equiv.trans_equiv_eq_trans PartialEquiv.transEquiv_eq_trans
-
-/-- Precompose a partial equivalence with an equivalence.
-We modify the source and target to have better definitional behavior. -/
-@[simps!]
-def _root_.Equiv.transPartialEquiv (e : α ≃ β) : PartialEquiv α γ :=
-  (e.toPartialEquiv.trans e').copy _ rfl _ rfl (e ⁻¹' e'.source) (univ_inter _) e'.target
-    (inter_univ _)
-#align equiv.trans_local_equiv Equiv.transPartialEquiv
-#align equiv.trans_local_equiv_target Equiv.transPartialEquiv_target
-#align equiv.trans_local_equiv_apply Equiv.transPartialEquiv_apply
-#align equiv.trans_local_equiv_source Equiv.transPartialEquiv_source
-#align equiv.trans_local_equiv_symm_apply Equiv.transPartialEquiv_symm_apply
-
-theorem _root_.Equiv.transPartialEquiv_eq_trans (e : α ≃ β) :
-    e.transPartialEquiv e' = e.toPartialEquiv.trans e' :=
-  copy_eq ..
-#align equiv.trans_local_equiv_eq_trans Equiv.transPartialEquiv_eq_trans
-
 /-- `EqOnSource e e'` means that `e` and `e'` have the same source, and coincide there. Then `e`
 and `e'` should really be considered the same partial equiv. -/
 def EqOnSource (e e' : PartialEquiv α β) : Prop :=
@@ -907,7 +874,7 @@ theorem self_trans_symm : e.trans e.symm ≈ ofSet e.source := by
 
 /-- Composition of the inverse of a partial equivalence and this partial equivalence is equivalent
 to the restriction of the identity to the target. -/
-theorem symm_trans_self : e.symm.trans e ≈ PartialEquiv.ofSet e.target :=
+theorem symm_trans_self : e.symm.trans e ≈ ofSet e.target :=
   self_trans_symm e.symm
 #align local_equiv.symm_trans_self PartialEquiv.symm_trans_self
 
@@ -1141,4 +1108,62 @@ theorem trans_toPartialEquiv :
     (by simp [PartialEquiv.trans_source, Equiv.toPartialEquiv])
 #align equiv.trans_to_local_equiv Equiv.trans_toPartialEquiv
 
+/-- Precompose a partial equivalence with an equivalence.
+We modify the source and target to have better definitional behavior. -/
+@[simps!]
+def transPartialEquiv (e : α ≃ β) (f' : PartialEquiv β γ) : PartialEquiv α γ :=
+  (e.toPartialEquiv.trans f').copy _ rfl _ rfl (e ⁻¹' f'.source) (univ_inter _) f'.target
+    (inter_univ _)
+#align equiv.trans_local_equiv Equiv.transPartialEquiv
+#align equiv.trans_local_equiv_target Equiv.transPartialEquiv_target
+#align equiv.trans_local_equiv_apply Equiv.transPartialEquiv_apply
+#align equiv.trans_local_equiv_source Equiv.transPartialEquiv_source
+#align equiv.trans_local_equiv_symm_apply Equiv.transPartialEquiv_symm_apply
+
+theorem transPartialEquiv_eq_trans (e : α ≃ β) (f' : PartialEquiv β γ) :
+    e.transPartialEquiv f' = e.toPartialEquiv.trans f' :=
+  PartialEquiv.copy_eq ..
+#align equiv.trans_local_equiv_eq_trans Equiv.transPartialEquiv_eq_trans
+
+@[simp, mfld_simps]
+theorem transPartialEquiv_trans (e : α ≃ β) (f' : PartialEquiv β γ) (f'' : PartialEquiv γ δ) :
+    (e.transPartialEquiv f').trans f'' = e.transPartialEquiv (f'.trans f'') := by
+  simp only [transPartialEquiv_eq_trans, PartialEquiv.trans_assoc]
+
+@[simp, mfld_simps]
+theorem trans_transPartialEquiv (e : α ≃ β) (e' : β ≃ γ) (f'' : PartialEquiv γ δ) :
+    (e.trans e').transPartialEquiv f'' = e.transPartialEquiv (e'.transPartialEquiv f'') := by
+  simp only [transPartialEquiv_eq_trans, PartialEquiv.trans_assoc, trans_toPartialEquiv]
+
 end Equiv
+
+namespace PartialEquiv
+
+/-- Postcompose a partial equivalence with an equivalence.
+We modify the source and target to have better definitional behavior. -/
+@[simps!]
+def transEquiv (e : PartialEquiv α β) (f' : β ≃ γ) : PartialEquiv α γ :=
+  (e.trans f'.toPartialEquiv).copy _ rfl _ rfl e.source (inter_univ _) (f'.symm ⁻¹' e.target)
+    (univ_inter _)
+#align local_equiv.trans_equiv PartialEquiv.transEquiv
+#align local_equiv.trans_equiv_source PartialEquiv.transEquiv_source
+#align local_equiv.trans_equiv_apply PartialEquiv.transEquiv_apply
+#align local_equiv.trans_equiv_target PartialEquiv.transEquiv_target
+#align local_equiv.trans_equiv_symm_apply PartialEquiv.transEquiv_symm_apply
+
+theorem transEquiv_eq_trans (e : PartialEquiv α β) (e' : β ≃ γ) :
+    e.transEquiv e' = e.trans e'.toPartialEquiv :=
+  copy_eq ..
+#align local_equiv.trans_equiv_eq_trans PartialEquiv.transEquiv_eq_trans
+
+@[simp, mfld_simps]
+theorem transEquiv_transEquiv (e : PartialEquiv α β) (f' : β ≃ γ) (f'' : γ ≃ δ) :
+    (e.transEquiv f').transEquiv f'' = e.transEquiv (f'.trans f'') := by
+  simp only [transEquiv_eq_trans, trans_assoc, Equiv.trans_toPartialEquiv]
+
+@[simp, mfld_simps]
+theorem trans_transEquiv (e : PartialEquiv α β) (e' : PartialEquiv β γ) (f'' : γ ≃ δ) :
+    (e.trans e').transEquiv f'' = e.trans (e'.transEquiv f'') := by
+  simp only [transEquiv_eq_trans, trans_assoc, Equiv.trans_toPartialEquiv]
+
+end PartialEquiv
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
@@ -148,6 +148,7 @@ instance [Inhabited α] [Inhabited β] : Inhabited (PartialEquiv α β) :=
       eqOn_empty _ _⟩⟩
 
 /-- The inverse of a partial equivalence -/
+@[symm]
 protected def symm : PartialEquiv β α where
   toFun := e.invFun
   invFun := e.toFun
@@ -689,6 +690,7 @@ protected def trans' (e' : PartialEquiv β γ) (h : e.target = e'.source) : Part
 
 /-- Composing two partial equivs, by restricting to the maximal domain where their composition
 is well defined. -/
+@[trans]
 protected def trans : PartialEquiv α γ :=
   PartialEquiv.trans' (e.symm.restr e'.source).symm (e'.restr e.target) (inter_comm _ _)
 #align local_equiv.trans PartialEquiv.trans
@@ -896,18 +898,18 @@ theorem EqOnSource.source_inter_preimage_eq {e e' : PartialEquiv α β} (he : e
 
 /-- Composition of a partial equivlance and its inverse is equivalent to
 the restriction of the identity to the source. -/
-theorem trans_self_symm : e.trans e.symm ≈ ofSet e.source := by
+theorem self_trans_symm : e.trans e.symm ≈ ofSet e.source := by
   have A : (e.trans e.symm).source = e.source := by mfld_set_tac
   refine' ⟨by rw [A, ofSet_source], fun x hx => _⟩
   rw [A] at hx
   simp only [hx, mfld_simps]
-#align local_equiv.trans_self_symm PartialEquiv.trans_self_symm
+#align local_equiv.self_trans_symm PartialEquiv.self_trans_symm
 
 /-- Composition of the inverse of a partial equivalence and this partial equivalence is equivalent
 to the restriction of the identity to the target. -/
-theorem trans_symm_self : e.symm.trans e ≈ PartialEquiv.ofSet e.target :=
-  trans_self_symm e.symm
-#align local_equiv.trans_symm_self PartialEquiv.trans_symm_self
+theorem symm_trans_self : e.symm.trans e ≈ PartialEquiv.ofSet e.target :=
+  self_trans_symm e.symm
+#align local_equiv.symm_trans_self PartialEquiv.symm_trans_self
 
 /-- Two equivalent partial equivs are equal when the source and target are `univ`. -/
 theorem eq_of_eqOnSource_univ (e e' : PartialEquiv α β) (h : e ≈ e') (s : e.source = univ)
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
@@ -11,16 +11,16 @@ import Mathlib.Tactic.Attr.Core
 #align_import logic.equiv.local_equiv from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4"
 
 /-!
-# Local equivalences
+# Partial equivalences
 
 This files defines equivalences between subsets of given types.
-An element `e` of `LocalEquiv α β` is made of two maps `e.toFun` and `e.invFun` respectively
+An element `e` of `PartialEquiv α β` is made of two maps `e.toFun` and `e.invFun` respectively
 from α to β and from β to α (just like equivs), which are inverse to each other on the subsets
 `e.source` and `e.target` of respectively α and β.
 
 They are designed in particular to define charts on manifolds.
 
-The main functionality is `e.trans f`, which composes the two local equivalences by restricting
+The main functionality is `e.trans f`, which composes the two partial equivalences by restricting
 the source and target to the maximal set where the composition makes sense.
 
 As for equivs, we register a coercion to functions and use it in our simp normal form: we write
@@ -28,19 +28,19 @@ As for equivs, we register a coercion to functions and use it in our simp normal
 
 ## Main definitions
 
-* `Equiv.toLocalEquiv`: associating a local equiv to an equiv, with source = target = univ
-* `LocalEquiv.symm`: the inverse of a local equiv
-* `LocalEquiv.trans`: the composition of two local equivs
-* `LocalEquiv.refl`: the identity local equiv
-* `LocalEquiv.ofSet`: the identity on a set `s`
-* `EqOnSource`: equivalence relation describing the "right" notion of equality for local
-  equivs (see below in implementation notes)
+* `Equiv.toPartialEquiv`: associating a partial equiv to an equiv, with source = target = univ
+* `PartialEquiv.symm`: the inverse of a partial equivalence
+* `PartialEquiv.trans`: the composition of two partial equivalences
+* `PartialEquiv.refl`: the identity partial equivalence
+* `PartialEquiv.ofSet`: the identity on a set `s`
+* `EqOnSource`: equivalence relation describing the "right" notion of equality for partial
+  equivalences (see below in implementation notes)
 
 ## Implementation notes
 
-There are at least three possible implementations of local equivalences:
+There are at least three possible implementations of partial equivalences:
 * equivs on subtypes
-* pairs of functions taking values in `Option α` and `Option β`, equal to none where the local
+* pairs of functions taking values in `Option α` and `Option β`, equal to none where the partial
 equivalence is not defined
 * pairs of functions defined everywhere, keeping the source and target as additional data
 
@@ -53,25 +53,25 @@ instance).
 the domain is restricted automatically). These are implemented in `PEquiv.lean`. For manifolds,
 where one wants to discuss thoroughly the smoothness of the maps, this creates however a lot of
 overhead as one would need to extend all classes of smoothness to option-valued maps.
-* The `LocalEquiv` version as explained above is easier to use for manifolds. The drawback is that
+* The `PartialEquiv` version as explained above is easier to use for manifolds. The drawback is that
 there is extra useless data (the values of `toFun` and `invFun` outside of `source` and `target`).
-In particular, the equality notion between local equivs is not "the right one", i.e., coinciding
-source and target and equality there. Moreover, there are no local equivs in this sense between
+In particular, the equality notion between partial equivs is not "the right one", i.e., coinciding
+source and target and equality there. Moreover, there are no partial equivs in this sense between
 an empty type and a nonempty type. Since empty types are not that useful, and since one almost never
-needs to talk about equal local equivs, this is not an issue in practice.
+needs to talk about equal partial equivs, this is not an issue in practice.
 Still, we introduce an equivalence relation `EqOnSource` that captures this right notion of
 equality, and show that many properties are invariant under this equivalence relation.
 
 ### Local coding conventions
 
-If a lemma deals with the intersection of a set with either source or target of a `LocalEquiv`,
+If a lemma deals with the intersection of a set with either source or target of a `PartialEquiv`,
 then it should use `e.source ∩ s` or `e.target ∩ t`, not `s ∩ e.source` or `t ∩ e.target`.
 
 -/
 open Lean Meta Elab Tactic
 
 /-! Implementation of the `mfld_set_tac` tactic for working with the domains of partially-defined
-functions (`LocalEquiv`, `PartialHomeomorph`, etc).
+functions (`PartialEquiv`, `PartialHomeomorph`, etc).
 
 This is in a separate file from `Mathlib.Logic.Equiv.MfldSimpsAttr` because attributes need a new
 file to become functional.
@@ -117,38 +117,38 @@ variable {α : Type*} {β : Type*} {γ : Type*} {δ : Type*}
 (global) maps `toFun : α → β` and `invFun : β → α` map `source` to `target` and conversely, and are
 inverse to each other there. The values of `toFun` outside of `source` and of `invFun` outside of
 `target` are irrelevant. -/
-structure LocalEquiv (α : Type*) (β : Type*) where
-  /-- The global function which has a local inverse. Its value outside of the `source` subset is
+structure PartialEquiv (α : Type*) (β : Type*) where
+  /-- The global function which has a partial inverse. Its value outside of the `source` subset is
   irrelevant. -/
   toFun : α → β
-  /-- The local inverse to `toFun`. Its value outside of the `target` subset is irrelevant. -/
+  /-- The partial inverse to `toFun`. Its value outside of the `target` subset is irrelevant. -/
   invFun : β → α
-  /-- The domain of the local equivalence. -/
+  /-- The domain of the partial equivalence. -/
   source : Set α
-  /-- The codomain of the local equivalence. -/
+  /-- The codomain of the partial equivalence. -/
   target : Set β
   /-- The proposition that elements of `source` are mapped to elements of `target`. -/
   map_source' : ∀ ⦃x⦄, x ∈ source → toFun x ∈ target
   /-- The proposition that elements of `target` are mapped to elements of `source`. -/
   map_target' : ∀ ⦃x⦄, x ∈ target → invFun x ∈ source
-  /-- The proposition that `invFun` is a local left-inverse of `toFun` on `source`. -/
+  /-- The proposition that `invFun` is a left-inverse of `toFun` on `source`. -/
   left_inv' : ∀ ⦃x⦄, x ∈ source → invFun (toFun x) = x
-  /-- The proposition that `invFun` is a local right-inverse of `toFun` on `target`. -/
+  /-- The proposition that `invFun` is a right-inverse of `toFun` on `target`. -/
   right_inv' : ∀ ⦃x⦄, x ∈ target → toFun (invFun x) = x
-#align local_equiv LocalEquiv
+#align local_equiv PartialEquiv
 
-attribute [coe] LocalEquiv.toFun
+attribute [coe] PartialEquiv.toFun
 
-namespace LocalEquiv
+namespace PartialEquiv
 
-variable (e : LocalEquiv α β) (e' : LocalEquiv β γ)
+variable (e : PartialEquiv α β) (e' : PartialEquiv β γ)
 
-instance [Inhabited α] [Inhabited β] : Inhabited (LocalEquiv α β) :=
+instance [Inhabited α] [Inhabited β] : Inhabited (PartialEquiv α β) :=
   ⟨⟨const α default, const β default, ∅, ∅, mapsTo_empty _ _, mapsTo_empty _ _, eqOn_empty _ _,
       eqOn_empty _ _⟩⟩
 
-/-- The inverse of a local equiv -/
-protected def symm : LocalEquiv β α where
+/-- The inverse of a partial equivalence -/
+protected def symm : PartialEquiv β α where
   toFun := e.invFun
   invFun := e.toFun
   source := e.target
@@ -157,46 +157,46 @@ protected def symm : LocalEquiv β α where
   map_target' := e.map_source'
   left_inv' := e.right_inv'
   right_inv' := e.left_inv'
-#align local_equiv.symm LocalEquiv.symm
+#align local_equiv.symm PartialEquiv.symm
 
-instance : CoeFun (LocalEquiv α β) fun _ => α → β :=
-  ⟨LocalEquiv.toFun⟩
+instance : CoeFun (PartialEquiv α β) fun _ => α → β :=
+  ⟨PartialEquiv.toFun⟩
 
 /-- See Note [custom simps projection] -/
-def Simps.symm_apply (e : LocalEquiv α β) : β → α :=
+def Simps.symm_apply (e : PartialEquiv α β) : β → α :=
   e.symm
-#align local_equiv.simps.symm_apply LocalEquiv.Simps.symm_apply
+#align local_equiv.simps.symm_apply PartialEquiv.Simps.symm_apply
 
-initialize_simps_projections LocalEquiv (toFun → apply, invFun → symm_apply)
+initialize_simps_projections PartialEquiv (toFun → apply, invFun → symm_apply)
 
 -- Porting note: this can be proven with `dsimp only`
 -- @[simp, mfld_simps]
--- theorem coe_mk (f : α → β) (g s t ml mr il ir) : (LocalEquiv.mk f g s t ml mr il ir : α → β) = f
--- := by dsimp only
--- #align local_equiv.coe_mk LocalEquiv.coe_mk
+-- theorem coe_mk (f : α → β) (g s t ml mr il ir) :
+--  (PartialEquiv.mk f g s t ml mr il ir : α → β) = f := by dsimp only
+-- #align local_equiv.coe_mk PartialEquiv.coe_mk
 #noalign local_equiv.coe_mk
 
 @[simp, mfld_simps]
 theorem coe_symm_mk (f : α → β) (g s t ml mr il ir) :
-    ((LocalEquiv.mk f g s t ml mr il ir).symm : β → α) = g :=
+    ((PartialEquiv.mk f g s t ml mr il ir).symm : β → α) = g :=
   rfl
-#align local_equiv.coe_symm_mk LocalEquiv.coe_symm_mk
+#align local_equiv.coe_symm_mk PartialEquiv.coe_symm_mk
 
 -- Porting note: this is now a syntactic tautology
 -- @[simp, mfld_simps]
 -- theorem toFun_as_coe : e.toFun = e := rfl
--- #align local_equiv.to_fun_as_coe LocalEquiv.toFun_as_coe
+-- #align local_equiv.to_fun_as_coe PartialEquiv.toFun_as_coe
 #noalign local_equiv.to_fun_as_coe
 
 @[simp, mfld_simps]
 theorem invFun_as_coe : e.invFun = e.symm :=
   rfl
-#align local_equiv.inv_fun_as_coe LocalEquiv.invFun_as_coe
+#align local_equiv.inv_fun_as_coe PartialEquiv.invFun_as_coe
 
 @[simp, mfld_simps]
 theorem map_source {x : α} (h : x ∈ e.source) : e x ∈ e.target :=
   e.map_source' h
-#align local_equiv.map_source LocalEquiv.map_source
+#align local_equiv.map_source PartialEquiv.map_source
 
 /-- Variant of `e.map_source` and `map_source'`, stated for images of subsets of `source`. -/
 lemma map_source'' : e '' e.source ⊆ e.target :=
@@ -205,57 +205,57 @@ lemma map_source'' : e '' e.source ⊆ e.target :=
 @[simp, mfld_simps]
 theorem map_target {x : β} (h : x ∈ e.target) : e.symm x ∈ e.source :=
   e.map_target' h
-#align local_equiv.map_target LocalEquiv.map_target
+#align local_equiv.map_target PartialEquiv.map_target
 
 @[simp, mfld_simps]
 theorem left_inv {x : α} (h : x ∈ e.source) : e.symm (e x) = x :=
   e.left_inv' h
-#align local_equiv.left_inv LocalEquiv.left_inv
+#align local_equiv.left_inv PartialEquiv.left_inv
 
 @[simp, mfld_simps]
 theorem right_inv {x : β} (h : x ∈ e.target) : e (e.symm x) = x :=
   e.right_inv' h
-#align local_equiv.right_inv LocalEquiv.right_inv
+#align local_equiv.right_inv PartialEquiv.right_inv
 
 theorem eq_symm_apply {x : α} {y : β} (hx : x ∈ e.source) (hy : y ∈ e.target) :
     x = e.symm y ↔ e x = y :=
   ⟨fun h => by rw [← e.right_inv hy, h], fun h => by rw [← e.left_inv hx, h]⟩
-#align local_equiv.eq_symm_apply LocalEquiv.eq_symm_apply
+#align local_equiv.eq_symm_apply PartialEquiv.eq_symm_apply
 
 protected theorem mapsTo : MapsTo e e.source e.target := fun _ => e.map_source
-#align local_equiv.maps_to LocalEquiv.mapsTo
+#align local_equiv.maps_to PartialEquiv.mapsTo
 
 theorem symm_mapsTo : MapsTo e.symm e.target e.source :=
   e.symm.mapsTo
-#align local_equiv.symm_maps_to LocalEquiv.symm_mapsTo
+#align local_equiv.symm_maps_to PartialEquiv.symm_mapsTo
 
 protected theorem leftInvOn : LeftInvOn e.symm e e.source := fun _ => e.left_inv
-#align local_equiv.left_inv_on LocalEquiv.leftInvOn
+#align local_equiv.left_inv_on PartialEquiv.leftInvOn
 
 protected theorem rightInvOn : RightInvOn e.symm e e.target := fun _ => e.right_inv
-#align local_equiv.right_inv_on LocalEquiv.rightInvOn
+#align local_equiv.right_inv_on PartialEquiv.rightInvOn
 
 protected theorem invOn : InvOn e.symm e e.source e.target :=
   ⟨e.leftInvOn, e.rightInvOn⟩
-#align local_equiv.inv_on LocalEquiv.invOn
+#align local_equiv.inv_on PartialEquiv.invOn
 
 protected theorem injOn : InjOn e e.source :=
   e.leftInvOn.injOn
-#align local_equiv.inj_on LocalEquiv.injOn
+#align local_equiv.inj_on PartialEquiv.injOn
 
 protected theorem bijOn : BijOn e e.source e.target :=
   e.invOn.bijOn e.mapsTo e.symm_mapsTo
-#align local_equiv.bij_on LocalEquiv.bijOn
+#align local_equiv.bij_on PartialEquiv.bijOn
 
 protected theorem surjOn : SurjOn e e.source e.target :=
   e.bijOn.surjOn
-#align local_equiv.surj_on LocalEquiv.surjOn
+#align local_equiv.surj_on PartialEquiv.surjOn
 
-/-- Interpret an `Equiv` as a `LocalEquiv` by restricting it to `s` in the domain
+/-- Interpret an `Equiv` as a `PartialEquiv` by restricting it to `s` in the domain
 and to `t` in the codomain. -/
 @[simps (config := .asFn)]
-def _root_.Equiv.toLocalEquivOfImageEq (e : α ≃ β) (s : Set α) (t : Set β) (h : e '' s = t) :
-    LocalEquiv α β where
+def _root_.Equiv.toPartialEquivOfImageEq (e : α ≃ β) (s : Set α) (t : Set β) (h : e '' s = t) :
+    PartialEquiv α β where
   toFun := e
   invFun := e.symm
   source := s
@@ -268,25 +268,25 @@ def _root_.Equiv.toLocalEquivOfImageEq (e : α ≃ β) (s : Set α) (t : Set β)
   left_inv' x _ := e.symm_apply_apply x
   right_inv' x _ := e.apply_symm_apply x
 
-/-- Associate a `LocalEquiv` to an `Equiv`. -/
+/-- Associate a `PartialEquiv` to an `Equiv`. -/
 @[simps! (config := mfld_cfg)]
-def _root_.Equiv.toLocalEquiv (e : α ≃ β) : LocalEquiv α β :=
-  e.toLocalEquivOfImageEq univ univ <| by rw [image_univ, e.surjective.range_eq]
-#align equiv.to_local_equiv Equiv.toLocalEquiv
-#align equiv.to_local_equiv_symm_apply Equiv.toLocalEquiv_symm_apply
-#align equiv.to_local_equiv_target Equiv.toLocalEquiv_target
-#align equiv.to_local_equiv_apply Equiv.toLocalEquiv_apply
-#align equiv.to_local_equiv_source Equiv.toLocalEquiv_source
-
-instance inhabitedOfEmpty [IsEmpty α] [IsEmpty β] : Inhabited (LocalEquiv α β) :=
-  ⟨((Equiv.equivEmpty α).trans (Equiv.equivEmpty β).symm).toLocalEquiv⟩
-#align local_equiv.inhabited_of_empty LocalEquiv.inhabitedOfEmpty
-
-/-- Create a copy of a `LocalEquiv` providing better definitional equalities. -/
+def _root_.Equiv.toPartialEquiv (e : α ≃ β) : PartialEquiv α β :=
+  e.toPartialEquivOfImageEq univ univ <| by rw [image_univ, e.surjective.range_eq]
+#align equiv.to_local_equiv Equiv.toPartialEquiv
+#align equiv.to_local_equiv_symm_apply Equiv.toPartialEquiv_symm_apply
+#align equiv.to_local_equiv_target Equiv.toPartialEquiv_target
+#align equiv.to_local_equiv_apply Equiv.toPartialEquiv_apply
+#align equiv.to_local_equiv_source Equiv.toPartialEquiv_source
+
+instance inhabitedOfEmpty [IsEmpty α] [IsEmpty β] : Inhabited (PartialEquiv α β) :=
+  ⟨((Equiv.equivEmpty α).trans (Equiv.equivEmpty β).symm).toPartialEquiv⟩
+#align local_equiv.inhabited_of_empty PartialEquiv.inhabitedOfEmpty
+
+/-- Create a copy of a `PartialEquiv` providing better definitional equalities. -/
 @[simps (config := .asFn)]
-def copy (e : LocalEquiv α β) (f : α → β) (hf : ⇑e = f) (g : β → α) (hg : ⇑e.symm = g) (s : Set α)
+def copy (e : PartialEquiv α β) (f : α → β) (hf : ⇑e = f) (g : β → α) (hg : ⇑e.symm = g) (s : Set α)
     (hs : e.source = s) (t : Set β) (ht : e.target = t) :
-    LocalEquiv α β where
+    PartialEquiv α β where
   toFun := f
   invFun := g
   source := s
@@ -295,60 +295,61 @@ def copy (e : LocalEquiv α β) (f : α → β) (hf : ⇑e = f) (g : β → α)
   map_target' _ := hs ▸ ht ▸ hg ▸ e.map_target
   left_inv' _ := hs ▸ hf ▸ hg ▸ e.left_inv
   right_inv' _ := ht ▸ hf ▸ hg ▸ e.right_inv
-#align local_equiv.copy LocalEquiv.copy
-#align local_equiv.copy_source LocalEquiv.copy_source
-#align local_equiv.copy_apply LocalEquiv.copy_apply
-#align local_equiv.copy_symm_apply LocalEquiv.copy_symm_apply
-#align local_equiv.copy_target LocalEquiv.copy_target
+#align local_equiv.copy PartialEquiv.copy
+#align local_equiv.copy_source PartialEquiv.copy_source
+#align local_equiv.copy_apply PartialEquiv.copy_apply
+#align local_equiv.copy_symm_apply PartialEquiv.copy_symm_apply
+#align local_equiv.copy_target PartialEquiv.copy_target
 
-theorem copy_eq (e : LocalEquiv α β) (f : α → β) (hf : ⇑e = f) (g : β → α) (hg : ⇑e.symm = g)
+theorem copy_eq (e : PartialEquiv α β) (f : α → β) (hf : ⇑e = f) (g : β → α) (hg : ⇑e.symm = g)
     (s : Set α) (hs : e.source = s) (t : Set β) (ht : e.target = t) :
     e.copy f hf g hg s hs t ht = e := by
   substs f g s t
   cases e
   rfl
-#align local_equiv.copy_eq LocalEquiv.copy_eq
+#align local_equiv.copy_eq PartialEquiv.copy_eq
 
-/-- Associate to a `LocalEquiv` an `Equiv` between the source and the target. -/
+/-- Associate to a `PartialEquiv` an `Equiv` between the source and the target. -/
 protected def toEquiv : e.source ≃ e.target where
   toFun x := ⟨e x, e.map_source x.mem⟩
   invFun y := ⟨e.symm y, e.map_target y.mem⟩
   left_inv := fun ⟨_, hx⟩ => Subtype.eq <| e.left_inv hx
   right_inv := fun ⟨_, hy⟩ => Subtype.eq <| e.right_inv hy
-#align local_equiv.to_equiv LocalEquiv.toEquiv
+#align local_equiv.to_equiv PartialEquiv.toEquiv
 
 @[simp, mfld_simps]
 theorem symm_source : e.symm.source = e.target :=
   rfl
-#align local_equiv.symm_source LocalEquiv.symm_source
+#align local_equiv.symm_source PartialEquiv.symm_source
 
 @[simp, mfld_simps]
 theorem symm_target : e.symm.target = e.source :=
   rfl
-#align local_equiv.symm_target LocalEquiv.symm_target
+#align local_equiv.symm_target PartialEquiv.symm_target
 
 @[simp, mfld_simps]
 theorem symm_symm : e.symm.symm = e := by
   cases e
   rfl
-#align local_equiv.symm_symm LocalEquiv.symm_symm
+#align local_equiv.symm_symm PartialEquiv.symm_symm
 
-theorem symm_bijective : Function.Bijective (LocalEquiv.symm : LocalEquiv α β → LocalEquiv β α) :=
+theorem symm_bijective :
+    Function.Bijective (PartialEquiv.symm : PartialEquiv α β → PartialEquiv β α) :=
   Function.bijective_iff_has_inverse.mpr ⟨_, symm_symm, symm_symm⟩
 
 theorem image_source_eq_target : e '' e.source = e.target :=
   e.bijOn.image_eq
-#align local_equiv.image_source_eq_target LocalEquiv.image_source_eq_target
+#align local_equiv.image_source_eq_target PartialEquiv.image_source_eq_target
 
 theorem forall_mem_target {p : β → Prop} : (∀ y ∈ e.target, p y) ↔ ∀ x ∈ e.source, p (e x) := by
   rw [← image_source_eq_target, ball_image_iff]
-#align local_equiv.forall_mem_target LocalEquiv.forall_mem_target
+#align local_equiv.forall_mem_target PartialEquiv.forall_mem_target
 
 theorem exists_mem_target {p : β → Prop} : (∃ y ∈ e.target, p y) ↔ ∃ x ∈ e.source, p (e x) := by
   rw [← image_source_eq_target, bex_image_iff]
-#align local_equiv.exists_mem_target LocalEquiv.exists_mem_target
+#align local_equiv.exists_mem_target PartialEquiv.exists_mem_target
 
-/-- We say that `t : Set β` is an image of `s : Set α` under a local equivalence if
+/-- We say that `t : Set β` is an image of `s : Set α` under a partial equivalence if
 any of the following equivalent conditions hold:
 
 * `e '' (e.source ∩ s) = e.target ∩ t`;
@@ -357,7 +358,7 @@ any of the following equivalent conditions hold:
 -/
 def IsImage (s : Set α) (t : Set β) : Prop :=
   ∀ ⦃x⦄, x ∈ e.source → (e x ∈ t ↔ x ∈ s)
-#align local_equiv.is_image LocalEquiv.IsImage
+#align local_equiv.is_image PartialEquiv.IsImage
 
 namespace IsImage
 
@@ -365,32 +366,32 @@ variable {e} {s : Set α} {t : Set β} {x : α} {y : β}
 
 theorem apply_mem_iff (h : e.IsImage s t) (hx : x ∈ e.source) : e x ∈ t ↔ x ∈ s :=
   h hx
-#align local_equiv.is_image.apply_mem_iff LocalEquiv.IsImage.apply_mem_iff
+#align local_equiv.is_image.apply_mem_iff PartialEquiv.IsImage.apply_mem_iff
 
 theorem symm_apply_mem_iff (h : e.IsImage s t) : ∀ ⦃y⦄, y ∈ e.target → (e.symm y ∈ s ↔ y ∈ t) :=
   e.forall_mem_target.mpr fun x hx => by rw [e.left_inv hx, h hx]
-#align local_equiv.is_image.symm_apply_mem_iff LocalEquiv.IsImage.symm_apply_mem_iff
+#align local_equiv.is_image.symm_apply_mem_iff PartialEquiv.IsImage.symm_apply_mem_iff
 
 protected theorem symm (h : e.IsImage s t) : e.symm.IsImage t s :=
   h.symm_apply_mem_iff
-#align local_equiv.is_image.symm LocalEquiv.IsImage.symm
+#align local_equiv.is_image.symm PartialEquiv.IsImage.symm
 
 @[simp]
 theorem symm_iff : e.symm.IsImage t s ↔ e.IsImage s t :=
   ⟨fun h => h.symm, fun h => h.symm⟩
-#align local_equiv.is_image.symm_iff LocalEquiv.IsImage.symm_iff
+#align local_equiv.is_image.symm_iff PartialEquiv.IsImage.symm_iff
 
 protected theorem mapsTo (h : e.IsImage s t) : MapsTo e (e.source ∩ s) (e.target ∩ t) :=
   fun _ hx => ⟨e.mapsTo hx.1, (h hx.1).2 hx.2⟩
-#align local_equiv.is_image.maps_to LocalEquiv.IsImage.mapsTo
+#align local_equiv.is_image.maps_to PartialEquiv.IsImage.mapsTo
 
 theorem symm_mapsTo (h : e.IsImage s t) : MapsTo e.symm (e.target ∩ t) (e.source ∩ s) :=
   h.symm.mapsTo
-#align local_equiv.is_image.symm_maps_to LocalEquiv.IsImage.symm_mapsTo
+#align local_equiv.is_image.symm_maps_to PartialEquiv.IsImage.symm_mapsTo
 
-/-- Restrict a `LocalEquiv` to a pair of corresponding sets. -/
+/-- Restrict a `PartialEquiv` to a pair of corresponding sets. -/
 @[simps (config := .asFn)]
-def restr (h : e.IsImage s t) : LocalEquiv α β where
+def restr (h : e.IsImage s t) : PartialEquiv α β where
   toFun := e
   invFun := e.symm
   source := e.source ∩ s
@@ -399,160 +400,160 @@ def restr (h : e.IsImage s t) : LocalEquiv α β where
   map_target' := h.symm_mapsTo
   left_inv' := e.leftInvOn.mono (inter_subset_left _ _)
   right_inv' := e.rightInvOn.mono (inter_subset_left _ _)
-#align local_equiv.is_image.restr LocalEquiv.IsImage.restr
-#align local_equiv.is_image.restr_apply LocalEquiv.IsImage.restr_apply
-#align local_equiv.is_image.restr_source LocalEquiv.IsImage.restr_source
-#align local_equiv.is_image.restr_target LocalEquiv.IsImage.restr_target
-#align local_equiv.is_image.restr_symm_apply LocalEquiv.IsImage.restr_symm_apply
+#align local_equiv.is_image.restr PartialEquiv.IsImage.restr
+#align local_equiv.is_image.restr_apply PartialEquiv.IsImage.restr_apply
+#align local_equiv.is_image.restr_source PartialEquiv.IsImage.restr_source
+#align local_equiv.is_image.restr_target PartialEquiv.IsImage.restr_target
+#align local_equiv.is_image.restr_symm_apply PartialEquiv.IsImage.restr_symm_apply
 
 theorem image_eq (h : e.IsImage s t) : e '' (e.source ∩ s) = e.target ∩ t :=
   h.restr.image_source_eq_target
-#align local_equiv.is_image.image_eq LocalEquiv.IsImage.image_eq
+#align local_equiv.is_image.image_eq PartialEquiv.IsImage.image_eq
 
 theorem symm_image_eq (h : e.IsImage s t) : e.symm '' (e.target ∩ t) = e.source ∩ s :=
   h.symm.image_eq
-#align local_equiv.is_image.symm_image_eq LocalEquiv.IsImage.symm_image_eq
+#align local_equiv.is_image.symm_image_eq PartialEquiv.IsImage.symm_image_eq
 
 theorem iff_preimage_eq : e.IsImage s t ↔ e.source ∩ e ⁻¹' t = e.source ∩ s := by
   simp only [IsImage, ext_iff, mem_inter_iff, mem_preimage, and_congr_right_iff]
-#align local_equiv.is_image.iff_preimage_eq LocalEquiv.IsImage.iff_preimage_eq
+#align local_equiv.is_image.iff_preimage_eq PartialEquiv.IsImage.iff_preimage_eq
 
 alias ⟨preimage_eq, of_preimage_eq⟩ := iff_preimage_eq
-#align local_equiv.is_image.of_preimage_eq LocalEquiv.IsImage.of_preimage_eq
-#align local_equiv.is_image.preimage_eq LocalEquiv.IsImage.preimage_eq
+#align local_equiv.is_image.of_preimage_eq PartialEquiv.IsImage.of_preimage_eq
+#align local_equiv.is_image.preimage_eq PartialEquiv.IsImage.preimage_eq
 
 theorem iff_symm_preimage_eq : e.IsImage s t ↔ e.target ∩ e.symm ⁻¹' s = e.target ∩ t :=
   symm_iff.symm.trans iff_preimage_eq
-#align local_equiv.is_image.iff_symm_preimage_eq LocalEquiv.IsImage.iff_symm_preimage_eq
+#align local_equiv.is_image.iff_symm_preimage_eq PartialEquiv.IsImage.iff_symm_preimage_eq
 
 alias ⟨symm_preimage_eq, of_symm_preimage_eq⟩ := iff_symm_preimage_eq
-#align local_equiv.is_image.of_symm_preimage_eq LocalEquiv.IsImage.of_symm_preimage_eq
-#align local_equiv.is_image.symm_preimage_eq LocalEquiv.IsImage.symm_preimage_eq
+#align local_equiv.is_image.of_symm_preimage_eq PartialEquiv.IsImage.of_symm_preimage_eq
+#align local_equiv.is_image.symm_preimage_eq PartialEquiv.IsImage.symm_preimage_eq
 
 theorem of_image_eq (h : e '' (e.source ∩ s) = e.target ∩ t) : e.IsImage s t :=
   of_symm_preimage_eq <| Eq.trans (of_symm_preimage_eq rfl).image_eq.symm h
-#align local_equiv.is_image.of_image_eq LocalEquiv.IsImage.of_image_eq
+#align local_equiv.is_image.of_image_eq PartialEquiv.IsImage.of_image_eq
 
 theorem of_symm_image_eq (h : e.symm '' (e.target ∩ t) = e.source ∩ s) : e.IsImage s t :=
   of_preimage_eq <| Eq.trans (iff_preimage_eq.2 rfl).symm_image_eq.symm h
-#align local_equiv.is_image.of_symm_image_eq LocalEquiv.IsImage.of_symm_image_eq
+#align local_equiv.is_image.of_symm_image_eq PartialEquiv.IsImage.of_symm_image_eq
 
 protected theorem compl (h : e.IsImage s t) : e.IsImage sᶜ tᶜ := fun _ hx => not_congr (h hx)
-#align local_equiv.is_image.compl LocalEquiv.IsImage.compl
+#align local_equiv.is_image.compl PartialEquiv.IsImage.compl
 
 protected theorem inter {s' t'} (h : e.IsImage s t) (h' : e.IsImage s' t') :
     e.IsImage (s ∩ s') (t ∩ t') := fun _ hx => and_congr (h hx) (h' hx)
-#align local_equiv.is_image.inter LocalEquiv.IsImage.inter
+#align local_equiv.is_image.inter PartialEquiv.IsImage.inter
 
 protected theorem union {s' t'} (h : e.IsImage s t) (h' : e.IsImage s' t') :
     e.IsImage (s ∪ s') (t ∪ t') := fun _ hx => or_congr (h hx) (h' hx)
-#align local_equiv.is_image.union LocalEquiv.IsImage.union
+#align local_equiv.is_image.union PartialEquiv.IsImage.union
 
 protected theorem diff {s' t'} (h : e.IsImage s t) (h' : e.IsImage s' t') :
     e.IsImage (s \ s') (t \ t') :=
   h.inter h'.compl
-#align local_equiv.is_image.diff LocalEquiv.IsImage.diff
+#align local_equiv.is_image.diff PartialEquiv.IsImage.diff
 
-theorem leftInvOn_piecewise {e' : LocalEquiv α β} [∀ i, Decidable (i ∈ s)]
+theorem leftInvOn_piecewise {e' : PartialEquiv α β} [∀ i, Decidable (i ∈ s)]
     [∀ i, Decidable (i ∈ t)] (h : e.IsImage s t) (h' : e'.IsImage s t) :
     LeftInvOn (t.piecewise e.symm e'.symm) (s.piecewise e e') (s.ite e.source e'.source) := by
   rintro x (⟨he, hs⟩ | ⟨he, hs : x ∉ s⟩)
   · rw [piecewise_eq_of_mem _ _ _ hs, piecewise_eq_of_mem _ _ _ ((h he).2 hs), e.left_inv he]
   · rw [piecewise_eq_of_not_mem _ _ _ hs, piecewise_eq_of_not_mem _ _ _ ((h'.compl he).2 hs),
       e'.left_inv he]
-#align local_equiv.is_image.left_inv_on_piecewise LocalEquiv.IsImage.leftInvOn_piecewise
+#align local_equiv.is_image.left_inv_on_piecewise PartialEquiv.IsImage.leftInvOn_piecewise
 
-theorem inter_eq_of_inter_eq_of_eqOn {e' : LocalEquiv α β} (h : e.IsImage s t)
+theorem inter_eq_of_inter_eq_of_eqOn {e' : PartialEquiv α β} (h : e.IsImage s t)
     (h' : e'.IsImage s t) (hs : e.source ∩ s = e'.source ∩ s) (heq : EqOn e e' (e.source ∩ s)) :
     e.target ∩ t = e'.target ∩ t := by rw [← h.image_eq, ← h'.image_eq, ← hs, heq.image_eq]
-#align local_equiv.is_image.inter_eq_of_inter_eq_of_eq_on LocalEquiv.IsImage.inter_eq_of_inter_eq_of_eqOn
+#align local_equiv.is_image.inter_eq_of_inter_eq_of_eq_on PartialEquiv.IsImage.inter_eq_of_inter_eq_of_eqOn
 
-theorem symm_eq_on_of_inter_eq_of_eqOn {e' : LocalEquiv α β} (h : e.IsImage s t)
+theorem symm_eq_on_of_inter_eq_of_eqOn {e' : PartialEquiv α β} (h : e.IsImage s t)
     (hs : e.source ∩ s = e'.source ∩ s) (heq : EqOn e e' (e.source ∩ s)) :
     EqOn e.symm e'.symm (e.target ∩ t) := by
   rw [← h.image_eq]
   rintro y ⟨x, hx, rfl⟩
   have hx' := hx; rw [hs] at hx'
   rw [e.left_inv hx.1, heq hx, e'.left_inv hx'.1]
-#align local_equiv.is_image.symm_eq_on_of_inter_eq_of_eq_on LocalEquiv.IsImage.symm_eq_on_of_inter_eq_of_eqOn
+#align local_equiv.is_image.symm_eq_on_of_inter_eq_of_eq_on PartialEquiv.IsImage.symm_eq_on_of_inter_eq_of_eqOn
 
 end IsImage
 
 theorem isImage_source_target : e.IsImage e.source e.target := fun x hx => by simp [hx]
-#align local_equiv.is_image_source_target LocalEquiv.isImage_source_target
+#align local_equiv.is_image_source_target PartialEquiv.isImage_source_target
 
-theorem isImage_source_target_of_disjoint (e' : LocalEquiv α β) (hs : Disjoint e.source e'.source)
+theorem isImage_source_target_of_disjoint (e' : PartialEquiv α β) (hs : Disjoint e.source e'.source)
     (ht : Disjoint e.target e'.target) : e.IsImage e'.source e'.target :=
   IsImage.of_image_eq <| by rw [hs.inter_eq, ht.inter_eq, image_empty]
-#align local_equiv.is_image_source_target_of_disjoint LocalEquiv.isImage_source_target_of_disjoint
+#align local_equiv.is_image_source_target_of_disjoint PartialEquiv.isImage_source_target_of_disjoint
 
 theorem image_source_inter_eq' (s : Set α) : e '' (e.source ∩ s) = e.target ∩ e.symm ⁻¹' s := by
   rw [inter_comm, e.leftInvOn.image_inter', image_source_eq_target, inter_comm]
-#align local_equiv.image_source_inter_eq' LocalEquiv.image_source_inter_eq'
+#align local_equiv.image_source_inter_eq' PartialEquiv.image_source_inter_eq'
 
 theorem image_source_inter_eq (s : Set α) :
     e '' (e.source ∩ s) = e.target ∩ e.symm ⁻¹' (e.source ∩ s) := by
   rw [inter_comm, e.leftInvOn.image_inter, image_source_eq_target, inter_comm]
-#align local_equiv.image_source_inter_eq LocalEquiv.image_source_inter_eq
+#align local_equiv.image_source_inter_eq PartialEquiv.image_source_inter_eq
 
 theorem image_eq_target_inter_inv_preimage {s : Set α} (h : s ⊆ e.source) :
     e '' s = e.target ∩ e.symm ⁻¹' s := by
   rw [← e.image_source_inter_eq', inter_eq_self_of_subset_right h]
-#align local_equiv.image_eq_target_inter_inv_preimage LocalEquiv.image_eq_target_inter_inv_preimage
+#align local_equiv.image_eq_target_inter_inv_preimage PartialEquiv.image_eq_target_inter_inv_preimage
 
 theorem symm_image_eq_source_inter_preimage {s : Set β} (h : s ⊆ e.target) :
     e.symm '' s = e.source ∩ e ⁻¹' s :=
   e.symm.image_eq_target_inter_inv_preimage h
-#align local_equiv.symm_image_eq_source_inter_preimage LocalEquiv.symm_image_eq_source_inter_preimage
+#align local_equiv.symm_image_eq_source_inter_preimage PartialEquiv.symm_image_eq_source_inter_preimage
 
 theorem symm_image_target_inter_eq (s : Set β) :
     e.symm '' (e.target ∩ s) = e.source ∩ e ⁻¹' (e.target ∩ s) :=
   e.symm.image_source_inter_eq _
-#align local_equiv.symm_image_target_inter_eq LocalEquiv.symm_image_target_inter_eq
+#align local_equiv.symm_image_target_inter_eq PartialEquiv.symm_image_target_inter_eq
 
 theorem symm_image_target_inter_eq' (s : Set β) : e.symm '' (e.target ∩ s) = e.source ∩ e ⁻¹' s :=
   e.symm.image_source_inter_eq' _
-#align local_equiv.symm_image_target_inter_eq' LocalEquiv.symm_image_target_inter_eq'
+#align local_equiv.symm_image_target_inter_eq' PartialEquiv.symm_image_target_inter_eq'
 
 theorem source_inter_preimage_inv_preimage (s : Set α) :
     e.source ∩ e ⁻¹' (e.symm ⁻¹' s) = e.source ∩ s :=
   Set.ext fun x => and_congr_right_iff.2 fun hx =>
     by simp only [mem_preimage, e.left_inv hx]
-#align local_equiv.source_inter_preimage_inv_preimage LocalEquiv.source_inter_preimage_inv_preimage
+#align local_equiv.source_inter_preimage_inv_preimage PartialEquiv.source_inter_preimage_inv_preimage
 
 theorem source_inter_preimage_target_inter (s : Set β) :
     e.source ∩ e ⁻¹' (e.target ∩ s) = e.source ∩ e ⁻¹' s :=
   ext fun _ => ⟨fun hx => ⟨hx.1, hx.2.2⟩, fun hx => ⟨hx.1, e.map_source hx.1, hx.2⟩⟩
-#align local_equiv.source_inter_preimage_target_inter LocalEquiv.source_inter_preimage_target_inter
+#align local_equiv.source_inter_preimage_target_inter PartialEquiv.source_inter_preimage_target_inter
 
 theorem target_inter_inv_preimage_preimage (s : Set β) :
     e.target ∩ e.symm ⁻¹' (e ⁻¹' s) = e.target ∩ s :=
   e.symm.source_inter_preimage_inv_preimage _
-#align local_equiv.target_inter_inv_preimage_preimage LocalEquiv.target_inter_inv_preimage_preimage
+#align local_equiv.target_inter_inv_preimage_preimage PartialEquiv.target_inter_inv_preimage_preimage
 
 theorem symm_image_image_of_subset_source {s : Set α} (h : s ⊆ e.source) : e.symm '' (e '' s) = s :=
   (e.leftInvOn.mono h).image_image
-#align local_equiv.symm_image_image_of_subset_source LocalEquiv.symm_image_image_of_subset_source
+#align local_equiv.symm_image_image_of_subset_source PartialEquiv.symm_image_image_of_subset_source
 
 theorem image_symm_image_of_subset_target {s : Set β} (h : s ⊆ e.target) : e '' (e.symm '' s) = s :=
   e.symm.symm_image_image_of_subset_source h
-#align local_equiv.image_symm_image_of_subset_target LocalEquiv.image_symm_image_of_subset_target
+#align local_equiv.image_symm_image_of_subset_target PartialEquiv.image_symm_image_of_subset_target
 
 theorem source_subset_preimage_target : e.source ⊆ e ⁻¹' e.target :=
   e.mapsTo
-#align local_equiv.source_subset_preimage_target LocalEquiv.source_subset_preimage_target
+#align local_equiv.source_subset_preimage_target PartialEquiv.source_subset_preimage_target
 
 theorem symm_image_target_eq_source : e.symm '' e.target = e.source :=
   e.symm.image_source_eq_target
-#align local_equiv.symm_image_target_eq_source LocalEquiv.symm_image_target_eq_source
+#align local_equiv.symm_image_target_eq_source PartialEquiv.symm_image_target_eq_source
 
 theorem target_subset_preimage_source : e.target ⊆ e.symm ⁻¹' e.source :=
   e.symm_mapsTo
-#align local_equiv.target_subset_preimage_source LocalEquiv.target_subset_preimage_source
+#align local_equiv.target_subset_preimage_source PartialEquiv.target_subset_preimage_source
 
-/-- Two local equivs that have the same `source`, same `toFun` and same `invFun`, coincide. -/
+/-- Two partial equivs that have the same `source`, same `toFun` and same `invFun`, coincide. -/
 @[ext]
-protected theorem ext {e e' : LocalEquiv α β} (h : ∀ x, e x = e' x)
+protected theorem ext {e e' : PartialEquiv α β} (h : ∀ x, e x = e' x)
     (hsymm : ∀ x, e.symm x = e'.symm x) (hs : e.source = e'.source) : e = e' := by
   have A : (e : α → β) = e' := by
     ext x
@@ -566,82 +567,82 @@ protected theorem ext {e e' : LocalEquiv α β} (h : ∀ x, e x = e' x)
   cases e; cases e'
   simp [*] at *
   simp [*]
-#align local_equiv.ext LocalEquiv.ext
+#align local_equiv.ext PartialEquiv.ext
 
-/-- Restricting a local equivalence to e.source ∩ s -/
-protected def restr (s : Set α) : LocalEquiv α β :=
+/-- Restricting a partial equivalence to `e.source ∩ s` -/
+protected def restr (s : Set α) : PartialEquiv α β :=
   (@IsImage.of_symm_preimage_eq α β e s (e.symm ⁻¹' s) rfl).restr
-#align local_equiv.restr LocalEquiv.restr
+#align local_equiv.restr PartialEquiv.restr
 
 @[simp, mfld_simps]
 theorem restr_coe (s : Set α) : (e.restr s : α → β) = e :=
   rfl
-#align local_equiv.restr_coe LocalEquiv.restr_coe
+#align local_equiv.restr_coe PartialEquiv.restr_coe
 
 @[simp, mfld_simps]
 theorem restr_coe_symm (s : Set α) : ((e.restr s).symm : β → α) = e.symm :=
   rfl
-#align local_equiv.restr_coe_symm LocalEquiv.restr_coe_symm
+#align local_equiv.restr_coe_symm PartialEquiv.restr_coe_symm
 
 @[simp, mfld_simps]
 theorem restr_source (s : Set α) : (e.restr s).source = e.source ∩ s :=
   rfl
-#align local_equiv.restr_source LocalEquiv.restr_source
+#align local_equiv.restr_source PartialEquiv.restr_source
 
 @[simp, mfld_simps]
 theorem restr_target (s : Set α) : (e.restr s).target = e.target ∩ e.symm ⁻¹' s :=
   rfl
-#align local_equiv.restr_target LocalEquiv.restr_target
+#align local_equiv.restr_target PartialEquiv.restr_target
 
-theorem restr_eq_of_source_subset {e : LocalEquiv α β} {s : Set α} (h : e.source ⊆ s) :
+theorem restr_eq_of_source_subset {e : PartialEquiv α β} {s : Set α} (h : e.source ⊆ s) :
     e.restr s = e :=
-  LocalEquiv.ext (fun _ => rfl) (fun _ => rfl) (by simp [inter_eq_self_of_subset_left h])
-#align local_equiv.restr_eq_of_source_subset LocalEquiv.restr_eq_of_source_subset
+  PartialEquiv.ext (fun _ => rfl) (fun _ => rfl) (by simp [inter_eq_self_of_subset_left h])
+#align local_equiv.restr_eq_of_source_subset PartialEquiv.restr_eq_of_source_subset
 
 @[simp, mfld_simps]
-theorem restr_univ {e : LocalEquiv α β} : e.restr univ = e :=
+theorem restr_univ {e : PartialEquiv α β} : e.restr univ = e :=
   restr_eq_of_source_subset (subset_univ _)
-#align local_equiv.restr_univ LocalEquiv.restr_univ
+#align local_equiv.restr_univ PartialEquiv.restr_univ
 
-/-- The identity local equiv -/
-protected def refl (α : Type*) : LocalEquiv α α :=
-  (Equiv.refl α).toLocalEquiv
-#align local_equiv.refl LocalEquiv.refl
+/-- The identity partial equiv -/
+protected def refl (α : Type*) : PartialEquiv α α :=
+  (Equiv.refl α).toPartialEquiv
+#align local_equiv.refl PartialEquiv.refl
 
 @[simp, mfld_simps]
-theorem refl_source : (LocalEquiv.refl α).source = univ :=
+theorem refl_source : (PartialEquiv.refl α).source = univ :=
   rfl
-#align local_equiv.refl_source LocalEquiv.refl_source
+#align local_equiv.refl_source PartialEquiv.refl_source
 
 @[simp, mfld_simps]
-theorem refl_target : (LocalEquiv.refl α).target = univ :=
+theorem refl_target : (PartialEquiv.refl α).target = univ :=
   rfl
-#align local_equiv.refl_target LocalEquiv.refl_target
+#align local_equiv.refl_target PartialEquiv.refl_target
 
 @[simp, mfld_simps]
-theorem refl_coe : (LocalEquiv.refl α : α → α) = id :=
+theorem refl_coe : (PartialEquiv.refl α : α → α) = id :=
   rfl
-#align local_equiv.refl_coe LocalEquiv.refl_coe
+#align local_equiv.refl_coe PartialEquiv.refl_coe
 
 @[simp, mfld_simps]
-theorem refl_symm : (LocalEquiv.refl α).symm = LocalEquiv.refl α :=
+theorem refl_symm : (PartialEquiv.refl α).symm = PartialEquiv.refl α :=
   rfl
-#align local_equiv.refl_symm LocalEquiv.refl_symm
+#align local_equiv.refl_symm PartialEquiv.refl_symm
 
 -- Porting note: removed `simp` because `simp` can prove this
 @[mfld_simps]
-theorem refl_restr_source (s : Set α) : ((LocalEquiv.refl α).restr s).source = s := by simp
-#align local_equiv.refl_restr_source LocalEquiv.refl_restr_source
+theorem refl_restr_source (s : Set α) : ((PartialEquiv.refl α).restr s).source = s := by simp
+#align local_equiv.refl_restr_source PartialEquiv.refl_restr_source
 
 -- Porting note: removed `simp` because `simp` can prove this
 @[mfld_simps]
-theorem refl_restr_target (s : Set α) : ((LocalEquiv.refl α).restr s).target = s := by
+theorem refl_restr_target (s : Set α) : ((PartialEquiv.refl α).restr s).target = s := by
   change univ ∩ id ⁻¹' s = s
   simp
-#align local_equiv.refl_restr_target LocalEquiv.refl_restr_target
+#align local_equiv.refl_restr_target PartialEquiv.refl_restr_target
 
-/-- The identity local equiv on a set `s` -/
-def ofSet (s : Set α) : LocalEquiv α α where
+/-- The identity partial equivalence on a set `s` -/
+def ofSet (s : Set α) : PartialEquiv α α where
   toFun := id
   invFun := id
   source := s
@@ -650,32 +651,32 @@ def ofSet (s : Set α) : LocalEquiv α α where
   map_target' _ hx := hx
   left_inv' _ _ := rfl
   right_inv' _ _ := rfl
-#align local_equiv.of_set LocalEquiv.ofSet
+#align local_equiv.of_set PartialEquiv.ofSet
 
 @[simp, mfld_simps]
-theorem ofSet_source (s : Set α) : (LocalEquiv.ofSet s).source = s :=
+theorem ofSet_source (s : Set α) : (PartialEquiv.ofSet s).source = s :=
   rfl
-#align local_equiv.of_set_source LocalEquiv.ofSet_source
+#align local_equiv.of_set_source PartialEquiv.ofSet_source
 
 @[simp, mfld_simps]
-theorem ofSet_target (s : Set α) : (LocalEquiv.ofSet s).target = s :=
+theorem ofSet_target (s : Set α) : (PartialEquiv.ofSet s).target = s :=
   rfl
-#align local_equiv.of_set_target LocalEquiv.ofSet_target
+#align local_equiv.of_set_target PartialEquiv.ofSet_target
 
 @[simp, mfld_simps]
-theorem ofSet_coe (s : Set α) : (LocalEquiv.ofSet s : α → α) = id :=
+theorem ofSet_coe (s : Set α) : (PartialEquiv.ofSet s : α → α) = id :=
   rfl
-#align local_equiv.of_set_coe LocalEquiv.ofSet_coe
+#align local_equiv.of_set_coe PartialEquiv.ofSet_coe
 
 @[simp, mfld_simps]
-theorem ofSet_symm (s : Set α) : (LocalEquiv.ofSet s).symm = LocalEquiv.ofSet s :=
+theorem ofSet_symm (s : Set α) : (PartialEquiv.ofSet s).symm = PartialEquiv.ofSet s :=
   rfl
-#align local_equiv.of_set_symm LocalEquiv.ofSet_symm
+#align local_equiv.of_set_symm PartialEquiv.ofSet_symm
 
-/-- Composing two local equivs if the target of the first coincides with the source of the
+/-- Composing two partial equivs if the target of the first coincides with the source of the
 second. -/
 @[simps]
-protected def trans' (e' : LocalEquiv β γ) (h : e.target = e'.source) : LocalEquiv α γ where
+protected def trans' (e' : PartialEquiv β γ) (h : e.target = e'.source) : PartialEquiv α γ where
   toFun := e' ∘ e
   invFun := e.symm ∘ e'.symm
   source := e.source
@@ -684,244 +685,246 @@ protected def trans' (e' : LocalEquiv β γ) (h : e.target = e'.source) : LocalE
   map_target' y hy := by simp [h, hy]
   left_inv' x hx := by simp [hx, ← h]
   right_inv' y hy := by simp [hy, h]
-#align local_equiv.trans' LocalEquiv.trans'
+#align local_equiv.trans' PartialEquiv.trans'
 
-/-- Composing two local equivs, by restricting to the maximal domain where their composition
+/-- Composing two partial equivs, by restricting to the maximal domain where their composition
 is well defined. -/
-protected def trans : LocalEquiv α γ :=
-  LocalEquiv.trans' (e.symm.restr e'.source).symm (e'.restr e.target) (inter_comm _ _)
-#align local_equiv.trans LocalEquiv.trans
+protected def trans : PartialEquiv α γ :=
+  PartialEquiv.trans' (e.symm.restr e'.source).symm (e'.restr e.target) (inter_comm _ _)
+#align local_equiv.trans PartialEquiv.trans
 
 @[simp, mfld_simps]
 theorem coe_trans : (e.trans e' : α → γ) = e' ∘ e :=
   rfl
-#align local_equiv.coe_trans LocalEquiv.coe_trans
+#align local_equiv.coe_trans PartialEquiv.coe_trans
 
 @[simp, mfld_simps]
 theorem coe_trans_symm : ((e.trans e').symm : γ → α) = e.symm ∘ e'.symm :=
   rfl
-#align local_equiv.coe_trans_symm LocalEquiv.coe_trans_symm
+#align local_equiv.coe_trans_symm PartialEquiv.coe_trans_symm
 
 theorem trans_apply {x : α} : (e.trans e') x = e' (e x) :=
   rfl
-#align local_equiv.trans_apply LocalEquiv.trans_apply
+#align local_equiv.trans_apply PartialEquiv.trans_apply
 
 theorem trans_symm_eq_symm_trans_symm : (e.trans e').symm = e'.symm.trans e.symm := by
   cases e; cases e'; rfl
-#align local_equiv.trans_symm_eq_symm_trans_symm LocalEquiv.trans_symm_eq_symm_trans_symm
+#align local_equiv.trans_symm_eq_symm_trans_symm PartialEquiv.trans_symm_eq_symm_trans_symm
 
 @[simp, mfld_simps]
 theorem trans_source : (e.trans e').source = e.source ∩ e ⁻¹' e'.source :=
   rfl
-#align local_equiv.trans_source LocalEquiv.trans_source
+#align local_equiv.trans_source PartialEquiv.trans_source
 
 theorem trans_source' : (e.trans e').source = e.source ∩ e ⁻¹' (e.target ∩ e'.source) := by
   mfld_set_tac
-#align local_equiv.trans_source' LocalEquiv.trans_source'
+#align local_equiv.trans_source' PartialEquiv.trans_source'
 
 theorem trans_source'' : (e.trans e').source = e.symm '' (e.target ∩ e'.source) := by
   rw [e.trans_source', e.symm_image_target_inter_eq]
-#align local_equiv.trans_source'' LocalEquiv.trans_source''
+#align local_equiv.trans_source'' PartialEquiv.trans_source''
 
 theorem image_trans_source : e '' (e.trans e').source = e.target ∩ e'.source :=
   (e.symm.restr e'.source).symm.image_source_eq_target
-#align local_equiv.image_trans_source LocalEquiv.image_trans_source
+#align local_equiv.image_trans_source PartialEquiv.image_trans_source
 
 @[simp, mfld_simps]
 theorem trans_target : (e.trans e').target = e'.target ∩ e'.symm ⁻¹' e.target :=
   rfl
-#align local_equiv.trans_target LocalEquiv.trans_target
+#align local_equiv.trans_target PartialEquiv.trans_target
 
 theorem trans_target' : (e.trans e').target = e'.target ∩ e'.symm ⁻¹' (e'.source ∩ e.target) :=
   trans_source' e'.symm e.symm
-#align local_equiv.trans_target' LocalEquiv.trans_target'
+#align local_equiv.trans_target' PartialEquiv.trans_target'
 
 theorem trans_target'' : (e.trans e').target = e' '' (e'.source ∩ e.target) :=
   trans_source'' e'.symm e.symm
-#align local_equiv.trans_target'' LocalEquiv.trans_target''
+#align local_equiv.trans_target'' PartialEquiv.trans_target''
 
 theorem inv_image_trans_target : e'.symm '' (e.trans e').target = e'.source ∩ e.target :=
   image_trans_source e'.symm e.symm
-#align local_equiv.inv_image_trans_target LocalEquiv.inv_image_trans_target
+#align local_equiv.inv_image_trans_target PartialEquiv.inv_image_trans_target
 
-theorem trans_assoc (e'' : LocalEquiv γ δ) : (e.trans e').trans e'' = e.trans (e'.trans e'') :=
-  LocalEquiv.ext (fun x => rfl) (fun x => rfl)
+theorem trans_assoc (e'' : PartialEquiv γ δ) : (e.trans e').trans e'' = e.trans (e'.trans e'') :=
+  PartialEquiv.ext (fun x => rfl) (fun x => rfl)
     (by simp [trans_source, @preimage_comp α β γ, inter_assoc])
-#align local_equiv.trans_assoc LocalEquiv.trans_assoc
+#align local_equiv.trans_assoc PartialEquiv.trans_assoc
 
 @[simp, mfld_simps]
-theorem trans_refl : e.trans (LocalEquiv.refl β) = e :=
-  LocalEquiv.ext (fun x => rfl) (fun x => rfl) (by simp [trans_source])
-#align local_equiv.trans_refl LocalEquiv.trans_refl
+theorem trans_refl : e.trans (PartialEquiv.refl β) = e :=
+  PartialEquiv.ext (fun x => rfl) (fun x => rfl) (by simp [trans_source])
+#align local_equiv.trans_refl PartialEquiv.trans_refl
 
 @[simp, mfld_simps]
-theorem refl_trans : (LocalEquiv.refl α).trans e = e :=
-  LocalEquiv.ext (fun x => rfl) (fun x => rfl) (by simp [trans_source, preimage_id])
-#align local_equiv.refl_trans LocalEquiv.refl_trans
+theorem refl_trans : (PartialEquiv.refl α).trans e = e :=
+  PartialEquiv.ext (fun x => rfl) (fun x => rfl) (by simp [trans_source, preimage_id])
+#align local_equiv.refl_trans PartialEquiv.refl_trans
 
 theorem trans_ofSet (s : Set β) : e.trans (ofSet s) = e.restr (e ⁻¹' s) :=
-  LocalEquiv.ext (fun _ => rfl) (fun _ => rfl) rfl
+  PartialEquiv.ext (fun _ => rfl) (fun _ => rfl) rfl
 
-theorem trans_refl_restr (s : Set β) : e.trans ((LocalEquiv.refl β).restr s) = e.restr (e ⁻¹' s) :=
-  LocalEquiv.ext (fun x => rfl) (fun x => rfl) (by simp [trans_source])
-#align local_equiv.trans_refl_restr LocalEquiv.trans_refl_restr
+theorem trans_refl_restr (s : Set β) :
+    e.trans ((PartialEquiv.refl β).restr s) = e.restr (e ⁻¹' s) :=
+  PartialEquiv.ext (fun x => rfl) (fun x => rfl) (by simp [trans_source])
+#align local_equiv.trans_refl_restr PartialEquiv.trans_refl_restr
 
 theorem trans_refl_restr' (s : Set β) :
-    e.trans ((LocalEquiv.refl β).restr s) = e.restr (e.source ∩ e ⁻¹' s) :=
-  LocalEquiv.ext (fun x => rfl) (fun x => rfl) <| by
+    e.trans ((PartialEquiv.refl β).restr s) = e.restr (e.source ∩ e ⁻¹' s) :=
+  PartialEquiv.ext (fun x => rfl) (fun x => rfl) <| by
     simp only [trans_source, restr_source, refl_source, univ_inter]
     rw [← inter_assoc, inter_self]
-#align local_equiv.trans_refl_restr' LocalEquiv.trans_refl_restr'
+#align local_equiv.trans_refl_restr' PartialEquiv.trans_refl_restr'
 
 theorem restr_trans (s : Set α) : (e.restr s).trans e' = (e.trans e').restr s :=
-  LocalEquiv.ext (fun x => rfl) (fun x => rfl) <| by
+  PartialEquiv.ext (fun x => rfl) (fun x => rfl) <| by
     simp [trans_source, inter_comm, inter_assoc]
-#align local_equiv.restr_trans LocalEquiv.restr_trans
+#align local_equiv.restr_trans PartialEquiv.restr_trans
 
 /-- A lemma commonly useful when `e` and `e'` are charts of a manifold. -/
-theorem mem_symm_trans_source {e' : LocalEquiv α γ} {x : α} (he : x ∈ e.source)
+theorem mem_symm_trans_source {e' : PartialEquiv α γ} {x : α} (he : x ∈ e.source)
     (he' : x ∈ e'.source) : e x ∈ (e.symm.trans e').source :=
-  ⟨e.mapsTo he, by rwa [mem_preimage, LocalEquiv.symm_symm, e.left_inv he]⟩
-#align local_equiv.mem_symm_trans_source LocalEquiv.mem_symm_trans_source
+  ⟨e.mapsTo he, by rwa [mem_preimage, PartialEquiv.symm_symm, e.left_inv he]⟩
+#align local_equiv.mem_symm_trans_source PartialEquiv.mem_symm_trans_source
 
-/-- Postcompose a local equivalence with an equivalence.
+/-- Postcompose a partial equivalence with an equivalence.
 We modify the source and target to have better definitional behavior. -/
 @[simps!]
-def transEquiv (e' : β ≃ γ) : LocalEquiv α γ :=
-  (e.trans e'.toLocalEquiv).copy _ rfl _ rfl e.source (inter_univ _) (e'.symm ⁻¹' e.target)
+def transEquiv (e' : β ≃ γ) : PartialEquiv α γ :=
+  (e.trans e'.toPartialEquiv).copy _ rfl _ rfl e.source (inter_univ _) (e'.symm ⁻¹' e.target)
     (univ_inter _)
-#align local_equiv.trans_equiv LocalEquiv.transEquiv
-#align local_equiv.trans_equiv_source LocalEquiv.transEquiv_source
-#align local_equiv.trans_equiv_apply LocalEquiv.transEquiv_apply
-#align local_equiv.trans_equiv_target LocalEquiv.transEquiv_target
-#align local_equiv.trans_equiv_symm_apply LocalEquiv.transEquiv_symm_apply
+#align local_equiv.trans_equiv PartialEquiv.transEquiv
+#align local_equiv.trans_equiv_source PartialEquiv.transEquiv_source
+#align local_equiv.trans_equiv_apply PartialEquiv.transEquiv_apply
+#align local_equiv.trans_equiv_target PartialEquiv.transEquiv_target
+#align local_equiv.trans_equiv_symm_apply PartialEquiv.transEquiv_symm_apply
 
-theorem transEquiv_eq_trans (e' : β ≃ γ) : e.transEquiv e' = e.trans e'.toLocalEquiv :=
+theorem transEquiv_eq_trans (e' : β ≃ γ) : e.transEquiv e' = e.trans e'.toPartialEquiv :=
   copy_eq ..
-#align local_equiv.trans_equiv_eq_trans LocalEquiv.transEquiv_eq_trans
+#align local_equiv.trans_equiv_eq_trans PartialEquiv.transEquiv_eq_trans
 
-/-- Precompose a local equivalence with an equivalence.
+/-- Precompose a partial equivalence with an equivalence.
 We modify the source and target to have better definitional behavior. -/
 @[simps!]
-def _root_.Equiv.transLocalEquiv (e : α ≃ β) : LocalEquiv α γ :=
-  (e.toLocalEquiv.trans e').copy _ rfl _ rfl (e ⁻¹' e'.source) (univ_inter _) e'.target
+def _root_.Equiv.transPartialEquiv (e : α ≃ β) : PartialEquiv α γ :=
+  (e.toPartialEquiv.trans e').copy _ rfl _ rfl (e ⁻¹' e'.source) (univ_inter _) e'.target
     (inter_univ _)
-#align equiv.trans_local_equiv Equiv.transLocalEquiv
-#align equiv.trans_local_equiv_target Equiv.transLocalEquiv_target
-#align equiv.trans_local_equiv_apply Equiv.transLocalEquiv_apply
-#align equiv.trans_local_equiv_source Equiv.transLocalEquiv_source
-#align equiv.trans_local_equiv_symm_apply Equiv.transLocalEquiv_symm_apply
-
-theorem _root_.Equiv.transLocalEquiv_eq_trans (e : α ≃ β) :
-    e.transLocalEquiv e' = e.toLocalEquiv.trans e' :=
+#align equiv.trans_local_equiv Equiv.transPartialEquiv
+#align equiv.trans_local_equiv_target Equiv.transPartialEquiv_target
+#align equiv.trans_local_equiv_apply Equiv.transPartialEquiv_apply
+#align equiv.trans_local_equiv_source Equiv.transPartialEquiv_source
+#align equiv.trans_local_equiv_symm_apply Equiv.transPartialEquiv_symm_apply
+
+theorem _root_.Equiv.transPartialEquiv_eq_trans (e : α ≃ β) :
+    e.transPartialEquiv e' = e.toPartialEquiv.trans e' :=
   copy_eq ..
-#align equiv.trans_local_equiv_eq_trans Equiv.transLocalEquiv_eq_trans
+#align equiv.trans_local_equiv_eq_trans Equiv.transPartialEquiv_eq_trans
 
 /-- `EqOnSource e e'` means that `e` and `e'` have the same source, and coincide there. Then `e`
-and `e'` should really be considered the same local equiv. -/
-def EqOnSource (e e' : LocalEquiv α β) : Prop :=
+and `e'` should really be considered the same partial equiv. -/
+def EqOnSource (e e' : PartialEquiv α β) : Prop :=
   e.source = e'.source ∧ e.source.EqOn e e'
-#align local_equiv.eq_on_source LocalEquiv.EqOnSource
+#align local_equiv.eq_on_source PartialEquiv.EqOnSource
 
 /-- `EqOnSource` is an equivalence relation. This instance provides the `≈` notation between two
-`LocalEquiv`s. -/
-instance eqOnSourceSetoid : Setoid (LocalEquiv α β) where
+`PartialEquiv`s. -/
+instance eqOnSourceSetoid : Setoid (PartialEquiv α β) where
   r := EqOnSource
   iseqv := by constructor <;> simp only [Equivalence, EqOnSource, EqOn] <;> aesop
-#align local_equiv.eq_on_source_setoid LocalEquiv.eqOnSourceSetoid
+#align local_equiv.eq_on_source_setoid PartialEquiv.eqOnSourceSetoid
 
 theorem eqOnSource_refl : e ≈ e :=
   Setoid.refl _
-#align local_equiv.eq_on_source_refl LocalEquiv.eqOnSource_refl
+#align local_equiv.eq_on_source_refl PartialEquiv.eqOnSource_refl
 
-/-- Two equivalent local equivs have the same source. -/
-theorem EqOnSource.source_eq {e e' : LocalEquiv α β} (h : e ≈ e') : e.source = e'.source :=
+/-- Two equivalent partial equivs have the same source. -/
+theorem EqOnSource.source_eq {e e' : PartialEquiv α β} (h : e ≈ e') : e.source = e'.source :=
   h.1
-#align local_equiv.eq_on_source.source_eq LocalEquiv.EqOnSource.source_eq
+#align local_equiv.eq_on_source.source_eq PartialEquiv.EqOnSource.source_eq
 
-/-- Two equivalent local equivs coincide on the source. -/
-theorem EqOnSource.eqOn {e e' : LocalEquiv α β} (h : e ≈ e') : e.source.EqOn e e' :=
+/-- Two equivalent partial equivs coincide on the source. -/
+theorem EqOnSource.eqOn {e e' : PartialEquiv α β} (h : e ≈ e') : e.source.EqOn e e' :=
   h.2
-#align local_equiv.eq_on_source.eq_on LocalEquiv.EqOnSource.eqOn
+#align local_equiv.eq_on_source.eq_on PartialEquiv.EqOnSource.eqOn
 
 --Porting note: A lot of dot notation failures here. Maybe we should not use `≈`
 
-/-- Two equivalent local equivs have the same target. -/
-theorem EqOnSource.target_eq {e e' : LocalEquiv α β} (h : e ≈ e') : e.target = e'.target := by
+/-- Two equivalent partial equivs have the same target. -/
+theorem EqOnSource.target_eq {e e' : PartialEquiv α β} (h : e ≈ e') : e.target = e'.target := by
   simp only [← image_source_eq_target, ← source_eq h, h.2.image_eq]
-#align local_equiv.eq_on_source.target_eq LocalEquiv.EqOnSource.target_eq
+#align local_equiv.eq_on_source.target_eq PartialEquiv.EqOnSource.target_eq
 
-/-- If two local equivs are equivalent, so are their inverses. -/
-theorem EqOnSource.symm' {e e' : LocalEquiv α β} (h : e ≈ e') : e.symm ≈ e'.symm := by
+/-- If two partial equivs are equivalent, so are their inverses. -/
+theorem EqOnSource.symm' {e e' : PartialEquiv α β} (h : e ≈ e') : e.symm ≈ e'.symm := by
   refine' ⟨target_eq h, eqOn_of_leftInvOn_of_rightInvOn e.leftInvOn _ _⟩ <;>
     simp only [symm_source, target_eq h, source_eq h, e'.symm_mapsTo]
   exact e'.rightInvOn.congr_right e'.symm_mapsTo (source_eq h ▸ h.eqOn.symm)
-#align local_equiv.eq_on_source.symm' LocalEquiv.EqOnSource.symm'
+#align local_equiv.eq_on_source.symm' PartialEquiv.EqOnSource.symm'
 
-/-- Two equivalent local equivs have coinciding inverses on the target. -/
-theorem EqOnSource.symm_eqOn {e e' : LocalEquiv α β} (h : e ≈ e') : EqOn e.symm e'.symm e.target :=
+/-- Two equivalent partial equivs have coinciding inverses on the target. -/
+theorem EqOnSource.symm_eqOn {e e' : PartialEquiv α β} (h : e ≈ e') :
+    EqOn e.symm e'.symm e.target :=
   -- Porting note: `h.symm'` dot notation doesn't work anymore because `h` is not recognised as
-  -- `LocalEquiv.EqOnSource` for some reason.
+  -- `PartialEquiv.EqOnSource` for some reason.
   eqOn (symm' h)
-#align local_equiv.eq_on_source.symm_eq_on LocalEquiv.EqOnSource.symm_eqOn
+#align local_equiv.eq_on_source.symm_eq_on PartialEquiv.EqOnSource.symm_eqOn
 
-/-- Composition of local equivs respects equivalence. -/
-theorem EqOnSource.trans' {e e' : LocalEquiv α β} {f f' : LocalEquiv β γ} (he : e ≈ e')
+/-- Composition of partial equivs respects equivalence. -/
+theorem EqOnSource.trans' {e e' : PartialEquiv α β} {f f' : PartialEquiv β γ} (he : e ≈ e')
     (hf : f ≈ f') : e.trans f ≈ e'.trans f' := by
   constructor
   · rw [trans_source'', trans_source'', ← target_eq he, ← hf.1]
     exact (he.symm'.eqOn.mono <| inter_subset_left _ _).image_eq
   · intro x hx
     rw [trans_source] at hx
-    simp [Function.comp_apply, LocalEquiv.coe_trans, (he.2 hx.1).symm, hf.2 hx.2]
-#align local_equiv.eq_on_source.trans' LocalEquiv.EqOnSource.trans'
+    simp [Function.comp_apply, PartialEquiv.coe_trans, (he.2 hx.1).symm, hf.2 hx.2]
+#align local_equiv.eq_on_source.trans' PartialEquiv.EqOnSource.trans'
 
-/-- Restriction of local equivs respects equivalence. -/
-theorem EqOnSource.restr {e e' : LocalEquiv α β} (he : e ≈ e') (s : Set α) :
+/-- Restriction of partial equivs respects equivalence. -/
+theorem EqOnSource.restr {e e' : PartialEquiv α β} (he : e ≈ e') (s : Set α) :
     e.restr s ≈ e'.restr s := by
   constructor
   · simp [he.1]
   · intro x hx
     simp only [mem_inter_iff, restr_source] at hx
     exact he.2 hx.1
-#align local_equiv.eq_on_source.restr LocalEquiv.EqOnSource.restr
+#align local_equiv.eq_on_source.restr PartialEquiv.EqOnSource.restr
 
 /-- Preimages are respected by equivalence. -/
-theorem EqOnSource.source_inter_preimage_eq {e e' : LocalEquiv α β} (he : e ≈ e') (s : Set β) :
+theorem EqOnSource.source_inter_preimage_eq {e e' : PartialEquiv α β} (he : e ≈ e') (s : Set β) :
     e.source ∩ e ⁻¹' s = e'.source ∩ e' ⁻¹' s := by rw [he.eqOn.inter_preimage_eq, source_eq he]
-#align local_equiv.eq_on_source.source_inter_preimage_eq LocalEquiv.EqOnSource.source_inter_preimage_eq
+#align local_equiv.eq_on_source.source_inter_preimage_eq PartialEquiv.EqOnSource.source_inter_preimage_eq
 
-/-- Composition of a local equiv and its inverse is equivalent to the restriction of the identity
-to the source. -/
+/-- Composition of a partial equivlance and its inverse is equivalent to
+the restriction of the identity to the source. -/
 theorem trans_self_symm : e.trans e.symm ≈ ofSet e.source := by
   have A : (e.trans e.symm).source = e.source := by mfld_set_tac
   refine' ⟨by rw [A, ofSet_source], fun x hx => _⟩
   rw [A] at hx
   simp only [hx, mfld_simps]
-#align local_equiv.trans_self_symm LocalEquiv.trans_self_symm
+#align local_equiv.trans_self_symm PartialEquiv.trans_self_symm
 
-/-- Composition of the inverse of a local equiv and this local equiv is equivalent to the
-restriction of the identity to the target. -/
-theorem trans_symm_self : e.symm.trans e ≈ LocalEquiv.ofSet e.target :=
+/-- Composition of the inverse of a partial equivalence and this partial equivalence is equivalent
+to the restriction of the identity to the target. -/
+theorem trans_symm_self : e.symm.trans e ≈ PartialEquiv.ofSet e.target :=
   trans_self_symm e.symm
-#align local_equiv.trans_symm_self LocalEquiv.trans_symm_self
+#align local_equiv.trans_symm_self PartialEquiv.trans_symm_self
 
-/-- Two equivalent local equivs are equal when the source and target are `univ`. -/
-theorem eq_of_eqOnSource_univ (e e' : LocalEquiv α β) (h : e ≈ e') (s : e.source = univ)
+/-- Two equivalent partial equivs are equal when the source and target are `univ`. -/
+theorem eq_of_eqOnSource_univ (e e' : PartialEquiv α β) (h : e ≈ e') (s : e.source = univ)
     (t : e.target = univ) : e = e' := by
-  refine LocalEquiv.ext (fun x => ?_) (fun x => ?_) h.1
+  refine PartialEquiv.ext (fun x => ?_) (fun x => ?_) h.1
   · apply h.2
     rw [s]
     exact mem_univ _
   · apply h.symm'.2
     rw [symm_source, t]
     exact mem_univ _
-#align local_equiv.eq_of_eq_on_source_univ LocalEquiv.eq_of_eqOnSource_univ
+#align local_equiv.eq_of_eq_on_source_univ PartialEquiv.eq_of_eqOnSource_univ
 
 section Prod
 
-/-- The product of two local equivs, as a local equiv on the product. -/
-def prod (e : LocalEquiv α β) (e' : LocalEquiv γ δ) : LocalEquiv (α × γ) (β × δ) where
+/-- The product of two partial equivalences, as a partial equivalence on the product. -/
+def prod (e : PartialEquiv α β) (e' : PartialEquiv γ δ) : PartialEquiv (α × γ) (β × δ) where
   source := e.source ×ˢ e'.source
   target := e.target ×ˢ e'.target
   toFun p := (e p.1, e' p.2)
@@ -938,62 +941,62 @@ def prod (e : LocalEquiv α β) (e' : LocalEquiv γ δ) : LocalEquiv (α × γ)
   right_inv' p hp := by
     simp at hp
     simp [hp]
-#align local_equiv.prod LocalEquiv.prod
+#align local_equiv.prod PartialEquiv.prod
 
 @[simp, mfld_simps]
-theorem prod_source (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
+theorem prod_source (e : PartialEquiv α β) (e' : PartialEquiv γ δ) :
     (e.prod e').source = e.source ×ˢ e'.source :=
   rfl
-#align local_equiv.prod_source LocalEquiv.prod_source
+#align local_equiv.prod_source PartialEquiv.prod_source
 
 @[simp, mfld_simps]
-theorem prod_target (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
+theorem prod_target (e : PartialEquiv α β) (e' : PartialEquiv γ δ) :
     (e.prod e').target = e.target ×ˢ e'.target :=
   rfl
-#align local_equiv.prod_target LocalEquiv.prod_target
+#align local_equiv.prod_target PartialEquiv.prod_target
 
 @[simp, mfld_simps]
-theorem prod_coe (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
+theorem prod_coe (e : PartialEquiv α β) (e' : PartialEquiv γ δ) :
     (e.prod e' : α × γ → β × δ) = fun p => (e p.1, e' p.2) :=
   rfl
-#align local_equiv.prod_coe LocalEquiv.prod_coe
+#align local_equiv.prod_coe PartialEquiv.prod_coe
 
-theorem prod_coe_symm (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
+theorem prod_coe_symm (e : PartialEquiv α β) (e' : PartialEquiv γ δ) :
     ((e.prod e').symm : β × δ → α × γ) = fun p => (e.symm p.1, e'.symm p.2) :=
   rfl
-#align local_equiv.prod_coe_symm LocalEquiv.prod_coe_symm
+#align local_equiv.prod_coe_symm PartialEquiv.prod_coe_symm
 
 @[simp, mfld_simps]
-theorem prod_symm (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
+theorem prod_symm (e : PartialEquiv α β) (e' : PartialEquiv γ δ) :
     (e.prod e').symm = e.symm.prod e'.symm := by
   ext x <;> simp [prod_coe_symm]
-#align local_equiv.prod_symm LocalEquiv.prod_symm
+#align local_equiv.prod_symm PartialEquiv.prod_symm
 
 @[simp, mfld_simps]
 theorem refl_prod_refl :
-    (LocalEquiv.refl α).prod (LocalEquiv.refl β) = LocalEquiv.refl (α × β) := by
+    (PartialEquiv.refl α).prod (PartialEquiv.refl β) = PartialEquiv.refl (α × β) := by
   -- Porting note: `ext1 ⟨x, y⟩` insufficient number of binders
   ext ⟨x, y⟩ <;> simp
-#align local_equiv.refl_prod_refl LocalEquiv.refl_prod_refl
+#align local_equiv.refl_prod_refl PartialEquiv.refl_prod_refl
 
 @[simp, mfld_simps]
-theorem prod_trans {η : Type*} {ε : Type*} (e : LocalEquiv α β) (f : LocalEquiv β γ)
-    (e' : LocalEquiv δ η) (f' : LocalEquiv η ε) :
+theorem prod_trans {η : Type*} {ε : Type*} (e : PartialEquiv α β) (f : PartialEquiv β γ)
+    (e' : PartialEquiv δ η) (f' : PartialEquiv η ε) :
     (e.prod e').trans (f.prod f') = (e.trans f).prod (e'.trans f') := by
   ext ⟨x, y⟩ <;> simp [ext_iff]; tauto
-#align local_equiv.prod_trans LocalEquiv.prod_trans
+#align local_equiv.prod_trans PartialEquiv.prod_trans
 
 end Prod
 
-/-- Combine two `LocalEquiv`s using `Set.piecewise`. The source of the new `LocalEquiv` is
+/-- Combine two `PartialEquiv`s using `Set.piecewise`. The source of the new `PartialEquiv` is
 `s.ite e.source e'.source = e.source ∩ s ∪ e'.source \ s`, and similarly for target.  The function
 sends `e.source ∩ s` to `e.target ∩ t` using `e` and `e'.source \ s` to `e'.target \ t` using `e'`,
 and similarly for the inverse function. The definition assumes `e.isImage s t` and
 `e'.isImage s t`. -/
 @[simps (config := .asFn)]
-def piecewise (e e' : LocalEquiv α β) (s : Set α) (t : Set β) [∀ x, Decidable (x ∈ s)]
+def piecewise (e e' : PartialEquiv α β) (s : Set α) (t : Set β) [∀ x, Decidable (x ∈ s)]
     [∀ y, Decidable (y ∈ t)] (H : e.IsImage s t) (H' : e'.IsImage s t) :
-    LocalEquiv α β where
+    PartialEquiv α β where
   toFun := s.piecewise e e'
   invFun := t.piecewise e.symm e'.symm
   source := s.ite e.source e'.source
@@ -1002,50 +1005,50 @@ def piecewise (e e' : LocalEquiv α β) (s : Set α) (t : Set β) [∀ x, Decida
   map_target' := H.symm.mapsTo.piecewise_ite H'.symm.compl.mapsTo
   left_inv' := H.leftInvOn_piecewise H'
   right_inv' := H.symm.leftInvOn_piecewise H'.symm
-#align local_equiv.piecewise LocalEquiv.piecewise
-#align local_equiv.piecewise_source LocalEquiv.piecewise_source
-#align local_equiv.piecewise_target LocalEquiv.piecewise_target
-#align local_equiv.piecewise_symm_apply LocalEquiv.piecewise_symm_apply
-#align local_equiv.piecewise_apply LocalEquiv.piecewise_apply
+#align local_equiv.piecewise PartialEquiv.piecewise
+#align local_equiv.piecewise_source PartialEquiv.piecewise_source
+#align local_equiv.piecewise_target PartialEquiv.piecewise_target
+#align local_equiv.piecewise_symm_apply PartialEquiv.piecewise_symm_apply
+#align local_equiv.piecewise_apply PartialEquiv.piecewise_apply
 
-theorem symm_piecewise (e e' : LocalEquiv α β) {s : Set α} {t : Set β} [∀ x, Decidable (x ∈ s)]
+theorem symm_piecewise (e e' : PartialEquiv α β) {s : Set α} {t : Set β} [∀ x, Decidable (x ∈ s)]
     [∀ y, Decidable (y ∈ t)] (H : e.IsImage s t) (H' : e'.IsImage s t) :
     (e.piecewise e' s t H H').symm = e.symm.piecewise e'.symm t s H.symm H'.symm :=
   rfl
-#align local_equiv.symm_piecewise LocalEquiv.symm_piecewise
+#align local_equiv.symm_piecewise PartialEquiv.symm_piecewise
 
-/-- Combine two `LocalEquiv`s with disjoint sources and disjoint targets. We reuse
-`LocalEquiv.piecewise`, then override `source` and `target` to ensure better definitional
+/-- Combine two `PartialEquiv`s with disjoint sources and disjoint targets. We reuse
+`PartialEquiv.piecewise`, then override `source` and `target` to ensure better definitional
 equalities. -/
 @[simps! (config := .asFn)]
-def disjointUnion (e e' : LocalEquiv α β) (hs : Disjoint e.source e'.source)
+def disjointUnion (e e' : PartialEquiv α β) (hs : Disjoint e.source e'.source)
     (ht : Disjoint e.target e'.target) [∀ x, Decidable (x ∈ e.source)]
-    [∀ y, Decidable (y ∈ e.target)] : LocalEquiv α β :=
+    [∀ y, Decidable (y ∈ e.target)] : PartialEquiv α β :=
   (e.piecewise e' e.source e.target e.isImage_source_target <|
         e'.isImage_source_target_of_disjoint _ hs.symm ht.symm).copy
     _ rfl _ rfl (e.source ∪ e'.source) (ite_left _ _) (e.target ∪ e'.target) (ite_left _ _)
-#align local_equiv.disjoint_union LocalEquiv.disjointUnion
-#align local_equiv.disjoint_union_source LocalEquiv.disjointUnion_source
-#align local_equiv.disjoint_union_target LocalEquiv.disjointUnion_target
-#align local_equiv.disjoint_union_symm_apply LocalEquiv.disjointUnion_symm_apply
-#align local_equiv.disjoint_union_apply LocalEquiv.disjointUnion_apply
+#align local_equiv.disjoint_union PartialEquiv.disjointUnion
+#align local_equiv.disjoint_union_source PartialEquiv.disjointUnion_source
+#align local_equiv.disjoint_union_target PartialEquiv.disjointUnion_target
+#align local_equiv.disjoint_union_symm_apply PartialEquiv.disjointUnion_symm_apply
+#align local_equiv.disjoint_union_apply PartialEquiv.disjointUnion_apply
 
-theorem disjointUnion_eq_piecewise (e e' : LocalEquiv α β) (hs : Disjoint e.source e'.source)
+theorem disjointUnion_eq_piecewise (e e' : PartialEquiv α β) (hs : Disjoint e.source e'.source)
     (ht : Disjoint e.target e'.target) [∀ x, Decidable (x ∈ e.source)]
     [∀ y, Decidable (y ∈ e.target)] :
     e.disjointUnion e' hs ht =
       e.piecewise e' e.source e.target e.isImage_source_target
         (e'.isImage_source_target_of_disjoint _ hs.symm ht.symm) :=
   copy_eq ..
-#align local_equiv.disjoint_union_eq_piecewise LocalEquiv.disjointUnion_eq_piecewise
+#align local_equiv.disjoint_union_eq_piecewise PartialEquiv.disjointUnion_eq_piecewise
 
 section Pi
 
 variable {ι : Type*} {αi βi γi : ι → Type*}
 
-/-- The product of a family of local equivs, as a local equiv on the pi type. -/
+/-- The product of a family of partial equivalences, as a partial equivalence on the pi type. -/
 @[simps (config := mfld_cfg) apply source target]
-protected def pi (ei : ∀ i, LocalEquiv (αi i) (βi i)) : LocalEquiv (∀ i, αi i) (∀ i, βi i) where
+protected def pi (ei : ∀ i, PartialEquiv (αi i) (βi i)) : PartialEquiv (∀ i, αi i) (∀ i, βi i) where
   toFun f i := ei i (f i)
   invFun f i := (ei i).symm (f i)
   source := pi univ fun i => (ei i).source
@@ -1054,42 +1057,42 @@ protected def pi (ei : ∀ i, LocalEquiv (αi i) (βi i)) : LocalEquiv (∀ i, 
   map_target' _ hf i hi := (ei i).map_target (hf i hi)
   left_inv' _ hf := funext fun i => (ei i).left_inv (hf i trivial)
   right_inv' _ hf := funext fun i => (ei i).right_inv (hf i trivial)
-#align local_equiv.pi LocalEquiv.pi
-#align local_equiv.pi_source LocalEquiv.pi_source
-#align local_equiv.pi_apply LocalEquiv.pi_apply
-#align local_equiv.pi_target LocalEquiv.pi_target
+#align local_equiv.pi PartialEquiv.pi
+#align local_equiv.pi_source PartialEquiv.pi_source
+#align local_equiv.pi_apply PartialEquiv.pi_apply
+#align local_equiv.pi_target PartialEquiv.pi_target
 
 @[simp, mfld_simps]
-theorem pi_symm (ei : ∀ i, LocalEquiv (αi i) (βi i)) :
-    (LocalEquiv.pi ei).symm = .pi fun i ↦ (ei i).symm :=
+theorem pi_symm (ei : ∀ i, PartialEquiv (αi i) (βi i)) :
+    (PartialEquiv.pi ei).symm = .pi fun i ↦ (ei i).symm :=
   rfl
 
-theorem pi_symm_apply (ei : ∀ i, LocalEquiv (αi i) (βi i)) :
-    ⇑(LocalEquiv.pi ei).symm = fun f i ↦ (ei i).symm (f i) :=
+theorem pi_symm_apply (ei : ∀ i, PartialEquiv (αi i) (βi i)) :
+    ⇑(PartialEquiv.pi ei).symm = fun f i ↦ (ei i).symm (f i) :=
   rfl
-#align local_equiv.pi_symm_apply LocalEquiv.pi_symm_apply
+#align local_equiv.pi_symm_apply PartialEquiv.pi_symm_apply
 
 @[simp, mfld_simps]
-theorem pi_refl : (LocalEquiv.pi fun i ↦ LocalEquiv.refl (αi i)) = .refl (∀ i, αi i) := by
+theorem pi_refl : (PartialEquiv.pi fun i ↦ PartialEquiv.refl (αi i)) = .refl (∀ i, αi i) := by
   ext <;> simp
 
 @[simp, mfld_simps]
-theorem pi_trans (ei : ∀ i, LocalEquiv (αi i) (βi i)) (ei' : ∀ i, LocalEquiv (βi i) (γi i)) :
-    (LocalEquiv.pi ei).trans (LocalEquiv.pi ei') = .pi fun i ↦ (ei i).trans (ei' i) := by
+theorem pi_trans (ei : ∀ i, PartialEquiv (αi i) (βi i)) (ei' : ∀ i, PartialEquiv (βi i) (γi i)) :
+    (PartialEquiv.pi ei).trans (PartialEquiv.pi ei') = .pi fun i ↦ (ei i).trans (ei' i) := by
   ext <;> simp [forall_and]
 
 end Pi
 
-end LocalEquiv
+end PartialEquiv
 
 namespace Set
 
 -- All arguments are explicit to avoid missing information in the pretty printer output
-/-- A bijection between two sets `s : Set α` and `t : Set β` provides a local equivalence
+/-- A bijection between two sets `s : Set α` and `t : Set β` provides a partial equivalence
 between `α` and `β`. -/
 @[simps (config := .asFn)]
-noncomputable def BijOn.toLocalEquiv [Nonempty α] (f : α → β) (s : Set α) (t : Set β)
-    (hf : BijOn f s t) : LocalEquiv α β where
+noncomputable def BijOn.toPartialEquiv [Nonempty α] (f : α → β) (s : Set α) (t : Set β)
+    (hf : BijOn f s t) : PartialEquiv α β where
   toFun := f
   invFun := invFunOn f s
   source := s
@@ -1098,41 +1101,42 @@ noncomputable def BijOn.toLocalEquiv [Nonempty α] (f : α → β) (s : Set α)
   map_target' := hf.surjOn.mapsTo_invFunOn
   left_inv' := hf.invOn_invFunOn.1
   right_inv' := hf.invOn_invFunOn.2
-#align set.bij_on.to_local_equiv Set.BijOn.toLocalEquiv
-#align set.bij_on.to_local_equiv_target Set.BijOn.toLocalEquiv_target
-#align set.bij_on.to_local_equiv_symm_apply Set.BijOn.toLocalEquiv_symm_apply
-#align set.bij_on.to_local_equiv_apply Set.BijOn.toLocalEquiv_apply
-#align set.bij_on.to_local_equiv_source Set.BijOn.toLocalEquiv_source
+#align set.bij_on.to_local_equiv Set.BijOn.toPartialEquiv
+#align set.bij_on.to_local_equiv_target Set.BijOn.toPartialEquiv_target
+#align set.bij_on.to_local_equiv_symm_apply Set.BijOn.toPartialEquiv_symm_apply
+#align set.bij_on.to_local_equiv_apply Set.BijOn.toPartialEquiv_apply
+#align set.bij_on.to_local_equiv_source Set.BijOn.toPartialEquiv_source
 
-/-- A map injective on a subset of its domain provides a local equivalence. -/
+/-- A map injective on a subset of its domain provides a partial equivalence. -/
 @[simp, mfld_simps]
-noncomputable def InjOn.toLocalEquiv [Nonempty α] (f : α → β) (s : Set α) (hf : InjOn f s) :
-    LocalEquiv α β :=
-  hf.bijOn_image.toLocalEquiv f s (f '' s)
-#align set.inj_on.to_local_equiv Set.InjOn.toLocalEquiv
+noncomputable def InjOn.toPartialEquiv [Nonempty α] (f : α → β) (s : Set α) (hf : InjOn f s) :
+    PartialEquiv α β :=
+  hf.bijOn_image.toPartialEquiv f s (f '' s)
+#align set.inj_on.to_local_equiv Set.InjOn.toPartialEquiv
 
 end Set
 
 namespace Equiv
 
-/- `Equiv`s give rise to `LocalEquiv`s. We set up simp lemmas to reduce most properties of the
-`LocalEquiv` to that of the `Equiv`. -/
+/- `Equiv`s give rise to `PartialEquiv`s. We set up simp lemmas to reduce most properties of the
+`PartialEquiv` to that of the `Equiv`. -/
 variable (e : α ≃ β) (e' : β ≃ γ)
 
 @[simp, mfld_simps]
-theorem refl_toLocalEquiv : (Equiv.refl α).toLocalEquiv = LocalEquiv.refl α :=
+theorem refl_toPartialEquiv : (Equiv.refl α).toPartialEquiv = PartialEquiv.refl α :=
   rfl
-#align equiv.refl_to_local_equiv Equiv.refl_toLocalEquiv
+#align equiv.refl_to_local_equiv Equiv.refl_toPartialEquiv
 
 @[simp, mfld_simps]
-theorem symm_toLocalEquiv : e.symm.toLocalEquiv = e.toLocalEquiv.symm :=
+theorem symm_toPartialEquiv : e.symm.toPartialEquiv = e.toPartialEquiv.symm :=
   rfl
-#align equiv.symm_to_local_equiv Equiv.symm_toLocalEquiv
+#align equiv.symm_to_local_equiv Equiv.symm_toPartialEquiv
 
 @[simp, mfld_simps]
-theorem trans_toLocalEquiv : (e.trans e').toLocalEquiv = e.toLocalEquiv.trans e'.toLocalEquiv :=
-  LocalEquiv.ext (fun x => rfl) (fun x => rfl)
-    (by simp [LocalEquiv.trans_source, Equiv.toLocalEquiv])
-#align equiv.trans_to_local_equiv Equiv.trans_toLocalEquiv
+theorem trans_toPartialEquiv :
+    (e.trans e').toPartialEquiv = e.toPartialEquiv.trans e'.toPartialEquiv :=
+  PartialEquiv.ext (fun x => rfl) (fun x => rfl)
+    (by simp [PartialEquiv.trans_source, Equiv.toPartialEquiv])
+#align equiv.trans_to_local_equiv Equiv.trans_toPartialEquiv
 
 end Equiv
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
@@ -71,7 +71,7 @@ then it should use `e.source ∩ s` or `e.target ∩ t`, not `s ∩ e.source` or
 open Lean Meta Elab Tactic
 
 /-! Implementation of the `mfld_set_tac` tactic for working with the domains of partially-defined
-functions (`LocalEquiv`, `LocalHomeomorph`, etc).
+functions (`LocalEquiv`, `PartialHomeomorph`, etc).
 
 This is in a separate file from `Mathlib.Logic.Equiv.MfldSimpsAttr` because attributes need a new
 file to become functional.
chore: space after (#8178)

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

Diff
@@ -680,9 +680,9 @@ protected def trans' (e' : LocalEquiv β γ) (h : e.target = e'.source) : LocalE
   invFun := e.symm ∘ e'.symm
   source := e.source
   target := e'.target
-  map_source' x hx := by simp [←h, hx]
+  map_source' x hx := by simp [← h, hx]
   map_target' y hy := by simp [h, hy]
-  left_inv' x hx := by simp [hx, ←h]
+  left_inv' x hx := by simp [hx, ← h]
   right_inv' y hy := by simp [hy, h]
 #align local_equiv.trans' LocalEquiv.trans'
 
feat(/Equiv/): Add symm_bijective lemmas next to symm_symms (#8444)

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: lines <34025592+linesthatinterlace@users.noreply.github.com>

Diff
@@ -333,6 +333,9 @@ theorem symm_symm : e.symm.symm = e := by
   rfl
 #align local_equiv.symm_symm LocalEquiv.symm_symm
 
+theorem symm_bijective : Function.Bijective (LocalEquiv.symm : LocalEquiv α β → LocalEquiv β α) :=
+  Function.bijective_iff_has_inverse.mpr ⟨_, symm_symm, symm_symm⟩
+
 theorem image_source_eq_target : e '' e.source = e.target :=
   e.bijOn.image_eq
 #align local_equiv.image_source_eq_target LocalEquiv.image_source_eq_target
style: shorten simps configurations (#8296)

Use .asFn and .lemmasOnly as simps configuration options.

For reference, these are defined here:

https://github.com/leanprover-community/mathlib4/blob/4055c8b471380825f07416b12cb0cf266da44d84/Mathlib/Tactic/Simps/Basic.lean#L843-L851

Diff
@@ -283,7 +283,7 @@ instance inhabitedOfEmpty [IsEmpty α] [IsEmpty β] : Inhabited (LocalEquiv α 
 #align local_equiv.inhabited_of_empty LocalEquiv.inhabitedOfEmpty
 
 /-- Create a copy of a `LocalEquiv` providing better definitional equalities. -/
-@[simps (config := { fullyApplied := false })]
+@[simps (config := .asFn)]
 def copy (e : LocalEquiv α β) (f : α → β) (hf : ⇑e = f) (g : β → α) (hg : ⇑e.symm = g) (s : Set α)
     (hs : e.source = s) (t : Set β) (ht : e.target = t) :
     LocalEquiv α β where
@@ -386,7 +386,7 @@ theorem symm_mapsTo (h : e.IsImage s t) : MapsTo e.symm (e.target ∩ t) (e.sour
 #align local_equiv.is_image.symm_maps_to LocalEquiv.IsImage.symm_mapsTo
 
 /-- Restrict a `LocalEquiv` to a pair of corresponding sets. -/
-@[simps (config := { fullyApplied := false })]
+@[simps (config := .asFn)]
 def restr (h : e.IsImage s t) : LocalEquiv α β where
   toFun := e
   invFun := e.symm
@@ -987,7 +987,7 @@ end Prod
 sends `e.source ∩ s` to `e.target ∩ t` using `e` and `e'.source \ s` to `e'.target \ t` using `e'`,
 and similarly for the inverse function. The definition assumes `e.isImage s t` and
 `e'.isImage s t`. -/
-@[simps (config := { fullyApplied := false })]
+@[simps (config := .asFn)]
 def piecewise (e e' : LocalEquiv α β) (s : Set α) (t : Set β) [∀ x, Decidable (x ∈ s)]
     [∀ y, Decidable (y ∈ t)] (H : e.IsImage s t) (H' : e'.IsImage s t) :
     LocalEquiv α β where
@@ -1014,7 +1014,7 @@ theorem symm_piecewise (e e' : LocalEquiv α β) {s : Set α} {t : Set β} [∀
 /-- Combine two `LocalEquiv`s with disjoint sources and disjoint targets. We reuse
 `LocalEquiv.piecewise`, then override `source` and `target` to ensure better definitional
 equalities. -/
-@[simps! (config := { fullyApplied := false })]
+@[simps! (config := .asFn)]
 def disjointUnion (e e' : LocalEquiv α β) (hs : Disjoint e.source e'.source)
     (ht : Disjoint e.target e'.target) [∀ x, Decidable (x ∈ e.source)]
     [∀ y, Decidable (y ∈ e.target)] : LocalEquiv α β :=
@@ -1084,7 +1084,7 @@ namespace Set
 -- All arguments are explicit to avoid missing information in the pretty printer output
 /-- A bijection between two sets `s : Set α` and `t : Set β` provides a local equivalence
 between `α` and `β`. -/
-@[simps (config := { fullyApplied := false })]
+@[simps (config := .asFn)]
 noncomputable def BijOn.toLocalEquiv [Nonempty α] (f : α → β) (s : Set α) (t : Set β)
     (hf : BijOn f s t) : LocalEquiv α β where
   toFun := f
feat: miscellaneous lemmas about local homeomorphisms (#8062)
  • variant of extend_left_inv', stated in terms of images (instead of point-wise)
  • variant of map_source', stated for images of subsets (instead of point-wise)
  • a local homeomorphism and its inverse are open on its source

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

Diff
@@ -198,6 +198,10 @@ theorem map_source {x : α} (h : x ∈ e.source) : e x ∈ e.target :=
   e.map_source' h
 #align local_equiv.map_source LocalEquiv.map_source
 
+/-- Variant of `e.map_source` and `map_source'`, stated for images of subsets of `source`. -/
+lemma map_source'' : e '' e.source ⊆ e.target :=
+  fun _ ⟨_, hx, hex⟩ ↦ mem_of_eq_of_mem (id hex.symm) (e.map_source' hx)
+
 @[simp, mfld_simps]
 theorem map_target {x : β} (h : x ∈ e.target) : e.symm x ∈ e.source :=
   e.map_target' h
docs: prevent lists running onto a single line (#8122)
Diff
@@ -28,13 +28,13 @@ As for equivs, we register a coercion to functions and use it in our simp normal
 
 ## Main definitions
 
-`Equiv.toLocalEquiv`: associating a local equiv to an equiv, with source = target = univ
-`LocalEquiv.symm`    : the inverse of a local equiv
-`LocalEquiv.trans`   : the composition of two local equivs
-`LocalEquiv.refl`    : the identity local equiv
-`LocalEquiv.ofSet`  : the identity on a set `s`
-`EqOnSource`        : equivalence relation describing the "right" notion of equality for local
-                      equivs (see below in implementation notes)
+* `Equiv.toLocalEquiv`: associating a local equiv to an equiv, with source = target = univ
+* `LocalEquiv.symm`: the inverse of a local equiv
+* `LocalEquiv.trans`: the composition of two local equivs
+* `LocalEquiv.refl`: the identity local equiv
+* `LocalEquiv.ofSet`: the identity on a set `s`
+* `EqOnSource`: equivalence relation describing the "right" notion of equality for local
+  equivs (see below in implementation notes)
 
 ## Implementation notes
 
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
@@ -34,7 +34,7 @@ As for equivs, we register a coercion to functions and use it in our simp normal
 `LocalEquiv.refl`    : the identity local equiv
 `LocalEquiv.ofSet`  : the identity on a set `s`
 `EqOnSource`        : equivalence relation describing the "right" notion of equality for local
-                        equivs (see below in implementation notes)
+                      equivs (see below in implementation notes)
 
 ## Implementation notes
 
@@ -827,19 +827,19 @@ theorem eqOnSource_refl : e ≈ e :=
   Setoid.refl _
 #align local_equiv.eq_on_source_refl LocalEquiv.eqOnSource_refl
 
-/-- Two equivalent local equivs have the same source -/
+/-- Two equivalent local equivs have the same source. -/
 theorem EqOnSource.source_eq {e e' : LocalEquiv α β} (h : e ≈ e') : e.source = e'.source :=
   h.1
 #align local_equiv.eq_on_source.source_eq LocalEquiv.EqOnSource.source_eq
 
-/-- Two equivalent local equivs coincide on the source -/
+/-- Two equivalent local equivs coincide on the source. -/
 theorem EqOnSource.eqOn {e e' : LocalEquiv α β} (h : e ≈ e') : e.source.EqOn e e' :=
   h.2
 #align local_equiv.eq_on_source.eq_on LocalEquiv.EqOnSource.eqOn
 
 --Porting note: A lot of dot notation failures here. Maybe we should not use `≈`
 
-/-- Two equivalent local equivs have the same target -/
+/-- Two equivalent local equivs have the same target. -/
 theorem EqOnSource.target_eq {e e' : LocalEquiv α β} (h : e ≈ e') : e.target = e'.target := by
   simp only [← image_source_eq_target, ← source_eq h, h.2.image_eq]
 #align local_equiv.eq_on_source.target_eq LocalEquiv.EqOnSource.target_eq
@@ -851,14 +851,14 @@ theorem EqOnSource.symm' {e e' : LocalEquiv α β} (h : e ≈ e') : e.symm ≈ e
   exact e'.rightInvOn.congr_right e'.symm_mapsTo (source_eq h ▸ h.eqOn.symm)
 #align local_equiv.eq_on_source.symm' LocalEquiv.EqOnSource.symm'
 
-/-- Two equivalent local equivs have coinciding inverses on the target -/
+/-- Two equivalent local equivs have coinciding inverses on the target. -/
 theorem EqOnSource.symm_eqOn {e e' : LocalEquiv α β} (h : e ≈ e') : EqOn e.symm e'.symm e.target :=
   -- Porting note: `h.symm'` dot notation doesn't work anymore because `h` is not recognised as
   -- `LocalEquiv.EqOnSource` for some reason.
   eqOn (symm' h)
 #align local_equiv.eq_on_source.symm_eq_on LocalEquiv.EqOnSource.symm_eqOn
 
-/-- Composition of local equivs respects equivalence -/
+/-- Composition of local equivs respects equivalence. -/
 theorem EqOnSource.trans' {e e' : LocalEquiv α β} {f f' : LocalEquiv β γ} (he : e ≈ e')
     (hf : f ≈ f') : e.trans f ≈ e'.trans f' := by
   constructor
@@ -869,7 +869,7 @@ theorem EqOnSource.trans' {e e' : LocalEquiv α β} {f f' : LocalEquiv β γ} (h
     simp [Function.comp_apply, LocalEquiv.coe_trans, (he.2 hx.1).symm, hf.2 hx.2]
 #align local_equiv.eq_on_source.trans' LocalEquiv.EqOnSource.trans'
 
-/-- Restriction of local equivs respects equivalence -/
+/-- Restriction of local equivs respects equivalence. -/
 theorem EqOnSource.restr {e e' : LocalEquiv α β} (he : e ≈ e') (s : Set α) :
     e.restr s ≈ e'.restr s := by
   constructor
@@ -879,13 +879,13 @@ theorem EqOnSource.restr {e e' : LocalEquiv α β} (he : e ≈ e') (s : Set α)
     exact he.2 hx.1
 #align local_equiv.eq_on_source.restr LocalEquiv.EqOnSource.restr
 
-/-- Preimages are respected by equivalence -/
+/-- Preimages are respected by equivalence. -/
 theorem EqOnSource.source_inter_preimage_eq {e e' : LocalEquiv α β} (he : e ≈ e') (s : Set β) :
     e.source ∩ e ⁻¹' s = e'.source ∩ e' ⁻¹' s := by rw [he.eqOn.inter_preimage_eq, source_eq he]
 #align local_equiv.eq_on_source.source_inter_preimage_eq LocalEquiv.EqOnSource.source_inter_preimage_eq
 
 /-- Composition of a local equiv and its inverse is equivalent to the restriction of the identity
-to the source -/
+to the source. -/
 theorem trans_self_symm : e.trans e.symm ≈ ofSet e.source := by
   have A : (e.trans e.symm).source = e.source := by mfld_set_tac
   refine' ⟨by rw [A, ofSet_source], fun x hx => _⟩
@@ -894,13 +894,13 @@ theorem trans_self_symm : e.trans e.symm ≈ ofSet e.source := by
 #align local_equiv.trans_self_symm LocalEquiv.trans_self_symm
 
 /-- Composition of the inverse of a local equiv and this local equiv is equivalent to the
-restriction of the identity to the target -/
+restriction of the identity to the target. -/
 theorem trans_symm_self : e.symm.trans e ≈ LocalEquiv.ofSet e.target :=
   trans_self_symm e.symm
 #align local_equiv.trans_symm_self LocalEquiv.trans_symm_self
 
-/-- Two equivalent local equivs are equal when the source and target are univ -/
-theorem eq_of_eq_on_source_univ (e e' : LocalEquiv α β) (h : e ≈ e') (s : e.source = univ)
+/-- Two equivalent local equivs are equal when the source and target are `univ`. -/
+theorem eq_of_eqOnSource_univ (e e' : LocalEquiv α β) (h : e ≈ e') (s : e.source = univ)
     (t : e.target = univ) : e = e' := by
   refine LocalEquiv.ext (fun x => ?_) (fun x => ?_) h.1
   · apply h.2
@@ -909,7 +909,7 @@ theorem eq_of_eq_on_source_univ (e e' : LocalEquiv α β) (h : e ≈ e') (s : e.
   · apply h.symm'.2
     rw [symm_source, t]
     exact mem_univ _
-#align local_equiv.eq_of_eq_on_source_univ LocalEquiv.eq_of_eq_on_source_univ
+#align local_equiv.eq_of_eq_on_source_univ LocalEquiv.eq_of_eqOnSource_univ
 
 section Prod
 
chore: remove nonterminal simp (#7580)

Removes nonterminal simps on lines looking like simp [...]

Diff
@@ -762,7 +762,7 @@ theorem trans_refl_restr (s : Set β) : e.trans ((LocalEquiv.refl β).restr s) =
 theorem trans_refl_restr' (s : Set β) :
     e.trans ((LocalEquiv.refl β).restr s) = e.restr (e.source ∩ e ⁻¹' s) :=
   LocalEquiv.ext (fun x => rfl) (fun x => rfl) <| by
-    simp [trans_source]
+    simp only [trans_source, restr_source, refl_source, univ_inter]
     rw [← inter_assoc, inter_self]
 #align local_equiv.trans_refl_restr' LocalEquiv.trans_refl_restr'
 
chore: minor import adjustment (#7118)

Easy cleanup after recent Std bumps.

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

Diff
@@ -6,6 +6,7 @@ Authors: Sébastien Gouëzel
 import Mathlib.Data.Set.Function
 import Mathlib.Logic.Equiv.Defs
 import Mathlib.Tactic.Core
+import Mathlib.Tactic.Attr.Core
 
 #align_import logic.equiv.local_equiv from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4"
 
feat: patch for new alias command (#6172)
Diff
@@ -409,7 +409,7 @@ theorem iff_preimage_eq : e.IsImage s t ↔ e.source ∩ e ⁻¹' t = e.source 
   simp only [IsImage, ext_iff, mem_inter_iff, mem_preimage, and_congr_right_iff]
 #align local_equiv.is_image.iff_preimage_eq LocalEquiv.IsImage.iff_preimage_eq
 
-alias iff_preimage_eq ↔ preimage_eq of_preimage_eq
+alias ⟨preimage_eq, of_preimage_eq⟩ := iff_preimage_eq
 #align local_equiv.is_image.of_preimage_eq LocalEquiv.IsImage.of_preimage_eq
 #align local_equiv.is_image.preimage_eq LocalEquiv.IsImage.preimage_eq
 
@@ -417,7 +417,7 @@ theorem iff_symm_preimage_eq : e.IsImage s t ↔ e.target ∩ e.symm ⁻¹' s =
   symm_iff.symm.trans iff_preimage_eq
 #align local_equiv.is_image.iff_symm_preimage_eq LocalEquiv.IsImage.iff_symm_preimage_eq
 
-alias iff_symm_preimage_eq ↔ symm_preimage_eq of_symm_preimage_eq
+alias ⟨symm_preimage_eq, of_symm_preimage_eq⟩ := iff_symm_preimage_eq
 #align local_equiv.is_image.of_symm_preimage_eq LocalEquiv.IsImage.of_symm_preimage_eq
 #align local_equiv.is_image.symm_preimage_eq LocalEquiv.IsImage.symm_preimage_eq
 
chore: bump to nightly-2023-08-17 (#6019)

The major change here is adapting to simp failing if it makes no progress. The vast majority of the redundant simps found due to this change were extracted to #6632.

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

Diff
@@ -95,11 +95,13 @@ elab (name := mfldSetTac) "mfld_set_tac" : tactic => withMainContext do
       apply Set.ext; intro my_y
       constructor <;>
         · intro h_my_y
-          try (simp only [*, mfld_simps] at h_my_y; simp only [*, mfld_simps]))))
+          try simp only [*, mfld_simps] at h_my_y
+          try simp only [*, mfld_simps])))
   | (``Subset, #[_ty, _inst, _e₁, _e₂]) =>
     evalTactic (← `(tactic| (
       intro my_y h_my_y
-      try (simp only [*, mfld_simps] at h_my_y; simp only [*, mfld_simps]))))
+      try simp only [*, mfld_simps] at h_my_y
+      try simp only [*, mfld_simps])))
   | _ => throwError "goal should be an equality or an inclusion"
 
 attribute [mfld_simps] and_true eq_self_iff_true Function.comp_apply
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
@@ -108,13 +108,13 @@ end Tactic.MfldSetTac
 
 open Function Set
 
-variable {α : Type _} {β : Type _} {γ : Type _} {δ : Type _}
+variable {α : Type*} {β : Type*} {γ : Type*} {δ : Type*}
 
 /-- Local equivalence between subsets `source` and `target` of `α` and `β` respectively. The
 (global) maps `toFun : α → β` and `invFun : β → α` map `source` to `target` and conversely, and are
 inverse to each other there. The values of `toFun` outside of `source` and of `invFun` outside of
 `target` are irrelevant. -/
-structure LocalEquiv (α : Type _) (β : Type _) where
+structure LocalEquiv (α : Type*) (β : Type*) where
   /-- The global function which has a local inverse. Its value outside of the `source` subset is
   irrelevant. -/
   toFun : α → β
@@ -594,7 +594,7 @@ theorem restr_univ {e : LocalEquiv α β} : e.restr univ = e :=
 #align local_equiv.restr_univ LocalEquiv.restr_univ
 
 /-- The identity local equiv -/
-protected def refl (α : Type _) : LocalEquiv α α :=
+protected def refl (α : Type*) : LocalEquiv α α :=
   (Equiv.refl α).toLocalEquiv
 #align local_equiv.refl LocalEquiv.refl
 
@@ -967,7 +967,7 @@ theorem refl_prod_refl :
 #align local_equiv.refl_prod_refl LocalEquiv.refl_prod_refl
 
 @[simp, mfld_simps]
-theorem prod_trans {η : Type _} {ε : Type _} (e : LocalEquiv α β) (f : LocalEquiv β γ)
+theorem prod_trans {η : Type*} {ε : Type*} (e : LocalEquiv α β) (f : LocalEquiv β γ)
     (e' : LocalEquiv δ η) (f' : LocalEquiv η ε) :
     (e.prod e').trans (f.prod f') = (e.trans f).prod (e'.trans f') := by
   ext ⟨x, y⟩ <;> simp [ext_iff]; tauto
@@ -1031,7 +1031,7 @@ theorem disjointUnion_eq_piecewise (e e' : LocalEquiv α β) (hs : Disjoint e.so
 
 section Pi
 
-variable {ι : Type _} {αi βi γi : ι → Type _}
+variable {ι : Type*} {αi βi γi : ι → Type*}
 
 /-- The product of a family of local equivs, as a local equiv on the pi type. -/
 @[simps (config := mfld_cfg) apply source target]
refactor: rename/redefine homeomorphUnitBall (#6030)
  • Add Equiv.toLocalEquivOfImageEq and Homeomorph.toLocalHomeomorphOfImageEq.
  • Rename homeomorphUnitBall to Homeomorph.unitBall.
  • Add LocalHomeomorph.univUnitBall, a LocalHomeomorph version of Homeomorph.unitBall.
  • Add LocalHomeomorph.unitBallBall and LocalHomeomorph.univBall.

Inspired by a definition from the sphere eversion project.

Diff
@@ -244,17 +244,27 @@ protected theorem surjOn : SurjOn e e.source e.target :=
   e.bijOn.surjOn
 #align local_equiv.surj_on LocalEquiv.surjOn
 
-/-- Associate a `LocalEquiv` to an `Equiv`. -/
-@[simps (config := mfld_cfg)]
-def _root_.Equiv.toLocalEquiv (e : α ≃ β) : LocalEquiv α β where
+/-- Interpret an `Equiv` as a `LocalEquiv` by restricting it to `s` in the domain
+and to `t` in the codomain. -/
+@[simps (config := .asFn)]
+def _root_.Equiv.toLocalEquivOfImageEq (e : α ≃ β) (s : Set α) (t : Set β) (h : e '' s = t) :
+    LocalEquiv α β where
   toFun := e
   invFun := e.symm
-  source := univ
-  target := univ
-  map_source' _ _ := mem_univ _
-  map_target' _ _ := mem_univ _
-  left_inv' x _ := e.left_inv x
-  right_inv' x _ := e.right_inv x
+  source := s
+  target := t
+  map_source' x hx := h ▸ mem_image_of_mem _ hx
+  map_target' x hx := by
+    subst t
+    rcases hx with ⟨x, hx, rfl⟩
+    rwa [e.symm_apply_apply]
+  left_inv' x _ := e.symm_apply_apply x
+  right_inv' x _ := e.apply_symm_apply x
+
+/-- Associate a `LocalEquiv` to an `Equiv`. -/
+@[simps! (config := mfld_cfg)]
+def _root_.Equiv.toLocalEquiv (e : α ≃ β) : LocalEquiv α β :=
+  e.toLocalEquivOfImageEq univ univ <| by rw [image_univ, e.surjective.range_eq]
 #align equiv.to_local_equiv Equiv.toLocalEquiv
 #align equiv.to_local_equiv_symm_apply Equiv.toLocalEquiv_symm_apply
 #align equiv.to_local_equiv_target Equiv.toLocalEquiv_target
feat: add some missing simp lemmas (#6028)
Diff
@@ -654,6 +654,7 @@ theorem ofSet_symm (s : Set α) : (LocalEquiv.ofSet s).symm = LocalEquiv.ofSet s
 
 /-- Composing two local equivs if the target of the first coincides with the source of the
 second. -/
+@[simps]
 protected def trans' (e' : LocalEquiv β γ) (h : e.target = e'.source) : LocalEquiv α γ where
   toFun := e' ∘ e
   invFun := e.symm ∘ e'.symm
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,16 +2,13 @@
 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 logic.equiv.local_equiv
-! leanprover-community/mathlib commit 48fb5b5280e7c81672afc9524185ae994553ebf4
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Data.Set.Function
 import Mathlib.Logic.Equiv.Defs
 import Mathlib.Tactic.Core
 
+#align_import logic.equiv.local_equiv from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4"
+
 /-!
 # Local equivalences
 
chore: cleanup whitespace (#5988)

Grepping for [^ .:{-] [^ :] and reviewing the results. Once I started I couldn't stop. :-)

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

Diff
@@ -17,7 +17,7 @@ import Mathlib.Tactic.Core
 
 This files defines equivalences between subsets of given types.
 An element `e` of `LocalEquiv α β` is made of two maps `e.toFun` and `e.invFun` respectively
-from α to β and from  β to α (just like equivs), which are inverse to each other on the subsets
+from α to β and from β to α (just like equivs), which are inverse to each other on the subsets
 `e.source` and `e.target` of respectively α and β.
 
 They are designed in particular to define charts on manifolds.
feat: add lemmas about LocalEquiv.pi (#5779)
Diff
@@ -1023,11 +1023,11 @@ theorem disjointUnion_eq_piecewise (e e' : LocalEquiv α β) (hs : Disjoint e.so
 
 section Pi
 
-variable {ι : Type _} {αi βi : ι → Type _} (ei : ∀ i, LocalEquiv (αi i) (βi i))
+variable {ι : Type _} {αi βi γi : ι → Type _}
 
 /-- The product of a family of local equivs, as a local equiv on the pi type. -/
-@[simps (config := mfld_cfg)]
-protected def pi : LocalEquiv (∀ i, αi i) (∀ i, βi i) where
+@[simps (config := mfld_cfg) apply source target]
+protected def pi (ei : ∀ i, LocalEquiv (αi i) (βi i)) : LocalEquiv (∀ i, αi i) (∀ i, βi i) where
   toFun f i := ei i (f i)
   invFun f i := (ei i).symm (f i)
   source := pi univ fun i => (ei i).source
@@ -1037,11 +1037,29 @@ protected def pi : LocalEquiv (∀ i, αi i) (∀ i, βi i) where
   left_inv' _ hf := funext fun i => (ei i).left_inv (hf i trivial)
   right_inv' _ hf := funext fun i => (ei i).right_inv (hf i trivial)
 #align local_equiv.pi LocalEquiv.pi
-#align local_equiv.pi_symm_apply LocalEquiv.pi_symm_apply
 #align local_equiv.pi_source LocalEquiv.pi_source
 #align local_equiv.pi_apply LocalEquiv.pi_apply
 #align local_equiv.pi_target LocalEquiv.pi_target
 
+@[simp, mfld_simps]
+theorem pi_symm (ei : ∀ i, LocalEquiv (αi i) (βi i)) :
+    (LocalEquiv.pi ei).symm = .pi fun i ↦ (ei i).symm :=
+  rfl
+
+theorem pi_symm_apply (ei : ∀ i, LocalEquiv (αi i) (βi i)) :
+    ⇑(LocalEquiv.pi ei).symm = fun f i ↦ (ei i).symm (f i) :=
+  rfl
+#align local_equiv.pi_symm_apply LocalEquiv.pi_symm_apply
+
+@[simp, mfld_simps]
+theorem pi_refl : (LocalEquiv.pi fun i ↦ LocalEquiv.refl (αi i)) = .refl (∀ i, αi i) := by
+  ext <;> simp
+
+@[simp, mfld_simps]
+theorem pi_trans (ei : ∀ i, LocalEquiv (αi i) (βi i)) (ei' : ∀ i, LocalEquiv (βi i) (γi i)) :
+    (LocalEquiv.pi ei).trans (LocalEquiv.pi ei') = .pi fun i ↦ (ei i).trans (ei' i) := by
+  ext <;> simp [forall_and]
+
 end Pi
 
 end LocalEquiv
refactor: move all register_simp_attrs to 1 file (#5681)

There are slight differences between mathlib3 and mathlib4 (different set of attributes, different lemmas are in core/std), so I redid the same refactor instead of forward-porting changes.

mathlib3 PR: leanprover-community/mathlib#19223

Diff
@@ -4,13 +4,12 @@ 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 logic.equiv.local_equiv
-! leanprover-community/mathlib commit aba57d4d3dae35460225919dcd82fe91355162f9
+! leanprover-community/mathlib commit 48fb5b5280e7c81672afc9524185ae994553ebf4
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
 import Mathlib.Data.Set.Function
 import Mathlib.Logic.Equiv.Defs
-import Mathlib.Logic.Equiv.MfldSimpsAttr
 import Mathlib.Tactic.Core
 
 /-!
@@ -80,18 +79,6 @@ This is in a separate file from `Mathlib.Logic.Equiv.MfldSimpsAttr` because attr
 file to become functional.
 -/
 
--- register in the simpset `mfld_simps` several lemmas that are often useful when dealing
--- with manifolds
-attribute [mfld_simps]
-  id.def Function.comp.left_id Set.mem_setOf_eq Set.image_eq_empty Set.univ_inter Set.preimage_univ
-  Set.prod_mk_mem_set_prod_eq and_true_iff Set.mem_univ Set.mem_image_of_mem true_and_iff
-  Set.mem_inter_iff Set.mem_preimage Function.comp_apply Set.inter_subset_left Set.mem_prod
-  Set.range_id Set.range_prod_map and_self_iff Set.mem_range_self eq_self_iff_true forall_const
-  forall_true_iff Set.inter_univ Set.preimage_id Function.comp.right_id not_false_iff and_imp
-  Set.prod_inter_prod Set.univ_prod_univ true_or_iff or_true_iff Prod.map_mk Set.preimage_inter
-  heq_iff_eq Equiv.sigmaEquivProd_apply Equiv.sigmaEquivProd_symm_apply Subtype.coe_mk
-  Equiv.toFun_as_coe Equiv.invFun_as_coe
-
 /-- Common `@[simps]` configuration options used for manifold-related declarations. -/
 def mfld_cfg : Simps.Config where
   attrs := [`mfld_simps]
fix: change compl precedence (#5586)

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

Diff
@@ -433,7 +433,7 @@ theorem of_symm_image_eq (h : e.symm '' (e.target ∩ t) = e.source ∩ s) : e.I
   of_preimage_eq <| Eq.trans (iff_preimage_eq.2 rfl).symm_image_eq.symm h
 #align local_equiv.is_image.of_symm_image_eq LocalEquiv.IsImage.of_symm_image_eq
 
-protected theorem compl (h : e.IsImage s t) : e.IsImage (sᶜ) (tᶜ) := fun _ hx => not_congr (h hx)
+protected theorem compl (h : e.IsImage s t) : e.IsImage sᶜ tᶜ := fun _ hx => not_congr (h hx)
 #align local_equiv.is_image.compl LocalEquiv.IsImage.compl
 
 protected theorem inter {s' t'} (h : e.IsImage s t) (h' : e.IsImage s' t') :
chore: mark LocalEquiv.toFun as coe (#4640)
Diff
@@ -150,6 +150,8 @@ structure LocalEquiv (α : Type _) (β : Type _) where
   right_inv' : ∀ ⦃x⦄, x ∈ target → toFun (invFun x) = x
 #align local_equiv LocalEquiv
 
+attribute [coe] LocalEquiv.toFun
+
 namespace LocalEquiv
 
 variable (e : LocalEquiv α β) (e' : LocalEquiv β γ)
feat: simps support additional simp-attributes (#2398)
  • Also fix the configuration option Simps.Config.lemmasOnly and use it in the library
  • Also use @[simps!] in the test file
  • Also remove the temporary configuration in LocalHomeomorph
  • Zulip thread
  • Fixes #2350
Diff
@@ -94,7 +94,7 @@ attribute [mfld_simps]
 
 /-- Common `@[simps]` configuration options used for manifold-related declarations. -/
 def mfld_cfg : Simps.Config where
-  attrs := [`simp, `mfld_simps]
+  attrs := [`mfld_simps]
   fullyApplied := false
 #align mfld_cfg mfld_cfg
 
fix: replace symmApply by symm_apply (#2560)
Diff
@@ -174,11 +174,11 @@ instance : CoeFun (LocalEquiv α β) fun _ => α → β :=
   ⟨LocalEquiv.toFun⟩
 
 /-- See Note [custom simps projection] -/
-def Simps.symmApply (e : LocalEquiv α β) : β → α :=
+def Simps.symm_apply (e : LocalEquiv α β) : β → α :=
   e.symm
-#align local_equiv.simps.symm_apply LocalEquiv.Simps.symmApply
+#align local_equiv.simps.symm_apply LocalEquiv.Simps.symm_apply
 
-initialize_simps_projections LocalEquiv (toFun → apply, invFun → symmApply)
+initialize_simps_projections LocalEquiv (toFun → apply, invFun → symm_apply)
 
 -- Porting note: this can be proven with `dsimp only`
 -- @[simp, mfld_simps]
@@ -270,7 +270,7 @@ def _root_.Equiv.toLocalEquiv (e : α ≃ β) : LocalEquiv α β where
   left_inv' x _ := e.left_inv x
   right_inv' x _ := e.right_inv x
 #align equiv.to_local_equiv Equiv.toLocalEquiv
-#align equiv.to_local_equiv_symm_apply Equiv.toLocalEquiv_symmApply
+#align equiv.to_local_equiv_symm_apply Equiv.toLocalEquiv_symm_apply
 #align equiv.to_local_equiv_target Equiv.toLocalEquiv_target
 #align equiv.to_local_equiv_apply Equiv.toLocalEquiv_apply
 #align equiv.to_local_equiv_source Equiv.toLocalEquiv_source
@@ -295,7 +295,7 @@ def copy (e : LocalEquiv α β) (f : α → β) (hf : ⇑e = f) (g : β → α)
 #align local_equiv.copy LocalEquiv.copy
 #align local_equiv.copy_source LocalEquiv.copy_source
 #align local_equiv.copy_apply LocalEquiv.copy_apply
-#align local_equiv.copy_symm_apply LocalEquiv.copy_symmApply
+#align local_equiv.copy_symm_apply LocalEquiv.copy_symm_apply
 #align local_equiv.copy_target LocalEquiv.copy_target
 
 theorem copy_eq (e : LocalEquiv α β) (f : α → β) (hf : ⇑e = f) (g : β → α) (hg : ⇑e.symm = g)
@@ -397,7 +397,7 @@ def restr (h : e.IsImage s t) : LocalEquiv α β where
 #align local_equiv.is_image.restr_apply LocalEquiv.IsImage.restr_apply
 #align local_equiv.is_image.restr_source LocalEquiv.IsImage.restr_source
 #align local_equiv.is_image.restr_target LocalEquiv.IsImage.restr_target
-#align local_equiv.is_image.restr_symm_apply LocalEquiv.IsImage.restr_symmApply
+#align local_equiv.is_image.restr_symm_apply LocalEquiv.IsImage.restr_symm_apply
 
 theorem image_eq (h : e.IsImage s t) : e '' (e.source ∩ s) = e.target ∩ t :=
   h.restr.image_source_eq_target
@@ -787,7 +787,7 @@ def transEquiv (e' : β ≃ γ) : LocalEquiv α γ :=
 #align local_equiv.trans_equiv_source LocalEquiv.transEquiv_source
 #align local_equiv.trans_equiv_apply LocalEquiv.transEquiv_apply
 #align local_equiv.trans_equiv_target LocalEquiv.transEquiv_target
-#align local_equiv.trans_equiv_symm_apply LocalEquiv.transEquiv_symmApply
+#align local_equiv.trans_equiv_symm_apply LocalEquiv.transEquiv_symm_apply
 
 theorem transEquiv_eq_trans (e' : β ≃ γ) : e.transEquiv e' = e.trans e'.toLocalEquiv :=
   copy_eq ..
@@ -803,7 +803,7 @@ def _root_.Equiv.transLocalEquiv (e : α ≃ β) : LocalEquiv α γ :=
 #align equiv.trans_local_equiv_target Equiv.transLocalEquiv_target
 #align equiv.trans_local_equiv_apply Equiv.transLocalEquiv_apply
 #align equiv.trans_local_equiv_source Equiv.transLocalEquiv_source
-#align equiv.trans_local_equiv_symm_apply Equiv.transLocalEquiv_symmApply
+#align equiv.trans_local_equiv_symm_apply Equiv.transLocalEquiv_symm_apply
 
 theorem _root_.Equiv.transLocalEquiv_eq_trans (e : α ≃ β) :
     e.transLocalEquiv e' = e.toLocalEquiv.trans e' :=
@@ -998,7 +998,7 @@ def piecewise (e e' : LocalEquiv α β) (s : Set α) (t : Set β) [∀ x, Decida
 #align local_equiv.piecewise LocalEquiv.piecewise
 #align local_equiv.piecewise_source LocalEquiv.piecewise_source
 #align local_equiv.piecewise_target LocalEquiv.piecewise_target
-#align local_equiv.piecewise_symm_apply LocalEquiv.piecewise_symmApply
+#align local_equiv.piecewise_symm_apply LocalEquiv.piecewise_symm_apply
 #align local_equiv.piecewise_apply LocalEquiv.piecewise_apply
 
 theorem symm_piecewise (e e' : LocalEquiv α β) {s : Set α} {t : Set β} [∀ x, Decidable (x ∈ s)]
@@ -1020,7 +1020,7 @@ def disjointUnion (e e' : LocalEquiv α β) (hs : Disjoint e.source e'.source)
 #align local_equiv.disjoint_union LocalEquiv.disjointUnion
 #align local_equiv.disjoint_union_source LocalEquiv.disjointUnion_source
 #align local_equiv.disjoint_union_target LocalEquiv.disjointUnion_target
-#align local_equiv.disjoint_union_symm_apply LocalEquiv.disjointUnion_symmApply
+#align local_equiv.disjoint_union_symm_apply LocalEquiv.disjointUnion_symm_apply
 #align local_equiv.disjoint_union_apply LocalEquiv.disjointUnion_apply
 
 theorem disjointUnion_eq_piecewise (e e' : LocalEquiv α β) (hs : Disjoint e.source e'.source)
@@ -1048,7 +1048,7 @@ protected def pi : LocalEquiv (∀ i, αi i) (∀ i, βi i) where
   left_inv' _ hf := funext fun i => (ei i).left_inv (hf i trivial)
   right_inv' _ hf := funext fun i => (ei i).right_inv (hf i trivial)
 #align local_equiv.pi LocalEquiv.pi
-#align local_equiv.pi_symm_apply LocalEquiv.pi_symmApply
+#align local_equiv.pi_symm_apply LocalEquiv.pi_symm_apply
 #align local_equiv.pi_source LocalEquiv.pi_source
 #align local_equiv.pi_apply LocalEquiv.pi_apply
 #align local_equiv.pi_target LocalEquiv.pi_target
@@ -1075,7 +1075,7 @@ noncomputable def BijOn.toLocalEquiv [Nonempty α] (f : α → β) (s : Set α)
   right_inv' := hf.invOn_invFunOn.2
 #align set.bij_on.to_local_equiv Set.BijOn.toLocalEquiv
 #align set.bij_on.to_local_equiv_target Set.BijOn.toLocalEquiv_target
-#align set.bij_on.to_local_equiv_symm_apply Set.BijOn.toLocalEquiv_symmApply
+#align set.bij_on.to_local_equiv_symm_apply Set.BijOn.toLocalEquiv_symm_apply
 #align set.bij_on.to_local_equiv_apply Set.BijOn.toLocalEquiv_apply
 #align set.bij_on.to_local_equiv_source Set.BijOn.toLocalEquiv_source
 
feat: port Topology.LocalHomeomorph (#2231)
Diff
@@ -307,7 +307,7 @@ theorem copy_eq (e : LocalEquiv α β) (f : α → β) (hf : ⇑e = f) (g : β 
 #align local_equiv.copy_eq LocalEquiv.copy_eq
 
 /-- Associate to a `LocalEquiv` an `Equiv` between the source and the target. -/
-protected def toEquiv : Equiv e.source e.target where
+protected def toEquiv : e.source ≃ e.target where
   toFun x := ⟨e x, e.map_source x.mem⟩
   invFun y := ⟨e.symm y, e.map_target y.mem⟩
   left_inv := fun ⟨_, hx⟩ => Subtype.eq <| e.left_inv hx
@@ -752,6 +752,9 @@ theorem refl_trans : (LocalEquiv.refl α).trans e = e :=
   LocalEquiv.ext (fun x => rfl) (fun x => rfl) (by simp [trans_source, preimage_id])
 #align local_equiv.refl_trans LocalEquiv.refl_trans
 
+theorem trans_ofSet (s : Set β) : e.trans (ofSet s) = e.restr (e ⁻¹' s) :=
+  LocalEquiv.ext (fun _ => rfl) (fun _ => rfl) rfl
+
 theorem trans_refl_restr (s : Set β) : e.trans ((LocalEquiv.refl β).restr s) = e.restr (e ⁻¹' s) :=
   LocalEquiv.ext (fun x => rfl) (fun x => rfl) (by simp [trans_source])
 #align local_equiv.trans_refl_restr LocalEquiv.trans_refl_restr
feat: require @[simps!] if simps runs in expensive mode (#1885)
  • This does not change the behavior of simps, just raises a linter error if you run simps in a more expensive mode without writing !.
  • Fixed some incorrect occurrences of to_additive, simps. Will do that systematically in future PR.
  • Fix port of OmegaCompletePartialOrder.ContinuousHom.ofMono a bit

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

Diff
@@ -776,7 +776,7 @@ theorem mem_symm_trans_source {e' : LocalEquiv α γ} {x : α} (he : x ∈ e.sou
 
 /-- Postcompose a local equivalence with an equivalence.
 We modify the source and target to have better definitional behavior. -/
-@[simps]
+@[simps!]
 def transEquiv (e' : β ≃ γ) : LocalEquiv α γ :=
   (e.trans e'.toLocalEquiv).copy _ rfl _ rfl e.source (inter_univ _) (e'.symm ⁻¹' e.target)
     (univ_inter _)
@@ -792,7 +792,7 @@ theorem transEquiv_eq_trans (e' : β ≃ γ) : e.transEquiv e' = e.trans e'.toLo
 
 /-- Precompose a local equivalence with an equivalence.
 We modify the source and target to have better definitional behavior. -/
-@[simps]
+@[simps!]
 def _root_.Equiv.transLocalEquiv (e : α ≃ β) : LocalEquiv α γ :=
   (e.toLocalEquiv.trans e').copy _ rfl _ rfl (e ⁻¹' e'.source) (univ_inter _) e'.target
     (inter_univ _)
@@ -1007,7 +1007,7 @@ theorem symm_piecewise (e e' : LocalEquiv α β) {s : Set α} {t : Set β} [∀
 /-- Combine two `LocalEquiv`s with disjoint sources and disjoint targets. We reuse
 `LocalEquiv.piecewise`, then override `source` and `target` to ensure better definitional
 equalities. -/
-@[simps (config := { fullyApplied := false })]
+@[simps! (config := { fullyApplied := false })]
 def disjointUnion (e e' : LocalEquiv α β) (hs : Disjoint e.source e'.source)
     (ht : Disjoint e.target e'.target) [∀ x, Decidable (x ∈ e.source)]
     [∀ y, Decidable (y ∈ e.target)] : LocalEquiv α β :=
chore: add missing #align statements (#1902)

This PR is the result of a slight variant on the following "algorithm"

  • take all mathlib 3 names, remove _ and make all uppercase letters into lowercase
  • take all mathlib 4 names, remove _ and make all uppercase letters into lowercase
  • look for matches, and create pairs (original_lean3_name, OriginalLean4Name)
  • for pairs that do not have an align statement:
    • use Lean 4 to lookup the file + position of the Lean 4 name
    • add an #align statement just before the next empty line
  • manually fix some tiny mistakes (e.g., empty lines in proofs might cause the #align statement to have been inserted too early)
Diff
@@ -270,6 +270,10 @@ def _root_.Equiv.toLocalEquiv (e : α ≃ β) : LocalEquiv α β where
   left_inv' x _ := e.left_inv x
   right_inv' x _ := e.right_inv x
 #align equiv.to_local_equiv Equiv.toLocalEquiv
+#align equiv.to_local_equiv_symm_apply Equiv.toLocalEquiv_symmApply
+#align equiv.to_local_equiv_target Equiv.toLocalEquiv_target
+#align equiv.to_local_equiv_apply Equiv.toLocalEquiv_apply
+#align equiv.to_local_equiv_source Equiv.toLocalEquiv_source
 
 instance inhabitedOfEmpty [IsEmpty α] [IsEmpty β] : Inhabited (LocalEquiv α β) :=
   ⟨((Equiv.equivEmpty α).trans (Equiv.equivEmpty β).symm).toLocalEquiv⟩
@@ -289,6 +293,10 @@ def copy (e : LocalEquiv α β) (f : α → β) (hf : ⇑e = f) (g : β → α)
   left_inv' _ := hs ▸ hf ▸ hg ▸ e.left_inv
   right_inv' _ := ht ▸ hf ▸ hg ▸ e.right_inv
 #align local_equiv.copy LocalEquiv.copy
+#align local_equiv.copy_source LocalEquiv.copy_source
+#align local_equiv.copy_apply LocalEquiv.copy_apply
+#align local_equiv.copy_symm_apply LocalEquiv.copy_symmApply
+#align local_equiv.copy_target LocalEquiv.copy_target
 
 theorem copy_eq (e : LocalEquiv α β) (f : α → β) (hf : ⇑e = f) (g : β → α) (hg : ⇑e.symm = g)
     (s : Set α) (hs : e.source = s) (t : Set β) (ht : e.target = t) :
@@ -386,6 +394,10 @@ def restr (h : e.IsImage s t) : LocalEquiv α β where
   left_inv' := e.leftInvOn.mono (inter_subset_left _ _)
   right_inv' := e.rightInvOn.mono (inter_subset_left _ _)
 #align local_equiv.is_image.restr LocalEquiv.IsImage.restr
+#align local_equiv.is_image.restr_apply LocalEquiv.IsImage.restr_apply
+#align local_equiv.is_image.restr_source LocalEquiv.IsImage.restr_source
+#align local_equiv.is_image.restr_target LocalEquiv.IsImage.restr_target
+#align local_equiv.is_image.restr_symm_apply LocalEquiv.IsImage.restr_symmApply
 
 theorem image_eq (h : e.IsImage s t) : e '' (e.source ∩ s) = e.target ∩ t :=
   h.restr.image_source_eq_target
@@ -400,12 +412,16 @@ theorem iff_preimage_eq : e.IsImage s t ↔ e.source ∩ e ⁻¹' t = e.source 
 #align local_equiv.is_image.iff_preimage_eq LocalEquiv.IsImage.iff_preimage_eq
 
 alias iff_preimage_eq ↔ preimage_eq of_preimage_eq
+#align local_equiv.is_image.of_preimage_eq LocalEquiv.IsImage.of_preimage_eq
+#align local_equiv.is_image.preimage_eq LocalEquiv.IsImage.preimage_eq
 
 theorem iff_symm_preimage_eq : e.IsImage s t ↔ e.target ∩ e.symm ⁻¹' s = e.target ∩ t :=
   symm_iff.symm.trans iff_preimage_eq
 #align local_equiv.is_image.iff_symm_preimage_eq LocalEquiv.IsImage.iff_symm_preimage_eq
 
 alias iff_symm_preimage_eq ↔ symm_preimage_eq of_symm_preimage_eq
+#align local_equiv.is_image.of_symm_preimage_eq LocalEquiv.IsImage.of_symm_preimage_eq
+#align local_equiv.is_image.symm_preimage_eq LocalEquiv.IsImage.symm_preimage_eq
 
 theorem of_image_eq (h : e '' (e.source ∩ s) = e.target ∩ t) : e.IsImage s t :=
   of_symm_preimage_eq <| Eq.trans (of_symm_preimage_eq rfl).image_eq.symm h
@@ -765,6 +781,10 @@ def transEquiv (e' : β ≃ γ) : LocalEquiv α γ :=
   (e.trans e'.toLocalEquiv).copy _ rfl _ rfl e.source (inter_univ _) (e'.symm ⁻¹' e.target)
     (univ_inter _)
 #align local_equiv.trans_equiv LocalEquiv.transEquiv
+#align local_equiv.trans_equiv_source LocalEquiv.transEquiv_source
+#align local_equiv.trans_equiv_apply LocalEquiv.transEquiv_apply
+#align local_equiv.trans_equiv_target LocalEquiv.transEquiv_target
+#align local_equiv.trans_equiv_symm_apply LocalEquiv.transEquiv_symmApply
 
 theorem transEquiv_eq_trans (e' : β ≃ γ) : e.transEquiv e' = e.trans e'.toLocalEquiv :=
   copy_eq ..
@@ -777,6 +797,10 @@ def _root_.Equiv.transLocalEquiv (e : α ≃ β) : LocalEquiv α γ :=
   (e.toLocalEquiv.trans e').copy _ rfl _ rfl (e ⁻¹' e'.source) (univ_inter _) e'.target
     (inter_univ _)
 #align equiv.trans_local_equiv Equiv.transLocalEquiv
+#align equiv.trans_local_equiv_target Equiv.transLocalEquiv_target
+#align equiv.trans_local_equiv_apply Equiv.transLocalEquiv_apply
+#align equiv.trans_local_equiv_source Equiv.transLocalEquiv_source
+#align equiv.trans_local_equiv_symm_apply Equiv.transLocalEquiv_symmApply
 
 theorem _root_.Equiv.transLocalEquiv_eq_trans (e : α ≃ β) :
     e.transLocalEquiv e' = e.toLocalEquiv.trans e' :=
@@ -969,6 +993,10 @@ def piecewise (e e' : LocalEquiv α β) (s : Set α) (t : Set β) [∀ x, Decida
   left_inv' := H.leftInvOn_piecewise H'
   right_inv' := H.symm.leftInvOn_piecewise H'.symm
 #align local_equiv.piecewise LocalEquiv.piecewise
+#align local_equiv.piecewise_source LocalEquiv.piecewise_source
+#align local_equiv.piecewise_target LocalEquiv.piecewise_target
+#align local_equiv.piecewise_symm_apply LocalEquiv.piecewise_symmApply
+#align local_equiv.piecewise_apply LocalEquiv.piecewise_apply
 
 theorem symm_piecewise (e e' : LocalEquiv α β) {s : Set α} {t : Set β} [∀ x, Decidable (x ∈ s)]
     [∀ y, Decidable (y ∈ t)] (H : e.IsImage s t) (H' : e'.IsImage s t) :
@@ -987,6 +1015,10 @@ def disjointUnion (e e' : LocalEquiv α β) (hs : Disjoint e.source e'.source)
         e'.isImage_source_target_of_disjoint _ hs.symm ht.symm).copy
     _ rfl _ rfl (e.source ∪ e'.source) (ite_left _ _) (e.target ∪ e'.target) (ite_left _ _)
 #align local_equiv.disjoint_union LocalEquiv.disjointUnion
+#align local_equiv.disjoint_union_source LocalEquiv.disjointUnion_source
+#align local_equiv.disjoint_union_target LocalEquiv.disjointUnion_target
+#align local_equiv.disjoint_union_symm_apply LocalEquiv.disjointUnion_symmApply
+#align local_equiv.disjoint_union_apply LocalEquiv.disjointUnion_apply
 
 theorem disjointUnion_eq_piecewise (e e' : LocalEquiv α β) (hs : Disjoint e.source e'.source)
     (ht : Disjoint e.target e'.target) [∀ x, Decidable (x ∈ e.source)]
@@ -1013,6 +1045,10 @@ protected def pi : LocalEquiv (∀ i, αi i) (∀ i, βi i) where
   left_inv' _ hf := funext fun i => (ei i).left_inv (hf i trivial)
   right_inv' _ hf := funext fun i => (ei i).right_inv (hf i trivial)
 #align local_equiv.pi LocalEquiv.pi
+#align local_equiv.pi_symm_apply LocalEquiv.pi_symmApply
+#align local_equiv.pi_source LocalEquiv.pi_source
+#align local_equiv.pi_apply LocalEquiv.pi_apply
+#align local_equiv.pi_target LocalEquiv.pi_target
 
 end Pi
 
@@ -1035,6 +1071,10 @@ noncomputable def BijOn.toLocalEquiv [Nonempty α] (f : α → β) (s : Set α)
   left_inv' := hf.invOn_invFunOn.1
   right_inv' := hf.invOn_invFunOn.2
 #align set.bij_on.to_local_equiv Set.BijOn.toLocalEquiv
+#align set.bij_on.to_local_equiv_target Set.BijOn.toLocalEquiv_target
+#align set.bij_on.to_local_equiv_symm_apply Set.BijOn.toLocalEquiv_symmApply
+#align set.bij_on.to_local_equiv_apply Set.BijOn.toLocalEquiv_apply
+#align set.bij_on.to_local_equiv_source Set.BijOn.toLocalEquiv_source
 
 /-- A map injective on a subset of its domain provides a local equivalence. -/
 @[simp, mfld_simps]
chore: format by line breaks with long lines (#1529)

This was done semi-automatically with some regular expressions in vim in contrast to the fully automatic https://github.com/leanprover-community/mathlib4/pull/1523.

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

Diff
@@ -936,8 +936,8 @@ theorem prod_symm (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
 #align local_equiv.prod_symm LocalEquiv.prod_symm
 
 @[simp, mfld_simps]
-theorem refl_prod_refl : (LocalEquiv.refl α).prod (LocalEquiv.refl β) = LocalEquiv.refl (α × β) :=
-  by
+theorem refl_prod_refl :
+    (LocalEquiv.refl α).prod (LocalEquiv.refl β) = LocalEquiv.refl (α × β) := by
   -- Porting note: `ext1 ⟨x, y⟩` insufficient number of binders
   ext ⟨x, y⟩ <;> simp
 #align local_equiv.refl_prod_refl LocalEquiv.refl_prod_refl
chore: the style linter shouldn't complain about long #align lines (#1643)
Diff
@@ -443,9 +443,7 @@ theorem leftInvOn_piecewise {e' : LocalEquiv α β} [∀ i, Decidable (i ∈ s)]
 theorem inter_eq_of_inter_eq_of_eqOn {e' : LocalEquiv α β} (h : e.IsImage s t)
     (h' : e'.IsImage s t) (hs : e.source ∩ s = e'.source ∩ s) (heq : EqOn e e' (e.source ∩ s)) :
     e.target ∩ t = e'.target ∩ t := by rw [← h.image_eq, ← h'.image_eq, ← hs, heq.image_eq]
-#align
-  local_equiv.is_image.inter_eq_of_inter_eq_of_eq_on
-  LocalEquiv.IsImage.inter_eq_of_inter_eq_of_eqOn
+#align local_equiv.is_image.inter_eq_of_inter_eq_of_eq_on LocalEquiv.IsImage.inter_eq_of_inter_eq_of_eqOn
 
 theorem symm_eq_on_of_inter_eq_of_eqOn {e' : LocalEquiv α β} (h : e.IsImage s t)
     (hs : e.source ∩ s = e'.source ∩ s) (heq : EqOn e e' (e.source ∩ s)) :
@@ -454,9 +452,7 @@ theorem symm_eq_on_of_inter_eq_of_eqOn {e' : LocalEquiv α β} (h : e.IsImage s
   rintro y ⟨x, hx, rfl⟩
   have hx' := hx; rw [hs] at hx'
   rw [e.left_inv hx.1, heq hx, e'.left_inv hx'.1]
-#align
-  local_equiv.is_image.symm_eq_on_of_inter_eq_of_eq_on
-  LocalEquiv.IsImage.symm_eq_on_of_inter_eq_of_eqOn
+#align local_equiv.is_image.symm_eq_on_of_inter_eq_of_eq_on LocalEquiv.IsImage.symm_eq_on_of_inter_eq_of_eqOn
 
 end IsImage
 
@@ -485,8 +481,7 @@ theorem image_eq_target_inter_inv_preimage {s : Set α} (h : s ⊆ e.source) :
 theorem symm_image_eq_source_inter_preimage {s : Set β} (h : s ⊆ e.target) :
     e.symm '' s = e.source ∩ e ⁻¹' s :=
   e.symm.image_eq_target_inter_inv_preimage h
-#align
-  local_equiv.symm_image_eq_source_inter_preimage LocalEquiv.symm_image_eq_source_inter_preimage
+#align local_equiv.symm_image_eq_source_inter_preimage LocalEquiv.symm_image_eq_source_inter_preimage
 
 theorem symm_image_target_inter_eq (s : Set β) :
     e.symm '' (e.target ∩ s) = e.source ∩ e ⁻¹' (e.target ∩ s) :=
@@ -860,8 +855,7 @@ theorem EqOnSource.restr {e e' : LocalEquiv α β} (he : e ≈ e') (s : Set α)
 /-- Preimages are respected by equivalence -/
 theorem EqOnSource.source_inter_preimage_eq {e e' : LocalEquiv α β} (he : e ≈ e') (s : Set β) :
     e.source ∩ e ⁻¹' s = e'.source ∩ e' ⁻¹' s := by rw [he.eqOn.inter_preimage_eq, source_eq he]
-#align
-  local_equiv.eq_on_source.source_inter_preimage_eq LocalEquiv.EqOnSource.source_inter_preimage_eq
+#align local_equiv.eq_on_source.source_inter_preimage_eq LocalEquiv.EqOnSource.source_inter_preimage_eq
 
 /-- Composition of a local equiv and its inverse is equivalent to the restriction of the identity
 to the source -/
chore: tidy various files (#1412)
Diff
@@ -254,14 +254,13 @@ protected theorem bijOn : BijOn e e.source e.target :=
   e.invOn.bijOn e.mapsTo e.symm_mapsTo
 #align local_equiv.bij_on LocalEquiv.bijOn
 
-protected theorem surj_on : SurjOn e e.source e.target :=
+protected theorem surjOn : SurjOn e e.source e.target :=
   e.bijOn.surjOn
-#align local_equiv.surj_on LocalEquiv.surj_on
+#align local_equiv.surj_on LocalEquiv.surjOn
 
 /-- Associate a `LocalEquiv` to an `Equiv`. -/
 @[simps (config := mfld_cfg)]
-def _root_.Equiv.toLocalEquiv (e : α ≃ β) :
-    LocalEquiv α β where
+def _root_.Equiv.toLocalEquiv (e : α ≃ β) : LocalEquiv α β where
   toFun := e
   invFun := e.symm
   source := univ
@@ -300,8 +299,7 @@ theorem copy_eq (e : LocalEquiv α β) (f : α → β) (hf : ⇑e = f) (g : β 
 #align local_equiv.copy_eq LocalEquiv.copy_eq
 
 /-- Associate to a `LocalEquiv` an `Equiv` between the source and the target. -/
-protected def toEquiv :
-    Equiv e.source e.target where
+protected def toEquiv : Equiv e.source e.target where
   toFun x := ⟨e x, e.map_source x.mem⟩
   invFun y := ⟨e.symm y, e.map_target y.mem⟩
   left_inv := fun ⟨_, hx⟩ => Subtype.eq <| e.left_inv hx
@@ -378,8 +376,7 @@ theorem symm_mapsTo (h : e.IsImage s t) : MapsTo e.symm (e.target ∩ t) (e.sour
 
 /-- Restrict a `LocalEquiv` to a pair of corresponding sets. -/
 @[simps (config := { fullyApplied := false })]
-def restr (h : e.IsImage s t) : LocalEquiv α
-      β where
+def restr (h : e.IsImage s t) : LocalEquiv α β where
   toFun := e
   invFun := e.symm
   source := e.source ∩ s
@@ -439,28 +436,27 @@ theorem leftInvOn_piecewise {e' : LocalEquiv α β} [∀ i, Decidable (i ∈ s)]
     LeftInvOn (t.piecewise e.symm e'.symm) (s.piecewise e e') (s.ite e.source e'.source) := by
   rintro x (⟨he, hs⟩ | ⟨he, hs : x ∉ s⟩)
   · rw [piecewise_eq_of_mem _ _ _ hs, piecewise_eq_of_mem _ _ _ ((h he).2 hs), e.left_inv he]
-  ·
-    rw [piecewise_eq_of_not_mem _ _ _ hs, piecewise_eq_of_not_mem _ _ _ ((h'.compl he).2 hs),
+  · rw [piecewise_eq_of_not_mem _ _ _ hs, piecewise_eq_of_not_mem _ _ _ ((h'.compl he).2 hs),
       e'.left_inv he]
 #align local_equiv.is_image.left_inv_on_piecewise LocalEquiv.IsImage.leftInvOn_piecewise
 
-theorem inter_eq_of_inter_eq_of_eq_on {e' : LocalEquiv α β} (h : e.IsImage s t)
-    (h' : e'.IsImage s t) (hs : e.source ∩ s = e'.source ∩ s) (Heq : EqOn e e' (e.source ∩ s)) :
-    e.target ∩ t = e'.target ∩ t := by rw [← h.image_eq, ← h'.image_eq, ← hs, Heq.image_eq]
+theorem inter_eq_of_inter_eq_of_eqOn {e' : LocalEquiv α β} (h : e.IsImage s t)
+    (h' : e'.IsImage s t) (hs : e.source ∩ s = e'.source ∩ s) (heq : EqOn e e' (e.source ∩ s)) :
+    e.target ∩ t = e'.target ∩ t := by rw [← h.image_eq, ← h'.image_eq, ← hs, heq.image_eq]
 #align
   local_equiv.is_image.inter_eq_of_inter_eq_of_eq_on
-  LocalEquiv.IsImage.inter_eq_of_inter_eq_of_eq_on
+  LocalEquiv.IsImage.inter_eq_of_inter_eq_of_eqOn
 
-theorem symm_eq_on_of_inter_eq_of_eq_on {e' : LocalEquiv α β} (h : e.IsImage s t)
-    (hs : e.source ∩ s = e'.source ∩ s) (Heq : EqOn e e' (e.source ∩ s)) :
+theorem symm_eq_on_of_inter_eq_of_eqOn {e' : LocalEquiv α β} (h : e.IsImage s t)
+    (hs : e.source ∩ s = e'.source ∩ s) (heq : EqOn e e' (e.source ∩ s)) :
     EqOn e.symm e'.symm (e.target ∩ t) := by
   rw [← h.image_eq]
   rintro y ⟨x, hx, rfl⟩
   have hx' := hx; rw [hs] at hx'
-  rw [e.left_inv hx.1, Heq hx, e'.left_inv hx'.1]
+  rw [e.left_inv hx.1, heq hx, e'.left_inv hx'.1]
 #align
   local_equiv.is_image.symm_eq_on_of_inter_eq_of_eq_on
-  LocalEquiv.IsImage.symm_eq_on_of_inter_eq_of_eq_on
+  LocalEquiv.IsImage.symm_eq_on_of_inter_eq_of_eqOn
 
 end IsImage
 
@@ -661,8 +657,7 @@ theorem ofSet_symm (s : Set α) : (LocalEquiv.ofSet s).symm = LocalEquiv.ofSet s
 
 /-- Composing two local equivs if the target of the first coincides with the source of the
 second. -/
-protected def trans' (e' : LocalEquiv β γ) (h : e.target = e'.source) :
-    LocalEquiv α γ where
+protected def trans' (e' : LocalEquiv β γ) (h : e.target = e'.source) : LocalEquiv α γ where
   toFun := e' ∘ e
   invFun := e.symm ∘ e'.symm
   source := e.source
@@ -788,10 +783,10 @@ def _root_.Equiv.transLocalEquiv (e : α ≃ β) : LocalEquiv α γ :=
     (inter_univ _)
 #align equiv.trans_local_equiv Equiv.transLocalEquiv
 
-theorem _root_.Equiv.trans_localEquiv_eq_trans (e : α ≃ β) :
+theorem _root_.Equiv.transLocalEquiv_eq_trans (e : α ≃ β) :
     e.transLocalEquiv e' = e.toLocalEquiv.trans e' :=
   copy_eq ..
-#align equiv.trans_local_equiv_eq_trans Equiv.trans_localEquiv_eq_trans
+#align equiv.trans_local_equiv_eq_trans Equiv.transLocalEquiv_eq_trans
 
 /-- `EqOnSource e e'` means that `e` and `e'` have the same source, and coincide there. Then `e`
 and `e'` should really be considered the same local equiv. -/
@@ -801,8 +796,7 @@ def EqOnSource (e e' : LocalEquiv α β) : Prop :=
 
 /-- `EqOnSource` is an equivalence relation. This instance provides the `≈` notation between two
 `LocalEquiv`s. -/
-instance eqOnSourceSetoid :
-    Setoid (LocalEquiv α β) where
+instance eqOnSourceSetoid : Setoid (LocalEquiv α β) where
   r := EqOnSource
   iseqv := by constructor <;> simp only [Equivalence, EqOnSource, EqOn] <;> aesop
 #align local_equiv.eq_on_source_setoid LocalEquiv.eqOnSourceSetoid
@@ -899,8 +893,7 @@ theorem eq_of_eq_on_source_univ (e e' : LocalEquiv α β) (h : e ≈ e') (s : e.
 section Prod
 
 /-- The product of two local equivs, as a local equiv on the product. -/
-def prod (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
-    LocalEquiv (α × γ) (β × δ) where
+def prod (e : LocalEquiv α β) (e' : LocalEquiv γ δ) : LocalEquiv (α × γ) (β × δ) where
   source := e.source ×ˢ e'.source
   target := e.target ×ˢ e'.target
   toFun p := (e p.1, e' p.2)
@@ -1001,14 +994,14 @@ def disjointUnion (e e' : LocalEquiv α β) (hs : Disjoint e.source e'.source)
     _ rfl _ rfl (e.source ∪ e'.source) (ite_left _ _) (e.target ∪ e'.target) (ite_left _ _)
 #align local_equiv.disjoint_union LocalEquiv.disjointUnion
 
-theorem disjoint_union_eq_piecewise (e e' : LocalEquiv α β) (hs : Disjoint e.source e'.source)
+theorem disjointUnion_eq_piecewise (e e' : LocalEquiv α β) (hs : Disjoint e.source e'.source)
     (ht : Disjoint e.target e'.target) [∀ x, Decidable (x ∈ e.source)]
     [∀ y, Decidable (y ∈ e.target)] :
     e.disjointUnion e' hs ht =
       e.piecewise e' e.source e.target e.isImage_source_target
         (e'.isImage_source_target_of_disjoint _ hs.symm ht.symm) :=
   copy_eq ..
-#align local_equiv.disjoint_union_eq_piecewise LocalEquiv.disjoint_union_eq_piecewise
+#align local_equiv.disjoint_union_eq_piecewise LocalEquiv.disjointUnion_eq_piecewise
 
 section Pi
 
@@ -1016,9 +1009,7 @@ variable {ι : Type _} {αi βi : ι → Type _} (ei : ∀ i, LocalEquiv (αi i)
 
 /-- The product of a family of local equivs, as a local equiv on the pi type. -/
 @[simps (config := mfld_cfg)]
-protected def pi :
-    LocalEquiv (∀ i, αi i) (∀ i,
-        βi i) where
+protected def pi : LocalEquiv (∀ i, αi i) (∀ i, βi i) where
   toFun f i := ei i (f i)
   invFun f i := (ei i).symm (f i)
   source := pi univ fun i => (ei i).source
chore: remove iff_self from simp only after lean4#1933 (#1406)

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

Diff
@@ -399,7 +399,7 @@ theorem symm_image_eq (h : e.IsImage s t) : e.symm '' (e.target ∩ t) = e.sourc
 #align local_equiv.is_image.symm_image_eq LocalEquiv.IsImage.symm_image_eq
 
 theorem iff_preimage_eq : e.IsImage s t ↔ e.source ∩ e ⁻¹' t = e.source ∩ s := by
-  simp only [IsImage, ext_iff, mem_inter_iff, mem_preimage, and_congr_right_iff, iff_self]
+  simp only [IsImage, ext_iff, mem_inter_iff, mem_preimage, and_congr_right_iff]
 #align local_equiv.is_image.iff_preimage_eq LocalEquiv.IsImage.iff_preimage_eq
 
 alias iff_preimage_eq ↔ preimage_eq of_preimage_eq
@@ -504,7 +504,7 @@ theorem symm_image_target_inter_eq' (s : Set β) : e.symm '' (e.target ∩ s) =
 theorem source_inter_preimage_inv_preimage (s : Set α) :
     e.source ∩ e ⁻¹' (e.symm ⁻¹' s) = e.source ∩ s :=
   Set.ext fun x => and_congr_right_iff.2 fun hx =>
-    by simp only [mem_preimage, e.left_inv hx, iff_self]
+    by simp only [mem_preimage, e.left_inv hx]
 #align local_equiv.source_inter_preimage_inv_preimage LocalEquiv.source_inter_preimage_inv_preimage
 
 theorem source_inter_preimage_target_inter (s : Set β) :
chore: bump to nightly-2023-01-06 (#1397)

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

Diff
@@ -850,9 +850,7 @@ theorem EqOnSource.trans' {e e' : LocalEquiv α β} {f f' : LocalEquiv β γ} (h
     exact (he.symm'.eqOn.mono <| inter_subset_left _ _).image_eq
   · intro x hx
     rw [trans_source] at hx
-    rw [coe_trans, comp_apply, hf.2 hx.2, coe_trans, comp_apply, (he.2 hx.1).symm]
-    -- Porting note: rw works but simp doesn't!?
-    -- simp [Function.comp_apply, LocalEquiv.coe_trans, (he.2 hx.1).symm, hf.2 hx.2]
+    simp [Function.comp_apply, LocalEquiv.coe_trans, (he.2 hx.1).symm, hf.2 hx.2]
 #align local_equiv.eq_on_source.trans' LocalEquiv.EqOnSource.trans'
 
 /-- Restriction of local equivs respects equivalence -/
@@ -877,10 +875,7 @@ theorem trans_self_symm : e.trans e.symm ≈ ofSet e.source := by
   have A : (e.trans e.symm).source = e.source := by mfld_set_tac
   refine' ⟨by rw [A, ofSet_source], fun x hx => _⟩
   rw [A] at hx
-  -- Porting note: again `rw` works but `simp` doesn't
   simp only [hx, mfld_simps]
-  rw [coe_trans, comp_apply, left_inv, ofSet_coe, id.def]
-  exact hx
 #align local_equiv.trans_self_symm LocalEquiv.trans_self_symm
 
 /-- Composition of the inverse of a local equiv and this local equiv is equivalent to the
@@ -950,47 +945,21 @@ theorem prod_coe_symm (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
 @[simp, mfld_simps]
 theorem prod_symm (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
     (e.prod e').symm = e.symm.prod e'.symm := by
-      ext x
-      -- Porting note: simp doesn't work <;> simp [prod_coe_symm]
-      · rw [prod_coe_symm, prod_coe]
-      · rw [prod_coe_symm, prod_coe]
-      · congr
-      · congr
-      · simp
+  ext x <;> simp [prod_coe_symm]
 #align local_equiv.prod_symm LocalEquiv.prod_symm
 
 @[simp, mfld_simps]
 theorem refl_prod_refl : (LocalEquiv.refl α).prod (LocalEquiv.refl β) = LocalEquiv.refl (α × β) :=
   by
   -- Porting note: `ext1 ⟨x, y⟩` insufficient number of binders
-  ext ⟨x, y⟩
-  · rfl
-  · rfl
-  · rfl
-  · rfl
-  · simp
+  ext ⟨x, y⟩ <;> simp
 #align local_equiv.refl_prod_refl LocalEquiv.refl_prod_refl
 
 @[simp, mfld_simps]
 theorem prod_trans {η : Type _} {ε : Type _} (e : LocalEquiv α β) (f : LocalEquiv β γ)
     (e' : LocalEquiv δ η) (f' : LocalEquiv η ε) :
     (e.prod e').trans (f.prod f') = (e.trans f).prod (e'.trans f') := by
-  ext ⟨x, y⟩ -- Porting note: restore <;> simp [ext_iff] <;> tauto
-  · rw [coe_trans, prod_coe, prod_coe, comp_apply, prod_coe, coe_trans]
-    simp only [comp_apply]
-  · rw [coe_trans, prod_coe, prod_coe, comp_apply, prod_coe, coe_trans, coe_trans]
-    simp only [comp_apply]
-  · rw [coe_trans_symm, prod_symm, prod_coe, prod_symm, prod_coe, comp_apply, prod_symm, prod_coe,
-      coe_trans_symm]
-    simp only [comp_apply]
-  · rw [coe_trans_symm, prod_symm, prod_coe, prod_symm, prod_coe, comp_apply, prod_symm, prod_coe,
-      coe_trans_symm]
-    simp only
-    rw [coe_trans_symm, comp_apply]
-  · simp only [trans_source, prod_source, prod_coe, mem_inter_iff, mem_prod, mem_preimage,
-      and_assoc]
-    rw [← and_assoc (a := y ∈ e'.source), ← and_assoc (b := y ∈ e'.source),
-      and_comm (a := y ∈ e'.source)]
+  ext ⟨x, y⟩ <;> simp [ext_iff]; tauto
 #align local_equiv.prod_trans LocalEquiv.prod_trans
 
 end Prod
feat port: Logic.Equiv.LocalEquiv (#1052)

aba57d4d

Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com> Co-authored-by: Winston Yin <winstonyin@gmail.com> Co-authored-by: Johan Commelin <johan@commelin.net>

Diff
@@ -1,14 +1,76 @@
 /-
-Copyright (c) 2022 Frédéric Dupuis. All rights reserved.
+Copyright (c) 2019 Sébastien Gouëzel. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
-Author: Frédéric Dupuis, Heather Macbeth
--/
+Authors: Sébastien Gouëzel
 
-import Mathlib.Init.Logic
-import Mathlib.Init.Set
+! This file was ported from Lean 3 source module logic.equiv.local_equiv
+! leanprover-community/mathlib commit aba57d4d3dae35460225919dcd82fe91355162f9
+! Please do not edit these lines, except to modify the commit id
+! if you have ported upstream changes.
+-/
+import Mathlib.Data.Set.Function
+import Mathlib.Logic.Equiv.Defs
 import Mathlib.Logic.Equiv.MfldSimpsAttr
 import Mathlib.Tactic.Core
 
+/-!
+# Local equivalences
+
+This files defines equivalences between subsets of given types.
+An element `e` of `LocalEquiv α β` is made of two maps `e.toFun` and `e.invFun` respectively
+from α to β and from  β to α (just like equivs), which are inverse to each other on the subsets
+`e.source` and `e.target` of respectively α and β.
+
+They are designed in particular to define charts on manifolds.
+
+The main functionality is `e.trans f`, which composes the two local equivalences by restricting
+the source and target to the maximal set where the composition makes sense.
+
+As for equivs, we register a coercion to functions and use it in our simp normal form: we write
+`e x` and `e.symm y` instead of `e.toFun x` and `e.invFun y`.
+
+## Main definitions
+
+`Equiv.toLocalEquiv`: associating a local equiv to an equiv, with source = target = univ
+`LocalEquiv.symm`    : the inverse of a local equiv
+`LocalEquiv.trans`   : the composition of two local equivs
+`LocalEquiv.refl`    : the identity local equiv
+`LocalEquiv.ofSet`  : the identity on a set `s`
+`EqOnSource`        : equivalence relation describing the "right" notion of equality for local
+                        equivs (see below in implementation notes)
+
+## Implementation notes
+
+There are at least three possible implementations of local equivalences:
+* equivs on subtypes
+* pairs of functions taking values in `Option α` and `Option β`, equal to none where the local
+equivalence is not defined
+* pairs of functions defined everywhere, keeping the source and target as additional data
+
+Each of these implementations has pros and cons.
+* When dealing with subtypes, one still need to define additional API for composition and
+restriction of domains. Checking that one always belongs to the right subtype makes things very
+tedious, and leads quickly to DTT hell (as the subtype `u ∩ v` is not the "same" as `v ∩ u`, for
+instance).
+* With option-valued functions, the composition is very neat (it is just the usual composition, and
+the domain is restricted automatically). These are implemented in `PEquiv.lean`. For manifolds,
+where one wants to discuss thoroughly the smoothness of the maps, this creates however a lot of
+overhead as one would need to extend all classes of smoothness to option-valued maps.
+* The `LocalEquiv` version as explained above is easier to use for manifolds. The drawback is that
+there is extra useless data (the values of `toFun` and `invFun` outside of `source` and `target`).
+In particular, the equality notion between local equivs is not "the right one", i.e., coinciding
+source and target and equality there. Moreover, there are no local equivs in this sense between
+an empty type and a nonempty type. Since empty types are not that useful, and since one almost never
+needs to talk about equal local equivs, this is not an issue in practice.
+Still, we introduce an equivalence relation `EqOnSource` that captures this right notion of
+equality, and show that many properties are invariant under this equivalence relation.
+
+### Local coding conventions
+
+If a lemma deals with the intersection of a set with either source or target of a `LocalEquiv`,
+then it should use `e.source ∩ s` or `e.target ∩ t`, not `s ∩ e.source` or `t ∩ e.target`.
+
+-/
 open Lean Meta Elab Tactic
 
 /-! Implementation of the `mfld_set_tac` tactic for working with the domains of partially-defined
@@ -18,6 +80,24 @@ This is in a separate file from `Mathlib.Logic.Equiv.MfldSimpsAttr` because attr
 file to become functional.
 -/
 
+-- register in the simpset `mfld_simps` several lemmas that are often useful when dealing
+-- with manifolds
+attribute [mfld_simps]
+  id.def Function.comp.left_id Set.mem_setOf_eq Set.image_eq_empty Set.univ_inter Set.preimage_univ
+  Set.prod_mk_mem_set_prod_eq and_true_iff Set.mem_univ Set.mem_image_of_mem true_and_iff
+  Set.mem_inter_iff Set.mem_preimage Function.comp_apply Set.inter_subset_left Set.mem_prod
+  Set.range_id Set.range_prod_map and_self_iff Set.mem_range_self eq_self_iff_true forall_const
+  forall_true_iff Set.inter_univ Set.preimage_id Function.comp.right_id not_false_iff and_imp
+  Set.prod_inter_prod Set.univ_prod_univ true_or_iff or_true_iff Prod.map_mk Set.preimage_inter
+  heq_iff_eq Equiv.sigmaEquivProd_apply Equiv.sigmaEquivProd_symm_apply Subtype.coe_mk
+  Equiv.toFun_as_coe Equiv.invFun_as_coe
+
+/-- Common `@[simps]` configuration options used for manifold-related declarations. -/
+def mfld_cfg : Simps.Config where
+  attrs := [`simp, `mfld_simps]
+  fullyApplied := false
+#align mfld_cfg mfld_cfg
+
 namespace Tactic.MfldSetTac
 
 /-- A very basic tactic to show that sets showing up in manifolds coincide or are included
@@ -39,3 +119,998 @@ elab (name := mfldSetTac) "mfld_set_tac" : tactic => withMainContext do
   | _ => throwError "goal should be an equality or an inclusion"
 
 attribute [mfld_simps] and_true eq_self_iff_true Function.comp_apply
+
+end Tactic.MfldSetTac
+
+open Function Set
+
+variable {α : Type _} {β : Type _} {γ : Type _} {δ : Type _}
+
+/-- Local equivalence between subsets `source` and `target` of `α` and `β` respectively. The
+(global) maps `toFun : α → β` and `invFun : β → α` map `source` to `target` and conversely, and are
+inverse to each other there. The values of `toFun` outside of `source` and of `invFun` outside of
+`target` are irrelevant. -/
+structure LocalEquiv (α : Type _) (β : Type _) where
+  /-- The global function which has a local inverse. Its value outside of the `source` subset is
+  irrelevant. -/
+  toFun : α → β
+  /-- The local inverse to `toFun`. Its value outside of the `target` subset is irrelevant. -/
+  invFun : β → α
+  /-- The domain of the local equivalence. -/
+  source : Set α
+  /-- The codomain of the local equivalence. -/
+  target : Set β
+  /-- The proposition that elements of `source` are mapped to elements of `target`. -/
+  map_source' : ∀ ⦃x⦄, x ∈ source → toFun x ∈ target
+  /-- The proposition that elements of `target` are mapped to elements of `source`. -/
+  map_target' : ∀ ⦃x⦄, x ∈ target → invFun x ∈ source
+  /-- The proposition that `invFun` is a local left-inverse of `toFun` on `source`. -/
+  left_inv' : ∀ ⦃x⦄, x ∈ source → invFun (toFun x) = x
+  /-- The proposition that `invFun` is a local right-inverse of `toFun` on `target`. -/
+  right_inv' : ∀ ⦃x⦄, x ∈ target → toFun (invFun x) = x
+#align local_equiv LocalEquiv
+
+namespace LocalEquiv
+
+variable (e : LocalEquiv α β) (e' : LocalEquiv β γ)
+
+instance [Inhabited α] [Inhabited β] : Inhabited (LocalEquiv α β) :=
+  ⟨⟨const α default, const β default, ∅, ∅, mapsTo_empty _ _, mapsTo_empty _ _, eqOn_empty _ _,
+      eqOn_empty _ _⟩⟩
+
+/-- The inverse of a local equiv -/
+protected def symm : LocalEquiv β α where
+  toFun := e.invFun
+  invFun := e.toFun
+  source := e.target
+  target := e.source
+  map_source' := e.map_target'
+  map_target' := e.map_source'
+  left_inv' := e.right_inv'
+  right_inv' := e.left_inv'
+#align local_equiv.symm LocalEquiv.symm
+
+instance : CoeFun (LocalEquiv α β) fun _ => α → β :=
+  ⟨LocalEquiv.toFun⟩
+
+/-- See Note [custom simps projection] -/
+def Simps.symmApply (e : LocalEquiv α β) : β → α :=
+  e.symm
+#align local_equiv.simps.symm_apply LocalEquiv.Simps.symmApply
+
+initialize_simps_projections LocalEquiv (toFun → apply, invFun → symmApply)
+
+-- Porting note: this can be proven with `dsimp only`
+-- @[simp, mfld_simps]
+-- theorem coe_mk (f : α → β) (g s t ml mr il ir) : (LocalEquiv.mk f g s t ml mr il ir : α → β) = f
+-- := by dsimp only
+-- #align local_equiv.coe_mk LocalEquiv.coe_mk
+#noalign local_equiv.coe_mk
+
+@[simp, mfld_simps]
+theorem coe_symm_mk (f : α → β) (g s t ml mr il ir) :
+    ((LocalEquiv.mk f g s t ml mr il ir).symm : β → α) = g :=
+  rfl
+#align local_equiv.coe_symm_mk LocalEquiv.coe_symm_mk
+
+-- Porting note: this is now a syntactic tautology
+-- @[simp, mfld_simps]
+-- theorem toFun_as_coe : e.toFun = e := rfl
+-- #align local_equiv.to_fun_as_coe LocalEquiv.toFun_as_coe
+#noalign local_equiv.to_fun_as_coe
+
+@[simp, mfld_simps]
+theorem invFun_as_coe : e.invFun = e.symm :=
+  rfl
+#align local_equiv.inv_fun_as_coe LocalEquiv.invFun_as_coe
+
+@[simp, mfld_simps]
+theorem map_source {x : α} (h : x ∈ e.source) : e x ∈ e.target :=
+  e.map_source' h
+#align local_equiv.map_source LocalEquiv.map_source
+
+@[simp, mfld_simps]
+theorem map_target {x : β} (h : x ∈ e.target) : e.symm x ∈ e.source :=
+  e.map_target' h
+#align local_equiv.map_target LocalEquiv.map_target
+
+@[simp, mfld_simps]
+theorem left_inv {x : α} (h : x ∈ e.source) : e.symm (e x) = x :=
+  e.left_inv' h
+#align local_equiv.left_inv LocalEquiv.left_inv
+
+@[simp, mfld_simps]
+theorem right_inv {x : β} (h : x ∈ e.target) : e (e.symm x) = x :=
+  e.right_inv' h
+#align local_equiv.right_inv LocalEquiv.right_inv
+
+theorem eq_symm_apply {x : α} {y : β} (hx : x ∈ e.source) (hy : y ∈ e.target) :
+    x = e.symm y ↔ e x = y :=
+  ⟨fun h => by rw [← e.right_inv hy, h], fun h => by rw [← e.left_inv hx, h]⟩
+#align local_equiv.eq_symm_apply LocalEquiv.eq_symm_apply
+
+protected theorem mapsTo : MapsTo e e.source e.target := fun _ => e.map_source
+#align local_equiv.maps_to LocalEquiv.mapsTo
+
+theorem symm_mapsTo : MapsTo e.symm e.target e.source :=
+  e.symm.mapsTo
+#align local_equiv.symm_maps_to LocalEquiv.symm_mapsTo
+
+protected theorem leftInvOn : LeftInvOn e.symm e e.source := fun _ => e.left_inv
+#align local_equiv.left_inv_on LocalEquiv.leftInvOn
+
+protected theorem rightInvOn : RightInvOn e.symm e e.target := fun _ => e.right_inv
+#align local_equiv.right_inv_on LocalEquiv.rightInvOn
+
+protected theorem invOn : InvOn e.symm e e.source e.target :=
+  ⟨e.leftInvOn, e.rightInvOn⟩
+#align local_equiv.inv_on LocalEquiv.invOn
+
+protected theorem injOn : InjOn e e.source :=
+  e.leftInvOn.injOn
+#align local_equiv.inj_on LocalEquiv.injOn
+
+protected theorem bijOn : BijOn e e.source e.target :=
+  e.invOn.bijOn e.mapsTo e.symm_mapsTo
+#align local_equiv.bij_on LocalEquiv.bijOn
+
+protected theorem surj_on : SurjOn e e.source e.target :=
+  e.bijOn.surjOn
+#align local_equiv.surj_on LocalEquiv.surj_on
+
+/-- Associate a `LocalEquiv` to an `Equiv`. -/
+@[simps (config := mfld_cfg)]
+def _root_.Equiv.toLocalEquiv (e : α ≃ β) :
+    LocalEquiv α β where
+  toFun := e
+  invFun := e.symm
+  source := univ
+  target := univ
+  map_source' _ _ := mem_univ _
+  map_target' _ _ := mem_univ _
+  left_inv' x _ := e.left_inv x
+  right_inv' x _ := e.right_inv x
+#align equiv.to_local_equiv Equiv.toLocalEquiv
+
+instance inhabitedOfEmpty [IsEmpty α] [IsEmpty β] : Inhabited (LocalEquiv α β) :=
+  ⟨((Equiv.equivEmpty α).trans (Equiv.equivEmpty β).symm).toLocalEquiv⟩
+#align local_equiv.inhabited_of_empty LocalEquiv.inhabitedOfEmpty
+
+/-- Create a copy of a `LocalEquiv` providing better definitional equalities. -/
+@[simps (config := { fullyApplied := false })]
+def copy (e : LocalEquiv α β) (f : α → β) (hf : ⇑e = f) (g : β → α) (hg : ⇑e.symm = g) (s : Set α)
+    (hs : e.source = s) (t : Set β) (ht : e.target = t) :
+    LocalEquiv α β where
+  toFun := f
+  invFun := g
+  source := s
+  target := t
+  map_source' _ := ht ▸ hs ▸ hf ▸ e.map_source
+  map_target' _ := hs ▸ ht ▸ hg ▸ e.map_target
+  left_inv' _ := hs ▸ hf ▸ hg ▸ e.left_inv
+  right_inv' _ := ht ▸ hf ▸ hg ▸ e.right_inv
+#align local_equiv.copy LocalEquiv.copy
+
+theorem copy_eq (e : LocalEquiv α β) (f : α → β) (hf : ⇑e = f) (g : β → α) (hg : ⇑e.symm = g)
+    (s : Set α) (hs : e.source = s) (t : Set β) (ht : e.target = t) :
+    e.copy f hf g hg s hs t ht = e := by
+  substs f g s t
+  cases e
+  rfl
+#align local_equiv.copy_eq LocalEquiv.copy_eq
+
+/-- Associate to a `LocalEquiv` an `Equiv` between the source and the target. -/
+protected def toEquiv :
+    Equiv e.source e.target where
+  toFun x := ⟨e x, e.map_source x.mem⟩
+  invFun y := ⟨e.symm y, e.map_target y.mem⟩
+  left_inv := fun ⟨_, hx⟩ => Subtype.eq <| e.left_inv hx
+  right_inv := fun ⟨_, hy⟩ => Subtype.eq <| e.right_inv hy
+#align local_equiv.to_equiv LocalEquiv.toEquiv
+
+@[simp, mfld_simps]
+theorem symm_source : e.symm.source = e.target :=
+  rfl
+#align local_equiv.symm_source LocalEquiv.symm_source
+
+@[simp, mfld_simps]
+theorem symm_target : e.symm.target = e.source :=
+  rfl
+#align local_equiv.symm_target LocalEquiv.symm_target
+
+@[simp, mfld_simps]
+theorem symm_symm : e.symm.symm = e := by
+  cases e
+  rfl
+#align local_equiv.symm_symm LocalEquiv.symm_symm
+
+theorem image_source_eq_target : e '' e.source = e.target :=
+  e.bijOn.image_eq
+#align local_equiv.image_source_eq_target LocalEquiv.image_source_eq_target
+
+theorem forall_mem_target {p : β → Prop} : (∀ y ∈ e.target, p y) ↔ ∀ x ∈ e.source, p (e x) := by
+  rw [← image_source_eq_target, ball_image_iff]
+#align local_equiv.forall_mem_target LocalEquiv.forall_mem_target
+
+theorem exists_mem_target {p : β → Prop} : (∃ y ∈ e.target, p y) ↔ ∃ x ∈ e.source, p (e x) := by
+  rw [← image_source_eq_target, bex_image_iff]
+#align local_equiv.exists_mem_target LocalEquiv.exists_mem_target
+
+/-- We say that `t : Set β` is an image of `s : Set α` under a local equivalence if
+any of the following equivalent conditions hold:
+
+* `e '' (e.source ∩ s) = e.target ∩ t`;
+* `e.source ∩ e ⁻¹ t = e.source ∩ s`;
+* `∀ x ∈ e.source, e x ∈ t ↔ x ∈ s` (this one is used in the definition).
+-/
+def IsImage (s : Set α) (t : Set β) : Prop :=
+  ∀ ⦃x⦄, x ∈ e.source → (e x ∈ t ↔ x ∈ s)
+#align local_equiv.is_image LocalEquiv.IsImage
+
+namespace IsImage
+
+variable {e} {s : Set α} {t : Set β} {x : α} {y : β}
+
+theorem apply_mem_iff (h : e.IsImage s t) (hx : x ∈ e.source) : e x ∈ t ↔ x ∈ s :=
+  h hx
+#align local_equiv.is_image.apply_mem_iff LocalEquiv.IsImage.apply_mem_iff
+
+theorem symm_apply_mem_iff (h : e.IsImage s t) : ∀ ⦃y⦄, y ∈ e.target → (e.symm y ∈ s ↔ y ∈ t) :=
+  e.forall_mem_target.mpr fun x hx => by rw [e.left_inv hx, h hx]
+#align local_equiv.is_image.symm_apply_mem_iff LocalEquiv.IsImage.symm_apply_mem_iff
+
+protected theorem symm (h : e.IsImage s t) : e.symm.IsImage t s :=
+  h.symm_apply_mem_iff
+#align local_equiv.is_image.symm LocalEquiv.IsImage.symm
+
+@[simp]
+theorem symm_iff : e.symm.IsImage t s ↔ e.IsImage s t :=
+  ⟨fun h => h.symm, fun h => h.symm⟩
+#align local_equiv.is_image.symm_iff LocalEquiv.IsImage.symm_iff
+
+protected theorem mapsTo (h : e.IsImage s t) : MapsTo e (e.source ∩ s) (e.target ∩ t) :=
+  fun _ hx => ⟨e.mapsTo hx.1, (h hx.1).2 hx.2⟩
+#align local_equiv.is_image.maps_to LocalEquiv.IsImage.mapsTo
+
+theorem symm_mapsTo (h : e.IsImage s t) : MapsTo e.symm (e.target ∩ t) (e.source ∩ s) :=
+  h.symm.mapsTo
+#align local_equiv.is_image.symm_maps_to LocalEquiv.IsImage.symm_mapsTo
+
+/-- Restrict a `LocalEquiv` to a pair of corresponding sets. -/
+@[simps (config := { fullyApplied := false })]
+def restr (h : e.IsImage s t) : LocalEquiv α
+      β where
+  toFun := e
+  invFun := e.symm
+  source := e.source ∩ s
+  target := e.target ∩ t
+  map_source' := h.mapsTo
+  map_target' := h.symm_mapsTo
+  left_inv' := e.leftInvOn.mono (inter_subset_left _ _)
+  right_inv' := e.rightInvOn.mono (inter_subset_left _ _)
+#align local_equiv.is_image.restr LocalEquiv.IsImage.restr
+
+theorem image_eq (h : e.IsImage s t) : e '' (e.source ∩ s) = e.target ∩ t :=
+  h.restr.image_source_eq_target
+#align local_equiv.is_image.image_eq LocalEquiv.IsImage.image_eq
+
+theorem symm_image_eq (h : e.IsImage s t) : e.symm '' (e.target ∩ t) = e.source ∩ s :=
+  h.symm.image_eq
+#align local_equiv.is_image.symm_image_eq LocalEquiv.IsImage.symm_image_eq
+
+theorem iff_preimage_eq : e.IsImage s t ↔ e.source ∩ e ⁻¹' t = e.source ∩ s := by
+  simp only [IsImage, ext_iff, mem_inter_iff, mem_preimage, and_congr_right_iff, iff_self]
+#align local_equiv.is_image.iff_preimage_eq LocalEquiv.IsImage.iff_preimage_eq
+
+alias iff_preimage_eq ↔ preimage_eq of_preimage_eq
+
+theorem iff_symm_preimage_eq : e.IsImage s t ↔ e.target ∩ e.symm ⁻¹' s = e.target ∩ t :=
+  symm_iff.symm.trans iff_preimage_eq
+#align local_equiv.is_image.iff_symm_preimage_eq LocalEquiv.IsImage.iff_symm_preimage_eq
+
+alias iff_symm_preimage_eq ↔ symm_preimage_eq of_symm_preimage_eq
+
+theorem of_image_eq (h : e '' (e.source ∩ s) = e.target ∩ t) : e.IsImage s t :=
+  of_symm_preimage_eq <| Eq.trans (of_symm_preimage_eq rfl).image_eq.symm h
+#align local_equiv.is_image.of_image_eq LocalEquiv.IsImage.of_image_eq
+
+theorem of_symm_image_eq (h : e.symm '' (e.target ∩ t) = e.source ∩ s) : e.IsImage s t :=
+  of_preimage_eq <| Eq.trans (iff_preimage_eq.2 rfl).symm_image_eq.symm h
+#align local_equiv.is_image.of_symm_image_eq LocalEquiv.IsImage.of_symm_image_eq
+
+protected theorem compl (h : e.IsImage s t) : e.IsImage (sᶜ) (tᶜ) := fun _ hx => not_congr (h hx)
+#align local_equiv.is_image.compl LocalEquiv.IsImage.compl
+
+protected theorem inter {s' t'} (h : e.IsImage s t) (h' : e.IsImage s' t') :
+    e.IsImage (s ∩ s') (t ∩ t') := fun _ hx => and_congr (h hx) (h' hx)
+#align local_equiv.is_image.inter LocalEquiv.IsImage.inter
+
+protected theorem union {s' t'} (h : e.IsImage s t) (h' : e.IsImage s' t') :
+    e.IsImage (s ∪ s') (t ∪ t') := fun _ hx => or_congr (h hx) (h' hx)
+#align local_equiv.is_image.union LocalEquiv.IsImage.union
+
+protected theorem diff {s' t'} (h : e.IsImage s t) (h' : e.IsImage s' t') :
+    e.IsImage (s \ s') (t \ t') :=
+  h.inter h'.compl
+#align local_equiv.is_image.diff LocalEquiv.IsImage.diff
+
+theorem leftInvOn_piecewise {e' : LocalEquiv α β} [∀ i, Decidable (i ∈ s)]
+    [∀ i, Decidable (i ∈ t)] (h : e.IsImage s t) (h' : e'.IsImage s t) :
+    LeftInvOn (t.piecewise e.symm e'.symm) (s.piecewise e e') (s.ite e.source e'.source) := by
+  rintro x (⟨he, hs⟩ | ⟨he, hs : x ∉ s⟩)
+  · rw [piecewise_eq_of_mem _ _ _ hs, piecewise_eq_of_mem _ _ _ ((h he).2 hs), e.left_inv he]
+  ·
+    rw [piecewise_eq_of_not_mem _ _ _ hs, piecewise_eq_of_not_mem _ _ _ ((h'.compl he).2 hs),
+      e'.left_inv he]
+#align local_equiv.is_image.left_inv_on_piecewise LocalEquiv.IsImage.leftInvOn_piecewise
+
+theorem inter_eq_of_inter_eq_of_eq_on {e' : LocalEquiv α β} (h : e.IsImage s t)
+    (h' : e'.IsImage s t) (hs : e.source ∩ s = e'.source ∩ s) (Heq : EqOn e e' (e.source ∩ s)) :
+    e.target ∩ t = e'.target ∩ t := by rw [← h.image_eq, ← h'.image_eq, ← hs, Heq.image_eq]
+#align
+  local_equiv.is_image.inter_eq_of_inter_eq_of_eq_on
+  LocalEquiv.IsImage.inter_eq_of_inter_eq_of_eq_on
+
+theorem symm_eq_on_of_inter_eq_of_eq_on {e' : LocalEquiv α β} (h : e.IsImage s t)
+    (hs : e.source ∩ s = e'.source ∩ s) (Heq : EqOn e e' (e.source ∩ s)) :
+    EqOn e.symm e'.symm (e.target ∩ t) := by
+  rw [← h.image_eq]
+  rintro y ⟨x, hx, rfl⟩
+  have hx' := hx; rw [hs] at hx'
+  rw [e.left_inv hx.1, Heq hx, e'.left_inv hx'.1]
+#align
+  local_equiv.is_image.symm_eq_on_of_inter_eq_of_eq_on
+  LocalEquiv.IsImage.symm_eq_on_of_inter_eq_of_eq_on
+
+end IsImage
+
+theorem isImage_source_target : e.IsImage e.source e.target := fun x hx => by simp [hx]
+#align local_equiv.is_image_source_target LocalEquiv.isImage_source_target
+
+theorem isImage_source_target_of_disjoint (e' : LocalEquiv α β) (hs : Disjoint e.source e'.source)
+    (ht : Disjoint e.target e'.target) : e.IsImage e'.source e'.target :=
+  IsImage.of_image_eq <| by rw [hs.inter_eq, ht.inter_eq, image_empty]
+#align local_equiv.is_image_source_target_of_disjoint LocalEquiv.isImage_source_target_of_disjoint
+
+theorem image_source_inter_eq' (s : Set α) : e '' (e.source ∩ s) = e.target ∩ e.symm ⁻¹' s := by
+  rw [inter_comm, e.leftInvOn.image_inter', image_source_eq_target, inter_comm]
+#align local_equiv.image_source_inter_eq' LocalEquiv.image_source_inter_eq'
+
+theorem image_source_inter_eq (s : Set α) :
+    e '' (e.source ∩ s) = e.target ∩ e.symm ⁻¹' (e.source ∩ s) := by
+  rw [inter_comm, e.leftInvOn.image_inter, image_source_eq_target, inter_comm]
+#align local_equiv.image_source_inter_eq LocalEquiv.image_source_inter_eq
+
+theorem image_eq_target_inter_inv_preimage {s : Set α} (h : s ⊆ e.source) :
+    e '' s = e.target ∩ e.symm ⁻¹' s := by
+  rw [← e.image_source_inter_eq', inter_eq_self_of_subset_right h]
+#align local_equiv.image_eq_target_inter_inv_preimage LocalEquiv.image_eq_target_inter_inv_preimage
+
+theorem symm_image_eq_source_inter_preimage {s : Set β} (h : s ⊆ e.target) :
+    e.symm '' s = e.source ∩ e ⁻¹' s :=
+  e.symm.image_eq_target_inter_inv_preimage h
+#align
+  local_equiv.symm_image_eq_source_inter_preimage LocalEquiv.symm_image_eq_source_inter_preimage
+
+theorem symm_image_target_inter_eq (s : Set β) :
+    e.symm '' (e.target ∩ s) = e.source ∩ e ⁻¹' (e.target ∩ s) :=
+  e.symm.image_source_inter_eq _
+#align local_equiv.symm_image_target_inter_eq LocalEquiv.symm_image_target_inter_eq
+
+theorem symm_image_target_inter_eq' (s : Set β) : e.symm '' (e.target ∩ s) = e.source ∩ e ⁻¹' s :=
+  e.symm.image_source_inter_eq' _
+#align local_equiv.symm_image_target_inter_eq' LocalEquiv.symm_image_target_inter_eq'
+
+theorem source_inter_preimage_inv_preimage (s : Set α) :
+    e.source ∩ e ⁻¹' (e.symm ⁻¹' s) = e.source ∩ s :=
+  Set.ext fun x => and_congr_right_iff.2 fun hx =>
+    by simp only [mem_preimage, e.left_inv hx, iff_self]
+#align local_equiv.source_inter_preimage_inv_preimage LocalEquiv.source_inter_preimage_inv_preimage
+
+theorem source_inter_preimage_target_inter (s : Set β) :
+    e.source ∩ e ⁻¹' (e.target ∩ s) = e.source ∩ e ⁻¹' s :=
+  ext fun _ => ⟨fun hx => ⟨hx.1, hx.2.2⟩, fun hx => ⟨hx.1, e.map_source hx.1, hx.2⟩⟩
+#align local_equiv.source_inter_preimage_target_inter LocalEquiv.source_inter_preimage_target_inter
+
+theorem target_inter_inv_preimage_preimage (s : Set β) :
+    e.target ∩ e.symm ⁻¹' (e ⁻¹' s) = e.target ∩ s :=
+  e.symm.source_inter_preimage_inv_preimage _
+#align local_equiv.target_inter_inv_preimage_preimage LocalEquiv.target_inter_inv_preimage_preimage
+
+theorem symm_image_image_of_subset_source {s : Set α} (h : s ⊆ e.source) : e.symm '' (e '' s) = s :=
+  (e.leftInvOn.mono h).image_image
+#align local_equiv.symm_image_image_of_subset_source LocalEquiv.symm_image_image_of_subset_source
+
+theorem image_symm_image_of_subset_target {s : Set β} (h : s ⊆ e.target) : e '' (e.symm '' s) = s :=
+  e.symm.symm_image_image_of_subset_source h
+#align local_equiv.image_symm_image_of_subset_target LocalEquiv.image_symm_image_of_subset_target
+
+theorem source_subset_preimage_target : e.source ⊆ e ⁻¹' e.target :=
+  e.mapsTo
+#align local_equiv.source_subset_preimage_target LocalEquiv.source_subset_preimage_target
+
+theorem symm_image_target_eq_source : e.symm '' e.target = e.source :=
+  e.symm.image_source_eq_target
+#align local_equiv.symm_image_target_eq_source LocalEquiv.symm_image_target_eq_source
+
+theorem target_subset_preimage_source : e.target ⊆ e.symm ⁻¹' e.source :=
+  e.symm_mapsTo
+#align local_equiv.target_subset_preimage_source LocalEquiv.target_subset_preimage_source
+
+/-- Two local equivs that have the same `source`, same `toFun` and same `invFun`, coincide. -/
+@[ext]
+protected theorem ext {e e' : LocalEquiv α β} (h : ∀ x, e x = e' x)
+    (hsymm : ∀ x, e.symm x = e'.symm x) (hs : e.source = e'.source) : e = e' := by
+  have A : (e : α → β) = e' := by
+    ext x
+    exact h x
+  have B : (e.symm : β → α) = e'.symm := by
+    ext x
+    exact hsymm x
+  have I : e '' e.source = e.target := e.image_source_eq_target
+  have I' : e' '' e'.source = e'.target := e'.image_source_eq_target
+  rw [A, hs, I'] at I
+  cases e; cases e'
+  simp [*] at *
+  simp [*]
+#align local_equiv.ext LocalEquiv.ext
+
+/-- Restricting a local equivalence to e.source ∩ s -/
+protected def restr (s : Set α) : LocalEquiv α β :=
+  (@IsImage.of_symm_preimage_eq α β e s (e.symm ⁻¹' s) rfl).restr
+#align local_equiv.restr LocalEquiv.restr
+
+@[simp, mfld_simps]
+theorem restr_coe (s : Set α) : (e.restr s : α → β) = e :=
+  rfl
+#align local_equiv.restr_coe LocalEquiv.restr_coe
+
+@[simp, mfld_simps]
+theorem restr_coe_symm (s : Set α) : ((e.restr s).symm : β → α) = e.symm :=
+  rfl
+#align local_equiv.restr_coe_symm LocalEquiv.restr_coe_symm
+
+@[simp, mfld_simps]
+theorem restr_source (s : Set α) : (e.restr s).source = e.source ∩ s :=
+  rfl
+#align local_equiv.restr_source LocalEquiv.restr_source
+
+@[simp, mfld_simps]
+theorem restr_target (s : Set α) : (e.restr s).target = e.target ∩ e.symm ⁻¹' s :=
+  rfl
+#align local_equiv.restr_target LocalEquiv.restr_target
+
+theorem restr_eq_of_source_subset {e : LocalEquiv α β} {s : Set α} (h : e.source ⊆ s) :
+    e.restr s = e :=
+  LocalEquiv.ext (fun _ => rfl) (fun _ => rfl) (by simp [inter_eq_self_of_subset_left h])
+#align local_equiv.restr_eq_of_source_subset LocalEquiv.restr_eq_of_source_subset
+
+@[simp, mfld_simps]
+theorem restr_univ {e : LocalEquiv α β} : e.restr univ = e :=
+  restr_eq_of_source_subset (subset_univ _)
+#align local_equiv.restr_univ LocalEquiv.restr_univ
+
+/-- The identity local equiv -/
+protected def refl (α : Type _) : LocalEquiv α α :=
+  (Equiv.refl α).toLocalEquiv
+#align local_equiv.refl LocalEquiv.refl
+
+@[simp, mfld_simps]
+theorem refl_source : (LocalEquiv.refl α).source = univ :=
+  rfl
+#align local_equiv.refl_source LocalEquiv.refl_source
+
+@[simp, mfld_simps]
+theorem refl_target : (LocalEquiv.refl α).target = univ :=
+  rfl
+#align local_equiv.refl_target LocalEquiv.refl_target
+
+@[simp, mfld_simps]
+theorem refl_coe : (LocalEquiv.refl α : α → α) = id :=
+  rfl
+#align local_equiv.refl_coe LocalEquiv.refl_coe
+
+@[simp, mfld_simps]
+theorem refl_symm : (LocalEquiv.refl α).symm = LocalEquiv.refl α :=
+  rfl
+#align local_equiv.refl_symm LocalEquiv.refl_symm
+
+-- Porting note: removed `simp` because `simp` can prove this
+@[mfld_simps]
+theorem refl_restr_source (s : Set α) : ((LocalEquiv.refl α).restr s).source = s := by simp
+#align local_equiv.refl_restr_source LocalEquiv.refl_restr_source
+
+-- Porting note: removed `simp` because `simp` can prove this
+@[mfld_simps]
+theorem refl_restr_target (s : Set α) : ((LocalEquiv.refl α).restr s).target = s := by
+  change univ ∩ id ⁻¹' s = s
+  simp
+#align local_equiv.refl_restr_target LocalEquiv.refl_restr_target
+
+/-- The identity local equiv on a set `s` -/
+def ofSet (s : Set α) : LocalEquiv α α where
+  toFun := id
+  invFun := id
+  source := s
+  target := s
+  map_source' _ hx := hx
+  map_target' _ hx := hx
+  left_inv' _ _ := rfl
+  right_inv' _ _ := rfl
+#align local_equiv.of_set LocalEquiv.ofSet
+
+@[simp, mfld_simps]
+theorem ofSet_source (s : Set α) : (LocalEquiv.ofSet s).source = s :=
+  rfl
+#align local_equiv.of_set_source LocalEquiv.ofSet_source
+
+@[simp, mfld_simps]
+theorem ofSet_target (s : Set α) : (LocalEquiv.ofSet s).target = s :=
+  rfl
+#align local_equiv.of_set_target LocalEquiv.ofSet_target
+
+@[simp, mfld_simps]
+theorem ofSet_coe (s : Set α) : (LocalEquiv.ofSet s : α → α) = id :=
+  rfl
+#align local_equiv.of_set_coe LocalEquiv.ofSet_coe
+
+@[simp, mfld_simps]
+theorem ofSet_symm (s : Set α) : (LocalEquiv.ofSet s).symm = LocalEquiv.ofSet s :=
+  rfl
+#align local_equiv.of_set_symm LocalEquiv.ofSet_symm
+
+/-- Composing two local equivs if the target of the first coincides with the source of the
+second. -/
+protected def trans' (e' : LocalEquiv β γ) (h : e.target = e'.source) :
+    LocalEquiv α γ where
+  toFun := e' ∘ e
+  invFun := e.symm ∘ e'.symm
+  source := e.source
+  target := e'.target
+  map_source' x hx := by simp [←h, hx]
+  map_target' y hy := by simp [h, hy]
+  left_inv' x hx := by simp [hx, ←h]
+  right_inv' y hy := by simp [hy, h]
+#align local_equiv.trans' LocalEquiv.trans'
+
+/-- Composing two local equivs, by restricting to the maximal domain where their composition
+is well defined. -/
+protected def trans : LocalEquiv α γ :=
+  LocalEquiv.trans' (e.symm.restr e'.source).symm (e'.restr e.target) (inter_comm _ _)
+#align local_equiv.trans LocalEquiv.trans
+
+@[simp, mfld_simps]
+theorem coe_trans : (e.trans e' : α → γ) = e' ∘ e :=
+  rfl
+#align local_equiv.coe_trans LocalEquiv.coe_trans
+
+@[simp, mfld_simps]
+theorem coe_trans_symm : ((e.trans e').symm : γ → α) = e.symm ∘ e'.symm :=
+  rfl
+#align local_equiv.coe_trans_symm LocalEquiv.coe_trans_symm
+
+theorem trans_apply {x : α} : (e.trans e') x = e' (e x) :=
+  rfl
+#align local_equiv.trans_apply LocalEquiv.trans_apply
+
+theorem trans_symm_eq_symm_trans_symm : (e.trans e').symm = e'.symm.trans e.symm := by
+  cases e; cases e'; rfl
+#align local_equiv.trans_symm_eq_symm_trans_symm LocalEquiv.trans_symm_eq_symm_trans_symm
+
+@[simp, mfld_simps]
+theorem trans_source : (e.trans e').source = e.source ∩ e ⁻¹' e'.source :=
+  rfl
+#align local_equiv.trans_source LocalEquiv.trans_source
+
+theorem trans_source' : (e.trans e').source = e.source ∩ e ⁻¹' (e.target ∩ e'.source) := by
+  mfld_set_tac
+#align local_equiv.trans_source' LocalEquiv.trans_source'
+
+theorem trans_source'' : (e.trans e').source = e.symm '' (e.target ∩ e'.source) := by
+  rw [e.trans_source', e.symm_image_target_inter_eq]
+#align local_equiv.trans_source'' LocalEquiv.trans_source''
+
+theorem image_trans_source : e '' (e.trans e').source = e.target ∩ e'.source :=
+  (e.symm.restr e'.source).symm.image_source_eq_target
+#align local_equiv.image_trans_source LocalEquiv.image_trans_source
+
+@[simp, mfld_simps]
+theorem trans_target : (e.trans e').target = e'.target ∩ e'.symm ⁻¹' e.target :=
+  rfl
+#align local_equiv.trans_target LocalEquiv.trans_target
+
+theorem trans_target' : (e.trans e').target = e'.target ∩ e'.symm ⁻¹' (e'.source ∩ e.target) :=
+  trans_source' e'.symm e.symm
+#align local_equiv.trans_target' LocalEquiv.trans_target'
+
+theorem trans_target'' : (e.trans e').target = e' '' (e'.source ∩ e.target) :=
+  trans_source'' e'.symm e.symm
+#align local_equiv.trans_target'' LocalEquiv.trans_target''
+
+theorem inv_image_trans_target : e'.symm '' (e.trans e').target = e'.source ∩ e.target :=
+  image_trans_source e'.symm e.symm
+#align local_equiv.inv_image_trans_target LocalEquiv.inv_image_trans_target
+
+theorem trans_assoc (e'' : LocalEquiv γ δ) : (e.trans e').trans e'' = e.trans (e'.trans e'') :=
+  LocalEquiv.ext (fun x => rfl) (fun x => rfl)
+    (by simp [trans_source, @preimage_comp α β γ, inter_assoc])
+#align local_equiv.trans_assoc LocalEquiv.trans_assoc
+
+@[simp, mfld_simps]
+theorem trans_refl : e.trans (LocalEquiv.refl β) = e :=
+  LocalEquiv.ext (fun x => rfl) (fun x => rfl) (by simp [trans_source])
+#align local_equiv.trans_refl LocalEquiv.trans_refl
+
+@[simp, mfld_simps]
+theorem refl_trans : (LocalEquiv.refl α).trans e = e :=
+  LocalEquiv.ext (fun x => rfl) (fun x => rfl) (by simp [trans_source, preimage_id])
+#align local_equiv.refl_trans LocalEquiv.refl_trans
+
+theorem trans_refl_restr (s : Set β) : e.trans ((LocalEquiv.refl β).restr s) = e.restr (e ⁻¹' s) :=
+  LocalEquiv.ext (fun x => rfl) (fun x => rfl) (by simp [trans_source])
+#align local_equiv.trans_refl_restr LocalEquiv.trans_refl_restr
+
+theorem trans_refl_restr' (s : Set β) :
+    e.trans ((LocalEquiv.refl β).restr s) = e.restr (e.source ∩ e ⁻¹' s) :=
+  LocalEquiv.ext (fun x => rfl) (fun x => rfl) <| by
+    simp [trans_source]
+    rw [← inter_assoc, inter_self]
+#align local_equiv.trans_refl_restr' LocalEquiv.trans_refl_restr'
+
+theorem restr_trans (s : Set α) : (e.restr s).trans e' = (e.trans e').restr s :=
+  LocalEquiv.ext (fun x => rfl) (fun x => rfl) <| by
+    simp [trans_source, inter_comm, inter_assoc]
+#align local_equiv.restr_trans LocalEquiv.restr_trans
+
+/-- A lemma commonly useful when `e` and `e'` are charts of a manifold. -/
+theorem mem_symm_trans_source {e' : LocalEquiv α γ} {x : α} (he : x ∈ e.source)
+    (he' : x ∈ e'.source) : e x ∈ (e.symm.trans e').source :=
+  ⟨e.mapsTo he, by rwa [mem_preimage, LocalEquiv.symm_symm, e.left_inv he]⟩
+#align local_equiv.mem_symm_trans_source LocalEquiv.mem_symm_trans_source
+
+/-- Postcompose a local equivalence with an equivalence.
+We modify the source and target to have better definitional behavior. -/
+@[simps]
+def transEquiv (e' : β ≃ γ) : LocalEquiv α γ :=
+  (e.trans e'.toLocalEquiv).copy _ rfl _ rfl e.source (inter_univ _) (e'.symm ⁻¹' e.target)
+    (univ_inter _)
+#align local_equiv.trans_equiv LocalEquiv.transEquiv
+
+theorem transEquiv_eq_trans (e' : β ≃ γ) : e.transEquiv e' = e.trans e'.toLocalEquiv :=
+  copy_eq ..
+#align local_equiv.trans_equiv_eq_trans LocalEquiv.transEquiv_eq_trans
+
+/-- Precompose a local equivalence with an equivalence.
+We modify the source and target to have better definitional behavior. -/
+@[simps]
+def _root_.Equiv.transLocalEquiv (e : α ≃ β) : LocalEquiv α γ :=
+  (e.toLocalEquiv.trans e').copy _ rfl _ rfl (e ⁻¹' e'.source) (univ_inter _) e'.target
+    (inter_univ _)
+#align equiv.trans_local_equiv Equiv.transLocalEquiv
+
+theorem _root_.Equiv.trans_localEquiv_eq_trans (e : α ≃ β) :
+    e.transLocalEquiv e' = e.toLocalEquiv.trans e' :=
+  copy_eq ..
+#align equiv.trans_local_equiv_eq_trans Equiv.trans_localEquiv_eq_trans
+
+/-- `EqOnSource e e'` means that `e` and `e'` have the same source, and coincide there. Then `e`
+and `e'` should really be considered the same local equiv. -/
+def EqOnSource (e e' : LocalEquiv α β) : Prop :=
+  e.source = e'.source ∧ e.source.EqOn e e'
+#align local_equiv.eq_on_source LocalEquiv.EqOnSource
+
+/-- `EqOnSource` is an equivalence relation. This instance provides the `≈` notation between two
+`LocalEquiv`s. -/
+instance eqOnSourceSetoid :
+    Setoid (LocalEquiv α β) where
+  r := EqOnSource
+  iseqv := by constructor <;> simp only [Equivalence, EqOnSource, EqOn] <;> aesop
+#align local_equiv.eq_on_source_setoid LocalEquiv.eqOnSourceSetoid
+
+theorem eqOnSource_refl : e ≈ e :=
+  Setoid.refl _
+#align local_equiv.eq_on_source_refl LocalEquiv.eqOnSource_refl
+
+/-- Two equivalent local equivs have the same source -/
+theorem EqOnSource.source_eq {e e' : LocalEquiv α β} (h : e ≈ e') : e.source = e'.source :=
+  h.1
+#align local_equiv.eq_on_source.source_eq LocalEquiv.EqOnSource.source_eq
+
+/-- Two equivalent local equivs coincide on the source -/
+theorem EqOnSource.eqOn {e e' : LocalEquiv α β} (h : e ≈ e') : e.source.EqOn e e' :=
+  h.2
+#align local_equiv.eq_on_source.eq_on LocalEquiv.EqOnSource.eqOn
+
+--Porting note: A lot of dot notation failures here. Maybe we should not use `≈`
+
+/-- Two equivalent local equivs have the same target -/
+theorem EqOnSource.target_eq {e e' : LocalEquiv α β} (h : e ≈ e') : e.target = e'.target := by
+  simp only [← image_source_eq_target, ← source_eq h, h.2.image_eq]
+#align local_equiv.eq_on_source.target_eq LocalEquiv.EqOnSource.target_eq
+
+/-- If two local equivs are equivalent, so are their inverses. -/
+theorem EqOnSource.symm' {e e' : LocalEquiv α β} (h : e ≈ e') : e.symm ≈ e'.symm := by
+  refine' ⟨target_eq h, eqOn_of_leftInvOn_of_rightInvOn e.leftInvOn _ _⟩ <;>
+    simp only [symm_source, target_eq h, source_eq h, e'.symm_mapsTo]
+  exact e'.rightInvOn.congr_right e'.symm_mapsTo (source_eq h ▸ h.eqOn.symm)
+#align local_equiv.eq_on_source.symm' LocalEquiv.EqOnSource.symm'
+
+/-- Two equivalent local equivs have coinciding inverses on the target -/
+theorem EqOnSource.symm_eqOn {e e' : LocalEquiv α β} (h : e ≈ e') : EqOn e.symm e'.symm e.target :=
+  -- Porting note: `h.symm'` dot notation doesn't work anymore because `h` is not recognised as
+  -- `LocalEquiv.EqOnSource` for some reason.
+  eqOn (symm' h)
+#align local_equiv.eq_on_source.symm_eq_on LocalEquiv.EqOnSource.symm_eqOn
+
+/-- Composition of local equivs respects equivalence -/
+theorem EqOnSource.trans' {e e' : LocalEquiv α β} {f f' : LocalEquiv β γ} (he : e ≈ e')
+    (hf : f ≈ f') : e.trans f ≈ e'.trans f' := by
+  constructor
+  · rw [trans_source'', trans_source'', ← target_eq he, ← hf.1]
+    exact (he.symm'.eqOn.mono <| inter_subset_left _ _).image_eq
+  · intro x hx
+    rw [trans_source] at hx
+    rw [coe_trans, comp_apply, hf.2 hx.2, coe_trans, comp_apply, (he.2 hx.1).symm]
+    -- Porting note: rw works but simp doesn't!?
+    -- simp [Function.comp_apply, LocalEquiv.coe_trans, (he.2 hx.1).symm, hf.2 hx.2]
+#align local_equiv.eq_on_source.trans' LocalEquiv.EqOnSource.trans'
+
+/-- Restriction of local equivs respects equivalence -/
+theorem EqOnSource.restr {e e' : LocalEquiv α β} (he : e ≈ e') (s : Set α) :
+    e.restr s ≈ e'.restr s := by
+  constructor
+  · simp [he.1]
+  · intro x hx
+    simp only [mem_inter_iff, restr_source] at hx
+    exact he.2 hx.1
+#align local_equiv.eq_on_source.restr LocalEquiv.EqOnSource.restr
+
+/-- Preimages are respected by equivalence -/
+theorem EqOnSource.source_inter_preimage_eq {e e' : LocalEquiv α β} (he : e ≈ e') (s : Set β) :
+    e.source ∩ e ⁻¹' s = e'.source ∩ e' ⁻¹' s := by rw [he.eqOn.inter_preimage_eq, source_eq he]
+#align
+  local_equiv.eq_on_source.source_inter_preimage_eq LocalEquiv.EqOnSource.source_inter_preimage_eq
+
+/-- Composition of a local equiv and its inverse is equivalent to the restriction of the identity
+to the source -/
+theorem trans_self_symm : e.trans e.symm ≈ ofSet e.source := by
+  have A : (e.trans e.symm).source = e.source := by mfld_set_tac
+  refine' ⟨by rw [A, ofSet_source], fun x hx => _⟩
+  rw [A] at hx
+  -- Porting note: again `rw` works but `simp` doesn't
+  simp only [hx, mfld_simps]
+  rw [coe_trans, comp_apply, left_inv, ofSet_coe, id.def]
+  exact hx
+#align local_equiv.trans_self_symm LocalEquiv.trans_self_symm
+
+/-- Composition of the inverse of a local equiv and this local equiv is equivalent to the
+restriction of the identity to the target -/
+theorem trans_symm_self : e.symm.trans e ≈ LocalEquiv.ofSet e.target :=
+  trans_self_symm e.symm
+#align local_equiv.trans_symm_self LocalEquiv.trans_symm_self
+
+/-- Two equivalent local equivs are equal when the source and target are univ -/
+theorem eq_of_eq_on_source_univ (e e' : LocalEquiv α β) (h : e ≈ e') (s : e.source = univ)
+    (t : e.target = univ) : e = e' := by
+  refine LocalEquiv.ext (fun x => ?_) (fun x => ?_) h.1
+  · apply h.2
+    rw [s]
+    exact mem_univ _
+  · apply h.symm'.2
+    rw [symm_source, t]
+    exact mem_univ _
+#align local_equiv.eq_of_eq_on_source_univ LocalEquiv.eq_of_eq_on_source_univ
+
+section Prod
+
+/-- The product of two local equivs, as a local equiv on the product. -/
+def prod (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
+    LocalEquiv (α × γ) (β × δ) where
+  source := e.source ×ˢ e'.source
+  target := e.target ×ˢ e'.target
+  toFun p := (e p.1, e' p.2)
+  invFun p := (e.symm p.1, e'.symm p.2)
+  map_source' p hp := by
+    simp at hp
+    simp [hp]
+  map_target' p hp := by
+    simp at hp
+    simp [map_target, hp]
+  left_inv' p hp := by
+    simp at hp
+    simp [hp]
+  right_inv' p hp := by
+    simp at hp
+    simp [hp]
+#align local_equiv.prod LocalEquiv.prod
+
+@[simp, mfld_simps]
+theorem prod_source (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
+    (e.prod e').source = e.source ×ˢ e'.source :=
+  rfl
+#align local_equiv.prod_source LocalEquiv.prod_source
+
+@[simp, mfld_simps]
+theorem prod_target (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
+    (e.prod e').target = e.target ×ˢ e'.target :=
+  rfl
+#align local_equiv.prod_target LocalEquiv.prod_target
+
+@[simp, mfld_simps]
+theorem prod_coe (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
+    (e.prod e' : α × γ → β × δ) = fun p => (e p.1, e' p.2) :=
+  rfl
+#align local_equiv.prod_coe LocalEquiv.prod_coe
+
+theorem prod_coe_symm (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
+    ((e.prod e').symm : β × δ → α × γ) = fun p => (e.symm p.1, e'.symm p.2) :=
+  rfl
+#align local_equiv.prod_coe_symm LocalEquiv.prod_coe_symm
+
+@[simp, mfld_simps]
+theorem prod_symm (e : LocalEquiv α β) (e' : LocalEquiv γ δ) :
+    (e.prod e').symm = e.symm.prod e'.symm := by
+      ext x
+      -- Porting note: simp doesn't work <;> simp [prod_coe_symm]
+      · rw [prod_coe_symm, prod_coe]
+      · rw [prod_coe_symm, prod_coe]
+      · congr
+      · congr
+      · simp
+#align local_equiv.prod_symm LocalEquiv.prod_symm
+
+@[simp, mfld_simps]
+theorem refl_prod_refl : (LocalEquiv.refl α).prod (LocalEquiv.refl β) = LocalEquiv.refl (α × β) :=
+  by
+  -- Porting note: `ext1 ⟨x, y⟩` insufficient number of binders
+  ext ⟨x, y⟩
+  · rfl
+  · rfl
+  · rfl
+  · rfl
+  · simp
+#align local_equiv.refl_prod_refl LocalEquiv.refl_prod_refl
+
+@[simp, mfld_simps]
+theorem prod_trans {η : Type _} {ε : Type _} (e : LocalEquiv α β) (f : LocalEquiv β γ)
+    (e' : LocalEquiv δ η) (f' : LocalEquiv η ε) :
+    (e.prod e').trans (f.prod f') = (e.trans f).prod (e'.trans f') := by
+  ext ⟨x, y⟩ -- Porting note: restore <;> simp [ext_iff] <;> tauto
+  · rw [coe_trans, prod_coe, prod_coe, comp_apply, prod_coe, coe_trans]
+    simp only [comp_apply]
+  · rw [coe_trans, prod_coe, prod_coe, comp_apply, prod_coe, coe_trans, coe_trans]
+    simp only [comp_apply]
+  · rw [coe_trans_symm, prod_symm, prod_coe, prod_symm, prod_coe, comp_apply, prod_symm, prod_coe,
+      coe_trans_symm]
+    simp only [comp_apply]
+  · rw [coe_trans_symm, prod_symm, prod_coe, prod_symm, prod_coe, comp_apply, prod_symm, prod_coe,
+      coe_trans_symm]
+    simp only
+    rw [coe_trans_symm, comp_apply]
+  · simp only [trans_source, prod_source, prod_coe, mem_inter_iff, mem_prod, mem_preimage,
+      and_assoc]
+    rw [← and_assoc (a := y ∈ e'.source), ← and_assoc (b := y ∈ e'.source),
+      and_comm (a := y ∈ e'.source)]
+#align local_equiv.prod_trans LocalEquiv.prod_trans
+
+end Prod
+
+/-- Combine two `LocalEquiv`s using `Set.piecewise`. The source of the new `LocalEquiv` is
+`s.ite e.source e'.source = e.source ∩ s ∪ e'.source \ s`, and similarly for target.  The function
+sends `e.source ∩ s` to `e.target ∩ t` using `e` and `e'.source \ s` to `e'.target \ t` using `e'`,
+and similarly for the inverse function. The definition assumes `e.isImage s t` and
+`e'.isImage s t`. -/
+@[simps (config := { fullyApplied := false })]
+def piecewise (e e' : LocalEquiv α β) (s : Set α) (t : Set β) [∀ x, Decidable (x ∈ s)]
+    [∀ y, Decidable (y ∈ t)] (H : e.IsImage s t) (H' : e'.IsImage s t) :
+    LocalEquiv α β where
+  toFun := s.piecewise e e'
+  invFun := t.piecewise e.symm e'.symm
+  source := s.ite e.source e'.source
+  target := t.ite e.target e'.target
+  map_source' := H.mapsTo.piecewise_ite H'.compl.mapsTo
+  map_target' := H.symm.mapsTo.piecewise_ite H'.symm.compl.mapsTo
+  left_inv' := H.leftInvOn_piecewise H'
+  right_inv' := H.symm.leftInvOn_piecewise H'.symm
+#align local_equiv.piecewise LocalEquiv.piecewise
+
+theorem symm_piecewise (e e' : LocalEquiv α β) {s : Set α} {t : Set β} [∀ x, Decidable (x ∈ s)]
+    [∀ y, Decidable (y ∈ t)] (H : e.IsImage s t) (H' : e'.IsImage s t) :
+    (e.piecewise e' s t H H').symm = e.symm.piecewise e'.symm t s H.symm H'.symm :=
+  rfl
+#align local_equiv.symm_piecewise LocalEquiv.symm_piecewise
+
+/-- Combine two `LocalEquiv`s with disjoint sources and disjoint targets. We reuse
+`LocalEquiv.piecewise`, then override `source` and `target` to ensure better definitional
+equalities. -/
+@[simps (config := { fullyApplied := false })]
+def disjointUnion (e e' : LocalEquiv α β) (hs : Disjoint e.source e'.source)
+    (ht : Disjoint e.target e'.target) [∀ x, Decidable (x ∈ e.source)]
+    [∀ y, Decidable (y ∈ e.target)] : LocalEquiv α β :=
+  (e.piecewise e' e.source e.target e.isImage_source_target <|
+        e'.isImage_source_target_of_disjoint _ hs.symm ht.symm).copy
+    _ rfl _ rfl (e.source ∪ e'.source) (ite_left _ _) (e.target ∪ e'.target) (ite_left _ _)
+#align local_equiv.disjoint_union LocalEquiv.disjointUnion
+
+theorem disjoint_union_eq_piecewise (e e' : LocalEquiv α β) (hs : Disjoint e.source e'.source)
+    (ht : Disjoint e.target e'.target) [∀ x, Decidable (x ∈ e.source)]
+    [∀ y, Decidable (y ∈ e.target)] :
+    e.disjointUnion e' hs ht =
+      e.piecewise e' e.source e.target e.isImage_source_target
+        (e'.isImage_source_target_of_disjoint _ hs.symm ht.symm) :=
+  copy_eq ..
+#align local_equiv.disjoint_union_eq_piecewise LocalEquiv.disjoint_union_eq_piecewise
+
+section Pi
+
+variable {ι : Type _} {αi βi : ι → Type _} (ei : ∀ i, LocalEquiv (αi i) (βi i))
+
+/-- The product of a family of local equivs, as a local equiv on the pi type. -/
+@[simps (config := mfld_cfg)]
+protected def pi :
+    LocalEquiv (∀ i, αi i) (∀ i,
+        βi i) where
+  toFun f i := ei i (f i)
+  invFun f i := (ei i).symm (f i)
+  source := pi univ fun i => (ei i).source
+  target := pi univ fun i => (ei i).target
+  map_source' _ hf i hi := (ei i).map_source (hf i hi)
+  map_target' _ hf i hi := (ei i).map_target (hf i hi)
+  left_inv' _ hf := funext fun i => (ei i).left_inv (hf i trivial)
+  right_inv' _ hf := funext fun i => (ei i).right_inv (hf i trivial)
+#align local_equiv.pi LocalEquiv.pi
+
+end Pi
+
+end LocalEquiv
+
+namespace Set
+
+-- All arguments are explicit to avoid missing information in the pretty printer output
+/-- A bijection between two sets `s : Set α` and `t : Set β` provides a local equivalence
+between `α` and `β`. -/
+@[simps (config := { fullyApplied := false })]
+noncomputable def BijOn.toLocalEquiv [Nonempty α] (f : α → β) (s : Set α) (t : Set β)
+    (hf : BijOn f s t) : LocalEquiv α β where
+  toFun := f
+  invFun := invFunOn f s
+  source := s
+  target := t
+  map_source' := hf.mapsTo
+  map_target' := hf.surjOn.mapsTo_invFunOn
+  left_inv' := hf.invOn_invFunOn.1
+  right_inv' := hf.invOn_invFunOn.2
+#align set.bij_on.to_local_equiv Set.BijOn.toLocalEquiv
+
+/-- A map injective on a subset of its domain provides a local equivalence. -/
+@[simp, mfld_simps]
+noncomputable def InjOn.toLocalEquiv [Nonempty α] (f : α → β) (s : Set α) (hf : InjOn f s) :
+    LocalEquiv α β :=
+  hf.bijOn_image.toLocalEquiv f s (f '' s)
+#align set.inj_on.to_local_equiv Set.InjOn.toLocalEquiv
+
+end Set
+
+namespace Equiv
+
+/- `Equiv`s give rise to `LocalEquiv`s. We set up simp lemmas to reduce most properties of the
+`LocalEquiv` to that of the `Equiv`. -/
+variable (e : α ≃ β) (e' : β ≃ γ)
+
+@[simp, mfld_simps]
+theorem refl_toLocalEquiv : (Equiv.refl α).toLocalEquiv = LocalEquiv.refl α :=
+  rfl
+#align equiv.refl_to_local_equiv Equiv.refl_toLocalEquiv
+
+@[simp, mfld_simps]
+theorem symm_toLocalEquiv : e.symm.toLocalEquiv = e.toLocalEquiv.symm :=
+  rfl
+#align equiv.symm_to_local_equiv Equiv.symm_toLocalEquiv
+
+@[simp, mfld_simps]
+theorem trans_toLocalEquiv : (e.trans e').toLocalEquiv = e.toLocalEquiv.trans e'.toLocalEquiv :=
+  LocalEquiv.ext (fun x => rfl) (fun x => rfl)
+    (by simp [LocalEquiv.trans_source, Equiv.toLocalEquiv])
+#align equiv.trans_to_local_equiv Equiv.trans_toLocalEquiv
+
+end Equiv

Dependencies 39

40 files ported (100.0%)
23636 lines ported (100.0%)

All dependencies are ported!