data.set.imageMathlib.Data.Set.Image

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)

(last sync)

feat(probability/independence): Independence of singletons (#18506)

Characterisation of independence in terms of measure distributing over finite intersections, and lemmas connecting the different concepts of independence.

Also add supporting measurable_space and set.preimage lemmas

Diff
@@ -71,6 +71,9 @@ theorem subset_preimage_univ {s : set α} : s ⊆ f ⁻¹' univ := subset_univ _
 @[simp] theorem preimage_diff (f : α → β) (s t : set β) :
   f ⁻¹' (s \ t) = f ⁻¹' s \ f ⁻¹' t := rfl
 
+@[simp] lemma preimage_symm_diff (f : α → β) (s t : set β) :
+  f ⁻¹' (s ∆ t) = (f ⁻¹' s) ∆ (f ⁻¹' t) := rfl
+
 @[simp] theorem preimage_ite (f : α → β) (s t₁ t₂ : set β) :
   f ⁻¹' (s.ite t₁ t₂) = (f ⁻¹' s).ite (f ⁻¹' t₁) (f ⁻¹' t₂) :=
 rfl
@@ -120,6 +123,10 @@ lemma nonempty_of_nonempty_preimage {s : set β} {f : α → β} (hf : (f ⁻¹'
   s.nonempty :=
 let ⟨x, hx⟩ := hf in ⟨f x, hx⟩
 
+@[simp] lemma preimage_singleton_true (p : α → Prop) : p ⁻¹' {true} = {a | p a} := by { ext, simp }
+@[simp] lemma preimage_singleton_false (p : α → Prop) : p ⁻¹' {false} = {a | ¬ p a} :=
+by { ext, simp }
+
 lemma preimage_subtype_coe_eq_compl {α : Type*} {s u v : set α} (hsuv : s ⊆ u ∪ v)
   (H : s ∩ (u ∩ v) = ∅) : (coe : s → α) ⁻¹' u = (coe ⁻¹' v)ᶜ :=
 begin
@@ -1003,6 +1010,9 @@ lemma left_inverse.preimage_preimage {g : β → α} (h : left_inverse g f) (s :
   f ⁻¹' (g ⁻¹' s) = s :=
 by rw [← preimage_comp, h.comp_eq_id, preimage_id]
 
+protected lemma involutive.preimage {f : α → α} (hf : involutive f) : involutive (preimage f) :=
+hf.right_inverse.preimage_preimage
+
 end function
 
 namespace equiv_like

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

refactor(*): move all mk_simp_attribute commands to 1 file (#19223)
Diff
@@ -50,7 +50,7 @@ variables {f : α → β} {g : β → γ}
 
 @[simp] theorem preimage_empty : f ⁻¹' ∅ = ∅ := rfl
 
-@[simp] theorem mem_preimage {s : set β} {a : α} : (a ∈ f ⁻¹' s) ↔ (f a ∈ s) := iff.rfl
+@[simp, mfld_simps] theorem mem_preimage {s : set β} {a : α} : (a ∈ f ⁻¹' s) ↔ (f a ∈ s) := iff.rfl
 
 lemma preimage_congr {f g : α → β} {s : set β} (h : ∀ (x : α), f x = g x) : f ⁻¹' s = g ⁻¹' s :=
 by { congr' with x, apply_assumption }
@@ -58,11 +58,11 @@ by { congr' with x, apply_assumption }
 theorem preimage_mono {s t : set β} (h : s ⊆ t) : f ⁻¹' s ⊆ f ⁻¹' t :=
 assume x hx, h hx
 
-@[simp] theorem preimage_univ : f ⁻¹' univ = univ := rfl
+@[simp, mfld_simps] theorem preimage_univ : f ⁻¹' univ = univ := rfl
 
 theorem subset_preimage_univ {s : set α} : s ⊆ f ⁻¹' univ := subset_univ _
 
-@[simp] theorem preimage_inter {s t : set β} : f ⁻¹' (s ∩ t) = f ⁻¹' s ∩ f ⁻¹' t := rfl
+@[simp, mfld_simps] theorem preimage_inter {s t : set β} : f ⁻¹' (s ∩ t) = f ⁻¹' s ∩ f ⁻¹' t := rfl
 
 @[simp] theorem preimage_union {s t : set β} : f ⁻¹' (s ∪ t) = f ⁻¹' s ∪ f ⁻¹' t := rfl
 
@@ -80,7 +80,7 @@ rfl
 
 @[simp] lemma preimage_id_eq : preimage (id : α → α) = id := rfl
 
-theorem preimage_id {s : set α} : id ⁻¹' s = s := rfl
+@[mfld_simps] theorem preimage_id {s : set α} : id ⁻¹' s = s := rfl
 
 @[simp] theorem preimage_id' {s : set α} : (λ x, x) ⁻¹' s = s := rfl
 
@@ -152,6 +152,7 @@ theorem mem_image_iff_bex {f : α → β} {s : set α} {y : β} :
 
 lemma image_eta (f : α → β) : f '' s = (λ x, f x) '' s := rfl
 
+@[mfld_simps]
 theorem mem_image_of_mem (f : α → β) {x : α} {a : set α} (h : x ∈ a) : f x ∈ f '' a :=
 ⟨_, h, rfl⟩
 
@@ -252,7 +253,8 @@ by { ext, simp [image, eq_comm] }
 ext $ λ x, ⟨λ ⟨y, _, h⟩, h ▸ mem_singleton _,
   λ h, (eq_of_mem_singleton h).symm ▸ hs.imp (λ y hy, ⟨hy, rfl⟩)⟩
 
-@[simp] lemma image_eq_empty {α β} {f : α → β} {s : set α} : f '' s = ∅ ↔ s = ∅ :=
+@[simp, mfld_simps]
+lemma image_eq_empty {α β} {f : α → β} {s : set α} : f '' s = ∅ ↔ s = ∅ :=
 by { simp only [eq_empty_iff_forall_not_mem],
      exact ⟨λ H a ha, H _ ⟨_, ha, rfl⟩, λ H b ⟨_, ha, _⟩, H _ ha⟩ }
 
@@ -506,7 +508,7 @@ def range (f : ι → α) : set α := {x | ∃y, f y = x}
 
 @[simp] theorem mem_range {x : α} : x ∈ range f ↔ ∃ y, f y = x := iff.rfl
 
-@[simp] theorem mem_range_self (i : ι) : f i ∈ range f := ⟨i, rfl⟩
+@[simp, mfld_simps] theorem mem_range_self (i : ι) : f i ∈ range f := ⟨i, rfl⟩
 
 theorem forall_range_iff {p : α → Prop} : (∀ a ∈ range f, p a) ↔ (∀ i, p (f i)) :=
 by simp
@@ -649,7 +651,7 @@ theorem preimage_image_preimage {f : α → β} {s : set β} :
   f ⁻¹' (f '' (f ⁻¹' s)) = f ⁻¹' s :=
 by rw [image_preimage_eq_inter_range, preimage_inter_range]
 
-@[simp] theorem range_id : range (@id α) = univ := range_iff_surjective.2 surjective_id
+@[simp, mfld_simps] theorem range_id : range (@id α) = univ := range_iff_surjective.2 surjective_id
 
 @[simp] theorem range_id' : range (λ (x : α), x) = univ := range_id
 

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

feat(data/set): add lemmas about powerset of insert and singleton (#18356)

Add lemmas about 𝒫 {x} and 𝒫 (insert x A).

Mathlib4 pair : leanprover-community/mathlib4/pull/2000

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -471,6 +471,29 @@ end
 
 end image
 
+/-! ### Lemmas about the powerset and image. -/
+
+/-- The powerset of `{a} ∪ s` is `𝒫 s` together with `{a} ∪ t` for each `t ∈ 𝒫 s`. -/
+theorem powerset_insert (s : set α) (a : α) :
+  𝒫 (insert a s) = 𝒫 s ∪ (insert a '' 𝒫 s) :=
+begin
+  ext t,
+  simp_rw [mem_union, mem_image, mem_powerset_iff],
+  split,
+  { intro h,
+    by_cases hs : a ∈ t,
+    { right,
+      refine ⟨t \ {a}, _, _⟩,
+      { rw [diff_singleton_subset_iff],
+        assumption },
+      { rw [insert_diff_singleton, insert_eq_of_mem hs] }},
+    { left,
+      exact (subset_insert_iff_of_not_mem hs).mp h}},
+  { rintros (h | ⟨s', h₁, rfl⟩),
+    { exact subset_trans h (subset_insert a s) },
+    { exact insert_subset_insert h₁ }}
+end
+
 /-! ### Lemmas about range of a function. -/
 section range
 variables {f : ι → α} {s t : set α}

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

feat(linear_algebra/affine_space/basis): reindex API (#18190)

Rename and change arguments to affine_basis.comp_equiv so that it matches basis.reindex. Provide lemmas for its interaction with other affine_basis constructions.

Make affine_basis follow the fun_like design, replacing affine_basis.points by a function coercion.

Fix a few names all around:

  • affine_basis.coord_apply_neqaffine_basis.coord_apply_ne
  • convex_hull_affine_basis_eq_nonneg_barycentricaffine_basis.convex_hull_eq_nonneg_coord
Diff
@@ -29,13 +29,13 @@ import data.set.basic
 set, sets, image, preimage, pre-image, range
 
 -/
-universes u v
 
-open function
+open function set
 
-namespace set
+universes u v
+variables {α β γ : Type*} {ι ι' : Sort*}
 
-variables {α β γ : Type*} {ι : Sort*}
+namespace set
 
 /-! ### Inverse image -/
 
@@ -914,8 +914,7 @@ end subsingleton
 end set
 
 namespace function
-
-variables {ι : Sort*} {α : Type*} {β : Type*} {f : α → β}
+variables {f : α → β}
 
 open set
 
@@ -949,7 +948,7 @@ lemma surjective.preimage_subset_preimage_iff {s t : set β} (hf : surjective f)
   f ⁻¹' s ⊆ f ⁻¹' t ↔ s ⊆ t :=
 by { apply preimage_subset_preimage_iff, rw [hf.range_eq], apply subset_univ }
 
-lemma surjective.range_comp {ι' : Sort*} {f : ι → ι'} (hf : surjective f) (g : ι' → α) :
+lemma surjective.range_comp {f : ι → ι'} (hf : surjective f) (g : ι' → α) :
   range (g ∘ f) = range g :=
 ext $ λ y, (@surjective.exists _ _ _ hf (λ x, g x = y)).symm
 
@@ -981,13 +980,20 @@ by rw [← preimage_comp, h.comp_eq_id, preimage_id]
 
 end function
 
+namespace equiv_like
+variables {E : Type*} [equiv_like E ι ι']
+include ι
+
+@[simp] lemma range_comp (f : ι' → α) (e : E) : set.range (f ∘ e) = set.range f :=
+(equiv_like.surjective _).range_comp _
+
+end equiv_like
+
 /-! ### Image and preimage on subtypes -/
 
 namespace subtype
 open set
 
-variable {α : Type*}
-
 lemma coe_image {p : α → Prop} {s : set (subtype p)} :
   coe '' s = {x | ∃h : p x, (⟨x, h⟩ : subtype p) ∈ s} :=
 set.ext $ assume a,
@@ -1109,9 +1115,9 @@ open function
 /-! ### Injectivity and surjectivity lemmas for image and preimage -/
 
 section image_preimage
-variables {α : Type u} {β : Type v} {f : α → β}
-@[simp]
-lemma preimage_injective : injective (preimage f) ↔ surjective f :=
+variables {f : α → β}
+
+@[simp] lemma preimage_injective : injective (preimage f) ↔ surjective f :=
 begin
   refine ⟨λ h y, _, surjective.preimage_injective⟩,
   obtain ⟨x, hx⟩ : (f ⁻¹' {y}).nonempty,
@@ -1156,7 +1162,7 @@ end set
 /-! ### Disjoint lemmas for image and preimage -/
 
 section disjoint
-variables {α β γ : Type*} {f : α → β} {s t : set α}
+variables {f : α → β} {s t : set α}
 
 lemma disjoint.preimage (f : α → β) {s t : set β} (h : disjoint s t) :
   disjoint (f ⁻¹' s) (f ⁻¹' t) :=

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

feat(data/{bool,set}): add 3 lemmas (#18332)

Add bool.compl_singleton, set.range_inl, and set.range_inr.

Diff
@@ -640,6 +640,9 @@ prod.snd_surjective.range_eq
   range (eval i : (Π i, α i) → α i) = univ :=
 (surjective_eval i).range_eq
 
+theorem range_inl : range (@sum.inl α β) = {x | x.is_left} := by ext (_|_); simp
+theorem range_inr : range (@sum.inr α β) = {x | x.is_right} := by ext (_|_); simp
+
 theorem is_compl_range_inl_range_inr : is_compl (range $ @sum.inl α β) (range sum.inr) :=
 is_compl.of_le
   (by { rintro y ⟨⟨x₁, rfl⟩, ⟨x₂, _⟩⟩, cc })

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

chore(data/set/lattice): move basic lemmas to basic files (#17882)

This PR moves some lemmas in data.set.lattice to data.set.basic, data.set.image, and data.set.function. They are basic enough and do not depend on the set lattice. This also helps #17880 to split data.set.pairwise and reduce the dependency of many files.

mathlib4 PR: https://github.com/leanprover-community/mathlib4/pull/1109

Diff
@@ -134,7 +134,6 @@ end
 
 end preimage
 
-
 /-! ### Image of a set under a function -/
 
 section image
@@ -217,6 +216,10 @@ terms of `≤`. -/
 theorem image_subset {a b : set α} (f : α → β) (h : a ⊆ b) : f '' a ⊆ f '' b :=
 by { simp only [subset_def, mem_image], exact λ x, λ ⟨w, h1, h2⟩, ⟨w, h h1, h2⟩ }
 
+/-- `set.image` is monotone. See `set.image_subset` for the statement in terms of `⊆`. -/
+lemma monotone_image {f : α → β} : monotone (image f) :=
+λ s t, image_subset _
+
 theorem image_union (f : α → β) (s t : set α) :
   f '' (s ∪ t) = f '' s ∪ f '' t :=
 ext $ λ x, ⟨by rintro ⟨a, h|h, rfl⟩; [left, right]; exact ⟨_, h, rfl⟩,
@@ -1101,7 +1104,7 @@ option.range_eq f
 namespace set
 open function
 
-/-! ### Injectivity and sur<jectivity lemmas for image and preimage -/
+/-! ### Injectivity and surjectivity lemmas for image and preimage -/
 
 section image_preimage
 variables {α : Type u} {β : Type v} {f : α → β}
@@ -1147,3 +1150,56 @@ by rw [← image_eq_image hf.1, hf.2.image_preimage]
 
 end image_preimage
 end set
+
+/-! ### Disjoint lemmas for image and preimage -/
+
+section disjoint
+variables {α β γ : Type*} {f : α → β} {s t : set α}
+
+lemma disjoint.preimage (f : α → β) {s t : set β} (h : disjoint s t) :
+  disjoint (f ⁻¹' s) (f ⁻¹' t) :=
+disjoint_iff_inf_le.mpr $ λ x hx, h.le_bot hx
+
+namespace set
+
+theorem disjoint_image_image {f : β → α} {g : γ → α} {s : set β} {t : set γ}
+  (h : ∀ b ∈ s, ∀ c ∈ t, f b ≠ g c) : disjoint (f '' s) (g '' t) :=
+disjoint_iff_inf_le.mpr $ by rintro a ⟨⟨b, hb, eq⟩, c, hc, rfl⟩; exact h b hb c hc eq
+
+lemma disjoint_image_of_injective {f : α → β} (hf : injective f) {s t : set α}
+  (hd : disjoint s t) : disjoint (f '' s) (f '' t) :=
+disjoint_image_image $ λ x hx y hy, hf.ne $ λ H, set.disjoint_iff.1 hd ⟨hx, H.symm ▸ hy⟩
+
+lemma _root_.disjoint.of_image (h : disjoint (f '' s) (f '' t)) : disjoint s t :=
+disjoint_iff_inf_le.mpr $
+  λ x hx, disjoint_left.1 h (mem_image_of_mem _ hx.1) (mem_image_of_mem _ hx.2)
+
+lemma disjoint_image_iff (hf : injective f) : disjoint (f '' s) (f '' t) ↔ disjoint s t :=
+⟨disjoint.of_image, disjoint_image_of_injective hf⟩
+
+lemma _root_.disjoint.of_preimage (hf : surjective f) {s t : set β}
+  (h : disjoint (f ⁻¹' s) (f ⁻¹' t)) :
+  disjoint s t :=
+by rw [disjoint_iff_inter_eq_empty, ←image_preimage_eq (_ ∩ _) hf, preimage_inter, h.inter_eq,
+  image_empty]
+
+lemma disjoint_preimage_iff (hf : surjective f) {s t : set β} :
+  disjoint (f ⁻¹' s) (f ⁻¹' t) ↔ disjoint s t :=
+⟨disjoint.of_preimage hf, disjoint.preimage _⟩
+
+lemma preimage_eq_empty {f : α → β} {s : set β} (h : disjoint s (range f)) :
+  f ⁻¹' s = ∅ :=
+by simpa using h.preimage f
+
+lemma preimage_eq_empty_iff {s : set β} : f ⁻¹' s = ∅ ↔ disjoint s (range f) :=
+⟨λ h, begin
+    simp only [eq_empty_iff_forall_not_mem, disjoint_iff_inter_eq_empty, not_exists,
+      mem_inter_iff, not_and, mem_range, mem_preimage] at h ⊢,
+    assume y hy x hx,
+    rw ← hx at hy,
+    exact h x hy,
+  end, preimage_eq_empty⟩
+
+end set
+
+end disjoint

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

chore(data/set/image): Turn lemma around (#17945)

Turn set.image_inter around to match all other distributivity lemmas (set.image_union, set.image_Inter, set.image_Union, finset.image_inter, finset.image_union, ...)

Diff
@@ -229,15 +229,15 @@ lemma image_inter_subset (f : α → β) (s t : set α) :
 subset_inter (image_subset _ $ inter_subset_left _ _) (image_subset _ $ inter_subset_right _ _)
 
 theorem image_inter_on {f : α → β} {s t : set α} (h : ∀x∈t, ∀y∈s, f x = f y → x = y) :
-  f '' s ∩ f '' t = f '' (s ∩ t) :=
-subset.antisymm
+  f '' (s ∩ t) = f '' s ∩ f '' t :=
+(image_inter_subset _ _ _).antisymm
   (assume b ⟨⟨a₁, ha₁, h₁⟩, ⟨a₂, ha₂, h₂⟩⟩,
     have a₂ = a₁, from h _ ha₂ _ ha₁ (by simp *),
     ⟨a₁, ⟨ha₁, this ▸ ha₂⟩, h₁⟩)
-  (image_inter_subset _ _ _)
+
 
 theorem image_inter {f : α → β} {s t : set α} (H : injective f) :
-  f '' s ∩ f '' t = f '' (s ∩ t) :=
+  f '' (s ∩ t) = f '' s ∩ f '' t :=
 image_inter_on (assume x _ y _ h, H h)
 
 theorem image_univ_of_surjective {ι : Type*} {f : ι → β} (H : surjective f) : f '' univ = univ :=
@@ -300,7 +300,7 @@ theorem mem_image_iff_of_inverse {f : α → β} {g : β → α} {b : β} {s : s
 by rw image_eq_preimage_of_inverse h₁ h₂; refl
 
 theorem image_compl_subset {f : α → β} {s : set α} (H : injective f) : f '' sᶜ ⊆ (f '' s)ᶜ :=
-disjoint.subset_compl_left $ by simp [disjoint_iff_inf_le, image_inter H]
+disjoint.subset_compl_left $ by simp [disjoint_iff_inf_le, ←image_inter H]
 
 theorem subset_image_compl {f : α → β} {s : set α} (H : surjective f) : (f '' s)ᶜ ⊆ f '' sᶜ :=
 compl_subset_iff_union.2 $

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(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
@@ -504,7 +504,7 @@ theorem compl_compl_image [BooleanAlgebra α] (S : Set α) : compl '' (compl ''
 
 #print Set.image_insert_eq /-
 theorem image_insert_eq {f : α → β} {a : α} {s : Set α} : f '' insert a s = insert (f a) (f '' s) :=
-  by ext; simp [and_or_left, exists_or, eq_comm, or_comm', and_comm']
+  by ext; simp [and_or_left, exists_or, eq_comm, or_comm, and_comm]
 #align set.image_insert_eq Set.image_insert_eq
 -/
 
Diff
@@ -1046,7 +1046,7 @@ theorem exists_subset_range_and_iff {f : α → β} {p : Set β → Prop} :
 #align set.exists_subset_range_and_iff Set.exists_subset_range_and_iff
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (s «expr ⊆ » range[set.range] f) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:642:2: warning: expanding binder collection (s «expr ⊆ » range[set.range] f) -/
 #print Set.exists_subset_range_iff /-
 theorem exists_subset_range_iff {f : α → β} {p : Set β → Prop} :
     (∃ (s : _) (_ : s ⊆ range f), p s) ↔ ∃ s, p (f '' s) := by
Diff
@@ -309,23 +309,23 @@ theorem Function.Injective.mem_set_image {f : α → β} (hf : Injective f) {s :
 #align function.injective.mem_set_image Function.Injective.mem_set_image
 -/
 
-#print Set.ball_image_iff /-
-theorem ball_image_iff {f : α → β} {s : Set α} {p : β → Prop} :
+#print Set.forall_mem_image /-
+theorem forall_mem_image {f : α → β} {s : Set α} {p : β → Prop} :
     (∀ y ∈ f '' s, p y) ↔ ∀ x ∈ s, p (f x) := by simp
-#align set.ball_image_iff Set.ball_image_iff
+#align set.ball_image_iff Set.forall_mem_image
 -/
 
 #print Set.ball_image_of_ball /-
 theorem ball_image_of_ball {f : α → β} {s : Set α} {p : β → Prop} (h : ∀ x ∈ s, p (f x)) :
     ∀ y ∈ f '' s, p y :=
-  ball_image_iff.2 h
+  forall_mem_image.2 h
 #align set.ball_image_of_ball Set.ball_image_of_ball
 -/
 
-#print Set.bex_image_iff /-
-theorem bex_image_iff {f : α → β} {s : Set α} {p : β → Prop} :
+#print Set.exists_mem_image /-
+theorem exists_mem_image {f : α → β} {s : Set α} {p : β → Prop} :
     (∃ y ∈ f '' s, p y) ↔ ∃ x ∈ s, p (f x) := by simp
-#align set.bex_image_iff Set.bex_image_iff
+#align set.bex_image_iff Set.exists_mem_image
 -/
 
 #print Set.mem_image_elim /-
@@ -623,7 +623,7 @@ instance (f : α → β) (s : Set α) [Nonempty s] : Nonempty (f '' s) :=
 /-- image and preimage are a Galois connection -/
 @[simp]
 theorem image_subset_iff {s : Set α} {t : Set β} {f : α → β} : f '' s ⊆ t ↔ s ⊆ f ⁻¹' t :=
-  ball_image_iff
+  forall_mem_image
 #align set.image_subset_iff Set.image_subset_iff
 -/
 
@@ -863,9 +863,9 @@ theorem mem_range_self (i : ι) : f i ∈ range f :=
 #align set.mem_range_self Set.mem_range_self
 -/
 
-#print Set.forall_range_iff /-
-theorem forall_range_iff {p : α → Prop} : (∀ a ∈ range f, p a) ↔ ∀ i, p (f i) := by simp
-#align set.forall_range_iff Set.forall_range_iff
+#print Set.forall_mem_range /-
+theorem forall_mem_range {p : α → Prop} : (∀ a ∈ range f, p a) ↔ ∀ i, p (f i) := by simp
+#align set.forall_range_iff Set.forall_mem_range
 -/
 
 #print Set.forall_subtype_range_iff /-
@@ -937,14 +937,14 @@ theorem Nonempty.preimage' {s : Set β} (hs : s.Nonempty) {f : α → β} (hf :
 
 #print Set.range_comp /-
 theorem range_comp (g : α → β) (f : ι → α) : range (g ∘ f) = g '' range f :=
-  Subset.antisymm (forall_range_iff.mpr fun i => mem_image_of_mem g (mem_range_self _))
-    (ball_image_iff.mpr <| forall_range_iff.mpr mem_range_self)
+  Subset.antisymm (forall_mem_range.mpr fun i => mem_image_of_mem g (mem_range_self _))
+    (forall_mem_image.mpr <| forall_mem_range.mpr mem_range_self)
 #align set.range_comp Set.range_comp
 -/
 
 #print Set.range_subset_iff /-
 theorem range_subset_iff : range f ⊆ s ↔ ∀ y, f y ∈ s :=
-  forall_range_iff
+  forall_mem_range
 #align set.range_subset_iff Set.range_subset_iff
 -/
 
@@ -1419,7 +1419,7 @@ theorem range_unique [h : Unique ι] : range f = {f default} :=
   rw [mem_range]
   constructor
   · rintro ⟨i, hi⟩
-    rw [h.uniq i] at hi 
+    rw [h.uniq i] at hi
     exact hi ▸ mem_singleton _
   · exact fun h => ⟨default, h.symm⟩
 #align set.range_unique Set.range_unique
@@ -1568,7 +1568,7 @@ theorem subsingleton_of_preimage {α β : Type _} {f : α → β} (hf : Function
 
 #print Set.subsingleton_range /-
 theorem subsingleton_range {α : Sort _} [Subsingleton α] (f : α → β) : (range f).Subsingleton :=
-  forall_range_iff.2 fun x => forall_range_iff.2 fun y => congr_arg f (Subsingleton.elim x y)
+  forall_mem_range.2 fun x => forall_mem_range.2 fun y => congr_arg f (Subsingleton.elim x y)
 #align set.subsingleton_range Set.subsingleton_range
 -/
 
@@ -1701,7 +1701,7 @@ theorem Injective.compl_image_eq (hf : Injective f) (s : Set α) : (f '' s)ᶜ =
   ext y
   rcases em (y ∈ range f) with (⟨x, rfl⟩ | hx)
   · simp [hf.eq_iff]
-  · rw [mem_range, not_exists] at hx 
+  · rw [mem_range, not_exists] at hx
     simp [hx]
 #align function.injective.compl_image_eq Function.Injective.compl_image_eq
 -/
@@ -1957,7 +1957,7 @@ theorem preimage_surjective : Surjective (preimage f) ↔ Injective f :=
   by
   refine' ⟨fun h x x' hx => _, injective.preimage_surjective⟩
   cases' h {x} with s hs; have := mem_singleton x
-  rwa [← hs, mem_preimage, hx, ← mem_preimage, hs, mem_singleton_iff, eq_comm] at this 
+  rwa [← hs, mem_preimage, hx, ← mem_preimage, hs, mem_singleton_iff, eq_comm] at this
 #align set.preimage_surjective Set.preimage_surjective
 -/
 
@@ -1967,7 +1967,7 @@ theorem image_surjective : Surjective (image f) ↔ Surjective f :=
   by
   refine' ⟨fun h y => _, surjective.image_surjective⟩
   cases' h {y} with s hs
-  have := mem_singleton y; rw [← hs] at this ; rcases this with ⟨x, h1x, h2x⟩
+  have := mem_singleton y; rw [← hs] at this; rcases this with ⟨x, h1x, h2x⟩
   exact ⟨x, h2x⟩
 #align set.image_surjective Set.image_surjective
 -/
@@ -2069,7 +2069,7 @@ theorem preimage_eq_empty_iff {s : Set β} : f ⁻¹' s = ∅ ↔ Disjoint s (ra
     simp only [eq_empty_iff_forall_not_mem, disjoint_iff_inter_eq_empty, not_exists, mem_inter_iff,
       not_and, mem_range, mem_preimage] at h ⊢
     intro y hy x hx
-    rw [← hx] at hy 
+    rw [← hx] at hy
     exact h x hy, preimage_eq_empty⟩
 #align set.preimage_eq_empty_iff Set.preimage_eq_empty_iff
 -/
Diff
@@ -600,11 +600,11 @@ theorem Nonempty.of_image {f : α → β} {s : Set α} : (f '' s).Nonempty → s
 #align set.nonempty.of_image Set.Nonempty.of_image
 -/
 
-#print Set.nonempty_image_iff /-
+#print Set.image_nonempty /-
 @[simp]
-theorem nonempty_image_iff {f : α → β} {s : Set α} : (f '' s).Nonempty ↔ s.Nonempty :=
+theorem image_nonempty {f : α → β} {s : Set α} : (f '' s).Nonempty ↔ s.Nonempty :=
   ⟨Nonempty.of_image, fun h => h.image f⟩
-#align set.nonempty_image_iff Set.nonempty_image_iff
+#align set.nonempty_image_iff Set.image_nonempty
 -/
 
 #print Set.Nonempty.preimage /-
Diff
@@ -231,13 +231,17 @@ theorem nonempty_of_nonempty_preimage {s : Set β} {f : α → β} (hf : (f ⁻
 #align set.nonempty_of_nonempty_preimage Set.nonempty_of_nonempty_preimage
 -/
 
+#print Set.preimage_singleton_true /-
 @[simp]
 theorem preimage_singleton_true (p : α → Prop) : p ⁻¹' {True} = {a | p a} := by ext; simp
 #align set.preimage_singleton_true Set.preimage_singleton_true
+-/
 
+#print Set.preimage_singleton_false /-
 @[simp]
 theorem preimage_singleton_false (p : α → Prop) : p ⁻¹' {False} = {a | ¬p a} := by ext; simp
 #align set.preimage_singleton_false Set.preimage_singleton_false
+-/
 
 #print Set.preimage_subtype_coe_eq_compl /-
 theorem preimage_subtype_coe_eq_compl {α : Type _} {s u v : Set α} (hsuv : s ⊆ u ∪ v)
@@ -1714,9 +1718,11 @@ theorem LeftInverse.preimage_preimage {g : β → α} (h : LeftInverse g f) (s :
 #align function.left_inverse.preimage_preimage Function.LeftInverse.preimage_preimage
 -/
 
+#print Function.Involutive.preimage /-
 protected theorem Involutive.preimage {f : α → α} (hf : Involutive f) : Involutive (preimage f) :=
   hf.RightInverse.preimage_preimage
 #align function.involutive.preimage Function.Involutive.preimage
+-/
 
 end Function
 
Diff
@@ -3,7 +3,7 @@ Copyright (c) 2014 Jeremy Avigad. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jeremy Avigad, Leonardo de Moura
 -/
-import Mathbin.Data.Set.Basic
+import Data.Set.Basic
 
 #align_import data.set.image from "leanprover-community/mathlib"@"001ffdc42920050657fd45bd2b8bfbec8eaaeb29"
 
@@ -1042,7 +1042,7 @@ theorem exists_subset_range_and_iff {f : α → β} {p : Set β → Prop} :
 #align set.exists_subset_range_and_iff Set.exists_subset_range_and_iff
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (s «expr ⊆ » range[set.range] f) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (s «expr ⊆ » range[set.range] f) -/
 #print Set.exists_subset_range_iff /-
 theorem exists_subset_range_iff {f : α → β} {p : Set β → Prop} :
     (∃ (s : _) (_ : s ⊆ range f), p s) ↔ ∃ s, p (f '' s) := by
Diff
@@ -5,7 +5,7 @@ Authors: Jeremy Avigad, Leonardo de Moura
 -/
 import Mathbin.Data.Set.Basic
 
-#align_import data.set.image from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4"
+#align_import data.set.image from "leanprover-community/mathlib"@"001ffdc42920050657fd45bd2b8bfbec8eaaeb29"
 
 /-!
 # Images and preimages of sets
@@ -124,6 +124,13 @@ theorem preimage_diff (f : α → β) (s t : Set β) : f ⁻¹' (s \ t) = f ⁻
 #align set.preimage_diff Set.preimage_diff
 -/
 
+#print Set.preimage_symmDiff /-
+@[simp]
+theorem preimage_symmDiff (f : α → β) (s t : Set β) : f ⁻¹' s ∆ t = (f ⁻¹' s) ∆ (f ⁻¹' t) :=
+  rfl
+#align set.preimage_symm_diff Set.preimage_symmDiff
+-/
+
 #print Set.preimage_ite /-
 @[simp]
 theorem preimage_ite (f : α → β) (s t₁ t₂ : Set β) :
@@ -224,6 +231,14 @@ theorem nonempty_of_nonempty_preimage {s : Set β} {f : α → β} (hf : (f ⁻
 #align set.nonempty_of_nonempty_preimage Set.nonempty_of_nonempty_preimage
 -/
 
+@[simp]
+theorem preimage_singleton_true (p : α → Prop) : p ⁻¹' {True} = {a | p a} := by ext; simp
+#align set.preimage_singleton_true Set.preimage_singleton_true
+
+@[simp]
+theorem preimage_singleton_false (p : α → Prop) : p ⁻¹' {False} = {a | ¬p a} := by ext; simp
+#align set.preimage_singleton_false Set.preimage_singleton_false
+
 #print Set.preimage_subtype_coe_eq_compl /-
 theorem preimage_subtype_coe_eq_compl {α : Type _} {s u v : Set α} (hsuv : s ⊆ u ∪ v)
     (H : s ∩ (u ∩ v) = ∅) : (coe : s → α) ⁻¹' u = (coe ⁻¹' v)ᶜ :=
@@ -1699,6 +1714,10 @@ theorem LeftInverse.preimage_preimage {g : β → α} (h : LeftInverse g f) (s :
 #align function.left_inverse.preimage_preimage Function.LeftInverse.preimage_preimage
 -/
 
+protected theorem Involutive.preimage {f : α → α} (hf : Involutive f) : Involutive (preimage f) :=
+  hf.RightInverse.preimage_preimage
+#align function.involutive.preimage Function.Involutive.preimage
+
 end Function
 
 namespace EquivLike
Diff
@@ -880,7 +880,7 @@ theorem range_iff_surjective : range f = univ ↔ Surjective f :=
 #align set.range_iff_surjective Set.range_iff_surjective
 -/
 
-alias range_iff_surjective ↔ _ _root_.function.surjective.range_eq
+alias ⟨_, _root_.function.surjective.range_eq⟩ := range_iff_surjective
 #align function.surjective.range_eq Function.Surjective.range_eq
 
 #print Set.image_univ /-
Diff
@@ -548,11 +548,11 @@ theorem subset_image_diff (f : α → β) (s t : Set α) : f '' s \ f '' t ⊆ f
 #align set.subset_image_diff Set.subset_image_diff
 -/
 
-#print Set.subset_image_symm_diff /-
-theorem subset_image_symm_diff : (f '' s) ∆ (f '' t) ⊆ f '' s ∆ t :=
+#print Set.subset_image_symmDiff /-
+theorem subset_image_symmDiff : (f '' s) ∆ (f '' t) ⊆ f '' s ∆ t :=
   (union_subset_union (subset_image_diff _ _ _) <| subset_image_diff _ _ _).trans
     (image_union _ _ _).Superset
-#align set.subset_image_symm_diff Set.subset_image_symm_diff
+#align set.subset_image_symm_diff Set.subset_image_symmDiff
 -/
 
 #print Set.image_diff /-
@@ -563,10 +563,10 @@ theorem image_diff {f : α → β} (hf : Injective f) (s t : Set α) : f '' (s \
 #align set.image_diff Set.image_diff
 -/
 
-#print Set.image_symm_diff /-
-theorem image_symm_diff (hf : Injective f) (s t : Set α) : f '' s ∆ t = (f '' s) ∆ (f '' t) := by
+#print Set.image_symmDiff /-
+theorem image_symmDiff (hf : Injective f) (s t : Set α) : f '' s ∆ t = (f '' s) ∆ (f '' t) := by
   simp_rw [Set.symmDiff_def, image_union, image_diff hf]
-#align set.image_symm_diff Set.image_symm_diff
+#align set.image_symm_diff Set.image_symmDiff
 -/
 
 #print Set.Nonempty.image /-
Diff
@@ -2,14 +2,11 @@
 Copyright (c) 2014 Jeremy Avigad. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jeremy Avigad, Leonardo de Moura
-
-! This file was ported from Lean 3 source module data.set.image
-! 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.Basic
 
+#align_import data.set.image from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4"
+
 /-!
 # Images and preimages of sets
 
@@ -1030,7 +1027,7 @@ theorem exists_subset_range_and_iff {f : α → β} {p : Set β → Prop} :
 #align set.exists_subset_range_and_iff Set.exists_subset_range_and_iff
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (s «expr ⊆ » range[set.range] f) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (s «expr ⊆ » range[set.range] f) -/
 #print Set.exists_subset_range_iff /-
 theorem exists_subset_range_iff {f : α → β} {p : Set β → Prop} :
     (∃ (s : _) (_ : s ⊆ range f), p s) ↔ ∃ s, p (f '' s) := by
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jeremy Avigad, Leonardo de Moura
 
 ! This file was ported from Lean 3 source module data.set.image
-! leanprover-community/mathlib commit 4550138052d0a416b700c27056d492e2ef53214e
+! leanprover-community/mathlib commit 48fb5b5280e7c81672afc9524185ae994553ebf4
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -69,7 +69,7 @@ theorem preimage_empty : f ⁻¹' ∅ = ∅ :=
 -/
 
 #print Set.mem_preimage /-
-@[simp]
+@[simp, mfld_simps]
 theorem mem_preimage {s : Set β} {a : α} : a ∈ f ⁻¹' s ↔ f a ∈ s :=
   Iff.rfl
 #align set.mem_preimage Set.mem_preimage
@@ -87,7 +87,7 @@ theorem preimage_mono {s t : Set β} (h : s ⊆ t) : f ⁻¹' s ⊆ f ⁻¹' t :
 -/
 
 #print Set.preimage_univ /-
-@[simp]
+@[simp, mfld_simps]
 theorem preimage_univ : f ⁻¹' univ = univ :=
   rfl
 #align set.preimage_univ Set.preimage_univ
@@ -100,7 +100,7 @@ theorem subset_preimage_univ {s : Set α} : s ⊆ f ⁻¹' univ :=
 -/
 
 #print Set.preimage_inter /-
-@[simp]
+@[simp, mfld_simps]
 theorem preimage_inter {s t : Set β} : f ⁻¹' (s ∩ t) = f ⁻¹' s ∩ f ⁻¹' t :=
   rfl
 #align set.preimage_inter Set.preimage_inter
@@ -150,6 +150,7 @@ theorem preimage_id_eq : preimage (id : α → α) = id :=
 -/
 
 #print Set.preimage_id /-
+@[mfld_simps]
 theorem preimage_id {s : Set α} : id ⁻¹' s = s :=
   rfl
 #align set.preimage_id Set.preimage_id
@@ -279,6 +280,7 @@ theorem image_eta (f : α → β) : f '' s = (fun x => f x) '' s :=
 -/
 
 #print Set.mem_image_of_mem /-
+@[mfld_simps]
 theorem mem_image_of_mem (f : α → β) {x : α} {a : Set α} (h : x ∈ a) : f x ∈ f '' a :=
   ⟨_, h, rfl⟩
 #align set.mem_image_of_mem Set.mem_image_of_mem
@@ -444,7 +446,7 @@ theorem Nonempty.image_const {s : Set α} (hs : s.Nonempty) (a : β) : (fun _ =>
 -/
 
 #print Set.image_eq_empty /-
-@[simp]
+@[simp, mfld_simps]
 theorem image_eq_empty {α β} {f : α → β} {s : Set α} : f '' s = ∅ ↔ s = ∅ :=
   by
   simp only [eq_empty_iff_forall_not_mem]
@@ -839,7 +841,7 @@ theorem mem_range {x : α} : x ∈ range f ↔ ∃ y, f y = x :=
 -/
 
 #print Set.mem_range_self /-
-@[simp]
+@[simp, mfld_simps]
 theorem mem_range_self (i : ι) : f i ∈ range f :=
   ⟨i, rfl⟩
 #align set.mem_range_self Set.mem_range_self
@@ -1082,7 +1084,7 @@ theorem preimage_image_preimage {f : α → β} {s : Set β} : f ⁻¹' (f '' (f
 -/
 
 #print Set.range_id /-
-@[simp]
+@[simp, mfld_simps]
 theorem range_id : range (@id α) = univ :=
   range_iff_surjective.2 surjective_id
 #align set.range_id Set.range_id
Diff
@@ -55,17 +55,18 @@ def preimage {α : Type u} {β : Type v} (f : α → β) (s : Set β) : Set α :
 #align set.preimage Set.preimage
 -/
 
--- mathport name: «expr ⁻¹' »
 infixl:80 " ⁻¹' " => preimage
 
 section Preimage
 
 variable {f : α → β} {g : β → γ}
 
+#print Set.preimage_empty /-
 @[simp]
 theorem preimage_empty : f ⁻¹' ∅ = ∅ :=
   rfl
 #align set.preimage_empty Set.preimage_empty
+-/
 
 #print Set.mem_preimage /-
 @[simp]
@@ -85,34 +86,46 @@ theorem preimage_mono {s t : Set β} (h : s ⊆ t) : f ⁻¹' s ⊆ f ⁻¹' t :
 #align set.preimage_mono Set.preimage_mono
 -/
 
+#print Set.preimage_univ /-
 @[simp]
 theorem preimage_univ : f ⁻¹' univ = univ :=
   rfl
 #align set.preimage_univ Set.preimage_univ
+-/
 
+#print Set.subset_preimage_univ /-
 theorem subset_preimage_univ {s : Set α} : s ⊆ f ⁻¹' univ :=
   subset_univ _
 #align set.subset_preimage_univ Set.subset_preimage_univ
+-/
 
+#print Set.preimage_inter /-
 @[simp]
 theorem preimage_inter {s t : Set β} : f ⁻¹' (s ∩ t) = f ⁻¹' s ∩ f ⁻¹' t :=
   rfl
 #align set.preimage_inter Set.preimage_inter
+-/
 
+#print Set.preimage_union /-
 @[simp]
 theorem preimage_union {s t : Set β} : f ⁻¹' (s ∪ t) = f ⁻¹' s ∪ f ⁻¹' t :=
   rfl
 #align set.preimage_union Set.preimage_union
+-/
 
+#print Set.preimage_compl /-
 @[simp]
 theorem preimage_compl {s : Set β} : f ⁻¹' sᶜ = (f ⁻¹' s)ᶜ :=
   rfl
 #align set.preimage_compl Set.preimage_compl
+-/
 
+#print Set.preimage_diff /-
 @[simp]
 theorem preimage_diff (f : α → β) (s t : Set β) : f ⁻¹' (s \ t) = f ⁻¹' s \ f ⁻¹' t :=
   rfl
 #align set.preimage_diff Set.preimage_diff
+-/
 
 #print Set.preimage_ite /-
 @[simp]
@@ -170,13 +183,17 @@ theorem preimage_const (b : β) (s : Set β) [Decidable (b ∈ s)] :
 #align set.preimage_const Set.preimage_const
 -/
 
+#print Set.preimage_comp /-
 theorem preimage_comp {s : Set γ} : g ∘ f ⁻¹' s = f ⁻¹' (g ⁻¹' s) :=
   rfl
 #align set.preimage_comp Set.preimage_comp
+-/
 
+#print Set.preimage_comp_eq /-
 theorem preimage_comp_eq : preimage (g ∘ f) = preimage f ∘ preimage g :=
   rfl
 #align set.preimage_comp_eq Set.preimage_comp_eq
+-/
 
 #print Set.preimage_iterate_eq /-
 @[simp]
@@ -187,10 +204,12 @@ theorem preimage_iterate_eq {f : α → α} {n : ℕ} : Set.preimage (f^[n]) = S
 #align set.preimage_iterate_eq Set.preimage_iterate_eq
 -/
 
+#print Set.preimage_preimage /-
 theorem preimage_preimage {g : β → γ} {f : α → β} {s : Set γ} :
     f ⁻¹' (g ⁻¹' s) = (fun x => g (f x)) ⁻¹' s :=
   preimage_comp.symm
 #align set.preimage_preimage Set.preimage_preimage
+-/
 
 #print Set.eq_preimage_subtype_val_iff /-
 theorem eq_preimage_subtype_val_iff {p : α → Prop} {s : Set (Subtype p)} {t : Set α} :
@@ -207,6 +226,7 @@ theorem nonempty_of_nonempty_preimage {s : Set β} {f : α → β} (hf : (f ⁻
 #align set.nonempty_of_nonempty_preimage Set.nonempty_of_nonempty_preimage
 -/
 
+#print Set.preimage_subtype_coe_eq_compl /-
 theorem preimage_subtype_coe_eq_compl {α : Type _} {s u v : Set α} (hsuv : s ⊆ u ∪ v)
     (H : s ∩ (u ∩ v) = ∅) : (coe : s → α) ⁻¹' u = (coe ⁻¹' v)ᶜ :=
   by
@@ -217,6 +237,7 @@ theorem preimage_subtype_coe_eq_compl {α : Type _} {s u v : Set α} (hsuv : s 
   · intro hx
     exact Or.elim (hsuv x_in_s) id fun hx' => hx.elim hx'
 #align set.preimage_subtype_coe_eq_compl Set.preimage_subtype_coe_eq_compl
+-/
 
 end Preimage
 
@@ -235,18 +256,21 @@ def image (f : α → β) (s : Set α) : Set β :=
 #align set.image Set.image
 -/
 
--- mathport name: «expr '' »
 infixl:80 " '' " => image
 
+#print Set.mem_image_iff_bex /-
 theorem mem_image_iff_bex {f : α → β} {s : Set α} {y : β} :
     y ∈ f '' s ↔ ∃ (x : _) (_ : x ∈ s), f x = y :=
   bex_def.symm
 #align set.mem_image_iff_bex Set.mem_image_iff_bex
+-/
 
+#print Set.mem_image /-
 @[simp]
 theorem mem_image (f : α → β) (s : Set α) (y : β) : y ∈ f '' s ↔ ∃ x, x ∈ s ∧ f x = y :=
   Iff.rfl
 #align set.mem_image Set.mem_image
+-/
 
 #print Set.image_eta /-
 theorem image_eta (f : α → β) : f '' s = (fun x => f x) '' s :=
@@ -254,57 +278,79 @@ theorem image_eta (f : α → β) : f '' s = (fun x => f x) '' s :=
 #align set.image_eta Set.image_eta
 -/
 
+#print Set.mem_image_of_mem /-
 theorem mem_image_of_mem (f : α → β) {x : α} {a : Set α} (h : x ∈ a) : f x ∈ f '' a :=
   ⟨_, h, rfl⟩
 #align set.mem_image_of_mem Set.mem_image_of_mem
+-/
 
+#print Function.Injective.mem_set_image /-
 theorem Function.Injective.mem_set_image {f : α → β} (hf : Injective f) {s : Set α} {a : α} :
     f a ∈ f '' s ↔ a ∈ s :=
   ⟨fun ⟨b, hb, Eq⟩ => hf Eq ▸ hb, mem_image_of_mem f⟩
 #align function.injective.mem_set_image Function.Injective.mem_set_image
+-/
 
+#print Set.ball_image_iff /-
 theorem ball_image_iff {f : α → β} {s : Set α} {p : β → Prop} :
     (∀ y ∈ f '' s, p y) ↔ ∀ x ∈ s, p (f x) := by simp
 #align set.ball_image_iff Set.ball_image_iff
+-/
 
+#print Set.ball_image_of_ball /-
 theorem ball_image_of_ball {f : α → β} {s : Set α} {p : β → Prop} (h : ∀ x ∈ s, p (f x)) :
     ∀ y ∈ f '' s, p y :=
   ball_image_iff.2 h
 #align set.ball_image_of_ball Set.ball_image_of_ball
+-/
 
+#print Set.bex_image_iff /-
 theorem bex_image_iff {f : α → β} {s : Set α} {p : β → Prop} :
     (∃ y ∈ f '' s, p y) ↔ ∃ x ∈ s, p (f x) := by simp
 #align set.bex_image_iff Set.bex_image_iff
+-/
 
+#print Set.mem_image_elim /-
 theorem mem_image_elim {f : α → β} {s : Set α} {C : β → Prop} (h : ∀ x : α, x ∈ s → C (f x)) :
     ∀ {y : β}, y ∈ f '' s → C y
   | _, ⟨a, a_in, rfl⟩ => h a a_in
 #align set.mem_image_elim Set.mem_image_elim
+-/
 
+#print Set.mem_image_elim_on /-
 theorem mem_image_elim_on {f : α → β} {s : Set α} {C : β → Prop} {y : β} (h_y : y ∈ f '' s)
     (h : ∀ x : α, x ∈ s → C (f x)) : C y :=
   mem_image_elim h h_y
 #align set.mem_image_elim_on Set.mem_image_elim_on
+-/
 
+#print Set.image_congr /-
 @[congr]
 theorem image_congr {f g : α → β} {s : Set α} (h : ∀ a ∈ s, f a = g a) : f '' s = g '' s := by
   safe [ext_iff, iff_def]
 #align set.image_congr Set.image_congr
+-/
 
+#print Set.image_congr' /-
 /-- A common special case of `image_congr` -/
 theorem image_congr' {f g : α → β} {s : Set α} (h : ∀ x : α, f x = g x) : f '' s = g '' s :=
   image_congr fun x _ => h x
 #align set.image_congr' Set.image_congr'
+-/
 
+#print Set.image_comp /-
 theorem image_comp (f : β → γ) (g : α → β) (a : Set α) : f ∘ g '' a = f '' (g '' a) :=
   Subset.antisymm (ball_image_of_ball fun a ha => mem_image_of_mem _ <| mem_image_of_mem _ ha)
     (ball_image_of_ball <| ball_image_of_ball fun a ha => mem_image_of_mem _ ha)
 #align set.image_comp Set.image_comp
+-/
 
+#print Set.image_image /-
 /-- A variant of `image_comp`, useful for rewriting -/
 theorem image_image (g : β → γ) (f : α → β) (s : Set α) : g '' (f '' s) = (fun x => g (f x)) '' s :=
   (image_comp g f s).symm
 #align set.image_image Set.image_image
+-/
 
 #print Set.image_comm /-
 theorem image_comm {β'} {f : β → γ} {g : α → β} {f' : α → β'} {g' : β' → γ}
@@ -313,10 +359,12 @@ theorem image_comm {β'} {f : β → γ} {g : α → β} {f' : α → β'} {g' :
 #align set.image_comm Set.image_comm
 -/
 
+#print Function.Semiconj.set_image /-
 theorem Function.Semiconj.set_image {f : α → β} {ga : α → α} {gb : β → β}
     (h : Function.Semiconj f ga gb) : Function.Semiconj (image f) (image ga) (image gb) := fun s =>
   image_comm h
 #align function.semiconj.set_image Function.Semiconj.set_image
+-/
 
 #print Function.Commute.set_image /-
 theorem Function.Commute.set_image {f g : α → α} (h : Function.Commute f g) :
@@ -325,21 +373,27 @@ theorem Function.Commute.set_image {f g : α → α} (h : Function.Commute f g)
 #align function.commute.set_image Function.Commute.set_image
 -/
 
+#print Set.image_subset /-
 /-- Image is monotone with respect to `⊆`. See `set.monotone_image` for the statement in
 terms of `≤`. -/
 theorem image_subset {a b : Set α} (f : α → β) (h : a ⊆ b) : f '' a ⊆ f '' b := by
   simp only [subset_def, mem_image]; exact fun x => fun ⟨w, h1, h2⟩ => ⟨w, h h1, h2⟩
 #align set.image_subset Set.image_subset
+-/
 
+#print Set.monotone_image /-
 /-- `set.image` is monotone. See `set.image_subset` for the statement in terms of `⊆`. -/
 theorem monotone_image {f : α → β} : Monotone (image f) := fun s t => image_subset _
 #align set.monotone_image Set.monotone_image
+-/
 
+#print Set.image_union /-
 theorem image_union (f : α → β) (s t : Set α) : f '' (s ∪ t) = f '' s ∪ f '' t :=
   ext fun x =>
     ⟨by rintro ⟨a, h | h, rfl⟩ <;> [left; right] <;> exact ⟨_, h, rfl⟩, by
       rintro (⟨a, h, rfl⟩ | ⟨a, h, rfl⟩) <;> refine' ⟨_, _, rfl⟩ <;> [left; right] <;> exact h⟩
 #align set.image_union Set.image_union
+-/
 
 #print Set.image_empty /-
 @[simp]
@@ -347,20 +401,26 @@ theorem image_empty (f : α → β) : f '' ∅ = ∅ := by ext; simp
 #align set.image_empty Set.image_empty
 -/
 
+#print Set.image_inter_subset /-
 theorem image_inter_subset (f : α → β) (s t : Set α) : f '' (s ∩ t) ⊆ f '' s ∩ f '' t :=
   subset_inter (image_subset _ <| inter_subset_left _ _) (image_subset _ <| inter_subset_right _ _)
 #align set.image_inter_subset Set.image_inter_subset
+-/
 
+#print Set.image_inter_on /-
 theorem image_inter_on {f : α → β} {s t : Set α} (h : ∀ x ∈ t, ∀ y ∈ s, f x = f y → x = y) :
     f '' (s ∩ t) = f '' s ∩ f '' t :=
   (image_inter_subset _ _ _).antisymm fun b ⟨⟨a₁, ha₁, h₁⟩, ⟨a₂, ha₂, h₂⟩⟩ =>
     have : a₂ = a₁ := h _ ha₂ _ ha₁ (by simp [*])
     ⟨a₁, ⟨ha₁, this ▸ ha₂⟩, h₁⟩
 #align set.image_inter_on Set.image_inter_on
+-/
 
+#print Set.image_inter /-
 theorem image_inter {f : α → β} {s t : Set α} (H : Injective f) : f '' (s ∩ t) = f '' s ∩ f '' t :=
   image_inter_on fun x _ y _ h => H h
 #align set.image_inter Set.image_inter
+-/
 
 #print Set.image_univ_of_surjective /-
 theorem image_univ_of_surjective {ι : Type _} {f : ι → β} (H : Surjective f) : f '' univ = univ :=
@@ -374,19 +434,23 @@ theorem image_singleton {f : α → β} {a : α} : f '' {a} = {f a} := by ext; s
 #align set.image_singleton Set.image_singleton
 -/
 
+#print Set.Nonempty.image_const /-
 @[simp]
 theorem Nonempty.image_const {s : Set α} (hs : s.Nonempty) (a : β) : (fun _ => a) '' s = {a} :=
   ext fun x =>
     ⟨fun ⟨y, _, h⟩ => h ▸ mem_singleton _, fun h =>
       (eq_of_mem_singleton h).symm ▸ hs.imp fun y hy => ⟨hy, rfl⟩⟩
 #align set.nonempty.image_const Set.Nonempty.image_const
+-/
 
+#print Set.image_eq_empty /-
 @[simp]
 theorem image_eq_empty {α β} {f : α → β} {s : Set α} : f '' s = ∅ ↔ s = ∅ :=
   by
   simp only [eq_empty_iff_forall_not_mem]
   exact ⟨fun H a ha => H _ ⟨_, ha, rfl⟩, fun H b ⟨_, ha, _⟩ => H _ ha⟩
 #align set.image_eq_empty Set.image_eq_empty
+-/
 
 #print Set.preimage_compl_eq_image_compl /-
 theorem preimage_compl_eq_image_compl [BooleanAlgebra α] (S : Set α) : compl ⁻¹' S = compl '' S :=
@@ -420,9 +484,11 @@ theorem compl_compl_image [BooleanAlgebra α] (S : Set α) : compl '' (compl ''
 #align set.compl_compl_image Set.compl_compl_image
 -/
 
+#print Set.image_insert_eq /-
 theorem image_insert_eq {f : α → β} {a : α} {s : Set α} : f '' insert a s = insert (f a) (f '' s) :=
   by ext; simp [and_or_left, exists_or, eq_comm, or_comm', and_comm']
 #align set.image_insert_eq Set.image_insert_eq
+-/
 
 #print Set.image_pair /-
 theorem image_pair (f : α → β) (a b : α) : f '' {a, b} = {f a, f b} := by
@@ -430,70 +496,98 @@ theorem image_pair (f : α → β) (a b : α) : f '' {a, b} = {f a, f b} := by
 #align set.image_pair Set.image_pair
 -/
 
+#print Set.image_subset_preimage_of_inverse /-
 theorem image_subset_preimage_of_inverse {f : α → β} {g : β → α} (I : LeftInverse g f) (s : Set α) :
     f '' s ⊆ g ⁻¹' s := fun b ⟨a, h, e⟩ => e ▸ ((I a).symm ▸ h : g (f a) ∈ s)
 #align set.image_subset_preimage_of_inverse Set.image_subset_preimage_of_inverse
+-/
 
+#print Set.preimage_subset_image_of_inverse /-
 theorem preimage_subset_image_of_inverse {f : α → β} {g : β → α} (I : LeftInverse g f) (s : Set β) :
     f ⁻¹' s ⊆ g '' s := fun b h => ⟨f b, h, I b⟩
 #align set.preimage_subset_image_of_inverse Set.preimage_subset_image_of_inverse
+-/
 
+#print Set.image_eq_preimage_of_inverse /-
 theorem image_eq_preimage_of_inverse {f : α → β} {g : β → α} (h₁ : LeftInverse g f)
     (h₂ : RightInverse g f) : image f = preimage g :=
   funext fun s =>
     Subset.antisymm (image_subset_preimage_of_inverse h₁ s) (preimage_subset_image_of_inverse h₂ s)
 #align set.image_eq_preimage_of_inverse Set.image_eq_preimage_of_inverse
+-/
 
+#print Set.mem_image_iff_of_inverse /-
 theorem mem_image_iff_of_inverse {f : α → β} {g : β → α} {b : β} {s : Set α} (h₁ : LeftInverse g f)
     (h₂ : RightInverse g f) : b ∈ f '' s ↔ g b ∈ s := by
   rw [image_eq_preimage_of_inverse h₁ h₂] <;> rfl
 #align set.mem_image_iff_of_inverse Set.mem_image_iff_of_inverse
+-/
 
+#print Set.image_compl_subset /-
 theorem image_compl_subset {f : α → β} {s : Set α} (H : Injective f) : f '' sᶜ ⊆ (f '' s)ᶜ :=
   Disjoint.subset_compl_left <| by simp [disjoint_iff_inf_le, ← image_inter H]
 #align set.image_compl_subset Set.image_compl_subset
+-/
 
+#print Set.subset_image_compl /-
 theorem subset_image_compl {f : α → β} {s : Set α} (H : Surjective f) : (f '' s)ᶜ ⊆ f '' sᶜ :=
   compl_subset_iff_union.2 <| by rw [← image_union]; simp [image_univ_of_surjective H]
 #align set.subset_image_compl Set.subset_image_compl
+-/
 
+#print Set.image_compl_eq /-
 theorem image_compl_eq {f : α → β} {s : Set α} (H : Bijective f) : f '' sᶜ = (f '' s)ᶜ :=
   Subset.antisymm (image_compl_subset H.1) (subset_image_compl H.2)
 #align set.image_compl_eq Set.image_compl_eq
+-/
 
+#print Set.subset_image_diff /-
 theorem subset_image_diff (f : α → β) (s t : Set α) : f '' s \ f '' t ⊆ f '' (s \ t) :=
   by
   rw [diff_subset_iff, ← image_union, union_diff_self]
   exact image_subset f (subset_union_right t s)
 #align set.subset_image_diff Set.subset_image_diff
+-/
 
+#print Set.subset_image_symm_diff /-
 theorem subset_image_symm_diff : (f '' s) ∆ (f '' t) ⊆ f '' s ∆ t :=
   (union_subset_union (subset_image_diff _ _ _) <| subset_image_diff _ _ _).trans
     (image_union _ _ _).Superset
 #align set.subset_image_symm_diff Set.subset_image_symm_diff
+-/
 
+#print Set.image_diff /-
 theorem image_diff {f : α → β} (hf : Injective f) (s t : Set α) : f '' (s \ t) = f '' s \ f '' t :=
   Subset.antisymm
     (Subset.trans (image_inter_subset _ _ _) <| inter_subset_inter_right _ <| image_compl_subset hf)
     (subset_image_diff f s t)
 #align set.image_diff Set.image_diff
+-/
 
+#print Set.image_symm_diff /-
 theorem image_symm_diff (hf : Injective f) (s t : Set α) : f '' s ∆ t = (f '' s) ∆ (f '' t) := by
   simp_rw [Set.symmDiff_def, image_union, image_diff hf]
 #align set.image_symm_diff Set.image_symm_diff
+-/
 
+#print Set.Nonempty.image /-
 theorem Nonempty.image (f : α → β) {s : Set α} : s.Nonempty → (f '' s).Nonempty
   | ⟨x, hx⟩ => ⟨f x, mem_image_of_mem f hx⟩
 #align set.nonempty.image Set.Nonempty.image
+-/
 
+#print Set.Nonempty.of_image /-
 theorem Nonempty.of_image {f : α → β} {s : Set α} : (f '' s).Nonempty → s.Nonempty
   | ⟨y, x, hx, _⟩ => ⟨x, hx⟩
 #align set.nonempty.of_image Set.Nonempty.of_image
+-/
 
+#print Set.nonempty_image_iff /-
 @[simp]
 theorem nonempty_image_iff {f : α → β} {s : Set α} : (f '' s).Nonempty ↔ s.Nonempty :=
   ⟨Nonempty.of_image, fun h => h.image f⟩
 #align set.nonempty_image_iff Set.nonempty_image_iff
+-/
 
 #print Set.Nonempty.preimage /-
 theorem Nonempty.preimage {s : Set β} (hs : s.Nonempty) {f : α → β} (hf : Surjective f) :
@@ -507,11 +601,13 @@ theorem Nonempty.preimage {s : Set β} (hs : s.Nonempty) {f : α → β} (hf : S
 instance (f : α → β) (s : Set α) [Nonempty s] : Nonempty (f '' s) :=
   (Set.Nonempty.image f nonempty_of_nonempty_subtype).to_subtype
 
+#print Set.image_subset_iff /-
 /-- image and preimage are a Galois connection -/
 @[simp]
 theorem image_subset_iff {s : Set α} {t : Set β} {f : α → β} : f '' s ⊆ t ↔ s ⊆ f ⁻¹' t :=
   ball_image_iff
 #align set.image_subset_iff Set.image_subset_iff
+-/
 
 #print Set.image_preimage_subset /-
 theorem image_preimage_subset (f : α → β) (s : Set β) : f '' (f ⁻¹' s) ⊆ s :=
@@ -519,13 +615,17 @@ theorem image_preimage_subset (f : α → β) (s : Set β) : f '' (f ⁻¹' s) 
 #align set.image_preimage_subset Set.image_preimage_subset
 -/
 
+#print Set.subset_preimage_image /-
 theorem subset_preimage_image (f : α → β) (s : Set α) : s ⊆ f ⁻¹' (f '' s) := fun x =>
   mem_image_of_mem f
 #align set.subset_preimage_image Set.subset_preimage_image
+-/
 
+#print Set.preimage_image_eq /-
 theorem preimage_image_eq {f : α → β} (s : Set α) (h : Injective f) : f ⁻¹' (f '' s) = s :=
   Subset.antisymm (fun x ⟨y, hy, e⟩ => h e ▸ hy) (subset_preimage_image f s)
 #align set.preimage_image_eq Set.preimage_image_eq
+-/
 
 #print Set.image_preimage_eq /-
 theorem image_preimage_eq {f : α → β} (s : Set β) (h : Surjective f) : f '' (f ⁻¹' s) = s :=
@@ -542,6 +642,7 @@ theorem preimage_eq_preimage {f : β → α} (hf : Surjective f) : f ⁻¹' s =
 #align set.preimage_eq_preimage Set.preimage_eq_preimage
 -/
 
+#print Set.image_inter_preimage /-
 theorem image_inter_preimage (f : α → β) (s : Set α) (t : Set β) :
     f '' (s ∩ f ⁻¹' t) = f '' s ∩ t := by
   apply subset.antisymm
@@ -552,60 +653,84 @@ theorem image_inter_preimage (f : α → β) (s : Set α) (t : Set β) :
   · rintro _ ⟨⟨x, h', rfl⟩, h⟩
     exact ⟨x, ⟨h', h⟩, rfl⟩
 #align set.image_inter_preimage Set.image_inter_preimage
+-/
 
+#print Set.image_preimage_inter /-
 theorem image_preimage_inter (f : α → β) (s : Set α) (t : Set β) :
     f '' (f ⁻¹' t ∩ s) = t ∩ f '' s := by simp only [inter_comm, image_inter_preimage]
 #align set.image_preimage_inter Set.image_preimage_inter
+-/
 
+#print Set.image_inter_nonempty_iff /-
 @[simp]
 theorem image_inter_nonempty_iff {f : α → β} {s : Set α} {t : Set β} :
     (f '' s ∩ t).Nonempty ↔ (s ∩ f ⁻¹' t).Nonempty := by
   rw [← image_inter_preimage, nonempty_image_iff]
 #align set.image_inter_nonempty_iff Set.image_inter_nonempty_iff
+-/
 
+#print Set.image_diff_preimage /-
 theorem image_diff_preimage {f : α → β} {s : Set α} {t : Set β} : f '' (s \ f ⁻¹' t) = f '' s \ t :=
   by simp_rw [diff_eq, ← preimage_compl, image_inter_preimage]
 #align set.image_diff_preimage Set.image_diff_preimage
+-/
 
+#print Set.compl_image /-
 theorem compl_image : image (compl : Set α → Set α) = preimage compl :=
   image_eq_preimage_of_inverse compl_compl compl_compl
 #align set.compl_image Set.compl_image
+-/
 
+#print Set.compl_image_set_of /-
 theorem compl_image_set_of {p : Set α → Prop} : compl '' {s | p s} = {s | p (sᶜ)} :=
   congr_fun compl_image p
 #align set.compl_image_set_of Set.compl_image_set_of
+-/
 
+#print Set.inter_preimage_subset /-
 theorem inter_preimage_subset (s : Set α) (t : Set β) (f : α → β) :
     s ∩ f ⁻¹' t ⊆ f ⁻¹' (f '' s ∩ t) := fun x h => ⟨mem_image_of_mem _ h.left, h.right⟩
 #align set.inter_preimage_subset Set.inter_preimage_subset
+-/
 
+#print Set.union_preimage_subset /-
 theorem union_preimage_subset (s : Set α) (t : Set β) (f : α → β) :
     s ∪ f ⁻¹' t ⊆ f ⁻¹' (f '' s ∪ t) := fun x h =>
   Or.elim h (fun l => Or.inl <| mem_image_of_mem _ l) fun r => Or.inr r
 #align set.union_preimage_subset Set.union_preimage_subset
+-/
 
+#print Set.subset_image_union /-
 theorem subset_image_union (f : α → β) (s : Set α) (t : Set β) : f '' (s ∪ f ⁻¹' t) ⊆ f '' s ∪ t :=
   image_subset_iff.2 (union_preimage_subset _ _ _)
 #align set.subset_image_union Set.subset_image_union
+-/
 
+#print Set.preimage_subset_iff /-
 theorem preimage_subset_iff {A : Set α} {B : Set β} {f : α → β} :
     f ⁻¹' B ⊆ A ↔ ∀ a : α, f a ∈ B → a ∈ A :=
   Iff.rfl
 #align set.preimage_subset_iff Set.preimage_subset_iff
+-/
 
+#print Set.image_eq_image /-
 theorem image_eq_image {f : α → β} (hf : Injective f) : f '' s = f '' t ↔ s = t :=
   Iff.symm <|
     Iff.intro (fun eq => Eq ▸ rfl) fun eq => by
       rw [← preimage_image_eq s hf, ← preimage_image_eq t hf, Eq]
 #align set.image_eq_image Set.image_eq_image
+-/
 
+#print Set.image_subset_image_iff /-
 theorem image_subset_image_iff {f : α → β} (hf : Injective f) : f '' s ⊆ f '' t ↔ s ⊆ t :=
   by
   refine' Iff.symm <| Iff.intro (image_subset f) fun h => _
   rw [← preimage_image_eq s hf, ← preimage_image_eq t hf]
   exact preimage_mono h
 #align set.image_subset_image_iff Set.image_subset_image_iff
+-/
 
+#print Set.prod_quotient_preimage_eq_image /-
 theorem prod_quotient_preimage_eq_image [s : Setoid α] (g : Quotient s → β) {h : α → β}
     (Hh : h = g ∘ Quotient.mk') (r : Set (β × β)) :
     {x : Quotient s × Quotient s | (g x.1, g x.2) ∈ r} =
@@ -617,12 +742,15 @@ theorem prod_quotient_preimage_eq_image [s : Setoid α] (g : Quotient s → β)
           have h₃ : ⟦b₁⟧ = a₁ ∧ ⟦b₂⟧ = a₂ := Prod.ext_iff.1 h₂
           h₃.1 ▸ h₃.2 ▸ h₁⟩
 #align set.prod_quotient_preimage_eq_image Set.prod_quotient_preimage_eq_image
+-/
 
+#print Set.exists_image_iff /-
 theorem exists_image_iff (f : α → β) (x : Set α) (P : β → Prop) :
     (∃ a : f '' x, P a) ↔ ∃ a : x, P (f a) :=
   ⟨fun ⟨a, h⟩ => ⟨⟨_, a.Prop.choose_spec.1⟩, a.Prop.choose_spec.2.symm ▸ h⟩, fun ⟨a, h⟩ =>
     ⟨⟨_, _, a.Prop, rfl⟩, h⟩⟩
 #align set.exists_image_iff Set.exists_image_iff
+-/
 
 #print Set.imageFactorization /-
 /-- Restriction of `f` to `s` factors through `s.image_factorization f : s → f '' s`. -/
@@ -631,14 +759,18 @@ def imageFactorization (f : α → β) (s : Set α) : s → f '' s := fun p =>
 #align set.image_factorization Set.imageFactorization
 -/
 
+#print Set.imageFactorization_eq /-
 theorem imageFactorization_eq {f : α → β} {s : Set α} :
     Subtype.val ∘ imageFactorization f s = f ∘ Subtype.val :=
   funext fun p => rfl
 #align set.image_factorization_eq Set.imageFactorization_eq
+-/
 
+#print Set.surjective_onto_image /-
 theorem surjective_onto_image {f : α → β} {s : Set α} : Surjective (imageFactorization f s) :=
   fun ⟨_, ⟨a, ha, rfl⟩⟩ => ⟨⟨a, ha⟩, rfl⟩
 #align set.surjective_onto_image Set.surjective_onto_image
+-/
 
 #print Set.image_perm /-
 /-- If the only elements outside `s` are those left fixed by `σ`, then mapping by `σ` has no effect.
@@ -660,6 +792,7 @@ end Image
 /-! ### Lemmas about the powerset and image. -/
 
 
+#print Set.powerset_insert /-
 /-- The powerset of `{a} ∪ s` is `𝒫 s` together with `{a} ∪ t` for each `t ∈ 𝒫 s`. -/
 theorem powerset_insert (s : Set α) (a : α) : 𝒫 insert a s = 𝒫 s ∪ insert a '' 𝒫 s :=
   by
@@ -679,6 +812,7 @@ theorem powerset_insert (s : Set α) (a : α) : 𝒫 insert a s = 𝒫 s ∪ ins
     · exact subset_trans h (subset_insert a s)
     · exact insert_subset_insert h₁
 #align set.powerset_insert Set.powerset_insert
+-/
 
 /-! ### Lemmas about range of a function. -/
 
@@ -697,39 +831,55 @@ def range (f : ι → α) : Set α :=
 #align set.range Set.range
 -/
 
+#print Set.mem_range /-
 @[simp]
 theorem mem_range {x : α} : x ∈ range f ↔ ∃ y, f y = x :=
   Iff.rfl
 #align set.mem_range Set.mem_range
+-/
 
+#print Set.mem_range_self /-
 @[simp]
 theorem mem_range_self (i : ι) : f i ∈ range f :=
   ⟨i, rfl⟩
 #align set.mem_range_self Set.mem_range_self
+-/
 
+#print Set.forall_range_iff /-
 theorem forall_range_iff {p : α → Prop} : (∀ a ∈ range f, p a) ↔ ∀ i, p (f i) := by simp
 #align set.forall_range_iff Set.forall_range_iff
+-/
 
+#print Set.forall_subtype_range_iff /-
 theorem forall_subtype_range_iff {p : range f → Prop} :
     (∀ a : range f, p a) ↔ ∀ i, p ⟨f i, mem_range_self _⟩ :=
   ⟨fun H i => H _, fun H ⟨y, i, hi⟩ => by subst hi; apply H⟩
 #align set.forall_subtype_range_iff Set.forall_subtype_range_iff
+-/
 
+#print Set.exists_range_iff /-
 theorem exists_range_iff {p : α → Prop} : (∃ a ∈ range f, p a) ↔ ∃ i, p (f i) := by simp
 #align set.exists_range_iff Set.exists_range_iff
+-/
 
+#print Set.exists_range_iff' /-
 theorem exists_range_iff' {p : α → Prop} : (∃ a, a ∈ range f ∧ p a) ↔ ∃ i, p (f i) := by
   simpa only [exists_prop] using exists_range_iff
 #align set.exists_range_iff' Set.exists_range_iff'
+-/
 
+#print Set.exists_subtype_range_iff /-
 theorem exists_subtype_range_iff {p : range f → Prop} :
     (∃ a : range f, p a) ↔ ∃ i, p ⟨f i, mem_range_self _⟩ :=
   ⟨fun ⟨⟨a, i, hi⟩, ha⟩ => by subst a; exact ⟨i, ha⟩, fun ⟨i, hi⟩ => ⟨_, hi⟩⟩
 #align set.exists_subtype_range_iff Set.exists_subtype_range_iff
+-/
 
+#print Set.range_iff_surjective /-
 theorem range_iff_surjective : range f = univ ↔ Surjective f :=
   eq_univ_iff_forall
 #align set.range_iff_surjective Set.range_iff_surjective
+-/
 
 alias range_iff_surjective ↔ _ _root_.function.surjective.range_eq
 #align function.surjective.range_eq Function.Surjective.range_eq
@@ -740,13 +890,17 @@ theorem image_univ {f : α → β} : f '' univ = range f := by ext; simp [image,
 #align set.image_univ Set.image_univ
 -/
 
+#print Set.image_subset_range /-
 theorem image_subset_range (f : α → β) (s) : f '' s ⊆ range f := by
   rw [← image_univ] <;> exact image_subset _ (subset_univ _)
 #align set.image_subset_range Set.image_subset_range
+-/
 
+#print Set.mem_range_of_mem_image /-
 theorem mem_range_of_mem_image (f : α → β) (s) {x : β} (h : x ∈ f '' s) : x ∈ range f :=
   image_subset_range f s h
 #align set.mem_range_of_mem_image Set.mem_range_of_mem_image
+-/
 
 #print Nat.mem_range_succ /-
 theorem Nat.mem_range_succ (i : ℕ) : i ∈ range Nat.succ ↔ 0 < i :=
@@ -763,14 +917,18 @@ theorem Nonempty.preimage' {s : Set β} (hs : s.Nonempty) {f : α → β} (hf :
 #align set.nonempty.preimage' Set.Nonempty.preimage'
 -/
 
+#print Set.range_comp /-
 theorem range_comp (g : α → β) (f : ι → α) : range (g ∘ f) = g '' range f :=
   Subset.antisymm (forall_range_iff.mpr fun i => mem_image_of_mem g (mem_range_self _))
     (ball_image_iff.mpr <| forall_range_iff.mpr mem_range_self)
 #align set.range_comp Set.range_comp
+-/
 
+#print Set.range_subset_iff /-
 theorem range_subset_iff : range f ⊆ s ↔ ∀ y, f y ∈ s :=
   forall_range_iff
 #align set.range_subset_iff Set.range_subset_iff
+-/
 
 #print Set.range_eq_iff /-
 theorem range_eq_iff (f : α → β) (s : Set β) :
@@ -779,13 +937,17 @@ theorem range_eq_iff (f : α → β) (s : Set β) :
 #align set.range_eq_iff Set.range_eq_iff
 -/
 
+#print Set.range_comp_subset_range /-
 theorem range_comp_subset_range (f : α → β) (g : β → γ) : range (g ∘ f) ⊆ range g := by
   rw [range_comp] <;> apply image_subset_range
 #align set.range_comp_subset_range Set.range_comp_subset_range
+-/
 
+#print Set.range_nonempty_iff_nonempty /-
 theorem range_nonempty_iff_nonempty : (range f).Nonempty ↔ Nonempty ι :=
   ⟨fun ⟨y, x, hxy⟩ => ⟨x⟩, fun ⟨x⟩ => ⟨f x, mem_range_self x⟩⟩
 #align set.range_nonempty_iff_nonempty Set.range_nonempty_iff_nonempty
+-/
 
 #print Set.range_nonempty /-
 theorem range_nonempty [h : Nonempty ι] (f : ι → α) : (range f).Nonempty :=
@@ -793,10 +955,12 @@ theorem range_nonempty [h : Nonempty ι] (f : ι → α) : (range f).Nonempty :=
 #align set.range_nonempty Set.range_nonempty
 -/
 
+#print Set.range_eq_empty_iff /-
 @[simp]
 theorem range_eq_empty_iff {f : ι → α} : range f = ∅ ↔ IsEmpty ι := by
   rw [← not_nonempty_iff, ← range_nonempty_iff_nonempty, not_nonempty_iff_eq_empty]
 #align set.range_eq_empty_iff Set.range_eq_empty_iff
+-/
 
 #print Set.range_eq_empty /-
 theorem range_eq_empty [IsEmpty ι] (f : ι → α) : range f = ∅ :=
@@ -807,11 +971,14 @@ theorem range_eq_empty [IsEmpty ι] (f : ι → α) : range f = ∅ :=
 instance [Nonempty ι] (f : ι → α) : Nonempty (range f) :=
   (range_nonempty f).to_subtype
 
+#print Set.image_union_image_compl_eq_range /-
 @[simp]
 theorem image_union_image_compl_eq_range (f : α → β) : f '' s ∪ f '' sᶜ = range f := by
   rw [← image_union, ← image_univ, ← union_compl_self]
 #align set.image_union_image_compl_eq_range Set.image_union_image_compl_eq_range
+-/
 
+#print Set.insert_image_compl_eq_range /-
 theorem insert_image_compl_eq_range (f : α → β) (x : α) : insert (f x) (f '' {x}ᶜ) = range f :=
   by
   ext y; rw [mem_range, mem_insert_iff, mem_image]
@@ -824,12 +991,15 @@ theorem insert_image_compl_eq_range (f : α → β) (x : α) : insert (f x) (f '
     · left; rw [← h, hx]
     · right; refine' ⟨_, _, h⟩; rw [mem_compl_singleton_iff]; exact hx
 #align set.insert_image_compl_eq_range Set.insert_image_compl_eq_range
+-/
 
+#print Set.image_preimage_eq_inter_range /-
 theorem image_preimage_eq_inter_range {f : α → β} {t : Set β} : f '' (f ⁻¹' t) = t ∩ range f :=
   ext fun x =>
     ⟨fun ⟨x, hx, HEq⟩ => HEq ▸ ⟨hx, mem_range_self _⟩, fun ⟨hx, ⟨y, h_eq⟩⟩ =>
       h_eq ▸ mem_image_of_mem f <| show y ∈ f ⁻¹' t by simp [preimage, h_eq, hx]⟩
 #align set.image_preimage_eq_inter_range Set.image_preimage_eq_inter_range
+-/
 
 #print Set.image_preimage_eq_of_subset /-
 theorem image_preimage_eq_of_subset {f : α → β} {s : Set β} (hs : s ⊆ range f) :
@@ -872,13 +1042,16 @@ theorem range_image (f : α → β) : range (image f) = 𝒫 range f :=
 #align set.range_image Set.range_image
 -/
 
+#print Set.preimage_subset_preimage_iff /-
 theorem preimage_subset_preimage_iff {s t : Set α} {f : β → α} (hs : s ⊆ range f) :
     f ⁻¹' s ⊆ f ⁻¹' t ↔ s ⊆ t := by
   constructor
   · intro h x hx; rcases hs hx with ⟨y, rfl⟩; exact h hx
   intro h x; apply h
 #align set.preimage_subset_preimage_iff Set.preimage_subset_preimage_iff
+-/
 
+#print Set.preimage_eq_preimage' /-
 theorem preimage_eq_preimage' {s t : Set α} {f : β → α} (hs : s ⊆ range f) (ht : t ⊆ range f) :
     f ⁻¹' s = f ⁻¹' t ↔ s = t := by
   constructor
@@ -886,16 +1059,21 @@ theorem preimage_eq_preimage' {s t : Set α} {f : β → α} (hs : s ⊆ range f
     rw [← preimage_subset_preimage_iff ht, h]
   rintro rfl; rfl
 #align set.preimage_eq_preimage' Set.preimage_eq_preimage'
+-/
 
+#print Set.preimage_inter_range /-
 @[simp]
 theorem preimage_inter_range {f : α → β} {s : Set β} : f ⁻¹' (s ∩ range f) = f ⁻¹' s :=
   Set.ext fun x => and_iff_left ⟨x, rfl⟩
 #align set.preimage_inter_range Set.preimage_inter_range
+-/
 
+#print Set.preimage_range_inter /-
 @[simp]
 theorem preimage_range_inter {f : α → β} {s : Set β} : f ⁻¹' (range f ∩ s) = f ⁻¹' s := by
   rw [inter_comm, preimage_inter_range]
 #align set.preimage_range_inter Set.preimage_range_inter
+-/
 
 #print Set.preimage_image_preimage /-
 theorem preimage_image_preimage {f : α → β} {s : Set β} : f ⁻¹' (f '' (f ⁻¹' s)) = f ⁻¹' s := by
@@ -924,47 +1102,65 @@ theorem Prod.range_fst [Nonempty β] : range (Prod.fst : α × β → α) = univ
 #align prod.range_fst Prod.range_fst
 -/
 
+#print Prod.range_snd /-
 @[simp]
 theorem Prod.range_snd [Nonempty α] : range (Prod.snd : α × β → β) = univ :=
   Prod.snd_surjective.range_eq
 #align prod.range_snd Prod.range_snd
+-/
 
+#print Set.range_eval /-
 @[simp]
 theorem range_eval {ι : Type _} {α : ι → Sort _} [∀ i, Nonempty (α i)] (i : ι) :
     range (eval i : (∀ i, α i) → α i) = univ :=
   (surjective_eval i).range_eq
 #align set.range_eval Set.range_eval
+-/
 
+#print Set.range_inl /-
 theorem range_inl : range (@Sum.inl α β) = {x | x.isLeft} := by ext (_ | _) <;> simp
 #align set.range_inl Set.range_inl
+-/
 
+#print Set.range_inr /-
 theorem range_inr : range (@Sum.inr α β) = {x | x.isRight} := by ext (_ | _) <;> simp
 #align set.range_inr Set.range_inr
+-/
 
+#print Set.isCompl_range_inl_range_inr /-
 theorem isCompl_range_inl_range_inr : IsCompl (range <| @Sum.inl α β) (range Sum.inr) :=
   IsCompl.of_le (by rintro y ⟨⟨x₁, rfl⟩, ⟨x₂, _⟩⟩; cc)
     (by rintro (x | y) - <;> [left; right] <;> exact mem_range_self _)
 #align set.is_compl_range_inl_range_inr Set.isCompl_range_inl_range_inr
+-/
 
+#print Set.range_inl_union_range_inr /-
 @[simp]
 theorem range_inl_union_range_inr : range (Sum.inl : α → Sum α β) ∪ range Sum.inr = univ :=
   isCompl_range_inl_range_inr.sup_eq_top
 #align set.range_inl_union_range_inr Set.range_inl_union_range_inr
+-/
 
+#print Set.range_inl_inter_range_inr /-
 @[simp]
 theorem range_inl_inter_range_inr : range (Sum.inl : α → Sum α β) ∩ range Sum.inr = ∅ :=
   isCompl_range_inl_range_inr.inf_eq_bot
 #align set.range_inl_inter_range_inr Set.range_inl_inter_range_inr
+-/
 
+#print Set.range_inr_union_range_inl /-
 @[simp]
 theorem range_inr_union_range_inl : range (Sum.inr : β → Sum α β) ∪ range Sum.inl = univ :=
   isCompl_range_inl_range_inr.symm.sup_eq_top
 #align set.range_inr_union_range_inl Set.range_inr_union_range_inl
+-/
 
+#print Set.range_inr_inter_range_inl /-
 @[simp]
 theorem range_inr_inter_range_inl : range (Sum.inr : β → Sum α β) ∩ range Sum.inl = ∅ :=
   isCompl_range_inl_range_inr.symm.inf_eq_bot
 #align set.range_inr_inter_range_inl Set.range_inr_inter_range_inl
+-/
 
 #print Set.preimage_inl_image_inr /-
 @[simp]
@@ -972,14 +1168,18 @@ theorem preimage_inl_image_inr (s : Set β) : Sum.inl ⁻¹' (@Sum.inr α β ''
 #align set.preimage_inl_image_inr Set.preimage_inl_image_inr
 -/
 
+#print Set.preimage_inr_image_inl /-
 @[simp]
 theorem preimage_inr_image_inl (s : Set α) : Sum.inr ⁻¹' (@Sum.inl α β '' s) = ∅ := by ext; simp
 #align set.preimage_inr_image_inl Set.preimage_inr_image_inl
+-/
 
+#print Set.preimage_inl_range_inr /-
 @[simp]
 theorem preimage_inl_range_inr : Sum.inl ⁻¹' range (Sum.inr : β → Sum α β) = ∅ := by
   rw [← image_univ, preimage_inl_image_inr]
 #align set.preimage_inl_range_inr Set.preimage_inl_range_inr
+-/
 
 #print Set.preimage_inr_range_inl /-
 @[simp]
@@ -988,21 +1188,27 @@ theorem preimage_inr_range_inl : Sum.inr ⁻¹' range (Sum.inl : α → Sum α 
 #align set.preimage_inr_range_inl Set.preimage_inr_range_inl
 -/
 
+#print Set.compl_range_inl /-
 @[simp]
 theorem compl_range_inl : range (Sum.inl : α → Sum α β)ᶜ = range (Sum.inr : β → Sum α β) :=
   IsCompl.compl_eq isCompl_range_inl_range_inr
 #align set.compl_range_inl Set.compl_range_inl
+-/
 
+#print Set.compl_range_inr /-
 @[simp]
 theorem compl_range_inr : range (Sum.inr : β → Sum α β)ᶜ = range (Sum.inl : α → Sum α β) :=
   IsCompl.compl_eq isCompl_range_inl_range_inr.symm
 #align set.compl_range_inr Set.compl_range_inr
+-/
 
+#print Set.image_preimage_inl_union_image_preimage_inr /-
 theorem image_preimage_inl_union_image_preimage_inr (s : Set (Sum α β)) :
     Sum.inl '' (Sum.inl ⁻¹' s) ∪ Sum.inr '' (Sum.inr ⁻¹' s) = s := by
   rw [image_preimage_eq_inter_range, image_preimage_eq_inter_range, ← inter_distrib_left,
     range_inl_union_range_inr, inter_univ]
 #align set.image_preimage_inl_union_image_preimage_inr Set.image_preimage_inl_union_image_preimage_inr
+-/
 
 #print Set.range_quot_mk /-
 @[simp]
@@ -1011,11 +1217,13 @@ theorem range_quot_mk (r : α → α → Prop) : range (Quot.mk r) = univ :=
 #align set.range_quot_mk Set.range_quot_mk
 -/
 
+#print Set.range_quot_lift /-
 @[simp]
 theorem range_quot_lift {r : ι → ι → Prop} (hf : ∀ x y, r x y → f x = f y) :
     range (Quot.lift f hf) = range f :=
   ext fun y => (surjective_quot_mk _).exists
 #align set.range_quot_lift Set.range_quot_lift
+-/
 
 #print Set.range_quotient_mk /-
 @[simp]
@@ -1054,9 +1262,11 @@ instance canLift (c) (p) [CanLift α β c p] :
 #align set.can_lift Set.canLift
 -/
 
+#print Set.range_const_subset /-
 theorem range_const_subset {c : α} : (range fun x : ι => c) ⊆ {c} :=
   range_subset_iff.2 fun x => rfl
 #align set.range_const_subset Set.range_const_subset
+-/
 
 #print Set.range_const /-
 @[simp]
@@ -1076,25 +1286,35 @@ theorem range_subtype_map {p : α → Prop} {q : β → Prop} (f : α → β) (h
 #align set.range_subtype_map Set.range_subtype_map
 -/
 
+#print Set.image_swap_eq_preimage_swap /-
 theorem image_swap_eq_preimage_swap : image (@Prod.swap α β) = preimage Prod.swap :=
   image_eq_preimage_of_inverse Prod.swap_leftInverse Prod.swap_rightInverse
 #align set.image_swap_eq_preimage_swap Set.image_swap_eq_preimage_swap
+-/
 
+#print Set.preimage_singleton_nonempty /-
 theorem preimage_singleton_nonempty {f : α → β} {y : β} : (f ⁻¹' {y}).Nonempty ↔ y ∈ range f :=
   Iff.rfl
 #align set.preimage_singleton_nonempty Set.preimage_singleton_nonempty
+-/
 
+#print Set.preimage_singleton_eq_empty /-
 theorem preimage_singleton_eq_empty {f : α → β} {y : β} : f ⁻¹' {y} = ∅ ↔ y ∉ range f :=
   not_nonempty_iff_eq_empty.symm.trans preimage_singleton_nonempty.Not
 #align set.preimage_singleton_eq_empty Set.preimage_singleton_eq_empty
+-/
 
+#print Set.range_subset_singleton /-
 theorem range_subset_singleton {f : ι → α} {x : α} : range f ⊆ {x} ↔ f = const ι x := by
   simp [range_subset_iff, funext_iff, mem_singleton]
 #align set.range_subset_singleton Set.range_subset_singleton
+-/
 
+#print Set.image_compl_preimage /-
 theorem image_compl_preimage {f : α → β} {s : Set β} : f '' (f ⁻¹' s)ᶜ = range f \ s := by
   rw [compl_eq_univ_diff, image_diff_preimage, image_univ]
 #align set.image_compl_preimage Set.image_compl_preimage
+-/
 
 #print Set.rangeFactorization /-
 /-- Any map `f : ι → β` factors through a map `range_factorization f : ι → range f`. -/
@@ -1102,45 +1322,60 @@ def rangeFactorization (f : ι → β) : ι → range f := fun i => ⟨f i, mem_
 #align set.range_factorization Set.rangeFactorization
 -/
 
+#print Set.rangeFactorization_eq /-
 theorem rangeFactorization_eq {f : ι → β} : Subtype.val ∘ rangeFactorization f = f :=
   funext fun i => rfl
 #align set.range_factorization_eq Set.rangeFactorization_eq
+-/
 
+#print Set.rangeFactorization_coe /-
 @[simp]
 theorem rangeFactorization_coe (f : ι → β) (a : ι) : (rangeFactorization f a : β) = f a :=
   rfl
 #align set.range_factorization_coe Set.rangeFactorization_coe
+-/
 
+#print Set.coe_comp_rangeFactorization /-
 @[simp]
 theorem coe_comp_rangeFactorization (f : ι → β) : coe ∘ rangeFactorization f = f :=
   rfl
 #align set.coe_comp_range_factorization Set.coe_comp_rangeFactorization
+-/
 
 #print Set.surjective_onto_range /-
 theorem surjective_onto_range : Surjective (rangeFactorization f) := fun ⟨_, ⟨i, rfl⟩⟩ => ⟨i, rfl⟩
 #align set.surjective_onto_range Set.surjective_onto_range
 -/
 
+#print Set.image_eq_range /-
 theorem image_eq_range (f : α → β) (s : Set α) : f '' s = range fun x : s => f x := by ext;
   constructor; rintro ⟨x, h1, h2⟩; exact ⟨⟨x, h1⟩, h2⟩; rintro ⟨⟨x, h1⟩, h2⟩; exact ⟨x, h1, h2⟩
 #align set.image_eq_range Set.image_eq_range
+-/
 
+#print Sum.range_eq /-
 theorem Sum.range_eq (f : Sum α β → γ) : range f = range (f ∘ Sum.inl) ∪ range (f ∘ Sum.inr) :=
   ext fun x => Sum.exists
 #align sum.range_eq Sum.range_eq
+-/
 
+#print Set.Sum.elim_range /-
 @[simp]
 theorem Sum.elim_range (f : α → γ) (g : β → γ) : range (Sum.elim f g) = range f ∪ range g :=
   Sum.range_eq _
 #align set.sum.elim_range Set.Sum.elim_range
+-/
 
+#print Set.range_ite_subset' /-
 theorem range_ite_subset' {p : Prop} [Decidable p] {f g : α → β} :
     range (if p then f else g) ⊆ range f ∪ range g :=
   by
   by_cases h : p; · rw [if_pos h]; exact subset_union_left _ _
   · rw [if_neg h]; exact subset_union_right _ _
 #align set.range_ite_subset' Set.range_ite_subset'
+-/
 
+#print Set.range_ite_subset /-
 theorem range_ite_subset {p : α → Prop} [DecidablePred p] {f g : α → β} :
     (range fun x => if p x then f x else g x) ⊆ range f ∪ range g :=
   by
@@ -1148,11 +1383,14 @@ theorem range_ite_subset {p : α → Prop} [DecidablePred p] {f g : α → β} :
   simp [if_pos h, mem_union, mem_range_self]
   simp [if_neg h, mem_union, mem_range_self]
 #align set.range_ite_subset Set.range_ite_subset
+-/
 
+#print Set.preimage_range /-
 @[simp]
 theorem preimage_range (f : α → β) : f ⁻¹' range f = univ :=
   eq_univ_of_forall mem_range_self
 #align set.preimage_range Set.preimage_range
+-/
 
 #print Set.range_unique /-
 /-- The range of a function from a `unique` type contains just the
@@ -1169,14 +1407,18 @@ theorem range_unique [h : Unique ι] : range f = {f default} :=
 #align set.range_unique Set.range_unique
 -/
 
+#print Set.range_diff_image_subset /-
 theorem range_diff_image_subset (f : α → β) (s : Set α) : range f \ f '' s ⊆ f '' sᶜ :=
   fun y ⟨⟨x, h₁⟩, h₂⟩ => ⟨x, fun h => h₂ ⟨x, h, h₁⟩, h₁⟩
 #align set.range_diff_image_subset Set.range_diff_image_subset
+-/
 
+#print Set.range_diff_image /-
 theorem range_diff_image {f : α → β} (H : Injective f) (s : Set α) : range f \ f '' s = f '' sᶜ :=
   Subset.antisymm (range_diff_image_subset f s) fun y ⟨x, hx, hy⟩ =>
     hy ▸ ⟨mem_range_self _, fun ⟨x', hx', Eq⟩ => hx <| H Eq ▸ hx'⟩
 #align set.range_diff_image Set.range_diff_image
+-/
 
 #print Set.range_inclusion /-
 @[simp]
@@ -1219,36 +1461,48 @@ theorem rangeSplitting_injective (f : α → β) : Injective (rangeSplitting f)
 #align set.range_splitting_injective Set.rangeSplitting_injective
 -/
 
+#print Set.rightInverse_rangeSplitting /-
 theorem rightInverse_rangeSplitting {f : α → β} (h : Injective f) :
     RightInverse (rangeFactorization f) (rangeSplitting f) :=
   (leftInverse_rangeSplitting f).rightInverse_of_injective fun x y hxy => h <| Subtype.ext_iff.1 hxy
 #align set.right_inverse_range_splitting Set.rightInverse_rangeSplitting
+-/
 
+#print Set.preimage_rangeSplitting /-
 theorem preimage_rangeSplitting {f : α → β} (hf : Injective f) :
     preimage (rangeSplitting f) = image (rangeFactorization f) :=
   (image_eq_preimage_of_inverse (rightInverse_rangeSplitting hf)
       (leftInverse_rangeSplitting f)).symm
 #align set.preimage_range_splitting Set.preimage_rangeSplitting
+-/
 
+#print Set.isCompl_range_some_none /-
 theorem isCompl_range_some_none (α : Type _) : IsCompl (range (some : α → Option α)) {none} :=
   IsCompl.of_le (fun x ⟨⟨a, ha⟩, (hn : x = none)⟩ => Option.some_ne_none _ (ha.trans hn))
     fun x hx => Option.casesOn x (Or.inr rfl) fun x => Or.inl <| mem_range_self _
 #align set.is_compl_range_some_none Set.isCompl_range_some_none
+-/
 
+#print Set.compl_range_some /-
 @[simp]
 theorem compl_range_some (α : Type _) : range (some : α → Option α)ᶜ = {none} :=
   (isCompl_range_some_none α).compl_eq
 #align set.compl_range_some Set.compl_range_some
+-/
 
+#print Set.range_some_inter_none /-
 @[simp]
 theorem range_some_inter_none (α : Type _) : range (some : α → Option α) ∩ {none} = ∅ :=
   (isCompl_range_some_none α).inf_eq_bot
 #align set.range_some_inter_none Set.range_some_inter_none
+-/
 
+#print Set.range_some_union_none /-
 @[simp]
 theorem range_some_union_none (α : Type _) : range (some : α → Option α) ∪ {none} = univ :=
   (isCompl_range_some_none α).sup_eq_top
 #align set.range_some_union_none Set.range_some_union_none
+-/
 
 #print Set.insert_none_range_some /-
 @[simp]
@@ -1263,10 +1517,12 @@ section Subsingleton
 
 variable {s : Set α}
 
+#print Set.Subsingleton.image /-
 /-- The image of a subsingleton is a subsingleton. -/
 theorem Subsingleton.image (hs : s.Subsingleton) (f : α → β) : (f '' s).Subsingleton :=
   fun _ ⟨x, hx, Hx⟩ _ ⟨y, hy, Hy⟩ => Hx ▸ Hy ▸ congr_arg f (hs hx hy)
 #align set.subsingleton.image Set.Subsingleton.image
+-/
 
 #print Set.Subsingleton.preimage /-
 /-- The preimage of a subsingleton under an injective map is a subsingleton. -/
@@ -1275,18 +1531,22 @@ theorem Subsingleton.preimage {s : Set β} (hs : s.Subsingleton) {f : α → β}
 #align set.subsingleton.preimage Set.Subsingleton.preimage
 -/
 
+#print Set.subsingleton_of_image /-
 /-- If the image of a set under an injective map is a subsingleton, the set is a subsingleton. -/
 theorem subsingleton_of_image {α β : Type _} {f : α → β} (hf : Function.Injective f) (s : Set α)
     (hs : (f '' s).Subsingleton) : s.Subsingleton :=
   (hs.Preimage hf).anti <| subset_preimage_image _ _
 #align set.subsingleton_of_image Set.subsingleton_of_image
+-/
 
+#print Set.subsingleton_of_preimage /-
 /-- If the preimage of a set under an surjective map is a subsingleton,
 the set is a subsingleton. -/
 theorem subsingleton_of_preimage {α β : Type _} {f : α → β} (hf : Function.Surjective f) (s : Set β)
     (hs : (f ⁻¹' s).Subsingleton) : s.Subsingleton := fun fx hx fy hy => by
   rcases hf fx, hf fy with ⟨⟨x, rfl⟩, ⟨y, rfl⟩⟩; exact congr_arg f (hs hx hy)
 #align set.subsingleton_of_preimage Set.subsingleton_of_preimage
+-/
 
 #print Set.subsingleton_range /-
 theorem subsingleton_range {α : Sort _} [Subsingleton α] (f : α → β) : (range f).Subsingleton :=
@@ -1305,24 +1565,30 @@ theorem Nontrivial.preimage {s : Set β} (hs : s.Nontrivial) {f : α → β}
 #align set.nontrivial.preimage Set.Nontrivial.preimage
 -/
 
+#print Set.Nontrivial.image /-
 /-- The image of a nontrivial set under an injective map is nontrivial. -/
 theorem Nontrivial.image (hs : s.Nontrivial) {f : α → β} (hf : Function.Injective f) :
     (f '' s).Nontrivial :=
   let ⟨x, hx, y, hy, hxy⟩ := hs
   ⟨f x, mem_image_of_mem f hx, f y, mem_image_of_mem f hy, hf.Ne hxy⟩
 #align set.nontrivial.image Set.Nontrivial.image
+-/
 
+#print Set.nontrivial_of_image /-
 /-- If the image of a set is nontrivial, the set is nontrivial. -/
 theorem nontrivial_of_image (f : α → β) (s : Set α) (hs : (f '' s).Nontrivial) : s.Nontrivial :=
   let ⟨_, ⟨x, hx, rfl⟩, _, ⟨y, hy, rfl⟩, hxy⟩ := hs
   ⟨x, hx, y, hy, mt (congr_arg f) hxy⟩
 #align set.nontrivial_of_image Set.nontrivial_of_image
+-/
 
+#print Set.nontrivial_of_preimage /-
 /-- If the preimage of a set under an injective map is nontrivial, the set is nontrivial. -/
 theorem nontrivial_of_preimage {f : α → β} (hf : Function.Injective f) (s : Set β)
     (hs : (f ⁻¹' s).Nontrivial) : s.Nontrivial :=
   (hs.image hf).mono <| image_preimage_subset _ _
 #align set.nontrivial_of_preimage Set.nontrivial_of_preimage
+-/
 
 end Subsingleton
 
@@ -1334,38 +1600,54 @@ variable {f : α → β}
 
 open Set
 
+#print Function.Surjective.preimage_injective /-
 theorem Surjective.preimage_injective (hf : Surjective f) : Injective (preimage f) := fun s t =>
   (preimage_eq_preimage hf).1
 #align function.surjective.preimage_injective Function.Surjective.preimage_injective
+-/
 
+#print Function.Injective.preimage_image /-
 theorem Injective.preimage_image (hf : Injective f) (s : Set α) : f ⁻¹' (f '' s) = s :=
   preimage_image_eq s hf
 #align function.injective.preimage_image Function.Injective.preimage_image
+-/
 
+#print Function.Injective.preimage_surjective /-
 theorem Injective.preimage_surjective (hf : Injective f) : Surjective (preimage f) := by intro s;
   use f '' s; rw [hf.preimage_image]
 #align function.injective.preimage_surjective Function.Injective.preimage_surjective
+-/
 
+#print Function.Injective.subsingleton_image_iff /-
 theorem Injective.subsingleton_image_iff (hf : Injective f) {s : Set α} :
     (f '' s).Subsingleton ↔ s.Subsingleton :=
   ⟨subsingleton_of_image hf s, fun h => h.image f⟩
 #align function.injective.subsingleton_image_iff Function.Injective.subsingleton_image_iff
+-/
 
+#print Function.Surjective.image_preimage /-
 theorem Surjective.image_preimage (hf : Surjective f) (s : Set β) : f '' (f ⁻¹' s) = s :=
   image_preimage_eq s hf
 #align function.surjective.image_preimage Function.Surjective.image_preimage
+-/
 
+#print Function.Surjective.image_surjective /-
 theorem Surjective.image_surjective (hf : Surjective f) : Surjective (image f) := by intro s;
   use f ⁻¹' s; rw [hf.image_preimage]
 #align function.surjective.image_surjective Function.Surjective.image_surjective
+-/
 
+#print Function.Surjective.nonempty_preimage /-
 theorem Surjective.nonempty_preimage (hf : Surjective f) {s : Set β} :
     (f ⁻¹' s).Nonempty ↔ s.Nonempty := by rw [← nonempty_image_iff, hf.image_preimage]
 #align function.surjective.nonempty_preimage Function.Surjective.nonempty_preimage
+-/
 
+#print Function.Injective.image_injective /-
 theorem Injective.image_injective (hf : Injective f) : Injective (image f) := by intro s t h;
   rw [← preimage_image_eq s hf, ← preimage_image_eq t hf, h]
 #align function.injective.image_injective Function.Injective.image_injective
+-/
 
 #print Function.Surjective.preimage_subset_preimage_iff /-
 theorem Surjective.preimage_subset_preimage_iff {s t : Set β} (hf : Surjective f) :
@@ -1374,21 +1656,28 @@ theorem Surjective.preimage_subset_preimage_iff {s t : Set β} (hf : Surjective
 #align function.surjective.preimage_subset_preimage_iff Function.Surjective.preimage_subset_preimage_iff
 -/
 
+#print Function.Surjective.range_comp /-
 theorem Surjective.range_comp {f : ι → ι'} (hf : Surjective f) (g : ι' → α) :
     range (g ∘ f) = range g :=
   ext fun y => (@Surjective.exists _ _ _ hf fun x => g x = y).symm
 #align function.surjective.range_comp Function.Surjective.range_comp
+-/
 
+#print Function.Injective.mem_range_iff_exists_unique /-
 theorem Injective.mem_range_iff_exists_unique (hf : Injective f) {b : β} :
     b ∈ range f ↔ ∃! a, f a = b :=
   ⟨fun ⟨a, h⟩ => ⟨a, h, fun a' ha => hf (ha.trans h.symm)⟩, ExistsUnique.exists⟩
 #align function.injective.mem_range_iff_exists_unique Function.Injective.mem_range_iff_exists_unique
+-/
 
+#print Function.Injective.exists_unique_of_mem_range /-
 theorem Injective.exists_unique_of_mem_range (hf : Injective f) {b : β} (hb : b ∈ range f) :
     ∃! a, f a = b :=
   hf.mem_range_iff_exists_unique.mp hb
 #align function.injective.exists_unique_of_mem_range Function.Injective.exists_unique_of_mem_range
+-/
 
+#print Function.Injective.compl_image_eq /-
 theorem Injective.compl_image_eq (hf : Injective f) (s : Set α) : (f '' s)ᶜ = f '' sᶜ ∪ range fᶜ :=
   by
   ext y
@@ -1397,14 +1686,19 @@ theorem Injective.compl_image_eq (hf : Injective f) (s : Set α) : (f '' s)ᶜ =
   · rw [mem_range, not_exists] at hx 
     simp [hx]
 #align function.injective.compl_image_eq Function.Injective.compl_image_eq
+-/
 
+#print Function.LeftInverse.image_image /-
 theorem LeftInverse.image_image {g : β → α} (h : LeftInverse g f) (s : Set α) : g '' (f '' s) = s :=
   by rw [← image_comp, h.comp_eq_id, image_id]
 #align function.left_inverse.image_image Function.LeftInverse.image_image
+-/
 
+#print Function.LeftInverse.preimage_preimage /-
 theorem LeftInverse.preimage_preimage {g : β → α} (h : LeftInverse g f) (s : Set α) :
     f ⁻¹' (g ⁻¹' s) = s := by rw [← preimage_comp, h.comp_eq_id, preimage_id]
 #align function.left_inverse.preimage_preimage Function.LeftInverse.preimage_preimage
+-/
 
 end Function
 
@@ -1412,12 +1706,12 @@ namespace EquivLike
 
 variable {E : Type _} [EquivLike E ι ι']
 
-include ι
-
+#print EquivLike.range_comp /-
 @[simp]
 theorem range_comp (f : ι' → α) (e : E) : Set.range (f ∘ e) = Set.range f :=
   (EquivLike.surjective _).range_comp _
 #align equiv_like.range_comp EquivLike.range_comp
+-/
 
 end EquivLike
 
@@ -1496,29 +1790,39 @@ theorem coe_image_univ (s : Set α) : (coe : s → α) '' Set.univ = s :=
 #align subtype.coe_image_univ Subtype.coe_image_univ
 -/
 
+#print Subtype.image_preimage_coe /-
 @[simp]
 theorem image_preimage_coe (s t : Set α) : (coe : s → α) '' (coe ⁻¹' t) = t ∩ s :=
   image_preimage_eq_inter_range.trans <| congr_arg _ range_coe
 #align subtype.image_preimage_coe Subtype.image_preimage_coe
+-/
 
+#print Subtype.image_preimage_val /-
 theorem image_preimage_val (s t : Set α) : (Subtype.val : s → α) '' (Subtype.val ⁻¹' t) = t ∩ s :=
   image_preimage_coe s t
 #align subtype.image_preimage_val Subtype.image_preimage_val
+-/
 
+#print Subtype.preimage_coe_eq_preimage_coe_iff /-
 theorem preimage_coe_eq_preimage_coe_iff {s t u : Set α} :
     (coe : s → α) ⁻¹' t = coe ⁻¹' u ↔ t ∩ s = u ∩ s := by
   rw [← image_preimage_coe, ← image_preimage_coe, coe_injective.image_injective.eq_iff]
 #align subtype.preimage_coe_eq_preimage_coe_iff Subtype.preimage_coe_eq_preimage_coe_iff
+-/
 
+#print Subtype.preimage_coe_inter_self /-
 @[simp]
 theorem preimage_coe_inter_self (s t : Set α) : (coe : s → α) ⁻¹' (t ∩ s) = coe ⁻¹' t := by
   rw [preimage_coe_eq_preimage_coe_iff, inter_assoc, inter_self]
 #align subtype.preimage_coe_inter_self Subtype.preimage_coe_inter_self
+-/
 
+#print Subtype.preimage_val_eq_preimage_val_iff /-
 theorem preimage_val_eq_preimage_val_iff (s t u : Set α) :
     (Subtype.val : s → α) ⁻¹' t = Subtype.val ⁻¹' u ↔ t ∩ s = u ∩ s :=
   preimage_coe_eq_preimage_coe_iff
 #align subtype.preimage_val_eq_preimage_val_iff Subtype.preimage_val_eq_preimage_val_iff
+-/
 
 #print Subtype.exists_set_subtype /-
 theorem exists_set_subtype {t : Set α} (p : Set α → Prop) :
@@ -1532,23 +1836,31 @@ theorem exists_set_subtype {t : Set α} (p : Set α → Prop) :
 #align subtype.exists_set_subtype Subtype.exists_set_subtype
 -/
 
+#print Subtype.preimage_coe_nonempty /-
 theorem preimage_coe_nonempty {s t : Set α} : ((coe : s → α) ⁻¹' t).Nonempty ↔ (s ∩ t).Nonempty :=
   by rw [inter_comm, ← image_preimage_coe, nonempty_image_iff]
 #align subtype.preimage_coe_nonempty Subtype.preimage_coe_nonempty
+-/
 
+#print Subtype.preimage_coe_eq_empty /-
 theorem preimage_coe_eq_empty {s t : Set α} : (coe : s → α) ⁻¹' t = ∅ ↔ s ∩ t = ∅ := by
   simp only [← not_nonempty_iff_eq_empty, preimage_coe_nonempty]
 #align subtype.preimage_coe_eq_empty Subtype.preimage_coe_eq_empty
+-/
 
+#print Subtype.preimage_coe_compl /-
 @[simp]
 theorem preimage_coe_compl (s : Set α) : (coe : s → α) ⁻¹' sᶜ = ∅ :=
   preimage_coe_eq_empty.2 (inter_compl_self s)
 #align subtype.preimage_coe_compl Subtype.preimage_coe_compl
+-/
 
+#print Subtype.preimage_coe_compl' /-
 @[simp]
 theorem preimage_coe_compl' (s : Set α) : (coe : sᶜ → α) ⁻¹' s = ∅ :=
   preimage_coe_eq_empty.2 (compl_inter_self s)
 #align subtype.preimage_coe_compl' Subtype.preimage_coe_compl'
+-/
 
 end Subtype
 
@@ -1559,6 +1871,7 @@ open Set
 
 namespace Option
 
+#print Option.injective_iff /-
 theorem injective_iff {α β} {f : Option α → β} :
     Injective f ↔ Injective (f ∘ some) ∧ f none ∉ range (f ∘ some) :=
   by
@@ -1568,22 +1881,29 @@ theorem injective_iff {α β} {f : Option α → β} :
   rintro ⟨h_some, h_none⟩ (_ | a) (_ | b) hab
   exacts [rfl, (h_none _ hab.symm).elim, (h_none _ hab).elim, congr_arg some (h_some hab)]
 #align option.injective_iff Option.injective_iff
+-/
 
+#print Option.range_eq /-
 theorem range_eq {α β} (f : Option α → β) : range f = insert (f none) (range (f ∘ some)) :=
   Set.ext fun y => Option.exists.trans <| eq_comm.Or Iff.rfl
 #align option.range_eq Option.range_eq
+-/
 
 end Option
 
+#print WithBot.range_eq /-
 theorem WithBot.range_eq {α β} (f : WithBot α → β) :
     range f = insert (f ⊥) (range (f ∘ coe : α → β)) :=
   Option.range_eq f
 #align with_bot.range_eq WithBot.range_eq
+-/
 
+#print WithTop.range_eq /-
 theorem WithTop.range_eq {α β} (f : WithTop α → β) :
     range f = insert (f ⊤) (range (f ∘ coe : α → β)) :=
   Option.range_eq f
 #align with_top.range_eq WithTop.range_eq
+-/
 
 namespace Set
 
@@ -1661,47 +1981,64 @@ section Disjoint
 
 variable {f : α → β} {s t : Set α}
 
+#print Disjoint.preimage /-
 theorem Disjoint.preimage (f : α → β) {s t : Set β} (h : Disjoint s t) :
     Disjoint (f ⁻¹' s) (f ⁻¹' t) :=
   disjoint_iff_inf_le.mpr fun x hx => h.le_bot hx
 #align disjoint.preimage Disjoint.preimage
+-/
 
 namespace Set
 
+#print Set.disjoint_image_image /-
 theorem disjoint_image_image {f : β → α} {g : γ → α} {s : Set β} {t : Set γ}
     (h : ∀ b ∈ s, ∀ c ∈ t, f b ≠ g c) : Disjoint (f '' s) (g '' t) :=
   disjoint_iff_inf_le.mpr <| by rintro a ⟨⟨b, hb, eq⟩, c, hc, rfl⟩ <;> exact h b hb c hc Eq
 #align set.disjoint_image_image Set.disjoint_image_image
+-/
 
+#print Set.disjoint_image_of_injective /-
 theorem disjoint_image_of_injective {f : α → β} (hf : Injective f) {s t : Set α}
     (hd : Disjoint s t) : Disjoint (f '' s) (f '' t) :=
   disjoint_image_image fun x hx y hy => hf.Ne fun H => Set.disjoint_iff.1 hd ⟨hx, H.symm ▸ hy⟩
 #align set.disjoint_image_of_injective Set.disjoint_image_of_injective
+-/
 
+#print Disjoint.of_image /-
 theorem Disjoint.of_image (h : Disjoint (f '' s) (f '' t)) : Disjoint s t :=
   disjoint_iff_inf_le.mpr fun x hx =>
     disjoint_left.1 h (mem_image_of_mem _ hx.1) (mem_image_of_mem _ hx.2)
 #align disjoint.of_image Disjoint.of_image
+-/
 
+#print Set.disjoint_image_iff /-
 theorem disjoint_image_iff (hf : Injective f) : Disjoint (f '' s) (f '' t) ↔ Disjoint s t :=
   ⟨Disjoint.of_image, disjoint_image_of_injective hf⟩
 #align set.disjoint_image_iff Set.disjoint_image_iff
+-/
 
+#print Disjoint.of_preimage /-
 theorem Disjoint.of_preimage (hf : Surjective f) {s t : Set β} (h : Disjoint (f ⁻¹' s) (f ⁻¹' t)) :
     Disjoint s t := by
   rw [disjoint_iff_inter_eq_empty, ← image_preimage_eq (_ ∩ _) hf, preimage_inter, h.inter_eq,
     image_empty]
 #align disjoint.of_preimage Disjoint.of_preimage
+-/
 
+#print Set.disjoint_preimage_iff /-
 theorem disjoint_preimage_iff (hf : Surjective f) {s t : Set β} :
     Disjoint (f ⁻¹' s) (f ⁻¹' t) ↔ Disjoint s t :=
   ⟨Disjoint.of_preimage hf, Disjoint.preimage _⟩
 #align set.disjoint_preimage_iff Set.disjoint_preimage_iff
+-/
 
+#print Set.preimage_eq_empty /-
 theorem preimage_eq_empty {f : α → β} {s : Set β} (h : Disjoint s (range f)) : f ⁻¹' s = ∅ := by
   simpa using h.preimage f
 #align set.preimage_eq_empty Set.preimage_eq_empty
+-/
 
+#print Set.preimage_eq_empty_iff /-
 theorem preimage_eq_empty_iff {s : Set β} : f ⁻¹' s = ∅ ↔ Disjoint s (range f) :=
   ⟨fun h =>
     by
@@ -1711,6 +2048,7 @@ theorem preimage_eq_empty_iff {s : Set β} : f ⁻¹' s = ∅ ↔ Disjoint s (ra
     rw [← hx] at hy 
     exact h x hy, preimage_eq_empty⟩
 #align set.preimage_eq_empty_iff Set.preimage_eq_empty_iff
+-/
 
 end Set
 
Diff
@@ -549,7 +549,6 @@ theorem image_inter_preimage (f : α → β) (s : Set α) (t : Set β) :
     calc
       f '' (s ∩ f ⁻¹' t) ⊆ f '' s ∩ f '' (f ⁻¹' t) := image_inter_subset _ _ _
       _ ⊆ f '' s ∩ t := inter_subset_inter_right _ (image_preimage_subset f t)
-      
   · rintro _ ⟨⟨x, h', rfl⟩, h⟩
     exact ⟨x, ⟨h', h⟩, rfl⟩
 #align set.image_inter_preimage Set.image_inter_preimage
Diff
@@ -859,7 +859,7 @@ theorem exists_subset_range_and_iff {f : α → β} {p : Set β → Prop} :
 #align set.exists_subset_range_and_iff Set.exists_subset_range_and_iff
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (s «expr ⊆ » range[set.range] f) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (s «expr ⊆ » range[set.range] f) -/
 #print Set.exists_subset_range_iff /-
 theorem exists_subset_range_iff {f : α → β} {p : Set β → Prop} :
     (∃ (s : _) (_ : s ⊆ range f), p s) ↔ ∃ s, p (f '' s) := by
Diff
@@ -51,7 +51,7 @@ namespace Set
 /-- The preimage of `s : set β` by `f : α → β`, written `f ⁻¹' s`,
   is the set of `x : α` such that `f x ∈ s`. -/
 def preimage {α : Type u} {β : Type v} (f : α → β) (s : Set β) : Set α :=
-  { x | f x ∈ s }
+  {x | f x ∈ s}
 #align set.preimage Set.preimage
 -/
 
@@ -124,7 +124,7 @@ theorem preimage_ite (f : α → β) (s t₁ t₂ : Set β) :
 
 #print Set.preimage_setOf_eq /-
 @[simp]
-theorem preimage_setOf_eq {p : α → Prop} {f : β → α} : f ⁻¹' { a | p a } = { a | p (f a) } :=
+theorem preimage_setOf_eq {p : α → Prop} {f : β → α} : f ⁻¹' {a | p a} = {a | p (f a)} :=
   rfl
 #align set.preimage_set_of_eq Set.preimage_setOf_eq
 -/
@@ -231,7 +231,7 @@ variable {f : α → β} {s t : Set α}
 /-- The image of `s : set α` by `f : α → β`, written `f '' s`,
   is the set of `y : β` such that `f x = y` for some `x ∈ s`. -/
 def image (f : α → β) (s : Set α) : Set β :=
-  { y | ∃ x, x ∈ s ∧ f x = y }
+  {y | ∃ x, x ∈ s ∧ f x = y}
 #align set.image Set.image
 -/
 
@@ -572,7 +572,7 @@ theorem compl_image : image (compl : Set α → Set α) = preimage compl :=
   image_eq_preimage_of_inverse compl_compl compl_compl
 #align set.compl_image Set.compl_image
 
-theorem compl_image_set_of {p : Set α → Prop} : compl '' { s | p s } = { s | p (sᶜ) } :=
+theorem compl_image_set_of {p : Set α → Prop} : compl '' {s | p s} = {s | p (sᶜ)} :=
   congr_fun compl_image p
 #align set.compl_image_set_of Set.compl_image_set_of
 
@@ -609,7 +609,7 @@ theorem image_subset_image_iff {f : α → β} (hf : Injective f) : f '' s ⊆ f
 
 theorem prod_quotient_preimage_eq_image [s : Setoid α] (g : Quotient s → β) {h : α → β}
     (Hh : h = g ∘ Quotient.mk') (r : Set (β × β)) :
-    { x : Quotient s × Quotient s | (g x.1, g x.2) ∈ r } =
+    {x : Quotient s × Quotient s | (g x.1, g x.2) ∈ r} =
       (fun a : α × α => (⟦a.1⟧, ⟦a.2⟧)) '' ((fun a : α × α => (h a.1, h a.2)) ⁻¹' r) :=
   Hh.symm ▸
     Set.ext fun ⟨a₁, a₂⟩ =>
@@ -644,7 +644,7 @@ theorem surjective_onto_image {f : α → β} {s : Set α} : Surjective (imageFa
 #print Set.image_perm /-
 /-- If the only elements outside `s` are those left fixed by `σ`, then mapping by `σ` has no effect.
 -/
-theorem image_perm {s : Set α} {σ : Equiv.Perm α} (hs : { a : α | σ a ≠ a } ⊆ s) : σ '' s = s :=
+theorem image_perm {s : Set α} {σ : Equiv.Perm α} (hs : {a : α | σ a ≠ a} ⊆ s) : σ '' s = s :=
   by
   ext i
   obtain hi | hi := eq_or_ne (σ i) i
@@ -694,7 +694,7 @@ variable {f : ι → α} {s t : Set α}
 This function is more flexible than `f '' univ`, as the image requires that the domain is in Type
 and not an arbitrary Sort. -/
 def range (f : ι → α) : Set α :=
-  { x | ∃ y, f y = x }
+  {x | ∃ y, f y = x}
 #align set.range Set.range
 -/
 
@@ -936,10 +936,10 @@ theorem range_eval {ι : Type _} {α : ι → Sort _} [∀ i, Nonempty (α i)] (
   (surjective_eval i).range_eq
 #align set.range_eval Set.range_eval
 
-theorem range_inl : range (@Sum.inl α β) = { x | x.isLeft } := by ext (_ | _) <;> simp
+theorem range_inl : range (@Sum.inl α β) = {x | x.isLeft} := by ext (_ | _) <;> simp
 #align set.range_inl Set.range_inl
 
-theorem range_inr : range (@Sum.inr α β) = { x | x.isRight } := by ext (_ | _) <;> simp
+theorem range_inr : range (@Sum.inr α β) = {x | x.isRight} := by ext (_ | _) <;> simp
 #align set.range_inr Set.range_inr
 
 theorem isCompl_range_inl_range_inr : IsCompl (range <| @Sum.inl α β) (range Sum.inr) :=
@@ -1069,7 +1069,7 @@ theorem range_const : ∀ [Nonempty ι] {c : α}, (range fun x : ι => c) = {c}
 
 #print Set.range_subtype_map /-
 theorem range_subtype_map {p : α → Prop} {q : β → Prop} (f : α → β) (h : ∀ x, p x → q (f x)) :
-    range (Subtype.map f h) = coe ⁻¹' (f '' { x | p x }) :=
+    range (Subtype.map f h) = coe ⁻¹' (f '' {x | p x}) :=
   by
   ext ⟨x, hx⟩
   simp_rw [mem_preimage, mem_range, mem_image, Subtype.exists, Subtype.map, Subtype.coe_mk,
@@ -1181,8 +1181,8 @@ theorem range_diff_image {f : α → β} (H : Injective f) (s : Set α) : range
 
 #print Set.range_inclusion /-
 @[simp]
-theorem range_inclusion (h : s ⊆ t) : range (inclusion h) = { x : t | (x : α) ∈ s } := by
-  ext ⟨x, hx⟩; simp [inclusion]
+theorem range_inclusion (h : s ⊆ t) : range (inclusion h) = {x : t | (x : α) ∈ s} := by ext ⟨x, hx⟩;
+  simp [inclusion]
 #align set.range_inclusion Set.range_inclusion
 -/
 
@@ -1431,7 +1431,7 @@ open Set
 
 #print Subtype.coe_image /-
 theorem coe_image {p : α → Prop} {s : Set (Subtype p)} :
-    coe '' s = { x | ∃ h : p x, (⟨x, h⟩ : Subtype p) ∈ s } :=
+    coe '' s = {x | ∃ h : p x, (⟨x, h⟩ : Subtype p) ∈ s} :=
   Set.ext fun a =>
     ⟨fun ⟨⟨a', ha'⟩, in_s, h_eq⟩ => h_eq ▸ ⟨ha', in_s⟩, fun ⟨ha, in_s⟩ => ⟨⟨a, ha⟩, in_s, rfl⟩⟩
 #align subtype.coe_image Subtype.coe_image
@@ -1439,7 +1439,7 @@ theorem coe_image {p : α → Prop} {s : Set (Subtype p)} :
 
 #print Subtype.coe_image_of_subset /-
 @[simp]
-theorem coe_image_of_subset {s t : Set α} (h : t ⊆ s) : coe '' { x : ↥s | ↑x ∈ t } = t :=
+theorem coe_image_of_subset {s t : Set α} (h : t ⊆ s) : coe '' {x : ↥s | ↑x ∈ t} = t :=
   by
   ext x
   rw [Set.mem_image]
@@ -1467,7 +1467,7 @@ theorem range_val {s : Set α} : range (Subtype.val : s → α) = s :=
   for `s : set α` the function `coe : s → α`, then the inferred implicit arguments of `coe` are
   `coe α (λ x, x ∈ s)`. -/
 @[simp]
-theorem range_coe_subtype {p : α → Prop} : range (coe : Subtype p → α) = { x | p x } :=
+theorem range_coe_subtype {p : α → Prop} : range (coe : Subtype p → α) = {x | p x} :=
   range_coe
 #align subtype.range_coe_subtype Subtype.range_coe_subtype
 -/
@@ -1480,7 +1480,7 @@ theorem coe_preimage_self (s : Set α) : (coe : s → α) ⁻¹' s = univ := by
 -/
 
 #print Subtype.range_val_subtype /-
-theorem range_val_subtype {p : α → Prop} : range (Subtype.val : Subtype p → α) = { x | p x } :=
+theorem range_val_subtype {p : α → Prop} : range (Subtype.val : Subtype p → α) = {x | p x} :=
   range_coe
 #align subtype.range_val_subtype Subtype.range_val_subtype
 -/
Diff
@@ -166,7 +166,7 @@ theorem preimage_const_of_not_mem {b : β} {s : Set β} (h : b ∉ s) : (fun x :
 #print Set.preimage_const /-
 theorem preimage_const (b : β) (s : Set β) [Decidable (b ∈ s)] :
     (fun x : α => b) ⁻¹' s = if b ∈ s then univ else ∅ := by split_ifs with hb hb;
-  exacts[preimage_const_of_mem hb, preimage_const_of_not_mem hb]
+  exacts [preimage_const_of_mem hb, preimage_const_of_not_mem hb]
 #align set.preimage_const Set.preimage_const
 -/
 
@@ -239,7 +239,7 @@ def image (f : α → β) (s : Set α) : Set β :=
 infixl:80 " '' " => image
 
 theorem mem_image_iff_bex {f : α → β} {s : Set α} {y : β} :
-    y ∈ f '' s ↔ ∃ (x : _)(_ : x ∈ s), f x = y :=
+    y ∈ f '' s ↔ ∃ (x : _) (_ : x ∈ s), f x = y :=
   bex_def.symm
 #align set.mem_image_iff_bex Set.mem_image_iff_bex
 
@@ -337,8 +337,8 @@ theorem monotone_image {f : α → β} : Monotone (image f) := fun s t => image_
 
 theorem image_union (f : α → β) (s t : Set α) : f '' (s ∪ t) = f '' s ∪ f '' t :=
   ext fun x =>
-    ⟨by rintro ⟨a, h | h, rfl⟩ <;> [left;right] <;> exact ⟨_, h, rfl⟩, by
-      rintro (⟨a, h, rfl⟩ | ⟨a, h, rfl⟩) <;> refine' ⟨_, _, rfl⟩ <;> [left;right] <;> exact h⟩
+    ⟨by rintro ⟨a, h | h, rfl⟩ <;> [left; right] <;> exact ⟨_, h, rfl⟩, by
+      rintro (⟨a, h, rfl⟩ | ⟨a, h, rfl⟩) <;> refine' ⟨_, _, rfl⟩ <;> [left; right] <;> exact h⟩
 #align set.image_union Set.image_union
 
 #print Set.image_empty /-
@@ -862,7 +862,7 @@ theorem exists_subset_range_and_iff {f : α → β} {p : Set β → Prop} :
 /- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (s «expr ⊆ » range[set.range] f) -/
 #print Set.exists_subset_range_iff /-
 theorem exists_subset_range_iff {f : α → β} {p : Set β → Prop} :
-    (∃ (s : _)(_ : s ⊆ range f), p s) ↔ ∃ s, p (f '' s) := by
+    (∃ (s : _) (_ : s ⊆ range f), p s) ↔ ∃ s, p (f '' s) := by
   simp only [exists_prop, exists_subset_range_and_iff]
 #align set.exists_subset_range_iff Set.exists_subset_range_iff
 -/
@@ -944,7 +944,7 @@ theorem range_inr : range (@Sum.inr α β) = { x | x.isRight } := by ext (_ | _)
 
 theorem isCompl_range_inl_range_inr : IsCompl (range <| @Sum.inl α β) (range Sum.inr) :=
   IsCompl.of_le (by rintro y ⟨⟨x₁, rfl⟩, ⟨x₂, _⟩⟩; cc)
-    (by rintro (x | y) - <;> [left;right] <;> exact mem_range_self _)
+    (by rintro (x | y) - <;> [left; right] <;> exact mem_range_self _)
 #align set.is_compl_range_inl_range_inr Set.isCompl_range_inl_range_inr
 
 @[simp]
@@ -1164,7 +1164,7 @@ theorem range_unique [h : Unique ι] : range f = {f default} :=
   rw [mem_range]
   constructor
   · rintro ⟨i, hi⟩
-    rw [h.uniq i] at hi
+    rw [h.uniq i] at hi 
     exact hi ▸ mem_singleton _
   · exact fun h => ⟨default, h.symm⟩
 #align set.range_unique Set.range_unique
@@ -1395,7 +1395,7 @@ theorem Injective.compl_image_eq (hf : Injective f) (s : Set α) : (f '' s)ᶜ =
   ext y
   rcases em (y ∈ range f) with (⟨x, rfl⟩ | hx)
   · simp [hf.eq_iff]
-  · rw [mem_range, not_exists] at hx
+  · rw [mem_range, not_exists] at hx 
     simp [hx]
 #align function.injective.compl_image_eq Function.Injective.compl_image_eq
 
@@ -1567,7 +1567,7 @@ theorem injective_iff {α β} {f : Option α → β} :
   refine'
     ⟨fun hf => ⟨hf.comp (Option.some_injective _), fun x => hf.Ne <| Option.some_ne_none _⟩, _⟩
   rintro ⟨h_some, h_none⟩ (_ | a) (_ | b) hab
-  exacts[rfl, (h_none _ hab.symm).elim, (h_none _ hab).elim, congr_arg some (h_some hab)]
+  exacts [rfl, (h_none _ hab.symm).elim, (h_none _ hab).elim, congr_arg some (h_some hab)]
 #align option.injective_iff Option.injective_iff
 
 theorem range_eq {α β} (f : Option α → β) : range f = insert (f none) (range (f ∘ some)) :=
@@ -1614,7 +1614,7 @@ theorem preimage_surjective : Surjective (preimage f) ↔ Injective f :=
   by
   refine' ⟨fun h x x' hx => _, injective.preimage_surjective⟩
   cases' h {x} with s hs; have := mem_singleton x
-  rwa [← hs, mem_preimage, hx, ← mem_preimage, hs, mem_singleton_iff, eq_comm] at this
+  rwa [← hs, mem_preimage, hx, ← mem_preimage, hs, mem_singleton_iff, eq_comm] at this 
 #align set.preimage_surjective Set.preimage_surjective
 -/
 
@@ -1624,7 +1624,7 @@ theorem image_surjective : Surjective (image f) ↔ Surjective f :=
   by
   refine' ⟨fun h y => _, surjective.image_surjective⟩
   cases' h {y} with s hs
-  have := mem_singleton y; rw [← hs] at this; rcases this with ⟨x, h1x, h2x⟩
+  have := mem_singleton y; rw [← hs] at this ; rcases this with ⟨x, h1x, h2x⟩
   exact ⟨x, h2x⟩
 #align set.image_surjective Set.image_surjective
 -/
@@ -1707,9 +1707,9 @@ theorem preimage_eq_empty_iff {s : Set β} : f ⁻¹' s = ∅ ↔ Disjoint s (ra
   ⟨fun h =>
     by
     simp only [eq_empty_iff_forall_not_mem, disjoint_iff_inter_eq_empty, not_exists, mem_inter_iff,
-      not_and, mem_range, mem_preimage] at h⊢
+      not_and, mem_range, mem_preimage] at h ⊢
     intro y hy x hx
-    rw [← hx] at hy
+    rw [← hx] at hy 
     exact h x hy, preimage_eq_empty⟩
 #align set.preimage_eq_empty_iff Set.preimage_eq_empty_iff
 
Diff
@@ -62,12 +62,6 @@ section Preimage
 
 variable {f : α → β} {g : β → γ}
 
-/- warning: set.preimage_empty -> Set.preimage_empty is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β}, Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u2} α β f (EmptyCollection.emptyCollection.{u2} (Set.{u2} β) (Set.hasEmptyc.{u2} β))) (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.hasEmptyc.{u1} α))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, Eq.{succ u2} (Set.{u2} α) (Set.preimage.{u2, u1} α β f (EmptyCollection.emptyCollection.{u1} (Set.{u1} β) (Set.instEmptyCollectionSet.{u1} β))) (EmptyCollection.emptyCollection.{u2} (Set.{u2} α) (Set.instEmptyCollectionSet.{u2} α))
-Case conversion may be inaccurate. Consider using '#align set.preimage_empty Set.preimage_emptyₓ'. -/
 @[simp]
 theorem preimage_empty : f ⁻¹' ∅ = ∅ :=
   rfl
@@ -91,66 +85,30 @@ theorem preimage_mono {s t : Set β} (h : s ⊆ t) : f ⁻¹' s ⊆ f ⁻¹' t :
 #align set.preimage_mono Set.preimage_mono
 -/
 
-/- warning: set.preimage_univ -> Set.preimage_univ is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β}, Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u2} α β f (Set.univ.{u2} β)) (Set.univ.{u1} α)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, Eq.{succ u2} (Set.{u2} α) (Set.preimage.{u2, u1} α β f (Set.univ.{u1} β)) (Set.univ.{u2} α)
-Case conversion may be inaccurate. Consider using '#align set.preimage_univ Set.preimage_univₓ'. -/
 @[simp]
 theorem preimage_univ : f ⁻¹' univ = univ :=
   rfl
 #align set.preimage_univ Set.preimage_univ
 
-/- warning: set.subset_preimage_univ -> Set.subset_preimage_univ is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u1} α}, HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) s (Set.preimage.{u1, u2} α β f (Set.univ.{u2} β))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {s : Set.{u2} α}, HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) s (Set.preimage.{u2, u1} α β f (Set.univ.{u1} β))
-Case conversion may be inaccurate. Consider using '#align set.subset_preimage_univ Set.subset_preimage_univₓ'. -/
 theorem subset_preimage_univ {s : Set α} : s ⊆ f ⁻¹' univ :=
   subset_univ _
 #align set.subset_preimage_univ Set.subset_preimage_univ
 
-/- warning: set.preimage_inter -> Set.preimage_inter is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u2} β} {t : Set.{u2} β}, Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u2} α β f (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) s t)) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (Set.preimage.{u1, u2} α β f s) (Set.preimage.{u1, u2} α β f t))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u2} β} {t : Set.{u2} β}, Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u2} α β f (Inter.inter.{u2} (Set.{u2} β) (Set.instInterSet.{u2} β) s t)) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) (Set.preimage.{u1, u2} α β f s) (Set.preimage.{u1, u2} α β f t))
-Case conversion may be inaccurate. Consider using '#align set.preimage_inter Set.preimage_interₓ'. -/
 @[simp]
 theorem preimage_inter {s t : Set β} : f ⁻¹' (s ∩ t) = f ⁻¹' s ∩ f ⁻¹' t :=
   rfl
 #align set.preimage_inter Set.preimage_inter
 
-/- warning: set.preimage_union -> Set.preimage_union is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u2} β} {t : Set.{u2} β}, Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u2} α β f (Union.union.{u2} (Set.{u2} β) (Set.hasUnion.{u2} β) s t)) (Union.union.{u1} (Set.{u1} α) (Set.hasUnion.{u1} α) (Set.preimage.{u1, u2} α β f s) (Set.preimage.{u1, u2} α β f t))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u2} β} {t : Set.{u2} β}, Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u2} α β f (Union.union.{u2} (Set.{u2} β) (Set.instUnionSet.{u2} β) s t)) (Union.union.{u1} (Set.{u1} α) (Set.instUnionSet.{u1} α) (Set.preimage.{u1, u2} α β f s) (Set.preimage.{u1, u2} α β f t))
-Case conversion may be inaccurate. Consider using '#align set.preimage_union Set.preimage_unionₓ'. -/
 @[simp]
 theorem preimage_union {s t : Set β} : f ⁻¹' (s ∪ t) = f ⁻¹' s ∪ f ⁻¹' t :=
   rfl
 #align set.preimage_union Set.preimage_union
 
-/- warning: set.preimage_compl -> Set.preimage_compl is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u2} β}, Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u2} α β f (HasCompl.compl.{u2} (Set.{u2} β) (BooleanAlgebra.toHasCompl.{u2} (Set.{u2} β) (Set.booleanAlgebra.{u2} β)) s)) (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) (Set.preimage.{u1, u2} α β f s))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u2} β}, Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u2} α β f (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} α)) (Set.preimage.{u1, u2} α β f s))
-Case conversion may be inaccurate. Consider using '#align set.preimage_compl Set.preimage_complₓ'. -/
 @[simp]
 theorem preimage_compl {s : Set β} : f ⁻¹' sᶜ = (f ⁻¹' s)ᶜ :=
   rfl
 #align set.preimage_compl Set.preimage_compl
 
-/- warning: set.preimage_diff -> Set.preimage_diff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β) (s : Set.{u2} β) (t : Set.{u2} β), Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u2} α β f (SDiff.sdiff.{u2} (Set.{u2} β) (BooleanAlgebra.toHasSdiff.{u2} (Set.{u2} β) (Set.booleanAlgebra.{u2} β)) s t)) (SDiff.sdiff.{u1} (Set.{u1} α) (BooleanAlgebra.toHasSdiff.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) (Set.preimage.{u1, u2} α β f s) (Set.preimage.{u1, u2} α β f t))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β) (s : Set.{u2} β) (t : Set.{u2} β), Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u2} α β f (SDiff.sdiff.{u2} (Set.{u2} β) (Set.instSDiffSet.{u2} β) s t)) (SDiff.sdiff.{u1} (Set.{u1} α) (Set.instSDiffSet.{u1} α) (Set.preimage.{u1, u2} α β f s) (Set.preimage.{u1, u2} α β f t))
-Case conversion may be inaccurate. Consider using '#align set.preimage_diff Set.preimage_diffₓ'. -/
 @[simp]
 theorem preimage_diff (f : α → β) (s t : Set β) : f ⁻¹' (s \ t) = f ⁻¹' s \ f ⁻¹' t :=
   rfl
@@ -212,22 +170,10 @@ theorem preimage_const (b : β) (s : Set β) [Decidable (b ∈ s)] :
 #align set.preimage_const Set.preimage_const
 -/
 
-/- warning: set.preimage_comp -> Set.preimage_comp is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {f : α -> β} {g : β -> γ} {s : Set.{u3} γ}, Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u3} α γ (Function.comp.{succ u1, succ u2, succ u3} α β γ g f) s) (Set.preimage.{u1, u2} α β f (Set.preimage.{u2, u3} β γ g s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {γ : Type.{u3}} {f : α -> β} {g : β -> γ} {s : Set.{u3} γ}, Eq.{succ u2} (Set.{u2} α) (Set.preimage.{u2, u3} α γ (Function.comp.{succ u2, succ u1, succ u3} α β γ g f) s) (Set.preimage.{u2, u1} α β f (Set.preimage.{u1, u3} β γ g s))
-Case conversion may be inaccurate. Consider using '#align set.preimage_comp Set.preimage_compₓ'. -/
 theorem preimage_comp {s : Set γ} : g ∘ f ⁻¹' s = f ⁻¹' (g ⁻¹' s) :=
   rfl
 #align set.preimage_comp Set.preimage_comp
 
-/- warning: set.preimage_comp_eq -> Set.preimage_comp_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {f : α -> β} {g : β -> γ}, Eq.{max (succ u3) (succ u1)} ((Set.{u3} γ) -> (Set.{u1} α)) (Set.preimage.{u1, u3} α γ (Function.comp.{succ u1, succ u2, succ u3} α β γ g f)) (Function.comp.{succ u3, succ u2, succ u1} (Set.{u3} γ) (Set.{u2} β) (Set.{u1} α) (Set.preimage.{u1, u2} α β f) (Set.preimage.{u2, u3} β γ g))
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u1}} {γ : Type.{u2}} {f : α -> β} {g : β -> γ}, Eq.{max (succ u3) (succ u2)} ((Set.{u2} γ) -> (Set.{u3} α)) (Set.preimage.{u3, u2} α γ (Function.comp.{succ u3, succ u1, succ u2} α β γ g f)) (Function.comp.{succ u2, succ u1, succ u3} (Set.{u2} γ) (Set.{u1} β) (Set.{u3} α) (Set.preimage.{u3, u1} α β f) (Set.preimage.{u1, u2} β γ g))
-Case conversion may be inaccurate. Consider using '#align set.preimage_comp_eq Set.preimage_comp_eqₓ'. -/
 theorem preimage_comp_eq : preimage (g ∘ f) = preimage f ∘ preimage g :=
   rfl
 #align set.preimage_comp_eq Set.preimage_comp_eq
@@ -241,12 +187,6 @@ theorem preimage_iterate_eq {f : α → α} {n : ℕ} : Set.preimage (f^[n]) = S
 #align set.preimage_iterate_eq Set.preimage_iterate_eq
 -/
 
-/- warning: set.preimage_preimage -> Set.preimage_preimage is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {g : β -> γ} {f : α -> β} {s : Set.{u3} γ}, Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u2} α β f (Set.preimage.{u2, u3} β γ g s)) (Set.preimage.{u1, u3} α γ (fun (x : α) => g (f x)) s)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {γ : Type.{u3}} {g : β -> γ} {f : α -> β} {s : Set.{u3} γ}, Eq.{succ u2} (Set.{u2} α) (Set.preimage.{u2, u1} α β f (Set.preimage.{u1, u3} β γ g s)) (Set.preimage.{u2, u3} α γ (fun (x : α) => g (f x)) s)
-Case conversion may be inaccurate. Consider using '#align set.preimage_preimage Set.preimage_preimageₓ'. -/
 theorem preimage_preimage {g : β → γ} {f : α → β} {s : Set γ} :
     f ⁻¹' (g ⁻¹' s) = (fun x => g (f x)) ⁻¹' s :=
   preimage_comp.symm
@@ -267,12 +207,6 @@ theorem nonempty_of_nonempty_preimage {s : Set β} {f : α → β} (hf : (f ⁻
 #align set.nonempty_of_nonempty_preimage Set.nonempty_of_nonempty_preimage
 -/
 
-/- warning: set.preimage_subtype_coe_eq_compl -> Set.preimage_subtype_coe_eq_compl is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {s : Set.{u1} α} {u : Set.{u1} α} {v : Set.{u1} α}, (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) s (Union.union.{u1} (Set.{u1} α) (Set.hasUnion.{u1} α) u v)) -> (Eq.{succ u1} (Set.{u1} α) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) s (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) u v)) (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.hasEmptyc.{u1} α))) -> (Eq.{succ u1} (Set.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s)) (Set.preimage.{u1, u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeSubtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)))))) u) (HasCompl.compl.{u1} (Set.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s)) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s)) (Set.booleanAlgebra.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s))) (Set.preimage.{u1, u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeSubtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)))))) v)))
-but is expected to have type
-  forall {α : Type.{u1}} {s : Set.{u1} α} {u : Set.{u1} α} {v : Set.{u1} α}, (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) s (Union.union.{u1} (Set.{u1} α) (Set.instUnionSet.{u1} α) u v)) -> (Eq.{succ u1} (Set.{u1} α) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) s (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) u v)) (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.instEmptyCollectionSet.{u1} α))) -> (Eq.{succ u1} (Set.{u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s))) (Set.preimage.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) u) (HasCompl.compl.{u1} (Set.{u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s))) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s))) (Set.instBooleanAlgebraSet.{u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)))) (Set.preimage.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) v)))
-Case conversion may be inaccurate. Consider using '#align set.preimage_subtype_coe_eq_compl Set.preimage_subtype_coe_eq_complₓ'. -/
 theorem preimage_subtype_coe_eq_compl {α : Type _} {s u v : Set α} (hsuv : s ⊆ u ∪ v)
     (H : s ∩ (u ∩ v) = ∅) : (coe : s → α) ⁻¹' u = (coe ⁻¹' v)ᶜ :=
   by
@@ -304,23 +238,11 @@ def image (f : α → β) (s : Set α) : Set β :=
 -- mathport name: «expr '' »
 infixl:80 " '' " => image
 
-/- warning: set.mem_image_iff_bex -> Set.mem_image_iff_bex is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u1} α} {y : β}, Iff (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) y (Set.image.{u1, u2} α β f s)) (Exists.{succ u1} α (fun (x : α) => Exists.{0} (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) (fun (_x : Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) => Eq.{succ u2} β (f x) y)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {s : Set.{u2} α} {y : β}, Iff (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) y (Set.image.{u2, u1} α β f s)) (Exists.{succ u2} α (fun (x : α) => Exists.{0} (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x s) (fun (_x : Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x s) => Eq.{succ u1} β (f x) y)))
-Case conversion may be inaccurate. Consider using '#align set.mem_image_iff_bex Set.mem_image_iff_bexₓ'. -/
 theorem mem_image_iff_bex {f : α → β} {s : Set α} {y : β} :
     y ∈ f '' s ↔ ∃ (x : _)(_ : x ∈ s), f x = y :=
   bex_def.symm
 #align set.mem_image_iff_bex Set.mem_image_iff_bex
 
-/- warning: set.mem_image -> Set.mem_image is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β) (s : Set.{u1} α) (y : β), Iff (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) y (Set.image.{u1, u2} α β f s)) (Exists.{succ u1} α (fun (x : α) => And (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) (Eq.{succ u2} β (f x) y)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β) (s : Set.{u2} α) (y : β), Iff (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) y (Set.image.{u2, u1} α β f s)) (Exists.{succ u2} α (fun (x : α) => And (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x s) (Eq.{succ u1} β (f x) y)))
-Case conversion may be inaccurate. Consider using '#align set.mem_image Set.mem_imageₓ'. -/
 @[simp]
 theorem mem_image (f : α → β) (s : Set α) (y : β) : y ∈ f '' s ↔ ∃ x, x ∈ s ∧ f x = y :=
   Iff.rfl
@@ -332,119 +254,53 @@ theorem image_eta (f : α → β) : f '' s = (fun x => f x) '' s :=
 #align set.image_eta Set.image_eta
 -/
 
-/- warning: set.mem_image_of_mem -> Set.mem_image_of_mem is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β) {x : α} {a : Set.{u1} α}, (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x a) -> (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) (f x) (Set.image.{u1, u2} α β f a))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β) {x : α} {a : Set.{u2} α}, (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x a) -> (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) (f x) (Set.image.{u2, u1} α β f a))
-Case conversion may be inaccurate. Consider using '#align set.mem_image_of_mem Set.mem_image_of_memₓ'. -/
 theorem mem_image_of_mem (f : α → β) {x : α} {a : Set α} (h : x ∈ a) : f x ∈ f '' a :=
   ⟨_, h, rfl⟩
 #align set.mem_image_of_mem Set.mem_image_of_mem
 
-/- warning: function.injective.mem_set_image -> Function.Injective.mem_set_image is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β}, (Function.Injective.{succ u1, succ u2} α β f) -> (forall {s : Set.{u1} α} {a : α}, Iff (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) (f a) (Set.image.{u1, u2} α β f s)) (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) a s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Injective.{succ u2, succ u1} α β f) -> (forall {s : Set.{u2} α} {a : α}, Iff (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) (f a) (Set.image.{u2, u1} α β f s)) (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) a s))
-Case conversion may be inaccurate. Consider using '#align function.injective.mem_set_image Function.Injective.mem_set_imageₓ'. -/
 theorem Function.Injective.mem_set_image {f : α → β} (hf : Injective f) {s : Set α} {a : α} :
     f a ∈ f '' s ↔ a ∈ s :=
   ⟨fun ⟨b, hb, Eq⟩ => hf Eq ▸ hb, mem_image_of_mem f⟩
 #align function.injective.mem_set_image Function.Injective.mem_set_image
 
-/- warning: set.ball_image_iff -> Set.ball_image_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u1} α} {p : β -> Prop}, Iff (forall (y : β), (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) y (Set.image.{u1, u2} α β f s)) -> (p y)) (forall (x : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (p (f x)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {s : Set.{u2} α} {p : β -> Prop}, Iff (forall (y : β), (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) y (Set.image.{u2, u1} α β f s)) -> (p y)) (forall (x : α), (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x s) -> (p (f x)))
-Case conversion may be inaccurate. Consider using '#align set.ball_image_iff Set.ball_image_iffₓ'. -/
 theorem ball_image_iff {f : α → β} {s : Set α} {p : β → Prop} :
     (∀ y ∈ f '' s, p y) ↔ ∀ x ∈ s, p (f x) := by simp
 #align set.ball_image_iff Set.ball_image_iff
 
-/- warning: set.ball_image_of_ball -> Set.ball_image_of_ball is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u1} α} {p : β -> Prop}, (forall (x : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (p (f x))) -> (forall (y : β), (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) y (Set.image.{u1, u2} α β f s)) -> (p y))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {s : Set.{u2} α} {p : β -> Prop}, (forall (x : α), (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x s) -> (p (f x))) -> (forall (y : β), (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) y (Set.image.{u2, u1} α β f s)) -> (p y))
-Case conversion may be inaccurate. Consider using '#align set.ball_image_of_ball Set.ball_image_of_ballₓ'. -/
 theorem ball_image_of_ball {f : α → β} {s : Set α} {p : β → Prop} (h : ∀ x ∈ s, p (f x)) :
     ∀ y ∈ f '' s, p y :=
   ball_image_iff.2 h
 #align set.ball_image_of_ball Set.ball_image_of_ball
 
-/- warning: set.bex_image_iff -> Set.bex_image_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u1} α} {p : β -> Prop}, Iff (Exists.{succ u2} β (fun (y : β) => Exists.{0} (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) y (Set.image.{u1, u2} α β f s)) (fun (H : Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) y (Set.image.{u1, u2} α β f s)) => p y))) (Exists.{succ u1} α (fun (x : α) => Exists.{0} (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) (fun (H : Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) => p (f x))))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {s : Set.{u2} α} {p : β -> Prop}, Iff (Exists.{succ u1} β (fun (y : β) => And (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) y (Set.image.{u2, u1} α β f s)) (p y))) (Exists.{succ u2} α (fun (x : α) => And (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x s) (p (f x))))
-Case conversion may be inaccurate. Consider using '#align set.bex_image_iff Set.bex_image_iffₓ'. -/
 theorem bex_image_iff {f : α → β} {s : Set α} {p : β → Prop} :
     (∃ y ∈ f '' s, p y) ↔ ∃ x ∈ s, p (f x) := by simp
 #align set.bex_image_iff Set.bex_image_iff
 
-/- warning: set.mem_image_elim -> Set.mem_image_elim is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u1} α} {C : β -> Prop}, (forall (x : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (C (f x))) -> (forall {y : β}, (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) y (Set.image.{u1, u2} α β f s)) -> (C y))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {s : Set.{u2} α} {C : β -> Prop}, (forall (x : α), (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x s) -> (C (f x))) -> (forall {y : β}, (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) y (Set.image.{u2, u1} α β f s)) -> (C y))
-Case conversion may be inaccurate. Consider using '#align set.mem_image_elim Set.mem_image_elimₓ'. -/
 theorem mem_image_elim {f : α → β} {s : Set α} {C : β → Prop} (h : ∀ x : α, x ∈ s → C (f x)) :
     ∀ {y : β}, y ∈ f '' s → C y
   | _, ⟨a, a_in, rfl⟩ => h a a_in
 #align set.mem_image_elim Set.mem_image_elim
 
-/- warning: set.mem_image_elim_on -> Set.mem_image_elim_on is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u1} α} {C : β -> Prop} {y : β}, (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) y (Set.image.{u1, u2} α β f s)) -> (forall (x : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (C (f x))) -> (C y)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {s : Set.{u2} α} {C : β -> Prop} {y : β}, (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) y (Set.image.{u2, u1} α β f s)) -> (forall (x : α), (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x s) -> (C (f x))) -> (C y)
-Case conversion may be inaccurate. Consider using '#align set.mem_image_elim_on Set.mem_image_elim_onₓ'. -/
 theorem mem_image_elim_on {f : α → β} {s : Set α} {C : β → Prop} {y : β} (h_y : y ∈ f '' s)
     (h : ∀ x : α, x ∈ s → C (f x)) : C y :=
   mem_image_elim h h_y
 #align set.mem_image_elim_on Set.mem_image_elim_on
 
-/- warning: set.image_congr -> Set.image_congr is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {g : α -> β} {s : Set.{u1} α}, (forall (a : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) a s) -> (Eq.{succ u2} β (f a) (g a))) -> (Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β f s) (Set.image.{u1, u2} α β g s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {g : α -> β} {s : Set.{u2} α}, (forall (a : α), (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) a s) -> (Eq.{succ u1} β (f a) (g a))) -> (Eq.{succ u1} (Set.{u1} β) (Set.image.{u2, u1} α β f s) (Set.image.{u2, u1} α β g s))
-Case conversion may be inaccurate. Consider using '#align set.image_congr Set.image_congrₓ'. -/
 @[congr]
 theorem image_congr {f g : α → β} {s : Set α} (h : ∀ a ∈ s, f a = g a) : f '' s = g '' s := by
   safe [ext_iff, iff_def]
 #align set.image_congr Set.image_congr
 
-/- warning: set.image_congr' -> Set.image_congr' is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {g : α -> β} {s : Set.{u1} α}, (forall (x : α), Eq.{succ u2} β (f x) (g x)) -> (Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β f s) (Set.image.{u1, u2} α β g s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {g : α -> β} {s : Set.{u2} α}, (forall (x : α), Eq.{succ u1} β (f x) (g x)) -> (Eq.{succ u1} (Set.{u1} β) (Set.image.{u2, u1} α β f s) (Set.image.{u2, u1} α β g s))
-Case conversion may be inaccurate. Consider using '#align set.image_congr' Set.image_congr'ₓ'. -/
 /-- A common special case of `image_congr` -/
 theorem image_congr' {f g : α → β} {s : Set α} (h : ∀ x : α, f x = g x) : f '' s = g '' s :=
   image_congr fun x _ => h x
 #align set.image_congr' Set.image_congr'
 
-/- warning: set.image_comp -> Set.image_comp is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (f : β -> γ) (g : α -> β) (a : Set.{u1} α), Eq.{succ u3} (Set.{u3} γ) (Set.image.{u1, u3} α γ (Function.comp.{succ u1, succ u2, succ u3} α β γ f g) a) (Set.image.{u2, u3} β γ f (Set.image.{u1, u2} α β g a))
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u1}} {γ : Type.{u2}} (f : β -> γ) (g : α -> β) (a : Set.{u3} α), Eq.{succ u2} (Set.{u2} γ) (Set.image.{u3, u2} α γ (Function.comp.{succ u3, succ u1, succ u2} α β γ f g) a) (Set.image.{u1, u2} β γ f (Set.image.{u3, u1} α β g a))
-Case conversion may be inaccurate. Consider using '#align set.image_comp Set.image_compₓ'. -/
 theorem image_comp (f : β → γ) (g : α → β) (a : Set α) : f ∘ g '' a = f '' (g '' a) :=
   Subset.antisymm (ball_image_of_ball fun a ha => mem_image_of_mem _ <| mem_image_of_mem _ ha)
     (ball_image_of_ball <| ball_image_of_ball fun a ha => mem_image_of_mem _ ha)
 #align set.image_comp Set.image_comp
 
-/- warning: set.image_image -> Set.image_image is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (g : β -> γ) (f : α -> β) (s : Set.{u1} α), Eq.{succ u3} (Set.{u3} γ) (Set.image.{u2, u3} β γ g (Set.image.{u1, u2} α β f s)) (Set.image.{u1, u3} α γ (fun (x : α) => g (f x)) s)
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u1}} {γ : Type.{u2}} (g : β -> γ) (f : α -> β) (s : Set.{u3} α), Eq.{succ u2} (Set.{u2} γ) (Set.image.{u1, u2} β γ g (Set.image.{u3, u1} α β f s)) (Set.image.{u3, u2} α γ (fun (x : α) => g (f x)) s)
-Case conversion may be inaccurate. Consider using '#align set.image_image Set.image_imageₓ'. -/
 /-- A variant of `image_comp`, useful for rewriting -/
 theorem image_image (g : β → γ) (f : α → β) (s : Set α) : g '' (f '' s) = (fun x => g (f x)) '' s :=
   (image_comp g f s).symm
@@ -457,12 +313,6 @@ theorem image_comm {β'} {f : β → γ} {g : α → β} {f' : α → β'} {g' :
 #align set.image_comm Set.image_comm
 -/
 
-/- warning: function.semiconj.set_image -> Function.Semiconj.set_image is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {ga : α -> α} {gb : β -> β}, (Function.Semiconj.{u1, u2} α β f ga gb) -> (Function.Semiconj.{u1, u2} (Set.{u1} α) (Set.{u2} β) (Set.image.{u1, u2} α β f) (Set.image.{u1, u1} α α ga) (Set.image.{u2, u2} β β gb))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {ga : α -> α} {gb : β -> β}, (Function.Semiconj.{u2, u1} α β f ga gb) -> (Function.Semiconj.{u2, u1} (Set.{u2} α) (Set.{u1} β) (Set.image.{u2, u1} α β f) (Set.image.{u2, u2} α α ga) (Set.image.{u1, u1} β β gb))
-Case conversion may be inaccurate. Consider using '#align function.semiconj.set_image Function.Semiconj.set_imageₓ'. -/
 theorem Function.Semiconj.set_image {f : α → β} {ga : α → α} {gb : β → β}
     (h : Function.Semiconj f ga gb) : Function.Semiconj (image f) (image ga) (image gb) := fun s =>
   image_comm h
@@ -475,34 +325,16 @@ theorem Function.Commute.set_image {f g : α → α} (h : Function.Commute f g)
 #align function.commute.set_image Function.Commute.set_image
 -/
 
-/- warning: set.image_subset -> Set.image_subset is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {a : Set.{u1} α} {b : Set.{u1} α} (f : α -> β), (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) a b) -> (HasSubset.Subset.{u2} (Set.{u2} β) (Set.hasSubset.{u2} β) (Set.image.{u1, u2} α β f a) (Set.image.{u1, u2} α β f b))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {a : Set.{u2} α} {b : Set.{u2} α} (f : α -> β), (HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) a b) -> (HasSubset.Subset.{u1} (Set.{u1} β) (Set.instHasSubsetSet.{u1} β) (Set.image.{u2, u1} α β f a) (Set.image.{u2, u1} α β f b))
-Case conversion may be inaccurate. Consider using '#align set.image_subset Set.image_subsetₓ'. -/
 /-- Image is monotone with respect to `⊆`. See `set.monotone_image` for the statement in
 terms of `≤`. -/
 theorem image_subset {a b : Set α} (f : α → β) (h : a ⊆ b) : f '' a ⊆ f '' b := by
   simp only [subset_def, mem_image]; exact fun x => fun ⟨w, h1, h2⟩ => ⟨w, h h1, h2⟩
 #align set.image_subset Set.image_subset
 
-/- warning: set.monotone_image -> Set.monotone_image is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β}, Monotone.{u1, u2} (Set.{u1} α) (Set.{u2} β) (PartialOrder.toPreorder.{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} α))))))) (PartialOrder.toPreorder.{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} β))))))) (Set.image.{u1, u2} α β f)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, Monotone.{u2, u1} (Set.{u2} α) (Set.{u1} β) (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} α)))))))) (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} β)))))))) (Set.image.{u2, u1} α β f)
-Case conversion may be inaccurate. Consider using '#align set.monotone_image Set.monotone_imageₓ'. -/
 /-- `set.image` is monotone. See `set.image_subset` for the statement in terms of `⊆`. -/
 theorem monotone_image {f : α → β} : Monotone (image f) := fun s t => image_subset _
 #align set.monotone_image Set.monotone_image
 
-/- warning: set.image_union -> Set.image_union is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β) (s : Set.{u1} α) (t : Set.{u1} α), Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β f (Union.union.{u1} (Set.{u1} α) (Set.hasUnion.{u1} α) s t)) (Union.union.{u2} (Set.{u2} β) (Set.hasUnion.{u2} β) (Set.image.{u1, u2} α β f s) (Set.image.{u1, u2} α β f t))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β) (s : Set.{u2} α) (t : Set.{u2} α), Eq.{succ u1} (Set.{u1} β) (Set.image.{u2, u1} α β f (Union.union.{u2} (Set.{u2} α) (Set.instUnionSet.{u2} α) s t)) (Union.union.{u1} (Set.{u1} β) (Set.instUnionSet.{u1} β) (Set.image.{u2, u1} α β f s) (Set.image.{u2, u1} α β f t))
-Case conversion may be inaccurate. Consider using '#align set.image_union Set.image_unionₓ'. -/
 theorem image_union (f : α → β) (s t : Set α) : f '' (s ∪ t) = f '' s ∪ f '' t :=
   ext fun x =>
     ⟨by rintro ⟨a, h | h, rfl⟩ <;> [left;right] <;> exact ⟨_, h, rfl⟩, by
@@ -515,22 +347,10 @@ theorem image_empty (f : α → β) : f '' ∅ = ∅ := by ext; simp
 #align set.image_empty Set.image_empty
 -/
 
-/- warning: set.image_inter_subset -> Set.image_inter_subset is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β) (s : Set.{u1} α) (t : Set.{u1} α), HasSubset.Subset.{u2} (Set.{u2} β) (Set.hasSubset.{u2} β) (Set.image.{u1, u2} α β f (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) s t)) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (Set.image.{u1, u2} α β f s) (Set.image.{u1, u2} α β f t))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β) (s : Set.{u2} α) (t : Set.{u2} α), HasSubset.Subset.{u1} (Set.{u1} β) (Set.instHasSubsetSet.{u1} β) (Set.image.{u2, u1} α β f (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) s t)) (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (Set.image.{u2, u1} α β f s) (Set.image.{u2, u1} α β f t))
-Case conversion may be inaccurate. Consider using '#align set.image_inter_subset Set.image_inter_subsetₓ'. -/
 theorem image_inter_subset (f : α → β) (s t : Set α) : f '' (s ∩ t) ⊆ f '' s ∩ f '' t :=
   subset_inter (image_subset _ <| inter_subset_left _ _) (image_subset _ <| inter_subset_right _ _)
 #align set.image_inter_subset Set.image_inter_subset
 
-/- warning: set.image_inter_on -> Set.image_inter_on is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u1} α} {t : Set.{u1} α}, (forall (x : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x t) -> (forall (y : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (Eq.{succ u2} β (f x) (f y)) -> (Eq.{succ u1} α x y))) -> (Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β f (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) s t)) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (Set.image.{u1, u2} α β f s) (Set.image.{u1, u2} α β f t)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {s : Set.{u2} α} {t : Set.{u2} α}, (forall (x : α), (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x t) -> (forall (y : α), (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) y s) -> (Eq.{succ u1} β (f x) (f y)) -> (Eq.{succ u2} α x y))) -> (Eq.{succ u1} (Set.{u1} β) (Set.image.{u2, u1} α β f (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) s t)) (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (Set.image.{u2, u1} α β f s) (Set.image.{u2, u1} α β f t)))
-Case conversion may be inaccurate. Consider using '#align set.image_inter_on Set.image_inter_onₓ'. -/
 theorem image_inter_on {f : α → β} {s t : Set α} (h : ∀ x ∈ t, ∀ y ∈ s, f x = f y → x = y) :
     f '' (s ∩ t) = f '' s ∩ f '' t :=
   (image_inter_subset _ _ _).antisymm fun b ⟨⟨a₁, ha₁, h₁⟩, ⟨a₂, ha₂, h₂⟩⟩ =>
@@ -538,12 +358,6 @@ theorem image_inter_on {f : α → β} {s t : Set α} (h : ∀ x ∈ t, ∀ y 
     ⟨a₁, ⟨ha₁, this ▸ ha₂⟩, h₁⟩
 #align set.image_inter_on Set.image_inter_on
 
-/- warning: set.image_inter -> Set.image_inter is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u1} α} {t : Set.{u1} α}, (Function.Injective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β f (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) s t)) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (Set.image.{u1, u2} α β f s) (Set.image.{u1, u2} α β f t)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {s : Set.{u2} α} {t : Set.{u2} α}, (Function.Injective.{succ u2, succ u1} α β f) -> (Eq.{succ u1} (Set.{u1} β) (Set.image.{u2, u1} α β f (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) s t)) (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (Set.image.{u2, u1} α β f s) (Set.image.{u2, u1} α β f t)))
-Case conversion may be inaccurate. Consider using '#align set.image_inter Set.image_interₓ'. -/
 theorem image_inter {f : α → β} {s t : Set α} (H : Injective f) : f '' (s ∩ t) = f '' s ∩ f '' t :=
   image_inter_on fun x _ y _ h => H h
 #align set.image_inter Set.image_inter
@@ -560,12 +374,6 @@ theorem image_singleton {f : α → β} {a : α} : f '' {a} = {f a} := by ext; s
 #align set.image_singleton Set.image_singleton
 -/
 
-/- warning: set.nonempty.image_const -> Set.Nonempty.image_const is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {s : Set.{u1} α}, (Set.Nonempty.{u1} α s) -> (forall (a : β), Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β (fun (_x : α) => a) s) (Singleton.singleton.{u2, u2} β (Set.{u2} β) (Set.hasSingleton.{u2} β) a))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {s : Set.{u2} α}, (Set.Nonempty.{u2} α s) -> (forall (a : β), Eq.{succ u1} (Set.{u1} β) (Set.image.{u2, u1} α β (fun (_x : α) => a) s) (Singleton.singleton.{u1, u1} β (Set.{u1} β) (Set.instSingletonSet.{u1} β) a))
-Case conversion may be inaccurate. Consider using '#align set.nonempty.image_const Set.Nonempty.image_constₓ'. -/
 @[simp]
 theorem Nonempty.image_const {s : Set α} (hs : s.Nonempty) (a : β) : (fun _ => a) '' s = {a} :=
   ext fun x =>
@@ -573,12 +381,6 @@ theorem Nonempty.image_const {s : Set α} (hs : s.Nonempty) (a : β) : (fun _ =>
       (eq_of_mem_singleton h).symm ▸ hs.imp fun y hy => ⟨hy, rfl⟩⟩
 #align set.nonempty.image_const Set.Nonempty.image_const
 
-/- warning: set.image_eq_empty -> Set.image_eq_empty is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u1} α}, Iff (Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β f s) (EmptyCollection.emptyCollection.{u2} (Set.{u2} β) (Set.hasEmptyc.{u2} β))) (Eq.{succ u1} (Set.{u1} α) s (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.hasEmptyc.{u1} α)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {s : Set.{u2} α}, Iff (Eq.{succ u1} (Set.{u1} β) (Set.image.{u2, u1} α β f s) (EmptyCollection.emptyCollection.{u1} (Set.{u1} β) (Set.instEmptyCollectionSet.{u1} β))) (Eq.{succ u2} (Set.{u2} α) s (EmptyCollection.emptyCollection.{u2} (Set.{u2} α) (Set.instEmptyCollectionSet.{u2} α)))
-Case conversion may be inaccurate. Consider using '#align set.image_eq_empty Set.image_eq_emptyₓ'. -/
 @[simp]
 theorem image_eq_empty {α β} {f : α → β} {s : Set α} : f '' s = ∅ ↔ s = ∅ :=
   by
@@ -618,12 +420,6 @@ theorem compl_compl_image [BooleanAlgebra α] (S : Set α) : compl '' (compl ''
 #align set.compl_compl_image Set.compl_compl_image
 -/
 
-/- warning: set.image_insert_eq -> Set.image_insert_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {a : α} {s : Set.{u1} α}, Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β f (Insert.insert.{u1, u1} α (Set.{u1} α) (Set.hasInsert.{u1} α) a s)) (Insert.insert.{u2, u2} β (Set.{u2} β) (Set.hasInsert.{u2} β) (f a) (Set.image.{u1, u2} α β f s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {a : α} {s : Set.{u2} α}, Eq.{succ u1} (Set.{u1} β) (Set.image.{u2, u1} α β f (Insert.insert.{u2, u2} α (Set.{u2} α) (Set.instInsertSet.{u2} α) a s)) (Insert.insert.{u1, u1} β (Set.{u1} β) (Set.instInsertSet.{u1} β) (f a) (Set.image.{u2, u1} α β f s))
-Case conversion may be inaccurate. Consider using '#align set.image_insert_eq Set.image_insert_eqₓ'. -/
 theorem image_insert_eq {f : α → β} {a : α} {s : Set α} : f '' insert a s = insert (f a) (f '' s) :=
   by ext; simp [and_or_left, exists_or, eq_comm, or_comm', and_comm']
 #align set.image_insert_eq Set.image_insert_eq
@@ -634,150 +430,66 @@ theorem image_pair (f : α → β) (a b : α) : f '' {a, b} = {f a, f b} := by
 #align set.image_pair Set.image_pair
 -/
 
-/- warning: set.image_subset_preimage_of_inverse -> Set.image_subset_preimage_of_inverse is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {g : β -> α}, (Function.LeftInverse.{succ u1, succ u2} α β g f) -> (forall (s : Set.{u1} α), HasSubset.Subset.{u2} (Set.{u2} β) (Set.hasSubset.{u2} β) (Set.image.{u1, u2} α β f s) (Set.preimage.{u2, u1} β α g s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {g : β -> α}, (Function.LeftInverse.{succ u2, succ u1} α β g f) -> (forall (s : Set.{u2} α), HasSubset.Subset.{u1} (Set.{u1} β) (Set.instHasSubsetSet.{u1} β) (Set.image.{u2, u1} α β f s) (Set.preimage.{u1, u2} β α g s))
-Case conversion may be inaccurate. Consider using '#align set.image_subset_preimage_of_inverse Set.image_subset_preimage_of_inverseₓ'. -/
 theorem image_subset_preimage_of_inverse {f : α → β} {g : β → α} (I : LeftInverse g f) (s : Set α) :
     f '' s ⊆ g ⁻¹' s := fun b ⟨a, h, e⟩ => e ▸ ((I a).symm ▸ h : g (f a) ∈ s)
 #align set.image_subset_preimage_of_inverse Set.image_subset_preimage_of_inverse
 
-/- warning: set.preimage_subset_image_of_inverse -> Set.preimage_subset_image_of_inverse is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {g : β -> α}, (Function.LeftInverse.{succ u1, succ u2} α β g f) -> (forall (s : Set.{u2} β), HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) (Set.preimage.{u1, u2} α β f s) (Set.image.{u2, u1} β α g s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {g : β -> α}, (Function.LeftInverse.{succ u2, succ u1} α β g f) -> (forall (s : Set.{u1} β), HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) (Set.preimage.{u2, u1} α β f s) (Set.image.{u1, u2} β α g s))
-Case conversion may be inaccurate. Consider using '#align set.preimage_subset_image_of_inverse Set.preimage_subset_image_of_inverseₓ'. -/
 theorem preimage_subset_image_of_inverse {f : α → β} {g : β → α} (I : LeftInverse g f) (s : Set β) :
     f ⁻¹' s ⊆ g '' s := fun b h => ⟨f b, h, I b⟩
 #align set.preimage_subset_image_of_inverse Set.preimage_subset_image_of_inverse
 
-/- warning: set.image_eq_preimage_of_inverse -> Set.image_eq_preimage_of_inverse is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {g : β -> α}, (Function.LeftInverse.{succ u1, succ u2} α β g f) -> (Function.RightInverse.{succ u1, succ u2} α β g f) -> (Eq.{max (succ u1) (succ u2)} ((Set.{u1} α) -> (Set.{u2} β)) (Set.image.{u1, u2} α β f) (Set.preimage.{u2, u1} β α g))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {g : β -> α}, (Function.LeftInverse.{succ u2, succ u1} α β g f) -> (Function.RightInverse.{succ u2, succ u1} α β g f) -> (Eq.{max (succ u2) (succ u1)} ((Set.{u2} α) -> (Set.{u1} β)) (Set.image.{u2, u1} α β f) (Set.preimage.{u1, u2} β α g))
-Case conversion may be inaccurate. Consider using '#align set.image_eq_preimage_of_inverse Set.image_eq_preimage_of_inverseₓ'. -/
 theorem image_eq_preimage_of_inverse {f : α → β} {g : β → α} (h₁ : LeftInverse g f)
     (h₂ : RightInverse g f) : image f = preimage g :=
   funext fun s =>
     Subset.antisymm (image_subset_preimage_of_inverse h₁ s) (preimage_subset_image_of_inverse h₂ s)
 #align set.image_eq_preimage_of_inverse Set.image_eq_preimage_of_inverse
 
-/- warning: set.mem_image_iff_of_inverse -> Set.mem_image_iff_of_inverse is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {g : β -> α} {b : β} {s : Set.{u1} α}, (Function.LeftInverse.{succ u1, succ u2} α β g f) -> (Function.RightInverse.{succ u1, succ u2} α β g f) -> (Iff (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) b (Set.image.{u1, u2} α β f s)) (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) (g b) s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {g : β -> α} {b : β} {s : Set.{u2} α}, (Function.LeftInverse.{succ u2, succ u1} α β g f) -> (Function.RightInverse.{succ u2, succ u1} α β g f) -> (Iff (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) b (Set.image.{u2, u1} α β f s)) (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) (g b) s))
-Case conversion may be inaccurate. Consider using '#align set.mem_image_iff_of_inverse Set.mem_image_iff_of_inverseₓ'. -/
 theorem mem_image_iff_of_inverse {f : α → β} {g : β → α} {b : β} {s : Set α} (h₁ : LeftInverse g f)
     (h₂ : RightInverse g f) : b ∈ f '' s ↔ g b ∈ s := by
   rw [image_eq_preimage_of_inverse h₁ h₂] <;> rfl
 #align set.mem_image_iff_of_inverse Set.mem_image_iff_of_inverse
 
-/- warning: set.image_compl_subset -> Set.image_compl_subset is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u1} α}, (Function.Injective.{succ u1, succ u2} α β f) -> (HasSubset.Subset.{u2} (Set.{u2} β) (Set.hasSubset.{u2} β) (Set.image.{u1, u2} α β f (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} β)) (Set.image.{u1, u2} α β f s)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {s : Set.{u2} α}, (Function.Injective.{succ u2, succ u1} α β f) -> (HasSubset.Subset.{u1} (Set.{u1} β) (Set.instHasSubsetSet.{u1} β) (Set.image.{u2, u1} α β f (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} β)) (Set.image.{u2, u1} α β f s)))
-Case conversion may be inaccurate. Consider using '#align set.image_compl_subset Set.image_compl_subsetₓ'. -/
 theorem image_compl_subset {f : α → β} {s : Set α} (H : Injective f) : f '' sᶜ ⊆ (f '' s)ᶜ :=
   Disjoint.subset_compl_left <| by simp [disjoint_iff_inf_le, ← image_inter H]
 #align set.image_compl_subset Set.image_compl_subset
 
-/- warning: set.subset_image_compl -> Set.subset_image_compl is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u1} α}, (Function.Surjective.{succ u1, succ u2} α β f) -> (HasSubset.Subset.{u2} (Set.{u2} β) (Set.hasSubset.{u2} β) (HasCompl.compl.{u2} (Set.{u2} β) (BooleanAlgebra.toHasCompl.{u2} (Set.{u2} β) (Set.booleanAlgebra.{u2} β)) (Set.image.{u1, u2} α β f s)) (Set.image.{u1, u2} α β f (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {s : Set.{u2} α}, (Function.Surjective.{succ u2, succ u1} α β f) -> (HasSubset.Subset.{u1} (Set.{u1} β) (Set.instHasSubsetSet.{u1} β) (HasCompl.compl.{u1} (Set.{u1} β) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} β) (Set.instBooleanAlgebraSet.{u1} β)) (Set.image.{u2, u1} α β f s)) (Set.image.{u2, u1} α β f (HasCompl.compl.{u2} (Set.{u2} α) (BooleanAlgebra.toHasCompl.{u2} (Set.{u2} α) (Set.instBooleanAlgebraSet.{u2} α)) s)))
-Case conversion may be inaccurate. Consider using '#align set.subset_image_compl Set.subset_image_complₓ'. -/
 theorem subset_image_compl {f : α → β} {s : Set α} (H : Surjective f) : (f '' s)ᶜ ⊆ f '' sᶜ :=
   compl_subset_iff_union.2 <| by rw [← image_union]; simp [image_univ_of_surjective H]
 #align set.subset_image_compl Set.subset_image_compl
 
-/- warning: set.image_compl_eq -> Set.image_compl_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u1} α}, (Function.Bijective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β f (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} β)) (Set.image.{u1, u2} α β f s)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {s : Set.{u2} α}, (Function.Bijective.{succ u2, succ u1} α β f) -> (Eq.{succ u1} (Set.{u1} β) (Set.image.{u2, u1} α β f (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} β)) (Set.image.{u2, u1} α β f s)))
-Case conversion may be inaccurate. Consider using '#align set.image_compl_eq Set.image_compl_eqₓ'. -/
 theorem image_compl_eq {f : α → β} {s : Set α} (H : Bijective f) : f '' sᶜ = (f '' s)ᶜ :=
   Subset.antisymm (image_compl_subset H.1) (subset_image_compl H.2)
 #align set.image_compl_eq Set.image_compl_eq
 
-/- warning: set.subset_image_diff -> Set.subset_image_diff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β) (s : Set.{u1} α) (t : Set.{u1} α), HasSubset.Subset.{u2} (Set.{u2} β) (Set.hasSubset.{u2} β) (SDiff.sdiff.{u2} (Set.{u2} β) (BooleanAlgebra.toHasSdiff.{u2} (Set.{u2} β) (Set.booleanAlgebra.{u2} β)) (Set.image.{u1, u2} α β f s) (Set.image.{u1, u2} α β f t)) (Set.image.{u1, u2} α β f (SDiff.sdiff.{u1} (Set.{u1} α) (BooleanAlgebra.toHasSdiff.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s t))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β) (s : Set.{u2} α) (t : Set.{u2} α), HasSubset.Subset.{u1} (Set.{u1} β) (Set.instHasSubsetSet.{u1} β) (SDiff.sdiff.{u1} (Set.{u1} β) (Set.instSDiffSet.{u1} β) (Set.image.{u2, u1} α β f s) (Set.image.{u2, u1} α β f t)) (Set.image.{u2, u1} α β f (SDiff.sdiff.{u2} (Set.{u2} α) (Set.instSDiffSet.{u2} α) s t))
-Case conversion may be inaccurate. Consider using '#align set.subset_image_diff Set.subset_image_diffₓ'. -/
 theorem subset_image_diff (f : α → β) (s t : Set α) : f '' s \ f '' t ⊆ f '' (s \ t) :=
   by
   rw [diff_subset_iff, ← image_union, union_diff_self]
   exact image_subset f (subset_union_right t s)
 #align set.subset_image_diff Set.subset_image_diff
 
-/- warning: set.subset_image_symm_diff -> Set.subset_image_symm_diff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u1} α} {t : Set.{u1} α}, HasSubset.Subset.{u2} (Set.{u2} β) (Set.hasSubset.{u2} β) (symmDiff.{u2} (Set.{u2} β) (SemilatticeSup.toHasSup.{u2} (Set.{u2} β) (Lattice.toSemilatticeSup.{u2} (Set.{u2} β) (GeneralizedCoheytingAlgebra.toLattice.{u2} (Set.{u2} β) (GeneralizedBooleanAlgebra.toGeneralizedCoheytingAlgebra.{u2} (Set.{u2} β) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u2} (Set.{u2} β) (Set.booleanAlgebra.{u2} β)))))) (BooleanAlgebra.toHasSdiff.{u2} (Set.{u2} β) (Set.booleanAlgebra.{u2} β)) (Set.image.{u1, u2} α β f s) (Set.image.{u1, u2} α β f t)) (Set.image.{u1, u2} α β f (symmDiff.{u1} (Set.{u1} α) (SemilatticeSup.toHasSup.{u1} (Set.{u1} α) (Lattice.toSemilatticeSup.{u1} (Set.{u1} α) (GeneralizedCoheytingAlgebra.toLattice.{u1} (Set.{u1} α) (GeneralizedBooleanAlgebra.toGeneralizedCoheytingAlgebra.{u1} (Set.{u1} α) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)))))) (BooleanAlgebra.toHasSdiff.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s t))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u1} α} {t : Set.{u1} α}, HasSubset.Subset.{u2} (Set.{u2} β) (Set.instHasSubsetSet.{u2} β) (symmDiff.{u2} (Set.{u2} β) (SemilatticeSup.toSup.{u2} (Set.{u2} β) (Lattice.toSemilatticeSup.{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} β))))))) (Set.instSDiffSet.{u2} β) (Set.image.{u1, u2} α β f s) (Set.image.{u1, u2} α β f t)) (Set.image.{u1, u2} α β f (symmDiff.{u1} (Set.{u1} α) (SemilatticeSup.toSup.{u1} (Set.{u1} α) (Lattice.toSemilatticeSup.{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} α))))))) (Set.instSDiffSet.{u1} α) s t))
-Case conversion may be inaccurate. Consider using '#align set.subset_image_symm_diff Set.subset_image_symm_diffₓ'. -/
 theorem subset_image_symm_diff : (f '' s) ∆ (f '' t) ⊆ f '' s ∆ t :=
   (union_subset_union (subset_image_diff _ _ _) <| subset_image_diff _ _ _).trans
     (image_union _ _ _).Superset
 #align set.subset_image_symm_diff Set.subset_image_symm_diff
 
-/- warning: set.image_diff -> Set.image_diff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β}, (Function.Injective.{succ u1, succ u2} α β f) -> (forall (s : Set.{u1} α) (t : Set.{u1} α), Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β f (SDiff.sdiff.{u1} (Set.{u1} α) (BooleanAlgebra.toHasSdiff.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s t)) (SDiff.sdiff.{u2} (Set.{u2} β) (BooleanAlgebra.toHasSdiff.{u2} (Set.{u2} β) (Set.booleanAlgebra.{u2} β)) (Set.image.{u1, u2} α β f s) (Set.image.{u1, u2} α β f t)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Injective.{succ u2, succ u1} α β f) -> (forall (s : Set.{u2} α) (t : Set.{u2} α), Eq.{succ u1} (Set.{u1} β) (Set.image.{u2, u1} α β f (SDiff.sdiff.{u2} (Set.{u2} α) (Set.instSDiffSet.{u2} α) s t)) (SDiff.sdiff.{u1} (Set.{u1} β) (Set.instSDiffSet.{u1} β) (Set.image.{u2, u1} α β f s) (Set.image.{u2, u1} α β f t)))
-Case conversion may be inaccurate. Consider using '#align set.image_diff Set.image_diffₓ'. -/
 theorem image_diff {f : α → β} (hf : Injective f) (s t : Set α) : f '' (s \ t) = f '' s \ f '' t :=
   Subset.antisymm
     (Subset.trans (image_inter_subset _ _ _) <| inter_subset_inter_right _ <| image_compl_subset hf)
     (subset_image_diff f s t)
 #align set.image_diff Set.image_diff
 
-/- warning: set.image_symm_diff -> Set.image_symm_diff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β}, (Function.Injective.{succ u1, succ u2} α β f) -> (forall (s : Set.{u1} α) (t : Set.{u1} α), Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β f (symmDiff.{u1} (Set.{u1} α) (SemilatticeSup.toHasSup.{u1} (Set.{u1} α) (Lattice.toSemilatticeSup.{u1} (Set.{u1} α) (GeneralizedCoheytingAlgebra.toLattice.{u1} (Set.{u1} α) (GeneralizedBooleanAlgebra.toGeneralizedCoheytingAlgebra.{u1} (Set.{u1} α) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)))))) (BooleanAlgebra.toHasSdiff.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s t)) (symmDiff.{u2} (Set.{u2} β) (SemilatticeSup.toHasSup.{u2} (Set.{u2} β) (Lattice.toSemilatticeSup.{u2} (Set.{u2} β) (GeneralizedCoheytingAlgebra.toLattice.{u2} (Set.{u2} β) (GeneralizedBooleanAlgebra.toGeneralizedCoheytingAlgebra.{u2} (Set.{u2} β) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u2} (Set.{u2} β) (Set.booleanAlgebra.{u2} β)))))) (BooleanAlgebra.toHasSdiff.{u2} (Set.{u2} β) (Set.booleanAlgebra.{u2} β)) (Set.image.{u1, u2} α β f s) (Set.image.{u1, u2} α β f t)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Injective.{succ u2, succ u1} α β f) -> (forall (s : Set.{u2} α) (t : Set.{u2} α), Eq.{succ u1} (Set.{u1} β) (Set.image.{u2, u1} α β f (symmDiff.{u2} (Set.{u2} α) (SemilatticeSup.toSup.{u2} (Set.{u2} α) (Lattice.toSemilatticeSup.{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} α))))))) (Set.instSDiffSet.{u2} α) s t)) (symmDiff.{u1} (Set.{u1} β) (SemilatticeSup.toSup.{u1} (Set.{u1} β) (Lattice.toSemilatticeSup.{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} β))))))) (Set.instSDiffSet.{u1} β) (Set.image.{u2, u1} α β f s) (Set.image.{u2, u1} α β f t)))
-Case conversion may be inaccurate. Consider using '#align set.image_symm_diff Set.image_symm_diffₓ'. -/
 theorem image_symm_diff (hf : Injective f) (s t : Set α) : f '' s ∆ t = (f '' s) ∆ (f '' t) := by
   simp_rw [Set.symmDiff_def, image_union, image_diff hf]
 #align set.image_symm_diff Set.image_symm_diff
 
-/- warning: set.nonempty.image -> Set.Nonempty.image is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β) {s : Set.{u1} α}, (Set.Nonempty.{u1} α s) -> (Set.Nonempty.{u2} β (Set.image.{u1, u2} α β f s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β) {s : Set.{u2} α}, (Set.Nonempty.{u2} α s) -> (Set.Nonempty.{u1} β (Set.image.{u2, u1} α β f s))
-Case conversion may be inaccurate. Consider using '#align set.nonempty.image Set.Nonempty.imageₓ'. -/
 theorem Nonempty.image (f : α → β) {s : Set α} : s.Nonempty → (f '' s).Nonempty
   | ⟨x, hx⟩ => ⟨f x, mem_image_of_mem f hx⟩
 #align set.nonempty.image Set.Nonempty.image
 
-/- warning: set.nonempty.of_image -> Set.Nonempty.of_image is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u1} α}, (Set.Nonempty.{u2} β (Set.image.{u1, u2} α β f s)) -> (Set.Nonempty.{u1} α s)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {s : Set.{u2} α}, (Set.Nonempty.{u1} β (Set.image.{u2, u1} α β f s)) -> (Set.Nonempty.{u2} α s)
-Case conversion may be inaccurate. Consider using '#align set.nonempty.of_image Set.Nonempty.of_imageₓ'. -/
 theorem Nonempty.of_image {f : α → β} {s : Set α} : (f '' s).Nonempty → s.Nonempty
   | ⟨y, x, hx, _⟩ => ⟨x, hx⟩
 #align set.nonempty.of_image Set.Nonempty.of_image
 
-/- warning: set.nonempty_image_iff -> Set.nonempty_image_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u1} α}, Iff (Set.Nonempty.{u2} β (Set.image.{u1, u2} α β f s)) (Set.Nonempty.{u1} α s)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {s : Set.{u2} α}, Iff (Set.Nonempty.{u1} β (Set.image.{u2, u1} α β f s)) (Set.Nonempty.{u2} α s)
-Case conversion may be inaccurate. Consider using '#align set.nonempty_image_iff Set.nonempty_image_iffₓ'. -/
 @[simp]
 theorem nonempty_image_iff {f : α → β} {s : Set α} : (f '' s).Nonempty ↔ s.Nonempty :=
   ⟨Nonempty.of_image, fun h => h.image f⟩
@@ -795,12 +507,6 @@ theorem Nonempty.preimage {s : Set β} (hs : s.Nonempty) {f : α → β} (hf : S
 instance (f : α → β) (s : Set α) [Nonempty s] : Nonempty (f '' s) :=
   (Set.Nonempty.image f nonempty_of_nonempty_subtype).to_subtype
 
-/- warning: set.image_subset_iff -> Set.image_subset_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {s : Set.{u1} α} {t : Set.{u2} β} {f : α -> β}, Iff (HasSubset.Subset.{u2} (Set.{u2} β) (Set.hasSubset.{u2} β) (Set.image.{u1, u2} α β f s) t) (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) s (Set.preimage.{u1, u2} α β f t))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {s : Set.{u2} α} {t : Set.{u1} β} {f : α -> β}, Iff (HasSubset.Subset.{u1} (Set.{u1} β) (Set.instHasSubsetSet.{u1} β) (Set.image.{u2, u1} α β f s) t) (HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) s (Set.preimage.{u2, u1} α β f t))
-Case conversion may be inaccurate. Consider using '#align set.image_subset_iff Set.image_subset_iffₓ'. -/
 /-- image and preimage are a Galois connection -/
 @[simp]
 theorem image_subset_iff {s : Set α} {t : Set β} {f : α → β} : f '' s ⊆ t ↔ s ⊆ f ⁻¹' t :=
@@ -813,22 +519,10 @@ theorem image_preimage_subset (f : α → β) (s : Set β) : f '' (f ⁻¹' s) 
 #align set.image_preimage_subset Set.image_preimage_subset
 -/
 
-/- warning: set.subset_preimage_image -> Set.subset_preimage_image is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β) (s : Set.{u1} α), HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) s (Set.preimage.{u1, u2} α β f (Set.image.{u1, u2} α β f s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β) (s : Set.{u2} α), HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) s (Set.preimage.{u2, u1} α β f (Set.image.{u2, u1} α β f s))
-Case conversion may be inaccurate. Consider using '#align set.subset_preimage_image Set.subset_preimage_imageₓ'. -/
 theorem subset_preimage_image (f : α → β) (s : Set α) : s ⊆ f ⁻¹' (f '' s) := fun x =>
   mem_image_of_mem f
 #align set.subset_preimage_image Set.subset_preimage_image
 
-/- warning: set.preimage_image_eq -> Set.preimage_image_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} (s : Set.{u1} α), (Function.Injective.{succ u1, succ u2} α β f) -> (Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u2} α β f (Set.image.{u1, u2} α β f s)) s)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} (s : Set.{u2} α), (Function.Injective.{succ u2, succ u1} α β f) -> (Eq.{succ u2} (Set.{u2} α) (Set.preimage.{u2, u1} α β f (Set.image.{u2, u1} α β f s)) s)
-Case conversion may be inaccurate. Consider using '#align set.preimage_image_eq Set.preimage_image_eqₓ'. -/
 theorem preimage_image_eq {f : α → β} (s : Set α) (h : Injective f) : f ⁻¹' (f '' s) = s :=
   Subset.antisymm (fun x ⟨y, hy, e⟩ => h e ▸ hy) (subset_preimage_image f s)
 #align set.preimage_image_eq Set.preimage_image_eq
@@ -848,12 +542,6 @@ theorem preimage_eq_preimage {f : β → α} (hf : Surjective f) : f ⁻¹' s =
 #align set.preimage_eq_preimage Set.preimage_eq_preimage
 -/
 
-/- warning: set.image_inter_preimage -> Set.image_inter_preimage is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β) (s : Set.{u1} α) (t : Set.{u2} β), Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β f (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) s (Set.preimage.{u1, u2} α β f t))) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (Set.image.{u1, u2} α β f s) t)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β) (s : Set.{u2} α) (t : Set.{u1} β), Eq.{succ u1} (Set.{u1} β) (Set.image.{u2, u1} α β f (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) s (Set.preimage.{u2, u1} α β f t))) (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (Set.image.{u2, u1} α β f s) t)
-Case conversion may be inaccurate. Consider using '#align set.image_inter_preimage Set.image_inter_preimageₓ'. -/
 theorem image_inter_preimage (f : α → β) (s : Set α) (t : Set β) :
     f '' (s ∩ f ⁻¹' t) = f '' s ∩ t := by
   apply subset.antisymm
@@ -866,118 +554,52 @@ theorem image_inter_preimage (f : α → β) (s : Set α) (t : Set β) :
     exact ⟨x, ⟨h', h⟩, rfl⟩
 #align set.image_inter_preimage Set.image_inter_preimage
 
-/- warning: set.image_preimage_inter -> Set.image_preimage_inter is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β) (s : Set.{u1} α) (t : Set.{u2} β), Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β f (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (Set.preimage.{u1, u2} α β f t) s)) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) t (Set.image.{u1, u2} α β f s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β) (s : Set.{u2} α) (t : Set.{u1} β), Eq.{succ u1} (Set.{u1} β) (Set.image.{u2, u1} α β f (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) (Set.preimage.{u2, u1} α β f t) s)) (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) t (Set.image.{u2, u1} α β f s))
-Case conversion may be inaccurate. Consider using '#align set.image_preimage_inter Set.image_preimage_interₓ'. -/
 theorem image_preimage_inter (f : α → β) (s : Set α) (t : Set β) :
     f '' (f ⁻¹' t ∩ s) = t ∩ f '' s := by simp only [inter_comm, image_inter_preimage]
 #align set.image_preimage_inter Set.image_preimage_inter
 
-/- warning: set.image_inter_nonempty_iff -> Set.image_inter_nonempty_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u1} α} {t : Set.{u2} β}, Iff (Set.Nonempty.{u2} β (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (Set.image.{u1, u2} α β f s) t)) (Set.Nonempty.{u1} α (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) s (Set.preimage.{u1, u2} α β f t)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {s : Set.{u2} α} {t : Set.{u1} β}, Iff (Set.Nonempty.{u1} β (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (Set.image.{u2, u1} α β f s) t)) (Set.Nonempty.{u2} α (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) s (Set.preimage.{u2, u1} α β f t)))
-Case conversion may be inaccurate. Consider using '#align set.image_inter_nonempty_iff Set.image_inter_nonempty_iffₓ'. -/
 @[simp]
 theorem image_inter_nonempty_iff {f : α → β} {s : Set α} {t : Set β} :
     (f '' s ∩ t).Nonempty ↔ (s ∩ f ⁻¹' t).Nonempty := by
   rw [← image_inter_preimage, nonempty_image_iff]
 #align set.image_inter_nonempty_iff Set.image_inter_nonempty_iff
 
-/- warning: set.image_diff_preimage -> Set.image_diff_preimage is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u1} α} {t : Set.{u2} β}, Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β f (SDiff.sdiff.{u1} (Set.{u1} α) (BooleanAlgebra.toHasSdiff.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s (Set.preimage.{u1, u2} α β f t))) (SDiff.sdiff.{u2} (Set.{u2} β) (BooleanAlgebra.toHasSdiff.{u2} (Set.{u2} β) (Set.booleanAlgebra.{u2} β)) (Set.image.{u1, u2} α β f s) t)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {s : Set.{u2} α} {t : Set.{u1} β}, Eq.{succ u1} (Set.{u1} β) (Set.image.{u2, u1} α β f (SDiff.sdiff.{u2} (Set.{u2} α) (Set.instSDiffSet.{u2} α) s (Set.preimage.{u2, u1} α β f t))) (SDiff.sdiff.{u1} (Set.{u1} β) (Set.instSDiffSet.{u1} β) (Set.image.{u2, u1} α β f s) t)
-Case conversion may be inaccurate. Consider using '#align set.image_diff_preimage Set.image_diff_preimageₓ'. -/
 theorem image_diff_preimage {f : α → β} {s : Set α} {t : Set β} : f '' (s \ f ⁻¹' t) = f '' s \ t :=
   by simp_rw [diff_eq, ← preimage_compl, image_inter_preimage]
 #align set.image_diff_preimage Set.image_diff_preimage
 
-/- warning: set.compl_image -> Set.compl_image is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}}, Eq.{succ u1} ((Set.{u1} (Set.{u1} α)) -> (Set.{u1} (Set.{u1} α))) (Set.image.{u1, u1} (Set.{u1} α) (Set.{u1} α) (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)))) (Set.preimage.{u1, u1} (Set.{u1} α) (Set.{u1} α) (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α))))
-but is expected to have type
-  forall {α : Type.{u1}}, Eq.{succ u1} ((Set.{u1} (Set.{u1} α)) -> (Set.{u1} (Set.{u1} α))) (Set.image.{u1, u1} (Set.{u1} α) (Set.{u1} α) (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.instBooleanAlgebraSet.{u1} α)))) (Set.preimage.{u1, u1} (Set.{u1} α) (Set.{u1} α) (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.instBooleanAlgebraSet.{u1} α))))
-Case conversion may be inaccurate. Consider using '#align set.compl_image Set.compl_imageₓ'. -/
 theorem compl_image : image (compl : Set α → Set α) = preimage compl :=
   image_eq_preimage_of_inverse compl_compl compl_compl
 #align set.compl_image Set.compl_image
 
-/- warning: set.compl_image_set_of -> Set.compl_image_set_of is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {p : (Set.{u1} α) -> Prop}, Eq.{succ u1} (Set.{u1} (Set.{u1} α)) (Set.image.{u1, u1} (Set.{u1} α) (Set.{u1} α) (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α))) (setOf.{u1} (Set.{u1} α) (fun (s : Set.{u1} α) => p s))) (setOf.{u1} (Set.{u1} α) (fun (s : Set.{u1} α) => p (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s)))
-but is expected to have type
-  forall {α : Type.{u1}} {p : (Set.{u1} α) -> Prop}, Eq.{succ u1} (Set.{u1} (Set.{u1} α)) (Set.image.{u1, u1} (Set.{u1} α) (Set.{u1} α) (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.instBooleanAlgebraSet.{u1} α))) (setOf.{u1} (Set.{u1} α) (fun (s : Set.{u1} α) => p s))) (setOf.{u1} (Set.{u1} α) (fun (s : Set.{u1} α) => p (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.instBooleanAlgebraSet.{u1} α)) s)))
-Case conversion may be inaccurate. Consider using '#align set.compl_image_set_of Set.compl_image_set_ofₓ'. -/
 theorem compl_image_set_of {p : Set α → Prop} : compl '' { s | p s } = { s | p (sᶜ) } :=
   congr_fun compl_image p
 #align set.compl_image_set_of Set.compl_image_set_of
 
-/- warning: set.inter_preimage_subset -> Set.inter_preimage_subset is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (s : Set.{u1} α) (t : Set.{u2} β) (f : α -> β), HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) s (Set.preimage.{u1, u2} α β f t)) (Set.preimage.{u1, u2} α β f (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (Set.image.{u1, u2} α β f s) t))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (s : Set.{u2} α) (t : Set.{u1} β) (f : α -> β), HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) s (Set.preimage.{u2, u1} α β f t)) (Set.preimage.{u2, u1} α β f (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (Set.image.{u2, u1} α β f s) t))
-Case conversion may be inaccurate. Consider using '#align set.inter_preimage_subset Set.inter_preimage_subsetₓ'. -/
 theorem inter_preimage_subset (s : Set α) (t : Set β) (f : α → β) :
     s ∩ f ⁻¹' t ⊆ f ⁻¹' (f '' s ∩ t) := fun x h => ⟨mem_image_of_mem _ h.left, h.right⟩
 #align set.inter_preimage_subset Set.inter_preimage_subset
 
-/- warning: set.union_preimage_subset -> Set.union_preimage_subset is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (s : Set.{u1} α) (t : Set.{u2} β) (f : α -> β), HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) (Union.union.{u1} (Set.{u1} α) (Set.hasUnion.{u1} α) s (Set.preimage.{u1, u2} α β f t)) (Set.preimage.{u1, u2} α β f (Union.union.{u2} (Set.{u2} β) (Set.hasUnion.{u2} β) (Set.image.{u1, u2} α β f s) t))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (s : Set.{u2} α) (t : Set.{u1} β) (f : α -> β), HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) (Union.union.{u2} (Set.{u2} α) (Set.instUnionSet.{u2} α) s (Set.preimage.{u2, u1} α β f t)) (Set.preimage.{u2, u1} α β f (Union.union.{u1} (Set.{u1} β) (Set.instUnionSet.{u1} β) (Set.image.{u2, u1} α β f s) t))
-Case conversion may be inaccurate. Consider using '#align set.union_preimage_subset Set.union_preimage_subsetₓ'. -/
 theorem union_preimage_subset (s : Set α) (t : Set β) (f : α → β) :
     s ∪ f ⁻¹' t ⊆ f ⁻¹' (f '' s ∪ t) := fun x h =>
   Or.elim h (fun l => Or.inl <| mem_image_of_mem _ l) fun r => Or.inr r
 #align set.union_preimage_subset Set.union_preimage_subset
 
-/- warning: set.subset_image_union -> Set.subset_image_union is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β) (s : Set.{u1} α) (t : Set.{u2} β), HasSubset.Subset.{u2} (Set.{u2} β) (Set.hasSubset.{u2} β) (Set.image.{u1, u2} α β f (Union.union.{u1} (Set.{u1} α) (Set.hasUnion.{u1} α) s (Set.preimage.{u1, u2} α β f t))) (Union.union.{u2} (Set.{u2} β) (Set.hasUnion.{u2} β) (Set.image.{u1, u2} α β f s) t)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β) (s : Set.{u2} α) (t : Set.{u1} β), HasSubset.Subset.{u1} (Set.{u1} β) (Set.instHasSubsetSet.{u1} β) (Set.image.{u2, u1} α β f (Union.union.{u2} (Set.{u2} α) (Set.instUnionSet.{u2} α) s (Set.preimage.{u2, u1} α β f t))) (Union.union.{u1} (Set.{u1} β) (Set.instUnionSet.{u1} β) (Set.image.{u2, u1} α β f s) t)
-Case conversion may be inaccurate. Consider using '#align set.subset_image_union Set.subset_image_unionₓ'. -/
 theorem subset_image_union (f : α → β) (s : Set α) (t : Set β) : f '' (s ∪ f ⁻¹' t) ⊆ f '' s ∪ t :=
   image_subset_iff.2 (union_preimage_subset _ _ _)
 #align set.subset_image_union Set.subset_image_union
 
-/- warning: set.preimage_subset_iff -> Set.preimage_subset_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {A : Set.{u1} α} {B : Set.{u2} β} {f : α -> β}, Iff (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) (Set.preimage.{u1, u2} α β f B) A) (forall (a : α), (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) (f a) B) -> (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) a A))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {A : Set.{u2} α} {B : Set.{u1} β} {f : α -> β}, Iff (HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) (Set.preimage.{u2, u1} α β f B) A) (forall (a : α), (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) (f a) B) -> (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) a A))
-Case conversion may be inaccurate. Consider using '#align set.preimage_subset_iff Set.preimage_subset_iffₓ'. -/
 theorem preimage_subset_iff {A : Set α} {B : Set β} {f : α → β} :
     f ⁻¹' B ⊆ A ↔ ∀ a : α, f a ∈ B → a ∈ A :=
   Iff.rfl
 #align set.preimage_subset_iff Set.preimage_subset_iff
 
-/- warning: set.image_eq_image -> Set.image_eq_image is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {s : Set.{u1} α} {t : Set.{u1} α} {f : α -> β}, (Function.Injective.{succ u1, succ u2} α β f) -> (Iff (Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β f s) (Set.image.{u1, u2} α β f t)) (Eq.{succ u1} (Set.{u1} α) s t))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {s : Set.{u2} α} {t : Set.{u2} α} {f : α -> β}, (Function.Injective.{succ u2, succ u1} α β f) -> (Iff (Eq.{succ u1} (Set.{u1} β) (Set.image.{u2, u1} α β f s) (Set.image.{u2, u1} α β f t)) (Eq.{succ u2} (Set.{u2} α) s t))
-Case conversion may be inaccurate. Consider using '#align set.image_eq_image Set.image_eq_imageₓ'. -/
 theorem image_eq_image {f : α → β} (hf : Injective f) : f '' s = f '' t ↔ s = t :=
   Iff.symm <|
     Iff.intro (fun eq => Eq ▸ rfl) fun eq => by
       rw [← preimage_image_eq s hf, ← preimage_image_eq t hf, Eq]
 #align set.image_eq_image Set.image_eq_image
 
-/- warning: set.image_subset_image_iff -> Set.image_subset_image_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {s : Set.{u1} α} {t : Set.{u1} α} {f : α -> β}, (Function.Injective.{succ u1, succ u2} α β f) -> (Iff (HasSubset.Subset.{u2} (Set.{u2} β) (Set.hasSubset.{u2} β) (Set.image.{u1, u2} α β f s) (Set.image.{u1, u2} α β f t)) (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) s t))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {s : Set.{u2} α} {t : Set.{u2} α} {f : α -> β}, (Function.Injective.{succ u2, succ u1} α β f) -> (Iff (HasSubset.Subset.{u1} (Set.{u1} β) (Set.instHasSubsetSet.{u1} β) (Set.image.{u2, u1} α β f s) (Set.image.{u2, u1} α β f t)) (HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) s t))
-Case conversion may be inaccurate. Consider using '#align set.image_subset_image_iff Set.image_subset_image_iffₓ'. -/
 theorem image_subset_image_iff {f : α → β} (hf : Injective f) : f '' s ⊆ f '' t ↔ s ⊆ t :=
   by
   refine' Iff.symm <| Iff.intro (image_subset f) fun h => _
@@ -985,12 +607,6 @@ theorem image_subset_image_iff {f : α → β} (hf : Injective f) : f '' s ⊆ f
   exact preimage_mono h
 #align set.image_subset_image_iff Set.image_subset_image_iff
 
-/- warning: set.prod_quotient_preimage_eq_image -> Set.prod_quotient_preimage_eq_image is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [s : Setoid.{succ u1} α] (g : (Quotient.{succ u1} α s) -> β) {h : α -> β}, (Eq.{max (succ u1) (succ u2)} (α -> β) h (Function.comp.{succ u1, succ u1, succ u2} α (Quotient.{succ u1} α s) β g (Quotient.mk'.{succ u1} α s))) -> (forall (r : Set.{u2} (Prod.{u2, u2} β β)), Eq.{succ u1} (Set.{u1} (Prod.{u1, u1} (Quotient.{succ u1} α s) (Quotient.{succ u1} α s))) (setOf.{u1} (Prod.{u1, u1} (Quotient.{succ u1} α s) (Quotient.{succ u1} α s)) (fun (x : Prod.{u1, u1} (Quotient.{succ u1} α s) (Quotient.{succ u1} α s)) => Membership.Mem.{u2, u2} (Prod.{u2, u2} β β) (Set.{u2} (Prod.{u2, u2} β β)) (Set.hasMem.{u2} (Prod.{u2, u2} β β)) (Prod.mk.{u2, u2} β β (g (Prod.fst.{u1, u1} (Quotient.{succ u1} α s) (Quotient.{succ u1} α s) x)) (g (Prod.snd.{u1, u1} (Quotient.{succ u1} α s) (Quotient.{succ u1} α s) x))) r)) (Set.image.{u1, u1} (Prod.{u1, u1} α α) (Prod.{u1, u1} (Quotient.{succ u1} α s) (Quotient.{succ u1} α s)) (fun (a : Prod.{u1, u1} α α) => Prod.mk.{u1, u1} (Quotient.{succ u1} α s) (Quotient.{succ u1} α s) (Quotient.mk'.{succ u1} α s (Prod.fst.{u1, u1} α α a)) (Quotient.mk'.{succ u1} α s (Prod.snd.{u1, u1} α α a))) (Set.preimage.{u1, u2} (Prod.{u1, u1} α α) (Prod.{u2, u2} β β) (fun (a : Prod.{u1, u1} α α) => Prod.mk.{u2, u2} β β (h (Prod.fst.{u1, u1} α α a)) (h (Prod.snd.{u1, u1} α α a))) r)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [s : Setoid.{succ u2} α] (g : (Quotient.{succ u2} α s) -> β) {h : α -> β}, (Eq.{max (succ u2) (succ u1)} (α -> β) h (Function.comp.{succ u2, succ u2, succ u1} α (Quotient.{succ u2} α s) β g (Quotient.mk''.{succ u2} α s))) -> (forall (r : Set.{u1} (Prod.{u1, u1} β β)), Eq.{succ u2} (Set.{u2} (Prod.{u2, u2} (Quotient.{succ u2} α s) (Quotient.{succ u2} α s))) (setOf.{u2} (Prod.{u2, u2} (Quotient.{succ u2} α s) (Quotient.{succ u2} α s)) (fun (x : Prod.{u2, u2} (Quotient.{succ u2} α s) (Quotient.{succ u2} α s)) => Membership.mem.{u1, u1} (Prod.{u1, u1} β β) (Set.{u1} (Prod.{u1, u1} β β)) (Set.instMembershipSet.{u1} (Prod.{u1, u1} β β)) (Prod.mk.{u1, u1} β β (g (Prod.fst.{u2, u2} (Quotient.{succ u2} α s) (Quotient.{succ u2} α s) x)) (g (Prod.snd.{u2, u2} (Quotient.{succ u2} α s) (Quotient.{succ u2} α s) x))) r)) (Set.image.{u2, u2} (Prod.{u2, u2} α α) (Prod.{u2, u2} (Quotient.{succ u2} α s) (Quotient.{succ u2} α s)) (fun (a : Prod.{u2, u2} α α) => Prod.mk.{u2, u2} (Quotient.{succ u2} α s) (Quotient.{succ u2} α s) (Quotient.mk.{succ u2} α s (Prod.fst.{u2, u2} α α a)) (Quotient.mk.{succ u2} α s (Prod.snd.{u2, u2} α α a))) (Set.preimage.{u2, u1} (Prod.{u2, u2} α α) (Prod.{u1, u1} β β) (fun (a : Prod.{u2, u2} α α) => Prod.mk.{u1, u1} β β (h (Prod.fst.{u2, u2} α α a)) (h (Prod.snd.{u2, u2} α α a))) r)))
-Case conversion may be inaccurate. Consider using '#align set.prod_quotient_preimage_eq_image Set.prod_quotient_preimage_eq_imageₓ'. -/
 theorem prod_quotient_preimage_eq_image [s : Setoid α] (g : Quotient s → β) {h : α → β}
     (Hh : h = g ∘ Quotient.mk') (r : Set (β × β)) :
     { x : Quotient s × Quotient s | (g x.1, g x.2) ∈ r } =
@@ -1003,12 +619,6 @@ theorem prod_quotient_preimage_eq_image [s : Setoid α] (g : Quotient s → β)
           h₃.1 ▸ h₃.2 ▸ h₁⟩
 #align set.prod_quotient_preimage_eq_image Set.prod_quotient_preimage_eq_image
 
-/- warning: set.exists_image_iff -> Set.exists_image_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β) (x : Set.{u1} α) (P : β -> Prop), Iff (Exists.{succ u2} (coeSort.{succ u2, succ (succ u2)} (Set.{u2} β) Type.{u2} (Set.hasCoeToSort.{u2} β) (Set.image.{u1, u2} α β f x)) (fun (a : coeSort.{succ u2, succ (succ u2)} (Set.{u2} β) Type.{u2} (Set.hasCoeToSort.{u2} β) (Set.image.{u1, u2} α β f x)) => P ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (coeSort.{succ u2, succ (succ u2)} (Set.{u2} β) Type.{u2} (Set.hasCoeToSort.{u2} β) (Set.image.{u1, u2} α β f x)) β (HasLiftT.mk.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Set.{u2} β) Type.{u2} (Set.hasCoeToSort.{u2} β) (Set.image.{u1, u2} α β f x)) β (CoeTCₓ.coe.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Set.{u2} β) Type.{u2} (Set.hasCoeToSort.{u2} β) (Set.image.{u1, u2} α β f x)) β (coeBase.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Set.{u2} β) Type.{u2} (Set.hasCoeToSort.{u2} β) (Set.image.{u1, u2} α β f x)) β (coeSubtype.{succ u2} β (fun (x_1 : β) => Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) x_1 (Set.image.{u1, u2} α β f x)))))) a))) (Exists.{succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) x) (fun (a : coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) x) => P (f ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) x) α (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) x) α (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) x) α (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) x) α (coeSubtype.{succ u1} α (fun (x_1 : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x_1 x))))) a))))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β) (x : Set.{u2} α) (P : β -> Prop), Iff (Exists.{succ u1} (Set.Elem.{u1} β (Set.image.{u2, u1} α β f x)) (fun (a : Set.Elem.{u1} β (Set.image.{u2, u1} α β f x)) => P (Subtype.val.{succ u1} β (fun (x_1 : β) => Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) x_1 (Set.image.{u2, u1} α β f x)) a))) (Exists.{succ u2} (Set.Elem.{u2} α x) (fun (a : Set.Elem.{u2} α x) => P (f (Subtype.val.{succ u2} α (fun (x_1 : α) => Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x_1 x) a))))
-Case conversion may be inaccurate. Consider using '#align set.exists_image_iff Set.exists_image_iffₓ'. -/
 theorem exists_image_iff (f : α → β) (x : Set α) (P : β → Prop) :
     (∃ a : f '' x, P a) ↔ ∃ a : x, P (f a) :=
   ⟨fun ⟨a, h⟩ => ⟨⟨_, a.Prop.choose_spec.1⟩, a.Prop.choose_spec.2.symm ▸ h⟩, fun ⟨a, h⟩ =>
@@ -1022,23 +632,11 @@ def imageFactorization (f : α → β) (s : Set α) : s → f '' s := fun p =>
 #align set.image_factorization Set.imageFactorization
 -/
 
-/- warning: set.image_factorization_eq -> Set.imageFactorization_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u1} α}, Eq.{max (succ u1) (succ u2)} ((coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) -> β) (Function.comp.{succ u1, succ u2, succ u2} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) (Subtype.{succ u2} β (fun (x : β) => Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) x (Set.image.{u1, u2} α β f s))) β (Subtype.val.{succ u2} β (fun (x : β) => Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) x (Set.image.{u1, u2} α β f s))) (Set.imageFactorization.{u1, u2} α β f s)) (Function.comp.{succ u1, succ u1, succ u2} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α β f (Subtype.val.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {s : Set.{u2} α}, Eq.{max (succ u2) (succ u1)} ((Set.Elem.{u2} α s) -> β) (Function.comp.{succ u2, succ u1, succ u1} (Set.Elem.{u2} α s) (Subtype.{succ u1} β (fun (x : β) => Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) x (Set.image.{u2, u1} α β f s))) β (Subtype.val.{succ u1} β (fun (x : β) => Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) x (Set.image.{u2, u1} α β f s))) (Set.imageFactorization.{u2, u1} α β f s)) (Function.comp.{succ u2, succ u2, succ u1} (Subtype.{succ u2} α (fun (x : α) => Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x s)) α β f (Subtype.val.{succ u2} α (fun (x : α) => Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x s)))
-Case conversion may be inaccurate. Consider using '#align set.image_factorization_eq Set.imageFactorization_eqₓ'. -/
 theorem imageFactorization_eq {f : α → β} {s : Set α} :
     Subtype.val ∘ imageFactorization f s = f ∘ Subtype.val :=
   funext fun p => rfl
 #align set.image_factorization_eq Set.imageFactorization_eq
 
-/- warning: set.surjective_onto_image -> Set.surjective_onto_image is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u1} α}, Function.Surjective.{succ u1, succ u2} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) (coeSort.{succ u2, succ (succ u2)} (Set.{u2} β) Type.{u2} (Set.hasCoeToSort.{u2} β) (Set.image.{u1, u2} α β f s)) (Set.imageFactorization.{u1, u2} α β f s)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {s : Set.{u2} α}, Function.Surjective.{succ u2, succ u1} (Set.Elem.{u2} α s) (Set.Elem.{u1} β (Set.image.{u2, u1} α β f s)) (Set.imageFactorization.{u2, u1} α β f s)
-Case conversion may be inaccurate. Consider using '#align set.surjective_onto_image Set.surjective_onto_imageₓ'. -/
 theorem surjective_onto_image {f : α → β} {s : Set α} : Surjective (imageFactorization f s) :=
   fun ⟨_, ⟨a, ha, rfl⟩⟩ => ⟨⟨a, ha⟩, rfl⟩
 #align set.surjective_onto_image Set.surjective_onto_image
@@ -1063,12 +661,6 @@ end Image
 /-! ### Lemmas about the powerset and image. -/
 
 
-/- warning: set.powerset_insert -> Set.powerset_insert is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} (s : Set.{u1} α) (a : α), Eq.{succ u1} (Set.{u1} (Set.{u1} α)) (Set.powerset.{u1} α (Insert.insert.{u1, u1} α (Set.{u1} α) (Set.hasInsert.{u1} α) a s)) (Union.union.{u1} (Set.{u1} (Set.{u1} α)) (Set.hasUnion.{u1} (Set.{u1} α)) (Set.powerset.{u1} α s) (Set.image.{u1, u1} (Set.{u1} α) (Set.{u1} α) (Insert.insert.{u1, u1} α (Set.{u1} α) (Set.hasInsert.{u1} α) a) (Set.powerset.{u1} α s)))
-but is expected to have type
-  forall {α : Type.{u1}} (s : Set.{u1} α) (a : α), Eq.{succ u1} (Set.{u1} (Set.{u1} α)) (Set.powerset.{u1} α (Insert.insert.{u1, u1} α (Set.{u1} α) (Set.instInsertSet.{u1} α) a s)) (Union.union.{u1} (Set.{u1} (Set.{u1} α)) (Set.instUnionSet.{u1} (Set.{u1} α)) (Set.powerset.{u1} α s) (Set.image.{u1, u1} (Set.{u1} α) (Set.{u1} α) (Insert.insert.{u1, u1} α (Set.{u1} α) (Set.instInsertSet.{u1} α) a) (Set.powerset.{u1} α s)))
-Case conversion may be inaccurate. Consider using '#align set.powerset_insert Set.powerset_insertₓ'. -/
 /-- The powerset of `{a} ∪ s` is `𝒫 s` together with `{a} ∪ t` for each `t ∈ 𝒫 s`. -/
 theorem powerset_insert (s : Set α) (a : α) : 𝒫 insert a s = 𝒫 s ∪ insert a '' 𝒫 s :=
   by
@@ -1106,94 +698,40 @@ def range (f : ι → α) : Set α :=
 #align set.range Set.range
 -/
 
-/- warning: set.mem_range -> Set.mem_range is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {ι : Sort.{u2}} {f : ι -> α} {x : α}, Iff (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x (Set.range.{u1, u2} α ι f)) (Exists.{u2} ι (fun (y : ι) => Eq.{succ u1} α (f y) x))
-but is expected to have type
-  forall {α : Type.{u2}} {ι : Sort.{u1}} {f : ι -> α} {x : α}, Iff (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x (Set.range.{u2, u1} α ι f)) (Exists.{u1} ι (fun (y : ι) => Eq.{succ u2} α (f y) x))
-Case conversion may be inaccurate. Consider using '#align set.mem_range Set.mem_rangeₓ'. -/
 @[simp]
 theorem mem_range {x : α} : x ∈ range f ↔ ∃ y, f y = x :=
   Iff.rfl
 #align set.mem_range Set.mem_range
 
-/- warning: set.mem_range_self -> Set.mem_range_self is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {ι : Sort.{u2}} {f : ι -> α} (i : ι), Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) (f i) (Set.range.{u1, u2} α ι f)
-but is expected to have type
-  forall {α : Type.{u2}} {ι : Sort.{u1}} {f : ι -> α} (i : ι), Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) (f i) (Set.range.{u2, u1} α ι f)
-Case conversion may be inaccurate. Consider using '#align set.mem_range_self Set.mem_range_selfₓ'. -/
 @[simp]
 theorem mem_range_self (i : ι) : f i ∈ range f :=
   ⟨i, rfl⟩
 #align set.mem_range_self Set.mem_range_self
 
-/- warning: set.forall_range_iff -> Set.forall_range_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {ι : Sort.{u2}} {f : ι -> α} {p : α -> Prop}, Iff (forall (a : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) a (Set.range.{u1, u2} α ι f)) -> (p a)) (forall (i : ι), p (f i))
-but is expected to have type
-  forall {α : Type.{u2}} {ι : Sort.{u1}} {f : ι -> α} {p : α -> Prop}, Iff (forall (a : α), (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) a (Set.range.{u2, u1} α ι f)) -> (p a)) (forall (i : ι), p (f i))
-Case conversion may be inaccurate. Consider using '#align set.forall_range_iff Set.forall_range_iffₓ'. -/
 theorem forall_range_iff {p : α → Prop} : (∀ a ∈ range f, p a) ↔ ∀ i, p (f i) := by simp
 #align set.forall_range_iff Set.forall_range_iff
 
-/- warning: set.forall_subtype_range_iff -> Set.forall_subtype_range_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {ι : Sort.{u2}} {f : ι -> α} {p : (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) (Set.range.{u1, u2} α ι f)) -> Prop}, Iff (forall (a : coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) (Set.range.{u1, u2} α ι f)), p a) (forall (i : ι), p (Subtype.mk.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x (Set.range.{u1, u2} α ι f)) (f i) (Set.mem_range_self.{u1, u2} α ι f i)))
-but is expected to have type
-  forall {α : Type.{u2}} {ι : Sort.{u1}} {f : ι -> α} {p : (Set.Elem.{u2} α (Set.range.{u2, u1} α ι f)) -> Prop}, Iff (forall (a : Set.Elem.{u2} α (Set.range.{u2, u1} α ι f)), p a) (forall (i : ι), p (Subtype.mk.{succ u2} α (fun (x : α) => Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x (Set.range.{u2, u1} α ι f)) (f i) (Set.mem_range_self.{u1, u2} α ι f i)))
-Case conversion may be inaccurate. Consider using '#align set.forall_subtype_range_iff Set.forall_subtype_range_iffₓ'. -/
 theorem forall_subtype_range_iff {p : range f → Prop} :
     (∀ a : range f, p a) ↔ ∀ i, p ⟨f i, mem_range_self _⟩ :=
   ⟨fun H i => H _, fun H ⟨y, i, hi⟩ => by subst hi; apply H⟩
 #align set.forall_subtype_range_iff Set.forall_subtype_range_iff
 
-/- warning: set.exists_range_iff -> Set.exists_range_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {ι : Sort.{u2}} {f : ι -> α} {p : α -> Prop}, Iff (Exists.{succ u1} α (fun (a : α) => Exists.{0} (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) a (Set.range.{u1, u2} α ι f)) (fun (H : Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) a (Set.range.{u1, u2} α ι f)) => p a))) (Exists.{u2} ι (fun (i : ι) => p (f i)))
-but is expected to have type
-  forall {α : Type.{u2}} {ι : Sort.{u1}} {f : ι -> α} {p : α -> Prop}, Iff (Exists.{succ u2} α (fun (a : α) => And (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) a (Set.range.{u2, u1} α ι f)) (p a))) (Exists.{u1} ι (fun (i : ι) => p (f i)))
-Case conversion may be inaccurate. Consider using '#align set.exists_range_iff Set.exists_range_iffₓ'. -/
 theorem exists_range_iff {p : α → Prop} : (∃ a ∈ range f, p a) ↔ ∃ i, p (f i) := by simp
 #align set.exists_range_iff Set.exists_range_iff
 
-/- warning: set.exists_range_iff' -> Set.exists_range_iff' is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {ι : Sort.{u2}} {f : ι -> α} {p : α -> Prop}, Iff (Exists.{succ u1} α (fun (a : α) => And (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) a (Set.range.{u1, u2} α ι f)) (p a))) (Exists.{u2} ι (fun (i : ι) => p (f i)))
-but is expected to have type
-  forall {α : Type.{u2}} {ι : Sort.{u1}} {f : ι -> α} {p : α -> Prop}, Iff (Exists.{succ u2} α (fun (a : α) => And (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) a (Set.range.{u2, u1} α ι f)) (p a))) (Exists.{u1} ι (fun (i : ι) => p (f i)))
-Case conversion may be inaccurate. Consider using '#align set.exists_range_iff' Set.exists_range_iff'ₓ'. -/
 theorem exists_range_iff' {p : α → Prop} : (∃ a, a ∈ range f ∧ p a) ↔ ∃ i, p (f i) := by
   simpa only [exists_prop] using exists_range_iff
 #align set.exists_range_iff' Set.exists_range_iff'
 
-/- warning: set.exists_subtype_range_iff -> Set.exists_subtype_range_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {ι : Sort.{u2}} {f : ι -> α} {p : (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) (Set.range.{u1, u2} α ι f)) -> Prop}, Iff (Exists.{succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) (Set.range.{u1, u2} α ι f)) (fun (a : coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) (Set.range.{u1, u2} α ι f)) => p a)) (Exists.{u2} ι (fun (i : ι) => p (Subtype.mk.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x (Set.range.{u1, u2} α ι f)) (f i) (Set.mem_range_self.{u1, u2} α ι f i))))
-but is expected to have type
-  forall {α : Type.{u2}} {ι : Sort.{u1}} {f : ι -> α} {p : (Set.Elem.{u2} α (Set.range.{u2, u1} α ι f)) -> Prop}, Iff (Exists.{succ u2} (Set.Elem.{u2} α (Set.range.{u2, u1} α ι f)) (fun (a : Set.Elem.{u2} α (Set.range.{u2, u1} α ι f)) => p a)) (Exists.{u1} ι (fun (i : ι) => p (Subtype.mk.{succ u2} α (fun (x : α) => Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x (Set.range.{u2, u1} α ι f)) (f i) (Set.mem_range_self.{u1, u2} α ι f i))))
-Case conversion may be inaccurate. Consider using '#align set.exists_subtype_range_iff Set.exists_subtype_range_iffₓ'. -/
 theorem exists_subtype_range_iff {p : range f → Prop} :
     (∃ a : range f, p a) ↔ ∃ i, p ⟨f i, mem_range_self _⟩ :=
   ⟨fun ⟨⟨a, i, hi⟩, ha⟩ => by subst a; exact ⟨i, ha⟩, fun ⟨i, hi⟩ => ⟨_, hi⟩⟩
 #align set.exists_subtype_range_iff Set.exists_subtype_range_iff
 
-/- warning: set.range_iff_surjective -> Set.range_iff_surjective is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {ι : Sort.{u2}} {f : ι -> α}, Iff (Eq.{succ u1} (Set.{u1} α) (Set.range.{u1, u2} α ι f) (Set.univ.{u1} α)) (Function.Surjective.{u2, succ u1} ι α f)
-but is expected to have type
-  forall {α : Type.{u2}} {ι : Sort.{u1}} {f : ι -> α}, Iff (Eq.{succ u2} (Set.{u2} α) (Set.range.{u2, u1} α ι f) (Set.univ.{u2} α)) (Function.Surjective.{u1, succ u2} ι α f)
-Case conversion may be inaccurate. Consider using '#align set.range_iff_surjective Set.range_iff_surjectiveₓ'. -/
 theorem range_iff_surjective : range f = univ ↔ Surjective f :=
   eq_univ_iff_forall
 #align set.range_iff_surjective Set.range_iff_surjective
 
-/- warning: function.surjective.range_eq -> Function.Surjective.range_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {ι : Sort.{u2}} {f : ι -> α}, (Function.Surjective.{u2, succ u1} ι α f) -> (Eq.{succ u1} (Set.{u1} α) (Set.range.{u1, u2} α ι f) (Set.univ.{u1} α))
-but is expected to have type
-  forall {α : Type.{u2}} {ι : Sort.{u1}} {f : ι -> α}, (Function.Surjective.{u1, succ u2} ι α f) -> (Eq.{succ u2} (Set.{u2} α) (Set.range.{u2, u1} α ι f) (Set.univ.{u2} α))
-Case conversion may be inaccurate. Consider using '#align function.surjective.range_eq Function.Surjective.range_eqₓ'. -/
 alias range_iff_surjective ↔ _ _root_.function.surjective.range_eq
 #align function.surjective.range_eq Function.Surjective.range_eq
 
@@ -1203,22 +741,10 @@ theorem image_univ {f : α → β} : f '' univ = range f := by ext; simp [image,
 #align set.image_univ Set.image_univ
 -/
 
-/- warning: set.image_subset_range -> Set.image_subset_range is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β) (s : Set.{u1} α), HasSubset.Subset.{u2} (Set.{u2} β) (Set.hasSubset.{u2} β) (Set.image.{u1, u2} α β f s) (Set.range.{u2, succ u1} β α f)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β) (s : Set.{u2} α), HasSubset.Subset.{u1} (Set.{u1} β) (Set.instHasSubsetSet.{u1} β) (Set.image.{u2, u1} α β f s) (Set.range.{u1, succ u2} β α f)
-Case conversion may be inaccurate. Consider using '#align set.image_subset_range Set.image_subset_rangeₓ'. -/
 theorem image_subset_range (f : α → β) (s) : f '' s ⊆ range f := by
   rw [← image_univ] <;> exact image_subset _ (subset_univ _)
 #align set.image_subset_range Set.image_subset_range
 
-/- warning: set.mem_range_of_mem_image -> Set.mem_range_of_mem_image is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β) (s : Set.{u1} α) {x : β}, (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) x (Set.image.{u1, u2} α β f s)) -> (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) x (Set.range.{u2, succ u1} β α f))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β) (s : Set.{u2} α) {x : β}, (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) x (Set.image.{u2, u1} α β f s)) -> (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) x (Set.range.{u1, succ u2} β α f))
-Case conversion may be inaccurate. Consider using '#align set.mem_range_of_mem_image Set.mem_range_of_mem_imageₓ'. -/
 theorem mem_range_of_mem_image (f : α → β) (s) {x : β} (h : x ∈ f '' s) : x ∈ range f :=
   image_subset_range f s h
 #align set.mem_range_of_mem_image Set.mem_range_of_mem_image
@@ -1238,23 +764,11 @@ theorem Nonempty.preimage' {s : Set β} (hs : s.Nonempty) {f : α → β} (hf :
 #align set.nonempty.preimage' Set.Nonempty.preimage'
 -/
 
-/- warning: set.range_comp -> Set.range_comp is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {ι : Sort.{u3}} (g : α -> β) (f : ι -> α), Eq.{succ u2} (Set.{u2} β) (Set.range.{u2, u3} β ι (Function.comp.{u3, succ u1, succ u2} ι α β g f)) (Set.image.{u1, u2} α β g (Set.range.{u1, u3} α ι f))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u3}} {ι : Sort.{u2}} (g : α -> β) (f : ι -> α), Eq.{succ u3} (Set.{u3} β) (Set.range.{u3, u2} β ι (Function.comp.{u2, succ u1, succ u3} ι α β g f)) (Set.image.{u1, u3} α β g (Set.range.{u1, u2} α ι f))
-Case conversion may be inaccurate. Consider using '#align set.range_comp Set.range_compₓ'. -/
 theorem range_comp (g : α → β) (f : ι → α) : range (g ∘ f) = g '' range f :=
   Subset.antisymm (forall_range_iff.mpr fun i => mem_image_of_mem g (mem_range_self _))
     (ball_image_iff.mpr <| forall_range_iff.mpr mem_range_self)
 #align set.range_comp Set.range_comp
 
-/- warning: set.range_subset_iff -> Set.range_subset_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {ι : Sort.{u2}} {f : ι -> α} {s : Set.{u1} α}, Iff (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) (Set.range.{u1, u2} α ι f) s) (forall (y : ι), Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) (f y) s)
-but is expected to have type
-  forall {α : Type.{u2}} {ι : Sort.{u1}} {f : ι -> α} {s : Set.{u2} α}, Iff (HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) (Set.range.{u2, u1} α ι f) s) (forall (y : ι), Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) (f y) s)
-Case conversion may be inaccurate. Consider using '#align set.range_subset_iff Set.range_subset_iffₓ'. -/
 theorem range_subset_iff : range f ⊆ s ↔ ∀ y, f y ∈ s :=
   forall_range_iff
 #align set.range_subset_iff Set.range_subset_iff
@@ -1266,22 +780,10 @@ theorem range_eq_iff (f : α → β) (s : Set β) :
 #align set.range_eq_iff Set.range_eq_iff
 -/
 
-/- warning: set.range_comp_subset_range -> Set.range_comp_subset_range is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (f : α -> β) (g : β -> γ), HasSubset.Subset.{u3} (Set.{u3} γ) (Set.hasSubset.{u3} γ) (Set.range.{u3, succ u1} γ α (Function.comp.{succ u1, succ u2, succ u3} α β γ g f)) (Set.range.{u3, succ u2} γ β g)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {γ : Type.{u3}} (f : α -> β) (g : β -> γ), HasSubset.Subset.{u3} (Set.{u3} γ) (Set.instHasSubsetSet.{u3} γ) (Set.range.{u3, succ u2} γ α (Function.comp.{succ u2, succ u1, succ u3} α β γ g f)) (Set.range.{u3, succ u1} γ β g)
-Case conversion may be inaccurate. Consider using '#align set.range_comp_subset_range Set.range_comp_subset_rangeₓ'. -/
 theorem range_comp_subset_range (f : α → β) (g : β → γ) : range (g ∘ f) ⊆ range g := by
   rw [range_comp] <;> apply image_subset_range
 #align set.range_comp_subset_range Set.range_comp_subset_range
 
-/- warning: set.range_nonempty_iff_nonempty -> Set.range_nonempty_iff_nonempty is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {ι : Sort.{u2}} {f : ι -> α}, Iff (Set.Nonempty.{u1} α (Set.range.{u1, u2} α ι f)) (Nonempty.{u2} ι)
-but is expected to have type
-  forall {α : Type.{u2}} {ι : Sort.{u1}} {f : ι -> α}, Iff (Set.Nonempty.{u2} α (Set.range.{u2, u1} α ι f)) (Nonempty.{u1} ι)
-Case conversion may be inaccurate. Consider using '#align set.range_nonempty_iff_nonempty Set.range_nonempty_iff_nonemptyₓ'. -/
 theorem range_nonempty_iff_nonempty : (range f).Nonempty ↔ Nonempty ι :=
   ⟨fun ⟨y, x, hxy⟩ => ⟨x⟩, fun ⟨x⟩ => ⟨f x, mem_range_self x⟩⟩
 #align set.range_nonempty_iff_nonempty Set.range_nonempty_iff_nonempty
@@ -1292,12 +794,6 @@ theorem range_nonempty [h : Nonempty ι] (f : ι → α) : (range f).Nonempty :=
 #align set.range_nonempty Set.range_nonempty
 -/
 
-/- warning: set.range_eq_empty_iff -> Set.range_eq_empty_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {ι : Sort.{u2}} {f : ι -> α}, Iff (Eq.{succ u1} (Set.{u1} α) (Set.range.{u1, u2} α ι f) (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.hasEmptyc.{u1} α))) (IsEmpty.{u2} ι)
-but is expected to have type
-  forall {α : Type.{u2}} {ι : Sort.{u1}} {f : ι -> α}, Iff (Eq.{succ u2} (Set.{u2} α) (Set.range.{u2, u1} α ι f) (EmptyCollection.emptyCollection.{u2} (Set.{u2} α) (Set.instEmptyCollectionSet.{u2} α))) (IsEmpty.{u1} ι)
-Case conversion may be inaccurate. Consider using '#align set.range_eq_empty_iff Set.range_eq_empty_iffₓ'. -/
 @[simp]
 theorem range_eq_empty_iff {f : ι → α} : range f = ∅ ↔ IsEmpty ι := by
   rw [← not_nonempty_iff, ← range_nonempty_iff_nonempty, not_nonempty_iff_eq_empty]
@@ -1312,23 +808,11 @@ theorem range_eq_empty [IsEmpty ι] (f : ι → α) : range f = ∅ :=
 instance [Nonempty ι] (f : ι → α) : Nonempty (range f) :=
   (range_nonempty f).to_subtype
 
-/- warning: set.image_union_image_compl_eq_range -> Set.image_union_image_compl_eq_range is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {s : Set.{u1} α} (f : α -> β), Eq.{succ u2} (Set.{u2} β) (Union.union.{u2} (Set.{u2} β) (Set.hasUnion.{u2} β) (Set.image.{u1, u2} α β f s) (Set.image.{u1, u2} α β f (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s))) (Set.range.{u2, succ u1} β α f)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} {s : Set.{u1} α} (f : α -> β), Eq.{succ u2} (Set.{u2} β) (Union.union.{u2} (Set.{u2} β) (Set.instUnionSet.{u2} β) (Set.image.{u1, u2} α β f s) (Set.image.{u1, u2} α β f (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.instBooleanAlgebraSet.{u1} α)) s))) (Set.range.{u2, succ u1} β α f)
-Case conversion may be inaccurate. Consider using '#align set.image_union_image_compl_eq_range Set.image_union_image_compl_eq_rangeₓ'. -/
 @[simp]
 theorem image_union_image_compl_eq_range (f : α → β) : f '' s ∪ f '' sᶜ = range f := by
   rw [← image_union, ← image_univ, ← union_compl_self]
 #align set.image_union_image_compl_eq_range Set.image_union_image_compl_eq_range
 
-/- warning: set.insert_image_compl_eq_range -> Set.insert_image_compl_eq_range is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β) (x : α), Eq.{succ u2} (Set.{u2} β) (Insert.insert.{u2, u2} β (Set.{u2} β) (Set.hasInsert.{u2} β) (f x) (Set.image.{u1, u2} α β f (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) (Singleton.singleton.{u1, u1} α (Set.{u1} α) (Set.hasSingleton.{u1} α) x)))) (Set.range.{u2, succ u1} β α f)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β) (x : α), Eq.{succ u2} (Set.{u2} β) (Insert.insert.{u2, u2} β (Set.{u2} β) (Set.instInsertSet.{u2} β) (f x) (Set.image.{u1, u2} α β f (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.instBooleanAlgebraSet.{u1} α)) (Singleton.singleton.{u1, u1} α (Set.{u1} α) (Set.instSingletonSet.{u1} α) x)))) (Set.range.{u2, succ u1} β α f)
-Case conversion may be inaccurate. Consider using '#align set.insert_image_compl_eq_range Set.insert_image_compl_eq_rangeₓ'. -/
 theorem insert_image_compl_eq_range (f : α → β) (x : α) : insert (f x) (f '' {x}ᶜ) = range f :=
   by
   ext y; rw [mem_range, mem_insert_iff, mem_image]
@@ -1342,12 +826,6 @@ theorem insert_image_compl_eq_range (f : α → β) (x : α) : insert (f x) (f '
     · right; refine' ⟨_, _, h⟩; rw [mem_compl_singleton_iff]; exact hx
 #align set.insert_image_compl_eq_range Set.insert_image_compl_eq_range
 
-/- warning: set.image_preimage_eq_inter_range -> Set.image_preimage_eq_inter_range is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {t : Set.{u2} β}, Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β f (Set.preimage.{u1, u2} α β f t)) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) t (Set.range.{u2, succ u1} β α f))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {t : Set.{u2} β}, Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β f (Set.preimage.{u1, u2} α β f t)) (Inter.inter.{u2} (Set.{u2} β) (Set.instInterSet.{u2} β) t (Set.range.{u2, succ u1} β α f))
-Case conversion may be inaccurate. Consider using '#align set.image_preimage_eq_inter_range Set.image_preimage_eq_inter_rangeₓ'. -/
 theorem image_preimage_eq_inter_range {f : α → β} {t : Set β} : f '' (f ⁻¹' t) = t ∩ range f :=
   ext fun x =>
     ⟨fun ⟨x, hx, HEq⟩ => HEq ▸ ⟨hx, mem_range_self _⟩, fun ⟨hx, ⟨y, h_eq⟩⟩ =>
@@ -1395,12 +873,6 @@ theorem range_image (f : α → β) : range (image f) = 𝒫 range f :=
 #align set.range_image Set.range_image
 -/
 
-/- warning: set.preimage_subset_preimage_iff -> Set.preimage_subset_preimage_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {s : Set.{u1} α} {t : Set.{u1} α} {f : β -> α}, (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) s (Set.range.{u1, succ u2} α β f)) -> (Iff (HasSubset.Subset.{u2} (Set.{u2} β) (Set.hasSubset.{u2} β) (Set.preimage.{u2, u1} β α f s) (Set.preimage.{u2, u1} β α f t)) (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) s t))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {s : Set.{u2} α} {t : Set.{u2} α} {f : β -> α}, (HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) s (Set.range.{u2, succ u1} α β f)) -> (Iff (HasSubset.Subset.{u1} (Set.{u1} β) (Set.instHasSubsetSet.{u1} β) (Set.preimage.{u1, u2} β α f s) (Set.preimage.{u1, u2} β α f t)) (HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) s t))
-Case conversion may be inaccurate. Consider using '#align set.preimage_subset_preimage_iff Set.preimage_subset_preimage_iffₓ'. -/
 theorem preimage_subset_preimage_iff {s t : Set α} {f : β → α} (hs : s ⊆ range f) :
     f ⁻¹' s ⊆ f ⁻¹' t ↔ s ⊆ t := by
   constructor
@@ -1408,12 +880,6 @@ theorem preimage_subset_preimage_iff {s t : Set α} {f : β → α} (hs : s ⊆
   intro h x; apply h
 #align set.preimage_subset_preimage_iff Set.preimage_subset_preimage_iff
 
-/- warning: set.preimage_eq_preimage' -> Set.preimage_eq_preimage' is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {s : Set.{u1} α} {t : Set.{u1} α} {f : β -> α}, (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) s (Set.range.{u1, succ u2} α β f)) -> (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) t (Set.range.{u1, succ u2} α β f)) -> (Iff (Eq.{succ u2} (Set.{u2} β) (Set.preimage.{u2, u1} β α f s) (Set.preimage.{u2, u1} β α f t)) (Eq.{succ u1} (Set.{u1} α) s t))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {s : Set.{u2} α} {t : Set.{u2} α} {f : β -> α}, (HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) s (Set.range.{u2, succ u1} α β f)) -> (HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) t (Set.range.{u2, succ u1} α β f)) -> (Iff (Eq.{succ u1} (Set.{u1} β) (Set.preimage.{u1, u2} β α f s) (Set.preimage.{u1, u2} β α f t)) (Eq.{succ u2} (Set.{u2} α) s t))
-Case conversion may be inaccurate. Consider using '#align set.preimage_eq_preimage' Set.preimage_eq_preimage'ₓ'. -/
 theorem preimage_eq_preimage' {s t : Set α} {f : β → α} (hs : s ⊆ range f) (ht : t ⊆ range f) :
     f ⁻¹' s = f ⁻¹' t ↔ s = t := by
   constructor
@@ -1422,23 +888,11 @@ theorem preimage_eq_preimage' {s t : Set α} {f : β → α} (hs : s ⊆ range f
   rintro rfl; rfl
 #align set.preimage_eq_preimage' Set.preimage_eq_preimage'
 
-/- warning: set.preimage_inter_range -> Set.preimage_inter_range is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u2} β}, Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u2} α β f (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) s (Set.range.{u2, succ u1} β α f))) (Set.preimage.{u1, u2} α β f s)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u2} β}, Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u2} α β f (Inter.inter.{u2} (Set.{u2} β) (Set.instInterSet.{u2} β) s (Set.range.{u2, succ u1} β α f))) (Set.preimage.{u1, u2} α β f s)
-Case conversion may be inaccurate. Consider using '#align set.preimage_inter_range Set.preimage_inter_rangeₓ'. -/
 @[simp]
 theorem preimage_inter_range {f : α → β} {s : Set β} : f ⁻¹' (s ∩ range f) = f ⁻¹' s :=
   Set.ext fun x => and_iff_left ⟨x, rfl⟩
 #align set.preimage_inter_range Set.preimage_inter_range
 
-/- warning: set.preimage_range_inter -> Set.preimage_range_inter is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u2} β}, Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u2} α β f (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (Set.range.{u2, succ u1} β α f) s)) (Set.preimage.{u1, u2} α β f s)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u2} β}, Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u2} α β f (Inter.inter.{u2} (Set.{u2} β) (Set.instInterSet.{u2} β) (Set.range.{u2, succ u1} β α f) s)) (Set.preimage.{u1, u2} α β f s)
-Case conversion may be inaccurate. Consider using '#align set.preimage_range_inter Set.preimage_range_interₓ'. -/
 @[simp]
 theorem preimage_range_inter {f : α → β} {s : Set β} : f ⁻¹' (range f ∩ s) = f ⁻¹' s := by
   rw [inter_comm, preimage_inter_range]
@@ -1471,97 +925,43 @@ theorem Prod.range_fst [Nonempty β] : range (Prod.fst : α × β → α) = univ
 #align prod.range_fst Prod.range_fst
 -/
 
-/- warning: prod.range_snd -> Prod.range_snd is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Nonempty.{succ u1} α], Eq.{succ u2} (Set.{u2} β) (Set.range.{u2, max (succ u1) (succ u2)} β (Prod.{u1, u2} α β) (Prod.snd.{u1, u2} α β)) (Set.univ.{u2} β)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : Nonempty.{succ u2} α], Eq.{succ u1} (Set.{u1} β) (Set.range.{u1, max (succ u2) (succ u1)} β (Prod.{u2, u1} α β) (Prod.snd.{u2, u1} α β)) (Set.univ.{u1} β)
-Case conversion may be inaccurate. Consider using '#align prod.range_snd Prod.range_sndₓ'. -/
 @[simp]
 theorem Prod.range_snd [Nonempty α] : range (Prod.snd : α × β → β) = univ :=
   Prod.snd_surjective.range_eq
 #align prod.range_snd Prod.range_snd
 
-/- warning: set.range_eval -> Set.range_eval is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : forall (i : ι), Nonempty.{succ u2} (α i)] (i : ι), Eq.{succ u2} (Set.{u2} (α i)) (Set.range.{u2, max (succ u1) (succ u2)} (α i) (forall (x : ι), α x) (Function.eval.{succ u1, succ u2} ι (fun (i : ι) => α i) i)) (Set.univ.{u2} (α i))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : forall (i : ι), Nonempty.{succ u1} (α i)] (i : ι), Eq.{succ u1} (Set.{u1} (α i)) (Set.range.{u1, max (succ u2) (succ u1)} (α i) (forall (x : ι), α x) (Function.eval.{succ u2, succ u1} ι (fun (i : ι) => α i) i)) (Set.univ.{u1} (α i))
-Case conversion may be inaccurate. Consider using '#align set.range_eval Set.range_evalₓ'. -/
 @[simp]
 theorem range_eval {ι : Type _} {α : ι → Sort _} [∀ i, Nonempty (α i)] (i : ι) :
     range (eval i : (∀ i, α i) → α i) = univ :=
   (surjective_eval i).range_eq
 #align set.range_eval Set.range_eval
 
-/- warning: set.range_inl -> Set.range_inl is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}}, Eq.{succ (max u1 u2)} (Set.{max u1 u2} (Sum.{u1, u2} α β)) (Set.range.{max u1 u2, succ u1} (Sum.{u1, u2} α β) α (Sum.inl.{u1, u2} α β)) (setOf.{max u1 u2} (Sum.{u1, u2} α β) (fun (x : Sum.{u1, u2} α β) => coeSort.{1, 1} Bool Prop coeSortBool (Sum.isLeft.{u1, u2} α β x)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}}, Eq.{max (succ u2) (succ u1)} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (Set.range.{max u2 u1, succ u2} (Sum.{u2, u1} α β) α (Sum.inl.{u2, u1} α β)) (setOf.{max u1 u2} (Sum.{u2, u1} α β) (fun (x : Sum.{u2, u1} α β) => Eq.{1} Bool (Sum.isLeft.{u2, u1} α β x) Bool.true))
-Case conversion may be inaccurate. Consider using '#align set.range_inl Set.range_inlₓ'. -/
 theorem range_inl : range (@Sum.inl α β) = { x | x.isLeft } := by ext (_ | _) <;> simp
 #align set.range_inl Set.range_inl
 
-/- warning: set.range_inr -> Set.range_inr is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}}, Eq.{succ (max u1 u2)} (Set.{max u1 u2} (Sum.{u1, u2} α β)) (Set.range.{max u1 u2, succ u2} (Sum.{u1, u2} α β) β (Sum.inr.{u1, u2} α β)) (setOf.{max u1 u2} (Sum.{u1, u2} α β) (fun (x : Sum.{u1, u2} α β) => coeSort.{1, 1} Bool Prop coeSortBool (Sum.isRight.{u1, u2} α β x)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}}, Eq.{max (succ u2) (succ u1)} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (Set.range.{max u2 u1, succ u1} (Sum.{u2, u1} α β) β (Sum.inr.{u2, u1} α β)) (setOf.{max u1 u2} (Sum.{u2, u1} α β) (fun (x : Sum.{u2, u1} α β) => Eq.{1} Bool (Sum.isRight.{u2, u1} α β x) Bool.true))
-Case conversion may be inaccurate. Consider using '#align set.range_inr Set.range_inrₓ'. -/
 theorem range_inr : range (@Sum.inr α β) = { x | x.isRight } := by ext (_ | _) <;> simp
 #align set.range_inr Set.range_inr
 
-/- warning: set.is_compl_range_inl_range_inr -> Set.isCompl_range_inl_range_inr is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}}, IsCompl.{max u1 u2} (Set.{max u1 u2} (Sum.{u1, u2} α β)) (SemilatticeInf.toPartialOrder.{max u1 u2} (Set.{max u1 u2} (Sum.{u1, u2} α β)) (Lattice.toSemilatticeInf.{max u1 u2} (Set.{max u1 u2} (Sum.{u1, u2} α β)) (GeneralizedCoheytingAlgebra.toLattice.{max u1 u2} (Set.{max u1 u2} (Sum.{u1, u2} α β)) (GeneralizedBooleanAlgebra.toGeneralizedCoheytingAlgebra.{max u1 u2} (Set.{max u1 u2} (Sum.{u1, u2} α β)) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{max u1 u2} (Set.{max u1 u2} (Sum.{u1, u2} α β)) (Set.booleanAlgebra.{max u1 u2} (Sum.{u1, u2} α β))))))) (BooleanAlgebra.toBoundedOrder.{max u1 u2} (Set.{max u1 u2} (Sum.{u1, u2} α β)) (Set.booleanAlgebra.{max u1 u2} (Sum.{u1, u2} α β))) (Set.range.{max u1 u2, succ u1} (Sum.{u1, u2} α β) α (Sum.inl.{u1, u2} α β)) (Set.range.{max u1 u2, succ u2} (Sum.{u1, u2} α β) β (Sum.inr.{u1, u2} α β))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}}, IsCompl.{max u2 u1} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (SemilatticeInf.toPartialOrder.{max u2 u1} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (Lattice.toSemilatticeInf.{max u2 u1} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (GeneralizedCoheytingAlgebra.toLattice.{max u2 u1} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (CoheytingAlgebra.toGeneralizedCoheytingAlgebra.{max u2 u1} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (BiheytingAlgebra.toCoheytingAlgebra.{max u2 u1} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (BooleanAlgebra.toBiheytingAlgebra.{max u2 u1} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (Set.instBooleanAlgebraSet.{max u2 u1} (Sum.{u2, u1} α β)))))))) (BooleanAlgebra.toBoundedOrder.{max u2 u1} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (Set.instBooleanAlgebraSet.{max u2 u1} (Sum.{u2, u1} α β))) (Set.range.{max u2 u1, succ u2} (Sum.{u2, u1} α β) α (Sum.inl.{u2, u1} α β)) (Set.range.{max u2 u1, succ u1} (Sum.{u2, u1} α β) β (Sum.inr.{u2, u1} α β))
-Case conversion may be inaccurate. Consider using '#align set.is_compl_range_inl_range_inr Set.isCompl_range_inl_range_inrₓ'. -/
 theorem isCompl_range_inl_range_inr : IsCompl (range <| @Sum.inl α β) (range Sum.inr) :=
   IsCompl.of_le (by rintro y ⟨⟨x₁, rfl⟩, ⟨x₂, _⟩⟩; cc)
     (by rintro (x | y) - <;> [left;right] <;> exact mem_range_self _)
 #align set.is_compl_range_inl_range_inr Set.isCompl_range_inl_range_inr
 
-/- warning: set.range_inl_union_range_inr -> Set.range_inl_union_range_inr is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}}, Eq.{succ (max u1 u2)} (Set.{max u1 u2} (Sum.{u1, u2} α β)) (Union.union.{max u1 u2} (Set.{max u1 u2} (Sum.{u1, u2} α β)) (Set.hasUnion.{max u1 u2} (Sum.{u1, u2} α β)) (Set.range.{max u1 u2, succ u1} (Sum.{u1, u2} α β) α (Sum.inl.{u1, u2} α β)) (Set.range.{max u1 u2, succ u2} (Sum.{u1, u2} α β) β (Sum.inr.{u1, u2} α β))) (Set.univ.{max u1 u2} (Sum.{u1, u2} α β))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}}, Eq.{max (succ u2) (succ u1)} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (Union.union.{max u2 u1} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (Set.instUnionSet.{max u2 u1} (Sum.{u2, u1} α β)) (Set.range.{max u2 u1, succ u2} (Sum.{u2, u1} α β) α (Sum.inl.{u2, u1} α β)) (Set.range.{max u2 u1, succ u1} (Sum.{u2, u1} α β) β (Sum.inr.{u2, u1} α β))) (Set.univ.{max u2 u1} (Sum.{u2, u1} α β))
-Case conversion may be inaccurate. Consider using '#align set.range_inl_union_range_inr Set.range_inl_union_range_inrₓ'. -/
 @[simp]
 theorem range_inl_union_range_inr : range (Sum.inl : α → Sum α β) ∪ range Sum.inr = univ :=
   isCompl_range_inl_range_inr.sup_eq_top
 #align set.range_inl_union_range_inr Set.range_inl_union_range_inr
 
-/- warning: set.range_inl_inter_range_inr -> Set.range_inl_inter_range_inr is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}}, Eq.{succ (max u1 u2)} (Set.{max u1 u2} (Sum.{u1, u2} α β)) (Inter.inter.{max u1 u2} (Set.{max u1 u2} (Sum.{u1, u2} α β)) (Set.hasInter.{max u1 u2} (Sum.{u1, u2} α β)) (Set.range.{max u1 u2, succ u1} (Sum.{u1, u2} α β) α (Sum.inl.{u1, u2} α β)) (Set.range.{max u1 u2, succ u2} (Sum.{u1, u2} α β) β (Sum.inr.{u1, u2} α β))) (EmptyCollection.emptyCollection.{max u1 u2} (Set.{max u1 u2} (Sum.{u1, u2} α β)) (Set.hasEmptyc.{max u1 u2} (Sum.{u1, u2} α β)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}}, Eq.{max (succ u2) (succ u1)} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (Inter.inter.{max u2 u1} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (Set.instInterSet.{max u2 u1} (Sum.{u2, u1} α β)) (Set.range.{max u2 u1, succ u2} (Sum.{u2, u1} α β) α (Sum.inl.{u2, u1} α β)) (Set.range.{max u2 u1, succ u1} (Sum.{u2, u1} α β) β (Sum.inr.{u2, u1} α β))) (EmptyCollection.emptyCollection.{max u2 u1} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (Set.instEmptyCollectionSet.{max u2 u1} (Sum.{u2, u1} α β)))
-Case conversion may be inaccurate. Consider using '#align set.range_inl_inter_range_inr Set.range_inl_inter_range_inrₓ'. -/
 @[simp]
 theorem range_inl_inter_range_inr : range (Sum.inl : α → Sum α β) ∩ range Sum.inr = ∅ :=
   isCompl_range_inl_range_inr.inf_eq_bot
 #align set.range_inl_inter_range_inr Set.range_inl_inter_range_inr
 
-/- warning: set.range_inr_union_range_inl -> Set.range_inr_union_range_inl is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}}, Eq.{succ (max u1 u2)} (Set.{max u1 u2} (Sum.{u1, u2} α β)) (Union.union.{max u1 u2} (Set.{max u1 u2} (Sum.{u1, u2} α β)) (Set.hasUnion.{max u1 u2} (Sum.{u1, u2} α β)) (Set.range.{max u1 u2, succ u2} (Sum.{u1, u2} α β) β (Sum.inr.{u1, u2} α β)) (Set.range.{max u1 u2, succ u1} (Sum.{u1, u2} α β) α (Sum.inl.{u1, u2} α β))) (Set.univ.{max u1 u2} (Sum.{u1, u2} α β))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}}, Eq.{max (succ u2) (succ u1)} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (Union.union.{max u2 u1} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (Set.instUnionSet.{max u2 u1} (Sum.{u2, u1} α β)) (Set.range.{max u2 u1, succ u1} (Sum.{u2, u1} α β) β (Sum.inr.{u2, u1} α β)) (Set.range.{max u2 u1, succ u2} (Sum.{u2, u1} α β) α (Sum.inl.{u2, u1} α β))) (Set.univ.{max u2 u1} (Sum.{u2, u1} α β))
-Case conversion may be inaccurate. Consider using '#align set.range_inr_union_range_inl Set.range_inr_union_range_inlₓ'. -/
 @[simp]
 theorem range_inr_union_range_inl : range (Sum.inr : β → Sum α β) ∪ range Sum.inl = univ :=
   isCompl_range_inl_range_inr.symm.sup_eq_top
 #align set.range_inr_union_range_inl Set.range_inr_union_range_inl
 
-/- warning: set.range_inr_inter_range_inl -> Set.range_inr_inter_range_inl is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}}, Eq.{succ (max u1 u2)} (Set.{max u1 u2} (Sum.{u1, u2} α β)) (Inter.inter.{max u1 u2} (Set.{max u1 u2} (Sum.{u1, u2} α β)) (Set.hasInter.{max u1 u2} (Sum.{u1, u2} α β)) (Set.range.{max u1 u2, succ u2} (Sum.{u1, u2} α β) β (Sum.inr.{u1, u2} α β)) (Set.range.{max u1 u2, succ u1} (Sum.{u1, u2} α β) α (Sum.inl.{u1, u2} α β))) (EmptyCollection.emptyCollection.{max u1 u2} (Set.{max u1 u2} (Sum.{u1, u2} α β)) (Set.hasEmptyc.{max u1 u2} (Sum.{u1, u2} α β)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}}, Eq.{max (succ u2) (succ u1)} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (Inter.inter.{max u2 u1} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (Set.instInterSet.{max u2 u1} (Sum.{u2, u1} α β)) (Set.range.{max u2 u1, succ u1} (Sum.{u2, u1} α β) β (Sum.inr.{u2, u1} α β)) (Set.range.{max u2 u1, succ u2} (Sum.{u2, u1} α β) α (Sum.inl.{u2, u1} α β))) (EmptyCollection.emptyCollection.{max u2 u1} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (Set.instEmptyCollectionSet.{max u2 u1} (Sum.{u2, u1} α β)))
-Case conversion may be inaccurate. Consider using '#align set.range_inr_inter_range_inl Set.range_inr_inter_range_inlₓ'. -/
 @[simp]
 theorem range_inr_inter_range_inl : range (Sum.inr : β → Sum α β) ∩ range Sum.inl = ∅ :=
   isCompl_range_inl_range_inr.symm.inf_eq_bot
@@ -1573,22 +973,10 @@ theorem preimage_inl_image_inr (s : Set β) : Sum.inl ⁻¹' (@Sum.inr α β ''
 #align set.preimage_inl_image_inr Set.preimage_inl_image_inr
 -/
 
-/- warning: set.preimage_inr_image_inl -> Set.preimage_inr_image_inl is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (s : Set.{u1} α), Eq.{succ u2} (Set.{u2} β) (Set.preimage.{u2, max u1 u2} β (Sum.{u1, u2} α β) (Sum.inr.{u1, u2} α β) (Set.image.{u1, max u1 u2} α (Sum.{u1, u2} α β) (Sum.inl.{u1, u2} α β) s)) (EmptyCollection.emptyCollection.{u2} (Set.{u2} β) (Set.hasEmptyc.{u2} β))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (s : Set.{u2} α), Eq.{succ u1} (Set.{u1} β) (Set.preimage.{u1, max u1 u2} β (Sum.{u2, u1} α β) (Sum.inr.{u2, u1} α β) (Set.image.{u2, max u1 u2} α (Sum.{u2, u1} α β) (Sum.inl.{u2, u1} α β) s)) (EmptyCollection.emptyCollection.{u1} (Set.{u1} β) (Set.instEmptyCollectionSet.{u1} β))
-Case conversion may be inaccurate. Consider using '#align set.preimage_inr_image_inl Set.preimage_inr_image_inlₓ'. -/
 @[simp]
 theorem preimage_inr_image_inl (s : Set α) : Sum.inr ⁻¹' (@Sum.inl α β '' s) = ∅ := by ext; simp
 #align set.preimage_inr_image_inl Set.preimage_inr_image_inl
 
-/- warning: set.preimage_inl_range_inr -> Set.preimage_inl_range_inr is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}}, Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, max u1 u2} α (Sum.{u1, u2} α β) (Sum.inl.{u1, u2} α β) (Set.range.{max u1 u2, succ u2} (Sum.{u1, u2} α β) β (Sum.inr.{u1, u2} α β))) (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.hasEmptyc.{u1} α))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}}, Eq.{succ u2} (Set.{u2} α) (Set.preimage.{u2, max u1 u2} α (Sum.{u2, u1} α β) (Sum.inl.{u2, u1} α β) (Set.range.{max u1 u2, succ u1} (Sum.{u2, u1} α β) β (Sum.inr.{u2, u1} α β))) (EmptyCollection.emptyCollection.{u2} (Set.{u2} α) (Set.instEmptyCollectionSet.{u2} α))
-Case conversion may be inaccurate. Consider using '#align set.preimage_inl_range_inr Set.preimage_inl_range_inrₓ'. -/
 @[simp]
 theorem preimage_inl_range_inr : Sum.inl ⁻¹' range (Sum.inr : β → Sum α β) = ∅ := by
   rw [← image_univ, preimage_inl_image_inr]
@@ -1601,34 +989,16 @@ theorem preimage_inr_range_inl : Sum.inr ⁻¹' range (Sum.inl : α → Sum α 
 #align set.preimage_inr_range_inl Set.preimage_inr_range_inl
 -/
 
-/- warning: set.compl_range_inl -> Set.compl_range_inl is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}}, Eq.{succ (max u1 u2)} (Set.{max u1 u2} (Sum.{u1, u2} α β)) (HasCompl.compl.{max u1 u2} (Set.{max u1 u2} (Sum.{u1, u2} α β)) (BooleanAlgebra.toHasCompl.{max u1 u2} (Set.{max u1 u2} (Sum.{u1, u2} α β)) (Set.booleanAlgebra.{max u1 u2} (Sum.{u1, u2} α β))) (Set.range.{max u1 u2, succ u1} (Sum.{u1, u2} α β) α (Sum.inl.{u1, u2} α β))) (Set.range.{max u1 u2, succ u2} (Sum.{u1, u2} α β) β (Sum.inr.{u1, u2} α β))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}}, Eq.{max (succ u2) (succ u1)} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (HasCompl.compl.{max u2 u1} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (BooleanAlgebra.toHasCompl.{max u2 u1} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (Set.instBooleanAlgebraSet.{max u2 u1} (Sum.{u2, u1} α β))) (Set.range.{max u2 u1, succ u2} (Sum.{u2, u1} α β) α (Sum.inl.{u2, u1} α β))) (Set.range.{max u2 u1, succ u1} (Sum.{u2, u1} α β) β (Sum.inr.{u2, u1} α β))
-Case conversion may be inaccurate. Consider using '#align set.compl_range_inl Set.compl_range_inlₓ'. -/
 @[simp]
 theorem compl_range_inl : range (Sum.inl : α → Sum α β)ᶜ = range (Sum.inr : β → Sum α β) :=
   IsCompl.compl_eq isCompl_range_inl_range_inr
 #align set.compl_range_inl Set.compl_range_inl
 
-/- warning: set.compl_range_inr -> Set.compl_range_inr is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}}, Eq.{succ (max u1 u2)} (Set.{max u1 u2} (Sum.{u1, u2} α β)) (HasCompl.compl.{max u1 u2} (Set.{max u1 u2} (Sum.{u1, u2} α β)) (BooleanAlgebra.toHasCompl.{max u1 u2} (Set.{max u1 u2} (Sum.{u1, u2} α β)) (Set.booleanAlgebra.{max u1 u2} (Sum.{u1, u2} α β))) (Set.range.{max u1 u2, succ u2} (Sum.{u1, u2} α β) β (Sum.inr.{u1, u2} α β))) (Set.range.{max u1 u2, succ u1} (Sum.{u1, u2} α β) α (Sum.inl.{u1, u2} α β))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}}, Eq.{max (succ u2) (succ u1)} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (HasCompl.compl.{max u2 u1} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (BooleanAlgebra.toHasCompl.{max u2 u1} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (Set.instBooleanAlgebraSet.{max u2 u1} (Sum.{u2, u1} α β))) (Set.range.{max u2 u1, succ u1} (Sum.{u2, u1} α β) β (Sum.inr.{u2, u1} α β))) (Set.range.{max u2 u1, succ u2} (Sum.{u2, u1} α β) α (Sum.inl.{u2, u1} α β))
-Case conversion may be inaccurate. Consider using '#align set.compl_range_inr Set.compl_range_inrₓ'. -/
 @[simp]
 theorem compl_range_inr : range (Sum.inr : β → Sum α β)ᶜ = range (Sum.inl : α → Sum α β) :=
   IsCompl.compl_eq isCompl_range_inl_range_inr.symm
 #align set.compl_range_inr Set.compl_range_inr
 
-/- warning: set.image_preimage_inl_union_image_preimage_inr -> Set.image_preimage_inl_union_image_preimage_inr is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (s : Set.{max u1 u2} (Sum.{u1, u2} α β)), Eq.{succ (max u1 u2)} (Set.{max u1 u2} (Sum.{u1, u2} α β)) (Union.union.{max u1 u2} (Set.{max u1 u2} (Sum.{u1, u2} α β)) (Set.hasUnion.{max u1 u2} (Sum.{u1, u2} α β)) (Set.image.{u1, max u1 u2} α (Sum.{u1, u2} α β) (Sum.inl.{u1, u2} α β) (Set.preimage.{u1, max u1 u2} α (Sum.{u1, u2} α β) (Sum.inl.{u1, u2} α β) s)) (Set.image.{u2, max u1 u2} β (Sum.{u1, u2} α β) (Sum.inr.{u1, u2} α β) (Set.preimage.{u2, max u1 u2} β (Sum.{u1, u2} α β) (Sum.inr.{u1, u2} α β) s))) s
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} (s : Set.{max u2 u1} (Sum.{u1, u2} α β)), Eq.{max (succ u1) (succ u2)} (Set.{max u2 u1} (Sum.{u1, u2} α β)) (Union.union.{max u2 u1} (Set.{max u2 u1} (Sum.{u1, u2} α β)) (Set.instUnionSet.{max u1 u2} (Sum.{u1, u2} α β)) (Set.image.{u1, max u2 u1} α (Sum.{u1, u2} α β) (Sum.inl.{u1, u2} α β) (Set.preimage.{u1, max u2 u1} α (Sum.{u1, u2} α β) (Sum.inl.{u1, u2} α β) s)) (Set.image.{u2, max u1 u2} β (Sum.{u1, u2} α β) (Sum.inr.{u1, u2} α β) (Set.preimage.{u2, max u2 u1} β (Sum.{u1, u2} α β) (Sum.inr.{u1, u2} α β) s))) s
-Case conversion may be inaccurate. Consider using '#align set.image_preimage_inl_union_image_preimage_inr Set.image_preimage_inl_union_image_preimage_inrₓ'. -/
 theorem image_preimage_inl_union_image_preimage_inr (s : Set (Sum α β)) :
     Sum.inl '' (Sum.inl ⁻¹' s) ∪ Sum.inr '' (Sum.inr ⁻¹' s) = s := by
   rw [image_preimage_eq_inter_range, image_preimage_eq_inter_range, ← inter_distrib_left,
@@ -1642,12 +1012,6 @@ theorem range_quot_mk (r : α → α → Prop) : range (Quot.mk r) = univ :=
 #align set.range_quot_mk Set.range_quot_mk
 -/
 
-/- warning: set.range_quot_lift -> Set.range_quot_lift is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {ι : Sort.{u2}} {f : ι -> α} {r : ι -> ι -> Prop} (hf : forall (x : ι) (y : ι), (r x y) -> (Eq.{succ u1} α (f x) (f y))), Eq.{succ u1} (Set.{u1} α) (Set.range.{u1, u2} α (Quot.{u2} ι (fun (x : ι) (y : ι) => r x y)) (Quot.lift.{u2, succ u1} ι (fun (x : ι) (y : ι) => r x y) α f hf)) (Set.range.{u1, u2} α ι f)
-but is expected to have type
-  forall {α : Type.{u2}} {ι : Sort.{u1}} {f : ι -> α} {r : ι -> ι -> Prop} (hf : forall (x : ι) (y : ι), (r x y) -> (Eq.{succ u2} α (f x) (f y))), Eq.{succ u2} (Set.{u2} α) (Set.range.{u2, u1} α (Quot.{u1} ι (fun (x : ι) (y : ι) => r x y)) (Quot.lift.{u1, succ u2} ι (fun (x : ι) (y : ι) => r x y) α f hf)) (Set.range.{u2, u1} α ι f)
-Case conversion may be inaccurate. Consider using '#align set.range_quot_lift Set.range_quot_liftₓ'. -/
 @[simp]
 theorem range_quot_lift {r : ι → ι → Prop} (hf : ∀ x y, r x y → f x = f y) :
     range (Quot.lift f hf) = range f :=
@@ -1691,12 +1055,6 @@ instance canLift (c) (p) [CanLift α β c p] :
 #align set.can_lift Set.canLift
 -/
 
-/- warning: set.range_const_subset -> Set.range_const_subset is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {ι : Sort.{u2}} {c : α}, HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) (Set.range.{u1, u2} α ι (fun (x : ι) => c)) (Singleton.singleton.{u1, u1} α (Set.{u1} α) (Set.hasSingleton.{u1} α) c)
-but is expected to have type
-  forall {α : Type.{u2}} {ι : Sort.{u1}} {c : α}, HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) (Set.range.{u2, u1} α ι (fun (x : ι) => c)) (Singleton.singleton.{u2, u2} α (Set.{u2} α) (Set.instSingletonSet.{u2} α) c)
-Case conversion may be inaccurate. Consider using '#align set.range_const_subset Set.range_const_subsetₓ'. -/
 theorem range_const_subset {c : α} : (range fun x : ι => c) ⊆ {c} :=
   range_subset_iff.2 fun x => rfl
 #align set.range_const_subset Set.range_const_subset
@@ -1719,52 +1077,22 @@ theorem range_subtype_map {p : α → Prop} {q : β → Prop} (f : α → β) (h
 #align set.range_subtype_map Set.range_subtype_map
 -/
 
-/- warning: set.image_swap_eq_preimage_swap -> Set.image_swap_eq_preimage_swap is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}}, Eq.{max (succ (max u1 u2)) (succ (max u2 u1))} ((Set.{max u1 u2} (Prod.{u1, u2} α β)) -> (Set.{max u2 u1} (Prod.{u2, u1} β α))) (Set.image.{max u1 u2, max u2 u1} (Prod.{u1, u2} α β) (Prod.{u2, u1} β α) (Prod.swap.{u1, u2} α β)) (Set.preimage.{max u2 u1, max u1 u2} (Prod.{u2, u1} β α) (Prod.{u1, u2} α β) (Prod.swap.{u2, u1} β α))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}}, Eq.{max (succ u2) (succ u1)} ((Set.{max u2 u1} (Prod.{u2, u1} α β)) -> (Set.{max u2 u1} (Prod.{u1, u2} β α))) (Set.image.{max u2 u1, max u2 u1} (Prod.{u2, u1} α β) (Prod.{u1, u2} β α) (Prod.swap.{u2, u1} α β)) (Set.preimage.{max u2 u1, max u2 u1} (Prod.{u1, u2} β α) (Prod.{u2, u1} α β) (Prod.swap.{u1, u2} β α))
-Case conversion may be inaccurate. Consider using '#align set.image_swap_eq_preimage_swap Set.image_swap_eq_preimage_swapₓ'. -/
 theorem image_swap_eq_preimage_swap : image (@Prod.swap α β) = preimage Prod.swap :=
   image_eq_preimage_of_inverse Prod.swap_leftInverse Prod.swap_rightInverse
 #align set.image_swap_eq_preimage_swap Set.image_swap_eq_preimage_swap
 
-/- warning: set.preimage_singleton_nonempty -> Set.preimage_singleton_nonempty is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {y : β}, Iff (Set.Nonempty.{u1} α (Set.preimage.{u1, u2} α β f (Singleton.singleton.{u2, u2} β (Set.{u2} β) (Set.hasSingleton.{u2} β) y))) (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) y (Set.range.{u2, succ u1} β α f))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {y : β}, Iff (Set.Nonempty.{u2} α (Set.preimage.{u2, u1} α β f (Singleton.singleton.{u1, u1} β (Set.{u1} β) (Set.instSingletonSet.{u1} β) y))) (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) y (Set.range.{u1, succ u2} β α f))
-Case conversion may be inaccurate. Consider using '#align set.preimage_singleton_nonempty Set.preimage_singleton_nonemptyₓ'. -/
 theorem preimage_singleton_nonempty {f : α → β} {y : β} : (f ⁻¹' {y}).Nonempty ↔ y ∈ range f :=
   Iff.rfl
 #align set.preimage_singleton_nonempty Set.preimage_singleton_nonempty
 
-/- warning: set.preimage_singleton_eq_empty -> Set.preimage_singleton_eq_empty is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {y : β}, Iff (Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u2} α β f (Singleton.singleton.{u2, u2} β (Set.{u2} β) (Set.hasSingleton.{u2} β) y)) (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.hasEmptyc.{u1} α))) (Not (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) y (Set.range.{u2, succ u1} β α f)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {y : β}, Iff (Eq.{succ u2} (Set.{u2} α) (Set.preimage.{u2, u1} α β f (Singleton.singleton.{u1, u1} β (Set.{u1} β) (Set.instSingletonSet.{u1} β) y)) (EmptyCollection.emptyCollection.{u2} (Set.{u2} α) (Set.instEmptyCollectionSet.{u2} α))) (Not (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) y (Set.range.{u1, succ u2} β α f)))
-Case conversion may be inaccurate. Consider using '#align set.preimage_singleton_eq_empty Set.preimage_singleton_eq_emptyₓ'. -/
 theorem preimage_singleton_eq_empty {f : α → β} {y : β} : f ⁻¹' {y} = ∅ ↔ y ∉ range f :=
   not_nonempty_iff_eq_empty.symm.trans preimage_singleton_nonempty.Not
 #align set.preimage_singleton_eq_empty Set.preimage_singleton_eq_empty
 
-/- warning: set.range_subset_singleton -> Set.range_subset_singleton is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {ι : Sort.{u2}} {f : ι -> α} {x : α}, Iff (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) (Set.range.{u1, u2} α ι f) (Singleton.singleton.{u1, u1} α (Set.{u1} α) (Set.hasSingleton.{u1} α) x)) (Eq.{max u2 (succ u1)} (ι -> α) f (Function.const.{succ u1, u2} α ι x))
-but is expected to have type
-  forall {α : Type.{u2}} {ι : Sort.{u1}} {f : ι -> α} {x : α}, Iff (HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) (Set.range.{u2, u1} α ι f) (Singleton.singleton.{u2, u2} α (Set.{u2} α) (Set.instSingletonSet.{u2} α) x)) (Eq.{max (succ u2) u1} (ι -> α) f (Function.const.{succ u2, u1} α ι x))
-Case conversion may be inaccurate. Consider using '#align set.range_subset_singleton Set.range_subset_singletonₓ'. -/
 theorem range_subset_singleton {f : ι → α} {x : α} : range f ⊆ {x} ↔ f = const ι x := by
   simp [range_subset_iff, funext_iff, mem_singleton]
 #align set.range_subset_singleton Set.range_subset_singleton
 
-/- warning: set.image_compl_preimage -> Set.image_compl_preimage is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u2} β}, Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β f (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) (Set.preimage.{u1, u2} α β f s))) (SDiff.sdiff.{u2} (Set.{u2} β) (BooleanAlgebra.toHasSdiff.{u2} (Set.{u2} β) (Set.booleanAlgebra.{u2} β)) (Set.range.{u2, succ u1} β α f) s)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u2} β}, Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β f (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.instBooleanAlgebraSet.{u1} α)) (Set.preimage.{u1, u2} α β f s))) (SDiff.sdiff.{u2} (Set.{u2} β) (Set.instSDiffSet.{u2} β) (Set.range.{u2, succ u1} β α f) s)
-Case conversion may be inaccurate. Consider using '#align set.image_compl_preimage Set.image_compl_preimageₓ'. -/
 theorem image_compl_preimage {f : α → β} {s : Set β} : f '' (f ⁻¹' s)ᶜ = range f \ s := by
   rw [compl_eq_univ_diff, image_diff_preimage, image_univ]
 #align set.image_compl_preimage Set.image_compl_preimage
@@ -1775,33 +1103,15 @@ def rangeFactorization (f : ι → β) : ι → range f := fun i => ⟨f i, mem_
 #align set.range_factorization Set.rangeFactorization
 -/
 
-/- warning: set.range_factorization_eq -> Set.rangeFactorization_eq is a dubious translation:
-lean 3 declaration is
-  forall {β : Type.{u1}} {ι : Sort.{u2}} {f : ι -> β}, Eq.{max u2 (succ u1)} (ι -> β) (Function.comp.{u2, succ u1, succ u1} ι (Subtype.{succ u1} β (fun (x : β) => Membership.Mem.{u1, u1} β (Set.{u1} β) (Set.hasMem.{u1} β) x (Set.range.{u1, u2} β ι f))) β (Subtype.val.{succ u1} β (fun (x : β) => Membership.Mem.{u1, u1} β (Set.{u1} β) (Set.hasMem.{u1} β) x (Set.range.{u1, u2} β ι f))) (Set.rangeFactorization.{u1, u2} β ι f)) f
-but is expected to have type
-  forall {β : Type.{u2}} {ι : Sort.{u1}} {f : ι -> β}, Eq.{max (succ u2) u1} (ι -> β) (Function.comp.{u1, succ u2, succ u2} ι (Subtype.{succ u2} β (fun (x : β) => Membership.mem.{u2, u2} β (Set.{u2} β) (Set.instMembershipSet.{u2} β) x (Set.range.{u2, u1} β ι f))) β (Subtype.val.{succ u2} β (fun (x : β) => Membership.mem.{u2, u2} β (Set.{u2} β) (Set.instMembershipSet.{u2} β) x (Set.range.{u2, u1} β ι f))) (Set.rangeFactorization.{u2, u1} β ι f)) f
-Case conversion may be inaccurate. Consider using '#align set.range_factorization_eq Set.rangeFactorization_eqₓ'. -/
 theorem rangeFactorization_eq {f : ι → β} : Subtype.val ∘ rangeFactorization f = f :=
   funext fun i => rfl
 #align set.range_factorization_eq Set.rangeFactorization_eq
 
-/- warning: set.range_factorization_coe -> Set.rangeFactorization_coe is a dubious translation:
-lean 3 declaration is
-  forall {β : Type.{u1}} {ι : Sort.{u2}} (f : ι -> β) (a : ι), Eq.{succ u1} β ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} β) Type.{u1} (Set.hasCoeToSort.{u1} β) (Set.range.{u1, u2} β ι f)) β (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} β) Type.{u1} (Set.hasCoeToSort.{u1} β) (Set.range.{u1, u2} β ι f)) β (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} β) Type.{u1} (Set.hasCoeToSort.{u1} β) (Set.range.{u1, u2} β ι f)) β (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} β) Type.{u1} (Set.hasCoeToSort.{u1} β) (Set.range.{u1, u2} β ι f)) β (coeSubtype.{succ u1} β (fun (x : β) => Membership.Mem.{u1, u1} β (Set.{u1} β) (Set.hasMem.{u1} β) x (Set.range.{u1, u2} β ι f)))))) (Set.rangeFactorization.{u1, u2} β ι f a)) (f a)
-but is expected to have type
-  forall {β : Type.{u2}} {ι : Sort.{u1}} (f : ι -> β) (a : ι), Eq.{succ u2} β (Subtype.val.{succ u2} β (fun (x : β) => Membership.mem.{u2, u2} β (Set.{u2} β) (Set.instMembershipSet.{u2} β) x (Set.range.{u2, u1} β ι f)) (Set.rangeFactorization.{u2, u1} β ι f a)) (f a)
-Case conversion may be inaccurate. Consider using '#align set.range_factorization_coe Set.rangeFactorization_coeₓ'. -/
 @[simp]
 theorem rangeFactorization_coe (f : ι → β) (a : ι) : (rangeFactorization f a : β) = f a :=
   rfl
 #align set.range_factorization_coe Set.rangeFactorization_coe
 
-/- warning: set.coe_comp_range_factorization -> Set.coe_comp_rangeFactorization is a dubious translation:
-lean 3 declaration is
-  forall {β : Type.{u1}} {ι : Sort.{u2}} (f : ι -> β), Eq.{max u2 (succ u1)} (ι -> β) (Function.comp.{u2, succ u1, succ u1} ι (coeSort.{succ u1, succ (succ u1)} (Set.{u1} β) Type.{u1} (Set.hasCoeToSort.{u1} β) (Set.range.{u1, u2} β ι f)) β ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} β) Type.{u1} (Set.hasCoeToSort.{u1} β) (Set.range.{u1, u2} β ι f)) β (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} β) Type.{u1} (Set.hasCoeToSort.{u1} β) (Set.range.{u1, u2} β ι f)) β (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} β) Type.{u1} (Set.hasCoeToSort.{u1} β) (Set.range.{u1, u2} β ι f)) β (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} β) Type.{u1} (Set.hasCoeToSort.{u1} β) (Set.range.{u1, u2} β ι f)) β (coeSubtype.{succ u1} β (fun (x : β) => Membership.Mem.{u1, u1} β (Set.{u1} β) (Set.hasMem.{u1} β) x (Set.range.{u1, u2} β ι f))))))) (Set.rangeFactorization.{u1, u2} β ι f)) f
-but is expected to have type
-  forall {β : Type.{u2}} {ι : Sort.{u1}} (f : ι -> β), Eq.{max (succ u2) u1} (ι -> β) (Function.comp.{u1, succ u2, succ u2} ι (Set.Elem.{u2} β (Set.range.{u2, u1} β ι f)) β (Subtype.val.{succ u2} β (fun (x : β) => Membership.mem.{u2, u2} β (Set.{u2} β) (Set.instMembershipSet.{u2} β) x (Set.range.{u2, u1} β ι f))) (Set.rangeFactorization.{u2, u1} β ι f)) f
-Case conversion may be inaccurate. Consider using '#align set.coe_comp_range_factorization Set.coe_comp_rangeFactorizationₓ'. -/
 @[simp]
 theorem coe_comp_rangeFactorization (f : ι → β) : coe ∘ rangeFactorization f = f :=
   rfl
@@ -1812,43 +1122,19 @@ theorem surjective_onto_range : Surjective (rangeFactorization f) := fun ⟨_, 
 #align set.surjective_onto_range Set.surjective_onto_range
 -/
 
-/- warning: set.image_eq_range -> Set.image_eq_range is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β) (s : Set.{u1} α), Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β f s) (Set.range.{u2, succ u1} β (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) (fun (x : coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) => f ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeSubtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s))))) x)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β) (s : Set.{u2} α), Eq.{succ u1} (Set.{u1} β) (Set.image.{u2, u1} α β f s) (Set.range.{u1, succ u2} β (Set.Elem.{u2} α s) (fun (x : Set.Elem.{u2} α s) => f (Subtype.val.{succ u2} α (fun (x : α) => Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x s) x)))
-Case conversion may be inaccurate. Consider using '#align set.image_eq_range Set.image_eq_rangeₓ'. -/
 theorem image_eq_range (f : α → β) (s : Set α) : f '' s = range fun x : s => f x := by ext;
   constructor; rintro ⟨x, h1, h2⟩; exact ⟨⟨x, h1⟩, h2⟩; rintro ⟨⟨x, h1⟩, h2⟩; exact ⟨x, h1, h2⟩
 #align set.image_eq_range Set.image_eq_range
 
-/- warning: sum.range_eq -> Sum.range_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (f : (Sum.{u1, u2} α β) -> γ), Eq.{succ u3} (Set.{u3} γ) (Set.range.{u3, max (succ u1) (succ u2)} γ (Sum.{u1, u2} α β) f) (Union.union.{u3} (Set.{u3} γ) (Set.hasUnion.{u3} γ) (Set.range.{u3, succ u1} γ α (Function.comp.{succ u1, max (succ u1) (succ u2), succ u3} α (Sum.{u1, u2} α β) γ f (Sum.inl.{u1, u2} α β))) (Set.range.{u3, succ u2} γ β (Function.comp.{succ u2, max (succ u1) (succ u2), succ u3} β (Sum.{u1, u2} α β) γ f (Sum.inr.{u1, u2} α β))))
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u2}} {γ : Type.{u1}} (f : (Sum.{u3, u2} α β) -> γ), Eq.{succ u1} (Set.{u1} γ) (Set.range.{u1, max (succ u3) (succ u2)} γ (Sum.{u3, u2} α β) f) (Union.union.{u1} (Set.{u1} γ) (Set.instUnionSet.{u1} γ) (Set.range.{u1, succ u3} γ α (Function.comp.{succ u3, max (succ u3) (succ u2), succ u1} α (Sum.{u3, u2} α β) γ f (Sum.inl.{u3, u2} α β))) (Set.range.{u1, succ u2} γ β (Function.comp.{succ u2, max (succ u3) (succ u2), succ u1} β (Sum.{u3, u2} α β) γ f (Sum.inr.{u3, u2} α β))))
-Case conversion may be inaccurate. Consider using '#align sum.range_eq Sum.range_eqₓ'. -/
 theorem Sum.range_eq (f : Sum α β → γ) : range f = range (f ∘ Sum.inl) ∪ range (f ∘ Sum.inr) :=
   ext fun x => Sum.exists
 #align sum.range_eq Sum.range_eq
 
-/- warning: set.sum.elim_range -> Set.Sum.elim_range is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (f : α -> γ) (g : β -> γ), Eq.{succ u3} (Set.{u3} γ) (Set.range.{u3, max (succ u1) (succ u2)} γ (Sum.{u1, u2} α β) (Sum.elim.{u1, u2, succ u3} α β γ f g)) (Union.union.{u3} (Set.{u3} γ) (Set.hasUnion.{u3} γ) (Set.range.{u3, succ u1} γ α f) (Set.range.{u3, succ u2} γ β g))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (f : α -> γ) (g : β -> γ), Eq.{succ u3} (Set.{u3} γ) (Set.range.{u3, max (succ u2) (succ u1)} γ (Sum.{u1, u2} α β) (Sum.elim.{u1, u2, succ u3} α β γ f g)) (Union.union.{u3} (Set.{u3} γ) (Set.instUnionSet.{u3} γ) (Set.range.{u3, succ u1} γ α f) (Set.range.{u3, succ u2} γ β g))
-Case conversion may be inaccurate. Consider using '#align set.sum.elim_range Set.Sum.elim_rangeₓ'. -/
 @[simp]
 theorem Sum.elim_range (f : α → γ) (g : β → γ) : range (Sum.elim f g) = range f ∪ range g :=
   Sum.range_eq _
 #align set.sum.elim_range Set.Sum.elim_range
 
-/- warning: set.range_ite_subset' -> Set.range_ite_subset' is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {p : Prop} [_inst_1 : Decidable p] {f : α -> β} {g : α -> β}, HasSubset.Subset.{u2} (Set.{u2} β) (Set.hasSubset.{u2} β) (Set.range.{u2, succ u1} β α (ite.{max (succ u1) (succ u2)} (α -> β) p _inst_1 f g)) (Union.union.{u2} (Set.{u2} β) (Set.hasUnion.{u2} β) (Set.range.{u2, succ u1} β α f) (Set.range.{u2, succ u1} β α g))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} {p : Prop} [_inst_1 : Decidable p] {f : α -> β} {g : α -> β}, HasSubset.Subset.{u2} (Set.{u2} β) (Set.instHasSubsetSet.{u2} β) (Set.range.{u2, succ u1} β α (ite.{max (succ u1) (succ u2)} (α -> β) p _inst_1 f g)) (Union.union.{u2} (Set.{u2} β) (Set.instUnionSet.{u2} β) (Set.range.{u2, succ u1} β α f) (Set.range.{u2, succ u1} β α g))
-Case conversion may be inaccurate. Consider using '#align set.range_ite_subset' Set.range_ite_subset'ₓ'. -/
 theorem range_ite_subset' {p : Prop} [Decidable p] {f g : α → β} :
     range (if p then f else g) ⊆ range f ∪ range g :=
   by
@@ -1856,12 +1142,6 @@ theorem range_ite_subset' {p : Prop} [Decidable p] {f g : α → β} :
   · rw [if_neg h]; exact subset_union_right _ _
 #align set.range_ite_subset' Set.range_ite_subset'
 
-/- warning: set.range_ite_subset -> Set.range_ite_subset is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {p : α -> Prop} [_inst_1 : DecidablePred.{succ u1} α p] {f : α -> β} {g : α -> β}, HasSubset.Subset.{u2} (Set.{u2} β) (Set.hasSubset.{u2} β) (Set.range.{u2, succ u1} β α (fun (x : α) => ite.{succ u2} β (p x) (_inst_1 x) (f x) (g x))) (Union.union.{u2} (Set.{u2} β) (Set.hasUnion.{u2} β) (Set.range.{u2, succ u1} β α f) (Set.range.{u2, succ u1} β α g))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {p : α -> Prop} [_inst_1 : DecidablePred.{succ u2} α p] {f : α -> β} {g : α -> β}, HasSubset.Subset.{u1} (Set.{u1} β) (Set.instHasSubsetSet.{u1} β) (Set.range.{u1, succ u2} β α (fun (x : α) => ite.{succ u1} β (p x) (_inst_1 x) (f x) (g x))) (Union.union.{u1} (Set.{u1} β) (Set.instUnionSet.{u1} β) (Set.range.{u1, succ u2} β α f) (Set.range.{u1, succ u2} β α g))
-Case conversion may be inaccurate. Consider using '#align set.range_ite_subset Set.range_ite_subsetₓ'. -/
 theorem range_ite_subset {p : α → Prop} [DecidablePred p] {f g : α → β} :
     (range fun x => if p x then f x else g x) ⊆ range f ∪ range g :=
   by
@@ -1870,12 +1150,6 @@ theorem range_ite_subset {p : α → Prop} [DecidablePred p] {f g : α → β} :
   simp [if_neg h, mem_union, mem_range_self]
 #align set.range_ite_subset Set.range_ite_subset
 
-/- warning: set.preimage_range -> Set.preimage_range is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β), Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u2} α β f (Set.range.{u2, succ u1} β α f)) (Set.univ.{u1} α)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β), Eq.{succ u2} (Set.{u2} α) (Set.preimage.{u2, u1} α β f (Set.range.{u1, succ u2} β α f)) (Set.univ.{u2} α)
-Case conversion may be inaccurate. Consider using '#align set.preimage_range Set.preimage_rangeₓ'. -/
 @[simp]
 theorem preimage_range (f : α → β) : f ⁻¹' range f = univ :=
   eq_univ_of_forall mem_range_self
@@ -1896,22 +1170,10 @@ theorem range_unique [h : Unique ι] : range f = {f default} :=
 #align set.range_unique Set.range_unique
 -/
 
-/- warning: set.range_diff_image_subset -> Set.range_diff_image_subset is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β) (s : Set.{u1} α), HasSubset.Subset.{u2} (Set.{u2} β) (Set.hasSubset.{u2} β) (SDiff.sdiff.{u2} (Set.{u2} β) (BooleanAlgebra.toHasSdiff.{u2} (Set.{u2} β) (Set.booleanAlgebra.{u2} β)) (Set.range.{u2, succ u1} β α f) (Set.image.{u1, u2} α β f s)) (Set.image.{u1, u2} α β f (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β) (s : Set.{u2} α), HasSubset.Subset.{u1} (Set.{u1} β) (Set.instHasSubsetSet.{u1} β) (SDiff.sdiff.{u1} (Set.{u1} β) (Set.instSDiffSet.{u1} β) (Set.range.{u1, succ u2} β α f) (Set.image.{u2, u1} α β f s)) (Set.image.{u2, u1} α β f (HasCompl.compl.{u2} (Set.{u2} α) (BooleanAlgebra.toHasCompl.{u2} (Set.{u2} α) (Set.instBooleanAlgebraSet.{u2} α)) s))
-Case conversion may be inaccurate. Consider using '#align set.range_diff_image_subset Set.range_diff_image_subsetₓ'. -/
 theorem range_diff_image_subset (f : α → β) (s : Set α) : range f \ f '' s ⊆ f '' sᶜ :=
   fun y ⟨⟨x, h₁⟩, h₂⟩ => ⟨x, fun h => h₂ ⟨x, h, h₁⟩, h₁⟩
 #align set.range_diff_image_subset Set.range_diff_image_subset
 
-/- warning: set.range_diff_image -> Set.range_diff_image is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β}, (Function.Injective.{succ u1, succ u2} α β f) -> (forall (s : Set.{u1} α), Eq.{succ u2} (Set.{u2} β) (SDiff.sdiff.{u2} (Set.{u2} β) (BooleanAlgebra.toHasSdiff.{u2} (Set.{u2} β) (Set.booleanAlgebra.{u2} β)) (Set.range.{u2, succ u1} β α f) (Set.image.{u1, u2} α β f s)) (Set.image.{u1, u2} α β f (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Injective.{succ u2, succ u1} α β f) -> (forall (s : Set.{u2} α), Eq.{succ u1} (Set.{u1} β) (SDiff.sdiff.{u1} (Set.{u1} β) (Set.instSDiffSet.{u1} β) (Set.range.{u1, succ u2} β α f) (Set.image.{u2, u1} α β f s)) (Set.image.{u2, u1} α β f (HasCompl.compl.{u2} (Set.{u2} α) (BooleanAlgebra.toHasCompl.{u2} (Set.{u2} α) (Set.instBooleanAlgebraSet.{u2} α)) s)))
-Case conversion may be inaccurate. Consider using '#align set.range_diff_image Set.range_diff_imageₓ'. -/
 theorem range_diff_image {f : α → β} (H : Injective f) (s : Set α) : range f \ f '' s = f '' sᶜ :=
   Subset.antisymm (range_diff_image_subset f s) fun y ⟨x, hx, hy⟩ =>
     hy ▸ ⟨mem_range_self _, fun ⟨x', hx', Eq⟩ => hx <| H Eq ▸ hx'⟩
@@ -1958,68 +1220,32 @@ theorem rangeSplitting_injective (f : α → β) : Injective (rangeSplitting f)
 #align set.range_splitting_injective Set.rangeSplitting_injective
 -/
 
-/- warning: set.right_inverse_range_splitting -> Set.rightInverse_rangeSplitting is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β}, (Function.Injective.{succ u1, succ u2} α β f) -> (Function.RightInverse.{succ u2, succ u1} (coeSort.{succ u2, succ (succ u2)} (Set.{u2} β) Type.{u2} (Set.hasCoeToSort.{u2} β) (Set.range.{u2, succ u1} β α f)) α (Set.rangeFactorization.{u2, succ u1} β α f) (Set.rangeSplitting.{u1, u2} α β f))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Injective.{succ u2, succ u1} α β f) -> (Function.RightInverse.{succ u1, succ u2} (Set.Elem.{u1} β (Set.range.{u1, succ u2} β α f)) α (Set.rangeFactorization.{u1, succ u2} β α f) (Set.rangeSplitting.{u2, u1} α β f))
-Case conversion may be inaccurate. Consider using '#align set.right_inverse_range_splitting Set.rightInverse_rangeSplittingₓ'. -/
 theorem rightInverse_rangeSplitting {f : α → β} (h : Injective f) :
     RightInverse (rangeFactorization f) (rangeSplitting f) :=
   (leftInverse_rangeSplitting f).rightInverse_of_injective fun x y hxy => h <| Subtype.ext_iff.1 hxy
 #align set.right_inverse_range_splitting Set.rightInverse_rangeSplitting
 
-/- warning: set.preimage_range_splitting -> Set.preimage_rangeSplitting is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β}, (Function.Injective.{succ u1, succ u2} α β f) -> (Eq.{max (succ u1) (succ u2)} ((Set.{u1} α) -> (Set.{u2} (coeSort.{succ u2, succ (succ u2)} (Set.{u2} β) Type.{u2} (Set.hasCoeToSort.{u2} β) (Set.range.{u2, succ u1} β α f)))) (Set.preimage.{u2, u1} (coeSort.{succ u2, succ (succ u2)} (Set.{u2} β) Type.{u2} (Set.hasCoeToSort.{u2} β) (Set.range.{u2, succ u1} β α f)) α (Set.rangeSplitting.{u1, u2} α β f)) (Set.image.{u1, u2} α (coeSort.{succ u2, succ (succ u2)} (Set.{u2} β) Type.{u2} (Set.hasCoeToSort.{u2} β) (Set.range.{u2, succ u1} β α f)) (Set.rangeFactorization.{u2, succ u1} β α f)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Injective.{succ u2, succ u1} α β f) -> (Eq.{max (succ u2) (succ u1)} ((Set.{u2} α) -> (Set.{u1} (Set.Elem.{u1} β (Set.range.{u1, succ u2} β α f)))) (Set.preimage.{u1, u2} (Set.Elem.{u1} β (Set.range.{u1, succ u2} β α f)) α (Set.rangeSplitting.{u2, u1} α β f)) (Set.image.{u2, u1} α (Set.Elem.{u1} β (Set.range.{u1, succ u2} β α f)) (Set.rangeFactorization.{u1, succ u2} β α f)))
-Case conversion may be inaccurate. Consider using '#align set.preimage_range_splitting Set.preimage_rangeSplittingₓ'. -/
 theorem preimage_rangeSplitting {f : α → β} (hf : Injective f) :
     preimage (rangeSplitting f) = image (rangeFactorization f) :=
   (image_eq_preimage_of_inverse (rightInverse_rangeSplitting hf)
       (leftInverse_rangeSplitting f)).symm
 #align set.preimage_range_splitting Set.preimage_rangeSplitting
 
-/- warning: set.is_compl_range_some_none -> Set.isCompl_range_some_none is a dubious translation:
-lean 3 declaration is
-  forall (α : Type.{u1}), IsCompl.{u1} (Set.{u1} (Option.{u1} α)) (SemilatticeInf.toPartialOrder.{u1} (Set.{u1} (Option.{u1} α)) (Lattice.toSemilatticeInf.{u1} (Set.{u1} (Option.{u1} α)) (GeneralizedCoheytingAlgebra.toLattice.{u1} (Set.{u1} (Option.{u1} α)) (GeneralizedBooleanAlgebra.toGeneralizedCoheytingAlgebra.{u1} (Set.{u1} (Option.{u1} α)) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} (Option.{u1} α)) (Set.booleanAlgebra.{u1} (Option.{u1} α))))))) (BooleanAlgebra.toBoundedOrder.{u1} (Set.{u1} (Option.{u1} α)) (Set.booleanAlgebra.{u1} (Option.{u1} α))) (Set.range.{u1, succ u1} (Option.{u1} α) α (Option.some.{u1} α)) (Singleton.singleton.{u1, u1} (Option.{u1} α) (Set.{u1} (Option.{u1} α)) (Set.hasSingleton.{u1} (Option.{u1} α)) (Option.none.{u1} α))
-but is expected to have type
-  forall (α : Type.{u1}), IsCompl.{u1} (Set.{u1} (Option.{u1} α)) (SemilatticeInf.toPartialOrder.{u1} (Set.{u1} (Option.{u1} α)) (Lattice.toSemilatticeInf.{u1} (Set.{u1} (Option.{u1} α)) (GeneralizedCoheytingAlgebra.toLattice.{u1} (Set.{u1} (Option.{u1} α)) (CoheytingAlgebra.toGeneralizedCoheytingAlgebra.{u1} (Set.{u1} (Option.{u1} α)) (BiheytingAlgebra.toCoheytingAlgebra.{u1} (Set.{u1} (Option.{u1} α)) (BooleanAlgebra.toBiheytingAlgebra.{u1} (Set.{u1} (Option.{u1} α)) (Set.instBooleanAlgebraSet.{u1} (Option.{u1} α)))))))) (BooleanAlgebra.toBoundedOrder.{u1} (Set.{u1} (Option.{u1} α)) (Set.instBooleanAlgebraSet.{u1} (Option.{u1} α))) (Set.range.{u1, succ u1} (Option.{u1} α) α (Option.some.{u1} α)) (Singleton.singleton.{u1, u1} (Option.{u1} α) (Set.{u1} (Option.{u1} α)) (Set.instSingletonSet.{u1} (Option.{u1} α)) (Option.none.{u1} α))
-Case conversion may be inaccurate. Consider using '#align set.is_compl_range_some_none Set.isCompl_range_some_noneₓ'. -/
 theorem isCompl_range_some_none (α : Type _) : IsCompl (range (some : α → Option α)) {none} :=
   IsCompl.of_le (fun x ⟨⟨a, ha⟩, (hn : x = none)⟩ => Option.some_ne_none _ (ha.trans hn))
     fun x hx => Option.casesOn x (Or.inr rfl) fun x => Or.inl <| mem_range_self _
 #align set.is_compl_range_some_none Set.isCompl_range_some_none
 
-/- warning: set.compl_range_some -> Set.compl_range_some is a dubious translation:
-lean 3 declaration is
-  forall (α : Type.{u1}), Eq.{succ u1} (Set.{u1} (Option.{u1} α)) (HasCompl.compl.{u1} (Set.{u1} (Option.{u1} α)) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} (Option.{u1} α)) (Set.booleanAlgebra.{u1} (Option.{u1} α))) (Set.range.{u1, succ u1} (Option.{u1} α) α (Option.some.{u1} α))) (Singleton.singleton.{u1, u1} (Option.{u1} α) (Set.{u1} (Option.{u1} α)) (Set.hasSingleton.{u1} (Option.{u1} α)) (Option.none.{u1} α))
-but is expected to have type
-  forall (α : Type.{u1}), Eq.{succ u1} (Set.{u1} (Option.{u1} α)) (HasCompl.compl.{u1} (Set.{u1} (Option.{u1} α)) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} (Option.{u1} α)) (Set.instBooleanAlgebraSet.{u1} (Option.{u1} α))) (Set.range.{u1, succ u1} (Option.{u1} α) α (Option.some.{u1} α))) (Singleton.singleton.{u1, u1} (Option.{u1} α) (Set.{u1} (Option.{u1} α)) (Set.instSingletonSet.{u1} (Option.{u1} α)) (Option.none.{u1} α))
-Case conversion may be inaccurate. Consider using '#align set.compl_range_some Set.compl_range_someₓ'. -/
 @[simp]
 theorem compl_range_some (α : Type _) : range (some : α → Option α)ᶜ = {none} :=
   (isCompl_range_some_none α).compl_eq
 #align set.compl_range_some Set.compl_range_some
 
-/- warning: set.range_some_inter_none -> Set.range_some_inter_none is a dubious translation:
-lean 3 declaration is
-  forall (α : Type.{u1}), Eq.{succ u1} (Set.{u1} (Option.{u1} α)) (Inter.inter.{u1} (Set.{u1} (Option.{u1} α)) (Set.hasInter.{u1} (Option.{u1} α)) (Set.range.{u1, succ u1} (Option.{u1} α) α (Option.some.{u1} α)) (Singleton.singleton.{u1, u1} (Option.{u1} α) (Set.{u1} (Option.{u1} α)) (Set.hasSingleton.{u1} (Option.{u1} α)) (Option.none.{u1} α))) (EmptyCollection.emptyCollection.{u1} (Set.{u1} (Option.{u1} α)) (Set.hasEmptyc.{u1} (Option.{u1} α)))
-but is expected to have type
-  forall (α : Type.{u1}), Eq.{succ u1} (Set.{u1} (Option.{u1} α)) (Inter.inter.{u1} (Set.{u1} (Option.{u1} α)) (Set.instInterSet.{u1} (Option.{u1} α)) (Set.range.{u1, succ u1} (Option.{u1} α) α (Option.some.{u1} α)) (Singleton.singleton.{u1, u1} (Option.{u1} α) (Set.{u1} (Option.{u1} α)) (Set.instSingletonSet.{u1} (Option.{u1} α)) (Option.none.{u1} α))) (EmptyCollection.emptyCollection.{u1} (Set.{u1} (Option.{u1} α)) (Set.instEmptyCollectionSet.{u1} (Option.{u1} α)))
-Case conversion may be inaccurate. Consider using '#align set.range_some_inter_none Set.range_some_inter_noneₓ'. -/
 @[simp]
 theorem range_some_inter_none (α : Type _) : range (some : α → Option α) ∩ {none} = ∅ :=
   (isCompl_range_some_none α).inf_eq_bot
 #align set.range_some_inter_none Set.range_some_inter_none
 
-/- warning: set.range_some_union_none -> Set.range_some_union_none is a dubious translation:
-lean 3 declaration is
-  forall (α : Type.{u1}), Eq.{succ u1} (Set.{u1} (Option.{u1} α)) (Union.union.{u1} (Set.{u1} (Option.{u1} α)) (Set.hasUnion.{u1} (Option.{u1} α)) (Set.range.{u1, succ u1} (Option.{u1} α) α (Option.some.{u1} α)) (Singleton.singleton.{u1, u1} (Option.{u1} α) (Set.{u1} (Option.{u1} α)) (Set.hasSingleton.{u1} (Option.{u1} α)) (Option.none.{u1} α))) (Set.univ.{u1} (Option.{u1} α))
-but is expected to have type
-  forall (α : Type.{u1}), Eq.{succ u1} (Set.{u1} (Option.{u1} α)) (Union.union.{u1} (Set.{u1} (Option.{u1} α)) (Set.instUnionSet.{u1} (Option.{u1} α)) (Set.range.{u1, succ u1} (Option.{u1} α) α (Option.some.{u1} α)) (Singleton.singleton.{u1, u1} (Option.{u1} α) (Set.{u1} (Option.{u1} α)) (Set.instSingletonSet.{u1} (Option.{u1} α)) (Option.none.{u1} α))) (Set.univ.{u1} (Option.{u1} α))
-Case conversion may be inaccurate. Consider using '#align set.range_some_union_none Set.range_some_union_noneₓ'. -/
 @[simp]
 theorem range_some_union_none (α : Type _) : range (some : α → Option α) ∪ {none} = univ :=
   (isCompl_range_some_none α).sup_eq_top
@@ -2038,12 +1264,6 @@ section Subsingleton
 
 variable {s : Set α}
 
-/- warning: set.subsingleton.image -> Set.Subsingleton.image is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {s : Set.{u1} α}, (Set.Subsingleton.{u1} α s) -> (forall (f : α -> β), Set.Subsingleton.{u2} β (Set.image.{u1, u2} α β f s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {s : Set.{u2} α}, (Set.Subsingleton.{u2} α s) -> (forall (f : α -> β), Set.Subsingleton.{u1} β (Set.image.{u2, u1} α β f s))
-Case conversion may be inaccurate. Consider using '#align set.subsingleton.image Set.Subsingleton.imageₓ'. -/
 /-- The image of a subsingleton is a subsingleton. -/
 theorem Subsingleton.image (hs : s.Subsingleton) (f : α → β) : (f '' s).Subsingleton :=
   fun _ ⟨x, hx, Hx⟩ _ ⟨y, hy, Hy⟩ => Hx ▸ Hy ▸ congr_arg f (hs hx hy)
@@ -2056,24 +1276,12 @@ theorem Subsingleton.preimage {s : Set β} (hs : s.Subsingleton) {f : α → β}
 #align set.subsingleton.preimage Set.Subsingleton.preimage
 -/
 
-/- warning: set.subsingleton_of_image -> Set.subsingleton_of_image is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β}, (Function.Injective.{succ u1, succ u2} α β f) -> (forall (s : Set.{u1} α), (Set.Subsingleton.{u2} β (Set.image.{u1, u2} α β f s)) -> (Set.Subsingleton.{u1} α s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Injective.{succ u2, succ u1} α β f) -> (forall (s : Set.{u2} α), (Set.Subsingleton.{u1} β (Set.image.{u2, u1} α β f s)) -> (Set.Subsingleton.{u2} α s))
-Case conversion may be inaccurate. Consider using '#align set.subsingleton_of_image Set.subsingleton_of_imageₓ'. -/
 /-- If the image of a set under an injective map is a subsingleton, the set is a subsingleton. -/
 theorem subsingleton_of_image {α β : Type _} {f : α → β} (hf : Function.Injective f) (s : Set α)
     (hs : (f '' s).Subsingleton) : s.Subsingleton :=
   (hs.Preimage hf).anti <| subset_preimage_image _ _
 #align set.subsingleton_of_image Set.subsingleton_of_image
 
-/- warning: set.subsingleton_of_preimage -> Set.subsingleton_of_preimage is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β}, (Function.Surjective.{succ u1, succ u2} α β f) -> (forall (s : Set.{u2} β), (Set.Subsingleton.{u1} α (Set.preimage.{u1, u2} α β f s)) -> (Set.Subsingleton.{u2} β s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Surjective.{succ u2, succ u1} α β f) -> (forall (s : Set.{u1} β), (Set.Subsingleton.{u2} α (Set.preimage.{u2, u1} α β f s)) -> (Set.Subsingleton.{u1} β s))
-Case conversion may be inaccurate. Consider using '#align set.subsingleton_of_preimage Set.subsingleton_of_preimageₓ'. -/
 /-- If the preimage of a set under an surjective map is a subsingleton,
 the set is a subsingleton. -/
 theorem subsingleton_of_preimage {α β : Type _} {f : α → β} (hf : Function.Surjective f) (s : Set β)
@@ -2098,12 +1306,6 @@ theorem Nontrivial.preimage {s : Set β} (hs : s.Nontrivial) {f : α → β}
 #align set.nontrivial.preimage Set.Nontrivial.preimage
 -/
 
-/- warning: set.nontrivial.image -> Set.Nontrivial.image is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {s : Set.{u1} α}, (Set.Nontrivial.{u1} α s) -> (forall {f : α -> β}, (Function.Injective.{succ u1, succ u2} α β f) -> (Set.Nontrivial.{u2} β (Set.image.{u1, u2} α β f s)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {s : Set.{u2} α}, (Set.Nontrivial.{u2} α s) -> (forall {f : α -> β}, (Function.Injective.{succ u2, succ u1} α β f) -> (Set.Nontrivial.{u1} β (Set.image.{u2, u1} α β f s)))
-Case conversion may be inaccurate. Consider using '#align set.nontrivial.image Set.Nontrivial.imageₓ'. -/
 /-- The image of a nontrivial set under an injective map is nontrivial. -/
 theorem Nontrivial.image (hs : s.Nontrivial) {f : α → β} (hf : Function.Injective f) :
     (f '' s).Nontrivial :=
@@ -2111,24 +1313,12 @@ theorem Nontrivial.image (hs : s.Nontrivial) {f : α → β} (hf : Function.Inje
   ⟨f x, mem_image_of_mem f hx, f y, mem_image_of_mem f hy, hf.Ne hxy⟩
 #align set.nontrivial.image Set.Nontrivial.image
 
-/- warning: set.nontrivial_of_image -> Set.nontrivial_of_image is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β) (s : Set.{u1} α), (Set.Nontrivial.{u2} β (Set.image.{u1, u2} α β f s)) -> (Set.Nontrivial.{u1} α s)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β) (s : Set.{u2} α), (Set.Nontrivial.{u1} β (Set.image.{u2, u1} α β f s)) -> (Set.Nontrivial.{u2} α s)
-Case conversion may be inaccurate. Consider using '#align set.nontrivial_of_image Set.nontrivial_of_imageₓ'. -/
 /-- If the image of a set is nontrivial, the set is nontrivial. -/
 theorem nontrivial_of_image (f : α → β) (s : Set α) (hs : (f '' s).Nontrivial) : s.Nontrivial :=
   let ⟨_, ⟨x, hx, rfl⟩, _, ⟨y, hy, rfl⟩, hxy⟩ := hs
   ⟨x, hx, y, hy, mt (congr_arg f) hxy⟩
 #align set.nontrivial_of_image Set.nontrivial_of_image
 
-/- warning: set.nontrivial_of_preimage -> Set.nontrivial_of_preimage is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β}, (Function.Injective.{succ u1, succ u2} α β f) -> (forall (s : Set.{u2} β), (Set.Nontrivial.{u1} α (Set.preimage.{u1, u2} α β f s)) -> (Set.Nontrivial.{u2} β s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Injective.{succ u2, succ u1} α β f) -> (forall (s : Set.{u1} β), (Set.Nontrivial.{u2} α (Set.preimage.{u2, u1} α β f s)) -> (Set.Nontrivial.{u1} β s))
-Case conversion may be inaccurate. Consider using '#align set.nontrivial_of_preimage Set.nontrivial_of_preimageₓ'. -/
 /-- If the preimage of a set under an injective map is nontrivial, the set is nontrivial. -/
 theorem nontrivial_of_preimage {f : α → β} (hf : Function.Injective f) (s : Set β)
     (hs : (f ⁻¹' s).Nontrivial) : s.Nontrivial :=
@@ -2145,83 +1335,35 @@ variable {f : α → β}
 
 open Set
 
-/- warning: function.surjective.preimage_injective -> Function.Surjective.preimage_injective is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β}, (Function.Surjective.{succ u1, succ u2} α β f) -> (Function.Injective.{succ u2, succ u1} (Set.{u2} β) (Set.{u1} α) (Set.preimage.{u1, u2} α β f))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Surjective.{succ u2, succ u1} α β f) -> (Function.Injective.{succ u1, succ u2} (Set.{u1} β) (Set.{u2} α) (Set.preimage.{u2, u1} α β f))
-Case conversion may be inaccurate. Consider using '#align function.surjective.preimage_injective Function.Surjective.preimage_injectiveₓ'. -/
 theorem Surjective.preimage_injective (hf : Surjective f) : Injective (preimage f) := fun s t =>
   (preimage_eq_preimage hf).1
 #align function.surjective.preimage_injective Function.Surjective.preimage_injective
 
-/- warning: function.injective.preimage_image -> Function.Injective.preimage_image is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β}, (Function.Injective.{succ u1, succ u2} α β f) -> (forall (s : Set.{u1} α), Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u2} α β f (Set.image.{u1, u2} α β f s)) s)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Injective.{succ u2, succ u1} α β f) -> (forall (s : Set.{u2} α), Eq.{succ u2} (Set.{u2} α) (Set.preimage.{u2, u1} α β f (Set.image.{u2, u1} α β f s)) s)
-Case conversion may be inaccurate. Consider using '#align function.injective.preimage_image Function.Injective.preimage_imageₓ'. -/
 theorem Injective.preimage_image (hf : Injective f) (s : Set α) : f ⁻¹' (f '' s) = s :=
   preimage_image_eq s hf
 #align function.injective.preimage_image Function.Injective.preimage_image
 
-/- warning: function.injective.preimage_surjective -> Function.Injective.preimage_surjective is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β}, (Function.Injective.{succ u1, succ u2} α β f) -> (Function.Surjective.{succ u2, succ u1} (Set.{u2} β) (Set.{u1} α) (Set.preimage.{u1, u2} α β f))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Injective.{succ u2, succ u1} α β f) -> (Function.Surjective.{succ u1, succ u2} (Set.{u1} β) (Set.{u2} α) (Set.preimage.{u2, u1} α β f))
-Case conversion may be inaccurate. Consider using '#align function.injective.preimage_surjective Function.Injective.preimage_surjectiveₓ'. -/
 theorem Injective.preimage_surjective (hf : Injective f) : Surjective (preimage f) := by intro s;
   use f '' s; rw [hf.preimage_image]
 #align function.injective.preimage_surjective Function.Injective.preimage_surjective
 
-/- warning: function.injective.subsingleton_image_iff -> Function.Injective.subsingleton_image_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β}, (Function.Injective.{succ u1, succ u2} α β f) -> (forall {s : Set.{u1} α}, Iff (Set.Subsingleton.{u2} β (Set.image.{u1, u2} α β f s)) (Set.Subsingleton.{u1} α s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Injective.{succ u2, succ u1} α β f) -> (forall {s : Set.{u2} α}, Iff (Set.Subsingleton.{u1} β (Set.image.{u2, u1} α β f s)) (Set.Subsingleton.{u2} α s))
-Case conversion may be inaccurate. Consider using '#align function.injective.subsingleton_image_iff Function.Injective.subsingleton_image_iffₓ'. -/
 theorem Injective.subsingleton_image_iff (hf : Injective f) {s : Set α} :
     (f '' s).Subsingleton ↔ s.Subsingleton :=
   ⟨subsingleton_of_image hf s, fun h => h.image f⟩
 #align function.injective.subsingleton_image_iff Function.Injective.subsingleton_image_iff
 
-/- warning: function.surjective.image_preimage -> Function.Surjective.image_preimage is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β}, (Function.Surjective.{succ u1, succ u2} α β f) -> (forall (s : Set.{u2} β), Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β f (Set.preimage.{u1, u2} α β f s)) s)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Surjective.{succ u2, succ u1} α β f) -> (forall (s : Set.{u1} β), Eq.{succ u1} (Set.{u1} β) (Set.image.{u2, u1} α β f (Set.preimage.{u2, u1} α β f s)) s)
-Case conversion may be inaccurate. Consider using '#align function.surjective.image_preimage Function.Surjective.image_preimageₓ'. -/
 theorem Surjective.image_preimage (hf : Surjective f) (s : Set β) : f '' (f ⁻¹' s) = s :=
   image_preimage_eq s hf
 #align function.surjective.image_preimage Function.Surjective.image_preimage
 
-/- warning: function.surjective.image_surjective -> Function.Surjective.image_surjective is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β}, (Function.Surjective.{succ u1, succ u2} α β f) -> (Function.Surjective.{succ u1, succ u2} (Set.{u1} α) (Set.{u2} β) (Set.image.{u1, u2} α β f))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Surjective.{succ u2, succ u1} α β f) -> (Function.Surjective.{succ u2, succ u1} (Set.{u2} α) (Set.{u1} β) (Set.image.{u2, u1} α β f))
-Case conversion may be inaccurate. Consider using '#align function.surjective.image_surjective Function.Surjective.image_surjectiveₓ'. -/
 theorem Surjective.image_surjective (hf : Surjective f) : Surjective (image f) := by intro s;
   use f ⁻¹' s; rw [hf.image_preimage]
 #align function.surjective.image_surjective Function.Surjective.image_surjective
 
-/- warning: function.surjective.nonempty_preimage -> Function.Surjective.nonempty_preimage is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β}, (Function.Surjective.{succ u1, succ u2} α β f) -> (forall {s : Set.{u2} β}, Iff (Set.Nonempty.{u1} α (Set.preimage.{u1, u2} α β f s)) (Set.Nonempty.{u2} β s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Surjective.{succ u2, succ u1} α β f) -> (forall {s : Set.{u1} β}, Iff (Set.Nonempty.{u2} α (Set.preimage.{u2, u1} α β f s)) (Set.Nonempty.{u1} β s))
-Case conversion may be inaccurate. Consider using '#align function.surjective.nonempty_preimage Function.Surjective.nonempty_preimageₓ'. -/
 theorem Surjective.nonempty_preimage (hf : Surjective f) {s : Set β} :
     (f ⁻¹' s).Nonempty ↔ s.Nonempty := by rw [← nonempty_image_iff, hf.image_preimage]
 #align function.surjective.nonempty_preimage Function.Surjective.nonempty_preimage
 
-/- warning: function.injective.image_injective -> Function.Injective.image_injective is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β}, (Function.Injective.{succ u1, succ u2} α β f) -> (Function.Injective.{succ u1, succ u2} (Set.{u1} α) (Set.{u2} β) (Set.image.{u1, u2} α β f))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Injective.{succ u2, succ u1} α β f) -> (Function.Injective.{succ u2, succ u1} (Set.{u2} α) (Set.{u1} β) (Set.image.{u2, u1} α β f))
-Case conversion may be inaccurate. Consider using '#align function.injective.image_injective Function.Injective.image_injectiveₓ'. -/
 theorem Injective.image_injective (hf : Injective f) : Injective (image f) := by intro s t h;
   rw [← preimage_image_eq s hf, ← preimage_image_eq t hf, h]
 #align function.injective.image_injective Function.Injective.image_injective
@@ -2233,45 +1375,21 @@ theorem Surjective.preimage_subset_preimage_iff {s t : Set β} (hf : Surjective
 #align function.surjective.preimage_subset_preimage_iff Function.Surjective.preimage_subset_preimage_iff
 -/
 
-/- warning: function.surjective.range_comp -> Function.Surjective.range_comp is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {ι : Sort.{u2}} {ι' : Sort.{u3}} {f : ι -> ι'}, (Function.Surjective.{u2, u3} ι ι' f) -> (forall (g : ι' -> α), Eq.{succ u1} (Set.{u1} α) (Set.range.{u1, u2} α ι (Function.comp.{u2, u3, succ u1} ι ι' α g f)) (Set.range.{u1, u3} α ι' g))
-but is expected to have type
-  forall {α : Sort.{u2}} {ι : Type.{u1}} {ι' : Sort.{u3}} {f : α -> ι'}, (Function.Surjective.{u2, u3} α ι' f) -> (forall (g : ι' -> ι), Eq.{succ u1} (Set.{u1} ι) (Set.range.{u1, u2} ι α (Function.comp.{u2, u3, succ u1} α ι' ι g f)) (Set.range.{u1, u3} ι ι' g))
-Case conversion may be inaccurate. Consider using '#align function.surjective.range_comp Function.Surjective.range_compₓ'. -/
 theorem Surjective.range_comp {f : ι → ι'} (hf : Surjective f) (g : ι' → α) :
     range (g ∘ f) = range g :=
   ext fun y => (@Surjective.exists _ _ _ hf fun x => g x = y).symm
 #align function.surjective.range_comp Function.Surjective.range_comp
 
-/- warning: function.injective.mem_range_iff_exists_unique -> Function.Injective.mem_range_iff_exists_unique is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β}, (Function.Injective.{succ u1, succ u2} α β f) -> (forall {b : β}, Iff (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) b (Set.range.{u2, succ u1} β α f)) (ExistsUnique.{succ u1} α (fun (a : α) => Eq.{succ u2} β (f a) b)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Injective.{succ u2, succ u1} α β f) -> (forall {b : β}, Iff (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) b (Set.range.{u1, succ u2} β α f)) (ExistsUnique.{succ u2} α (fun (a : α) => Eq.{succ u1} β (f a) b)))
-Case conversion may be inaccurate. Consider using '#align function.injective.mem_range_iff_exists_unique Function.Injective.mem_range_iff_exists_uniqueₓ'. -/
 theorem Injective.mem_range_iff_exists_unique (hf : Injective f) {b : β} :
     b ∈ range f ↔ ∃! a, f a = b :=
   ⟨fun ⟨a, h⟩ => ⟨a, h, fun a' ha => hf (ha.trans h.symm)⟩, ExistsUnique.exists⟩
 #align function.injective.mem_range_iff_exists_unique Function.Injective.mem_range_iff_exists_unique
 
-/- warning: function.injective.exists_unique_of_mem_range -> Function.Injective.exists_unique_of_mem_range is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β}, (Function.Injective.{succ u1, succ u2} α β f) -> (forall {b : β}, (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) b (Set.range.{u2, succ u1} β α f)) -> (ExistsUnique.{succ u1} α (fun (a : α) => Eq.{succ u2} β (f a) b)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Injective.{succ u2, succ u1} α β f) -> (forall {b : β}, (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) b (Set.range.{u1, succ u2} β α f)) -> (ExistsUnique.{succ u2} α (fun (a : α) => Eq.{succ u1} β (f a) b)))
-Case conversion may be inaccurate. Consider using '#align function.injective.exists_unique_of_mem_range Function.Injective.exists_unique_of_mem_rangeₓ'. -/
 theorem Injective.exists_unique_of_mem_range (hf : Injective f) {b : β} (hb : b ∈ range f) :
     ∃! a, f a = b :=
   hf.mem_range_iff_exists_unique.mp hb
 #align function.injective.exists_unique_of_mem_range Function.Injective.exists_unique_of_mem_range
 
-/- warning: function.injective.compl_image_eq -> Function.Injective.compl_image_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β}, (Function.Injective.{succ u1, succ u2} α β f) -> (forall (s : Set.{u1} α), Eq.{succ u2} (Set.{u2} β) (HasCompl.compl.{u2} (Set.{u2} β) (BooleanAlgebra.toHasCompl.{u2} (Set.{u2} β) (Set.booleanAlgebra.{u2} β)) (Set.image.{u1, u2} α β f s)) (Union.union.{u2} (Set.{u2} β) (Set.hasUnion.{u2} β) (Set.image.{u1, u2} α β f (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} β)) (Set.range.{u2, succ u1} β α f))))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Injective.{succ u2, succ u1} α β f) -> (forall (s : Set.{u2} α), Eq.{succ u1} (Set.{u1} β) (HasCompl.compl.{u1} (Set.{u1} β) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} β) (Set.instBooleanAlgebraSet.{u1} β)) (Set.image.{u2, u1} α β f s)) (Union.union.{u1} (Set.{u1} β) (Set.instUnionSet.{u1} β) (Set.image.{u2, u1} α β f (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} β)) (Set.range.{u1, succ u2} β α f))))
-Case conversion may be inaccurate. Consider using '#align function.injective.compl_image_eq Function.Injective.compl_image_eqₓ'. -/
 theorem Injective.compl_image_eq (hf : Injective f) (s : Set α) : (f '' s)ᶜ = f '' sᶜ ∪ range fᶜ :=
   by
   ext y
@@ -2281,22 +1399,10 @@ theorem Injective.compl_image_eq (hf : Injective f) (s : Set α) : (f '' s)ᶜ =
     simp [hx]
 #align function.injective.compl_image_eq Function.Injective.compl_image_eq
 
-/- warning: function.left_inverse.image_image -> Function.LeftInverse.image_image is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {g : β -> α}, (Function.LeftInverse.{succ u1, succ u2} α β g f) -> (forall (s : Set.{u1} α), Eq.{succ u1} (Set.{u1} α) (Set.image.{u2, u1} β α g (Set.image.{u1, u2} α β f s)) s)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {g : β -> α}, (Function.LeftInverse.{succ u2, succ u1} α β g f) -> (forall (s : Set.{u2} α), Eq.{succ u2} (Set.{u2} α) (Set.image.{u1, u2} β α g (Set.image.{u2, u1} α β f s)) s)
-Case conversion may be inaccurate. Consider using '#align function.left_inverse.image_image Function.LeftInverse.image_imageₓ'. -/
 theorem LeftInverse.image_image {g : β → α} (h : LeftInverse g f) (s : Set α) : g '' (f '' s) = s :=
   by rw [← image_comp, h.comp_eq_id, image_id]
 #align function.left_inverse.image_image Function.LeftInverse.image_image
 
-/- warning: function.left_inverse.preimage_preimage -> Function.LeftInverse.preimage_preimage is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {g : β -> α}, (Function.LeftInverse.{succ u1, succ u2} α β g f) -> (forall (s : Set.{u1} α), Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u2} α β f (Set.preimage.{u2, u1} β α g s)) s)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {g : β -> α}, (Function.LeftInverse.{succ u2, succ u1} α β g f) -> (forall (s : Set.{u2} α), Eq.{succ u2} (Set.{u2} α) (Set.preimage.{u2, u1} α β f (Set.preimage.{u1, u2} β α g s)) s)
-Case conversion may be inaccurate. Consider using '#align function.left_inverse.preimage_preimage Function.LeftInverse.preimage_preimageₓ'. -/
 theorem LeftInverse.preimage_preimage {g : β → α} (h : LeftInverse g f) (s : Set α) :
     f ⁻¹' (g ⁻¹' s) = s := by rw [← preimage_comp, h.comp_eq_id, preimage_id]
 #align function.left_inverse.preimage_preimage Function.LeftInverse.preimage_preimage
@@ -2309,12 +1415,6 @@ variable {E : Type _} [EquivLike E ι ι']
 
 include ι
 
-/- warning: equiv_like.range_comp -> EquivLike.range_comp is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {ι : Sort.{u2}} {ι' : Sort.{u3}} {E : Type.{u4}} [_inst_1 : EquivLike.{succ u4, u2, u3} E ι ι'] (f : ι' -> α) (e : E), Eq.{succ u1} (Set.{u1} α) (Set.range.{u1, u2} α ι (Function.comp.{u2, u3, succ u1} ι ι' α f (coeFn.{succ u4, imax u2 u3} E (fun (_x : E) => ι -> ι') (FunLike.hasCoeToFun.{succ u4, u2, u3} E ι (fun (_x : ι) => ι') (EmbeddingLike.toFunLike.{succ u4, u2, u3} E ι ι' (EquivLike.toEmbeddingLike.{succ u4, u2, u3} E ι ι' _inst_1))) e))) (Set.range.{u1, u3} α ι' f)
-but is expected to have type
-  forall {α : Sort.{u3}} {ι : Sort.{u2}} {ι' : Type.{u1}} [E : EquivLike.{succ u1, u3, u2} ι' α ι] {_inst_1 : Type.{u4}} (f : ι -> _inst_1) (e : ι'), Eq.{succ u4} (Set.{u4} _inst_1) (Set.range.{u4, u3} _inst_1 α (Function.comp.{u3, u2, succ u4} α ι _inst_1 f (FunLike.coe.{succ u1, u3, u2} ι' α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => ι) _x) (EmbeddingLike.toFunLike.{succ u1, u3, u2} ι' α ι (EquivLike.toEmbeddingLike.{succ u1, u3, u2} ι' α ι E)) e))) (Set.range.{u4, u2} _inst_1 ι f)
-Case conversion may be inaccurate. Consider using '#align equiv_like.range_comp EquivLike.range_compₓ'. -/
 @[simp]
 theorem range_comp (f : ι' → α) (e : E) : Set.range (f ∘ e) = Set.range f :=
   (EquivLike.surjective _).range_comp _
@@ -2397,55 +1497,25 @@ theorem coe_image_univ (s : Set α) : (coe : s → α) '' Set.univ = s :=
 #align subtype.coe_image_univ Subtype.coe_image_univ
 -/
 
-/- warning: subtype.image_preimage_coe -> Subtype.image_preimage_coe is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} (s : Set.{u1} α) (t : Set.{u1} α), Eq.{succ u1} (Set.{u1} α) (Set.image.{u1, u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeSubtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)))))) (Set.preimage.{u1, u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeSubtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)))))) t)) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) t s)
-but is expected to have type
-  forall {α : Type.{u1}} (s : Set.{u1} α) (t : Set.{u1} α), Eq.{succ u1} (Set.{u1} α) (Set.image.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) (Set.preimage.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) t)) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) t s)
-Case conversion may be inaccurate. Consider using '#align subtype.image_preimage_coe Subtype.image_preimage_coeₓ'. -/
 @[simp]
 theorem image_preimage_coe (s t : Set α) : (coe : s → α) '' (coe ⁻¹' t) = t ∩ s :=
   image_preimage_eq_inter_range.trans <| congr_arg _ range_coe
 #align subtype.image_preimage_coe Subtype.image_preimage_coe
 
-/- warning: subtype.image_preimage_val -> Subtype.image_preimage_val is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} (s : Set.{u1} α) (t : Set.{u1} α), Eq.{succ u1} (Set.{u1} α) (Set.image.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)) (Set.preimage.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)) t)) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) t s)
-but is expected to have type
-  forall {α : Type.{u1}} (s : Set.{u1} α) (t : Set.{u1} α), Eq.{succ u1} (Set.{u1} α) (Set.image.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) (Set.preimage.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) t)) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) t s)
-Case conversion may be inaccurate. Consider using '#align subtype.image_preimage_val Subtype.image_preimage_valₓ'. -/
 theorem image_preimage_val (s t : Set α) : (Subtype.val : s → α) '' (Subtype.val ⁻¹' t) = t ∩ s :=
   image_preimage_coe s t
 #align subtype.image_preimage_val Subtype.image_preimage_val
 
-/- warning: subtype.preimage_coe_eq_preimage_coe_iff -> Subtype.preimage_coe_eq_preimage_coe_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α} {u : Set.{u1} α}, Iff (Eq.{succ u1} (Set.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s)) (Set.preimage.{u1, u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeSubtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)))))) t) (Set.preimage.{u1, u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeSubtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)))))) u)) (Eq.{succ u1} (Set.{u1} α) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) t s) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) u s))
-but is expected to have type
-  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α} {u : Set.{u1} α}, Iff (Eq.{succ u1} (Set.{u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s))) (Set.preimage.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) t) (Set.preimage.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) u)) (Eq.{succ u1} (Set.{u1} α) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) t s) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) u s))
-Case conversion may be inaccurate. Consider using '#align subtype.preimage_coe_eq_preimage_coe_iff Subtype.preimage_coe_eq_preimage_coe_iffₓ'. -/
 theorem preimage_coe_eq_preimage_coe_iff {s t u : Set α} :
     (coe : s → α) ⁻¹' t = coe ⁻¹' u ↔ t ∩ s = u ∩ s := by
   rw [← image_preimage_coe, ← image_preimage_coe, coe_injective.image_injective.eq_iff]
 #align subtype.preimage_coe_eq_preimage_coe_iff Subtype.preimage_coe_eq_preimage_coe_iff
 
-/- warning: subtype.preimage_coe_inter_self -> Subtype.preimage_coe_inter_self is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} (s : Set.{u1} α) (t : Set.{u1} α), Eq.{succ u1} (Set.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s)) (Set.preimage.{u1, u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeSubtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)))))) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) t s)) (Set.preimage.{u1, u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeSubtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)))))) t)
-but is expected to have type
-  forall {α : Type.{u1}} (s : Set.{u1} α) (t : Set.{u1} α), Eq.{succ u1} (Set.{u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s))) (Set.preimage.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) t s)) (Set.preimage.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) t)
-Case conversion may be inaccurate. Consider using '#align subtype.preimage_coe_inter_self Subtype.preimage_coe_inter_selfₓ'. -/
 @[simp]
 theorem preimage_coe_inter_self (s t : Set α) : (coe : s → α) ⁻¹' (t ∩ s) = coe ⁻¹' t := by
   rw [preimage_coe_eq_preimage_coe_iff, inter_assoc, inter_self]
 #align subtype.preimage_coe_inter_self Subtype.preimage_coe_inter_self
 
-/- warning: subtype.preimage_val_eq_preimage_val_iff -> Subtype.preimage_val_eq_preimage_val_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} (s : Set.{u1} α) (t : Set.{u1} α) (u : Set.{u1} α), Iff (Eq.{succ u1} (Set.{u1} (Subtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s))) (Set.preimage.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)) t) (Set.preimage.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)) u)) (Eq.{succ u1} (Set.{u1} α) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) t s) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) u s))
-but is expected to have type
-  forall {α : Type.{u1}} (s : Set.{u1} α) (t : Set.{u1} α) (u : Set.{u1} α), Iff (Eq.{succ u1} (Set.{u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s))) (Set.preimage.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) t) (Set.preimage.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) u)) (Eq.{succ u1} (Set.{u1} α) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) t s) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) u s))
-Case conversion may be inaccurate. Consider using '#align subtype.preimage_val_eq_preimage_val_iff Subtype.preimage_val_eq_preimage_val_iffₓ'. -/
 theorem preimage_val_eq_preimage_val_iff (s t u : Set α) :
     (Subtype.val : s → α) ⁻¹' t = Subtype.val ⁻¹' u ↔ t ∩ s = u ∩ s :=
   preimage_coe_eq_preimage_coe_iff
@@ -2463,43 +1533,19 @@ theorem exists_set_subtype {t : Set α} (p : Set α → Prop) :
 #align subtype.exists_set_subtype Subtype.exists_set_subtype
 -/
 
-/- warning: subtype.preimage_coe_nonempty -> Subtype.preimage_coe_nonempty is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (Set.Nonempty.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) (Set.preimage.{u1, u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeSubtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)))))) t)) (Set.Nonempty.{u1} α (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) s t))
-but is expected to have type
-  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (Set.Nonempty.{u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) (Set.preimage.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) t)) (Set.Nonempty.{u1} α (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) s t))
-Case conversion may be inaccurate. Consider using '#align subtype.preimage_coe_nonempty Subtype.preimage_coe_nonemptyₓ'. -/
 theorem preimage_coe_nonempty {s t : Set α} : ((coe : s → α) ⁻¹' t).Nonempty ↔ (s ∩ t).Nonempty :=
   by rw [inter_comm, ← image_preimage_coe, nonempty_image_iff]
 #align subtype.preimage_coe_nonempty Subtype.preimage_coe_nonempty
 
-/- warning: subtype.preimage_coe_eq_empty -> Subtype.preimage_coe_eq_empty is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (Eq.{succ u1} (Set.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s)) (Set.preimage.{u1, u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeSubtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)))))) t) (EmptyCollection.emptyCollection.{u1} (Set.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s)) (Set.hasEmptyc.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s)))) (Eq.{succ u1} (Set.{u1} α) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) s t) (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.hasEmptyc.{u1} α)))
-but is expected to have type
-  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (Eq.{succ u1} (Set.{u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s))) (Set.preimage.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) t) (EmptyCollection.emptyCollection.{u1} (Set.{u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s))) (Set.instEmptyCollectionSet.{u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s))))) (Eq.{succ u1} (Set.{u1} α) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) s t) (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.instEmptyCollectionSet.{u1} α)))
-Case conversion may be inaccurate. Consider using '#align subtype.preimage_coe_eq_empty Subtype.preimage_coe_eq_emptyₓ'. -/
 theorem preimage_coe_eq_empty {s t : Set α} : (coe : s → α) ⁻¹' t = ∅ ↔ s ∩ t = ∅ := by
   simp only [← not_nonempty_iff_eq_empty, preimage_coe_nonempty]
 #align subtype.preimage_coe_eq_empty Subtype.preimage_coe_eq_empty
 
-/- warning: subtype.preimage_coe_compl -> Subtype.preimage_coe_compl is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} (s : Set.{u1} α), Eq.{succ u1} (Set.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s)) (Set.preimage.{u1, u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeSubtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)))))) (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s)) (EmptyCollection.emptyCollection.{u1} (Set.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s)) (Set.hasEmptyc.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s)))
-but is expected to have type
-  forall {α : Type.{u1}} (s : Set.{u1} α), Eq.{succ u1} (Set.{u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s))) (Set.preimage.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.instBooleanAlgebraSet.{u1} α)) s)) (EmptyCollection.emptyCollection.{u1} (Set.{u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s))) (Set.instEmptyCollectionSet.{u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s))))
-Case conversion may be inaccurate. Consider using '#align subtype.preimage_coe_compl Subtype.preimage_coe_complₓ'. -/
 @[simp]
 theorem preimage_coe_compl (s : Set α) : (coe : s → α) ⁻¹' sᶜ = ∅ :=
   preimage_coe_eq_empty.2 (inter_compl_self s)
 #align subtype.preimage_coe_compl Subtype.preimage_coe_compl
 
-/- warning: subtype.preimage_coe_compl' -> Subtype.preimage_coe_compl' is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} (s : Set.{u1} α), Eq.{succ u1} (Set.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s))) (Set.preimage.{u1, u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s)) α ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s)) α (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s)) α (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s)) α (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s)) α (coeSubtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s))))))) s) (EmptyCollection.emptyCollection.{u1} (Set.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s))) (Set.hasEmptyc.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s))))
-but is expected to have type
-  forall {α : Type.{u1}} (s : Set.{u1} α), Eq.{succ u1} (Set.{u1} (Set.Elem.{u1} α (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.instBooleanAlgebraSet.{u1} α)) s))) (Set.preimage.{u1, u1} (Set.Elem.{u1} α (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.instBooleanAlgebraSet.{u1} α)) s)) α (fun (x : Set.Elem.{u1} α (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.instBooleanAlgebraSet.{u1} α)) s)) => Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.instBooleanAlgebraSet.{u1} α)) s)) x) s) (EmptyCollection.emptyCollection.{u1} (Set.{u1} (Set.Elem.{u1} α (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.instBooleanAlgebraSet.{u1} α)) s))) (Set.instEmptyCollectionSet.{u1} (Set.Elem.{u1} α (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.instBooleanAlgebraSet.{u1} α)) s))))
-Case conversion may be inaccurate. Consider using '#align subtype.preimage_coe_compl' Subtype.preimage_coe_compl'ₓ'. -/
 @[simp]
 theorem preimage_coe_compl' (s : Set α) : (coe : sᶜ → α) ⁻¹' s = ∅ :=
   preimage_coe_eq_empty.2 (compl_inter_self s)
@@ -2514,12 +1560,6 @@ open Set
 
 namespace Option
 
-/- warning: option.injective_iff -> Option.injective_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : (Option.{u1} α) -> β}, Iff (Function.Injective.{succ u1, succ u2} (Option.{u1} α) β f) (And (Function.Injective.{succ u1, succ u2} α β (Function.comp.{succ u1, succ u1, succ u2} α (Option.{u1} α) β f (Option.some.{u1} α))) (Not (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) (f (Option.none.{u1} α)) (Set.range.{u2, succ u1} β α (Function.comp.{succ u1, succ u1, succ u2} α (Option.{u1} α) β f (Option.some.{u1} α))))))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : (Option.{u2} α) -> β}, Iff (Function.Injective.{succ u2, succ u1} (Option.{u2} α) β f) (And (Function.Injective.{succ u2, succ u1} α β (Function.comp.{succ u2, succ u2, succ u1} α (Option.{u2} α) β f (Option.some.{u2} α))) (Not (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) (f (Option.none.{u2} α)) (Set.range.{u1, succ u2} β α (Function.comp.{succ u2, succ u2, succ u1} α (Option.{u2} α) β f (Option.some.{u2} α))))))
-Case conversion may be inaccurate. Consider using '#align option.injective_iff Option.injective_iffₓ'. -/
 theorem injective_iff {α β} {f : Option α → β} :
     Injective f ↔ Injective (f ∘ some) ∧ f none ∉ range (f ∘ some) :=
   by
@@ -2530,35 +1570,17 @@ theorem injective_iff {α β} {f : Option α → β} :
   exacts[rfl, (h_none _ hab.symm).elim, (h_none _ hab).elim, congr_arg some (h_some hab)]
 #align option.injective_iff Option.injective_iff
 
-/- warning: option.range_eq -> Option.range_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : (Option.{u1} α) -> β), Eq.{succ u2} (Set.{u2} β) (Set.range.{u2, succ u1} β (Option.{u1} α) f) (Insert.insert.{u2, u2} β (Set.{u2} β) (Set.hasInsert.{u2} β) (f (Option.none.{u1} α)) (Set.range.{u2, succ u1} β α (Function.comp.{succ u1, succ u1, succ u2} α (Option.{u1} α) β f (Option.some.{u1} α))))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : (Option.{u2} α) -> β), Eq.{succ u1} (Set.{u1} β) (Set.range.{u1, succ u2} β (Option.{u2} α) f) (Insert.insert.{u1, u1} β (Set.{u1} β) (Set.instInsertSet.{u1} β) (f (Option.none.{u2} α)) (Set.range.{u1, succ u2} β α (Function.comp.{succ u2, succ u2, succ u1} α (Option.{u2} α) β f (Option.some.{u2} α))))
-Case conversion may be inaccurate. Consider using '#align option.range_eq Option.range_eqₓ'. -/
 theorem range_eq {α β} (f : Option α → β) : range f = insert (f none) (range (f ∘ some)) :=
   Set.ext fun y => Option.exists.trans <| eq_comm.Or Iff.rfl
 #align option.range_eq Option.range_eq
 
 end Option
 
-/- warning: with_bot.range_eq -> WithBot.range_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : (WithBot.{u1} α) -> β), Eq.{succ u2} (Set.{u2} β) (Set.range.{u2, succ u1} β (WithBot.{u1} α) f) (Insert.insert.{u2, u2} β (Set.{u2} β) (Set.hasInsert.{u2} β) (f (Bot.bot.{u1} (WithBot.{u1} α) (WithBot.hasBot.{u1} α))) (Set.range.{u2, succ u1} β α (Function.comp.{succ u1, succ u1, succ u2} α (WithBot.{u1} α) β f ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) α (WithBot.{u1} α) (HasLiftT.mk.{succ u1, succ u1} α (WithBot.{u1} α) (CoeTCₓ.coe.{succ u1, succ u1} α (WithBot.{u1} α) (WithBot.hasCoeT.{u1} α)))))))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : (WithBot.{u2} α) -> β), Eq.{succ u1} (Set.{u1} β) (Set.range.{u1, succ u2} β (WithBot.{u2} α) f) (Insert.insert.{u1, u1} β (Set.{u1} β) (Set.instInsertSet.{u1} β) (f (Bot.bot.{u2} (WithBot.{u2} α) (WithBot.bot.{u2} α))) (Set.range.{u1, succ u2} β α (Function.comp.{succ u2, succ u2, succ u1} α (WithBot.{u2} α) β f (WithBot.some.{u2} α))))
-Case conversion may be inaccurate. Consider using '#align with_bot.range_eq WithBot.range_eqₓ'. -/
 theorem WithBot.range_eq {α β} (f : WithBot α → β) :
     range f = insert (f ⊥) (range (f ∘ coe : α → β)) :=
   Option.range_eq f
 #align with_bot.range_eq WithBot.range_eq
 
-/- warning: with_top.range_eq -> WithTop.range_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : (WithTop.{u1} α) -> β), Eq.{succ u2} (Set.{u2} β) (Set.range.{u2, succ u1} β (WithTop.{u1} α) f) (Insert.insert.{u2, u2} β (Set.{u2} β) (Set.hasInsert.{u2} β) (f (Top.top.{u1} (WithTop.{u1} α) (WithTop.hasTop.{u1} α))) (Set.range.{u2, succ u1} β α (Function.comp.{succ u1, succ u1, succ u2} α (WithTop.{u1} α) β f ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) α (WithTop.{u1} α) (HasLiftT.mk.{succ u1, succ u1} α (WithTop.{u1} α) (CoeTCₓ.coe.{succ u1, succ u1} α (WithTop.{u1} α) (WithTop.hasCoeT.{u1} α)))))))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : (WithTop.{u2} α) -> β), Eq.{succ u1} (Set.{u1} β) (Set.range.{u1, succ u2} β (WithTop.{u2} α) f) (Insert.insert.{u1, u1} β (Set.{u1} β) (Set.instInsertSet.{u1} β) (f (Top.top.{u2} (WithTop.{u2} α) (WithTop.top.{u2} α))) (Set.range.{u1, succ u2} β α (Function.comp.{succ u2, succ u2, succ u1} α (WithTop.{u2} α) β f (WithBot.some.{u2} α))))
-Case conversion may be inaccurate. Consider using '#align with_top.range_eq WithTop.range_eqₓ'. -/
 theorem WithTop.range_eq {α β} (f : WithTop α → β) :
     range f = insert (f ⊤) (range (f ∘ coe : α → β)) :=
   Option.range_eq f
@@ -2640,12 +1662,6 @@ section Disjoint
 
 variable {f : α → β} {s t : Set α}
 
-/- warning: disjoint.preimage -> Disjoint.preimage is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β) {s : Set.{u2} β} {t : Set.{u2} β}, (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} β))) s t) -> (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} α))) (Set.preimage.{u1, u2} α β f s) (Set.preimage.{u1, u2} α β f t))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β) {s : Set.{u2} β} {t : Set.{u2} β}, (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} β))) s t) -> (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} α))) (Set.preimage.{u1, u2} α β f s) (Set.preimage.{u1, u2} α β f t))
-Case conversion may be inaccurate. Consider using '#align disjoint.preimage Disjoint.preimageₓ'. -/
 theorem Disjoint.preimage (f : α → β) {s t : Set β} (h : Disjoint s t) :
     Disjoint (f ⁻¹' s) (f ⁻¹' t) :=
   disjoint_iff_inf_le.mpr fun x hx => h.le_bot hx
@@ -2653,88 +1669,40 @@ theorem Disjoint.preimage (f : α → β) {s t : Set β} (h : Disjoint s t) :
 
 namespace Set
 
-/- warning: set.disjoint_image_image -> Set.disjoint_image_image is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {f : β -> α} {g : γ -> α} {s : Set.{u2} β} {t : Set.{u3} γ}, (forall (b : β), (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) b s) -> (forall (c : γ), (Membership.Mem.{u3, u3} γ (Set.{u3} γ) (Set.hasMem.{u3} γ) c t) -> (Ne.{succ u1} α (f b) (g c)))) -> (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} α))) (Set.image.{u2, u1} β α f s) (Set.image.{u3, u1} γ α g t))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u3}} {γ : Type.{u2}} {f : β -> α} {g : γ -> α} {s : Set.{u3} β} {t : Set.{u2} γ}, (forall (b : β), (Membership.mem.{u3, u3} β (Set.{u3} β) (Set.instMembershipSet.{u3} β) b s) -> (forall (c : γ), (Membership.mem.{u2, u2} γ (Set.{u2} γ) (Set.instMembershipSet.{u2} γ) c t) -> (Ne.{succ u1} α (f b) (g c)))) -> (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} α))) (Set.image.{u3, u1} β α f s) (Set.image.{u2, u1} γ α g t))
-Case conversion may be inaccurate. Consider using '#align set.disjoint_image_image Set.disjoint_image_imageₓ'. -/
 theorem disjoint_image_image {f : β → α} {g : γ → α} {s : Set β} {t : Set γ}
     (h : ∀ b ∈ s, ∀ c ∈ t, f b ≠ g c) : Disjoint (f '' s) (g '' t) :=
   disjoint_iff_inf_le.mpr <| by rintro a ⟨⟨b, hb, eq⟩, c, hc, rfl⟩ <;> exact h b hb c hc Eq
 #align set.disjoint_image_image Set.disjoint_image_image
 
-/- warning: set.disjoint_image_of_injective -> Set.disjoint_image_of_injective is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β}, (Function.Injective.{succ u1, succ u2} α β f) -> (forall {s : Set.{u1} α} {t : Set.{u1} α}, (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} α))) s t) -> (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} β))) (Set.image.{u1, u2} α β f s) (Set.image.{u1, u2} α β f t)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Injective.{succ u2, succ u1} α β f) -> (forall {s : Set.{u2} α} {t : Set.{u2} α}, (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} α))) s t) -> (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} β))) (Set.image.{u2, u1} α β f s) (Set.image.{u2, u1} α β f t)))
-Case conversion may be inaccurate. Consider using '#align set.disjoint_image_of_injective Set.disjoint_image_of_injectiveₓ'. -/
 theorem disjoint_image_of_injective {f : α → β} (hf : Injective f) {s t : Set α}
     (hd : Disjoint s t) : Disjoint (f '' s) (f '' t) :=
   disjoint_image_image fun x hx y hy => hf.Ne fun H => Set.disjoint_iff.1 hd ⟨hx, H.symm ▸ hy⟩
 #align set.disjoint_image_of_injective Set.disjoint_image_of_injective
 
-/- warning: disjoint.of_image -> Disjoint.of_image is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u1} α} {t : Set.{u1} α}, (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} β))) (Set.image.{u1, u2} α β f s) (Set.image.{u1, u2} α β f t)) -> (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} α))) s t)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u1} α} {t : Set.{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} β))) (Set.image.{u1, u2} α β f s) (Set.image.{u1, u2} α β f t)) -> (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} α))) s t)
-Case conversion may be inaccurate. Consider using '#align disjoint.of_image Disjoint.of_imageₓ'. -/
 theorem Disjoint.of_image (h : Disjoint (f '' s) (f '' t)) : Disjoint s t :=
   disjoint_iff_inf_le.mpr fun x hx =>
     disjoint_left.1 h (mem_image_of_mem _ hx.1) (mem_image_of_mem _ hx.2)
 #align disjoint.of_image Disjoint.of_image
 
-/- warning: set.disjoint_image_iff -> Set.disjoint_image_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u1} α} {t : Set.{u1} α}, (Function.Injective.{succ u1, succ u2} α β f) -> (Iff (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} β))) (Set.image.{u1, u2} α β f s) (Set.image.{u1, u2} α β f t)) (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} α))) s t))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {s : Set.{u2} α} {t : Set.{u2} α}, (Function.Injective.{succ u2, succ u1} α β f) -> (Iff (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} β))) (Set.image.{u2, u1} α β f s) (Set.image.{u2, u1} α β f t)) (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} α))) s t))
-Case conversion may be inaccurate. Consider using '#align set.disjoint_image_iff Set.disjoint_image_iffₓ'. -/
 theorem disjoint_image_iff (hf : Injective f) : Disjoint (f '' s) (f '' t) ↔ Disjoint s t :=
   ⟨Disjoint.of_image, disjoint_image_of_injective hf⟩
 #align set.disjoint_image_iff Set.disjoint_image_iff
 
-/- warning: disjoint.of_preimage -> Disjoint.of_preimage is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β}, (Function.Surjective.{succ u1, succ u2} α β f) -> (forall {s : Set.{u2} β} {t : Set.{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} α))) (Set.preimage.{u1, u2} α β f s) (Set.preimage.{u1, u2} α β f t)) -> (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} β))) s t))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Surjective.{succ u2, succ u1} α β f) -> (forall {s : Set.{u1} β} {t : Set.{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} α))) (Set.preimage.{u2, u1} α β f s) (Set.preimage.{u2, u1} α β f t)) -> (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} β))) s t))
-Case conversion may be inaccurate. Consider using '#align disjoint.of_preimage Disjoint.of_preimageₓ'. -/
 theorem Disjoint.of_preimage (hf : Surjective f) {s t : Set β} (h : Disjoint (f ⁻¹' s) (f ⁻¹' t)) :
     Disjoint s t := by
   rw [disjoint_iff_inter_eq_empty, ← image_preimage_eq (_ ∩ _) hf, preimage_inter, h.inter_eq,
     image_empty]
 #align disjoint.of_preimage Disjoint.of_preimage
 
-/- warning: set.disjoint_preimage_iff -> Set.disjoint_preimage_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β}, (Function.Surjective.{succ u1, succ u2} α β f) -> (forall {s : Set.{u2} β} {t : Set.{u2} β}, Iff (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} α))) (Set.preimage.{u1, u2} α β f s) (Set.preimage.{u1, u2} α β f t)) (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} β))) s t))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Surjective.{succ u2, succ u1} α β f) -> (forall {s : Set.{u1} β} {t : Set.{u1} β}, Iff (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} α))) (Set.preimage.{u2, u1} α β f s) (Set.preimage.{u2, u1} α β f t)) (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} β))) s t))
-Case conversion may be inaccurate. Consider using '#align set.disjoint_preimage_iff Set.disjoint_preimage_iffₓ'. -/
 theorem disjoint_preimage_iff (hf : Surjective f) {s t : Set β} :
     Disjoint (f ⁻¹' s) (f ⁻¹' t) ↔ Disjoint s t :=
   ⟨Disjoint.of_preimage hf, Disjoint.preimage _⟩
 #align set.disjoint_preimage_iff Set.disjoint_preimage_iff
 
-/- warning: set.preimage_eq_empty -> Set.preimage_eq_empty is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u2} β}, (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} β))) s (Set.range.{u2, succ u1} β α f)) -> (Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u2} α β f s) (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.hasEmptyc.{u1} α)))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u2} β}, (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} β))) s (Set.range.{u2, succ u1} β α f)) -> (Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u2} α β f s) (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.instEmptyCollectionSet.{u1} α)))
-Case conversion may be inaccurate. Consider using '#align set.preimage_eq_empty Set.preimage_eq_emptyₓ'. -/
 theorem preimage_eq_empty {f : α → β} {s : Set β} (h : Disjoint s (range f)) : f ⁻¹' s = ∅ := by
   simpa using h.preimage f
 #align set.preimage_eq_empty Set.preimage_eq_empty
 
-/- warning: set.preimage_eq_empty_iff -> Set.preimage_eq_empty_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u2} β}, Iff (Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u2} α β f s) (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.hasEmptyc.{u1} α))) (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} β))) s (Set.range.{u2, succ u1} β α f))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u2} β}, Iff (Eq.{succ u1} (Set.{u1} α) (Set.preimage.{u1, u2} α β f s) (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.instEmptyCollectionSet.{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} β))) s (Set.range.{u2, succ u1} β α f))
-Case conversion may be inaccurate. Consider using '#align set.preimage_eq_empty_iff Set.preimage_eq_empty_iffₓ'. -/
 theorem preimage_eq_empty_iff {s : Set β} : f ⁻¹' s = ∅ ↔ Disjoint s (range f) :=
   ⟨fun h =>
     by
Diff
@@ -81,10 +81,8 @@ theorem mem_preimage {s : Set β} {a : α} : a ∈ f ⁻¹' s ↔ f a ∈ s :=
 -/
 
 #print Set.preimage_congr /-
-theorem preimage_congr {f g : α → β} {s : Set β} (h : ∀ x : α, f x = g x) : f ⁻¹' s = g ⁻¹' s :=
-  by
-  congr with x
-  apply_assumption
+theorem preimage_congr {f g : α → β} {s : Set β} (h : ∀ x : α, f x = g x) : f ⁻¹' s = g ⁻¹' s := by
+  congr with x; apply_assumption
 #align set.preimage_congr Set.preimage_congr
 -/
 
@@ -209,9 +207,7 @@ theorem preimage_const_of_not_mem {b : β} {s : Set β} (h : b ∉ s) : (fun x :
 
 #print Set.preimage_const /-
 theorem preimage_const (b : β) (s : Set β) [Decidable (b ∈ s)] :
-    (fun x : α => b) ⁻¹' s = if b ∈ s then univ else ∅ :=
-  by
-  split_ifs with hb hb
+    (fun x : α => b) ⁻¹' s = if b ∈ s then univ else ∅ := by split_ifs with hb hb;
   exacts[preimage_const_of_mem hb, preimage_const_of_not_mem hb]
 #align set.preimage_const Set.preimage_const
 -/
@@ -259,9 +255,7 @@ theorem preimage_preimage {g : β → γ} {f : α → β} {s : Set γ} :
 #print Set.eq_preimage_subtype_val_iff /-
 theorem eq_preimage_subtype_val_iff {p : α → Prop} {s : Set (Subtype p)} {t : Set α} :
     s = Subtype.val ⁻¹' t ↔ ∀ (x) (h : p x), (⟨x, h⟩ : Subtype p) ∈ s ↔ x ∈ t :=
-  ⟨fun s_eq x h => by
-    rw [s_eq]
-    simp, fun h => ext fun ⟨x, hx⟩ => by simp [h]⟩
+  ⟨fun s_eq x h => by rw [s_eq]; simp, fun h => ext fun ⟨x, hx⟩ => by simp [h]⟩
 #align set.eq_preimage_subtype_val_iff Set.eq_preimage_subtype_val_iff
 -/
 
@@ -489,10 +483,8 @@ but is expected to have type
 Case conversion may be inaccurate. Consider using '#align set.image_subset Set.image_subsetₓ'. -/
 /-- Image is monotone with respect to `⊆`. See `set.monotone_image` for the statement in
 terms of `≤`. -/
-theorem image_subset {a b : Set α} (f : α → β) (h : a ⊆ b) : f '' a ⊆ f '' b :=
-  by
-  simp only [subset_def, mem_image]
-  exact fun x => fun ⟨w, h1, h2⟩ => ⟨w, h h1, h2⟩
+theorem image_subset {a b : Set α} (f : α → β) (h : a ⊆ b) : f '' a ⊆ f '' b := by
+  simp only [subset_def, mem_image]; exact fun x => fun ⟨w, h1, h2⟩ => ⟨w, h h1, h2⟩
 #align set.image_subset Set.image_subset
 
 /- warning: set.monotone_image -> Set.monotone_image is a dubious translation:
@@ -519,9 +511,7 @@ theorem image_union (f : α → β) (s t : Set α) : f '' (s ∪ t) = f '' s ∪
 
 #print Set.image_empty /-
 @[simp]
-theorem image_empty (f : α → β) : f '' ∅ = ∅ := by
-  ext
-  simp
+theorem image_empty (f : α → β) : f '' ∅ = ∅ := by ext; simp
 #align set.image_empty Set.image_empty
 -/
 
@@ -566,10 +556,7 @@ theorem image_univ_of_surjective {ι : Type _} {f : ι → β} (H : Surjective f
 
 #print Set.image_singleton /-
 @[simp]
-theorem image_singleton {f : α → β} {a : α} : f '' {a} = {f a} :=
-  by
-  ext
-  simp [image, eq_comm]
+theorem image_singleton {f : α → β} {a : α} : f '' {a} = {f a} := by ext; simp [image, eq_comm]
 #align set.image_singleton Set.image_singleton
 -/
 
@@ -616,10 +603,7 @@ theorem mem_compl_image [BooleanAlgebra α] (t : α) (S : Set α) : t ∈ compl
 #print Set.image_id' /-
 /-- A variant of `image_id` -/
 @[simp]
-theorem image_id' (s : Set α) : (fun x => x) '' s = s :=
-  by
-  ext
-  simp
+theorem image_id' (s : Set α) : (fun x => x) '' s = s := by ext; simp
 #align set.image_id' Set.image_id'
 -/
 
@@ -641,9 +625,7 @@ but is expected to have type
   forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {a : α} {s : Set.{u2} α}, Eq.{succ u1} (Set.{u1} β) (Set.image.{u2, u1} α β f (Insert.insert.{u2, u2} α (Set.{u2} α) (Set.instInsertSet.{u2} α) a s)) (Insert.insert.{u1, u1} β (Set.{u1} β) (Set.instInsertSet.{u1} β) (f a) (Set.image.{u2, u1} α β f s))
 Case conversion may be inaccurate. Consider using '#align set.image_insert_eq Set.image_insert_eqₓ'. -/
 theorem image_insert_eq {f : α → β} {a : α} {s : Set α} : f '' insert a s = insert (f a) (f '' s) :=
-  by
-  ext
-  simp [and_or_left, exists_or, eq_comm, or_comm', and_comm']
+  by ext; simp [and_or_left, exists_or, eq_comm, or_comm', and_comm']
 #align set.image_insert_eq Set.image_insert_eq
 
 #print Set.image_pair /-
@@ -712,9 +694,7 @@ but is expected to have type
   forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {s : Set.{u2} α}, (Function.Surjective.{succ u2, succ u1} α β f) -> (HasSubset.Subset.{u1} (Set.{u1} β) (Set.instHasSubsetSet.{u1} β) (HasCompl.compl.{u1} (Set.{u1} β) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} β) (Set.instBooleanAlgebraSet.{u1} β)) (Set.image.{u2, u1} α β f s)) (Set.image.{u2, u1} α β f (HasCompl.compl.{u2} (Set.{u2} α) (BooleanAlgebra.toHasCompl.{u2} (Set.{u2} α) (Set.instBooleanAlgebraSet.{u2} α)) s)))
 Case conversion may be inaccurate. Consider using '#align set.subset_image_compl Set.subset_image_complₓ'. -/
 theorem subset_image_compl {f : α → β} {s : Set α} (H : Surjective f) : (f '' s)ᶜ ⊆ f '' sᶜ :=
-  compl_subset_iff_union.2 <| by
-    rw [← image_union]
-    simp [image_univ_of_surjective H]
+  compl_subset_iff_union.2 <| by rw [← image_union]; simp [image_univ_of_surjective H]
 #align set.subset_image_compl Set.subset_image_compl
 
 /- warning: set.image_compl_eq -> Set.image_compl_eq is a dubious translation:
@@ -1165,9 +1145,7 @@ but is expected to have type
 Case conversion may be inaccurate. Consider using '#align set.forall_subtype_range_iff Set.forall_subtype_range_iffₓ'. -/
 theorem forall_subtype_range_iff {p : range f → Prop} :
     (∀ a : range f, p a) ↔ ∀ i, p ⟨f i, mem_range_self _⟩ :=
-  ⟨fun H i => H _, fun H ⟨y, i, hi⟩ => by
-    subst hi
-    apply H⟩
+  ⟨fun H i => H _, fun H ⟨y, i, hi⟩ => by subst hi; apply H⟩
 #align set.forall_subtype_range_iff Set.forall_subtype_range_iff
 
 /- warning: set.exists_range_iff -> Set.exists_range_iff is a dubious translation:
@@ -1197,9 +1175,7 @@ but is expected to have type
 Case conversion may be inaccurate. Consider using '#align set.exists_subtype_range_iff Set.exists_subtype_range_iffₓ'. -/
 theorem exists_subtype_range_iff {p : range f → Prop} :
     (∃ a : range f, p a) ↔ ∃ i, p ⟨f i, mem_range_self _⟩ :=
-  ⟨fun ⟨⟨a, i, hi⟩, ha⟩ => by
-    subst a
-    exact ⟨i, ha⟩, fun ⟨i, hi⟩ => ⟨_, hi⟩⟩
+  ⟨fun ⟨⟨a, i, hi⟩, ha⟩ => by subst a; exact ⟨i, ha⟩, fun ⟨i, hi⟩ => ⟨_, hi⟩⟩
 #align set.exists_subtype_range_iff Set.exists_subtype_range_iff
 
 /- warning: set.range_iff_surjective -> Set.range_iff_surjective is a dubious translation:
@@ -1223,10 +1199,7 @@ alias range_iff_surjective ↔ _ _root_.function.surjective.range_eq
 
 #print Set.image_univ /-
 @[simp]
-theorem image_univ {f : α → β} : f '' univ = range f :=
-  by
-  ext
-  simp [image, range]
+theorem image_univ {f : α → β} : f '' univ = range f := by ext; simp [image, range]
 #align set.image_univ Set.image_univ
 -/
 
@@ -1252,9 +1225,7 @@ theorem mem_range_of_mem_image (f : α → β) (s) {x : β} (h : x ∈ f '' s) :
 
 #print Nat.mem_range_succ /-
 theorem Nat.mem_range_succ (i : ℕ) : i ∈ range Nat.succ ↔ 0 < i :=
-  ⟨by
-    rintro ⟨n, rfl⟩
-    exact Nat.succ_pos n, fun h => ⟨_, Nat.succ_pred_eq_of_pos h⟩⟩
+  ⟨by rintro ⟨n, rfl⟩; exact Nat.succ_pos n, fun h => ⟨_, Nat.succ_pred_eq_of_pos h⟩⟩
 #align nat.mem_range_succ Nat.mem_range_succ
 -/
 
@@ -1290,9 +1261,7 @@ theorem range_subset_iff : range f ⊆ s ↔ ∀ y, f y ∈ s :=
 
 #print Set.range_eq_iff /-
 theorem range_eq_iff (f : α → β) (s : Set β) :
-    range f = s ↔ (∀ a, f a ∈ s) ∧ ∀ b ∈ s, ∃ a, f a = b :=
-  by
-  rw [← range_subset_iff]
+    range f = s ↔ (∀ a, f a ∈ s) ∧ ∀ b ∈ s, ∃ a, f a = b := by rw [← range_subset_iff];
   exact le_antisymm_iff
 #align set.range_eq_iff Set.range_eq_iff
 -/
@@ -1369,12 +1338,8 @@ theorem insert_image_compl_eq_range (f : α → β) (x : α) : insert (f x) (f '
     · exact ⟨x', h⟩
   · rintro ⟨x', h⟩
     by_cases hx : x' = x
-    · left
-      rw [← h, hx]
-    · right
-      refine' ⟨_, _, h⟩
-      rw [mem_compl_singleton_iff]
-      exact hx
+    · left; rw [← h, hx]
+    · right; refine' ⟨_, _, h⟩; rw [mem_compl_singleton_iff]; exact hx
 #align set.insert_image_compl_eq_range Set.insert_image_compl_eq_range
 
 /- warning: set.image_preimage_eq_inter_range -> Set.image_preimage_eq_inter_range is a dubious translation:
@@ -1397,10 +1362,7 @@ theorem image_preimage_eq_of_subset {f : α → β} {s : Set β} (hs : s ⊆ ran
 
 #print Set.image_preimage_eq_iff /-
 theorem image_preimage_eq_iff {f : α → β} {s : Set β} : f '' (f ⁻¹' s) = s ↔ s ⊆ range f :=
-  ⟨by
-    intro h
-    rw [← h]
-    apply image_subset_range, image_preimage_eq_of_subset⟩
+  ⟨by intro h; rw [← h]; apply image_subset_range, image_preimage_eq_of_subset⟩
 #align set.image_preimage_eq_iff Set.image_preimage_eq_iff
 -/
 
@@ -1442,9 +1404,7 @@ Case conversion may be inaccurate. Consider using '#align set.preimage_subset_pr
 theorem preimage_subset_preimage_iff {s t : Set α} {f : β → α} (hs : s ⊆ range f) :
     f ⁻¹' s ⊆ f ⁻¹' t ↔ s ⊆ t := by
   constructor
-  · intro h x hx
-    rcases hs hx with ⟨y, rfl⟩
-    exact h hx
+  · intro h x hx; rcases hs hx with ⟨y, rfl⟩; exact h hx
   intro h x; apply h
 #align set.preimage_subset_preimage_iff Set.preimage_subset_preimage_iff
 
@@ -1457,9 +1417,7 @@ Case conversion may be inaccurate. Consider using '#align set.preimage_eq_preima
 theorem preimage_eq_preimage' {s t : Set α} {f : β → α} (hs : s ⊆ range f) (ht : t ⊆ range f) :
     f ⁻¹' s = f ⁻¹' t ↔ s = t := by
   constructor
-  · intro h
-    apply subset.antisymm
-    rw [← preimage_subset_preimage_iff hs, h]
+  · intro h; apply subset.antisymm; rw [← preimage_subset_preimage_iff hs, h]
     rw [← preimage_subset_preimage_iff ht, h]
   rintro rfl; rfl
 #align set.preimage_eq_preimage' Set.preimage_eq_preimage'
@@ -1561,10 +1519,7 @@ but is expected to have type
   forall {α : Type.{u2}} {β : Type.{u1}}, IsCompl.{max u2 u1} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (SemilatticeInf.toPartialOrder.{max u2 u1} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (Lattice.toSemilatticeInf.{max u2 u1} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (GeneralizedCoheytingAlgebra.toLattice.{max u2 u1} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (CoheytingAlgebra.toGeneralizedCoheytingAlgebra.{max u2 u1} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (BiheytingAlgebra.toCoheytingAlgebra.{max u2 u1} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (BooleanAlgebra.toBiheytingAlgebra.{max u2 u1} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (Set.instBooleanAlgebraSet.{max u2 u1} (Sum.{u2, u1} α β)))))))) (BooleanAlgebra.toBoundedOrder.{max u2 u1} (Set.{max u2 u1} (Sum.{u2, u1} α β)) (Set.instBooleanAlgebraSet.{max u2 u1} (Sum.{u2, u1} α β))) (Set.range.{max u2 u1, succ u2} (Sum.{u2, u1} α β) α (Sum.inl.{u2, u1} α β)) (Set.range.{max u2 u1, succ u1} (Sum.{u2, u1} α β) β (Sum.inr.{u2, u1} α β))
 Case conversion may be inaccurate. Consider using '#align set.is_compl_range_inl_range_inr Set.isCompl_range_inl_range_inrₓ'. -/
 theorem isCompl_range_inl_range_inr : IsCompl (range <| @Sum.inl α β) (range Sum.inr) :=
-  IsCompl.of_le
-    (by
-      rintro y ⟨⟨x₁, rfl⟩, ⟨x₂, _⟩⟩
-      cc)
+  IsCompl.of_le (by rintro y ⟨⟨x₁, rfl⟩, ⟨x₂, _⟩⟩; cc)
     (by rintro (x | y) - <;> [left;right] <;> exact mem_range_self _)
 #align set.is_compl_range_inl_range_inr Set.isCompl_range_inl_range_inr
 
@@ -1614,10 +1569,7 @@ theorem range_inr_inter_range_inl : range (Sum.inr : β → Sum α β) ∩ range
 
 #print Set.preimage_inl_image_inr /-
 @[simp]
-theorem preimage_inl_image_inr (s : Set β) : Sum.inl ⁻¹' (@Sum.inr α β '' s) = ∅ :=
-  by
-  ext
-  simp
+theorem preimage_inl_image_inr (s : Set β) : Sum.inl ⁻¹' (@Sum.inr α β '' s) = ∅ := by ext; simp
 #align set.preimage_inl_image_inr Set.preimage_inl_image_inr
 -/
 
@@ -1628,10 +1580,7 @@ but is expected to have type
   forall {α : Type.{u2}} {β : Type.{u1}} (s : Set.{u2} α), Eq.{succ u1} (Set.{u1} β) (Set.preimage.{u1, max u1 u2} β (Sum.{u2, u1} α β) (Sum.inr.{u2, u1} α β) (Set.image.{u2, max u1 u2} α (Sum.{u2, u1} α β) (Sum.inl.{u2, u1} α β) s)) (EmptyCollection.emptyCollection.{u1} (Set.{u1} β) (Set.instEmptyCollectionSet.{u1} β))
 Case conversion may be inaccurate. Consider using '#align set.preimage_inr_image_inl Set.preimage_inr_image_inlₓ'. -/
 @[simp]
-theorem preimage_inr_image_inl (s : Set α) : Sum.inr ⁻¹' (@Sum.inl α β '' s) = ∅ :=
-  by
-  ext
-  simp
+theorem preimage_inr_image_inl (s : Set α) : Sum.inr ⁻¹' (@Sum.inl α β '' s) = ∅ := by ext; simp
 #align set.preimage_inr_image_inl Set.preimage_inr_image_inl
 
 /- warning: set.preimage_inl_range_inr -> Set.preimage_inl_range_inr is a dubious translation:
@@ -1869,14 +1818,8 @@ lean 3 declaration is
 but is expected to have type
   forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β) (s : Set.{u2} α), Eq.{succ u1} (Set.{u1} β) (Set.image.{u2, u1} α β f s) (Set.range.{u1, succ u2} β (Set.Elem.{u2} α s) (fun (x : Set.Elem.{u2} α s) => f (Subtype.val.{succ u2} α (fun (x : α) => Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x s) x)))
 Case conversion may be inaccurate. Consider using '#align set.image_eq_range Set.image_eq_rangeₓ'. -/
-theorem image_eq_range (f : α → β) (s : Set α) : f '' s = range fun x : s => f x :=
-  by
-  ext
-  constructor
-  rintro ⟨x, h1, h2⟩
-  exact ⟨⟨x, h1⟩, h2⟩
-  rintro ⟨⟨x, h1⟩, h2⟩
-  exact ⟨x, h1, h2⟩
+theorem image_eq_range (f : α → β) (s : Set α) : f '' s = range fun x : s => f x := by ext;
+  constructor; rintro ⟨x, h1, h2⟩; exact ⟨⟨x, h1⟩, h2⟩; rintro ⟨⟨x, h1⟩, h2⟩; exact ⟨x, h1, h2⟩
 #align set.image_eq_range Set.image_eq_range
 
 /- warning: sum.range_eq -> Sum.range_eq is a dubious translation:
@@ -1909,11 +1852,8 @@ Case conversion may be inaccurate. Consider using '#align set.range_ite_subset'
 theorem range_ite_subset' {p : Prop} [Decidable p] {f g : α → β} :
     range (if p then f else g) ⊆ range f ∪ range g :=
   by
-  by_cases h : p;
-  · rw [if_pos h]
-    exact subset_union_left _ _
-  · rw [if_neg h]
-    exact subset_union_right _ _
+  by_cases h : p; · rw [if_pos h]; exact subset_union_left _ _
+  · rw [if_neg h]; exact subset_union_right _ _
 #align set.range_ite_subset' Set.range_ite_subset'
 
 /- warning: set.range_ite_subset -> Set.range_ite_subset is a dubious translation:
@@ -1979,10 +1919,8 @@ theorem range_diff_image {f : α → β} (H : Injective f) (s : Set α) : range
 
 #print Set.range_inclusion /-
 @[simp]
-theorem range_inclusion (h : s ⊆ t) : range (inclusion h) = { x : t | (x : α) ∈ s } :=
-  by
-  ext ⟨x, hx⟩
-  simp [inclusion]
+theorem range_inclusion (h : s ⊆ t) : range (inclusion h) = { x : t | (x : α) ∈ s } := by
+  ext ⟨x, hx⟩; simp [inclusion]
 #align set.range_inclusion Set.range_inclusion
 -/
 
@@ -2001,22 +1939,16 @@ theorem apply_rangeSplitting (f : α → β) (x : range f) : f (rangeSplitting f
 
 #print Set.comp_rangeSplitting /-
 @[simp]
-theorem comp_rangeSplitting (f : α → β) : f ∘ rangeSplitting f = coe :=
-  by
-  ext
-  simp only [Function.comp_apply]
-  apply apply_range_splitting
+theorem comp_rangeSplitting (f : α → β) : f ∘ rangeSplitting f = coe := by ext;
+  simp only [Function.comp_apply]; apply apply_range_splitting
 #align set.comp_range_splitting Set.comp_rangeSplitting
 -/
 
 #print Set.leftInverse_rangeSplitting /-
 -- When `f` is injective, see also `equiv.of_injective`.
 theorem leftInverse_rangeSplitting (f : α → β) :
-    LeftInverse (rangeFactorization f) (rangeSplitting f) := fun x =>
-  by
-  ext
-  simp only [range_factorization_coe]
-  apply apply_range_splitting
+    LeftInverse (rangeFactorization f) (rangeSplitting f) := fun x => by ext;
+  simp only [range_factorization_coe]; apply apply_range_splitting
 #align set.left_inverse_range_splitting Set.leftInverse_rangeSplitting
 -/
 
@@ -2145,10 +2077,8 @@ Case conversion may be inaccurate. Consider using '#align set.subsingleton_of_pr
 /-- If the preimage of a set under an surjective map is a subsingleton,
 the set is a subsingleton. -/
 theorem subsingleton_of_preimage {α β : Type _} {f : α → β} (hf : Function.Surjective f) (s : Set β)
-    (hs : (f ⁻¹' s).Subsingleton) : s.Subsingleton := fun fx hx fy hy =>
-  by
-  rcases hf fx, hf fy with ⟨⟨x, rfl⟩, ⟨y, rfl⟩⟩
-  exact congr_arg f (hs hx hy)
+    (hs : (f ⁻¹' s).Subsingleton) : s.Subsingleton := fun fx hx fy hy => by
+  rcases hf fx, hf fy with ⟨⟨x, rfl⟩, ⟨y, rfl⟩⟩; exact congr_arg f (hs hx hy)
 #align set.subsingleton_of_preimage Set.subsingleton_of_preimage
 
 #print Set.subsingleton_range /-
@@ -2241,11 +2171,8 @@ lean 3 declaration is
 but is expected to have type
   forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Injective.{succ u2, succ u1} α β f) -> (Function.Surjective.{succ u1, succ u2} (Set.{u1} β) (Set.{u2} α) (Set.preimage.{u2, u1} α β f))
 Case conversion may be inaccurate. Consider using '#align function.injective.preimage_surjective Function.Injective.preimage_surjectiveₓ'. -/
-theorem Injective.preimage_surjective (hf : Injective f) : Surjective (preimage f) :=
-  by
-  intro s
-  use f '' s
-  rw [hf.preimage_image]
+theorem Injective.preimage_surjective (hf : Injective f) : Surjective (preimage f) := by intro s;
+  use f '' s; rw [hf.preimage_image]
 #align function.injective.preimage_surjective Function.Injective.preimage_surjective
 
 /- warning: function.injective.subsingleton_image_iff -> Function.Injective.subsingleton_image_iff is a dubious translation:
@@ -2275,11 +2202,8 @@ lean 3 declaration is
 but is expected to have type
   forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Surjective.{succ u2, succ u1} α β f) -> (Function.Surjective.{succ u2, succ u1} (Set.{u2} α) (Set.{u1} β) (Set.image.{u2, u1} α β f))
 Case conversion may be inaccurate. Consider using '#align function.surjective.image_surjective Function.Surjective.image_surjectiveₓ'. -/
-theorem Surjective.image_surjective (hf : Surjective f) : Surjective (image f) :=
-  by
-  intro s
-  use f ⁻¹' s
-  rw [hf.image_preimage]
+theorem Surjective.image_surjective (hf : Surjective f) : Surjective (image f) := by intro s;
+  use f ⁻¹' s; rw [hf.image_preimage]
 #align function.surjective.image_surjective Function.Surjective.image_surjective
 
 /- warning: function.surjective.nonempty_preimage -> Function.Surjective.nonempty_preimage is a dubious translation:
@@ -2298,18 +2222,13 @@ lean 3 declaration is
 but is expected to have type
   forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Injective.{succ u2, succ u1} α β f) -> (Function.Injective.{succ u2, succ u1} (Set.{u2} α) (Set.{u1} β) (Set.image.{u2, u1} α β f))
 Case conversion may be inaccurate. Consider using '#align function.injective.image_injective Function.Injective.image_injectiveₓ'. -/
-theorem Injective.image_injective (hf : Injective f) : Injective (image f) :=
-  by
-  intro s t h
+theorem Injective.image_injective (hf : Injective f) : Injective (image f) := by intro s t h;
   rw [← preimage_image_eq s hf, ← preimage_image_eq t hf, h]
 #align function.injective.image_injective Function.Injective.image_injective
 
 #print Function.Surjective.preimage_subset_preimage_iff /-
 theorem Surjective.preimage_subset_preimage_iff {s t : Set β} (hf : Surjective f) :
-    f ⁻¹' s ⊆ f ⁻¹' t ↔ s ⊆ t :=
-  by
-  apply preimage_subset_preimage_iff
-  rw [hf.range_eq]
+    f ⁻¹' s ⊆ f ⁻¹' t ↔ s ⊆ t := by apply preimage_subset_preimage_iff; rw [hf.range_eq];
   apply subset_univ
 #align function.surjective.preimage_subset_preimage_iff Function.Surjective.preimage_subset_preimage_iff
 -/
@@ -2429,9 +2348,7 @@ theorem coe_image_of_subset {s t : Set α} (h : t ⊆ s) : coe '' { x : ↥s | 
 -/
 
 #print Subtype.range_coe /-
-theorem range_coe {s : Set α} : range (coe : s → α) = s :=
-  by
-  rw [← Set.image_univ]
+theorem range_coe {s : Set α} : range (coe : s → α) = s := by rw [← Set.image_univ];
   simp [-Set.image_univ, coe_image]
 #align subtype.range_coe Subtype.range_coe
 -/
@@ -2539,10 +2456,8 @@ theorem exists_set_subtype {t : Set α} (p : Set α → Prop) :
     (∃ s : Set t, p (coe '' s)) ↔ ∃ s : Set α, s ⊆ t ∧ p s :=
   by
   constructor
-  · rintro ⟨s, hs⟩
-    refine' ⟨coe '' s, _, hs⟩
-    convert image_subset_range _ _
-    rw [range_coe]
+  · rintro ⟨s, hs⟩; refine' ⟨coe '' s, _, hs⟩
+    convert image_subset_range _ _; rw [range_coe]
   rintro ⟨s, hs₁, hs₂⟩; refine' ⟨coe ⁻¹' s, _⟩
   rw [image_preimage_eq_of_subset]; exact hs₂; rw [range_coe]; exact hs₁
 #align subtype.exists_set_subtype Subtype.exists_set_subtype
@@ -2665,9 +2580,7 @@ variable {f : α → β}
 theorem preimage_injective : Injective (preimage f) ↔ Surjective f :=
   by
   refine' ⟨fun h y => _, surjective.preimage_injective⟩
-  obtain ⟨x, hx⟩ : (f ⁻¹' {y}).Nonempty :=
-    by
-    rw [h.nonempty_apply_iff preimage_empty]
+  obtain ⟨x, hx⟩ : (f ⁻¹' {y}).Nonempty := by rw [h.nonempty_apply_iff preimage_empty];
     apply singleton_nonempty
   exact ⟨x, hx⟩
 #align set.preimage_injective Set.preimage_injective
Diff
@@ -513,8 +513,8 @@ but is expected to have type
 Case conversion may be inaccurate. Consider using '#align set.image_union Set.image_unionₓ'. -/
 theorem image_union (f : α → β) (s t : Set α) : f '' (s ∪ t) = f '' s ∪ f '' t :=
   ext fun x =>
-    ⟨by rintro ⟨a, h | h, rfl⟩ <;> [left, right] <;> exact ⟨_, h, rfl⟩, by
-      rintro (⟨a, h, rfl⟩ | ⟨a, h, rfl⟩) <;> refine' ⟨_, _, rfl⟩ <;> [left, right] <;> exact h⟩
+    ⟨by rintro ⟨a, h | h, rfl⟩ <;> [left;right] <;> exact ⟨_, h, rfl⟩, by
+      rintro (⟨a, h, rfl⟩ | ⟨a, h, rfl⟩) <;> refine' ⟨_, _, rfl⟩ <;> [left;right] <;> exact h⟩
 #align set.image_union Set.image_union
 
 #print Set.image_empty /-
@@ -1565,7 +1565,7 @@ theorem isCompl_range_inl_range_inr : IsCompl (range <| @Sum.inl α β) (range S
     (by
       rintro y ⟨⟨x₁, rfl⟩, ⟨x₂, _⟩⟩
       cc)
-    (by rintro (x | y) - <;> [left, right] <;> exact mem_range_self _)
+    (by rintro (x | y) - <;> [left;right] <;> exact mem_range_self _)
 #align set.is_compl_range_inl_range_inr Set.isCompl_range_inl_range_inr
 
 /- warning: set.range_inl_union_range_inr -> Set.range_inl_union_range_inr is a dubious translation:
Diff
@@ -1419,7 +1419,7 @@ theorem exists_subset_range_and_iff {f : α → β} {p : Set β → Prop} :
 #align set.exists_subset_range_and_iff Set.exists_subset_range_and_iff
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2: warning: expanding binder collection (s «expr ⊆ » range[set.range] f) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (s «expr ⊆ » range[set.range] f) -/
 #print Set.exists_subset_range_iff /-
 theorem exists_subset_range_iff {f : α → β} {p : Set β → Prop} :
     (∃ (s : _)(_ : s ⊆ range f), p s) ↔ ∃ s, p (f '' s) := by
Diff
@@ -743,7 +743,7 @@ theorem subset_image_diff (f : α → β) (s t : Set α) : f '' s \ f '' t ⊆ f
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u1} α} {t : Set.{u1} α}, HasSubset.Subset.{u2} (Set.{u2} β) (Set.hasSubset.{u2} β) (symmDiff.{u2} (Set.{u2} β) (SemilatticeSup.toHasSup.{u2} (Set.{u2} β) (Lattice.toSemilatticeSup.{u2} (Set.{u2} β) (GeneralizedCoheytingAlgebra.toLattice.{u2} (Set.{u2} β) (GeneralizedBooleanAlgebra.toGeneralizedCoheytingAlgebra.{u2} (Set.{u2} β) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u2} (Set.{u2} β) (Set.booleanAlgebra.{u2} β)))))) (BooleanAlgebra.toHasSdiff.{u2} (Set.{u2} β) (Set.booleanAlgebra.{u2} β)) (Set.image.{u1, u2} α β f s) (Set.image.{u1, u2} α β f t)) (Set.image.{u1, u2} α β f (symmDiff.{u1} (Set.{u1} α) (SemilatticeSup.toHasSup.{u1} (Set.{u1} α) (Lattice.toSemilatticeSup.{u1} (Set.{u1} α) (GeneralizedCoheytingAlgebra.toLattice.{u1} (Set.{u1} α) (GeneralizedBooleanAlgebra.toGeneralizedCoheytingAlgebra.{u1} (Set.{u1} α) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)))))) (BooleanAlgebra.toHasSdiff.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s t))
 but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u1} α} {t : Set.{u1} α}, HasSubset.Subset.{u2} (Set.{u2} β) (Set.instHasSubsetSet.{u2} β) (symmDiff.{u2} (Set.{u2} β) (SemilatticeSup.toHasSup.{u2} (Set.{u2} β) (Lattice.toSemilatticeSup.{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} β))))))) (Set.instSDiffSet.{u2} β) (Set.image.{u1, u2} α β f s) (Set.image.{u1, u2} α β f t)) (Set.image.{u1, u2} α β f (symmDiff.{u1} (Set.{u1} α) (SemilatticeSup.toHasSup.{u1} (Set.{u1} α) (Lattice.toSemilatticeSup.{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} α))))))) (Set.instSDiffSet.{u1} α) s t))
+  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {s : Set.{u1} α} {t : Set.{u1} α}, HasSubset.Subset.{u2} (Set.{u2} β) (Set.instHasSubsetSet.{u2} β) (symmDiff.{u2} (Set.{u2} β) (SemilatticeSup.toSup.{u2} (Set.{u2} β) (Lattice.toSemilatticeSup.{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} β))))))) (Set.instSDiffSet.{u2} β) (Set.image.{u1, u2} α β f s) (Set.image.{u1, u2} α β f t)) (Set.image.{u1, u2} α β f (symmDiff.{u1} (Set.{u1} α) (SemilatticeSup.toSup.{u1} (Set.{u1} α) (Lattice.toSemilatticeSup.{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} α))))))) (Set.instSDiffSet.{u1} α) s t))
 Case conversion may be inaccurate. Consider using '#align set.subset_image_symm_diff Set.subset_image_symm_diffₓ'. -/
 theorem subset_image_symm_diff : (f '' s) ∆ (f '' t) ⊆ f '' s ∆ t :=
   (union_subset_union (subset_image_diff _ _ _) <| subset_image_diff _ _ _).trans
@@ -766,7 +766,7 @@ theorem image_diff {f : α → β} (hf : Injective f) (s t : Set α) : f '' (s \
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β}, (Function.Injective.{succ u1, succ u2} α β f) -> (forall (s : Set.{u1} α) (t : Set.{u1} α), Eq.{succ u2} (Set.{u2} β) (Set.image.{u1, u2} α β f (symmDiff.{u1} (Set.{u1} α) (SemilatticeSup.toHasSup.{u1} (Set.{u1} α) (Lattice.toSemilatticeSup.{u1} (Set.{u1} α) (GeneralizedCoheytingAlgebra.toLattice.{u1} (Set.{u1} α) (GeneralizedBooleanAlgebra.toGeneralizedCoheytingAlgebra.{u1} (Set.{u1} α) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)))))) (BooleanAlgebra.toHasSdiff.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s t)) (symmDiff.{u2} (Set.{u2} β) (SemilatticeSup.toHasSup.{u2} (Set.{u2} β) (Lattice.toSemilatticeSup.{u2} (Set.{u2} β) (GeneralizedCoheytingAlgebra.toLattice.{u2} (Set.{u2} β) (GeneralizedBooleanAlgebra.toGeneralizedCoheytingAlgebra.{u2} (Set.{u2} β) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u2} (Set.{u2} β) (Set.booleanAlgebra.{u2} β)))))) (BooleanAlgebra.toHasSdiff.{u2} (Set.{u2} β) (Set.booleanAlgebra.{u2} β)) (Set.image.{u1, u2} α β f s) (Set.image.{u1, u2} α β f t)))
 but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Injective.{succ u2, succ u1} α β f) -> (forall (s : Set.{u2} α) (t : Set.{u2} α), Eq.{succ u1} (Set.{u1} β) (Set.image.{u2, u1} α β f (symmDiff.{u2} (Set.{u2} α) (SemilatticeSup.toHasSup.{u2} (Set.{u2} α) (Lattice.toSemilatticeSup.{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} α))))))) (Set.instSDiffSet.{u2} α) s t)) (symmDiff.{u1} (Set.{u1} β) (SemilatticeSup.toHasSup.{u1} (Set.{u1} β) (Lattice.toSemilatticeSup.{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} β))))))) (Set.instSDiffSet.{u1} β) (Set.image.{u2, u1} α β f s) (Set.image.{u2, u1} α β f t)))
+  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Injective.{succ u2, succ u1} α β f) -> (forall (s : Set.{u2} α) (t : Set.{u2} α), Eq.{succ u1} (Set.{u1} β) (Set.image.{u2, u1} α β f (symmDiff.{u2} (Set.{u2} α) (SemilatticeSup.toSup.{u2} (Set.{u2} α) (Lattice.toSemilatticeSup.{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} α))))))) (Set.instSDiffSet.{u2} α) s t)) (symmDiff.{u1} (Set.{u1} β) (SemilatticeSup.toSup.{u1} (Set.{u1} β) (Lattice.toSemilatticeSup.{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} β))))))) (Set.instSDiffSet.{u1} β) (Set.image.{u2, u1} α β f s) (Set.image.{u2, u1} α β f t)))
 Case conversion may be inaccurate. Consider using '#align set.image_symm_diff Set.image_symm_diffₓ'. -/
 theorem image_symm_diff (hf : Injective f) (s t : Set α) : f '' s ∆ t = (f '' s) ∆ (f '' t) := by
   simp_rw [Set.symmDiff_def, image_union, image_diff hf]
Diff
@@ -1083,6 +1083,12 @@ end Image
 /-! ### Lemmas about the powerset and image. -/
 
 
+/- warning: set.powerset_insert -> Set.powerset_insert is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} (s : Set.{u1} α) (a : α), Eq.{succ u1} (Set.{u1} (Set.{u1} α)) (Set.powerset.{u1} α (Insert.insert.{u1, u1} α (Set.{u1} α) (Set.hasInsert.{u1} α) a s)) (Union.union.{u1} (Set.{u1} (Set.{u1} α)) (Set.hasUnion.{u1} (Set.{u1} α)) (Set.powerset.{u1} α s) (Set.image.{u1, u1} (Set.{u1} α) (Set.{u1} α) (Insert.insert.{u1, u1} α (Set.{u1} α) (Set.hasInsert.{u1} α) a) (Set.powerset.{u1} α s)))
+but is expected to have type
+  forall {α : Type.{u1}} (s : Set.{u1} α) (a : α), Eq.{succ u1} (Set.{u1} (Set.{u1} α)) (Set.powerset.{u1} α (Insert.insert.{u1, u1} α (Set.{u1} α) (Set.instInsertSet.{u1} α) a s)) (Union.union.{u1} (Set.{u1} (Set.{u1} α)) (Set.instUnionSet.{u1} (Set.{u1} α)) (Set.powerset.{u1} α s) (Set.image.{u1, u1} (Set.{u1} α) (Set.{u1} α) (Insert.insert.{u1, u1} α (Set.{u1} α) (Set.instInsertSet.{u1} α) a) (Set.powerset.{u1} α s)))
+Case conversion may be inaccurate. Consider using '#align set.powerset_insert Set.powerset_insertₓ'. -/
 /-- The powerset of `{a} ∪ s` is `𝒫 s` together with `{a} ∪ t` for each `t ∈ 𝒫 s`. -/
 theorem powerset_insert (s : Set α) (a : α) : 𝒫 insert a s = 𝒫 s ∪ insert a '' 𝒫 s :=
   by
Diff
@@ -277,7 +277,7 @@ theorem nonempty_of_nonempty_preimage {s : Set β} {f : α → β} (hf : (f ⁻
 lean 3 declaration is
   forall {α : Type.{u1}} {s : Set.{u1} α} {u : Set.{u1} α} {v : Set.{u1} α}, (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) s (Union.union.{u1} (Set.{u1} α) (Set.hasUnion.{u1} α) u v)) -> (Eq.{succ u1} (Set.{u1} α) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) s (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) u v)) (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.hasEmptyc.{u1} α))) -> (Eq.{succ u1} (Set.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s)) (Set.preimage.{u1, u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeSubtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)))))) u) (HasCompl.compl.{u1} (Set.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s)) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s)) (Set.booleanAlgebra.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s))) (Set.preimage.{u1, u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeSubtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)))))) v)))
 but is expected to have type
-  forall {α : Type.{u1}} {s : Set.{u1} α} {u : Set.{u1} α} {v : Set.{u1} α}, (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) s (Union.union.{u1} (Set.{u1} α) (Set.instUnionSet.{u1} α) u v)) -> (Eq.{succ u1} (Set.{u1} α) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) s (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) u v)) (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.instEmptyCollectionSet.{u1} α))) -> (Eq.{succ u1} (Set.{u1} (Set.Elem.{u1} α s)) (Set.preimage.{u1, u1} (Set.Elem.{u1} α s) α (fun (x : Set.Elem.{u1} α s) => Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) x) u) (HasCompl.compl.{u1} (Set.{u1} (Set.Elem.{u1} α s)) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} (Set.Elem.{u1} α s)) (Set.instBooleanAlgebraSet.{u1} (Set.Elem.{u1} α s))) (Set.preimage.{u1, u1} (Set.Elem.{u1} α s) α (fun (x : Set.Elem.{u1} α s) => Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) x) v)))
+  forall {α : Type.{u1}} {s : Set.{u1} α} {u : Set.{u1} α} {v : Set.{u1} α}, (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) s (Union.union.{u1} (Set.{u1} α) (Set.instUnionSet.{u1} α) u v)) -> (Eq.{succ u1} (Set.{u1} α) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) s (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) u v)) (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.instEmptyCollectionSet.{u1} α))) -> (Eq.{succ u1} (Set.{u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s))) (Set.preimage.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) u) (HasCompl.compl.{u1} (Set.{u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s))) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s))) (Set.instBooleanAlgebraSet.{u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)))) (Set.preimage.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) v)))
 Case conversion may be inaccurate. Consider using '#align set.preimage_subtype_coe_eq_compl Set.preimage_subtype_coe_eq_complₓ'. -/
 theorem preimage_subtype_coe_eq_compl {α : Type _} {s u v : Set α} (hsuv : s ⊆ u ∪ v)
     (H : s ∩ (u ∩ v) = ∅) : (coe : s → α) ⁻¹' u = (coe ⁻¹' v)ᶜ :=
@@ -1845,7 +1845,7 @@ theorem rangeFactorization_coe (f : ι → β) (a : ι) : (rangeFactorization f
 lean 3 declaration is
   forall {β : Type.{u1}} {ι : Sort.{u2}} (f : ι -> β), Eq.{max u2 (succ u1)} (ι -> β) (Function.comp.{u2, succ u1, succ u1} ι (coeSort.{succ u1, succ (succ u1)} (Set.{u1} β) Type.{u1} (Set.hasCoeToSort.{u1} β) (Set.range.{u1, u2} β ι f)) β ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} β) Type.{u1} (Set.hasCoeToSort.{u1} β) (Set.range.{u1, u2} β ι f)) β (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} β) Type.{u1} (Set.hasCoeToSort.{u1} β) (Set.range.{u1, u2} β ι f)) β (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} β) Type.{u1} (Set.hasCoeToSort.{u1} β) (Set.range.{u1, u2} β ι f)) β (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} β) Type.{u1} (Set.hasCoeToSort.{u1} β) (Set.range.{u1, u2} β ι f)) β (coeSubtype.{succ u1} β (fun (x : β) => Membership.Mem.{u1, u1} β (Set.{u1} β) (Set.hasMem.{u1} β) x (Set.range.{u1, u2} β ι f))))))) (Set.rangeFactorization.{u1, u2} β ι f)) f
 but is expected to have type
-  forall {β : Type.{u2}} {ι : Sort.{u1}} (f : ι -> β), Eq.{max (succ u2) u1} (ι -> β) (Function.comp.{u1, succ u2, succ u2} ι (Set.Elem.{u2} β (Set.range.{u2, u1} β ι f)) β (fun (x : Set.Elem.{u2} β (Set.range.{u2, u1} β ι f)) => Subtype.val.{succ u2} β (fun (x : β) => Membership.mem.{u2, u2} β (Set.{u2} β) (Set.instMembershipSet.{u2} β) x (Set.range.{u2, u1} β ι f)) x) (Set.rangeFactorization.{u2, u1} β ι f)) f
+  forall {β : Type.{u2}} {ι : Sort.{u1}} (f : ι -> β), Eq.{max (succ u2) u1} (ι -> β) (Function.comp.{u1, succ u2, succ u2} ι (Set.Elem.{u2} β (Set.range.{u2, u1} β ι f)) β (Subtype.val.{succ u2} β (fun (x : β) => Membership.mem.{u2, u2} β (Set.{u2} β) (Set.instMembershipSet.{u2} β) x (Set.range.{u2, u1} β ι f))) (Set.rangeFactorization.{u2, u1} β ι f)) f
 Case conversion may be inaccurate. Consider using '#align set.coe_comp_range_factorization Set.coe_comp_rangeFactorizationₓ'. -/
 @[simp]
 theorem coe_comp_rangeFactorization (f : ι → β) : coe ∘ rangeFactorization f = f :=
@@ -2478,7 +2478,7 @@ theorem coe_image_univ (s : Set α) : (coe : s → α) '' Set.univ = s :=
 lean 3 declaration is
   forall {α : Type.{u1}} (s : Set.{u1} α) (t : Set.{u1} α), Eq.{succ u1} (Set.{u1} α) (Set.image.{u1, u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeSubtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)))))) (Set.preimage.{u1, u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeSubtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)))))) t)) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) t s)
 but is expected to have type
-  forall {α : Type.{u1}} (s : Set.{u1} α) (t : Set.{u1} α), Eq.{succ u1} (Set.{u1} α) (Set.image.{u1, u1} (Set.Elem.{u1} α s) α (fun (x : Set.Elem.{u1} α s) => Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) x) (Set.preimage.{u1, u1} (Set.Elem.{u1} α s) α (fun (x : Set.Elem.{u1} α s) => Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) x) t)) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) t s)
+  forall {α : Type.{u1}} (s : Set.{u1} α) (t : Set.{u1} α), Eq.{succ u1} (Set.{u1} α) (Set.image.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) (Set.preimage.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) t)) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) t s)
 Case conversion may be inaccurate. Consider using '#align subtype.image_preimage_coe Subtype.image_preimage_coeₓ'. -/
 @[simp]
 theorem image_preimage_coe (s t : Set α) : (coe : s → α) '' (coe ⁻¹' t) = t ∩ s :=
@@ -2499,7 +2499,7 @@ theorem image_preimage_val (s t : Set α) : (Subtype.val : s → α) '' (Subtype
 lean 3 declaration is
   forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α} {u : Set.{u1} α}, Iff (Eq.{succ u1} (Set.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s)) (Set.preimage.{u1, u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeSubtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)))))) t) (Set.preimage.{u1, u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeSubtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)))))) u)) (Eq.{succ u1} (Set.{u1} α) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) t s) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) u s))
 but is expected to have type
-  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α} {u : Set.{u1} α}, Iff (Eq.{succ u1} (Set.{u1} (Set.Elem.{u1} α s)) (Set.preimage.{u1, u1} (Set.Elem.{u1} α s) α (fun (x : Set.Elem.{u1} α s) => Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) x) t) (Set.preimage.{u1, u1} (Set.Elem.{u1} α s) α (fun (x : Set.Elem.{u1} α s) => Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) x) u)) (Eq.{succ u1} (Set.{u1} α) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) t s) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) u s))
+  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α} {u : Set.{u1} α}, Iff (Eq.{succ u1} (Set.{u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s))) (Set.preimage.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) t) (Set.preimage.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) u)) (Eq.{succ u1} (Set.{u1} α) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) t s) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) u s))
 Case conversion may be inaccurate. Consider using '#align subtype.preimage_coe_eq_preimage_coe_iff Subtype.preimage_coe_eq_preimage_coe_iffₓ'. -/
 theorem preimage_coe_eq_preimage_coe_iff {s t u : Set α} :
     (coe : s → α) ⁻¹' t = coe ⁻¹' u ↔ t ∩ s = u ∩ s := by
@@ -2510,7 +2510,7 @@ theorem preimage_coe_eq_preimage_coe_iff {s t u : Set α} :
 lean 3 declaration is
   forall {α : Type.{u1}} (s : Set.{u1} α) (t : Set.{u1} α), Eq.{succ u1} (Set.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s)) (Set.preimage.{u1, u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeSubtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)))))) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) t s)) (Set.preimage.{u1, u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeSubtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)))))) t)
 but is expected to have type
-  forall {α : Type.{u1}} (s : Set.{u1} α) (t : Set.{u1} α), Eq.{succ u1} (Set.{u1} (Set.Elem.{u1} α s)) (Set.preimage.{u1, u1} (Set.Elem.{u1} α s) α (fun (x : Set.Elem.{u1} α s) => Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) x) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) t s)) (Set.preimage.{u1, u1} (Set.Elem.{u1} α s) α (fun (x : Set.Elem.{u1} α s) => Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) x) t)
+  forall {α : Type.{u1}} (s : Set.{u1} α) (t : Set.{u1} α), Eq.{succ u1} (Set.{u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s))) (Set.preimage.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) t s)) (Set.preimage.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) t)
 Case conversion may be inaccurate. Consider using '#align subtype.preimage_coe_inter_self Subtype.preimage_coe_inter_selfₓ'. -/
 @[simp]
 theorem preimage_coe_inter_self (s t : Set α) : (coe : s → α) ⁻¹' (t ∩ s) = coe ⁻¹' t := by
@@ -2546,7 +2546,7 @@ theorem exists_set_subtype {t : Set α} (p : Set α → Prop) :
 lean 3 declaration is
   forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (Set.Nonempty.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) (Set.preimage.{u1, u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeSubtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)))))) t)) (Set.Nonempty.{u1} α (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) s t))
 but is expected to have type
-  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (Set.Nonempty.{u1} (Set.Elem.{u1} α s) (Set.preimage.{u1, u1} (Set.Elem.{u1} α s) α (fun (x : Set.Elem.{u1} α s) => Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) x) t)) (Set.Nonempty.{u1} α (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) s t))
+  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (Set.Nonempty.{u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) (Set.preimage.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) t)) (Set.Nonempty.{u1} α (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) s t))
 Case conversion may be inaccurate. Consider using '#align subtype.preimage_coe_nonempty Subtype.preimage_coe_nonemptyₓ'. -/
 theorem preimage_coe_nonempty {s t : Set α} : ((coe : s → α) ⁻¹' t).Nonempty ↔ (s ∩ t).Nonempty :=
   by rw [inter_comm, ← image_preimage_coe, nonempty_image_iff]
@@ -2556,7 +2556,7 @@ theorem preimage_coe_nonempty {s t : Set α} : ((coe : s → α) ⁻¹' t).Nonem
 lean 3 declaration is
   forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (Eq.{succ u1} (Set.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s)) (Set.preimage.{u1, u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeSubtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)))))) t) (EmptyCollection.emptyCollection.{u1} (Set.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s)) (Set.hasEmptyc.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s)))) (Eq.{succ u1} (Set.{u1} α) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) s t) (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.hasEmptyc.{u1} α)))
 but is expected to have type
-  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (Eq.{succ u1} (Set.{u1} (Set.Elem.{u1} α s)) (Set.preimage.{u1, u1} (Set.Elem.{u1} α s) α (fun (x : Set.Elem.{u1} α s) => Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) x) t) (EmptyCollection.emptyCollection.{u1} (Set.{u1} (Set.Elem.{u1} α s)) (Set.instEmptyCollectionSet.{u1} (Set.Elem.{u1} α s)))) (Eq.{succ u1} (Set.{u1} α) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) s t) (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.instEmptyCollectionSet.{u1} α)))
+  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (Eq.{succ u1} (Set.{u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s))) (Set.preimage.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) t) (EmptyCollection.emptyCollection.{u1} (Set.{u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s))) (Set.instEmptyCollectionSet.{u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s))))) (Eq.{succ u1} (Set.{u1} α) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) s t) (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.instEmptyCollectionSet.{u1} α)))
 Case conversion may be inaccurate. Consider using '#align subtype.preimage_coe_eq_empty Subtype.preimage_coe_eq_emptyₓ'. -/
 theorem preimage_coe_eq_empty {s t : Set α} : (coe : s → α) ⁻¹' t = ∅ ↔ s ∩ t = ∅ := by
   simp only [← not_nonempty_iff_eq_empty, preimage_coe_nonempty]
@@ -2566,7 +2566,7 @@ theorem preimage_coe_eq_empty {s t : Set α} : (coe : s → α) ⁻¹' t = ∅ 
 lean 3 declaration is
   forall {α : Type.{u1}} (s : Set.{u1} α), Eq.{succ u1} (Set.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s)) (Set.preimage.{u1, u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s) α (coeSubtype.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s)))))) (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s)) (EmptyCollection.emptyCollection.{u1} (Set.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s)) (Set.hasEmptyc.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) s)))
 but is expected to have type
-  forall {α : Type.{u1}} (s : Set.{u1} α), Eq.{succ u1} (Set.{u1} (Set.Elem.{u1} α s)) (Set.preimage.{u1, u1} (Set.Elem.{u1} α s) α (fun (x : Set.Elem.{u1} α s) => Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) x) (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.instBooleanAlgebraSet.{u1} α)) s)) (EmptyCollection.emptyCollection.{u1} (Set.{u1} (Set.Elem.{u1} α s)) (Set.instEmptyCollectionSet.{u1} (Set.Elem.{u1} α s)))
+  forall {α : Type.{u1}} (s : Set.{u1} α), Eq.{succ u1} (Set.{u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s))) (Set.preimage.{u1, u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s)) (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.instBooleanAlgebraSet.{u1} α)) s)) (EmptyCollection.emptyCollection.{u1} (Set.{u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s))) (Set.instEmptyCollectionSet.{u1} (Subtype.{succ u1} α (fun (x : α) => Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s))))
 Case conversion may be inaccurate. Consider using '#align subtype.preimage_coe_compl Subtype.preimage_coe_complₓ'. -/
 @[simp]
 theorem preimage_coe_compl (s : Set α) : (coe : s → α) ⁻¹' sᶜ = ∅ :=
Diff
@@ -2384,6 +2384,12 @@ variable {E : Type _} [EquivLike E ι ι']
 
 include ι
 
+/- warning: equiv_like.range_comp -> EquivLike.range_comp is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} {ι : Sort.{u2}} {ι' : Sort.{u3}} {E : Type.{u4}} [_inst_1 : EquivLike.{succ u4, u2, u3} E ι ι'] (f : ι' -> α) (e : E), Eq.{succ u1} (Set.{u1} α) (Set.range.{u1, u2} α ι (Function.comp.{u2, u3, succ u1} ι ι' α f (coeFn.{succ u4, imax u2 u3} E (fun (_x : E) => ι -> ι') (FunLike.hasCoeToFun.{succ u4, u2, u3} E ι (fun (_x : ι) => ι') (EmbeddingLike.toFunLike.{succ u4, u2, u3} E ι ι' (EquivLike.toEmbeddingLike.{succ u4, u2, u3} E ι ι' _inst_1))) e))) (Set.range.{u1, u3} α ι' f)
+but is expected to have type
+  forall {α : Sort.{u3}} {ι : Sort.{u2}} {ι' : Type.{u1}} [E : EquivLike.{succ u1, u3, u2} ι' α ι] {_inst_1 : Type.{u4}} (f : ι -> _inst_1) (e : ι'), Eq.{succ u4} (Set.{u4} _inst_1) (Set.range.{u4, u3} _inst_1 α (Function.comp.{u3, u2, succ u4} α ι _inst_1 f (FunLike.coe.{succ u1, u3, u2} ι' α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => ι) _x) (EmbeddingLike.toFunLike.{succ u1, u3, u2} ι' α ι (EquivLike.toEmbeddingLike.{succ u1, u3, u2} ι' α ι E)) e))) (Set.range.{u4, u2} _inst_1 ι f)
+Case conversion may be inaccurate. Consider using '#align equiv_like.range_comp EquivLike.range_compₓ'. -/
 @[simp]
 theorem range_comp (f : ι' → α) (e : E) : Set.range (f ∘ e) = Set.range f :=
   (EquivLike.surjective _).range_comp _
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jeremy Avigad, Leonardo de Moura
 
 ! This file was ported from Lean 3 source module data.set.image
-! leanprover-community/mathlib commit 2f4cdce0c2f2f3b8cd58f05d556d03b468e1eb2e
+! leanprover-community/mathlib commit 4550138052d0a416b700c27056d492e2ef53214e
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -1080,6 +1080,29 @@ theorem image_perm {s : Set α} {σ : Equiv.Perm α} (hs : { a : α | σ a ≠ a
 
 end Image
 
+/-! ### Lemmas about the powerset and image. -/
+
+
+/-- The powerset of `{a} ∪ s` is `𝒫 s` together with `{a} ∪ t` for each `t ∈ 𝒫 s`. -/
+theorem powerset_insert (s : Set α) (a : α) : 𝒫 insert a s = 𝒫 s ∪ insert a '' 𝒫 s :=
+  by
+  ext t
+  simp_rw [mem_union, mem_image, mem_powerset_iff]
+  constructor
+  · intro h
+    by_cases hs : a ∈ t
+    · right
+      refine' ⟨t \ {a}, _, _⟩
+      · rw [diff_singleton_subset_iff]
+        assumption
+      · rw [insert_diff_singleton, insert_eq_of_mem hs]
+    · left
+      exact (subset_insert_iff_of_not_mem hs).mp h
+  · rintro (h | ⟨s', h₁, rfl⟩)
+    · exact subset_trans h (subset_insert a s)
+    · exact insert_subset_insert h₁
+#align set.powerset_insert Set.powerset_insert
+
 /-! ### Lemmas about range of a function. -/
 
 

Changes in mathlib4

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

A PR accompanying #12339.

Zulip discussion

Diff
@@ -1055,10 +1055,10 @@ theorem surjective_onto_range : Surjective (rangeFactorization f) := fun ⟨_, 
 theorem image_eq_range (f : α → β) (s : Set α) : f '' s = range fun x : s => f x := by
   ext
   constructor
-  rintro ⟨x, h1, h2⟩
-  exact ⟨⟨x, h1⟩, h2⟩
-  rintro ⟨⟨x, h1⟩, h2⟩
-  exact ⟨x, h1, h2⟩
+  · rintro ⟨x, h1, h2⟩
+    exact ⟨⟨x, h1⟩, h2⟩
+  · rintro ⟨⟨x, h1⟩, h2⟩
+    exact ⟨x, h1, h2⟩
 #align set.image_eq_range Set.image_eq_range
 
 theorem _root_.Sum.range_eq (f : Sum α β → γ) :
@@ -1083,8 +1083,8 @@ theorem range_ite_subset' {p : Prop} [Decidable p] {f g : α → β} :
 theorem range_ite_subset {p : α → Prop} [DecidablePred p] {f g : α → β} :
     (range fun x => if p x then f x else g x) ⊆ range f ∪ range g := by
   rw [range_subset_iff]; intro x; by_cases h : p x
-  simp only [if_pos h, mem_union, mem_range, exists_apply_eq_apply, true_or]
-  simp [if_neg h, mem_union, mem_range_self]
+  · simp only [if_pos h, mem_union, mem_range, exists_apply_eq_apply, true_or]
+  · simp [if_neg h, mem_union, mem_range_self]
 #align set.range_ite_subset Set.range_ite_subset
 
 @[simp]
chore: split Subsingleton,Nontrivial off of Data.Set.Basic (#11832)

Moves definition of and lemmas related to Set.Subsingleton and Set.Nontrivial to a new file, so that Basic can be shorter.

Diff
@@ -3,7 +3,7 @@ Copyright (c) 2014 Jeremy Avigad. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jeremy Avigad, Leonardo de Moura
 -/
-import Mathlib.Data.Set.Basic
+import Mathlib.Data.Set.Subsingleton
 import Mathlib.Order.WithBot
 
 #align_import data.set.image from "leanprover-community/mathlib"@"001ffdc42920050657fd45bd2b8bfbec8eaaeb29"
chore: remove autoImplicit from more files (#11798)

and reduce its scope in a few other instances. Mostly in CategoryTheory and Data this time; some Combinatorics also.

Co-authored-by: Richard Osborn <richardosborn@mac.com>

Diff
@@ -30,8 +30,6 @@ set, sets, image, preimage, pre-image, range
 
 -/
 
-set_option autoImplicit true
-
 universe u v
 
 open Function Set
@@ -1250,7 +1248,7 @@ end Set
 
 namespace Function
 
-variable {ι : Sort*} {f : α → β}
+variable {α β : Type*} {ι : Sort*} {f : α → β}
 
 open Set
 
@@ -1300,7 +1298,7 @@ theorem Surjective.preimage_subset_preimage_iff {s t : Set β} (hf : Surjective
   apply subset_univ
 #align function.surjective.preimage_subset_preimage_iff Function.Surjective.preimage_subset_preimage_iff
 
-theorem Surjective.range_comp {f : ι → ι'} (hf : Surjective f) (g : ι' → α) :
+theorem Surjective.range_comp {ι' : Sort*} {f : ι → ι'} (hf : Surjective f) (g : ι' → α) :
     range (g ∘ f) = range g :=
   ext fun y => (@Surjective.exists _ _ _ hf fun x => g x = y).symm
 #align function.surjective.range_comp Function.Surjective.range_comp
@@ -1339,9 +1337,10 @@ protected theorem Involutive.preimage {f : α → α} (hf : Involutive f) : Invo
 end Function
 
 namespace EquivLike
-variable {E : Type*} [EquivLike E ι ι']
 
-@[simp] lemma range_comp (f : ι' → α) (e : E) : range (f ∘ e) = range f :=
+variable {ι ι' : Sort*} {E : Type*} [EquivLike E ι ι']
+
+@[simp] lemma range_comp {α : Type*} (f : ι' → α) (e : E) : range (f ∘ e) = range f :=
   (EquivLike.surjective _).range_comp _
 #align equiv_like.range_comp EquivLike.range_comp
 
chore: remove more bex and ball from lemma names (#11615)

Follow-up to #10816.

Remaining places containing such lemmas are

  • Option.bex_ne_none and Option.ball_ne_none: defined in Lean core
  • Nat.decidableBallLT and Nat.decidableBallLE: defined in Lean core
  • bef_def is still used in a number of places and could be renamed
  • BAll.imp_{left,right}, BEx.imp_{left,right}, BEx.intro and BEx.elim

I only audited the first ~150 lemmas mentioning "ball"; too many lemmas named after Metric.ball/openBall/closedBall.

Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>

Diff
@@ -207,6 +207,7 @@ variable {f : α → β} {s t : Set α}
 -- Porting note: `Set.image` is already defined in `Init.Set`
 #align set.image Set.image
 
+@[deprecated mem_image] -- 2024-03-23
 theorem mem_image_iff_bex {f : α → β} {s : Set α} {y : β} :
     y ∈ f '' s ↔ ∃ (x : _) (_ : x ∈ s), f x = y :=
   bex_def.symm
chore(Set/Finset): standardize names of distributivity laws (#11572)

Standardizes the following names for distributivity laws across Finset and Set:

  • inter_union_distrib_left
  • inter_union_distrib_right
  • union_inter_distrib_left
  • union_inter_distrib_right

Makes arguments explicit in:

  • Set.union_inter_distrib_right
  • Set.union_inter_distrib_left
  • Set.inter_union_distrib_right

Deprecates these theorem names:

  • Finset.inter_distrib_left
  • Finset.inter_distrib_right
  • Finset.union_distrib_right
  • Finset.union_distrib_left
  • Set.inter_distrib_left
  • Set.inter_distrib_right
  • Set.union_distrib_right
  • Set.union_distrib_left

Fixes use of deprecated names and implicit arguments in these files:

  • Topology/Basic
  • Topology/Connected/Basic
  • MeasureTheory/MeasurableSpace/Basic
  • MeasureTheory/Covering/Differentiation
  • MeasureTheory/Constructions/BorelSpace/Basic
  • Data/Set/Image
  • Data/Set/Basic
  • Data/PFun
  • Data/Matroid/Dual
  • Data/Finset/Sups
  • Data/Finset/Basic
  • Combinatorics/SetFamily/FourFunctions
  • Combinatorics/Additive/SalemSpencer
  • Counterexamples/Phillips.lean
  • Archive/Imo/Imo2021Q1.lean
Diff
@@ -941,7 +941,7 @@ theorem compl_range_inr : (range (Sum.inr : β → Sum α β))ᶜ = range (Sum.i
 
 theorem image_preimage_inl_union_image_preimage_inr (s : Set (Sum α β)) :
     Sum.inl '' (Sum.inl ⁻¹' s) ∪ Sum.inr '' (Sum.inr ⁻¹' s) = s := by
-  rw [image_preimage_eq_inter_range, image_preimage_eq_inter_range, ← inter_distrib_left,
+  rw [image_preimage_eq_inter_range, image_preimage_eq_inter_range, ← inter_union_distrib_left,
     range_inl_union_range_inr, inter_univ]
 #align set.image_preimage_inl_union_image_preimage_inr Set.image_preimage_inl_union_image_preimage_inr
 
chore(Set/Image): restore forall_range_iff (#11287)

... as a @[deprecated] alias

Also add dates to some theorems deprecated in #10816, deprecate Set.exists_range_iff', and use simp-normal form in the definition of ParacompactSpace.

Diff
@@ -236,12 +236,12 @@ theorem exists_mem_image {f : α → β} {s : Set α} {p : β → Prop} :
 
 #align set.ball_image_of_ball Set.ball_image_of_ball
 
-@[deprecated forall_mem_image]
+@[deprecated forall_mem_image] -- 2024-02-21
 theorem mem_image_elim {f : α → β} {s : Set α} {C : β → Prop} (h : ∀ x : α, x ∈ s → C (f x)) :
     ∀ {y : β}, y ∈ f '' s → C y := forall_mem_image.2 h _
 #align set.mem_image_elim Set.mem_image_elim
 
-@[deprecated forall_mem_image]
+@[deprecated forall_mem_image] -- 2024-02-21
 theorem mem_image_elim_on {f : α → β} {s : Set α} {C : β → Prop} {y : β} (h_y : y ∈ f '' s)
     (h : ∀ x : α, x ∈ s → C (f x)) : C y := forall_mem_image.2 h _ h_y
 #align set.mem_image_elim_on Set.mem_image_elim_on
@@ -250,16 +250,7 @@ theorem mem_image_elim_on {f : α → β} {s : Set α} {C : β → Prop} {y : β
 @[congr]
 theorem image_congr {f g : α → β} {s : Set α} (h : ∀ a ∈ s, f a = g a) : f '' s = g '' s := by
   ext x
-  rw [mem_image, mem_image]
-  exact {
-    mp := by
-      rintro ⟨a, ha1, ha2⟩
-      exact ⟨a, ⟨ha1, (h a ha1) ▸ ha2⟩⟩,
-    mpr := by
-      rintro ⟨a, ha1, ha2⟩
-      exact ⟨a, ⟨ha1, (h a ha1) ▸ ha2⟩⟩
-  }
-  -- safe [ext_iff, iff_def]
+  exact exists_congr fun a ↦ and_congr_right fun ha ↦ by rw [h a ha]
 #align set.image_congr Set.image_congr
 
 /-- A common special case of `image_congr` -/
@@ -662,6 +653,8 @@ variable {f : ι → α} {s t : Set α}
 theorem forall_mem_range {p : α → Prop} : (∀ a ∈ range f, p a) ↔ ∀ i, p (f i) := by simp
 #align set.forall_range_iff Set.forall_mem_range
 
+@[deprecated] alias forall_range_iff := forall_mem_range -- 2024-02-21
+
 theorem forall_subtype_range_iff {p : range f → Prop} :
     (∀ a : range f, p a) ↔ ∀ i, p ⟨f i, mem_range_self _⟩ :=
   ⟨fun H i => H _, fun H ⟨y, i, hi⟩ => by
@@ -672,8 +665,8 @@ theorem forall_subtype_range_iff {p : range f → Prop} :
 theorem exists_range_iff {p : α → Prop} : (∃ a ∈ range f, p a) ↔ ∃ i, p (f i) := by simp
 #align set.exists_range_iff Set.exists_range_iff
 
-theorem exists_range_iff' {p : α → Prop} : (∃ a, a ∈ range f ∧ p a) ↔ ∃ i, p (f i) := by
-  simpa only [exists_prop] using exists_range_iff
+@[deprecated] -- 2024-03-10
+alias exists_range_iff' := exists_range_iff
 #align set.exists_range_iff' Set.exists_range_iff'
 
 theorem exists_subtype_range_iff {p : range f → Prop} :
@@ -688,7 +681,6 @@ theorem range_iff_surjective : range f = univ ↔ Surjective f :=
   eq_univ_iff_forall
 #align set.range_iff_surjective Set.range_iff_surjective
 
--- Porting note: Lean4 unfolds `Surjective` here, ruining dot notation
 alias ⟨_, _root_.Function.Surjective.range_eq⟩ := range_iff_surjective
 #align function.surjective.range_eq Function.Surjective.range_eq
 
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
@@ -221,27 +221,29 @@ theorem _root_.Function.Injective.mem_set_image {f : α → β} (hf : Injective
   ⟨fun ⟨_, hb, Eq⟩ => hf Eq ▸ hb, mem_image_of_mem f⟩
 #align function.injective.mem_set_image Function.Injective.mem_set_image
 
-theorem ball_image_iff {f : α → β} {s : Set α} {p : β → Prop} :
-    (∀ y ∈ f '' s, p y) ↔ ∀ x ∈ s, p (f x) := by simp
-#align set.ball_image_iff Set.ball_image_iff
+theorem forall_mem_image {f : α → β} {s : Set α} {p : β → Prop} :
+    (∀ y ∈ f '' s, p y) ↔ ∀ ⦃x⦄, x ∈ s → p (f x) := by simp
+#align set.ball_image_iff Set.forall_mem_image
 
-theorem ball_image_of_ball {f : α → β} {s : Set α} {p : β → Prop} (h : ∀ x ∈ s, p (f x)) :
-    ∀ y ∈ f '' s, p y :=
-  ball_image_iff.2 h
-#align set.ball_image_of_ball Set.ball_image_of_ball
-
-theorem bex_image_iff {f : α → β} {s : Set α} {p : β → Prop} :
+theorem exists_mem_image {f : α → β} {s : Set α} {p : β → Prop} :
     (∃ y ∈ f '' s, p y) ↔ ∃ x ∈ s, p (f x) := by simp
-#align set.bex_image_iff Set.bex_image_iff
+#align set.bex_image_iff Set.exists_mem_image
+
+-- 2024-02-21
+@[deprecated] alias ball_image_iff := forall_mem_image
+@[deprecated] alias bex_image_iff := exists_mem_image
+@[deprecated] alias ⟨_, ball_image_of_ball⟩ := forall_mem_image
+
+#align set.ball_image_of_ball Set.ball_image_of_ball
 
+@[deprecated forall_mem_image]
 theorem mem_image_elim {f : α → β} {s : Set α} {C : β → Prop} (h : ∀ x : α, x ∈ s → C (f x)) :
-    ∀ {y : β}, y ∈ f '' s → C y
-  | _, ⟨a, a_in, rfl⟩ => h a a_in
+    ∀ {y : β}, y ∈ f '' s → C y := forall_mem_image.2 h _
 #align set.mem_image_elim Set.mem_image_elim
 
+@[deprecated forall_mem_image]
 theorem mem_image_elim_on {f : α → β} {s : Set α} {C : β → Prop} {y : β} (h_y : y ∈ f '' s)
-    (h : ∀ x : α, x ∈ s → C (f x)) : C y :=
-  mem_image_elim h h_y
+    (h : ∀ x : α, x ∈ s → C (f x)) : C y := forall_mem_image.2 h _ h_y
 #align set.mem_image_elim_on Set.mem_image_elim_on
 
 -- Porting note: used to be `safe`
@@ -269,9 +271,7 @@ theorem image_congr' {f g : α → β} {s : Set α} (h : ∀ x : α, f x = g x)
 lemma image_mono (h : s ⊆ t) : f '' s ⊆ f '' t := by
   rintro - ⟨a, ha, rfl⟩; exact mem_image_of_mem f (h ha)
 
-theorem image_comp (f : β → γ) (g : α → β) (a : Set α) : f ∘ g '' a = f '' (g '' a) :=
-  Subset.antisymm (ball_image_of_ball fun _ ha => mem_image_of_mem _ <| mem_image_of_mem _ ha)
-    (ball_image_of_ball <| ball_image_of_ball fun _ ha => mem_image_of_mem _ ha)
+theorem image_comp (f : β → γ) (g : α → β) (a : Set α) : f ∘ g '' a = f '' (g '' a) := by aesop
 #align set.image_comp Set.image_comp
 
 theorem image_comp_eq {g : β → γ} : image (g ∘ f) = image g ∘ image f := by ext; simp
@@ -487,7 +487,7 @@ instance (f : α → β) (s : Set α) [Nonempty s] : Nonempty (f '' s) :=
 /-- image and preimage are a Galois connection -/
 @[simp]
 theorem image_subset_iff {s : Set α} {t : Set β} {f : α → β} : f '' s ⊆ t ↔ s ⊆ f ⁻¹' t :=
-  ball_image_iff
+  forall_mem_image
 #align set.image_subset_iff Set.image_subset_iff
 
 theorem image_preimage_subset (f : α → β) (s : Set β) : f '' (f ⁻¹' s) ⊆ s :=
@@ -659,8 +659,8 @@ section Range
 
 variable {f : ι → α} {s t : Set α}
 
-theorem forall_range_iff {p : α → Prop} : (∀ a ∈ range f, p a) ↔ ∀ i, p (f i) := by simp
-#align set.forall_range_iff Set.forall_range_iff
+theorem forall_mem_range {p : α → Prop} : (∀ a ∈ range f, p a) ↔ ∀ i, p (f i) := by simp
+#align set.forall_range_iff Set.forall_mem_range
 
 theorem forall_subtype_range_iff {p : range f → Prop} :
     (∀ a : range f, p a) ↔ ∀ i, p ⟨f i, mem_range_self _⟩ :=
@@ -727,13 +727,11 @@ theorem Nonempty.preimage' {s : Set β} (hs : s.Nonempty) {f : α → β} (hf :
   ⟨x, Set.mem_preimage.2 <| hx.symm ▸ hy⟩
 #align set.nonempty.preimage' Set.Nonempty.preimage'
 
-theorem range_comp (g : α → β) (f : ι → α) : range (g ∘ f) = g '' range f :=
-  Subset.antisymm (forall_range_iff.mpr fun _ => mem_image_of_mem g (mem_range_self _))
-    (ball_image_iff.mpr <| forall_range_iff.mpr mem_range_self)
+theorem range_comp (g : α → β) (f : ι → α) : range (g ∘ f) = g '' range f := by aesop
 #align set.range_comp Set.range_comp
 
 theorem range_subset_iff : range f ⊆ s ↔ ∀ y, f y ∈ s :=
-  forall_range_iff
+  forall_mem_range
 #align set.range_subset_iff Set.range_subset_iff
 
 theorem range_subset_range_iff_exists_comp {f : α → γ} {g : β → γ} :
@@ -820,7 +818,7 @@ theorem exists_subset_range_iff {f : α → β} {p : Set β → Prop} :
 
 theorem forall_subset_range_iff {f : α → β} {p : Set β → Prop} :
     (∀ s, s ⊆ range f → p s) ↔ ∀ s, p (f '' s) := by
-  rw [← forall_range_iff, range_image]; rfl
+  rw [← forall_mem_range, range_image]; rfl
 
 @[simp]
 theorem preimage_subset_preimage_iff {s t : Set α} {f : β → α} (hs : s ⊆ range f) :
@@ -1223,7 +1221,7 @@ theorem subsingleton_of_preimage {f : α → β} (hf : Function.Surjective f) (s
 #align set.subsingleton_of_preimage Set.subsingleton_of_preimage
 
 theorem subsingleton_range {α : Sort*} [Subsingleton α] (f : α → β) : (range f).Subsingleton :=
-  forall_range_iff.2 fun x => forall_range_iff.2 fun y => congr_arg f (Subsingleton.elim x y)
+  forall_mem_range.2 fun x => forall_mem_range.2 fun y => congr_arg f (Subsingleton.elim x y)
 #align set.subsingleton_range Set.subsingleton_range
 
 /-- The preimage of a nontrivial set under a surjective map is nontrivial. -/
feat(Set): API for subset restriction and coercion to/from subtypes (#9940)

Api for subset restriction and coercion to/from subtypes

Co-authored-by: Miguel Marco <mmarco@unizar.es>

Co-authored-by: Miguel Marco <mmarco@unizar.es> Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: mmarco <mmarco@kali> Co-authored-by: Winston Yin <winstonyin@gmail.com>

Diff
@@ -1444,6 +1444,14 @@ theorem preimage_val_eq_preimage_val_iff (s t u : Set α) :
   preimage_coe_eq_preimage_coe_iff
 #align subtype.preimage_val_eq_preimage_val_iff Subtype.preimage_val_eq_preimage_val_iff
 
+lemma preimage_val_subset_preimage_val_iff (s t u : Set α) :
+    (Subtype.val ⁻¹' t : Set s) ⊆ Subtype.val ⁻¹' u ↔ s ∩ t ⊆ s ∩ u := by
+  constructor
+  · rw [← image_preimage_coe, ← image_preimage_coe]
+    exact image_subset _
+  · intro h x a
+    exact (h ⟨x.2, a⟩).2
+
 theorem exists_set_subtype {t : Set α} (p : Set α → Prop) :
     (∃ s : Set t, p (((↑) : t → α) '' s)) ↔ ∃ s : Set α, s ⊆ t ∧ p s := by
   rw [← exists_subset_range_and_iff, range_coe]
refactor: prefer s ∩ . when passing to a subset of s (#10433)

This is partial work to make s ∩ . be consistently used for passing to a subset of s. This is sort of an adjoint to (Subtype.val : s -> _) '' ., except for the fact that it does not produce a Set s.

The main API changes are to Subtype.image_preimage_val and Subtype.preimage_val_eq_preimage_val_iff in Mathlib.Data.Set.Image. Changes in other modules are all proof fixups.

Zulip discussion

Diff
@@ -779,14 +779,17 @@ theorem insert_image_compl_eq_range (f : α → β) (x : α) : insert (f x) (f '
   rw [← image_insert_eq, insert_eq, union_compl_self, image_univ]
 #align set.insert_image_compl_eq_range Set.insert_image_compl_eq_range
 
-theorem image_preimage_eq_inter_range {f : α → β} {t : Set β} : f '' (f ⁻¹' t) = t ∩ range f :=
+theorem image_preimage_eq_range_inter {f : α → β} {t : Set β} : f '' (f ⁻¹' t) = range f ∩ t :=
   ext fun x =>
-    ⟨fun ⟨x, hx, HEq⟩ => HEq ▸ ⟨hx, mem_range_self _⟩, fun ⟨hx, ⟨y, h_eq⟩⟩ =>
+    ⟨fun ⟨x, hx, HEq⟩ => HEq ▸ ⟨mem_range_self _, hx⟩, fun ⟨⟨y, h_eq⟩, hx⟩ =>
       h_eq ▸ mem_image_of_mem f <| show y ∈ f ⁻¹' t by rw [preimage, mem_setOf, h_eq]; exact hx⟩
+
+theorem image_preimage_eq_inter_range {f : α → β} {t : Set β} : f '' (f ⁻¹' t) = t ∩ range f := by
+  rw [image_preimage_eq_range_inter, inter_comm]
 #align set.image_preimage_eq_inter_range Set.image_preimage_eq_inter_range
 
 theorem image_preimage_eq_of_subset {f : α → β} {s : Set β} (hs : s ⊆ range f) :
-    f '' (f ⁻¹' s) = s := by rw [image_preimage_eq_inter_range, inter_eq_self_of_subset_left hs]
+    f '' (f ⁻¹' s) = s := by rw [image_preimage_eq_range_inter, inter_eq_self_of_subset_right hs]
 #align set.image_preimage_eq_of_subset Set.image_preimage_eq_of_subset
 
 theorem image_preimage_eq_iff {f : α → β} {s : Set β} : f '' (f ⁻¹' s) = s ↔ s ⊆ range f :=
@@ -852,7 +855,7 @@ theorem preimage_range_inter {f : α → β} {s : Set β} : f ⁻¹' (range f 
 #align set.preimage_range_inter Set.preimage_range_inter
 
 theorem preimage_image_preimage {f : α → β} {s : Set β} : f ⁻¹' (f '' (f ⁻¹' s)) = f ⁻¹' s := by
-  rw [image_preimage_eq_inter_range, preimage_inter_range]
+  rw [image_preimage_eq_range_inter, preimage_range_inter]
 #align set.preimage_image_preimage Set.preimage_image_preimage
 
 @[simp, mfld_simps]
@@ -1412,28 +1415,32 @@ theorem coe_image_univ (s : Set α) : ((↑) : s → α) '' Set.univ = s :=
 #align subtype.coe_image_univ Subtype.coe_image_univ
 
 @[simp]
-theorem image_preimage_coe (s t : Set α) : ((↑) : s → α) '' (((↑) : s → α) ⁻¹' t) = t ∩ s :=
-  image_preimage_eq_inter_range.trans <| congr_arg _ range_coe
+theorem image_preimage_coe (s t : Set α) : ((↑) : s → α) '' (((↑) : s → α) ⁻¹' t) = s ∩ t :=
+  image_preimage_eq_range_inter.trans <| congr_arg (· ∩ t) range_coe
 #align subtype.image_preimage_coe Subtype.image_preimage_coe
 
-theorem image_preimage_val (s t : Set α) : (Subtype.val : s → α) '' (Subtype.val ⁻¹' t) = t ∩ s :=
+theorem image_preimage_val (s t : Set α) : (Subtype.val : s → α) '' (Subtype.val ⁻¹' t) = s ∩ t :=
   image_preimage_coe s t
 #align subtype.image_preimage_val Subtype.image_preimage_val
 
 theorem preimage_coe_eq_preimage_coe_iff {s t u : Set α} :
-    ((↑) : s → α) ⁻¹' t = ((↑) : s → α) ⁻¹' u ↔ t ∩ s = u ∩ s := by
+    ((↑) : s → α) ⁻¹' t = ((↑) : s → α) ⁻¹' u ↔ s ∩ t = s ∩ u := by
   rw [← image_preimage_coe, ← image_preimage_coe, coe_injective.image_injective.eq_iff]
 #align subtype.preimage_coe_eq_preimage_coe_iff Subtype.preimage_coe_eq_preimage_coe_iff
 
+theorem preimage_coe_self_inter (s t : Set α) :
+    ((↑) : s → α) ⁻¹' (s ∩ t) = ((↑) : s → α) ⁻¹' t := by
+  rw [preimage_coe_eq_preimage_coe_iff, ← inter_assoc, inter_self]
+
 -- Porting note:
 -- @[simp] `simp` can prove this
 theorem preimage_coe_inter_self (s t : Set α) :
     ((↑) : s → α) ⁻¹' (t ∩ s) = ((↑) : s → α) ⁻¹' t := by
-  rw [preimage_coe_eq_preimage_coe_iff, inter_assoc, inter_self]
+  rw [inter_comm, preimage_coe_self_inter]
 #align subtype.preimage_coe_inter_self Subtype.preimage_coe_inter_self
 
 theorem preimage_val_eq_preimage_val_iff (s t u : Set α) :
-    (Subtype.val : s → α) ⁻¹' t = Subtype.val ⁻¹' u ↔ t ∩ s = u ∩ s :=
+    (Subtype.val : s → α) ⁻¹' t = Subtype.val ⁻¹' u ↔ s ∩ t = s ∩ u :=
   preimage_coe_eq_preimage_coe_iff
 #align subtype.preimage_val_eq_preimage_val_iff Subtype.preimage_val_eq_preimage_val_iff
 
@@ -1448,7 +1455,7 @@ theorem forall_set_subtype {t : Set α} (p : Set α → Prop) :
 
 theorem preimage_coe_nonempty {s t : Set α} :
     (((↑) : s → α) ⁻¹' t).Nonempty ↔ (s ∩ t).Nonempty := by
-  rw [inter_comm, ← image_preimage_coe, image_nonempty]
+  rw [← image_preimage_coe, image_nonempty]
 #align subtype.preimage_coe_nonempty Subtype.preimage_coe_nonempty
 
 theorem preimage_coe_eq_empty {s t : Set α} : ((↑) : s → α) ⁻¹' t = ∅ ↔ s ∩ t = ∅ := by
fix(Data/Set/Image): simp confluence issues with image_subset_iff (#8683)

image_subset_iff is a questionable simp lemma because it converts an application of Set.image into an application of Set.preimage unconditionally. This means that if any simp lemma applies to images, there must be a corresponding lemma for preimages. These lemmas are what I found missing after loogling.

I also added machine-checked examples of each confluence issue to a new file tests/simp_confluence.

Diff
@@ -510,6 +510,11 @@ theorem image_preimage_eq {f : α → β} (s : Set β) (h : Surjective f) : f ''
     ⟨y, (e.symm ▸ hx : f y ∈ s), e⟩
 #align set.image_preimage_eq Set.image_preimage_eq
 
+@[simp]
+theorem Nonempty.subset_preimage_const {s : Set α} (hs : Set.Nonempty s) (t : Set β) (a : β) :
+    s ⊆ (fun _ => a) ⁻¹' t ↔ a ∈ t := by
+  rw [← image_subset_iff, hs.image_const, singleton_subset_iff]
+
 @[simp]
 theorem preimage_eq_preimage {f : β → α} (hf : Surjective f) : f ⁻¹' s = f ⁻¹' t ↔ s = t :=
   Iff.intro
@@ -687,12 +692,20 @@ theorem range_iff_surjective : range f = univ ↔ Surjective f :=
 alias ⟨_, _root_.Function.Surjective.range_eq⟩ := range_iff_surjective
 #align function.surjective.range_eq Function.Surjective.range_eq
 
+@[simp]
+theorem subset_range_of_surjective {f : α → β} (h : Surjective f) (s : Set β) :
+    s ⊆ range f := Surjective.range_eq h ▸ subset_univ s
+
 @[simp]
 theorem image_univ {f : α → β} : f '' univ = range f := by
   ext
   simp [image, range]
 #align set.image_univ Set.image_univ
 
+@[simp]
+theorem preimage_eq_univ_iff {f : α → β} {s} : f ⁻¹' s = univ ↔ range f ⊆ s := by
+  rw [← univ_subset_iff, ← image_subset_iff, image_univ]
+
 theorem image_subset_range (f : α → β) (s) : f '' s ⊆ range f := by
   rw [← image_univ]; exact image_subset _ (subset_univ _)
 #align set.image_subset_range Set.image_subset_range
@@ -806,6 +819,7 @@ theorem forall_subset_range_iff {f : α → β} {p : Set β → Prop} :
     (∀ s, s ⊆ range f → p s) ↔ ∀ s, p (f '' s) := by
   rw [← forall_range_iff, range_image]; rfl
 
+@[simp]
 theorem preimage_subset_preimage_iff {s t : Set α} {f : β → α} (hs : s ⊆ range f) :
     f ⁻¹' s ⊆ f ⁻¹' t ↔ s ⊆ t := by
   constructor
chore: scope symmDiff notations (#9844)

Those notations are not scoped whereas the file is very low in the import hierarchy.

Diff
@@ -90,6 +90,7 @@ theorem preimage_diff (f : α → β) (s t : Set β) : f ⁻¹' (s \ t) = f ⁻
   rfl
 #align set.preimage_diff Set.preimage_diff
 
+open scoped symmDiff in
 @[simp]
 lemma preimage_symmDiff {f : α → β} (s t : Set β) : f ⁻¹' (s ∆ t) = (f ⁻¹' s) ∆ (f ⁻¹' t) :=
   rfl
@@ -441,6 +442,7 @@ theorem subset_image_diff (f : α → β) (s t : Set α) : f '' s \ f '' t ⊆ f
   exact image_subset f (subset_union_right t s)
 #align set.subset_image_diff Set.subset_image_diff
 
+open scoped symmDiff in
 theorem subset_image_symmDiff : (f '' s) ∆ (f '' t) ⊆ f '' s ∆ t :=
   (union_subset_union (subset_image_diff _ _ _) <| subset_image_diff _ _ _).trans
     (superset_of_eq (image_union _ _ _))
@@ -452,6 +454,7 @@ theorem image_diff {f : α → β} (hf : Injective f) (s t : Set α) : f '' (s \
     (subset_image_diff f s t)
 #align set.image_diff Set.image_diff
 
+open scoped symmDiff in
 theorem image_symmDiff (hf : Injective f) (s t : Set α) : f '' s ∆ t = (f '' s) ∆ (f '' t) := by
   simp_rw [Set.symmDiff_def, image_union, image_diff hf]
 #align set.image_symm_diff Set.image_symmDiff
chore: reduce imports (#9830)

This uses the improved shake script from #9772 to reduce imports across mathlib. The corresponding noshake.json file has been added to #9772.

Co-authored-by: Mario Carneiro <di.gama@gmail.com>

Diff
@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jeremy Avigad, Leonardo de Moura
 -/
 import Mathlib.Data.Set.Basic
+import Mathlib.Order.WithBot
 
 #align_import data.set.image from "leanprover-community/mathlib"@"001ffdc42920050657fd45bd2b8bfbec8eaaeb29"
 
chore(Data/Set): move definitions to a new file (#9737)

This and other similar PRs will help us reduce import dependencies and improve parallel compilation in the future.

Diff
@@ -42,15 +42,6 @@ variable {α β γ : Type*} {ι ι' : Sort*}
 /-! ### Inverse image -/
 
 
-/-- The preimage of `s : Set β` by `f : α → β`, written `f ⁻¹' s`,
-  is the set of `x : α` such that `f x ∈ s`. -/
-def preimage {α : Type u} {β : Type v} (f : α → β) (s : Set β) : Set α :=
-  { x | f x ∈ s }
-#align set.preimage Set.preimage
-
-/-- `f ⁻¹' t` denotes the preimage of `t : Set β` under the function `f : α → β`. -/
-infixl:80 " ⁻¹' " => preimage
-
 section Preimage
 
 variable {f : α → β} {g : β → γ}
@@ -60,11 +51,6 @@ theorem preimage_empty : f ⁻¹' ∅ = ∅ :=
   rfl
 #align set.preimage_empty Set.preimage_empty
 
-@[simp, mfld_simps]
-theorem mem_preimage {s : Set β} {a : α} : a ∈ f ⁻¹' s ↔ f a ∈ s :=
-  Iff.rfl
-#align set.mem_preimage Set.mem_preimage
-
 theorem preimage_congr {f g : α → β} {s : Set β} (h : ∀ x : α, f x = g x) : f ⁻¹' s = g ⁻¹' s := by
   congr with x
   simp [h]
@@ -219,28 +205,15 @@ variable {f : α → β} {s t : Set α}
 -- Porting note: `Set.image` is already defined in `Init.Set`
 #align set.image Set.image
 
-/-- `f '' s` denotes the image of `s : Set α` under the function `f : α → β`. -/
-infixl:80 " '' " => image
-
 theorem mem_image_iff_bex {f : α → β} {s : Set α} {y : β} :
     y ∈ f '' s ↔ ∃ (x : _) (_ : x ∈ s), f x = y :=
   bex_def.symm
 #align set.mem_image_iff_bex Set.mem_image_iff_bex
 
-@[simp]
-theorem mem_image (f : α → β) (s : Set α) (y : β) : y ∈ f '' s ↔ ∃ x ∈ s, f x = y :=
-  Iff.rfl
-#align set.mem_image Set.mem_image
-
 theorem image_eta (f : α → β) : f '' s = (fun x => f x) '' s :=
   rfl
 #align set.image_eta Set.image_eta
 
-@[mfld_simps]
-theorem mem_image_of_mem (f : α → β) {x : α} {a : Set α} (h : x ∈ a) : f x ∈ f '' a :=
-  ⟨_, h, rfl⟩
-#align set.mem_image_of_mem Set.mem_image_of_mem
-
 theorem _root_.Function.Injective.mem_set_image {f : α → β} (hf : Injective f) {s : Set α} {a : α} :
     f a ∈ f '' s ↔ a ∈ s :=
   ⟨fun ⟨_, hb, Eq⟩ => hf Eq ▸ hb, mem_image_of_mem f⟩
@@ -626,11 +599,6 @@ theorem exists_image_iff (f : α → β) (x : Set α) (P : β → Prop) :
     ⟨⟨_, _, a.prop, rfl⟩, h⟩⟩
 #align set.exists_image_iff Set.exists_image_iff
 
-/-- Restriction of `f` to `s` factors through `s.imageFactorization f : s → f '' s`. -/
-def imageFactorization (f : α → β) (s : Set α) : s → f '' s := fun p =>
-  ⟨f p.1, mem_image_of_mem f p.2⟩
-#align set.image_factorization Set.imageFactorization
-
 theorem imageFactorization_eq {f : α → β} {s : Set α} :
     Subtype.val ∘ imageFactorization f s = f ∘ Subtype.val :=
   funext fun _ => rfl
@@ -682,26 +650,6 @@ section Range
 
 variable {f : ι → α} {s t : Set α}
 
-/-- Range of a function.
-
-This function is more flexible than `f '' univ`, as the image requires that the domain is in Type
-and not an arbitrary Sort. -/
-def range (f : ι → α) : Set α :=
-  { x | ∃ y, f y = x }
-#align set.range Set.range
-
-@[simp]
-theorem mem_range {x : α} : x ∈ range f ↔ ∃ y, f y = x :=
-  Iff.rfl
-#align set.mem_range Set.mem_range
-
--- Porting note
--- @[simp] `simp` can prove this
-@[mfld_simps]
-theorem mem_range_self (i : ι) : f i ∈ range f :=
-  ⟨i, rfl⟩
-#align set.mem_range_self Set.mem_range_self
-
 theorem forall_range_iff {p : α → Prop} : (∀ a ∈ range f, p a) ↔ ∀ i, p (f i) := by simp
 #align set.forall_range_iff Set.forall_range_iff
 
@@ -1078,10 +1026,6 @@ theorem image_compl_preimage {f : α → β} {s : Set β} : f '' (f ⁻¹' s)ᶜ
   rw [compl_eq_univ_diff, image_diff_preimage, image_univ]
 #align set.image_compl_preimage Set.image_compl_preimage
 
-/-- Any map `f : ι → β` factors through a map `rangeFactorization f : ι → range f`. -/
-def rangeFactorization (f : ι → β) : ι → range f := fun i => ⟨f i, mem_range_self i⟩
-#align set.range_factorization Set.rangeFactorization
-
 theorem rangeFactorization_eq {f : ι → β} : Subtype.val ∘ rangeFactorization f = f :=
   funext fun _ => rfl
 #align set.range_factorization_eq Set.rangeFactorization_eq
@@ -1177,22 +1121,6 @@ theorem range_inclusion (h : s ⊆ t) : range (inclusion h) = { x : t | (x : α)
   -- rw [SetCoe.exists, Subtype.coe_mk, exists_prop, exists_eq_right, mem_set_of, Subtype.coe_mk]
 #align set.range_inclusion Set.range_inclusion
 
-/-- We can use the axiom of choice to pick a preimage for every element of `range f`. -/
-noncomputable def rangeSplitting (f : α → β) : range f → α := fun x => x.2.choose
-#align set.range_splitting Set.rangeSplitting
-
--- This can not be a `@[simp]` lemma because the head of the left hand side is a variable.
-theorem apply_rangeSplitting (f : α → β) (x : range f) : f (rangeSplitting f x) = x :=
-  x.2.choose_spec
-#align set.apply_range_splitting Set.apply_rangeSplitting
-
-@[simp]
-theorem comp_rangeSplitting (f : α → β) : f ∘ rangeSplitting f = (↑) := by
-  ext
-  simp only [Function.comp_apply]
-  apply apply_rangeSplitting
-#align set.comp_range_splitting Set.comp_rangeSplitting
-
 -- When `f` is injective, see also `Equiv.ofInjective`.
 theorem leftInverse_rangeSplitting (f : α → β) :
     LeftInverse (rangeFactorization f) (rangeSplitting f) := fun x => by
feat: define complete sublattices (#9763)
Diff
@@ -596,6 +596,12 @@ theorem image_eq_image {f : α → β} (hf : Injective f) : f '' s = f '' t ↔
       rw [← preimage_image_eq s hf, ← preimage_image_eq t hf, eq]
 #align set.image_eq_image Set.image_eq_image
 
+theorem subset_image_iff {t : Set β} :
+    t ⊆ f '' s ↔ ∃ u, u ⊆ s ∧ f '' u = t := by
+  refine ⟨fun h ↦ ⟨f ⁻¹' t ∩ s, inter_subset_right _ _, ?_⟩,
+    fun ⟨u, hu, hu'⟩ ↦ hu'.symm ▸ image_mono hu⟩
+  rwa [image_preimage_inter, inter_eq_left]
+
 theorem image_subset_image_iff {f : α → β} (hf : Injective f) : f '' s ⊆ f '' t ↔ s ⊆ t := by
   refine' Iff.symm <| (Iff.intro (image_subset f)) fun h => _
   rw [← preimage_image_eq s hf, ← preimage_image_eq t hf]
chore(Data/Finset): drop some Nonempty arguments (#9377)
  • rename Finset.Nonempty.image_iff to Finset.image_nonempty, deprecate the old version;
  • rename Set.nonempty_image_iff to Set.image_nonempty, deprecate the old version;
  • drop unneeded Finset.Nonempty arguments here and there;
  • add versions of some lemmas that assume Nonempty s instead of Nonempty (s.image f) or Nonempty (s.map f).
Diff
@@ -491,9 +491,11 @@ theorem Nonempty.of_image {f : α → β} {s : Set α} : (f '' s).Nonempty → s
 #align set.nonempty.of_image Set.Nonempty.of_image
 
 @[simp]
-theorem nonempty_image_iff {f : α → β} {s : Set α} : (f '' s).Nonempty ↔ s.Nonempty :=
+theorem image_nonempty {f : α → β} {s : Set α} : (f '' s).Nonempty ↔ s.Nonempty :=
   ⟨Nonempty.of_image, fun h => h.image f⟩
-#align set.nonempty_image_iff Set.nonempty_image_iff
+#align set.nonempty_image_iff Set.image_nonempty
+
+@[deprecated] alias nonempty_image_iff := image_nonempty
 
 theorem Nonempty.preimage {s : Set β} (hs : s.Nonempty) {f : α → β} (hf : Surjective f) :
     (f ⁻¹' s).Nonempty :=
@@ -555,7 +557,7 @@ theorem image_preimage_inter (f : α → β) (s : Set α) (t : Set β) :
 @[simp]
 theorem image_inter_nonempty_iff {f : α → β} {s : Set α} {t : Set β} :
     (f '' s ∩ t).Nonempty ↔ (s ∩ f ⁻¹' t).Nonempty := by
-  rw [← image_inter_preimage, nonempty_image_iff]
+  rw [← image_inter_preimage, image_nonempty]
 #align set.image_inter_nonempty_iff Set.image_inter_nonempty_iff
 
 theorem image_diff_preimage {f : α → β} {s : Set α} {t : Set β} : f '' (s \ f ⁻¹' t) = f '' s \ t :=
@@ -1337,7 +1339,7 @@ theorem Surjective.image_surjective (hf : Surjective f) : Surjective (image f) :
 
 @[simp]
 theorem Surjective.nonempty_preimage (hf : Surjective f) {s : Set β} :
-    (f ⁻¹' s).Nonempty ↔ s.Nonempty := by rw [← nonempty_image_iff, hf.image_preimage]
+    (f ⁻¹' s).Nonempty ↔ s.Nonempty := by rw [← image_nonempty, hf.image_preimage]
 #align function.surjective.nonempty_preimage Function.Surjective.nonempty_preimage
 
 theorem Injective.image_injective (hf : Injective f) : Injective (image f) := by
@@ -1494,7 +1496,7 @@ theorem forall_set_subtype {t : Set α} (p : Set α → Prop) :
 
 theorem preimage_coe_nonempty {s t : Set α} :
     (((↑) : s → α) ⁻¹' t).Nonempty ↔ (s ∩ t).Nonempty := by
-  rw [inter_comm, ← image_preimage_coe, nonempty_image_iff]
+  rw [inter_comm, ← image_preimage_coe, image_nonempty]
 #align subtype.preimage_coe_nonempty Subtype.preimage_coe_nonempty
 
 theorem preimage_coe_eq_empty {s t : Set α} : ((↑) : s → α) ⁻¹' t = ∅ ↔ s ∩ t = ∅ := by
chore(*): use ∃ x ∈ s, _ instead of ∃ (x) (_ : x ∈ s), _ (#9184)

Search for [∀∃].*(_ and manually replace some occurrences with more readable versions. In case of , the new expressions are defeq to the old ones. In case of , they differ by exists_prop.

In some rare cases, golf proofs that needed fixing.

Diff
@@ -228,7 +228,7 @@ theorem mem_image_iff_bex {f : α → β} {s : Set α} {y : β} :
 #align set.mem_image_iff_bex Set.mem_image_iff_bex
 
 @[simp]
-theorem mem_image (f : α → β) (s : Set α) (y : β) : y ∈ f '' s ↔ ∃ x, x ∈ s ∧ f x = y :=
+theorem mem_image (f : α → β) (s : Set α) (y : β) : y ∈ f '' s ↔ ∃ x ∈ s, f x = y :=
   Iff.rfl
 #align set.mem_image Set.mem_image
 
feat: supporting lemmas for defining root systems (#8980)

A collection of loosely-related lemmas, split out from other work in the hopes of simplifying review.

Diff
@@ -290,11 +290,17 @@ theorem image_congr' {f g : α → β} {s : Set α} (h : ∀ x : α, f x = g x)
   image_congr fun x _ => h x
 #align set.image_congr' Set.image_congr'
 
+@[gcongr]
+lemma image_mono (h : s ⊆ t) : f '' s ⊆ f '' t := by
+  rintro - ⟨a, ha, rfl⟩; exact mem_image_of_mem f (h ha)
+
 theorem image_comp (f : β → γ) (g : α → β) (a : Set α) : f ∘ g '' a = f '' (g '' a) :=
   Subset.antisymm (ball_image_of_ball fun _ ha => mem_image_of_mem _ <| mem_image_of_mem _ ha)
     (ball_image_of_ball <| ball_image_of_ball fun _ ha => mem_image_of_mem _ ha)
 #align set.image_comp Set.image_comp
 
+theorem image_comp_eq {g : β → γ} : image (g ∘ f) = image g ∘ image f := by ext; simp
+
 /-- A variant of `image_comp`, useful for rewriting -/
 theorem image_image (g : β → γ) (f : α → β) (s : Set α) : g '' (f '' s) = (fun x => g (f x)) '' s :=
   (image_comp g f s).symm
@@ -391,6 +397,9 @@ theorem mem_compl_image [BooleanAlgebra α] (t : α) (S : Set α) :
   simp [← preimage_compl_eq_image_compl]
 #align set.mem_compl_image Set.mem_compl_image
 
+@[simp]
+theorem image_id_eq : image (id : α → α) = id := by ext; simp
+
 /-- A variant of `image_id` -/
 @[simp]
 theorem image_id' (s : Set α) : (fun x => x) '' s = s := by
@@ -401,6 +410,10 @@ theorem image_id' (s : Set α) : (fun x => x) '' s = s := by
 theorem image_id (s : Set α) : id '' s = s := by simp
 #align set.image_id Set.image_id
 
+lemma image_iterate_eq {f : α → α} {n : ℕ} : image (f^[n]) = (image f)^[n] := by
+  induction' n with n ih; · simp
+  rw [iterate_succ', iterate_succ',← ih, image_comp_eq]
+
 theorem compl_compl_image [BooleanAlgebra α] (S : Set α) :
     HasCompl.compl '' (HasCompl.compl '' S) = S := by
   rw [← image_comp, compl_comp_compl, image_id]
chore: Replace (· op ·) a by (a op ·) (#8843)

I used the regex \(\(· (.) ·\) (.)\), replacing with ($2 $1 ·).

Diff
@@ -1003,7 +1003,7 @@ theorem range_quotient_lift_on' {s : Setoid ι} (hf) :
 #align set.range_quotient_lift_on' Set.range_quotient_lift_on'
 
 instance canLift (c) (p) [CanLift α β c p] :
-    CanLift (Set α) (Set β) ((· '' ·) c) fun s => ∀ x ∈ s, p x where
+    CanLift (Set α) (Set β) (c '' ·) fun s => ∀ x ∈ s, p x where
   prf _ hs := subset_range_iff_exists_image_eq.mp fun x hx => CanLift.prf _ (hs x hx)
 #align set.can_lift Set.canLift
 
chore: space after (#8178)

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

Diff
@@ -436,7 +436,7 @@ theorem mem_image_iff_of_inverse {f : α → β} {g : β → α} {b : β} {s : S
 #align set.mem_image_iff_of_inverse Set.mem_image_iff_of_inverse
 
 theorem image_compl_subset {f : α → β} {s : Set α} (H : Injective f) : f '' sᶜ ⊆ (f '' s)ᶜ :=
-  Disjoint.subset_compl_left <| by simp [disjoint_iff_inf_le, ←image_inter H]
+  Disjoint.subset_compl_left <| by simp [disjoint_iff_inf_le, ← image_inter H]
 #align set.image_compl_subset Set.image_compl_subset
 
 theorem subset_image_compl {f : α → β} {s : Set α} (H : Surjective f) : (f '' s)ᶜ ⊆ f '' sᶜ :=
chore: remove extraneous Set. qualifiers (#8053)

It's proposed that a code formatter remove those automatically, so we might as well remove them as we see them.

Diff
@@ -170,7 +170,7 @@ theorem preimage_comp_eq : preimage (g ∘ f) = preimage f ∘ preimage g :=
 
 theorem preimage_iterate_eq {f : α → α} {n : ℕ} : Set.preimage f^[n] = (Set.preimage f)^[n] := by
   induction' n with n ih; · simp
-  rw [iterate_succ, iterate_succ', Set.preimage_comp_eq, ih]
+  rw [iterate_succ, iterate_succ', preimage_comp_eq, ih]
 #align set.preimage_iterate_eq Set.preimage_iterate_eq
 
 theorem preimage_preimage {g : β → γ} {f : α → β} {s : Set γ} :
@@ -734,7 +734,7 @@ theorem _root_.Nat.mem_range_succ (i : ℕ) : i ∈ range Nat.succ ↔ 0 < i :=
     exact Nat.succ_pos n, fun h => ⟨_, Nat.succ_pred_eq_of_pos h⟩⟩
 #align nat.mem_range_succ Nat.mem_range_succ
 
-theorem Nonempty.preimage' {s : Set β} (hs : s.Nonempty) {f : α → β} (hf : s ⊆ Set.range f) :
+theorem Nonempty.preimage' {s : Set β} (hs : s.Nonempty) {f : α → β} (hf : s ⊆ range f) :
     (f ⁻¹' s).Nonempty :=
   let ⟨_, hy⟩ := hs
   let ⟨x, hx⟩ := hf hy
@@ -1402,13 +1402,13 @@ theorem coe_image {p : α → Prop} {s : Set (Subtype p)} :
 @[simp]
 theorem coe_image_of_subset {s t : Set α} (h : t ⊆ s) : (↑) '' { x : ↥s | ↑x ∈ t } = t := by
   ext x
-  rw [Set.mem_image]
+  rw [mem_image]
   exact ⟨fun ⟨_, hx', hx⟩ => hx ▸ hx', fun hx => ⟨⟨x, h hx⟩, hx, rfl⟩⟩
 #align subtype.coe_image_of_subset Subtype.coe_image_of_subset
 
 theorem range_coe {s : Set α} : range ((↑) : s → α) = s := by
-  rw [← Set.image_univ]
-  simp [-Set.image_univ, coe_image]
+  rw [← image_univ]
+  simp [-image_univ, coe_image]
 #align subtype.range_coe Subtype.range_coe
 
 /-- A variant of `range_coe`. Try to use `range_coe` if possible.
chore(Data/Set/Image): re-use some variables (#8054)

This also generalizes a universe from Type to Sort in Set.range_eval

Diff
@@ -197,7 +197,7 @@ theorem nonempty_of_nonempty_preimage {s : Set β} {f : α → β} (hf : (f ⁻
 @[simp] theorem preimage_singleton_false (p : α → Prop) : p ⁻¹' {False} = {a | ¬p a} := by ext; simp
 #align set.preimage_singleton_false Set.preimage_singleton_false
 
-theorem preimage_subtype_coe_eq_compl {α : Type*} {s u v : Set α} (hsuv : s ⊆ u ∪ v)
+theorem preimage_subtype_coe_eq_compl {s u v : Set α} (hsuv : s ⊆ u ∪ v)
     (H : s ∩ (u ∩ v) = ∅) : ((↑) : s → α) ⁻¹' u = ((↑) ⁻¹' v)ᶜ := by
   ext ⟨x, x_in_s⟩
   constructor
@@ -889,7 +889,7 @@ theorem _root_.Prod.range_snd [Nonempty α] : range (Prod.snd : α × β → β)
 #align prod.range_snd Prod.range_snd
 
 @[simp]
-theorem range_eval {ι : Type*} {α : ι → Sort _} [∀ i, Nonempty (α i)] (i : ι) :
+theorem range_eval {α : ι → Sort _} [∀ i, Nonempty (α i)] (i : ι) :
     range (eval i : (∀ i, α i) → α i) = univ :=
   (surjective_eval i).range_eq
 #align set.range_eval Set.range_eval
@@ -1239,14 +1239,14 @@ theorem Subsingleton.preimage {s : Set β} (hs : s.Subsingleton) {f : α → β}
 #align set.subsingleton.preimage Set.Subsingleton.preimage
 
 /-- If the image of a set under an injective map is a subsingleton, the set is a subsingleton. -/
-theorem subsingleton_of_image {α β : Type*} {f : α → β} (hf : Function.Injective f) (s : Set α)
+theorem subsingleton_of_image {f : α → β} (hf : Function.Injective f) (s : Set α)
     (hs : (f '' s).Subsingleton) : s.Subsingleton :=
   (hs.preimage hf).anti <| subset_preimage_image _ _
 #align set.subsingleton_of_image Set.subsingleton_of_image
 
 /-- If the preimage of a set under a surjective map is a subsingleton,
 the set is a subsingleton. -/
-theorem subsingleton_of_preimage {α β : Type*} {f : α → β} (hf : Function.Surjective f) (s : Set β)
+theorem subsingleton_of_preimage {f : α → β} (hf : Function.Surjective f) (s : Set β)
     (hs : (f ⁻¹' s).Subsingleton) : s.Subsingleton := fun fx hx fy hy => by
   rcases hf fx, hf fy with ⟨⟨x, rfl⟩, ⟨y, rfl⟩⟩
   exact congr_arg f (hs hx hy)
@@ -1289,7 +1289,7 @@ end Set
 
 namespace Function
 
-variable {ι : Sort*} {α : Type*} {β : Type*} {f : α → β}
+variable {ι : Sort*} {f : α → β}
 
 open Set
 
chore: remove nonterminal simp (#7580)

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

Diff
@@ -1108,7 +1108,7 @@ theorem range_ite_subset' {p : Prop} [Decidable p] {f g : α → β} :
 theorem range_ite_subset {p : α → Prop} [DecidablePred p] {f g : α → β} :
     (range fun x => if p x then f x else g x) ⊆ range f ∪ range g := by
   rw [range_subset_iff]; intro x; by_cases h : p x
-  simp [if_pos h, mem_union, mem_range_self]
+  simp only [if_pos h, mem_union, mem_range, exists_apply_eq_apply, true_or]
   simp [if_neg h, mem_union, mem_range_self]
 #align set.range_ite_subset Set.range_ite_subset
 
chore(MeasureTheory/Function): golf some proofs (#7588)
Diff
@@ -150,6 +150,16 @@ theorem preimage_const (b : β) (s : Set β) [Decidable (b ∈ s)] :
   exacts [preimage_const_of_mem hb, preimage_const_of_not_mem hb]
 #align set.preimage_const Set.preimage_const
 
+/-- If preimage of each singleton under `f : α → β` is either empty or the whole type,
+then `f` is a constant. -/
+lemma exists_eq_const_of_preimage_singleton [Nonempty β] {f : α → β}
+    (hf : ∀ b : β, f ⁻¹' {b} = ∅ ∨ f ⁻¹' {b} = univ) : ∃ b, f = const α b := by
+  rcases em (∃ b, f ⁻¹' {b} = univ) with ⟨b, hb⟩ | hf'
+  · exact ⟨b, funext fun x ↦ eq_univ_iff_forall.1 hb x⟩
+  · have : ∀ x b, f x ≠ b := fun x b ↦
+      eq_empty_iff_forall_not_mem.1 ((hf b).resolve_right fun h ↦ hf' ⟨b, h⟩) x
+    exact ⟨Classical.arbitrary β, funext fun x ↦ absurd rfl (this x _)⟩
+
 theorem preimage_comp {s : Set γ} : g ∘ f ⁻¹' s = f ⁻¹' (g ⁻¹' s) :=
   rfl
 #align set.preimage_comp Set.preimage_comp
feat: Sigma-algebra generated by a singleton (#2513)

Match https://github.com/leanprover-community/mathlib/pull/18506

Diff
@@ -5,7 +5,7 @@ Authors: Jeremy Avigad, Leonardo de Moura
 -/
 import Mathlib.Data.Set.Basic
 
-#align_import data.set.image from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4"
+#align_import data.set.image from "leanprover-community/mathlib"@"001ffdc42920050657fd45bd2b8bfbec8eaaeb29"
 
 /-!
 # Images and preimages of sets
@@ -106,6 +106,7 @@ theorem preimage_diff (f : α → β) (s t : Set β) : f ⁻¹' (s \ t) = f ⁻
 @[simp]
 lemma preimage_symmDiff {f : α → β} (s t : Set β) : f ⁻¹' (s ∆ t) = (f ⁻¹' s) ∆ (f ⁻¹' t) :=
   rfl
+#align set.preimage_symm_diff Set.preimage_symmDiff
 
 @[simp]
 theorem preimage_ite (f : α → β) (s t₁ t₂ : Set β) :
@@ -180,6 +181,12 @@ theorem nonempty_of_nonempty_preimage {s : Set β} {f : α → β} (hf : (f ⁻
   ⟨f x, hx⟩
 #align set.nonempty_of_nonempty_preimage Set.nonempty_of_nonempty_preimage
 
+@[simp] theorem preimage_singleton_true (p : α → Prop) : p ⁻¹' {True} = {a | p a} := by ext; simp
+#align set.preimage_singleton_true Set.preimage_singleton_true
+
+@[simp] theorem preimage_singleton_false (p : α → Prop) : p ⁻¹' {False} = {a | ¬p a} := by ext; simp
+#align set.preimage_singleton_false Set.preimage_singleton_false
+
 theorem preimage_subtype_coe_eq_compl {α : Type*} {s u v : Set α} (hsuv : s ⊆ u ∪ v)
     (H : s ∩ (u ∩ v) = ∅) : ((↑) : s → α) ⁻¹' u = ((↑) ⁻¹' v)ᶜ := by
   ext ⟨x, x_in_s⟩
@@ -1354,6 +1361,10 @@ theorem LeftInverse.preimage_preimage {g : β → α} (h : LeftInverse g f) (s :
     f ⁻¹' (g ⁻¹' s) = s := by rw [← preimage_comp, h.comp_eq_id, preimage_id]
 #align function.left_inverse.preimage_preimage Function.LeftInverse.preimage_preimage
 
+protected theorem Involutive.preimage {f : α → α} (hf : Involutive f) : Involutive (preimage f) :=
+  hf.rightInverse.preimage_preimage
+#align function.involutive.preimage Function.Involutive.preimage
+
 end Function
 
 namespace EquivLike
chore: only four spaces for subsequent lines (#7286)

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

Diff
@@ -363,14 +363,14 @@ theorem image_eq_empty {α β} {f : α → β} {s : Set α} : f '' s = ∅ ↔ s
 
 -- Porting note: `compl` is already defined in `Init.Set`
 theorem preimage_compl_eq_image_compl [BooleanAlgebra α] (S : Set α) :
-  HasCompl.compl ⁻¹' S = HasCompl.compl '' S :=
+    HasCompl.compl ⁻¹' S = HasCompl.compl '' S :=
   Set.ext fun x =>
     ⟨fun h => ⟨xᶜ, h, compl_compl x⟩, fun h =>
       Exists.elim h fun _ hy => (compl_eq_comm.mp hy.2).symm.subst hy.1⟩
 #align set.preimage_compl_eq_image_compl Set.preimage_compl_eq_image_compl
 
 theorem mem_compl_image [BooleanAlgebra α] (t : α) (S : Set α) :
-  t ∈ HasCompl.compl '' S ↔ tᶜ ∈ S := by
+    t ∈ HasCompl.compl '' S ↔ tᶜ ∈ S := by
   simp [← preimage_compl_eq_image_compl]
 #align set.mem_compl_image Set.mem_compl_image
 
@@ -385,7 +385,7 @@ theorem image_id (s : Set α) : id '' s = s := by simp
 #align set.image_id Set.image_id
 
 theorem compl_compl_image [BooleanAlgebra α] (S : Set α) :
-  HasCompl.compl '' (HasCompl.compl '' S) = S := by
+    HasCompl.compl '' (HasCompl.compl '' S) = S := by
   rw [← image_comp, compl_comp_compl, image_id]
 #align set.compl_compl_image Set.compl_compl_image
 
@@ -1054,8 +1054,7 @@ theorem rangeFactorization_coe (f : ι → β) (a : ι) : (rangeFactorization f
 #align set.range_factorization_coe Set.rangeFactorization_coe
 
 @[simp]
-theorem coe_comp_rangeFactorization (f : ι → β) :
-  (↑) ∘ rangeFactorization f = f := rfl
+theorem coe_comp_rangeFactorization (f : ι → β) : (↑) ∘ rangeFactorization f = f := rfl
 #align set.coe_comp_range_factorization Set.coe_comp_rangeFactorization
 
 theorem surjective_onto_range : Surjective (rangeFactorization f) := fun ⟨_, ⟨i, rfl⟩⟩ => ⟨i, rfl⟩
@@ -1071,7 +1070,7 @@ theorem image_eq_range (f : α → β) (s : Set α) : f '' s = range fun x : s =
 #align set.image_eq_range Set.image_eq_range
 
 theorem _root_.Sum.range_eq (f : Sum α β → γ) :
-  range f = range (f ∘ Sum.inl) ∪ range (f ∘ Sum.inr) :=
+    range f = range (f ∘ Sum.inl) ∪ range (f ∘ Sum.inr) :=
   ext fun _ => Sum.exists
 #align sum.range_eq Sum.range_eq
 
@@ -1150,8 +1149,7 @@ theorem apply_rangeSplitting (f : α → β) (x : range f) : f (rangeSplitting f
 #align set.apply_range_splitting Set.apply_rangeSplitting
 
 @[simp]
-theorem comp_rangeSplitting (f : α → β) :
-  f ∘ rangeSplitting f = (↑) := by
+theorem comp_rangeSplitting (f : α → β) : f ∘ rangeSplitting f = (↑) := by
   ext
   simp only [Function.comp_apply]
   apply apply_rangeSplitting
@@ -1381,8 +1379,7 @@ theorem coe_image {p : α → Prop} {s : Set (Subtype p)} :
 #align subtype.coe_image Subtype.coe_image
 
 @[simp]
-theorem coe_image_of_subset {s t : Set α} (h : t ⊆ s) :
-  (↑) '' { x : ↥s | ↑x ∈ t } = t := by
+theorem coe_image_of_subset {s t : Set α} (h : t ⊆ s) : (↑) '' { x : ↥s | ↑x ∈ t } = t := by
   ext x
   rw [Set.mem_image]
   exact ⟨fun ⟨_, hx', hx⟩ => hx ▸ hx', fun hx => ⟨⟨x, h hx⟩, hx, rfl⟩⟩
@@ -1427,8 +1424,7 @@ theorem coe_image_univ (s : Set α) : ((↑) : s → α) '' Set.univ = s :=
 #align subtype.coe_image_univ Subtype.coe_image_univ
 
 @[simp]
-theorem image_preimage_coe (s t : Set α) :
-  ((↑) : s → α) '' (((↑) : s → α) ⁻¹' t) = t ∩ s :=
+theorem image_preimage_coe (s t : Set α) : ((↑) : s → α) '' (((↑) : s → α) ⁻¹' t) = t ∩ s :=
   image_preimage_eq_inter_range.trans <| congr_arg _ range_coe
 #align subtype.image_preimage_coe Subtype.image_preimage_coe
 
@@ -1444,7 +1440,7 @@ theorem preimage_coe_eq_preimage_coe_iff {s t u : Set α} :
 -- Porting note:
 -- @[simp] `simp` can prove this
 theorem preimage_coe_inter_self (s t : Set α) :
-  ((↑) : s → α) ⁻¹' (t ∩ s) = ((↑) : s → α) ⁻¹' t := by
+    ((↑) : s → α) ⁻¹' (t ∩ s) = ((↑) : s → α) ⁻¹' t := by
   rw [preimage_coe_eq_preimage_coe_iff, inter_assoc, inter_self]
 #align subtype.preimage_coe_inter_self Subtype.preimage_coe_inter_self
 
@@ -1463,8 +1459,8 @@ theorem forall_set_subtype {t : Set α} (p : Set α → Prop) :
   rw [← forall_subset_range_iff, range_coe]
 
 theorem preimage_coe_nonempty {s t : Set α} :
-  (((↑) : s → α) ⁻¹' t).Nonempty ↔ (s ∩ t).Nonempty :=
-  by rw [inter_comm, ← image_preimage_coe, nonempty_image_iff]
+    (((↑) : s → α) ⁻¹' t).Nonempty ↔ (s ∩ t).Nonempty := by
+  rw [inter_comm, ← image_preimage_coe, nonempty_image_iff]
 #align subtype.preimage_coe_nonempty Subtype.preimage_coe_nonempty
 
 theorem preimage_coe_eq_empty {s t : Set α} : ((↑) : s → α) ⁻¹' t = ∅ ↔ s ∩ t = ∅ := by
@@ -1479,7 +1475,7 @@ theorem preimage_coe_compl (s : Set α) : ((↑) : s → α) ⁻¹' sᶜ = ∅ :
 
 @[simp]
 theorem preimage_coe_compl' (s : Set α) :
-  (fun x : (sᶜ : Set α) => (x : α)) ⁻¹' s = ∅ :=
+    (fun x : (sᶜ : Set α) => (x : α)) ⁻¹' s = ∅ :=
   preimage_coe_eq_empty.2 (compl_inter_self s)
 #align subtype.preimage_coe_compl' Subtype.preimage_coe_compl'
 
refactor(Topology/MetricSpace): remove Metric.Bounded (#7240)

Use Bornology.IsBounded instead.

Diff
@@ -773,19 +773,7 @@ theorem image_union_image_compl_eq_range (f : α → β) : f '' s ∪ f '' sᶜ
 #align set.image_union_image_compl_eq_range Set.image_union_image_compl_eq_range
 
 theorem insert_image_compl_eq_range (f : α → β) (x : α) : insert (f x) (f '' {x}ᶜ) = range f := by
-  ext y; rw [mem_range, mem_insert_iff, mem_image]
-  constructor
-  · rintro (h | ⟨x', _, h⟩)
-    · exact ⟨x, h.symm⟩
-    · exact ⟨x', h⟩
-  · rintro ⟨x', h⟩
-    by_cases hx : x' = x
-    · left
-      rw [← h, hx]
-    · right
-      refine' ⟨_, _, h⟩
-      rw [mem_compl_singleton_iff]
-      exact hx
+  rw [← image_insert_eq, insert_eq, union_compl_self, image_univ]
 #align set.insert_image_compl_eq_range Set.insert_image_compl_eq_range
 
 theorem image_preimage_eq_inter_range {f : α → β} {t : Set β} : f '' (f ⁻¹' t) = t ∩ range f :=
chore: tidy various files (#6838)
Diff
@@ -1651,11 +1651,9 @@ section Sigma
 variable {α : Type*} {β : α → Type*} {i j : α} {s : Set (β i)}
 
 lemma sigma_mk_preimage_image' (h : i ≠ j) : Sigma.mk j ⁻¹' (Sigma.mk i '' s) = ∅ := by
-  change Sigma.mk j ⁻¹' {⟨i, u⟩ | u ∈ s} = ∅
-  simp [h]
+  simp [image, h]
 
 lemma sigma_mk_preimage_image_eq_self : Sigma.mk i ⁻¹' (Sigma.mk i '' s) = s := by
-  change Sigma.mk i ⁻¹' {⟨i, u⟩ | u ∈ s} = s
-  simp
+  simp [image]
 
 end Sigma
chore: cleanup a few porting notes and friends relating to alias (#6790)
  • After the new alias command we can now do protected alias
  • alias at some point broke dot notation by unfolding (see #1022) this was fixed in #1058 but the library was not fixed up there
Diff
@@ -875,21 +875,18 @@ theorem range_id' : (range fun x : α => x) = univ :=
 
 @[simp]
 theorem _root_.Prod.range_fst [Nonempty β] : range (Prod.fst : α × β → α) = univ :=
-  Function.Surjective.range_eq Prod.fst_surjective
-  -- Porting note: should be `Prod.fst_surjective.range_eq` if dot notation works
+  Prod.fst_surjective.range_eq
 #align prod.range_fst Prod.range_fst
 
 @[simp]
 theorem _root_.Prod.range_snd [Nonempty α] : range (Prod.snd : α × β → β) = univ :=
-  Function.Surjective.range_eq Prod.snd_surjective
-  -- Porting note: should be `Prod.snd_surjective.range_eq` if dot notation works
+  Prod.snd_surjective.range_eq
 #align prod.range_snd Prod.range_snd
 
 @[simp]
 theorem range_eval {ι : Type*} {α : ι → Sort _} [∀ i, Nonempty (α i)] (i : ι) :
     range (eval i : (∀ i, α i) → α i) = univ :=
-  Function.Surjective.range_eq (surjective_eval i)
-  -- Porting note: should be `(surjective_eval i).range_eq` if dot notation works
+  (surjective_eval i).range_eq
 #align set.range_eval Set.range_eval
 
 theorem range_inl : range (@Sum.inl α β) = {x | Sum.isLeft x} := by ext (_|_) <;> simp
@@ -1335,7 +1332,7 @@ theorem Injective.image_injective (hf : Injective f) : Injective (image f) := by
 theorem Surjective.preimage_subset_preimage_iff {s t : Set β} (hf : Surjective f) :
     f ⁻¹' s ⊆ f ⁻¹' t ↔ s ⊆ t := by
   apply Set.preimage_subset_preimage_iff
-  rw [Function.Surjective.range_eq hf]
+  rw [hf.range_eq]
   apply subset_univ
 #align function.surjective.preimage_subset_preimage_iff Function.Surjective.preimage_subset_preimage_iff
 
feat: patch for new alias command (#6172)
Diff
@@ -694,7 +694,7 @@ theorem range_iff_surjective : range f = univ ↔ Surjective f :=
 #align set.range_iff_surjective Set.range_iff_surjective
 
 -- Porting note: Lean4 unfolds `Surjective` here, ruining dot notation
-alias range_iff_surjective ↔ _ _root_.Function.Surjective.range_eq
+alias ⟨_, _root_.Function.Surjective.range_eq⟩ := range_iff_surjective
 #align function.surjective.range_eq Function.Surjective.range_eq
 
 @[simp]
fix: disable autoImplicit globally (#6528)

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

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

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

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

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

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

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

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

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

Diff
@@ -29,6 +29,7 @@ set, sets, image, preimage, pre-image, range
 
 -/
 
+set_option autoImplicit true
 
 universe u v
 
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
@@ -36,7 +36,7 @@ open Function Set
 
 namespace Set
 
-variable {α β γ : Type _} {ι ι' : Sort _}
+variable {α β γ : Type*} {ι ι' : Sort*}
 
 /-! ### Inverse image -/
 
@@ -179,7 +179,7 @@ theorem nonempty_of_nonempty_preimage {s : Set β} {f : α → β} (hf : (f ⁻
   ⟨f x, hx⟩
 #align set.nonempty_of_nonempty_preimage Set.nonempty_of_nonempty_preimage
 
-theorem preimage_subtype_coe_eq_compl {α : Type _} {s u v : Set α} (hsuv : s ⊆ u ∪ v)
+theorem preimage_subtype_coe_eq_compl {α : Type*} {s u v : Set α} (hsuv : s ⊆ u ∪ v)
     (H : s ∩ (u ∩ v) = ∅) : ((↑) : s → α) ⁻¹' u = ((↑) ⁻¹' v)ᶜ := by
   ext ⟨x, x_in_s⟩
   constructor
@@ -337,7 +337,7 @@ theorem image_inter {f : α → β} {s t : Set α} (H : Injective f) : f '' (s 
   image_inter_on fun _ _ _ _ h => H h
 #align set.image_inter Set.image_inter
 
-theorem image_univ_of_surjective {ι : Type _} {f : ι → β} (H : Surjective f) : f '' univ = univ :=
+theorem image_univ_of_surjective {ι : Type*} {f : ι → β} (H : Surjective f) : f '' univ = univ :=
   eq_univ_of_forall <| by simpa [image]
 #align set.image_univ_of_surjective Set.image_univ_of_surjective
 
@@ -885,7 +885,7 @@ theorem _root_.Prod.range_snd [Nonempty α] : range (Prod.snd : α × β → β)
 #align prod.range_snd Prod.range_snd
 
 @[simp]
-theorem range_eval {ι : Type _} {α : ι → Sort _} [∀ i, Nonempty (α i)] (i : ι) :
+theorem range_eval {ι : Type*} {α : ι → Sort _} [∀ i, Nonempty (α i)] (i : ι) :
     range (eval i : (∀ i, α i) → α i) = univ :=
   Function.Surjective.range_eq (surjective_eval i)
   -- Porting note: should be `(surjective_eval i).range_eq` if dot notation works
@@ -1195,29 +1195,29 @@ theorem preimage_rangeSplitting {f : α → β} (hf : Injective f) :
       (leftInverse_rangeSplitting f)).symm
 #align set.preimage_range_splitting Set.preimage_rangeSplitting
 
-theorem isCompl_range_some_none (α : Type _) : IsCompl (range (some : α → Option α)) {none} :=
+theorem isCompl_range_some_none (α : Type*) : IsCompl (range (some : α → Option α)) {none} :=
   IsCompl.of_le (fun _ ⟨⟨_, ha⟩, (hn : _ = none)⟩ => Option.some_ne_none _ (ha.trans hn))
     fun x _ => Option.casesOn x (Or.inr rfl) fun _ => Or.inl <| mem_range_self _
 #align set.is_compl_range_some_none Set.isCompl_range_some_none
 
 @[simp]
-theorem compl_range_some (α : Type _) : (range (some : α → Option α))ᶜ = {none} :=
+theorem compl_range_some (α : Type*) : (range (some : α → Option α))ᶜ = {none} :=
   (isCompl_range_some_none α).compl_eq
 #align set.compl_range_some Set.compl_range_some
 
 @[simp]
-theorem range_some_inter_none (α : Type _) : range (some : α → Option α) ∩ {none} = ∅ :=
+theorem range_some_inter_none (α : Type*) : range (some : α → Option α) ∩ {none} = ∅ :=
   (isCompl_range_some_none α).inf_eq_bot
 #align set.range_some_inter_none Set.range_some_inter_none
 
 -- Porting note:
 -- @[simp] `simp` can prove this
-theorem range_some_union_none (α : Type _) : range (some : α → Option α) ∪ {none} = univ :=
+theorem range_some_union_none (α : Type*) : range (some : α → Option α) ∪ {none} = univ :=
   (isCompl_range_some_none α).sup_eq_top
 #align set.range_some_union_none Set.range_some_union_none
 
 @[simp]
-theorem insert_none_range_some (α : Type _) : insert none (range (some : α → Option α)) = univ :=
+theorem insert_none_range_some (α : Type*) : insert none (range (some : α → Option α)) = univ :=
   (isCompl_range_some_none α).symm.sup_eq_top
 #align set.insert_none_range_some Set.insert_none_range_some
 
@@ -1238,20 +1238,20 @@ theorem Subsingleton.preimage {s : Set β} (hs : s.Subsingleton) {f : α → β}
 #align set.subsingleton.preimage Set.Subsingleton.preimage
 
 /-- If the image of a set under an injective map is a subsingleton, the set is a subsingleton. -/
-theorem subsingleton_of_image {α β : Type _} {f : α → β} (hf : Function.Injective f) (s : Set α)
+theorem subsingleton_of_image {α β : Type*} {f : α → β} (hf : Function.Injective f) (s : Set α)
     (hs : (f '' s).Subsingleton) : s.Subsingleton :=
   (hs.preimage hf).anti <| subset_preimage_image _ _
 #align set.subsingleton_of_image Set.subsingleton_of_image
 
 /-- If the preimage of a set under a surjective map is a subsingleton,
 the set is a subsingleton. -/
-theorem subsingleton_of_preimage {α β : Type _} {f : α → β} (hf : Function.Surjective f) (s : Set β)
+theorem subsingleton_of_preimage {α β : Type*} {f : α → β} (hf : Function.Surjective f) (s : Set β)
     (hs : (f ⁻¹' s).Subsingleton) : s.Subsingleton := fun fx hx fy hy => by
   rcases hf fx, hf fy with ⟨⟨x, rfl⟩, ⟨y, rfl⟩⟩
   exact congr_arg f (hs hx hy)
 #align set.subsingleton_of_preimage Set.subsingleton_of_preimage
 
-theorem subsingleton_range {α : Sort _} [Subsingleton α] (f : α → β) : (range f).Subsingleton :=
+theorem subsingleton_range {α : Sort*} [Subsingleton α] (f : α → β) : (range f).Subsingleton :=
   forall_range_iff.2 fun x => forall_range_iff.2 fun y => congr_arg f (Subsingleton.elim x y)
 #align set.subsingleton_range Set.subsingleton_range
 
@@ -1288,7 +1288,7 @@ end Set
 
 namespace Function
 
-variable {ι : Sort _} {α : Type _} {β : Type _} {f : α → β}
+variable {ι : Sort*} {α : Type*} {β : Type*} {f : α → β}
 
 open Set
 
@@ -1373,7 +1373,7 @@ theorem LeftInverse.preimage_preimage {g : β → α} (h : LeftInverse g f) (s :
 end Function
 
 namespace EquivLike
-variable {E : Type _} [EquivLike E ι ι']
+variable {E : Type*} [EquivLike E ι ι']
 
 @[simp] lemma range_comp (f : ι' → α) (e : E) : range (f ∘ e) = range f :=
   (EquivLike.surjective _).range_comp _
@@ -1386,7 +1386,7 @@ end EquivLike
 
 namespace Subtype
 
-variable {α : Type _}
+variable {α : Type*}
 
 theorem coe_image {p : α → Prop} {s : Set (Subtype p)} :
     (↑) '' s = { x | ∃ h : p x, (⟨x, h⟩ : Subtype p) ∈ s } :=
@@ -1588,7 +1588,7 @@ end Set
 /-! ### Disjoint lemmas for image and preimage -/
 
 section Disjoint
-variable {α β γ : Type _} {f : α → β} {s t : Set α}
+variable {α β γ : Type*} {f : α → β} {s t : Set α}
 
 theorem Disjoint.preimage (f : α → β) {s t : Set β} (h : Disjoint s t) :
     Disjoint (f ⁻¹' s) (f ⁻¹' t) :=
@@ -1650,7 +1650,7 @@ end Disjoint
 
 section Sigma
 
-variable {α : Type _} {β : α → Type _} {i j : α} {s : Set (β i)}
+variable {α : Type*} {β : α → Type*} {i j : α} {s : Set (β i)}
 
 lemma sigma_mk_preimage_image' (h : i ≠ j) : Sigma.mk j ⁻¹' (Sigma.mk i '' s) = ∅ := by
   change Sigma.mk j ⁻¹' {⟨i, u⟩ | u ∈ s} = ∅
chore: ensure all instances referred to directly have explicit names (#6423)

Per https://github.com/leanprover/lean4/issues/2343, we are going to need to change the automatic generation of instance names, as they become too long.

This PR ensures that everywhere in Mathlib that refers to an instance by name, that name is given explicitly, rather than being automatically generated.

There are four exceptions, which are now commented, with links to https://github.com/leanprover/lean4/issues/2343.

This was implemented by running Mathlib against a modified Lean that appended _ᾰ to all automatically generated names, and fixing everything.

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

Diff
@@ -763,7 +763,7 @@ theorem range_eq_empty [IsEmpty ι] (f : ι → α) : range f = ∅ :=
   range_eq_empty_iff.2 ‹_›
 #align set.range_eq_empty Set.range_eq_empty
 
-instance [Nonempty ι] (f : ι → α) : Nonempty (range f) :=
+instance instNonemptyRange [Nonempty ι] (f : ι → α) : Nonempty (range f) :=
   (range_nonempty f).to_subtype
 
 @[simp]
chore(Data/Set/Image): @[simp] (#6298)

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

Diff
@@ -488,16 +488,19 @@ theorem subset_preimage_image (f : α → β) (s : Set α) : s ⊆ f ⁻¹' (f '
   mem_image_of_mem f
 #align set.subset_preimage_image Set.subset_preimage_image
 
+@[simp]
 theorem preimage_image_eq {f : α → β} (s : Set α) (h : Injective f) : f ⁻¹' (f '' s) = s :=
   Subset.antisymm (fun _ ⟨_, hy, e⟩ => h e ▸ hy) (subset_preimage_image f s)
 #align set.preimage_image_eq Set.preimage_image_eq
 
+@[simp]
 theorem image_preimage_eq {f : α → β} (s : Set β) (h : Surjective f) : f '' (f ⁻¹' s) = s :=
   Subset.antisymm (image_preimage_subset f s) fun x hx =>
     let ⟨y, e⟩ := h x
     ⟨y, (e.symm ▸ hx : f y ∈ s), e⟩
 #align set.image_preimage_eq Set.image_preimage_eq
 
+@[simp]
 theorem preimage_eq_preimage {f : β → α} (hf : Surjective f) : f ⁻¹' s = f ⁻¹' t ↔ s = t :=
   Iff.intro
     fun eq => by rw [← image_preimage_eq s hf, ← image_preimage_eq t hf, eq]
@@ -1318,6 +1321,7 @@ theorem Surjective.image_surjective (hf : Surjective f) : Surjective (image f) :
   rw [hf.image_preimage]
 #align function.surjective.image_surjective Function.Surjective.image_surjective
 
+@[simp]
 theorem Surjective.nonempty_preimage (hf : Surjective f) {s : Set β} :
     (f ⁻¹' s).Nonempty ↔ s.Nonempty := by rw [← nonempty_image_iff, hf.image_preimage]
 #align function.surjective.nonempty_preimage Function.Surjective.nonempty_preimage
@@ -1608,6 +1612,7 @@ theorem _root_.Disjoint.of_image (h : Disjoint (f '' s) (f '' t)) : Disjoint s t
     disjoint_left.1 h (mem_image_of_mem _ hx.1) (mem_image_of_mem _ hx.2)
 #align disjoint.of_image Disjoint.of_image
 
+@[simp]
 theorem disjoint_image_iff (hf : Injective f) : Disjoint (f '' s) (f '' t) ↔ Disjoint s t :=
   ⟨Disjoint.of_image, disjoint_image_of_injective hf⟩
 #align set.disjoint_image_iff Set.disjoint_image_iff
@@ -1618,6 +1623,7 @@ theorem _root_.Disjoint.of_preimage (hf : Surjective f) {s t : Set β}
     image_empty]
 #align disjoint.of_preimage Disjoint.of_preimage
 
+@[simp]
 theorem disjoint_preimage_iff (hf : Surjective f) {s t : Set β} :
     Disjoint (f ⁻¹' s) (f ⁻¹' t) ↔ Disjoint s t :=
   ⟨Disjoint.of_preimage hf, Disjoint.preimage _⟩
feat: add MeasureTheory.MeasurePreserving.measure_symmDiff_preimage_iterate_le (#6175)

Also some minor loosely-related other changes.

Diff
@@ -102,6 +102,10 @@ theorem preimage_diff (f : α → β) (s t : Set β) : f ⁻¹' (s \ t) = f ⁻
   rfl
 #align set.preimage_diff Set.preimage_diff
 
+@[simp]
+lemma preimage_symmDiff {f : α → β} (s t : Set β) : f ⁻¹' (s ∆ t) = (f ⁻¹' s) ∆ (f ⁻¹' t) :=
+  rfl
+
 @[simp]
 theorem preimage_ite (f : α → β) (s t₁ t₂ : Set β) :
     f ⁻¹' s.ite t₁ t₂ = (f ⁻¹' s).ite (f ⁻¹' t₁) (f ⁻¹' t₂) :=
@@ -432,10 +436,10 @@ theorem subset_image_diff (f : α → β) (s t : Set α) : f '' s \ f '' t ⊆ f
   exact image_subset f (subset_union_right t s)
 #align set.subset_image_diff Set.subset_image_diff
 
-theorem subset_image_symm_diff : (f '' s) ∆ (f '' t) ⊆ f '' s ∆ t :=
+theorem subset_image_symmDiff : (f '' s) ∆ (f '' t) ⊆ f '' s ∆ t :=
   (union_subset_union (subset_image_diff _ _ _) <| subset_image_diff _ _ _).trans
     (superset_of_eq (image_union _ _ _))
-#align set.subset_image_symm_diff Set.subset_image_symm_diff
+#align set.subset_image_symm_diff Set.subset_image_symmDiff
 
 theorem image_diff {f : α → β} (hf : Injective f) (s t : Set α) : f '' (s \ t) = f '' s \ f '' t :=
   Subset.antisymm
@@ -443,9 +447,9 @@ theorem image_diff {f : α → β} (hf : Injective f) (s t : Set α) : f '' (s \
     (subset_image_diff f s t)
 #align set.image_diff Set.image_diff
 
-theorem image_symm_diff (hf : Injective f) (s t : Set α) : f '' s ∆ t = (f '' s) ∆ (f '' t) := by
+theorem image_symmDiff (hf : Injective f) (s t : Set α) : f '' s ∆ t = (f '' s) ∆ (f '' t) := by
   simp_rw [Set.symmDiff_def, image_union, image_diff hf]
-#align set.image_symm_diff Set.image_symm_diff
+#align set.image_symm_diff Set.image_symmDiff
 
 theorem Nonempty.image (f : α → β) {s : Set α} : s.Nonempty → (f '' s).Nonempty
   | ⟨x, hx⟩ => ⟨f x, mem_image_of_mem f hx⟩
feat: define the category of extremally disconnected compact Hausdorff spaces (#5761)

Co-authored-by: Adam Topaz [topaz@ualberta.ca](mailto:topaz@ualberta.ca) @adamtopaz Basics of the category Stonean of extremally disconnected compact Hausdorff spaces. This work was done during the 2023 Copenhagen masterclass on formalisation of condensed mathematics. Numerous participants contributed.

Diff
@@ -1637,3 +1637,17 @@ theorem preimage_eq_empty_iff {s : Set β} : f ⁻¹' s = ∅ ↔ Disjoint s (ra
 end Set
 
 end Disjoint
+
+section Sigma
+
+variable {α : Type _} {β : α → Type _} {i j : α} {s : Set (β i)}
+
+lemma sigma_mk_preimage_image' (h : i ≠ j) : Sigma.mk j ⁻¹' (Sigma.mk i '' s) = ∅ := by
+  change Sigma.mk j ⁻¹' {⟨i, u⟩ | u ∈ s} = ∅
+  simp [h]
+
+lemma sigma_mk_preimage_image_eq_self : Sigma.mk i ⁻¹' (Sigma.mk i '' s) = s := by
+  change Sigma.mk i ⁻¹' {⟨i, u⟩ | u ∈ s} = s
+  simp
+
+end Sigma
chore: fix some Set defeq abuse, golf (#6114)
  • Use {x | p x} instead of fun x ↦ p x to define a set here and there.
  • Golf some proofs.
  • Replace Con.ker_apply_eq_preimage with Con.ker_apply. The old version used to abuse definitional equality between Set M and M → Prop.
  • Fix Submonoid.mk* lemmas to use ⟨_, _⟩, not ⟨⟨_, _⟩, _⟩.
Diff
@@ -506,7 +506,6 @@ theorem image_inter_preimage (f : α → β) (s : Set α) (t : Set β) :
   · calc
       f '' (s ∩ f ⁻¹' t) ⊆ f '' s ∩ f '' (f ⁻¹' t) := image_inter_subset _ _ _
       _ ⊆ f '' s ∩ t := inter_subset_inter_right _ (image_preimage_subset f t)
-
   · rintro _ ⟨⟨x, h', rfl⟩, h⟩
     exact ⟨x, ⟨h', h⟩, rfl⟩
 #align set.image_inter_preimage Set.image_inter_preimage
chore: remove 'Ported by' headers (#6018)

Briefly during the port we were adding "Ported by" headers, but only ~60 / 3000 files ended up with such a header.

I propose deleting them.

We could consider adding these uniformly via a script, as part of the great history rewrite...?

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

Diff
@@ -2,7 +2,6 @@
 Copyright (c) 2014 Jeremy Avigad. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jeremy Avigad, Leonardo de Moura
-Ported by: Winston Yin
 -/
 import Mathlib.Data.Set.Basic
 
feat: the additive circle is path connected (#6022)
Diff
@@ -985,6 +985,9 @@ theorem range_quotient_mk' {s : Setoid α} : range (Quotient.mk' : α → Quotie
   range_quot_mk _
 #align set.range_quotient_mk' Set.range_quotient_mk'
 
+@[simp] lemma Quotient.range_mk'' {sa : Setoid α} : range (Quotient.mk'' (s₁ := sa)) = univ :=
+  range_quotient_mk
+
 @[simp]
 theorem range_quotient_lift_on' {s : Setoid ι} (hf) :
     (range fun x : Quotient s => Quotient.liftOn' x f hf) = range f :=
chore: gcongr attributes for sup/inf, min/max, union/intersection/complement, image/preimage (#6016)
Diff
@@ -70,6 +70,7 @@ theorem preimage_congr {f g : α → β} {s : Set β} (h : ∀ x : α, f x = g x
   simp [h]
 #align set.preimage_congr Set.preimage_congr
 
+@[gcongr]
 theorem preimage_mono {s t : Set β} (h : s ⊆ t) : f ⁻¹' s ⊆ f ⁻¹' t := fun _ hx => h hx
 #align set.preimage_mono Set.preimage_mono
 
@@ -295,6 +296,7 @@ theorem _root_.Function.Commute.set_image {f g : α → α} (h : Function.Commut
 
 /-- Image is monotone with respect to `⊆`. See `Set.monotone_image` for the statement in
 terms of `≤`. -/
+@[gcongr]
 theorem image_subset {a b : Set α} (f : α → β) (h : a ⊆ b) : f '' a ⊆ f '' b := by
   simp only [subset_def, mem_image]
   exact fun x => fun ⟨w, h1, h2⟩ => ⟨w, h h1, h2⟩
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
@@ -3,14 +3,11 @@ Copyright (c) 2014 Jeremy Avigad. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jeremy Avigad, Leonardo de Moura
 Ported by: Winston Yin
-
-! This file was ported from Lean 3 source module data.set.image
-! 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.Basic
 
+#align_import data.set.image from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4"
+
 /-!
 # Images and preimages of sets
 
chore: remove a few superfluous semicolons (#5880)

Alongside any necessary spacing/flow changes to accommodate their removal.

Diff
@@ -1089,7 +1089,7 @@ theorem Sum.elim_range (f : α → γ) (g : β → γ) : range (Sum.elim f g) =
 
 theorem range_ite_subset' {p : Prop} [Decidable p] {f g : α → β} :
     range (if p then f else g) ⊆ range f ∪ range g := by
-  by_cases h : p;
+  by_cases h : p
   · rw [if_pos h]
     exact subset_union_left _ _
   · rw [if_neg h]
feat(Mathlib/Data/Set/Image.lean): remove simp attribute of Set.preim… (#5764)

…age_iterate_eq

Diff
@@ -155,7 +155,6 @@ theorem preimage_comp_eq : preimage (g ∘ f) = preimage f ∘ preimage g :=
   rfl
 #align set.preimage_comp_eq Set.preimage_comp_eq
 
-@[simp]
 theorem preimage_iterate_eq {f : α → α} {n : ℕ} : Set.preimage f^[n] = (Set.preimage f)^[n] := by
   induction' n with n ih; · simp
   rw [iterate_succ, iterate_succ', Set.preimage_comp_eq, ih]
chore: fix focusing dots (#5708)

This PR is the result of running

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

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

Diff
@@ -1014,11 +1014,11 @@ theorem range_subtype_map {p : α → Prop} {q : β → Prop} (f : α → β) (h
   ext ⟨x, hx⟩
   rw [mem_preimage, mem_range, mem_image, Subtype.exists, Subtype.coe_mk]
   apply Iff.intro
-  . rintro ⟨a, b, hab⟩
+  · rintro ⟨a, b, hab⟩
     rw [Subtype.map, Subtype.mk.injEq] at hab
     use a
     trivial
-  . rintro ⟨a, b, hab⟩
+  · rintro ⟨a, b, hab⟩
     use a
     use b
     rw [Subtype.map, Subtype.mk.injEq]
@@ -1135,12 +1135,12 @@ theorem range_inclusion (h : s ⊆ t) : range (inclusion h) = { x : t | (x : α)
   ext ⟨x, hx⟩
   -- Porting note: `simp [inclusion]` doesn't solve goal
   apply Iff.intro
-  . rw [mem_range]
+  · rw [mem_range]
     rintro ⟨a, ha⟩
     rw [inclusion, Subtype.mk.injEq] at ha
     rw [mem_setOf, Subtype.coe_mk, ← ha]
     exact Subtype.coe_prop _
-  . rw [mem_setOf, Subtype.coe_mk, mem_range]
+  · rw [mem_setOf, Subtype.coe_mk, mem_range]
     intro hx'
     use ⟨x, hx'⟩
     trivial
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
@@ -5,7 +5,7 @@ Authors: Jeremy Avigad, Leonardo de Moura
 Ported by: Winston Yin
 
 ! This file was ported from Lean 3 source module data.set.image
-! leanprover-community/mathlib commit 4550138052d0a416b700c27056d492e2ef53214e
+! leanprover-community/mathlib commit 48fb5b5280e7c81672afc9524185ae994553ebf4
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -63,7 +63,7 @@ theorem preimage_empty : f ⁻¹' ∅ = ∅ :=
   rfl
 #align set.preimage_empty Set.preimage_empty
 
-@[simp]
+@[simp, mfld_simps]
 theorem mem_preimage {s : Set β} {a : α} : a ∈ f ⁻¹' s ↔ f a ∈ s :=
   Iff.rfl
 #align set.mem_preimage Set.mem_preimage
@@ -76,7 +76,7 @@ theorem preimage_congr {f g : α → β} {s : Set β} (h : ∀ x : α, f x = g x
 theorem preimage_mono {s t : Set β} (h : s ⊆ t) : f ⁻¹' s ⊆ f ⁻¹' t := fun _ hx => h hx
 #align set.preimage_mono Set.preimage_mono
 
-@[simp]
+@[simp, mfld_simps]
 theorem preimage_univ : f ⁻¹' univ = univ :=
   rfl
 #align set.preimage_univ Set.preimage_univ
@@ -85,7 +85,7 @@ theorem subset_preimage_univ {s : Set α} : s ⊆ f ⁻¹' univ :=
   subset_univ _
 #align set.subset_preimage_univ Set.subset_preimage_univ
 
-@[simp]
+@[simp, mfld_simps]
 theorem preimage_inter {s t : Set β} : f ⁻¹' (s ∩ t) = f ⁻¹' s ∩ f ⁻¹' t :=
   rfl
 #align set.preimage_inter Set.preimage_inter
@@ -121,11 +121,12 @@ theorem preimage_id_eq : preimage (id : α → α) = id :=
   rfl
 #align set.preimage_id_eq Set.preimage_id_eq
 
+@[mfld_simps]
 theorem preimage_id {s : Set α} : id ⁻¹' s = s :=
   rfl
 #align set.preimage_id Set.preimage_id
 
-@[simp]
+@[simp, mfld_simps]
 theorem preimage_id' {s : Set α} : (fun x => x) ⁻¹' s = s :=
   rfl
 #align set.preimage_id' Set.preimage_id'
@@ -217,6 +218,7 @@ theorem image_eta (f : α → β) : f '' s = (fun x => f x) '' s :=
   rfl
 #align set.image_eta Set.image_eta
 
+@[mfld_simps]
 theorem mem_image_of_mem (f : α → β) {x : α} {a : Set α} (h : x ∈ a) : f x ∈ f '' a :=
   ⟨_, h, rfl⟩
 #align set.mem_image_of_mem Set.mem_image_of_mem
@@ -351,7 +353,7 @@ theorem Nonempty.image_const {s : Set α} (hs : s.Nonempty) (a : β) : (fun _ =>
       (eq_of_mem_singleton h).symm ▸ hs.imp fun _ hy => ⟨hy, rfl⟩⟩
 #align set.nonempty.image_const Set.Nonempty.image_const
 
-@[simp]
+@[simp, mfld_simps]
 theorem image_eq_empty {α β} {f : α → β} {s : Set α} : f '' s = ∅ ↔ s = ∅ := by
   simp only [eq_empty_iff_forall_not_mem]
   exact ⟨fun H a ha => H _ ⟨_, ha, rfl⟩, fun H b ⟨_, ha, _⟩ => H _ ha⟩
@@ -653,6 +655,7 @@ theorem mem_range {x : α} : x ∈ range f ↔ ∃ y, f y = x :=
 
 -- Porting note
 -- @[simp] `simp` can prove this
+@[mfld_simps]
 theorem mem_range_self (i : ι) : f i ∈ range f :=
   ⟨i, rfl⟩
 #align set.mem_range_self Set.mem_range_self
@@ -856,12 +859,12 @@ theorem preimage_image_preimage {f : α → β} {s : Set β} : f ⁻¹' (f '' (f
   rw [image_preimage_eq_inter_range, preimage_inter_range]
 #align set.preimage_image_preimage Set.preimage_image_preimage
 
-@[simp]
+@[simp, mfld_simps]
 theorem range_id : range (@id α) = univ :=
   range_iff_surjective.2 surjective_id
 #align set.range_id Set.range_id
 
-@[simp]
+@[simp, mfld_simps]
 theorem range_id' : (range fun x : α => x) = univ :=
   range_id
 #align set.range_id' Set.range_id'
feat: lift a continuous map from a connected space to a sigma type (#4325)

Motivated by a theorem in the Brouwer Fixed Point project

Diff
@@ -726,6 +726,10 @@ theorem range_subset_iff : range f ⊆ s ↔ ∀ y, f y ∈ s :=
   forall_range_iff
 #align set.range_subset_iff Set.range_subset_iff
 
+theorem range_subset_range_iff_exists_comp {f : α → γ} {g : β → γ} :
+    range f ⊆ range g ↔ ∃ h : α → β, f = g ∘ h := by
+  simp only [range_subset_iff, mem_range, Classical.skolem, Function.funext_iff, (· ∘ ·), eq_comm]
+
 theorem range_eq_iff (f : α → β) (s : Set β) :
     range f = s ↔ (∀ a, f a ∈ s) ∧ ∀ b ∈ s, ∃ a, f a = b := by
   rw [← range_subset_iff]
fix: change compl precedence (#5586)

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

Diff
@@ -530,7 +530,7 @@ theorem compl_image : image (compl : Set α → Set α) = preimage compl :=
   image_eq_preimage_of_inverse compl_compl compl_compl
 #align set.compl_image Set.compl_image
 
-theorem compl_image_set_of {p : Set α → Prop} : compl '' { s | p s } = { s | p (sᶜ) } :=
+theorem compl_image_set_of {p : Set α → Prop} : compl '' { s | p s } = { s | p sᶜ } :=
   congr_fun compl_image p
 #align set.compl_image_set_of Set.compl_image_set_of
 
@@ -937,12 +937,12 @@ theorem preimage_inr_range_inl : Sum.inr ⁻¹' range (Sum.inl : α → Sum α 
 #align set.preimage_inr_range_inl Set.preimage_inr_range_inl
 
 @[simp]
-theorem compl_range_inl : range (Sum.inl : α → Sum α β)ᶜ = range (Sum.inr : β → Sum α β) :=
+theorem compl_range_inl : (range (Sum.inl : α → Sum α β))ᶜ = range (Sum.inr : β → Sum α β) :=
   IsCompl.compl_eq isCompl_range_inl_range_inr
 #align set.compl_range_inl Set.compl_range_inl
 
 @[simp]
-theorem compl_range_inr : range (Sum.inr : β → Sum α β)ᶜ = range (Sum.inl : α → Sum α β) :=
+theorem compl_range_inr : (range (Sum.inr : β → Sum α β))ᶜ = range (Sum.inl : α → Sum α β) :=
   IsCompl.compl_eq isCompl_range_inl_range_inr.symm
 #align set.compl_range_inr Set.compl_range_inr
 
@@ -1188,7 +1188,7 @@ theorem isCompl_range_some_none (α : Type _) : IsCompl (range (some : α → Op
 #align set.is_compl_range_some_none Set.isCompl_range_some_none
 
 @[simp]
-theorem compl_range_some (α : Type _) : range (some : α → Option α)ᶜ = {none} :=
+theorem compl_range_some (α : Type _) : (range (some : α → Option α))ᶜ = {none} :=
   (isCompl_range_some_none α).compl_eq
 #align set.compl_range_some Set.compl_range_some
 
@@ -1340,7 +1340,7 @@ theorem Injective.exists_unique_of_mem_range (hf : Injective f) {b : β} (hb : b
 #align function.injective.exists_unique_of_mem_range Function.Injective.exists_unique_of_mem_range
 
 theorem Injective.compl_image_eq (hf : Injective f) (s : Set α) :
-    (f '' s)ᶜ = f '' sᶜ ∪ range fᶜ := by
+    (f '' s)ᶜ = f '' sᶜ ∪ (range f)ᶜ := by
   ext y
   rcases em (y ∈ range f) with (⟨x, rfl⟩ | hx)
   · simp [hf.eq_iff]
fix precedence of Nat.iterate (#5589)
Diff
@@ -155,7 +155,7 @@ theorem preimage_comp_eq : preimage (g ∘ f) = preimage f ∘ preimage g :=
 #align set.preimage_comp_eq Set.preimage_comp_eq
 
 @[simp]
-theorem preimage_iterate_eq {f : α → α} {n : ℕ} : Set.preimage (f^[n]) = Set.preimage f^[n] := by
+theorem preimage_iterate_eq {f : α → α} {n : ℕ} : Set.preimage f^[n] = (Set.preimage f)^[n] := by
   induction' n with n ih; · simp
   rw [iterate_succ, iterate_succ', Set.preimage_comp_eq, ih]
 #align set.preimage_iterate_eq Set.preimage_iterate_eq
chore: convert lambda in docs to fun (#5045)

Found with git grep -n "λ [a-zA-Z_ ]*,"

Diff
@@ -1402,7 +1402,7 @@ theorem range_val {s : Set α} : range (Subtype.val : s → α) = s :=
 
 /-- We make this the simp lemma instead of `range_coe`. The reason is that if we write
   for `s : Set α` the function `(↑) : s → α`, then the inferred implicit arguments of `(↑)` are
-  `↑α (λ x, x ∈ s)`. -/
+  `↑α (fun x ↦ x ∈ s)`. -/
 @[simp]
 theorem range_coe_subtype {p : α → Prop} : range ((↑) : Subtype p → α) = { x | p x } :=
   range_coe
chore: fix grammar 2/3 (#5002)

Part 2 of #5001

Diff
@@ -1230,7 +1230,7 @@ theorem subsingleton_of_image {α β : Type _} {f : α → β} (hf : Function.In
   (hs.preimage hf).anti <| subset_preimage_image _ _
 #align set.subsingleton_of_image Set.subsingleton_of_image
 
-/-- If the preimage of a set under an surjective map is a subsingleton,
+/-- If the preimage of a set under a surjective map is a subsingleton,
 the set is a subsingleton. -/
 theorem subsingleton_of_preimage {α β : Type _} {f : α → β} (hf : Function.Surjective f) (s : Set β)
     (hs : (f ⁻¹' s).Subsingleton) : s.Subsingleton := fun fx hx fy hy => by
chore: formatting issues (#4947)

Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>

Diff
@@ -204,7 +204,7 @@ variable {f : α → β} {s t : Set α}
 infixl:80 " '' " => image
 
 theorem mem_image_iff_bex {f : α → β} {s : Set α} {y : β} :
-    y ∈ f '' s ↔ ∃ (x : _)(_ : x ∈ s), f x = y :=
+    y ∈ f '' s ↔ ∃ (x : _) (_ : x ∈ s), f x = y :=
   bex_def.symm
 #align set.mem_image_iff_bex Set.mem_image_iff_bex
 
@@ -1362,7 +1362,7 @@ namespace EquivLike
 variable {E : Type _} [EquivLike E ι ι']
 
 @[simp] lemma range_comp (f : ι' → α) (e : E) : range (f ∘ e) = range f :=
-(EquivLike.surjective _).range_comp _
+  (EquivLike.surjective _).range_comp _
 #align equiv_like.range_comp EquivLike.range_comp
 
 end EquivLike
chore: add space after exacts (#4945)

Too often tempted to change these during other PRs, so doing a mass edit here.

Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au>

Diff
@@ -143,7 +143,7 @@ theorem preimage_const_of_not_mem {b : β} {s : Set β} (h : b ∉ s) : (fun _ :
 theorem preimage_const (b : β) (s : Set β) [Decidable (b ∈ s)] :
     (fun _ : α => b) ⁻¹' s = if b ∈ s then univ else ∅ := by
   split_ifs with hb
-  exacts[preimage_const_of_mem hb, preimage_const_of_not_mem hb]
+  exacts [preimage_const_of_mem hb, preimage_const_of_not_mem hb]
 #align set.preimage_const Set.preimage_const
 
 theorem preimage_comp {s : Set γ} : g ∘ f ⁻¹' s = f ⁻¹' (g ⁻¹' s) :=
@@ -1498,7 +1498,7 @@ theorem injective_iff {α β} {f : Option α → β} :
   refine'
     ⟨fun hf => ⟨hf.comp (Option.some_injective _), fun x => hf.ne <| Option.some_ne_none _⟩, _⟩
   rintro ⟨h_some, h_none⟩ (_ | a) (_ | b) hab
-  exacts[rfl, (h_none _ hab.symm).elim, (h_none _ hab).elim, congr_arg some (h_some hab)]
+  exacts [rfl, (h_none _ hab.symm).elim, (h_none _ hab).elim, congr_arg some (h_some hab)]
 #align option.injective_iff Option.injective_iff
 
 theorem range_eq {α β} (f : Option α → β) : range f = insert (f none) (range (f ∘ some)) :=
chore: fix upper/lowercase in comments (#4360)
  • Run a non-interactive version of fix-comments.py on all files.
  • Go through the diff and manually add/discard/edit chunks.
Diff
@@ -1102,7 +1102,7 @@ theorem preimage_range (f : α → β) : f ⁻¹' range f = univ :=
   eq_univ_of_forall mem_range_self
 #align set.preimage_range Set.preimage_range
 
-/-- The range of a function from a `unique` type contains just the
+/-- The range of a function from a `Unique` type contains just the
 function applied to its single value. -/
 theorem range_unique [h : Unique ι] : range f = {f default} := by
   ext x
chore: update std 05-22 (#4248)

The main breaking change is that tac <;> [t1, t2] is now written tac <;> [t1; t2], to avoid clashing with tactics like cases and use that take comma-separated lists.

Diff
@@ -308,8 +308,8 @@ lemma monotone_image {f : α → β} : Monotone (image f) := fun _ _ => image_su
 
 theorem image_union (f : α → β) (s t : Set α) : f '' (s ∪ t) = f '' s ∪ f '' t :=
   ext fun x =>
-    ⟨by rintro ⟨a, h | h, rfl⟩ <;> [left, right] <;> exact ⟨_, h, rfl⟩, by
-      rintro (⟨a, h, rfl⟩ | ⟨a, h, rfl⟩) <;> refine' ⟨_, _, rfl⟩ <;> [left, right] <;> exact h⟩
+    ⟨by rintro ⟨a, h | h, rfl⟩ <;> [left; right] <;> exact ⟨_, h, rfl⟩, by
+      rintro (⟨a, h, rfl⟩ | ⟨a, h, rfl⟩) <;> refine' ⟨_, _, rfl⟩ <;> [left; right] <;> exact h⟩
 #align set.image_union Set.image_union
 
 @[simp]
@@ -891,7 +891,7 @@ theorem isCompl_range_inl_range_inr : IsCompl (range <| @Sum.inl α β) (range S
     (by
       rintro y ⟨⟨x₁, rfl⟩, ⟨x₂, h⟩⟩
       exact Sum.noConfusion h)
-    (by rintro (x | y) - <;> [left, right] <;> exact mem_range_self _)
+    (by rintro (x | y) - <;> [left; right] <;> exact mem_range_self _)
 #align set.is_compl_range_inl_range_inr Set.isCompl_range_inl_range_inr
 
 @[simp]
feat: forward-port leanprover-community/mathlib#18356 (#2000)

This is the corresponding forward porting PR to https://github.com/leanprover-community/mathlib/pull/18356 and https://github.com/leanprover-community/mathlib/pull/18491

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -5,7 +5,7 @@ Authors: Jeremy Avigad, Leonardo de Moura
 Ported by: Winston Yin
 
 ! This file was ported from Lean 3 source module data.set.image
-! leanprover-community/mathlib commit 2f4cdce0c2f2f3b8cd58f05d556d03b468e1eb2e
+! leanprover-community/mathlib commit 4550138052d0a416b700c27056d492e2ef53214e
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -610,6 +610,27 @@ theorem image_perm {s : Set α} {σ : Equiv.Perm α} (hs : { a : α | σ a ≠ a
 
 end Image
 
+/-! ### Lemmas about the powerset and image. -/
+
+/-- The powerset of `{a} ∪ s` is `𝒫 s` together with `{a} ∪ t` for each `t ∈ 𝒫 s`. -/
+theorem powerset_insert (s : Set α) (a : α) : 𝒫 insert a s = 𝒫 s ∪ insert a '' 𝒫 s := by
+  ext t
+  simp_rw [mem_union, mem_image, mem_powerset_iff]
+  constructor
+  · intro h
+    by_cases hs : a ∈ t
+    · right
+      refine' ⟨t \ {a}, _, _⟩
+      · rw [diff_singleton_subset_iff]
+        assumption
+      · rw [insert_diff_singleton, insert_eq_of_mem hs]
+    · left
+      exact (subset_insert_iff_of_not_mem hs).mp h
+  · rintro (h | ⟨s', h₁, rfl⟩)
+    · exact subset_trans h (subset_insert a s)
+    · exact insert_subset_insert h₁
+#align set.powerset_insert Set.powerset_insert
+
 /-! ### Lemmas about range of a function. -/
 
 
chore: Fix incorrect SHA (#2517)

This SHA change covers the changes in #1955 and #1616.

#1616 edited the SHA in the wrong file. Thankfully the file that it did update the SHA in didn't actually change, but it forgot to update the SHA in the file it actually forward-ported.

#1955 updated the SHA but didn't actually port the changes properly, as it forgot the #aligns.

Diff
@@ -5,7 +5,7 @@ Authors: Jeremy Avigad, Leonardo de Moura
 Ported by: Winston Yin
 
 ! This file was ported from Lean 3 source module data.set.image
-! leanprover-community/mathlib commit 3d95492390dc90e34184b13e865f50bc67f30fbb
+! leanprover-community/mathlib commit 2f4cdce0c2f2f3b8cd58f05d556d03b468e1eb2e
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -861,7 +861,9 @@ theorem range_eval {ι : Type _} {α : ι → Sort _} [∀ i, Nonempty (α i)] (
 #align set.range_eval Set.range_eval
 
 theorem range_inl : range (@Sum.inl α β) = {x | Sum.isLeft x} := by ext (_|_) <;> simp
+#align set.range_inl Set.range_inl
 theorem range_inr : range (@Sum.inr α β) = {x | Sum.isRight x} := by ext (_|_) <;> simp
+#align set.range_inr Set.range_inr
 
 theorem isCompl_range_inl_range_inr : IsCompl (range <| @Sum.inl α β) (range Sum.inr) :=
   IsCompl.of_le
fix: bad coercions in Data.Set.Image (#2487)

The previous spelling of the coercion caused problems down the line. They are now changed to the coercion arrow, which is the preferred spelling.

Diff
@@ -179,7 +179,7 @@ theorem nonempty_of_nonempty_preimage {s : Set β} {f : α → β} (hf : (f ⁻
 #align set.nonempty_of_nonempty_preimage Set.nonempty_of_nonempty_preimage
 
 theorem preimage_subtype_coe_eq_compl {α : Type _} {s u v : Set α} (hsuv : s ⊆ u ∪ v)
-    (H : s ∩ (u ∩ v) = ∅) : (fun x : s => (x : α)) ⁻¹' u = ((fun x : s => (x : α)) ⁻¹' v)ᶜ := by
+    (H : s ∩ (u ∩ v) = ∅) : ((↑) : s → α) ⁻¹' u = ((↑) ⁻¹' v)ᶜ := by
   ext ⟨x, x_in_s⟩
   constructor
   · intro x_in_u x_in_v
@@ -980,7 +980,7 @@ theorem range_const : ∀ [Nonempty ι] {c : α}, (range fun _ : ι => c) = {c}
 #align set.range_const Set.range_const
 
 theorem range_subtype_map {p : α → Prop} {q : β → Prop} (f : α → β) (h : ∀ x, p x → q (f x)) :
-    range (Subtype.map f h) = (fun x : Subtype q => (x : β)) ⁻¹' (f '' { x | p x }) := by
+    range (Subtype.map f h) = (↑) ⁻¹' (f '' { x | p x }) := by
   ext ⟨x, hx⟩
   rw [mem_preimage, mem_range, mem_image, Subtype.exists, Subtype.coe_mk]
   apply Iff.intro
@@ -1033,7 +1033,7 @@ theorem rangeFactorization_coe (f : ι → β) (a : ι) : (rangeFactorization f
 
 @[simp]
 theorem coe_comp_rangeFactorization (f : ι → β) :
-  (fun x : ↥(range f) => (x : β)) ∘ rangeFactorization f = f := rfl
+  (↑) ∘ rangeFactorization f = f := rfl
 #align set.coe_comp_range_factorization Set.coe_comp_rangeFactorization
 
 theorem surjective_onto_range : Surjective (rangeFactorization f) := fun ⟨_, ⟨i, rfl⟩⟩ => ⟨i, rfl⟩
@@ -1349,29 +1349,23 @@ end EquivLike
 
 namespace Subtype
 
--- Porting note:
--- Note that we can either write `fun x : s => (x : α)` or `Subtype.val : s → α`,
--- and that these are syntactically the same.
--- In mathlib3 we referred to this just as `coe`.
--- We may want to change the spelling of some statements later.
-
 variable {α : Type _}
 
 theorem coe_image {p : α → Prop} {s : Set (Subtype p)} :
-    (fun x : Subtype p => (x : α)) '' s = { x | ∃ h : p x, (⟨x, h⟩ : Subtype p) ∈ s } :=
+    (↑) '' s = { x | ∃ h : p x, (⟨x, h⟩ : Subtype p) ∈ s } :=
   Set.ext fun a =>
     ⟨fun ⟨⟨_, ha'⟩, in_s, h_eq⟩ => h_eq ▸ ⟨ha', in_s⟩, fun ⟨ha, in_s⟩ => ⟨⟨a, ha⟩, in_s, rfl⟩⟩
 #align subtype.coe_image Subtype.coe_image
 
 @[simp]
 theorem coe_image_of_subset {s t : Set α} (h : t ⊆ s) :
-  (fun x : s => (x : α)) '' { x : ↥s | ↑x ∈ t } = t := by
+  (↑) '' { x : ↥s | ↑x ∈ t } = t := by
   ext x
   rw [Set.mem_image]
   exact ⟨fun ⟨_, hx', hx⟩ => hx ▸ hx', fun hx => ⟨⟨x, h hx⟩, hx, rfl⟩⟩
 #align subtype.coe_image_of_subset Subtype.coe_image_of_subset
 
-theorem range_coe {s : Set α} : range (fun x : s => (x : α)) = s := by
+theorem range_coe {s : Set α} : range ((↑) : s → α) = s := by
   rw [← Set.image_univ]
   simp [-Set.image_univ, coe_image]
 #align subtype.range_coe Subtype.range_coe
@@ -1384,17 +1378,15 @@ theorem range_val {s : Set α} : range (Subtype.val : s → α) = s :=
 #align subtype.range_val Subtype.range_val
 
 /-- We make this the simp lemma instead of `range_coe`. The reason is that if we write
-  for `s : Set α` the function `coe : s → α`, then the inferred implicit arguments of `coe` are
-  `coe α (λ x, x ∈ s)`.
-
-  TODO: Port this docstring to mathlib4 as `coe` is something else now.-/
+  for `s : Set α` the function `(↑) : s → α`, then the inferred implicit arguments of `(↑)` are
+  `↑α (λ x, x ∈ s)`. -/
 @[simp]
-theorem range_coe_subtype {p : α → Prop} : range (fun x : Subtype p => (x : α)) = { x | p x } :=
+theorem range_coe_subtype {p : α → Prop} : range ((↑) : Subtype p → α) = { x | p x } :=
   range_coe
 #align subtype.range_coe_subtype Subtype.range_coe_subtype
 
 @[simp]
-theorem coe_preimage_self (s : Set α) : (fun x : s => (x : α)) ⁻¹' s = univ := by
+theorem coe_preimage_self (s : Set α) : ((↑) : s → α) ⁻¹' s = univ := by
   rw [← preimage_range, range_coe]
 #align subtype.coe_preimage_self Subtype.coe_preimage_self
 
@@ -1402,18 +1394,18 @@ theorem range_val_subtype {p : α → Prop} : range (Subtype.val : Subtype p →
   range_coe
 #align subtype.range_val_subtype Subtype.range_val_subtype
 
-theorem coe_image_subset (s : Set α) (t : Set s) : (fun x : s => (x : α)) '' t ⊆ s :=
+theorem coe_image_subset (s : Set α) (t : Set s) : ((↑) : s → α) '' t ⊆ s :=
   fun x ⟨y, _, yvaleq⟩ => by
   rw [← yvaleq]; exact y.property
 #align subtype.coe_image_subset Subtype.coe_image_subset
 
-theorem coe_image_univ (s : Set α) : (fun x : s => (x : α)) '' Set.univ = s :=
+theorem coe_image_univ (s : Set α) : ((↑) : s → α) '' Set.univ = s :=
   image_univ.trans range_coe
 #align subtype.coe_image_univ Subtype.coe_image_univ
 
 @[simp]
 theorem image_preimage_coe (s t : Set α) :
-  (fun x : s => (x : α)) '' ((fun x : s => (x : α)) ⁻¹' t) = t ∩ s :=
+  ((↑) : s → α) '' (((↑) : s → α) ⁻¹' t) = t ∩ s :=
   image_preimage_eq_inter_range.trans <| congr_arg _ range_coe
 #align subtype.image_preimage_coe Subtype.image_preimage_coe
 
@@ -1422,14 +1414,14 @@ theorem image_preimage_val (s t : Set α) : (Subtype.val : s → α) '' (Subtype
 #align subtype.image_preimage_val Subtype.image_preimage_val
 
 theorem preimage_coe_eq_preimage_coe_iff {s t u : Set α} :
-    (fun x : s => (x : α)) ⁻¹' t = (fun x : s => (x : α)) ⁻¹' u ↔ t ∩ s = u ∩ s := by
+    ((↑) : s → α) ⁻¹' t = ((↑) : s → α) ⁻¹' u ↔ t ∩ s = u ∩ s := by
   rw [← image_preimage_coe, ← image_preimage_coe, coe_injective.image_injective.eq_iff]
 #align subtype.preimage_coe_eq_preimage_coe_iff Subtype.preimage_coe_eq_preimage_coe_iff
 
 -- Porting note:
 -- @[simp] `simp` can prove this
 theorem preimage_coe_inter_self (s t : Set α) :
-  (fun x : s => (x : α)) ⁻¹' (t ∩ s) = (fun x : s => (x : α)) ⁻¹' t := by
+  ((↑) : s → α) ⁻¹' (t ∩ s) = ((↑) : s → α) ⁻¹' t := by
   rw [preimage_coe_eq_preimage_coe_iff, inter_assoc, inter_self]
 #align subtype.preimage_coe_inter_self Subtype.preimage_coe_inter_self
 
@@ -1439,26 +1431,26 @@ theorem preimage_val_eq_preimage_val_iff (s t u : Set α) :
 #align subtype.preimage_val_eq_preimage_val_iff Subtype.preimage_val_eq_preimage_val_iff
 
 theorem exists_set_subtype {t : Set α} (p : Set α → Prop) :
-    (∃ s : Set t, p ((fun x : t => (x : α)) '' s)) ↔ ∃ s : Set α, s ⊆ t ∧ p s := by
+    (∃ s : Set t, p (((↑) : t → α) '' s)) ↔ ∃ s : Set α, s ⊆ t ∧ p s := by
   rw [← exists_subset_range_and_iff, range_coe]
 #align subtype.exists_set_subtype Subtype.exists_set_subtype
 
 theorem forall_set_subtype {t : Set α} (p : Set α → Prop) :
-    (∀ s : Set t, p ((fun x : t => (x : α)) '' s)) ↔ ∀ s : Set α, s ⊆ t → p s := by
+    (∀ s : Set t, p (((↑) : t → α) '' s)) ↔ ∀ s : Set α, s ⊆ t → p s := by
   rw [← forall_subset_range_iff, range_coe]
 
 theorem preimage_coe_nonempty {s t : Set α} :
-  ((fun x : s => (x : α)) ⁻¹' t).Nonempty ↔ (s ∩ t).Nonempty :=
+  (((↑) : s → α) ⁻¹' t).Nonempty ↔ (s ∩ t).Nonempty :=
   by rw [inter_comm, ← image_preimage_coe, nonempty_image_iff]
 #align subtype.preimage_coe_nonempty Subtype.preimage_coe_nonempty
 
-theorem preimage_coe_eq_empty {s t : Set α} : (fun x : s => (x : α)) ⁻¹' t = ∅ ↔ s ∩ t = ∅ := by
+theorem preimage_coe_eq_empty {s t : Set α} : ((↑) : s → α) ⁻¹' t = ∅ ↔ s ∩ t = ∅ := by
   simp [← not_nonempty_iff_eq_empty, preimage_coe_nonempty]
 #align subtype.preimage_coe_eq_empty Subtype.preimage_coe_eq_empty
 
 -- Porting note:
 -- @[simp] `simp` can prove this
-theorem preimage_coe_compl (s : Set α) : (fun x : s => (x : α)) ⁻¹' sᶜ = ∅ :=
+theorem preimage_coe_compl (s : Set α) : ((↑) : s → α) ⁻¹' sᶜ = ∅ :=
   preimage_coe_eq_empty.2 (inter_compl_self s)
 #align subtype.preimage_coe_compl Subtype.preimage_coe_compl
 
Diff
@@ -36,11 +36,11 @@ set, sets, image, preimage, pre-image, range
 
 universe u v
 
-open Function
+open Function Set
 
 namespace Set
 
-variable {α β γ : Type _} {ι : Sort _}
+variable {α β γ : Type _} {ι ι' : Sort _}
 
 /-! ### Inverse image -/
 
@@ -1301,7 +1301,7 @@ theorem Surjective.preimage_subset_preimage_iff {s t : Set β} (hf : Surjective
   apply subset_univ
 #align function.surjective.preimage_subset_preimage_iff Function.Surjective.preimage_subset_preimage_iff
 
-theorem Surjective.range_comp {ι' : Sort _} {f : ι → ι'} (hf : Surjective f) (g : ι' → α) :
+theorem Surjective.range_comp {f : ι → ι'} (hf : Surjective f) (g : ι' → α) :
     range (g ∘ f) = range g :=
   ext fun y => (@Surjective.exists _ _ _ hf fun x => g x = y).symm
 #align function.surjective.range_comp Function.Surjective.range_comp
@@ -1335,6 +1335,15 @@ theorem LeftInverse.preimage_preimage {g : β → α} (h : LeftInverse g f) (s :
 
 end Function
 
+namespace EquivLike
+variable {E : Type _} [EquivLike E ι ι']
+
+@[simp] lemma range_comp (f : ι' → α) (e : E) : range (f ∘ e) = range f :=
+(EquivLike.surjective _).range_comp _
+#align equiv_like.range_comp EquivLike.range_comp
+
+end EquivLike
+
 /-! ### Image and preimage on subtypes -/
 
 
@@ -1346,8 +1355,6 @@ namespace Subtype
 -- In mathlib3 we referred to this just as `coe`.
 -- We may want to change the spelling of some statements later.
 
-open Set
-
 variable {α : Type _}
 
 theorem coe_image {p : α → Prop} {s : Set (Subtype p)} :
feat: port Topology.UniformSpace.Equicontinuity (#2457)

Co-authored-by: RemyDegenne <Remydegenne@gmail.com>

Diff
@@ -1129,7 +1129,7 @@ theorem apply_rangeSplitting (f : α → β) (x : range f) : f (rangeSplitting f
 
 @[simp]
 theorem comp_rangeSplitting (f : α → β) :
-  f ∘ rangeSplitting f = (fun x : ↥(range f) => (x : β)) := by
+  f ∘ rangeSplitting f = (↑) := by
   ext
   simp only [Function.comp_apply]
   apply apply_rangeSplitting
feat: port Topology.NoetherianSpace (#2219)
Diff
@@ -778,20 +778,23 @@ theorem subset_range_iff_exists_image_eq {f : α → β} {s : Set β} : s ⊆ ra
   ⟨fun h => ⟨_, image_preimage_eq_iff.2 h⟩, fun ⟨_, ht⟩ => ht ▸ image_subset_range _ _⟩
 #align set.subset_range_iff_exists_image_eq Set.subset_range_iff_exists_image_eq
 
+theorem range_image (f : α → β) : range (image f) = 𝒫 range f :=
+  ext fun _ => subset_range_iff_exists_image_eq.symm
+#align set.range_image Set.range_image
+
 @[simp]
 theorem exists_subset_range_and_iff {f : α → β} {p : Set β → Prop} :
-    (∃ s, s ⊆ range f ∧ p s) ↔ ∃ s, p (f '' s) :=
-  ⟨fun ⟨s, hsf, hps⟩ => ⟨f ⁻¹' s, (image_preimage_eq_of_subset hsf).symm ▸ hps⟩,
-   fun ⟨s, hs⟩ => ⟨f '' s, image_subset_range _ _, hs⟩⟩
+    (∃ s, s ⊆ range f ∧ p s) ↔ ∃ s, p (f '' s) := by
+  rw [← exists_range_iff, range_image]; rfl
 #align set.exists_subset_range_and_iff Set.exists_subset_range_and_iff
 
 theorem exists_subset_range_iff {f : α → β} {p : Set β → Prop} :
     (∃ (s : _) (_ : s ⊆ range f), p s) ↔ ∃ s, p (f '' s) := by simp
 #align set.exists_subset_range_iff Set.exists_subset_range_iff
 
-theorem range_image (f : α → β) : range (image f) = 𝒫 range f :=
-  ext fun _ => subset_range_iff_exists_image_eq.symm
-#align set.range_image Set.range_image
+theorem forall_subset_range_iff {f : α → β} {p : Set β → Prop} :
+    (∀ s, s ⊆ range f → p s) ↔ ∀ s, p (f '' s) := by
+  rw [← forall_range_iff, range_image]; rfl
 
 theorem preimage_subset_preimage_iff {s t : Set α} {f : β → α} (hs : s ⊆ range f) :
     f ⁻¹' s ⊆ f ⁻¹' t ↔ s ⊆ t := by
@@ -1430,15 +1433,13 @@ theorem preimage_val_eq_preimage_val_iff (s t u : Set α) :
 
 theorem exists_set_subtype {t : Set α} (p : Set α → Prop) :
     (∃ s : Set t, p ((fun x : t => (x : α)) '' s)) ↔ ∃ s : Set α, s ⊆ t ∧ p s := by
-  constructor
-  · rintro ⟨s, hs⟩
-    refine' ⟨(fun x : t => (x : α)) '' s, _, hs⟩
-    convert image_subset_range (fun x : t => (x : α)) s
-    rw [range_coe]
-  rintro ⟨s, hs₁, hs₂⟩; refine' ⟨(fun x : t => (x : α)) ⁻¹' s, _⟩
-  rw [image_preimage_eq_of_subset]; exact hs₂; rw [range_coe]; exact hs₁
+  rw [← exists_subset_range_and_iff, range_coe]
 #align subtype.exists_set_subtype Subtype.exists_set_subtype
 
+theorem forall_set_subtype {t : Set α} (p : Set α → Prop) :
+    (∀ s : Set t, p ((fun x : t => (x : α)) '' s)) ↔ ∀ s : Set α, s ⊆ t → p s := by
+  rw [← forall_subset_range_iff, range_coe]
+
 theorem preimage_coe_nonempty {s t : Set α} :
   ((fun x : s => (x : α)) ⁻¹' t).Nonempty ↔ (s ∩ t).Nonempty :=
   by rw [inter_comm, ← image_preimage_coe, nonempty_image_iff]
chore: use dot notation (#1992)
Diff
@@ -928,8 +928,7 @@ theorem image_preimage_inl_union_image_preimage_inr (s : Set (Sum α β)) :
 
 @[simp]
 theorem range_quot_mk (r : α → α → Prop) : range (Quot.mk r) = univ :=
-  Function.Surjective.range_eq (surjective_quot_mk r)
-  -- Porting note: should be `(surjective_quot_mk r).range_eq` if dot notation works
+  (surjective_quot_mk r).range_eq
 #align set.range_quot_mk Set.range_quot_mk
 
 @[simp]
Feat: add Bool.compl_singleton_* and Set.range_in{l,r} (#1955)

Backported in leanprover-community/mathlib#18332

Diff
@@ -857,6 +857,9 @@ theorem range_eval {ι : Type _} {α : ι → Sort _} [∀ i, Nonempty (α i)] (
   -- Porting note: should be `(surjective_eval i).range_eq` if dot notation works
 #align set.range_eval Set.range_eval
 
+theorem range_inl : range (@Sum.inl α β) = {x | Sum.isLeft x} := by ext (_|_) <;> simp
+theorem range_inr : range (@Sum.inr α β) = {x | Sum.isRight x} := by ext (_|_) <;> simp
+
 theorem isCompl_range_inl_range_inr : IsCompl (range <| @Sum.inl α β) (range Sum.inr) :=
   IsCompl.of_le
     (by
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
@@ -667,6 +667,7 @@ theorem range_iff_surjective : range f = univ ↔ Surjective f :=
 
 -- Porting note: Lean4 unfolds `Surjective` here, ruining dot notation
 alias range_iff_surjective ↔ _ _root_.Function.Surjective.range_eq
+#align function.surjective.range_eq Function.Surjective.range_eq
 
 @[simp]
 theorem image_univ {f : α → β} : f '' univ = range f := by
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
@@ -385,8 +385,8 @@ theorem compl_compl_image [BooleanAlgebra α] (S : Set α) :
   rw [← image_comp, compl_comp_compl, image_id]
 #align set.compl_compl_image Set.compl_compl_image
 
-theorem image_insert_eq {f : α → β} {a : α} {s : Set α} : f '' insert a s = insert (f a) (f '' s) :=
-  by
+theorem image_insert_eq {f : α → β} {a : α} {s : Set α} :
+    f '' insert a s = insert (f a) (f '' s) := by
   ext
   simp [and_or_left, exists_or, eq_comm, or_comm, and_comm]
 #align set.image_insert_eq Set.image_insert_eq
@@ -1310,8 +1310,8 @@ theorem Injective.exists_unique_of_mem_range (hf : Injective f) {b : β} (hb : b
   hf.mem_range_iff_exists_unique.mp hb
 #align function.injective.exists_unique_of_mem_range Function.Injective.exists_unique_of_mem_range
 
-theorem Injective.compl_image_eq (hf : Injective f) (s : Set α) : (f '' s)ᶜ = f '' sᶜ ∪ range fᶜ :=
-  by
+theorem Injective.compl_image_eq (hf : Injective f) (s : Set α) :
+    (f '' s)ᶜ = f '' sᶜ ∪ range fᶜ := by
   ext y
   rcases em (y ∈ range f) with (⟨x, rfl⟩ | hx)
   · simp [hf.eq_iff]
chore: the style linter shouldn't complain about long #align lines (#1643)
Diff
@@ -920,8 +920,7 @@ theorem image_preimage_inl_union_image_preimage_inr (s : Set (Sum α β)) :
     Sum.inl '' (Sum.inl ⁻¹' s) ∪ Sum.inr '' (Sum.inr ⁻¹' s) = s := by
   rw [image_preimage_eq_inter_range, image_preimage_eq_inter_range, ← inter_distrib_left,
     range_inl_union_range_inr, inter_univ]
-#align
-  set.image_preimage_inl_union_image_preimage_inr Set.image_preimage_inl_union_image_preimage_inr
+#align set.image_preimage_inl_union_image_preimage_inr Set.image_preimage_inl_union_image_preimage_inr
 
 @[simp]
 theorem range_quot_mk (r : α → α → Prop) : range (Quot.mk r) = univ :=
@@ -1294,8 +1293,7 @@ theorem Surjective.preimage_subset_preimage_iff {s t : Set β} (hf : Surjective
   apply Set.preimage_subset_preimage_iff
   rw [Function.Surjective.range_eq hf]
   apply subset_univ
-#align
-  function.surjective.preimage_subset_preimage_iff Function.Surjective.preimage_subset_preimage_iff
+#align function.surjective.preimage_subset_preimage_iff Function.Surjective.preimage_subset_preimage_iff
 
 theorem Surjective.range_comp {ι' : Sort _} {f : ι → ι'} (hf : Surjective f) (g : ι' → α) :
     range (g ∘ f) = range g :=
chore: drop use of trivial in use (#1153)

After filling an existential, use will resolve the remaining goals if they are "easy". Before this PR this was done by trying trivial. I have downgraded to with_reducible rfl. This means use will no longer solve goals which are

  • definitional equalities which require the unfolding of non-reducible definitions
  • tactics other than rfl which are called by trivial (notably decide, which can get slow)

Note that this brings use closer to the mathlib3 version: there it tried the trivial' tactic, which again only looked at definitional equality up to reducible definitions, and whose kitchen-sink did not include decide.

See discussion: https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/use

Diff
@@ -979,14 +979,15 @@ theorem range_subtype_map {p : α → Prop} {q : β → Prop} (f : α → β) (h
   ext ⟨x, hx⟩
   rw [mem_preimage, mem_range, mem_image, Subtype.exists, Subtype.coe_mk]
   apply Iff.intro
-  { rintro ⟨a, b, hab⟩
+  . rintro ⟨a, b, hab⟩
     rw [Subtype.map, Subtype.mk.injEq] at hab
-    use a }
-  { rintro ⟨a, b, hab⟩
+    use a
+    trivial
+  . rintro ⟨a, b, hab⟩
     use a
     use b
     rw [Subtype.map, Subtype.mk.injEq]
-    exact hab }
+    exact hab
   -- Porting note: `simp_rw` fails here
   -- simp_rw [mem_preimage, mem_range, mem_image, Subtype.exists, Subtype.map, Subtype.coe_mk,
   --   mem_set_of, exists_prop]
@@ -1099,14 +1100,15 @@ theorem range_inclusion (h : s ⊆ t) : range (inclusion h) = { x : t | (x : α)
   ext ⟨x, hx⟩
   -- Porting note: `simp [inclusion]` doesn't solve goal
   apply Iff.intro
-  { rw [mem_range]
+  . rw [mem_range]
     rintro ⟨a, ha⟩
     rw [inclusion, Subtype.mk.injEq] at ha
     rw [mem_setOf, Subtype.coe_mk, ← ha]
-    exact Subtype.coe_prop _ }
-  { rw [mem_setOf, Subtype.coe_mk, mem_range]
+    exact Subtype.coe_prop _
+  . rw [mem_setOf, Subtype.coe_mk, mem_range]
     intro hx'
-    use ⟨x, hx'⟩ }
+    use ⟨x, hx'⟩
+    trivial
   -- simp_rw [inclusion, mem_range, Subtype.mk_eq_mk]
   -- rw [SetCoe.exists, Subtype.coe_mk, exists_prop, exists_eq_right, mem_set_of, Subtype.coe_mk]
 #align set.range_inclusion Set.range_inclusion
feat: port some CanLift instances, restore lift tactic usage (#1425)
Diff
@@ -958,14 +958,10 @@ theorem range_quotient_lift_on' {s : Setoid ι} (hf) :
   range_quot_lift _
 #align set.range_quotient_lift_on' Set.range_quotient_lift_on'
 
--- Porting note: waiting for `lift` tactic
--- instance canLift (c) (p) [CanLift α β c p] :
---     CanLift (Set α) (Set β) ((· '' ·) c) fun s =>
---       ∀ x ∈ s,
---         p
---           x where prf s hs :=
---     subset_range_iff_exists_image_eq.mp fun x hx => CanLift.prf _ (hs x hx)
--- #align set.can_lift Set.canLift
+instance canLift (c) (p) [CanLift α β c p] :
+    CanLift (Set α) (Set β) ((· '' ·) c) fun s => ∀ x ∈ s, p x where
+  prf _ hs := subset_range_iff_exists_image_eq.mp fun x hx => CanLift.prf _ (hs x hx)
+#align set.can_lift Set.canLift
 
 theorem range_const_subset {c : α} : (range fun _ : ι => c) ⊆ {c} :=
   range_subset_iff.2 fun _ => rfl
chore: fix more casing errors per naming scheme (#1232)

I've avoided anything under Tactic or test.

In correcting the names, I found Option.isNone_iff_eq_none duplicated between Std and Mathlib, so the Mathlib one has been removed.

Co-authored-by: Reid Barton <rwbarton@gmail.com>

Diff
@@ -1132,7 +1132,7 @@ theorem comp_rangeSplitting (f : α → β) :
   apply apply_rangeSplitting
 #align set.comp_range_splitting Set.comp_rangeSplitting
 
--- When `f` is injective, see also `Equiv.of_injective`.
+-- When `f` is injective, see also `Equiv.ofInjective`.
 theorem leftInverse_rangeSplitting (f : α → β) :
     LeftInverse (rangeFactorization f) (rangeSplitting f) := fun x => by
   apply Subtype.ext -- Porting note: why doesn't `ext` find this lemma?
chore: move basic lemmas to basic files (#1109)

synchronize with https://github.com/leanprover-community/mathlib/pull/17882

Make disjoint_singleton @[simp 1100] because the linter complains it is not in simpNF (because of disjoint_singleton_left and disjoint_singleton_right).

Removing simp of disjoint_singleton, making disjoint_singleton_left have a greater priority than disjoint_singleton_right, then disjoint_singleton can be proved by simp.

Diff
@@ -5,7 +5,7 @@ Authors: Jeremy Avigad, Leonardo de Moura
 Ported by: Winston Yin
 
 ! This file was ported from Lean 3 source module data.set.image
-! leanprover-community/mathlib commit f178c0e25af359f6cbc72a96a243efd3b12423a3
+! leanprover-community/mathlib commit 3d95492390dc90e34184b13e865f50bc67f30fbb
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -302,6 +302,10 @@ theorem image_subset {a b : Set α} (f : α → β) (h : a ⊆ b) : f '' a ⊆ f
   exact fun x => fun ⟨w, h1, h2⟩ => ⟨w, h h1, h2⟩
 #align set.image_subset Set.image_subset
 
+/-- `Set.image` is monotone. See `Set.image_subset` for the statement in terms of `⊆`. -/
+lemma monotone_image {f : α → β} : Monotone (image f) := fun _ _ => image_subset _
+#align set.monotone_image Set.monotone_image
+
 theorem image_union (f : α → β) (s t : Set α) : f '' (s ∪ t) = f '' s ∪ f '' t :=
   ext fun x =>
     ⟨by rintro ⟨a, h | h, rfl⟩ <;> [left, right] <;> exact ⟨_, h, rfl⟩, by
@@ -1544,3 +1548,64 @@ theorem eq_preimage_iff_image_eq {f : α → β} (hf : Bijective f) {s t} : s =
 end ImagePreimage
 
 end Set
+
+/-! ### Disjoint lemmas for image and preimage -/
+
+section Disjoint
+variable {α β γ : Type _} {f : α → β} {s t : Set α}
+
+theorem Disjoint.preimage (f : α → β) {s t : Set β} (h : Disjoint s t) :
+    Disjoint (f ⁻¹' s) (f ⁻¹' t) :=
+  disjoint_iff_inf_le.mpr fun _ hx => h.le_bot hx
+#align disjoint.preimage Disjoint.preimage
+
+namespace Set
+
+theorem disjoint_image_image {f : β → α} {g : γ → α} {s : Set β} {t : Set γ}
+    (h : ∀ b ∈ s, ∀ c ∈ t, f b ≠ g c) : Disjoint (f '' s) (g '' t) :=
+  disjoint_iff_inf_le.mpr <| by rintro a ⟨⟨b, hb, eq⟩, c, hc, rfl⟩; exact h b hb c hc eq
+#align set.disjoint_image_image Set.disjoint_image_image
+
+theorem disjoint_image_of_injective (hf : Injective f) {s t : Set α} (hd : Disjoint s t) :
+    Disjoint (f '' s) (f '' t) :=
+  disjoint_image_image fun _ hx _ hy => hf.ne fun H => Set.disjoint_iff.1 hd ⟨hx, H.symm ▸ hy⟩
+#align set.disjoint_image_of_injective Set.disjoint_image_of_injective
+
+theorem _root_.Disjoint.of_image (h : Disjoint (f '' s) (f '' t)) : Disjoint s t :=
+  disjoint_iff_inf_le.mpr fun _ hx =>
+    disjoint_left.1 h (mem_image_of_mem _ hx.1) (mem_image_of_mem _ hx.2)
+#align disjoint.of_image Disjoint.of_image
+
+theorem disjoint_image_iff (hf : Injective f) : Disjoint (f '' s) (f '' t) ↔ Disjoint s t :=
+  ⟨Disjoint.of_image, disjoint_image_of_injective hf⟩
+#align set.disjoint_image_iff Set.disjoint_image_iff
+
+theorem _root_.Disjoint.of_preimage (hf : Surjective f) {s t : Set β}
+    (h : Disjoint (f ⁻¹' s) (f ⁻¹' t)) : Disjoint s t := by
+  rw [disjoint_iff_inter_eq_empty, ← image_preimage_eq (_ ∩ _) hf, preimage_inter, h.inter_eq,
+    image_empty]
+#align disjoint.of_preimage Disjoint.of_preimage
+
+theorem disjoint_preimage_iff (hf : Surjective f) {s t : Set β} :
+    Disjoint (f ⁻¹' s) (f ⁻¹' t) ↔ Disjoint s t :=
+  ⟨Disjoint.of_preimage hf, Disjoint.preimage _⟩
+#align set.disjoint_preimage_iff Set.disjoint_preimage_iff
+
+theorem preimage_eq_empty {s : Set β} (h : Disjoint s (range f)) :
+    f ⁻¹' s = ∅ :=
+  by simpa using h.preimage f
+#align set.preimage_eq_empty Set.preimage_eq_empty
+
+theorem preimage_eq_empty_iff {s : Set β} : f ⁻¹' s = ∅ ↔ Disjoint s (range f) :=
+  ⟨fun h => by
+    simp only [eq_empty_iff_forall_not_mem, disjoint_iff_inter_eq_empty, not_exists, mem_inter_iff,
+      not_and, mem_range, mem_preimage] at h ⊢
+    intro y hy x hx
+    rw [← hx] at hy
+    exact h x hy,
+  preimage_eq_empty⟩
+#align set.preimage_eq_empty_iff Set.preimage_eq_empty_iff
+
+end Set
+
+end Disjoint
chore: fix casing per naming scheme (#1183)

Fix a lot of wrong casing mostly in the docstrings but also sometimes in def/theorem names. E.g. fin 2 --> Fin 2, add_monoid_hom --> AddMonoidHom

Remove \n from to_additive docstrings that were inserted by mathport.

Move files and directories with Gcd and Smul to GCD and SMul

Diff
@@ -295,7 +295,7 @@ theorem _root_.Function.Commute.set_image {f g : α → α} (h : Function.Commut
   Function.Semiconj.set_image h
 #align function.commute.set_image Function.Commute.set_image
 
-/-- Image is monotone with respect to `⊆`. See `set.monotone_image` for the statement in
+/-- Image is monotone with respect to `⊆`. See `Set.monotone_image` for the statement in
 terms of `≤`. -/
 theorem image_subset {a b : Set α} (f : α → β) (h : a ⊆ b) : f '' a ⊆ f '' b := by
   simp only [subset_def, mem_image]
@@ -1371,8 +1371,10 @@ theorem range_val {s : Set α} : range (Subtype.val : s → α) = s :=
 #align subtype.range_val Subtype.range_val
 
 /-- We make this the simp lemma instead of `range_coe`. The reason is that if we write
-  for `s : set α` the function `coe : s → α`, then the inferred implicit arguments of `coe` are
-  `coe α (λ x, x ∈ s)`. -/
+  for `s : Set α` the function `coe : s → α`, then the inferred implicit arguments of `coe` are
+  `coe α (λ x, x ∈ s)`.
+
+  TODO: Port this docstring to mathlib4 as `coe` is something else now.-/
 @[simp]
 theorem range_coe_subtype {p : α → Prop} : range (fun x : Subtype p => (x : α)) = { x | p x } :=
   range_coe
@@ -1457,7 +1459,7 @@ theorem preimage_coe_compl' (s : Set α) :
 
 end Subtype
 
-/-! ### Images and preimages on `option` -/
+/-! ### Images and preimages on `Option` -/
 
 
 open Set
chore: add source headers to ported theory files (#1094)

The script used to do this is included. The yaml file was obtained from https://raw.githubusercontent.com/wiki/leanprover-community/mathlib/mathlib4-port-status.md

Diff
@@ -3,6 +3,11 @@ Copyright (c) 2014 Jeremy Avigad. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jeremy Avigad, Leonardo de Moura
 Ported by: Winston Yin
+
+! This file was ported from Lean 3 source module data.set.image
+! leanprover-community/mathlib commit f178c0e25af359f6cbc72a96a243efd3b12423a3
+! Please do not edit these lines, except to modify the commit id
+! if you have ported upstream changes.
 -/
 import Mathlib.Data.Set.Basic
 

Dependencies 36

37 files ported (100.0%)
20752 lines ported (100.0%)

All dependencies are ported!