logic.embedding.basicMathlib.Logic.Embedding.Basic

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Mario Carneiro
 -/
 import Data.FunLike.Embedding
-import Data.Prod.Pprod
+import Data.Prod.PProd
 import Data.Sigma.Basic
 import Data.Option.Basic
 import Data.Subtype
Diff
@@ -239,8 +239,8 @@ def setValue {α β} (f : α ↪ β) (a : α) (b : β) [∀ a', Decidable (a' =
   ⟨fun a' => if a' = a then b else if f a' = b then f a else f a',
     by
     intro x y h
-    dsimp at h 
-    split_ifs at h  <;> try subst b <;> try simp only [f.injective.eq_iff] at * <;> cc⟩
+    dsimp at h
+    split_ifs at h <;> try subst b <;> try simp only [f.injective.eq_iff] at * <;> cc⟩
 #align function.embedding.set_value Function.Embedding.setValue
 -/
 
Diff
@@ -122,20 +122,20 @@ namespace Embedding
 
 #print Function.Embedding.coe_injective /-
 theorem coe_injective {α β} : @Function.Injective (α ↪ β) (α → β) coeFn :=
-  FunLike.coe_injective
+  DFunLike.coe_injective
 #align function.embedding.coe_injective Function.Embedding.coe_injective
 -/
 
 #print Function.Embedding.ext /-
 @[ext]
 theorem ext {α β} {f g : Embedding α β} (h : ∀ x, f x = g x) : f = g :=
-  FunLike.ext f g h
+  DFunLike.ext f g h
 #align function.embedding.ext Function.Embedding.ext
 -/
 
 #print Function.Embedding.ext_iff /-
 theorem ext_iff {α β} {f g : Embedding α β} : (∀ x, f x = g x) ↔ f = g :=
-  FunLike.ext_iff.symm
+  DFunLike.ext_iff.symm
 #align function.embedding.ext_iff Function.Embedding.ext_iff
 -/
 
Diff
@@ -3,12 +3,12 @@ Copyright (c) 2017 Johannes Hölzl. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Mario Carneiro
 -/
-import Mathbin.Data.FunLike.Embedding
-import Mathbin.Data.Prod.Pprod
-import Mathbin.Data.Sigma.Basic
-import Mathbin.Data.Option.Basic
-import Mathbin.Data.Subtype
-import Mathbin.Logic.Equiv.Basic
+import Data.FunLike.Embedding
+import Data.Prod.Pprod
+import Data.Sigma.Basic
+import Data.Option.Basic
+import Data.Subtype
+import Logic.Equiv.Basic
 
 #align_import logic.embedding.basic from "leanprover-community/mathlib"@"448144f7ae193a8990cb7473c9e9a01990f64ac7"
 
Diff
@@ -2,11 +2,6 @@
 Copyright (c) 2017 Johannes Hölzl. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Mario Carneiro
-
-! This file was ported from Lean 3 source module logic.embedding.basic
-! leanprover-community/mathlib commit 448144f7ae193a8990cb7473c9e9a01990f64ac7
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Data.FunLike.Embedding
 import Mathbin.Data.Prod.Pprod
@@ -15,6 +10,8 @@ import Mathbin.Data.Option.Basic
 import Mathbin.Data.Subtype
 import Mathbin.Logic.Equiv.Basic
 
+#align_import logic.embedding.basic from "leanprover-community/mathlib"@"448144f7ae193a8990cb7473c9e9a01990f64ac7"
+
 /-!
 # Injective functions
 
Diff
@@ -27,6 +27,7 @@ universe u v w x
 
 namespace Function
 
+#print Function.Embedding /-
 -- depending on cardinalities, an injective function may not exist
 /-- `α ↪ β` is a bundled injective function. -/
 @[nolint has_nonempty_instance]
@@ -34,8 +35,8 @@ structure Embedding (α : Sort _) (β : Sort _) where
   toFun : α → β
   inj' : Injective to_fun
 #align function.embedding Function.Embedding
+-/
 
--- mathport name: «expr ↪ »
 infixr:25 " ↪ " => Embedding
 
 instance {α : Sort u} {β : Sort v} : CoeFun (α ↪ β) fun _ => α → β :=
@@ -89,9 +90,11 @@ theorem Equiv.toEmbedding_apply (a : α) : f.toEmbedding a = f a :=
 #align equiv.to_embedding_apply Equiv.toEmbedding_apply
 -/
 
+#print Equiv.coeEmbedding /-
 instance Equiv.coeEmbedding : Coe (α ≃ β) (α ↪ β) :=
   ⟨Equiv.toEmbedding⟩
 #align equiv.coe_embedding Equiv.coeEmbedding
+-/
 
 #print Equiv.Perm.coeEmbedding /-
 @[reducible]
@@ -105,12 +108,14 @@ theorem Equiv.coe_eq_toEmbedding : ↑f = f.toEmbedding :=
   rfl
 #align equiv.coe_eq_to_embedding Equiv.coe_eq_toEmbedding
 
+#print Equiv.asEmbedding /-
 /-- Given an equivalence to a subtype, produce an embedding to the elements of the corresponding
 set. -/
 @[simps]
 def Equiv.asEmbedding {p : β → Prop} (e : α ≃ Subtype p) : α ↪ β :=
   ⟨coe ∘ e, Subtype.coe_injective.comp e.Injective⟩
 #align equiv.as_embedding Equiv.asEmbedding
+-/
 
 end Equiv
 
@@ -118,40 +123,56 @@ namespace Function
 
 namespace Embedding
 
+#print Function.Embedding.coe_injective /-
 theorem coe_injective {α β} : @Function.Injective (α ↪ β) (α → β) coeFn :=
   FunLike.coe_injective
 #align function.embedding.coe_injective Function.Embedding.coe_injective
+-/
 
+#print Function.Embedding.ext /-
 @[ext]
 theorem ext {α β} {f g : Embedding α β} (h : ∀ x, f x = g x) : f = g :=
   FunLike.ext f g h
 #align function.embedding.ext Function.Embedding.ext
+-/
 
+#print Function.Embedding.ext_iff /-
 theorem ext_iff {α β} {f g : Embedding α β} : (∀ x, f x = g x) ↔ f = g :=
   FunLike.ext_iff.symm
 #align function.embedding.ext_iff Function.Embedding.ext_iff
+-/
 
+#print Function.Embedding.toFun_eq_coe /-
 @[simp]
 theorem toFun_eq_coe {α β} (f : α ↪ β) : toFun f = f :=
   rfl
 #align function.embedding.to_fun_eq_coe Function.Embedding.toFun_eq_coe
+-/
 
+#print Function.Embedding.coeFn_mk /-
 @[simp]
 theorem coeFn_mk {α β} (f : α → β) (i) : (@mk _ _ f i : α → β) = f :=
   rfl
 #align function.embedding.coe_fn_mk Function.Embedding.coeFn_mk
+-/
 
+#print Function.Embedding.mk_coe /-
 @[simp]
 theorem mk_coe {α β : Type _} (f : α ↪ β) (inj) : (⟨f, inj⟩ : α ↪ β) = f := by ext; simp
 #align function.embedding.mk_coe Function.Embedding.mk_coe
+-/
 
+#print Function.Embedding.injective /-
 protected theorem injective {α β} (f : α ↪ β) : Injective f :=
   EmbeddingLike.injective f
 #align function.embedding.injective Function.Embedding.injective
+-/
 
+#print Function.Embedding.apply_eq_iff_eq /-
 theorem apply_eq_iff_eq {α β} (f : α ↪ β) (x y : α) : f x = f y ↔ x = y :=
   EmbeddingLike.apply_eq_iff_eq f
 #align function.embedding.apply_eq_iff_eq Function.Embedding.apply_eq_iff_eq
+-/
 
 #print Function.Embedding.refl /-
 /-- The identity map as a `function.embedding`. -/
@@ -169,15 +190,19 @@ protected def trans {α β γ} (f : α ↪ β) (g : β ↪ γ) : α ↪ γ :=
 #align function.embedding.trans Function.Embedding.trans
 -/
 
+#print Function.Embedding.equiv_toEmbedding_trans_symm_toEmbedding /-
 @[simp]
 theorem equiv_toEmbedding_trans_symm_toEmbedding {α β : Sort _} (e : α ≃ β) :
     e.toEmbedding.trans e.symm.toEmbedding = Embedding.refl _ := by ext; simp
 #align function.embedding.equiv_to_embedding_trans_symm_to_embedding Function.Embedding.equiv_toEmbedding_trans_symm_toEmbedding
+-/
 
+#print Function.Embedding.equiv_symm_toEmbedding_trans_toEmbedding /-
 @[simp]
 theorem equiv_symm_toEmbedding_trans_toEmbedding {α β : Sort _} (e : α ≃ β) :
     e.symm.toEmbedding.trans e.toEmbedding = Embedding.refl _ := by ext; simp
 #align function.embedding.equiv_symm_to_embedding_trans_to_embedding Function.Embedding.equiv_symm_toEmbedding_trans_toEmbedding
+-/
 
 #print Function.Embedding.congr /-
 /-- Transfer an embedding along a pair of equivalences. -/
@@ -222,9 +247,11 @@ def setValue {α β} (f : α ↪ β) (a : α) (b : β) [∀ a', Decidable (a' =
 #align function.embedding.set_value Function.Embedding.setValue
 -/
 
+#print Function.Embedding.setValue_eq /-
 theorem setValue_eq {α β} (f : α ↪ β) (a : α) (b : β) [∀ a', Decidable (a' = a)]
     [∀ a', Decidable (f a' = b)] : setValue f a b a = b := by simp [set_value]
 #align function.embedding.set_value_eq Function.Embedding.setValue_eq
+-/
 
 #print Function.Embedding.some /-
 /-- Embedding into `option α` using `some`. -/
@@ -310,11 +337,13 @@ def prodMap {α β γ δ : Type _} (e₁ : α ↪ β) (e₂ : γ ↪ δ) : α ×
 #align function.embedding.prod_map Function.Embedding.prodMap
 -/
 
+#print Function.Embedding.coe_prodMap /-
 @[simp]
 theorem coe_prodMap {α β γ δ : Type _} (e₁ : α ↪ β) (e₂ : γ ↪ δ) :
     ⇑(e₁.Prod_map e₂) = Prod.map e₁ e₂ :=
   rfl
 #align function.embedding.coe_prod_map Function.Embedding.coe_prodMap
+-/
 
 #print Function.Embedding.pprodMap /-
 /-- If `e₁` and `e₂` are embeddings, then so is `λ ⟨a, b⟩, ⟨e₁ a, e₂ b⟩ : pprod α γ → pprod β δ`. -/
@@ -337,10 +366,12 @@ def sumMap {α β γ δ : Type _} (e₁ : α ↪ β) (e₂ : γ ↪ δ) : Sum α
 #align function.embedding.sum_map Function.Embedding.sumMap
 -/
 
+#print Function.Embedding.coe_sumMap /-
 @[simp]
 theorem coe_sumMap {α β γ δ} (e₁ : α ↪ β) (e₂ : γ ↪ δ) : ⇑(sumMap e₁ e₂) = Sum.map e₁ e₂ :=
   rfl
 #align function.embedding.coe_sum_map Function.Embedding.coe_sumMap
+-/
 
 #print Function.Embedding.inl /-
 /-- The embedding of `α` into the sum `α ⊕ β`. -/
@@ -429,15 +460,19 @@ protected def subtypeMap {α β} {p : α → Prop} {q : β → Prop} (f : α ↪
 
 open Set
 
+#print Function.Embedding.swap_apply /-
 theorem swap_apply {α β : Type _} [DecidableEq α] [DecidableEq β] (f : α ↪ β) (x y z : α) :
     Equiv.swap (f x) (f y) (f z) = f (Equiv.swap x y z) :=
   f.Injective.swap_apply x y z
 #align function.embedding.swap_apply Function.Embedding.swap_apply
+-/
 
+#print Function.Embedding.swap_comp /-
 theorem swap_comp {α β : Type _} [DecidableEq α] [DecidableEq β] (f : α ↪ β) (x y : α) :
     Equiv.swap (f x) (f y) ∘ f = f ∘ Equiv.swap x y :=
   f.Injective.swap_comp x y
 #align function.embedding.swap_comp Function.Embedding.swap_comp
+-/
 
 end Embedding
 
@@ -447,6 +482,7 @@ namespace Equiv
 
 open Function.Embedding
 
+#print Equiv.subtypeInjectiveEquivEmbedding /-
 /-- The type of embeddings `α ↪ β` is equivalent to
     the subtype of all injective functions `α → β`. -/
 def subtypeInjectiveEquivEmbedding (α β : Sort _) : { f : α → β // Function.Injective f } ≃ (α ↪ β)
@@ -456,7 +492,9 @@ def subtypeInjectiveEquivEmbedding (α β : Sort _) : { f : α → β // Functio
   left_inv f := by simp
   right_inv f := by ext; rfl
 #align equiv.subtype_injective_equiv_embedding Equiv.subtypeInjectiveEquivEmbedding
+-/
 
+#print Equiv.embeddingCongr /-
 /-- If `α₁ ≃ α₂` and `β₁ ≃ β₂`, then the type of embeddings `α₁ ↪ β₁`
 is equivalent to the type of embeddings `α₂ ↪ β₂`. -/
 @[congr, simps apply]
@@ -467,12 +505,16 @@ def embeddingCongr {α β γ δ : Sort _} (h : α ≃ β) (h' : γ ≃ δ) : (α
   left_inv x := by ext; simp
   right_inv x := by ext; simp
 #align equiv.embedding_congr Equiv.embeddingCongr
+-/
 
+#print Equiv.embeddingCongr_refl /-
 @[simp]
 theorem embeddingCongr_refl {α β : Sort _} :
     embeddingCongr (Equiv.refl α) (Equiv.refl β) = Equiv.refl (α ↪ β) := by ext; rfl
 #align equiv.embedding_congr_refl Equiv.embeddingCongr_refl
+-/
 
+#print Equiv.embeddingCongr_trans /-
 @[simp]
 theorem embeddingCongr_trans {α₁ β₁ α₂ β₂ α₃ β₃ : Sort _} (e₁ : α₁ ≃ α₂) (e₁' : β₁ ≃ β₂)
     (e₂ : α₂ ≃ α₃) (e₂' : β₂ ≃ β₃) :
@@ -480,19 +522,24 @@ theorem embeddingCongr_trans {α₁ β₁ α₂ β₂ α₃ β₃ : Sort _} (e
       (embeddingCongr e₁ e₁').trans (embeddingCongr e₂ e₂') :=
   rfl
 #align equiv.embedding_congr_trans Equiv.embeddingCongr_trans
+-/
 
+#print Equiv.embeddingCongr_symm /-
 @[simp]
 theorem embeddingCongr_symm {α₁ β₁ α₂ β₂ : Sort _} (e₁ : α₁ ≃ α₂) (e₂ : β₁ ≃ β₂) :
     (embeddingCongr e₁ e₂).symm = embeddingCongr e₁.symm e₂.symm :=
   rfl
 #align equiv.embedding_congr_symm Equiv.embeddingCongr_symm
+-/
 
+#print Equiv.embeddingCongr_apply_trans /-
 theorem embeddingCongr_apply_trans {α₁ β₁ γ₁ α₂ β₂ γ₂ : Sort _} (ea : α₁ ≃ α₂) (eb : β₁ ≃ β₂)
     (ec : γ₁ ≃ γ₂) (f : α₁ ↪ β₁) (g : β₁ ↪ γ₁) :
     Equiv.embeddingCongr ea ec (f.trans g) =
       (Equiv.embeddingCongr ea eb f).trans (Equiv.embeddingCongr eb ec g) :=
   by ext; simp
 #align equiv.embedding_congr_apply_trans Equiv.embeddingCongr_apply_trans
+-/
 
 #print Equiv.refl_toEmbedding /-
 @[simp]
@@ -501,11 +548,13 @@ theorem refl_toEmbedding {α : Type _} : (Equiv.refl α).toEmbedding = Function.
 #align equiv.refl_to_embedding Equiv.refl_toEmbedding
 -/
 
+#print Equiv.trans_toEmbedding /-
 @[simp]
 theorem trans_toEmbedding {α β γ : Type _} (e : α ≃ β) (f : β ≃ γ) :
     (e.trans f).toEmbedding = e.toEmbedding.trans f.toEmbedding :=
   rfl
 #align equiv.trans_to_embedding Equiv.trans_toEmbedding
+-/
 
 end Equiv
 
Diff
@@ -218,7 +218,7 @@ def setValue {α β} (f : α ↪ β) (a : α) (b : β) [∀ a', Decidable (a' =
     by
     intro x y h
     dsimp at h 
-    split_ifs  at h  <;> try subst b <;> try simp only [f.injective.eq_iff] at * <;> cc⟩
+    split_ifs at h  <;> try subst b <;> try simp only [f.injective.eq_iff] at * <;> cc⟩
 #align function.embedding.set_value Function.Embedding.setValue
 -/
 
Diff
@@ -217,8 +217,8 @@ def setValue {α β} (f : α ↪ β) (a : α) (b : β) [∀ a', Decidable (a' =
   ⟨fun a' => if a' = a then b else if f a' = b then f a else f a',
     by
     intro x y h
-    dsimp at h
-    split_ifs  at h <;> try subst b <;> try simp only [f.injective.eq_iff] at * <;> cc⟩
+    dsimp at h 
+    split_ifs  at h  <;> try subst b <;> try simp only [f.injective.eq_iff] at * <;> cc⟩
 #align function.embedding.set_value Function.Embedding.setValue
 -/
 
@@ -367,7 +367,7 @@ variable {α α' : Type _} {β : α → Type _} {β' : α' → Type _}
 #print Function.Embedding.sigmaMk /-
 /-- `sigma.mk` as an `function.embedding`. -/
 @[simps apply]
-def sigmaMk (a : α) : β a ↪ Σx, β x :=
+def sigmaMk (a : α) : β a ↪ Σ x, β x :=
   ⟨Sigma.mk a, sigma_mk_injective⟩
 #align function.embedding.sigma_mk Function.Embedding.sigmaMk
 -/
@@ -376,7 +376,7 @@ def sigmaMk (a : α) : β a ↪ Σx, β x :=
 /-- If `f : α ↪ α'` is an embedding and `g : Π a, β α ↪ β' (f α)` is a family
 of embeddings, then `sigma.map f g` is an embedding. -/
 @[simps apply]
-def sigmaMap (f : α ↪ α') (g : ∀ a, β a ↪ β' (f a)) : (Σa, β a) ↪ Σa', β' a' :=
+def sigmaMap (f : α ↪ α') (g : ∀ a, β a ↪ β' (f a)) : (Σ a, β a) ↪ Σ a', β' a' :=
   ⟨Sigma.map f fun a => g a, f.Injective.sigma_map fun a => (g a).Injective⟩
 #align function.embedding.sigma_map Function.Embedding.sigmaMap
 -/
Diff
@@ -27,12 +27,6 @@ universe u v w x
 
 namespace Function
 
-/- warning: function.embedding -> Function.Embedding is a dubious translation:
-lean 3 declaration is
-  Sort.{u1} -> Sort.{u2} -> Sort.{max 1 (imax u1 u2)}
-but is expected to have type
-  Sort.{u1} -> Sort.{u2} -> Sort.{max (max 1 u1) u2}
-Case conversion may be inaccurate. Consider using '#align function.embedding Function.Embeddingₓ'. -/
 -- depending on cardinalities, an injective function may not exist
 /-- `α ↪ β` is a bundled injective function. -/
 @[nolint has_nonempty_instance]
@@ -95,12 +89,6 @@ theorem Equiv.toEmbedding_apply (a : α) : f.toEmbedding a = f a :=
 #align equiv.to_embedding_apply Equiv.toEmbedding_apply
 -/
 
-/- warning: equiv.coe_embedding -> Equiv.coeEmbedding is a dubious translation:
-lean 3 declaration is
-  forall {α : Sort.{u1}} {β : Sort.{u2}}, Coe.{max 1 (imax u1 u2) (imax u2 u1), max 1 (imax u1 u2)} (Equiv.{u1, u2} α β) (Function.Embedding.{u1, u2} α β)
-but is expected to have type
-  forall {α : Sort.{u1}} {β : Sort.{u2}}, Coe.{max (max 1 u2) u1, max (max 1 u2) u1} (Equiv.{u1, u2} α β) (Function.Embedding.{u1, u2} α β)
-Case conversion may be inaccurate. Consider using '#align equiv.coe_embedding Equiv.coeEmbeddingₓ'. -/
 instance Equiv.coeEmbedding : Coe (α ≃ β) (α ↪ β) :=
   ⟨Equiv.toEmbedding⟩
 #align equiv.coe_embedding Equiv.coeEmbedding
@@ -117,12 +105,6 @@ theorem Equiv.coe_eq_toEmbedding : ↑f = f.toEmbedding :=
   rfl
 #align equiv.coe_eq_to_embedding Equiv.coe_eq_toEmbedding
 
-/- warning: equiv.as_embedding -> Equiv.asEmbedding is a dubious translation:
-lean 3 declaration is
-  forall {α : Sort.{u1}} {β : Sort.{u2}} {p : β -> Prop}, (Equiv.{u1, max 1 u2} α (Subtype.{u2} β p)) -> (Function.Embedding.{u1, u2} α β)
-but is expected to have type
-  forall {α : Sort.{u1}} {β : Sort.{u2}} {p : α -> Prop}, (Equiv.{u2, max 1 u1} β (Subtype.{u1} α p)) -> (Function.Embedding.{u2, u1} β α)
-Case conversion may be inaccurate. Consider using '#align equiv.as_embedding Equiv.asEmbeddingₓ'. -/
 /-- Given an equivalence to a subtype, produce an embedding to the elements of the corresponding
 set. -/
 @[simps]
@@ -136,85 +118,37 @@ namespace Function
 
 namespace Embedding
 
-/- warning: function.embedding.coe_injective -> Function.Embedding.coe_injective is a dubious translation:
-lean 3 declaration is
-  forall {α : Sort.{u1}} {β : Sort.{u2}}, Function.Injective.{max 1 (imax u1 u2), imax u1 u2} (Function.Embedding.{u1, u2} α β) (α -> β) (coeFn.{max 1 (imax u1 u2), imax u1 u2} (Function.Embedding.{u1, u2} α β) (fun (ᾰ : Function.Embedding.{u1, u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{u1, u2} α β))
-but is expected to have type
-  forall {α : Sort.{u2}} {β : Sort.{u1}}, Function.Injective.{max (max 1 u1) u2, imax u2 u1} (Function.Embedding.{u2, u1} α β) (α -> β) (fun (f : Function.Embedding.{u2, u1} α β) => FunLike.coe.{max (max 1 u1) u2, u2, u1} (Function.Embedding.{u2, u1} α β) α (fun (a : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) a) (EmbeddingLike.toFunLike.{max (max 1 u1) u2, u2, u1} (Function.Embedding.{u2, u1} α β) α β (Function.instEmbeddingLikeEmbedding.{u2, u1} α β)) f)
-Case conversion may be inaccurate. Consider using '#align function.embedding.coe_injective Function.Embedding.coe_injectiveₓ'. -/
 theorem coe_injective {α β} : @Function.Injective (α ↪ β) (α → β) coeFn :=
   FunLike.coe_injective
 #align function.embedding.coe_injective Function.Embedding.coe_injective
 
-/- warning: function.embedding.ext -> Function.Embedding.ext is a dubious translation:
-lean 3 declaration is
-  forall {α : Sort.{u1}} {β : Sort.{u2}} {f : Function.Embedding.{u1, u2} α β} {g : Function.Embedding.{u1, u2} α β}, (forall (x : α), Eq.{u2} β (coeFn.{max 1 (imax u1 u2), imax u1 u2} (Function.Embedding.{u1, u2} α β) (fun (_x : Function.Embedding.{u1, u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{u1, u2} α β) f x) (coeFn.{max 1 (imax u1 u2), imax u1 u2} (Function.Embedding.{u1, u2} α β) (fun (_x : Function.Embedding.{u1, u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{u1, u2} α β) g x)) -> (Eq.{max 1 (imax u1 u2)} (Function.Embedding.{u1, u2} α β) f g)
-but is expected to have type
-  forall {α : Sort.{u2}} {β : Sort.{u1}} {f : Function.Embedding.{u2, u1} α β} {g : Function.Embedding.{u2, u1} α β}, (forall (x : α), Eq.{u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (FunLike.coe.{max (max 1 u1) u2, u2, u1} (Function.Embedding.{u2, u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (max 1 u1) u2, u2, u1} (Function.Embedding.{u2, u1} α β) α β (Function.instEmbeddingLikeEmbedding.{u2, u1} α β)) f x) (FunLike.coe.{max (max 1 u1) u2, u2, u1} (Function.Embedding.{u2, u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (max 1 u1) u2, u2, u1} (Function.Embedding.{u2, u1} α β) α β (Function.instEmbeddingLikeEmbedding.{u2, u1} α β)) g x)) -> (Eq.{max (max 1 u1) u2} (Function.Embedding.{u2, u1} α β) f g)
-Case conversion may be inaccurate. Consider using '#align function.embedding.ext Function.Embedding.extₓ'. -/
 @[ext]
 theorem ext {α β} {f g : Embedding α β} (h : ∀ x, f x = g x) : f = g :=
   FunLike.ext f g h
 #align function.embedding.ext Function.Embedding.ext
 
-/- warning: function.embedding.ext_iff -> Function.Embedding.ext_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Sort.{u1}} {β : Sort.{u2}} {f : Function.Embedding.{u1, u2} α β} {g : Function.Embedding.{u1, u2} α β}, Iff (forall (x : α), Eq.{u2} β (coeFn.{max 1 (imax u1 u2), imax u1 u2} (Function.Embedding.{u1, u2} α β) (fun (_x : Function.Embedding.{u1, u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{u1, u2} α β) f x) (coeFn.{max 1 (imax u1 u2), imax u1 u2} (Function.Embedding.{u1, u2} α β) (fun (_x : Function.Embedding.{u1, u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{u1, u2} α β) g x)) (Eq.{max 1 (imax u1 u2)} (Function.Embedding.{u1, u2} α β) f g)
-but is expected to have type
-  forall {α : Sort.{u2}} {β : Sort.{u1}} {f : Function.Embedding.{u2, u1} α β} {g : Function.Embedding.{u2, u1} α β}, Iff (forall (x : α), Eq.{u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (FunLike.coe.{max (max 1 u1) u2, u2, u1} (Function.Embedding.{u2, u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (max 1 u1) u2, u2, u1} (Function.Embedding.{u2, u1} α β) α β (Function.instEmbeddingLikeEmbedding.{u2, u1} α β)) f x) (FunLike.coe.{max (max 1 u1) u2, u2, u1} (Function.Embedding.{u2, u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (max 1 u1) u2, u2, u1} (Function.Embedding.{u2, u1} α β) α β (Function.instEmbeddingLikeEmbedding.{u2, u1} α β)) g x)) (Eq.{max (max 1 u1) u2} (Function.Embedding.{u2, u1} α β) f g)
-Case conversion may be inaccurate. Consider using '#align function.embedding.ext_iff Function.Embedding.ext_iffₓ'. -/
 theorem ext_iff {α β} {f g : Embedding α β} : (∀ x, f x = g x) ↔ f = g :=
   FunLike.ext_iff.symm
 #align function.embedding.ext_iff Function.Embedding.ext_iff
 
-/- warning: function.embedding.to_fun_eq_coe -> Function.Embedding.toFun_eq_coe is a dubious translation:
-lean 3 declaration is
-  forall {α : Sort.{u1}} {β : Sort.{u2}} (f : Function.Embedding.{u1, u2} α β), Eq.{imax u1 u2} (α -> β) (Function.Embedding.toFun.{u1, u2} α β f) (coeFn.{max 1 (imax u1 u2), imax u1 u2} (Function.Embedding.{u1, u2} α β) (fun (_x : Function.Embedding.{u1, u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{u1, u2} α β) f)
-but is expected to have type
-  forall {α : Sort.{u2}} {β : Sort.{u1}} (f : Function.Embedding.{u2, u1} α β), Eq.{imax u2 u1} (α -> β) (Function.Embedding.toFun.{u2, u1} α β f) (FunLike.coe.{max (max 1 u1) u2, u2, u1} (Function.Embedding.{u2, u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (max 1 u1) u2, u2, u1} (Function.Embedding.{u2, u1} α β) α β (Function.instEmbeddingLikeEmbedding.{u2, u1} α β)) f)
-Case conversion may be inaccurate. Consider using '#align function.embedding.to_fun_eq_coe Function.Embedding.toFun_eq_coeₓ'. -/
 @[simp]
 theorem toFun_eq_coe {α β} (f : α ↪ β) : toFun f = f :=
   rfl
 #align function.embedding.to_fun_eq_coe Function.Embedding.toFun_eq_coe
 
-/- warning: function.embedding.coe_fn_mk -> Function.Embedding.coeFn_mk is a dubious translation:
-lean 3 declaration is
-  forall {α : Sort.{u1}} {β : Sort.{u2}} (f : α -> β) (i : Function.Injective.{u1, u2} α β f), Eq.{imax u1 u2} ((fun (_x : Function.Embedding.{u1, u2} α β) => α -> β) (Function.Embedding.mk.{u1, u2} α β f i)) (coeFn.{max 1 (imax u1 u2), imax u1 u2} (Function.Embedding.{u1, u2} α β) (fun (_x : Function.Embedding.{u1, u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{u1, u2} α β) (Function.Embedding.mk.{u1, u2} α β f i)) f
-but is expected to have type
-  forall {α : Sort.{u2}} {β : Sort.{u1}} (f : α -> β) (i : Function.Injective.{u2, u1} α β f), Eq.{imax u2 u1} (forall (a : α), (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) a) (FunLike.coe.{max (max 1 u2) u1, u2, u1} (Function.Embedding.{u2, u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (max 1 u2) u1, u2, u1} (Function.Embedding.{u2, u1} α β) α β (Function.instEmbeddingLikeEmbedding.{u2, u1} α β)) (Function.Embedding.mk.{u2, u1} α β f i)) f
-Case conversion may be inaccurate. Consider using '#align function.embedding.coe_fn_mk Function.Embedding.coeFn_mkₓ'. -/
 @[simp]
 theorem coeFn_mk {α β} (f : α → β) (i) : (@mk _ _ f i : α → β) = f :=
   rfl
 #align function.embedding.coe_fn_mk Function.Embedding.coeFn_mk
 
-/- warning: function.embedding.mk_coe -> Function.Embedding.mk_coe is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : Function.Embedding.{succ u1, succ u2} α β) (inj : Function.Injective.{succ u1, succ u2} α β (coeFn.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (fun (_x : Function.Embedding.{succ u1, succ u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{succ u1, succ u2} α β) f)), Eq.{max 1 (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (Function.Embedding.mk.{succ u1, succ u2} α β (coeFn.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (fun (_x : Function.Embedding.{succ u1, succ u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{succ u1, succ u2} α β) f) inj) f
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : Function.Embedding.{succ u2, succ u1} α β) (inj : Function.Injective.{succ u2, succ u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f)), Eq.{max (succ u2) (succ u1)} (Function.Embedding.{succ u2, succ u1} α β) (Function.Embedding.mk.{succ u2, succ u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f) inj) f
-Case conversion may be inaccurate. Consider using '#align function.embedding.mk_coe Function.Embedding.mk_coeₓ'. -/
 @[simp]
 theorem mk_coe {α β : Type _} (f : α ↪ β) (inj) : (⟨f, inj⟩ : α ↪ β) = f := by ext; simp
 #align function.embedding.mk_coe Function.Embedding.mk_coe
 
-/- warning: function.embedding.injective -> Function.Embedding.injective is a dubious translation:
-lean 3 declaration is
-  forall {α : Sort.{u1}} {β : Sort.{u2}} (f : Function.Embedding.{u1, u2} α β), Function.Injective.{u1, u2} α β (coeFn.{max 1 (imax u1 u2), imax u1 u2} (Function.Embedding.{u1, u2} α β) (fun (_x : Function.Embedding.{u1, u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{u1, u2} α β) f)
-but is expected to have type
-  forall {α : Sort.{u2}} {β : Sort.{u1}} (f : Function.Embedding.{u2, u1} α β), Function.Injective.{u2, u1} α β (FunLike.coe.{max (max 1 u1) u2, u2, u1} (Function.Embedding.{u2, u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (max 1 u1) u2, u2, u1} (Function.Embedding.{u2, u1} α β) α β (Function.instEmbeddingLikeEmbedding.{u2, u1} α β)) f)
-Case conversion may be inaccurate. Consider using '#align function.embedding.injective Function.Embedding.injectiveₓ'. -/
 protected theorem injective {α β} (f : α ↪ β) : Injective f :=
   EmbeddingLike.injective f
 #align function.embedding.injective Function.Embedding.injective
 
-/- warning: function.embedding.apply_eq_iff_eq -> Function.Embedding.apply_eq_iff_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Sort.{u1}} {β : Sort.{u2}} (f : Function.Embedding.{u1, u2} α β) (x : α) (y : α), Iff (Eq.{u2} β (coeFn.{max 1 (imax u1 u2), imax u1 u2} (Function.Embedding.{u1, u2} α β) (fun (_x : Function.Embedding.{u1, u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{u1, u2} α β) f x) (coeFn.{max 1 (imax u1 u2), imax u1 u2} (Function.Embedding.{u1, u2} α β) (fun (_x : Function.Embedding.{u1, u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{u1, u2} α β) f y)) (Eq.{u1} α x y)
-but is expected to have type
-  forall {α : Sort.{u2}} {β : Sort.{u1}} (f : Function.Embedding.{u2, u1} α β) (x : α) (y : α), Iff (Eq.{u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (FunLike.coe.{max (max 1 u1) u2, u2, u1} (Function.Embedding.{u2, u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (max 1 u1) u2, u2, u1} (Function.Embedding.{u2, u1} α β) α β (Function.instEmbeddingLikeEmbedding.{u2, u1} α β)) f x) (FunLike.coe.{max (max 1 u1) u2, u2, u1} (Function.Embedding.{u2, u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (max 1 u1) u2, u2, u1} (Function.Embedding.{u2, u1} α β) α β (Function.instEmbeddingLikeEmbedding.{u2, u1} α β)) f y)) (Eq.{u2} α x y)
-Case conversion may be inaccurate. Consider using '#align function.embedding.apply_eq_iff_eq Function.Embedding.apply_eq_iff_eqₓ'. -/
 theorem apply_eq_iff_eq {α β} (f : α ↪ β) (x y : α) : f x = f y ↔ x = y :=
   EmbeddingLike.apply_eq_iff_eq f
 #align function.embedding.apply_eq_iff_eq Function.Embedding.apply_eq_iff_eq
@@ -235,23 +169,11 @@ protected def trans {α β γ} (f : α ↪ β) (g : β ↪ γ) : α ↪ γ :=
 #align function.embedding.trans Function.Embedding.trans
 -/
 
-/- warning: function.embedding.equiv_to_embedding_trans_symm_to_embedding -> Function.Embedding.equiv_toEmbedding_trans_symm_toEmbedding is a dubious translation:
-lean 3 declaration is
-  forall {α : Sort.{u1}} {β : Sort.{u2}} (e : Equiv.{u1, u2} α β), Eq.{max 1 u1} (Function.Embedding.{u1, u1} α α) (Function.Embedding.trans.{u1, u2, u1} α β α (Equiv.toEmbedding.{u1, u2} α β e) (Equiv.toEmbedding.{u2, u1} β α (Equiv.symm.{u1, u2} α β e))) (Function.Embedding.refl.{u1} α)
-but is expected to have type
-  forall {α : Sort.{u2}} {β : Sort.{u1}} (e : Equiv.{u2, u1} α β), Eq.{max 1 u2} (Function.Embedding.{u2, u2} α α) (Function.Embedding.trans.{u2, u1, u2} α β α (Equiv.toEmbedding.{u2, u1} α β e) (Equiv.toEmbedding.{u1, u2} β α (Equiv.symm.{u2, u1} α β e))) (Function.Embedding.refl.{u2} α)
-Case conversion may be inaccurate. Consider using '#align function.embedding.equiv_to_embedding_trans_symm_to_embedding Function.Embedding.equiv_toEmbedding_trans_symm_toEmbeddingₓ'. -/
 @[simp]
 theorem equiv_toEmbedding_trans_symm_toEmbedding {α β : Sort _} (e : α ≃ β) :
     e.toEmbedding.trans e.symm.toEmbedding = Embedding.refl _ := by ext; simp
 #align function.embedding.equiv_to_embedding_trans_symm_to_embedding Function.Embedding.equiv_toEmbedding_trans_symm_toEmbedding
 
-/- warning: function.embedding.equiv_symm_to_embedding_trans_to_embedding -> Function.Embedding.equiv_symm_toEmbedding_trans_toEmbedding is a dubious translation:
-lean 3 declaration is
-  forall {α : Sort.{u1}} {β : Sort.{u2}} (e : Equiv.{u1, u2} α β), Eq.{max 1 u2} (Function.Embedding.{u2, u2} β β) (Function.Embedding.trans.{u2, u1, u2} β α β (Equiv.toEmbedding.{u2, u1} β α (Equiv.symm.{u1, u2} α β e)) (Equiv.toEmbedding.{u1, u2} α β e)) (Function.Embedding.refl.{u2} β)
-but is expected to have type
-  forall {α : Sort.{u2}} {β : Sort.{u1}} (e : Equiv.{u2, u1} α β), Eq.{max 1 u1} (Function.Embedding.{u1, u1} β β) (Function.Embedding.trans.{u1, u2, u1} β α β (Equiv.toEmbedding.{u1, u2} β α (Equiv.symm.{u2, u1} α β e)) (Equiv.toEmbedding.{u2, u1} α β e)) (Function.Embedding.refl.{u1} β)
-Case conversion may be inaccurate. Consider using '#align function.embedding.equiv_symm_to_embedding_trans_to_embedding Function.Embedding.equiv_symm_toEmbedding_trans_toEmbeddingₓ'. -/
 @[simp]
 theorem equiv_symm_toEmbedding_trans_toEmbedding {α β : Sort _} (e : α ≃ β) :
     e.symm.toEmbedding.trans e.toEmbedding = Embedding.refl _ := by ext; simp
@@ -300,12 +222,6 @@ def setValue {α β} (f : α ↪ β) (a : α) (b : β) [∀ a', Decidable (a' =
 #align function.embedding.set_value Function.Embedding.setValue
 -/
 
-/- warning: function.embedding.set_value_eq -> Function.Embedding.setValue_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Sort.{u1}} {β : Sort.{u2}} (f : Function.Embedding.{u1, u2} α β) (a : α) (b : β) [_inst_1 : forall (a' : α), Decidable (Eq.{u1} α a' a)] [_inst_2 : forall (a' : α), Decidable (Eq.{u2} β (coeFn.{max 1 (imax u1 u2), imax u1 u2} (Function.Embedding.{u1, u2} α β) (fun (_x : Function.Embedding.{u1, u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{u1, u2} α β) f a') b)], Eq.{u2} β (coeFn.{max 1 (imax u1 u2), imax u1 u2} (Function.Embedding.{u1, u2} α β) (fun (_x : Function.Embedding.{u1, u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{u1, u2} α β) (Function.Embedding.setValue.{u1, u2} α β f a b (fun (a' : α) => _inst_1 a') (fun (a' : α) => _inst_2 a')) a) b
-but is expected to have type
-  forall {α : Sort.{u2}} {β : Sort.{u1}} (f : Function.Embedding.{u2, u1} α β) (a : α) (b : β) [_inst_1 : forall (a' : α), Decidable (Eq.{u2} α a' a)] [_inst_2 : forall (a' : α), Decidable (Eq.{u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) a') (FunLike.coe.{max (max 1 u1) u2, u2, u1} (Function.Embedding.{u2, u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (max 1 u1) u2, u2, u1} (Function.Embedding.{u2, u1} α β) α β (Function.instEmbeddingLikeEmbedding.{u2, u1} α β)) f a') b)], Eq.{u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) a) (FunLike.coe.{max (max 1 u1) u2, u2, u1} (Function.Embedding.{u2, u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (max 1 u1) u2, u2, u1} (Function.Embedding.{u2, u1} α β) α β (Function.instEmbeddingLikeEmbedding.{u2, u1} α β)) (Function.Embedding.setValue.{u2, u1} α β f a b (fun (a' : α) => _inst_1 a') (fun (a' : α) => _inst_2 a')) a) b
-Case conversion may be inaccurate. Consider using '#align function.embedding.set_value_eq Function.Embedding.setValue_eqₓ'. -/
 theorem setValue_eq {α β} (f : α ↪ β) (a : α) (b : β) [∀ a', Decidable (a' = a)]
     [∀ a', Decidable (f a' = b)] : setValue f a b a = b := by simp [set_value]
 #align function.embedding.set_value_eq Function.Embedding.setValue_eq
@@ -394,12 +310,6 @@ def prodMap {α β γ δ : Type _} (e₁ : α ↪ β) (e₂ : γ ↪ δ) : α ×
 #align function.embedding.prod_map Function.Embedding.prodMap
 -/
 
-/- warning: function.embedding.coe_prod_map -> Function.Embedding.coe_prodMap is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u4}} (e₁ : Function.Embedding.{succ u1, succ u2} α β) (e₂ : Function.Embedding.{succ u3, succ u4} γ δ), Eq.{max (max (succ u1) (succ u3)) (succ u2) (succ u4)} ((Prod.{u1, u3} α γ) -> (Prod.{u2, u4} β δ)) (coeFn.{max 1 (max (succ u1) (succ u3)) (succ u2) (succ u4), max (max (succ u1) (succ u3)) (succ u2) (succ u4)} (Function.Embedding.{max (succ u1) (succ u3), max (succ u2) (succ u4)} (Prod.{u1, u3} α γ) (Prod.{u2, u4} β δ)) (fun (_x : Function.Embedding.{max (succ u1) (succ u3), max (succ u2) (succ u4)} (Prod.{u1, u3} α γ) (Prod.{u2, u4} β δ)) => (Prod.{u1, u3} α γ) -> (Prod.{u2, u4} β δ)) (Function.Embedding.hasCoeToFun.{max (succ u1) (succ u3), max (succ u2) (succ u4)} (Prod.{u1, u3} α γ) (Prod.{u2, u4} β δ)) (Function.Embedding.prodMap.{u1, u2, u3, u4} α β γ δ e₁ e₂)) (Prod.map.{u1, u2, u3, u4} α β γ δ (coeFn.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (fun (_x : Function.Embedding.{succ u1, succ u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{succ u1, succ u2} α β) e₁) (coeFn.{max 1 (succ u3) (succ u4), max (succ u3) (succ u4)} (Function.Embedding.{succ u3, succ u4} γ δ) (fun (_x : Function.Embedding.{succ u3, succ u4} γ δ) => γ -> δ) (Function.Embedding.hasCoeToFun.{succ u3, succ u4} γ δ) e₂))
-but is expected to have type
-  forall {α : Type.{u4}} {β : Type.{u3}} {γ : Type.{u2}} {δ : Type.{u1}} (e₁ : Function.Embedding.{succ u4, succ u3} α β) (e₂ : Function.Embedding.{succ u2, succ u1} γ δ), Eq.{max (max (max (succ u4) (succ u3)) (succ u2)) (succ u1)} (forall (ᾰ : Prod.{u4, u2} α γ), (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : Prod.{u4, u2} α γ) => Prod.{u3, u1} β δ) ᾰ) (FunLike.coe.{max (max (max (succ u4) (succ u3)) (succ u2)) (succ u1), max (succ u4) (succ u2), max (succ u3) (succ u1)} (Function.Embedding.{max (succ u2) (succ u4), max (succ u1) (succ u3)} (Prod.{u4, u2} α γ) (Prod.{u3, u1} β δ)) (Prod.{u4, u2} α γ) (fun (_x : Prod.{u4, u2} α γ) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : Prod.{u4, u2} α γ) => Prod.{u3, u1} β δ) _x) (EmbeddingLike.toFunLike.{max (max (max (succ u4) (succ u3)) (succ u2)) (succ u1), max (succ u4) (succ u2), max (succ u3) (succ u1)} (Function.Embedding.{max (succ u2) (succ u4), max (succ u1) (succ u3)} (Prod.{u4, u2} α γ) (Prod.{u3, u1} β δ)) (Prod.{u4, u2} α γ) (Prod.{u3, u1} β δ) (Function.instEmbeddingLikeEmbedding.{max (succ u4) (succ u2), max (succ u3) (succ u1)} (Prod.{u4, u2} α γ) (Prod.{u3, u1} β δ))) (Function.Embedding.prodMap.{u4, u3, u2, u1} α β γ δ e₁ e₂)) (Prod.map.{u4, u3, u2, u1} α β γ δ (FunLike.coe.{max (succ u4) (succ u3), succ u4, succ u3} (Function.Embedding.{succ u4, succ u3} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u3), succ u4, succ u3} (Function.Embedding.{succ u4, succ u3} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u4, succ u3} α β)) e₁) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} γ δ) γ (fun (_x : γ) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : γ) => δ) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} γ δ) γ δ (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} γ δ)) e₂))
-Case conversion may be inaccurate. Consider using '#align function.embedding.coe_prod_map Function.Embedding.coe_prodMapₓ'. -/
 @[simp]
 theorem coe_prodMap {α β γ δ : Type _} (e₁ : α ↪ β) (e₂ : γ ↪ δ) :
     ⇑(e₁.Prod_map e₂) = Prod.map e₁ e₂ :=
@@ -427,12 +337,6 @@ def sumMap {α β γ δ : Type _} (e₁ : α ↪ β) (e₂ : γ ↪ δ) : Sum α
 #align function.embedding.sum_map Function.Embedding.sumMap
 -/
 
-/- warning: function.embedding.coe_sum_map -> Function.Embedding.coe_sumMap is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u4}} (e₁ : Function.Embedding.{succ u1, succ u2} α β) (e₂ : Function.Embedding.{succ u3, succ u4} γ δ), Eq.{max (max (succ u1) (succ u3)) (succ u2) (succ u4)} ((Sum.{u1, u3} α γ) -> (Sum.{u2, u4} β δ)) (coeFn.{max 1 (max (succ u1) (succ u3)) (succ u2) (succ u4), max (max (succ u1) (succ u3)) (succ u2) (succ u4)} (Function.Embedding.{max (succ u1) (succ u3), max (succ u2) (succ u4)} (Sum.{u1, u3} α γ) (Sum.{u2, u4} β δ)) (fun (_x : Function.Embedding.{max (succ u1) (succ u3), max (succ u2) (succ u4)} (Sum.{u1, u3} α γ) (Sum.{u2, u4} β δ)) => (Sum.{u1, u3} α γ) -> (Sum.{u2, u4} β δ)) (Function.Embedding.hasCoeToFun.{max (succ u1) (succ u3), max (succ u2) (succ u4)} (Sum.{u1, u3} α γ) (Sum.{u2, u4} β δ)) (Function.Embedding.sumMap.{u1, u2, u3, u4} α β γ δ e₁ e₂)) (Sum.map.{u1, u3, u2, u4} α β γ δ (coeFn.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (fun (_x : Function.Embedding.{succ u1, succ u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{succ u1, succ u2} α β) e₁) (coeFn.{max 1 (succ u3) (succ u4), max (succ u3) (succ u4)} (Function.Embedding.{succ u3, succ u4} γ δ) (fun (_x : Function.Embedding.{succ u3, succ u4} γ δ) => γ -> δ) (Function.Embedding.hasCoeToFun.{succ u3, succ u4} γ δ) e₂))
-but is expected to have type
-  forall {α : Type.{u4}} {β : Type.{u3}} {γ : Type.{u2}} {δ : Type.{u1}} (e₁ : Function.Embedding.{succ u4, succ u3} α β) (e₂ : Function.Embedding.{succ u2, succ u1} γ δ), Eq.{max (max (max (succ u1) (succ u2)) (succ u3)) (succ u4)} (forall (ᾰ : Sum.{u4, u2} α γ), (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : Sum.{u4, u2} α γ) => Sum.{u3, u1} β δ) ᾰ) (FunLike.coe.{max (max (max (succ u1) (succ u2)) (succ u3)) (succ u4), max (succ u2) (succ u4), max (succ u1) (succ u3)} (Function.Embedding.{max (succ u2) (succ u4), max (succ u1) (succ u3)} (Sum.{u4, u2} α γ) (Sum.{u3, u1} β δ)) (Sum.{u4, u2} α γ) (fun (_x : Sum.{u4, u2} α γ) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : Sum.{u4, u2} α γ) => Sum.{u3, u1} β δ) _x) (EmbeddingLike.toFunLike.{max (max (max (succ u1) (succ u2)) (succ u3)) (succ u4), max (succ u2) (succ u4), max (succ u1) (succ u3)} (Function.Embedding.{max (succ u2) (succ u4), max (succ u1) (succ u3)} (Sum.{u4, u2} α γ) (Sum.{u3, u1} β δ)) (Sum.{u4, u2} α γ) (Sum.{u3, u1} β δ) (Function.instEmbeddingLikeEmbedding.{max (succ u2) (succ u4), max (succ u1) (succ u3)} (Sum.{u4, u2} α γ) (Sum.{u3, u1} β δ))) (Function.Embedding.sumMap.{u4, u3, u2, u1} α β γ δ e₁ e₂)) (Sum.map.{u4, u2, u3, u1} α β γ δ (FunLike.coe.{max (succ u3) (succ u4), succ u4, succ u3} (Function.Embedding.{succ u4, succ u3} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u3) (succ u4), succ u4, succ u3} (Function.Embedding.{succ u4, succ u3} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u4, succ u3} α β)) e₁) (FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} γ δ) γ (fun (_x : γ) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : γ) => δ) _x) (EmbeddingLike.toFunLike.{max (succ u1) (succ u2), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} γ δ) γ δ (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} γ δ)) e₂))
-Case conversion may be inaccurate. Consider using '#align function.embedding.coe_sum_map Function.Embedding.coe_sumMapₓ'. -/
 @[simp]
 theorem coe_sumMap {α β γ δ} (e₁ : α ↪ β) (e₂ : γ ↪ δ) : ⇑(sumMap e₁ e₂) = Sum.map e₁ e₂ :=
   rfl
@@ -525,23 +429,11 @@ protected def subtypeMap {α β} {p : α → Prop} {q : β → Prop} (f : α ↪
 
 open Set
 
-/- warning: function.embedding.swap_apply -> Function.Embedding.swap_apply is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] [_inst_2 : DecidableEq.{succ u2} β] (f : Function.Embedding.{succ u1, succ u2} α β) (x : α) (y : α) (z : α), Eq.{succ u2} β (coeFn.{succ u2, succ u2} (Equiv.Perm.{succ u2} β) (fun (_x : Equiv.{succ u2, succ u2} β β) => β -> β) (Equiv.hasCoeToFun.{succ u2, succ u2} β β) (Equiv.swap.{succ u2} β (fun (a : β) (b : β) => _inst_2 a b) (coeFn.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (fun (_x : Function.Embedding.{succ u1, succ u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{succ u1, succ u2} α β) f x) (coeFn.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (fun (_x : Function.Embedding.{succ u1, succ u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{succ u1, succ u2} α β) f y)) (coeFn.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (fun (_x : Function.Embedding.{succ u1, succ u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{succ u1, succ u2} α β) f z)) (coeFn.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (fun (_x : Function.Embedding.{succ u1, succ u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{succ u1, succ u2} α β) f (coeFn.{succ u1, succ u1} (Equiv.Perm.{succ u1} α) (fun (_x : Equiv.{succ u1, succ u1} α α) => α -> α) (Equiv.hasCoeToFun.{succ u1, succ u1} α α) (Equiv.swap.{succ u1} α (fun (a : α) (b : α) => _inst_1 a b) x y) z))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] [_inst_2 : DecidableEq.{succ u1} β] (f : Function.Embedding.{succ u2, succ u1} α β) (x : α) (y : α) (z : α), Eq.{succ u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : β) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (a : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) a) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f z)) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.Perm.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x)) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (fun (_x : β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : β) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x)) (Equiv.swap.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (fun (a : β) (b : β) => _inst_2 a b) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f x) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f y)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f z)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.Perm.{succ u2} α) α (fun (_x : α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : α) => α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} α α) (Equiv.swap.{succ u2} α (fun (a : α) (b : α) => _inst_1 a b) x y) z))
-Case conversion may be inaccurate. Consider using '#align function.embedding.swap_apply Function.Embedding.swap_applyₓ'. -/
 theorem swap_apply {α β : Type _} [DecidableEq α] [DecidableEq β] (f : α ↪ β) (x y z : α) :
     Equiv.swap (f x) (f y) (f z) = f (Equiv.swap x y z) :=
   f.Injective.swap_apply x y z
 #align function.embedding.swap_apply Function.Embedding.swap_apply
 
-/- warning: function.embedding.swap_comp -> Function.Embedding.swap_comp is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] [_inst_2 : DecidableEq.{succ u2} β] (f : Function.Embedding.{succ u1, succ u2} α β) (x : α) (y : α), Eq.{max (succ u1) (succ u2)} (α -> β) (Function.comp.{succ u1, succ u2, succ u2} α β β (coeFn.{succ u2, succ u2} (Equiv.Perm.{succ u2} β) (fun (_x : Equiv.{succ u2, succ u2} β β) => β -> β) (Equiv.hasCoeToFun.{succ u2, succ u2} β β) (Equiv.swap.{succ u2} β (fun (a : β) (b : β) => _inst_2 a b) (coeFn.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (fun (_x : Function.Embedding.{succ u1, succ u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{succ u1, succ u2} α β) f x) (coeFn.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (fun (_x : Function.Embedding.{succ u1, succ u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{succ u1, succ u2} α β) f y))) (coeFn.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (fun (_x : Function.Embedding.{succ u1, succ u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{succ u1, succ u2} α β) f)) (Function.comp.{succ u1, succ u1, succ u2} α α β (coeFn.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (fun (_x : Function.Embedding.{succ u1, succ u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{succ u1, succ u2} α β) f) (coeFn.{succ u1, succ u1} (Equiv.Perm.{succ u1} α) (fun (_x : Equiv.{succ u1, succ u1} α α) => α -> α) (Equiv.hasCoeToFun.{succ u1, succ u1} α α) (Equiv.swap.{succ u1} α (fun (a : α) (b : α) => _inst_1 a b) x y)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] [_inst_2 : DecidableEq.{succ u1} β] (f : Function.Embedding.{succ u2, succ u1} α β) (x : α) (y : α), Eq.{max (succ u2) (succ u1)} (α -> ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x)) (Function.comp.{succ u2, succ u1, succ u1} α ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.Perm.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x)) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (fun (_x : β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : β) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x)) (Equiv.swap.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (fun (a : β) (b : β) => _inst_2 a b) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f x) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f y))) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f)) (Function.comp.{succ u2, succ u2, succ u1} α α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.Perm.{succ u2} α) α (fun (_x : α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : α) => α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} α α) (Equiv.swap.{succ u2} α (fun (a : α) (b : α) => _inst_1 a b) x y)))
-Case conversion may be inaccurate. Consider using '#align function.embedding.swap_comp Function.Embedding.swap_compₓ'. -/
 theorem swap_comp {α β : Type _} [DecidableEq α] [DecidableEq β] (f : α ↪ β) (x y : α) :
     Equiv.swap (f x) (f y) ∘ f = f ∘ Equiv.swap x y :=
   f.Injective.swap_comp x y
@@ -555,12 +447,6 @@ namespace Equiv
 
 open Function.Embedding
 
-/- warning: equiv.subtype_injective_equiv_embedding -> Equiv.subtypeInjectiveEquivEmbedding is a dubious translation:
-lean 3 declaration is
-  forall (α : Sort.{u1}) (β : Sort.{u2}), Equiv.{max 1 (imax u1 u2), max 1 (imax u1 u2)} (Subtype.{imax u1 u2} (α -> β) (fun (f : α -> β) => Function.Injective.{u1, u2} α β f)) (Function.Embedding.{u1, u2} α β)
-but is expected to have type
-  forall (α : Sort.{u1}) (β : Sort.{u2}), Equiv.{max 1 (imax u1 u2), max (max 1 u2) u1} (Subtype.{imax u1 u2} (α -> β) (fun (f : α -> β) => Function.Injective.{u1, u2} α β f)) (Function.Embedding.{u1, u2} α β)
-Case conversion may be inaccurate. Consider using '#align equiv.subtype_injective_equiv_embedding Equiv.subtypeInjectiveEquivEmbeddingₓ'. -/
 /-- The type of embeddings `α ↪ β` is equivalent to
     the subtype of all injective functions `α → β`. -/
 def subtypeInjectiveEquivEmbedding (α β : Sort _) : { f : α → β // Function.Injective f } ≃ (α ↪ β)
@@ -571,12 +457,6 @@ def subtypeInjectiveEquivEmbedding (α β : Sort _) : { f : α → β // Functio
   right_inv f := by ext; rfl
 #align equiv.subtype_injective_equiv_embedding Equiv.subtypeInjectiveEquivEmbedding
 
-/- warning: equiv.embedding_congr -> Equiv.embeddingCongr is a dubious translation:
-lean 3 declaration is
-  forall {α : Sort.{u1}} {β : Sort.{u2}} {γ : Sort.{u3}} {δ : Sort.{u4}}, (Equiv.{u1, u2} α β) -> (Equiv.{u3, u4} γ δ) -> (Equiv.{max 1 (imax u1 u3), max 1 (imax u2 u4)} (Function.Embedding.{u1, u3} α γ) (Function.Embedding.{u2, u4} β δ))
-but is expected to have type
-  forall {α : Sort.{u1}} {β : Sort.{u2}} {γ : Sort.{u3}} {δ : Sort.{u4}}, (Equiv.{u1, u2} α β) -> (Equiv.{u3, u4} γ δ) -> (Equiv.{max (max 1 u3) u1, max (max 1 u4) u2} (Function.Embedding.{u1, u3} α γ) (Function.Embedding.{u2, u4} β δ))
-Case conversion may be inaccurate. Consider using '#align equiv.embedding_congr Equiv.embeddingCongrₓ'. -/
 /-- If `α₁ ≃ α₂` and `β₁ ≃ β₂`, then the type of embeddings `α₁ ↪ β₁`
 is equivalent to the type of embeddings `α₂ ↪ β₂`. -/
 @[congr, simps apply]
@@ -588,23 +468,11 @@ def embeddingCongr {α β γ δ : Sort _} (h : α ≃ β) (h' : γ ≃ δ) : (α
   right_inv x := by ext; simp
 #align equiv.embedding_congr Equiv.embeddingCongr
 
-/- warning: equiv.embedding_congr_refl -> Equiv.embeddingCongr_refl is a dubious translation:
-lean 3 declaration is
-  forall {α : Sort.{u1}} {β : Sort.{u2}}, Eq.{max 1 (imax u1 u2)} (Equiv.{max 1 (imax u1 u2), max 1 (imax u1 u2)} (Function.Embedding.{u1, u2} α β) (Function.Embedding.{u1, u2} α β)) (Equiv.embeddingCongr.{u1, u1, u2, u2} α α β β (Equiv.refl.{u1} α) (Equiv.refl.{u2} β)) (Equiv.refl.{max 1 (imax u1 u2)} (Function.Embedding.{u1, u2} α β))
-but is expected to have type
-  forall {α : Sort.{u2}} {β : Sort.{u1}}, Eq.{max (max 1 u2) u1} (Equiv.{max (max 1 u1) u2, max (max 1 u1) u2} (Function.Embedding.{u2, u1} α β) (Function.Embedding.{u2, u1} α β)) (Equiv.embeddingCongr.{u2, u2, u1, u1} α α β β (Equiv.refl.{u2} α) (Equiv.refl.{u1} β)) (Equiv.refl.{max (max 1 u1) u2} (Function.Embedding.{u2, u1} α β))
-Case conversion may be inaccurate. Consider using '#align equiv.embedding_congr_refl Equiv.embeddingCongr_reflₓ'. -/
 @[simp]
 theorem embeddingCongr_refl {α β : Sort _} :
     embeddingCongr (Equiv.refl α) (Equiv.refl β) = Equiv.refl (α ↪ β) := by ext; rfl
 #align equiv.embedding_congr_refl Equiv.embeddingCongr_refl
 
-/- warning: equiv.embedding_congr_trans -> Equiv.embeddingCongr_trans is a dubious translation:
-lean 3 declaration is
-  forall {α₁ : Sort.{u1}} {β₁ : Sort.{u2}} {α₂ : Sort.{u3}} {β₂ : Sort.{u4}} {α₃ : Sort.{u5}} {β₃ : Sort.{u6}} (e₁ : Equiv.{u1, u3} α₁ α₂) (e₁' : Equiv.{u2, u4} β₁ β₂) (e₂ : Equiv.{u3, u5} α₂ α₃) (e₂' : Equiv.{u4, u6} β₂ β₃), Eq.{max 1 (max (max 1 (imax u1 u2)) 1 (imax u5 u6)) (max 1 (imax u5 u6)) 1 (imax u1 u2)} (Equiv.{max 1 (imax u1 u2), max 1 (imax u5 u6)} (Function.Embedding.{u1, u2} α₁ β₁) (Function.Embedding.{u5, u6} α₃ β₃)) (Equiv.embeddingCongr.{u1, u5, u2, u6} α₁ α₃ β₁ β₃ (Equiv.trans.{u1, u3, u5} α₁ α₂ α₃ e₁ e₂) (Equiv.trans.{u2, u4, u6} β₁ β₂ β₃ e₁' e₂')) (Equiv.trans.{max 1 (imax u1 u2), max 1 (imax u3 u4), max 1 (imax u5 u6)} (Function.Embedding.{u1, u2} α₁ β₁) (Function.Embedding.{u3, u4} α₂ β₂) (Function.Embedding.{u5, u6} α₃ β₃) (Equiv.embeddingCongr.{u1, u3, u2, u4} α₁ α₂ β₁ β₂ e₁ e₁') (Equiv.embeddingCongr.{u3, u5, u4, u6} α₂ α₃ β₂ β₃ e₂ e₂'))
-but is expected to have type
-  forall {α₁ : Sort.{u6}} {β₁ : Sort.{u5}} {α₂ : Sort.{u4}} {β₂ : Sort.{u3}} {α₃ : Sort.{u2}} {β₃ : Sort.{u1}} (e₁ : Equiv.{u6, u4} α₁ α₂) (e₁' : Equiv.{u5, u3} β₁ β₂) (e₂ : Equiv.{u4, u2} α₂ α₃) (e₂' : Equiv.{u3, u1} β₂ β₃), Eq.{max (max (max (max 1 u6) u5) u2) u1} (Equiv.{max (max 1 u5) u6, max (max 1 u1) u2} (Function.Embedding.{u6, u5} α₁ β₁) (Function.Embedding.{u2, u1} α₃ β₃)) (Equiv.embeddingCongr.{u6, u2, u5, u1} α₁ α₃ β₁ β₃ (Equiv.trans.{u6, u4, u2} α₁ α₂ α₃ e₁ e₂) (Equiv.trans.{u5, u3, u1} β₁ β₂ β₃ e₁' e₂')) (Equiv.trans.{max (max 1 u6) u5, max (max 1 u4) u3, max (max 1 u1) u2} (Function.Embedding.{u6, u5} α₁ β₁) (Function.Embedding.{u4, u3} α₂ β₂) (Function.Embedding.{u2, u1} α₃ β₃) (Equiv.embeddingCongr.{u6, u4, u5, u3} α₁ α₂ β₁ β₂ e₁ e₁') (Equiv.embeddingCongr.{u4, u2, u3, u1} α₂ α₃ β₂ β₃ e₂ e₂'))
-Case conversion may be inaccurate. Consider using '#align equiv.embedding_congr_trans Equiv.embeddingCongr_transₓ'. -/
 @[simp]
 theorem embeddingCongr_trans {α₁ β₁ α₂ β₂ α₃ β₃ : Sort _} (e₁ : α₁ ≃ α₂) (e₁' : β₁ ≃ β₂)
     (e₂ : α₂ ≃ α₃) (e₂' : β₂ ≃ β₃) :
@@ -613,24 +481,12 @@ theorem embeddingCongr_trans {α₁ β₁ α₂ β₂ α₃ β₃ : Sort _} (e
   rfl
 #align equiv.embedding_congr_trans Equiv.embeddingCongr_trans
 
-/- warning: equiv.embedding_congr_symm -> Equiv.embeddingCongr_symm is a dubious translation:
-lean 3 declaration is
-  forall {α₁ : Sort.{u1}} {β₁ : Sort.{u2}} {α₂ : Sort.{u3}} {β₂ : Sort.{u4}} (e₁ : Equiv.{u1, u3} α₁ α₂) (e₂ : Equiv.{u2, u4} β₁ β₂), Eq.{max 1 (max (max 1 (imax u3 u4)) 1 (imax u1 u2)) (max 1 (imax u1 u2)) 1 (imax u3 u4)} (Equiv.{max 1 (imax u3 u4), max 1 (imax u1 u2)} (Function.Embedding.{u3, u4} α₂ β₂) (Function.Embedding.{u1, u2} α₁ β₁)) (Equiv.symm.{max 1 (imax u1 u2), max 1 (imax u3 u4)} (Function.Embedding.{u1, u2} α₁ β₁) (Function.Embedding.{u3, u4} α₂ β₂) (Equiv.embeddingCongr.{u1, u3, u2, u4} α₁ α₂ β₁ β₂ e₁ e₂)) (Equiv.embeddingCongr.{u3, u1, u4, u2} α₂ α₁ β₂ β₁ (Equiv.symm.{u1, u3} α₁ α₂ e₁) (Equiv.symm.{u2, u4} β₁ β₂ e₂))
-but is expected to have type
-  forall {α₁ : Sort.{u4}} {β₁ : Sort.{u3}} {α₂ : Sort.{u2}} {β₂ : Sort.{u1}} (e₁ : Equiv.{u4, u2} α₁ α₂) (e₂ : Equiv.{u3, u1} β₁ β₂), Eq.{max (max (max (max 1 u4) u3) u2) u1} (Equiv.{max (max 1 u2) u1, max (max 1 u4) u3} (Function.Embedding.{u2, u1} α₂ β₂) (Function.Embedding.{u4, u3} α₁ β₁)) (Equiv.symm.{max (max 1 u4) u3, max (max 1 u2) u1} (Function.Embedding.{u4, u3} α₁ β₁) (Function.Embedding.{u2, u1} α₂ β₂) (Equiv.embeddingCongr.{u4, u2, u3, u1} α₁ α₂ β₁ β₂ e₁ e₂)) (Equiv.embeddingCongr.{u2, u4, u1, u3} α₂ α₁ β₂ β₁ (Equiv.symm.{u4, u2} α₁ α₂ e₁) (Equiv.symm.{u3, u1} β₁ β₂ e₂))
-Case conversion may be inaccurate. Consider using '#align equiv.embedding_congr_symm Equiv.embeddingCongr_symmₓ'. -/
 @[simp]
 theorem embeddingCongr_symm {α₁ β₁ α₂ β₂ : Sort _} (e₁ : α₁ ≃ α₂) (e₂ : β₁ ≃ β₂) :
     (embeddingCongr e₁ e₂).symm = embeddingCongr e₁.symm e₂.symm :=
   rfl
 #align equiv.embedding_congr_symm Equiv.embeddingCongr_symm
 
-/- warning: equiv.embedding_congr_apply_trans -> Equiv.embeddingCongr_apply_trans is a dubious translation:
-lean 3 declaration is
-  forall {α₁ : Sort.{u1}} {β₁ : Sort.{u2}} {γ₁ : Sort.{u3}} {α₂ : Sort.{u4}} {β₂ : Sort.{u5}} {γ₂ : Sort.{u6}} (ea : Equiv.{u1, u4} α₁ α₂) (eb : Equiv.{u2, u5} β₁ β₂) (ec : Equiv.{u3, u6} γ₁ γ₂) (f : Function.Embedding.{u1, u2} α₁ β₁) (g : Function.Embedding.{u2, u3} β₁ γ₁), Eq.{max 1 (imax u4 u6)} (Function.Embedding.{u4, u6} α₂ γ₂) (coeFn.{max 1 (max (max 1 (imax u1 u3)) 1 (imax u4 u6)) (max 1 (imax u4 u6)) 1 (imax u1 u3), max (max 1 (imax u1 u3)) 1 (imax u4 u6)} (Equiv.{max 1 (imax u1 u3), max 1 (imax u4 u6)} (Function.Embedding.{u1, u3} α₁ γ₁) (Function.Embedding.{u4, u6} α₂ γ₂)) (fun (_x : Equiv.{max 1 (imax u1 u3), max 1 (imax u4 u6)} (Function.Embedding.{u1, u3} α₁ γ₁) (Function.Embedding.{u4, u6} α₂ γ₂)) => (Function.Embedding.{u1, u3} α₁ γ₁) -> (Function.Embedding.{u4, u6} α₂ γ₂)) (Equiv.hasCoeToFun.{max 1 (imax u1 u3), max 1 (imax u4 u6)} (Function.Embedding.{u1, u3} α₁ γ₁) (Function.Embedding.{u4, u6} α₂ γ₂)) (Equiv.embeddingCongr.{u1, u4, u3, u6} α₁ α₂ γ₁ γ₂ ea ec) (Function.Embedding.trans.{u1, u2, u3} α₁ β₁ γ₁ f g)) (Function.Embedding.trans.{u4, u5, u6} α₂ β₂ γ₂ (coeFn.{max 1 (max (max 1 (imax u1 u2)) 1 (imax u4 u5)) (max 1 (imax u4 u5)) 1 (imax u1 u2), max (max 1 (imax u1 u2)) 1 (imax u4 u5)} (Equiv.{max 1 (imax u1 u2), max 1 (imax u4 u5)} (Function.Embedding.{u1, u2} α₁ β₁) (Function.Embedding.{u4, u5} α₂ β₂)) (fun (_x : Equiv.{max 1 (imax u1 u2), max 1 (imax u4 u5)} (Function.Embedding.{u1, u2} α₁ β₁) (Function.Embedding.{u4, u5} α₂ β₂)) => (Function.Embedding.{u1, u2} α₁ β₁) -> (Function.Embedding.{u4, u5} α₂ β₂)) (Equiv.hasCoeToFun.{max 1 (imax u1 u2), max 1 (imax u4 u5)} (Function.Embedding.{u1, u2} α₁ β₁) (Function.Embedding.{u4, u5} α₂ β₂)) (Equiv.embeddingCongr.{u1, u4, u2, u5} α₁ α₂ β₁ β₂ ea eb) f) (coeFn.{max 1 (max (max 1 (imax u2 u3)) 1 (imax u5 u6)) (max 1 (imax u5 u6)) 1 (imax u2 u3), max (max 1 (imax u2 u3)) 1 (imax u5 u6)} (Equiv.{max 1 (imax u2 u3), max 1 (imax u5 u6)} (Function.Embedding.{u2, u3} β₁ γ₁) (Function.Embedding.{u5, u6} β₂ γ₂)) (fun (_x : Equiv.{max 1 (imax u2 u3), max 1 (imax u5 u6)} (Function.Embedding.{u2, u3} β₁ γ₁) (Function.Embedding.{u5, u6} β₂ γ₂)) => (Function.Embedding.{u2, u3} β₁ γ₁) -> (Function.Embedding.{u5, u6} β₂ γ₂)) (Equiv.hasCoeToFun.{max 1 (imax u2 u3), max 1 (imax u5 u6)} (Function.Embedding.{u2, u3} β₁ γ₁) (Function.Embedding.{u5, u6} β₂ γ₂)) (Equiv.embeddingCongr.{u2, u5, u3, u6} β₁ β₂ γ₁ γ₂ eb ec) g))
-but is expected to have type
-  forall {α₁ : Sort.{u6}} {β₁ : Sort.{u5}} {γ₁ : Sort.{u4}} {α₂ : Sort.{u3}} {β₂ : Sort.{u2}} {γ₂ : Sort.{u1}} (ea : Equiv.{u6, u3} α₁ α₂) (eb : Equiv.{u5, u2} β₁ β₂) (ec : Equiv.{u4, u1} γ₁ γ₂) (f : Function.Embedding.{u6, u5} α₁ β₁) (g : Function.Embedding.{u5, u4} β₁ γ₁), Eq.{max (max 1 u3) u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Function.Embedding.{u6, u4} α₁ γ₁) => Function.Embedding.{u3, u1} α₂ γ₂) (Function.Embedding.trans.{u6, u5, u4} α₁ β₁ γ₁ f g)) (FunLike.coe.{max (max (max (max 1 u6) u4) u3) u1, max (max 1 u6) u4, max (max 1 u3) u1} (Equiv.{max (max 1 u4) u6, max (max 1 u1) u3} (Function.Embedding.{u6, u4} α₁ γ₁) (Function.Embedding.{u3, u1} α₂ γ₂)) (Function.Embedding.{u6, u4} α₁ γ₁) (fun (_x : Function.Embedding.{u6, u4} α₁ γ₁) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Function.Embedding.{u6, u4} α₁ γ₁) => Function.Embedding.{u3, u1} α₂ γ₂) _x) (Equiv.instFunLikeEquiv.{max (max 1 u6) u4, max (max 1 u3) u1} (Function.Embedding.{u6, u4} α₁ γ₁) (Function.Embedding.{u3, u1} α₂ γ₂)) (Equiv.embeddingCongr.{u6, u3, u4, u1} α₁ α₂ γ₁ γ₂ ea ec) (Function.Embedding.trans.{u6, u5, u4} α₁ β₁ γ₁ f g)) (Function.Embedding.trans.{u3, u2, u1} α₂ β₂ γ₂ (FunLike.coe.{max (max (max (max 1 u6) u5) u3) u2, max (max 1 u6) u5, max (max 1 u3) u2} (Equiv.{max (max 1 u5) u6, max (max 1 u2) u3} (Function.Embedding.{u6, u5} α₁ β₁) (Function.Embedding.{u3, u2} α₂ β₂)) (Function.Embedding.{u6, u5} α₁ β₁) (fun (_x : Function.Embedding.{u6, u5} α₁ β₁) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Function.Embedding.{u6, u5} α₁ β₁) => Function.Embedding.{u3, u2} α₂ β₂) _x) (Equiv.instFunLikeEquiv.{max (max 1 u6) u5, max (max 1 u3) u2} (Function.Embedding.{u6, u5} α₁ β₁) (Function.Embedding.{u3, u2} α₂ β₂)) (Equiv.embeddingCongr.{u6, u3, u5, u2} α₁ α₂ β₁ β₂ ea eb) f) (FunLike.coe.{max (max (max (max 1 u5) u4) u2) u1, max (max 1 u5) u4, max (max 1 u2) u1} (Equiv.{max (max 1 u4) u5, max (max 1 u1) u2} (Function.Embedding.{u5, u4} β₁ γ₁) (Function.Embedding.{u2, u1} β₂ γ₂)) (Function.Embedding.{u5, u4} β₁ γ₁) (fun (_x : Function.Embedding.{u5, u4} β₁ γ₁) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Function.Embedding.{u5, u4} β₁ γ₁) => Function.Embedding.{u2, u1} β₂ γ₂) _x) (Equiv.instFunLikeEquiv.{max (max 1 u5) u4, max (max 1 u2) u1} (Function.Embedding.{u5, u4} β₁ γ₁) (Function.Embedding.{u2, u1} β₂ γ₂)) (Equiv.embeddingCongr.{u5, u2, u4, u1} β₁ β₂ γ₁ γ₂ eb ec) g))
-Case conversion may be inaccurate. Consider using '#align equiv.embedding_congr_apply_trans Equiv.embeddingCongr_apply_transₓ'. -/
 theorem embeddingCongr_apply_trans {α₁ β₁ γ₁ α₂ β₂ γ₂ : Sort _} (ea : α₁ ≃ α₂) (eb : β₁ ≃ β₂)
     (ec : γ₁ ≃ γ₂) (f : α₁ ↪ β₁) (g : β₁ ↪ γ₁) :
     Equiv.embeddingCongr ea ec (f.trans g) =
@@ -645,12 +501,6 @@ theorem refl_toEmbedding {α : Type _} : (Equiv.refl α).toEmbedding = Function.
 #align equiv.refl_to_embedding Equiv.refl_toEmbedding
 -/
 
-/- warning: equiv.trans_to_embedding -> Equiv.trans_toEmbedding is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (e : Equiv.{succ u1, succ u2} α β) (f : Equiv.{succ u2, succ u3} β γ), Eq.{max 1 (succ u1) (succ u3)} (Function.Embedding.{succ u1, succ u3} α γ) (Equiv.toEmbedding.{succ u1, succ u3} α γ (Equiv.trans.{succ u1, succ u2, succ u3} α β γ e f)) (Function.Embedding.trans.{succ u1, succ u2, succ u3} α β γ (Equiv.toEmbedding.{succ u1, succ u2} α β e) (Equiv.toEmbedding.{succ u2, succ u3} β γ f))
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u2}} {γ : Type.{u1}} (e : Equiv.{succ u3, succ u2} α β) (f : Equiv.{succ u2, succ u1} β γ), Eq.{max (succ u3) (succ u1)} (Function.Embedding.{succ u3, succ u1} α γ) (Equiv.toEmbedding.{succ u3, succ u1} α γ (Equiv.trans.{succ u3, succ u2, succ u1} α β γ e f)) (Function.Embedding.trans.{succ u3, succ u2, succ u1} α β γ (Equiv.toEmbedding.{succ u3, succ u2} α β e) (Equiv.toEmbedding.{succ u2, succ u1} β γ f))
-Case conversion may be inaccurate. Consider using '#align equiv.trans_to_embedding Equiv.trans_toEmbeddingₓ'. -/
 @[simp]
 theorem trans_toEmbedding {α β γ : Type _} (e : α ≃ β) (f : β ≃ γ) :
     (e.trans f).toEmbedding = e.toEmbedding.trans f.toEmbedding :=
Diff
@@ -53,10 +53,7 @@ instance {α : Sort u} {β : Sort v} : EmbeddingLike (α ↪ β) α β
     where
   coe := Embedding.toFun
   injective' := Embedding.inj'
-  coe_injective' f g h := by
-    cases f
-    cases g
-    congr
+  coe_injective' f g h := by cases f; cases g; congr
 
 instance {α β : Sort _} : CanLift (α → β) (α ↪ β) coeFn Injective where prf f hf := ⟨⟨f, hf⟩, rfl⟩
 
@@ -199,10 +196,7 @@ but is expected to have type
   forall {α : Type.{u2}} {β : Type.{u1}} (f : Function.Embedding.{succ u2, succ u1} α β) (inj : Function.Injective.{succ u2, succ u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f)), Eq.{max (succ u2) (succ u1)} (Function.Embedding.{succ u2, succ u1} α β) (Function.Embedding.mk.{succ u2, succ u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f) inj) f
 Case conversion may be inaccurate. Consider using '#align function.embedding.mk_coe Function.Embedding.mk_coeₓ'. -/
 @[simp]
-theorem mk_coe {α β : Type _} (f : α ↪ β) (inj) : (⟨f, inj⟩ : α ↪ β) = f :=
-  by
-  ext
-  simp
+theorem mk_coe {α β : Type _} (f : α ↪ β) (inj) : (⟨f, inj⟩ : α ↪ β) = f := by ext; simp
 #align function.embedding.mk_coe Function.Embedding.mk_coe
 
 /- warning: function.embedding.injective -> Function.Embedding.injective is a dubious translation:
@@ -249,10 +243,7 @@ but is expected to have type
 Case conversion may be inaccurate. Consider using '#align function.embedding.equiv_to_embedding_trans_symm_to_embedding Function.Embedding.equiv_toEmbedding_trans_symm_toEmbeddingₓ'. -/
 @[simp]
 theorem equiv_toEmbedding_trans_symm_toEmbedding {α β : Sort _} (e : α ≃ β) :
-    e.toEmbedding.trans e.symm.toEmbedding = Embedding.refl _ :=
-  by
-  ext
-  simp
+    e.toEmbedding.trans e.symm.toEmbedding = Embedding.refl _ := by ext; simp
 #align function.embedding.equiv_to_embedding_trans_symm_to_embedding Function.Embedding.equiv_toEmbedding_trans_symm_toEmbedding
 
 /- warning: function.embedding.equiv_symm_to_embedding_trans_to_embedding -> Function.Embedding.equiv_symm_toEmbedding_trans_toEmbedding is a dubious translation:
@@ -263,10 +254,7 @@ but is expected to have type
 Case conversion may be inaccurate. Consider using '#align function.embedding.equiv_symm_to_embedding_trans_to_embedding Function.Embedding.equiv_symm_toEmbedding_trans_toEmbeddingₓ'. -/
 @[simp]
 theorem equiv_symm_toEmbedding_trans_toEmbedding {α β : Sort _} (e : α ≃ β) :
-    e.symm.toEmbedding.trans e.toEmbedding = Embedding.refl _ :=
-  by
-  ext
-  simp
+    e.symm.toEmbedding.trans e.toEmbedding = Embedding.refl _ := by ext; simp
 #align function.embedding.equiv_symm_to_embedding_trans_to_embedding Function.Embedding.equiv_symm_toEmbedding_trans_toEmbedding
 
 #print Function.Embedding.congr /-
@@ -379,9 +367,7 @@ theorem coe_quotientOut (α) [s : Setoid α] : ⇑(quotientOut α) = Quotient.ou
 #print Function.Embedding.punit /-
 /-- Choosing an element `b : β` gives an embedding of `punit` into `β`. -/
 def punit {β : Sort _} (b : β) : PUnit ↪ β :=
-  ⟨fun _ => b, by
-    rintro ⟨⟩ ⟨⟩ _
-    rfl⟩
+  ⟨fun _ => b, by rintro ⟨⟩ ⟨⟩ _; rfl⟩
 #align function.embedding.punit Function.Embedding.punit
 -/
 
@@ -582,9 +568,7 @@ def subtypeInjectiveEquivEmbedding (α β : Sort _) : { f : α → β // Functio
   toFun f := ⟨f.val, f.property⟩
   invFun f := ⟨f, f.Injective⟩
   left_inv f := by simp
-  right_inv f := by
-    ext
-    rfl
+  right_inv f := by ext; rfl
 #align equiv.subtype_injective_equiv_embedding Equiv.subtypeInjectiveEquivEmbedding
 
 /- warning: equiv.embedding_congr -> Equiv.embeddingCongr is a dubious translation:
@@ -600,12 +584,8 @@ def embeddingCongr {α β γ δ : Sort _} (h : α ≃ β) (h' : γ ≃ δ) : (α
     where
   toFun f := f.congr h h'
   invFun f := f.congr h.symm h'.symm
-  left_inv x := by
-    ext
-    simp
-  right_inv x := by
-    ext
-    simp
+  left_inv x := by ext; simp
+  right_inv x := by ext; simp
 #align equiv.embedding_congr Equiv.embeddingCongr
 
 /- warning: equiv.embedding_congr_refl -> Equiv.embeddingCongr_refl is a dubious translation:
@@ -616,10 +596,7 @@ but is expected to have type
 Case conversion may be inaccurate. Consider using '#align equiv.embedding_congr_refl Equiv.embeddingCongr_reflₓ'. -/
 @[simp]
 theorem embeddingCongr_refl {α β : Sort _} :
-    embeddingCongr (Equiv.refl α) (Equiv.refl β) = Equiv.refl (α ↪ β) :=
-  by
-  ext
-  rfl
+    embeddingCongr (Equiv.refl α) (Equiv.refl β) = Equiv.refl (α ↪ β) := by ext; rfl
 #align equiv.embedding_congr_refl Equiv.embeddingCongr_refl
 
 /- warning: equiv.embedding_congr_trans -> Equiv.embeddingCongr_trans is a dubious translation:
@@ -658,9 +635,7 @@ theorem embeddingCongr_apply_trans {α₁ β₁ γ₁ α₂ β₂ γ₂ : Sort _
     (ec : γ₁ ≃ γ₂) (f : α₁ ↪ β₁) (g : β₁ ↪ γ₁) :
     Equiv.embeddingCongr ea ec (f.trans g) =
       (Equiv.embeddingCongr ea eb f).trans (Equiv.embeddingCongr eb ec g) :=
-  by
-  ext
-  simp
+  by ext; simp
 #align equiv.embedding_congr_apply_trans Equiv.embeddingCongr_apply_trans
 
 #print Equiv.refl_toEmbedding /-
Diff
@@ -543,7 +543,7 @@ open Set
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] [_inst_2 : DecidableEq.{succ u2} β] (f : Function.Embedding.{succ u1, succ u2} α β) (x : α) (y : α) (z : α), Eq.{succ u2} β (coeFn.{succ u2, succ u2} (Equiv.Perm.{succ u2} β) (fun (_x : Equiv.{succ u2, succ u2} β β) => β -> β) (Equiv.hasCoeToFun.{succ u2, succ u2} β β) (Equiv.swap.{succ u2} β (fun (a : β) (b : β) => _inst_2 a b) (coeFn.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (fun (_x : Function.Embedding.{succ u1, succ u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{succ u1, succ u2} α β) f x) (coeFn.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (fun (_x : Function.Embedding.{succ u1, succ u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{succ u1, succ u2} α β) f y)) (coeFn.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (fun (_x : Function.Embedding.{succ u1, succ u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{succ u1, succ u2} α β) f z)) (coeFn.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (fun (_x : Function.Embedding.{succ u1, succ u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{succ u1, succ u2} α β) f (coeFn.{succ u1, succ u1} (Equiv.Perm.{succ u1} α) (fun (_x : Equiv.{succ u1, succ u1} α α) => α -> α) (Equiv.hasCoeToFun.{succ u1, succ u1} α α) (Equiv.swap.{succ u1} α (fun (a : α) (b : α) => _inst_1 a b) x y) z))
 but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] [_inst_2 : DecidableEq.{succ u1} β] (f : Function.Embedding.{succ u2, succ u1} α β) (x : α) (y : α) (z : α), Eq.{succ u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : β) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (a : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) a) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f z)) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.Perm.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x)) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (fun (_x : β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : β) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x)) (Equiv.swap.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (fun (a : β) (b : β) => _inst_2 a b) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f x) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f y)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f z)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.Perm.{succ u2} α) α (fun (_x : α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : α) => α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} α α) (Equiv.swap.{succ u2} α (fun (a : α) (b : α) => _inst_1 a b) x y) z))
+  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] [_inst_2 : DecidableEq.{succ u1} β] (f : Function.Embedding.{succ u2, succ u1} α β) (x : α) (y : α) (z : α), Eq.{succ u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : β) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (a : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) a) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f z)) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.Perm.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x)) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (fun (_x : β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : β) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x)) (Equiv.swap.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (fun (a : β) (b : β) => _inst_2 a b) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f x) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f y)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f z)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.Perm.{succ u2} α) α (fun (_x : α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : α) => α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} α α) (Equiv.swap.{succ u2} α (fun (a : α) (b : α) => _inst_1 a b) x y) z))
 Case conversion may be inaccurate. Consider using '#align function.embedding.swap_apply Function.Embedding.swap_applyₓ'. -/
 theorem swap_apply {α β : Type _} [DecidableEq α] [DecidableEq β] (f : α ↪ β) (x y z : α) :
     Equiv.swap (f x) (f y) (f z) = f (Equiv.swap x y z) :=
@@ -554,7 +554,7 @@ theorem swap_apply {α β : Type _} [DecidableEq α] [DecidableEq β] (f : α 
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] [_inst_2 : DecidableEq.{succ u2} β] (f : Function.Embedding.{succ u1, succ u2} α β) (x : α) (y : α), Eq.{max (succ u1) (succ u2)} (α -> β) (Function.comp.{succ u1, succ u2, succ u2} α β β (coeFn.{succ u2, succ u2} (Equiv.Perm.{succ u2} β) (fun (_x : Equiv.{succ u2, succ u2} β β) => β -> β) (Equiv.hasCoeToFun.{succ u2, succ u2} β β) (Equiv.swap.{succ u2} β (fun (a : β) (b : β) => _inst_2 a b) (coeFn.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (fun (_x : Function.Embedding.{succ u1, succ u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{succ u1, succ u2} α β) f x) (coeFn.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (fun (_x : Function.Embedding.{succ u1, succ u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{succ u1, succ u2} α β) f y))) (coeFn.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (fun (_x : Function.Embedding.{succ u1, succ u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{succ u1, succ u2} α β) f)) (Function.comp.{succ u1, succ u1, succ u2} α α β (coeFn.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (fun (_x : Function.Embedding.{succ u1, succ u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{succ u1, succ u2} α β) f) (coeFn.{succ u1, succ u1} (Equiv.Perm.{succ u1} α) (fun (_x : Equiv.{succ u1, succ u1} α α) => α -> α) (Equiv.hasCoeToFun.{succ u1, succ u1} α α) (Equiv.swap.{succ u1} α (fun (a : α) (b : α) => _inst_1 a b) x y)))
 but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] [_inst_2 : DecidableEq.{succ u1} β] (f : Function.Embedding.{succ u2, succ u1} α β) (x : α) (y : α), Eq.{max (succ u2) (succ u1)} (α -> ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x)) (Function.comp.{succ u2, succ u1, succ u1} α ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.Perm.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x)) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (fun (_x : β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : β) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x)) (Equiv.swap.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (fun (a : β) (b : β) => _inst_2 a b) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f x) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f y))) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f)) (Function.comp.{succ u2, succ u2, succ u1} α α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.Perm.{succ u2} α) α (fun (_x : α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : α) => α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} α α) (Equiv.swap.{succ u2} α (fun (a : α) (b : α) => _inst_1 a b) x y)))
+  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] [_inst_2 : DecidableEq.{succ u1} β] (f : Function.Embedding.{succ u2, succ u1} α β) (x : α) (y : α), Eq.{max (succ u2) (succ u1)} (α -> ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x)) (Function.comp.{succ u2, succ u1, succ u1} α ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.Perm.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x)) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (fun (_x : β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : β) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x)) (Equiv.swap.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (fun (a : β) (b : β) => _inst_2 a b) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f x) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f y))) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f)) (Function.comp.{succ u2, succ u2, succ u1} α α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.Perm.{succ u2} α) α (fun (_x : α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : α) => α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} α α) (Equiv.swap.{succ u2} α (fun (a : α) (b : α) => _inst_1 a b) x y)))
 Case conversion may be inaccurate. Consider using '#align function.embedding.swap_comp Function.Embedding.swap_compₓ'. -/
 theorem swap_comp {α β : Type _} [DecidableEq α] [DecidableEq β] (f : α ↪ β) (x y : α) :
     Equiv.swap (f x) (f y) ∘ f = f ∘ Equiv.swap x y :=
@@ -652,7 +652,7 @@ theorem embeddingCongr_symm {α₁ β₁ α₂ β₂ : Sort _} (e₁ : α₁ ≃
 lean 3 declaration is
   forall {α₁ : Sort.{u1}} {β₁ : Sort.{u2}} {γ₁ : Sort.{u3}} {α₂ : Sort.{u4}} {β₂ : Sort.{u5}} {γ₂ : Sort.{u6}} (ea : Equiv.{u1, u4} α₁ α₂) (eb : Equiv.{u2, u5} β₁ β₂) (ec : Equiv.{u3, u6} γ₁ γ₂) (f : Function.Embedding.{u1, u2} α₁ β₁) (g : Function.Embedding.{u2, u3} β₁ γ₁), Eq.{max 1 (imax u4 u6)} (Function.Embedding.{u4, u6} α₂ γ₂) (coeFn.{max 1 (max (max 1 (imax u1 u3)) 1 (imax u4 u6)) (max 1 (imax u4 u6)) 1 (imax u1 u3), max (max 1 (imax u1 u3)) 1 (imax u4 u6)} (Equiv.{max 1 (imax u1 u3), max 1 (imax u4 u6)} (Function.Embedding.{u1, u3} α₁ γ₁) (Function.Embedding.{u4, u6} α₂ γ₂)) (fun (_x : Equiv.{max 1 (imax u1 u3), max 1 (imax u4 u6)} (Function.Embedding.{u1, u3} α₁ γ₁) (Function.Embedding.{u4, u6} α₂ γ₂)) => (Function.Embedding.{u1, u3} α₁ γ₁) -> (Function.Embedding.{u4, u6} α₂ γ₂)) (Equiv.hasCoeToFun.{max 1 (imax u1 u3), max 1 (imax u4 u6)} (Function.Embedding.{u1, u3} α₁ γ₁) (Function.Embedding.{u4, u6} α₂ γ₂)) (Equiv.embeddingCongr.{u1, u4, u3, u6} α₁ α₂ γ₁ γ₂ ea ec) (Function.Embedding.trans.{u1, u2, u3} α₁ β₁ γ₁ f g)) (Function.Embedding.trans.{u4, u5, u6} α₂ β₂ γ₂ (coeFn.{max 1 (max (max 1 (imax u1 u2)) 1 (imax u4 u5)) (max 1 (imax u4 u5)) 1 (imax u1 u2), max (max 1 (imax u1 u2)) 1 (imax u4 u5)} (Equiv.{max 1 (imax u1 u2), max 1 (imax u4 u5)} (Function.Embedding.{u1, u2} α₁ β₁) (Function.Embedding.{u4, u5} α₂ β₂)) (fun (_x : Equiv.{max 1 (imax u1 u2), max 1 (imax u4 u5)} (Function.Embedding.{u1, u2} α₁ β₁) (Function.Embedding.{u4, u5} α₂ β₂)) => (Function.Embedding.{u1, u2} α₁ β₁) -> (Function.Embedding.{u4, u5} α₂ β₂)) (Equiv.hasCoeToFun.{max 1 (imax u1 u2), max 1 (imax u4 u5)} (Function.Embedding.{u1, u2} α₁ β₁) (Function.Embedding.{u4, u5} α₂ β₂)) (Equiv.embeddingCongr.{u1, u4, u2, u5} α₁ α₂ β₁ β₂ ea eb) f) (coeFn.{max 1 (max (max 1 (imax u2 u3)) 1 (imax u5 u6)) (max 1 (imax u5 u6)) 1 (imax u2 u3), max (max 1 (imax u2 u3)) 1 (imax u5 u6)} (Equiv.{max 1 (imax u2 u3), max 1 (imax u5 u6)} (Function.Embedding.{u2, u3} β₁ γ₁) (Function.Embedding.{u5, u6} β₂ γ₂)) (fun (_x : Equiv.{max 1 (imax u2 u3), max 1 (imax u5 u6)} (Function.Embedding.{u2, u3} β₁ γ₁) (Function.Embedding.{u5, u6} β₂ γ₂)) => (Function.Embedding.{u2, u3} β₁ γ₁) -> (Function.Embedding.{u5, u6} β₂ γ₂)) (Equiv.hasCoeToFun.{max 1 (imax u2 u3), max 1 (imax u5 u6)} (Function.Embedding.{u2, u3} β₁ γ₁) (Function.Embedding.{u5, u6} β₂ γ₂)) (Equiv.embeddingCongr.{u2, u5, u3, u6} β₁ β₂ γ₁ γ₂ eb ec) g))
 but is expected to have type
-  forall {α₁ : Sort.{u6}} {β₁ : Sort.{u5}} {γ₁ : Sort.{u4}} {α₂ : Sort.{u3}} {β₂ : Sort.{u2}} {γ₂ : Sort.{u1}} (ea : Equiv.{u6, u3} α₁ α₂) (eb : Equiv.{u5, u2} β₁ β₂) (ec : Equiv.{u4, u1} γ₁ γ₂) (f : Function.Embedding.{u6, u5} α₁ β₁) (g : Function.Embedding.{u5, u4} β₁ γ₁), Eq.{max (max 1 u3) u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Function.Embedding.{u6, u4} α₁ γ₁) => Function.Embedding.{u3, u1} α₂ γ₂) (Function.Embedding.trans.{u6, u5, u4} α₁ β₁ γ₁ f g)) (FunLike.coe.{max (max (max (max 1 u6) u4) u3) u1, max (max 1 u6) u4, max (max 1 u3) u1} (Equiv.{max (max 1 u4) u6, max (max 1 u1) u3} (Function.Embedding.{u6, u4} α₁ γ₁) (Function.Embedding.{u3, u1} α₂ γ₂)) (Function.Embedding.{u6, u4} α₁ γ₁) (fun (_x : Function.Embedding.{u6, u4} α₁ γ₁) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Function.Embedding.{u6, u4} α₁ γ₁) => Function.Embedding.{u3, u1} α₂ γ₂) _x) (Equiv.instFunLikeEquiv.{max (max 1 u6) u4, max (max 1 u3) u1} (Function.Embedding.{u6, u4} α₁ γ₁) (Function.Embedding.{u3, u1} α₂ γ₂)) (Equiv.embeddingCongr.{u6, u3, u4, u1} α₁ α₂ γ₁ γ₂ ea ec) (Function.Embedding.trans.{u6, u5, u4} α₁ β₁ γ₁ f g)) (Function.Embedding.trans.{u3, u2, u1} α₂ β₂ γ₂ (FunLike.coe.{max (max (max (max 1 u6) u5) u3) u2, max (max 1 u6) u5, max (max 1 u3) u2} (Equiv.{max (max 1 u5) u6, max (max 1 u2) u3} (Function.Embedding.{u6, u5} α₁ β₁) (Function.Embedding.{u3, u2} α₂ β₂)) (Function.Embedding.{u6, u5} α₁ β₁) (fun (_x : Function.Embedding.{u6, u5} α₁ β₁) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Function.Embedding.{u6, u5} α₁ β₁) => Function.Embedding.{u3, u2} α₂ β₂) _x) (Equiv.instFunLikeEquiv.{max (max 1 u6) u5, max (max 1 u3) u2} (Function.Embedding.{u6, u5} α₁ β₁) (Function.Embedding.{u3, u2} α₂ β₂)) (Equiv.embeddingCongr.{u6, u3, u5, u2} α₁ α₂ β₁ β₂ ea eb) f) (FunLike.coe.{max (max (max (max 1 u5) u4) u2) u1, max (max 1 u5) u4, max (max 1 u2) u1} (Equiv.{max (max 1 u4) u5, max (max 1 u1) u2} (Function.Embedding.{u5, u4} β₁ γ₁) (Function.Embedding.{u2, u1} β₂ γ₂)) (Function.Embedding.{u5, u4} β₁ γ₁) (fun (_x : Function.Embedding.{u5, u4} β₁ γ₁) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Function.Embedding.{u5, u4} β₁ γ₁) => Function.Embedding.{u2, u1} β₂ γ₂) _x) (Equiv.instFunLikeEquiv.{max (max 1 u5) u4, max (max 1 u2) u1} (Function.Embedding.{u5, u4} β₁ γ₁) (Function.Embedding.{u2, u1} β₂ γ₂)) (Equiv.embeddingCongr.{u5, u2, u4, u1} β₁ β₂ γ₁ γ₂ eb ec) g))
+  forall {α₁ : Sort.{u6}} {β₁ : Sort.{u5}} {γ₁ : Sort.{u4}} {α₂ : Sort.{u3}} {β₂ : Sort.{u2}} {γ₂ : Sort.{u1}} (ea : Equiv.{u6, u3} α₁ α₂) (eb : Equiv.{u5, u2} β₁ β₂) (ec : Equiv.{u4, u1} γ₁ γ₂) (f : Function.Embedding.{u6, u5} α₁ β₁) (g : Function.Embedding.{u5, u4} β₁ γ₁), Eq.{max (max 1 u3) u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Function.Embedding.{u6, u4} α₁ γ₁) => Function.Embedding.{u3, u1} α₂ γ₂) (Function.Embedding.trans.{u6, u5, u4} α₁ β₁ γ₁ f g)) (FunLike.coe.{max (max (max (max 1 u6) u4) u3) u1, max (max 1 u6) u4, max (max 1 u3) u1} (Equiv.{max (max 1 u4) u6, max (max 1 u1) u3} (Function.Embedding.{u6, u4} α₁ γ₁) (Function.Embedding.{u3, u1} α₂ γ₂)) (Function.Embedding.{u6, u4} α₁ γ₁) (fun (_x : Function.Embedding.{u6, u4} α₁ γ₁) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Function.Embedding.{u6, u4} α₁ γ₁) => Function.Embedding.{u3, u1} α₂ γ₂) _x) (Equiv.instFunLikeEquiv.{max (max 1 u6) u4, max (max 1 u3) u1} (Function.Embedding.{u6, u4} α₁ γ₁) (Function.Embedding.{u3, u1} α₂ γ₂)) (Equiv.embeddingCongr.{u6, u3, u4, u1} α₁ α₂ γ₁ γ₂ ea ec) (Function.Embedding.trans.{u6, u5, u4} α₁ β₁ γ₁ f g)) (Function.Embedding.trans.{u3, u2, u1} α₂ β₂ γ₂ (FunLike.coe.{max (max (max (max 1 u6) u5) u3) u2, max (max 1 u6) u5, max (max 1 u3) u2} (Equiv.{max (max 1 u5) u6, max (max 1 u2) u3} (Function.Embedding.{u6, u5} α₁ β₁) (Function.Embedding.{u3, u2} α₂ β₂)) (Function.Embedding.{u6, u5} α₁ β₁) (fun (_x : Function.Embedding.{u6, u5} α₁ β₁) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Function.Embedding.{u6, u5} α₁ β₁) => Function.Embedding.{u3, u2} α₂ β₂) _x) (Equiv.instFunLikeEquiv.{max (max 1 u6) u5, max (max 1 u3) u2} (Function.Embedding.{u6, u5} α₁ β₁) (Function.Embedding.{u3, u2} α₂ β₂)) (Equiv.embeddingCongr.{u6, u3, u5, u2} α₁ α₂ β₁ β₂ ea eb) f) (FunLike.coe.{max (max (max (max 1 u5) u4) u2) u1, max (max 1 u5) u4, max (max 1 u2) u1} (Equiv.{max (max 1 u4) u5, max (max 1 u1) u2} (Function.Embedding.{u5, u4} β₁ γ₁) (Function.Embedding.{u2, u1} β₂ γ₂)) (Function.Embedding.{u5, u4} β₁ γ₁) (fun (_x : Function.Embedding.{u5, u4} β₁ γ₁) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Function.Embedding.{u5, u4} β₁ γ₁) => Function.Embedding.{u2, u1} β₂ γ₂) _x) (Equiv.instFunLikeEquiv.{max (max 1 u5) u4, max (max 1 u2) u1} (Function.Embedding.{u5, u4} β₁ γ₁) (Function.Embedding.{u2, u1} β₂ γ₂)) (Equiv.embeddingCongr.{u5, u2, u4, u1} β₁ β₂ γ₁ γ₂ eb ec) g))
 Case conversion may be inaccurate. Consider using '#align equiv.embedding_congr_apply_trans Equiv.embeddingCongr_apply_transₓ'. -/
 theorem embeddingCongr_apply_trans {α₁ β₁ γ₁ α₂ β₂ γ₂ : Sort _} (ea : α₁ ≃ α₂) (eb : β₁ ≃ β₂)
     (ec : γ₁ ≃ γ₂) (f : α₁ ↪ β₁) (g : β₁ ↪ γ₁) :
Diff
@@ -543,7 +543,7 @@ open Set
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] [_inst_2 : DecidableEq.{succ u2} β] (f : Function.Embedding.{succ u1, succ u2} α β) (x : α) (y : α) (z : α), Eq.{succ u2} β (coeFn.{succ u2, succ u2} (Equiv.Perm.{succ u2} β) (fun (_x : Equiv.{succ u2, succ u2} β β) => β -> β) (Equiv.hasCoeToFun.{succ u2, succ u2} β β) (Equiv.swap.{succ u2} β (fun (a : β) (b : β) => _inst_2 a b) (coeFn.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (fun (_x : Function.Embedding.{succ u1, succ u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{succ u1, succ u2} α β) f x) (coeFn.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (fun (_x : Function.Embedding.{succ u1, succ u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{succ u1, succ u2} α β) f y)) (coeFn.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (fun (_x : Function.Embedding.{succ u1, succ u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{succ u1, succ u2} α β) f z)) (coeFn.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (fun (_x : Function.Embedding.{succ u1, succ u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{succ u1, succ u2} α β) f (coeFn.{succ u1, succ u1} (Equiv.Perm.{succ u1} α) (fun (_x : Equiv.{succ u1, succ u1} α α) => α -> α) (Equiv.hasCoeToFun.{succ u1, succ u1} α α) (Equiv.swap.{succ u1} α (fun (a : α) (b : α) => _inst_1 a b) x y) z))
 but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] [_inst_2 : DecidableEq.{succ u1} β] (f : Function.Embedding.{succ u2, succ u1} α β) (x : α) (y : α) (z : α), Eq.{succ u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : β) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (a : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) a) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f z)) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.Perm.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x)) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (fun (_x : β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : β) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x)) (Equiv.swap.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (fun (a : β) (b : β) => _inst_2 a b) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f x) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f y)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f z)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.Perm.{succ u2} α) α (fun (_x : α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : α) => α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} α α) (Equiv.swap.{succ u2} α (fun (a : α) (b : α) => _inst_1 a b) x y) z))
+  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] [_inst_2 : DecidableEq.{succ u1} β] (f : Function.Embedding.{succ u2, succ u1} α β) (x : α) (y : α) (z : α), Eq.{succ u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : β) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (a : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) a) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f z)) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.Perm.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x)) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (fun (_x : β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : β) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x)) (Equiv.swap.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (fun (a : β) (b : β) => _inst_2 a b) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f x) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f y)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f z)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.Perm.{succ u2} α) α (fun (_x : α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : α) => α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} α α) (Equiv.swap.{succ u2} α (fun (a : α) (b : α) => _inst_1 a b) x y) z))
 Case conversion may be inaccurate. Consider using '#align function.embedding.swap_apply Function.Embedding.swap_applyₓ'. -/
 theorem swap_apply {α β : Type _} [DecidableEq α] [DecidableEq β] (f : α ↪ β) (x y z : α) :
     Equiv.swap (f x) (f y) (f z) = f (Equiv.swap x y z) :=
@@ -554,7 +554,7 @@ theorem swap_apply {α β : Type _} [DecidableEq α] [DecidableEq β] (f : α 
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] [_inst_2 : DecidableEq.{succ u2} β] (f : Function.Embedding.{succ u1, succ u2} α β) (x : α) (y : α), Eq.{max (succ u1) (succ u2)} (α -> β) (Function.comp.{succ u1, succ u2, succ u2} α β β (coeFn.{succ u2, succ u2} (Equiv.Perm.{succ u2} β) (fun (_x : Equiv.{succ u2, succ u2} β β) => β -> β) (Equiv.hasCoeToFun.{succ u2, succ u2} β β) (Equiv.swap.{succ u2} β (fun (a : β) (b : β) => _inst_2 a b) (coeFn.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (fun (_x : Function.Embedding.{succ u1, succ u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{succ u1, succ u2} α β) f x) (coeFn.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (fun (_x : Function.Embedding.{succ u1, succ u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{succ u1, succ u2} α β) f y))) (coeFn.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (fun (_x : Function.Embedding.{succ u1, succ u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{succ u1, succ u2} α β) f)) (Function.comp.{succ u1, succ u1, succ u2} α α β (coeFn.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Function.Embedding.{succ u1, succ u2} α β) (fun (_x : Function.Embedding.{succ u1, succ u2} α β) => α -> β) (Function.Embedding.hasCoeToFun.{succ u1, succ u2} α β) f) (coeFn.{succ u1, succ u1} (Equiv.Perm.{succ u1} α) (fun (_x : Equiv.{succ u1, succ u1} α α) => α -> α) (Equiv.hasCoeToFun.{succ u1, succ u1} α α) (Equiv.swap.{succ u1} α (fun (a : α) (b : α) => _inst_1 a b) x y)))
 but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] [_inst_2 : DecidableEq.{succ u1} β] (f : Function.Embedding.{succ u2, succ u1} α β) (x : α) (y : α), Eq.{max (succ u2) (succ u1)} (α -> ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x)) (Function.comp.{succ u2, succ u1, succ u1} α ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.Perm.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x)) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (fun (_x : β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : β) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x)) (Equiv.swap.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (fun (a : β) (b : β) => _inst_2 a b) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f x) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f y))) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f)) (Function.comp.{succ u2, succ u2, succ u1} α α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.Perm.{succ u2} α) α (fun (_x : α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : α) => α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} α α) (Equiv.swap.{succ u2} α (fun (a : α) (b : α) => _inst_1 a b) x y)))
+  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] [_inst_2 : DecidableEq.{succ u1} β] (f : Function.Embedding.{succ u2, succ u1} α β) (x : α) (y : α), Eq.{max (succ u2) (succ u1)} (α -> ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x)) (Function.comp.{succ u2, succ u1, succ u1} α ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.Perm.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x)) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (fun (_x : β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : β) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x)) (Equiv.swap.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (fun (a : β) (b : β) => _inst_2 a b) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f x) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f y))) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f)) (Function.comp.{succ u2, succ u2, succ u1} α α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{max (succ u2) (succ u1), succ u2, succ u1} (Function.Embedding.{succ u2, succ u1} α β) α β (Function.instEmbeddingLikeEmbedding.{succ u2, succ u1} α β)) f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.Perm.{succ u2} α) α (fun (_x : α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : α) => α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} α α) (Equiv.swap.{succ u2} α (fun (a : α) (b : α) => _inst_1 a b) x y)))
 Case conversion may be inaccurate. Consider using '#align function.embedding.swap_comp Function.Embedding.swap_compₓ'. -/
 theorem swap_comp {α β : Type _} [DecidableEq α] [DecidableEq β] (f : α ↪ β) (x y : α) :
     Equiv.swap (f x) (f y) ∘ f = f ∘ Equiv.swap x y :=
@@ -652,7 +652,7 @@ theorem embeddingCongr_symm {α₁ β₁ α₂ β₂ : Sort _} (e₁ : α₁ ≃
 lean 3 declaration is
   forall {α₁ : Sort.{u1}} {β₁ : Sort.{u2}} {γ₁ : Sort.{u3}} {α₂ : Sort.{u4}} {β₂ : Sort.{u5}} {γ₂ : Sort.{u6}} (ea : Equiv.{u1, u4} α₁ α₂) (eb : Equiv.{u2, u5} β₁ β₂) (ec : Equiv.{u3, u6} γ₁ γ₂) (f : Function.Embedding.{u1, u2} α₁ β₁) (g : Function.Embedding.{u2, u3} β₁ γ₁), Eq.{max 1 (imax u4 u6)} (Function.Embedding.{u4, u6} α₂ γ₂) (coeFn.{max 1 (max (max 1 (imax u1 u3)) 1 (imax u4 u6)) (max 1 (imax u4 u6)) 1 (imax u1 u3), max (max 1 (imax u1 u3)) 1 (imax u4 u6)} (Equiv.{max 1 (imax u1 u3), max 1 (imax u4 u6)} (Function.Embedding.{u1, u3} α₁ γ₁) (Function.Embedding.{u4, u6} α₂ γ₂)) (fun (_x : Equiv.{max 1 (imax u1 u3), max 1 (imax u4 u6)} (Function.Embedding.{u1, u3} α₁ γ₁) (Function.Embedding.{u4, u6} α₂ γ₂)) => (Function.Embedding.{u1, u3} α₁ γ₁) -> (Function.Embedding.{u4, u6} α₂ γ₂)) (Equiv.hasCoeToFun.{max 1 (imax u1 u3), max 1 (imax u4 u6)} (Function.Embedding.{u1, u3} α₁ γ₁) (Function.Embedding.{u4, u6} α₂ γ₂)) (Equiv.embeddingCongr.{u1, u4, u3, u6} α₁ α₂ γ₁ γ₂ ea ec) (Function.Embedding.trans.{u1, u2, u3} α₁ β₁ γ₁ f g)) (Function.Embedding.trans.{u4, u5, u6} α₂ β₂ γ₂ (coeFn.{max 1 (max (max 1 (imax u1 u2)) 1 (imax u4 u5)) (max 1 (imax u4 u5)) 1 (imax u1 u2), max (max 1 (imax u1 u2)) 1 (imax u4 u5)} (Equiv.{max 1 (imax u1 u2), max 1 (imax u4 u5)} (Function.Embedding.{u1, u2} α₁ β₁) (Function.Embedding.{u4, u5} α₂ β₂)) (fun (_x : Equiv.{max 1 (imax u1 u2), max 1 (imax u4 u5)} (Function.Embedding.{u1, u2} α₁ β₁) (Function.Embedding.{u4, u5} α₂ β₂)) => (Function.Embedding.{u1, u2} α₁ β₁) -> (Function.Embedding.{u4, u5} α₂ β₂)) (Equiv.hasCoeToFun.{max 1 (imax u1 u2), max 1 (imax u4 u5)} (Function.Embedding.{u1, u2} α₁ β₁) (Function.Embedding.{u4, u5} α₂ β₂)) (Equiv.embeddingCongr.{u1, u4, u2, u5} α₁ α₂ β₁ β₂ ea eb) f) (coeFn.{max 1 (max (max 1 (imax u2 u3)) 1 (imax u5 u6)) (max 1 (imax u5 u6)) 1 (imax u2 u3), max (max 1 (imax u2 u3)) 1 (imax u5 u6)} (Equiv.{max 1 (imax u2 u3), max 1 (imax u5 u6)} (Function.Embedding.{u2, u3} β₁ γ₁) (Function.Embedding.{u5, u6} β₂ γ₂)) (fun (_x : Equiv.{max 1 (imax u2 u3), max 1 (imax u5 u6)} (Function.Embedding.{u2, u3} β₁ γ₁) (Function.Embedding.{u5, u6} β₂ γ₂)) => (Function.Embedding.{u2, u3} β₁ γ₁) -> (Function.Embedding.{u5, u6} β₂ γ₂)) (Equiv.hasCoeToFun.{max 1 (imax u2 u3), max 1 (imax u5 u6)} (Function.Embedding.{u2, u3} β₁ γ₁) (Function.Embedding.{u5, u6} β₂ γ₂)) (Equiv.embeddingCongr.{u2, u5, u3, u6} β₁ β₂ γ₁ γ₂ eb ec) g))
 but is expected to have type
-  forall {α₁ : Sort.{u6}} {β₁ : Sort.{u5}} {γ₁ : Sort.{u4}} {α₂ : Sort.{u3}} {β₂ : Sort.{u2}} {γ₂ : Sort.{u1}} (ea : Equiv.{u6, u3} α₁ α₂) (eb : Equiv.{u5, u2} β₁ β₂) (ec : Equiv.{u4, u1} γ₁ γ₂) (f : Function.Embedding.{u6, u5} α₁ β₁) (g : Function.Embedding.{u5, u4} β₁ γ₁), Eq.{max (max 1 u3) u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Function.Embedding.{u6, u4} α₁ γ₁) => Function.Embedding.{u3, u1} α₂ γ₂) (Function.Embedding.trans.{u6, u5, u4} α₁ β₁ γ₁ f g)) (FunLike.coe.{max (max (max (max 1 u6) u4) u3) u1, max (max 1 u6) u4, max (max 1 u3) u1} (Equiv.{max (max 1 u4) u6, max (max 1 u1) u3} (Function.Embedding.{u6, u4} α₁ γ₁) (Function.Embedding.{u3, u1} α₂ γ₂)) (Function.Embedding.{u6, u4} α₁ γ₁) (fun (_x : Function.Embedding.{u6, u4} α₁ γ₁) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Function.Embedding.{u6, u4} α₁ γ₁) => Function.Embedding.{u3, u1} α₂ γ₂) _x) (Equiv.instFunLikeEquiv.{max (max 1 u6) u4, max (max 1 u3) u1} (Function.Embedding.{u6, u4} α₁ γ₁) (Function.Embedding.{u3, u1} α₂ γ₂)) (Equiv.embeddingCongr.{u6, u3, u4, u1} α₁ α₂ γ₁ γ₂ ea ec) (Function.Embedding.trans.{u6, u5, u4} α₁ β₁ γ₁ f g)) (Function.Embedding.trans.{u3, u2, u1} α₂ β₂ γ₂ (FunLike.coe.{max (max (max (max 1 u6) u5) u3) u2, max (max 1 u6) u5, max (max 1 u3) u2} (Equiv.{max (max 1 u5) u6, max (max 1 u2) u3} (Function.Embedding.{u6, u5} α₁ β₁) (Function.Embedding.{u3, u2} α₂ β₂)) (Function.Embedding.{u6, u5} α₁ β₁) (fun (_x : Function.Embedding.{u6, u5} α₁ β₁) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Function.Embedding.{u6, u5} α₁ β₁) => Function.Embedding.{u3, u2} α₂ β₂) _x) (Equiv.instFunLikeEquiv.{max (max 1 u6) u5, max (max 1 u3) u2} (Function.Embedding.{u6, u5} α₁ β₁) (Function.Embedding.{u3, u2} α₂ β₂)) (Equiv.embeddingCongr.{u6, u3, u5, u2} α₁ α₂ β₁ β₂ ea eb) f) (FunLike.coe.{max (max (max (max 1 u5) u4) u2) u1, max (max 1 u5) u4, max (max 1 u2) u1} (Equiv.{max (max 1 u4) u5, max (max 1 u1) u2} (Function.Embedding.{u5, u4} β₁ γ₁) (Function.Embedding.{u2, u1} β₂ γ₂)) (Function.Embedding.{u5, u4} β₁ γ₁) (fun (_x : Function.Embedding.{u5, u4} β₁ γ₁) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Function.Embedding.{u5, u4} β₁ γ₁) => Function.Embedding.{u2, u1} β₂ γ₂) _x) (Equiv.instFunLikeEquiv.{max (max 1 u5) u4, max (max 1 u2) u1} (Function.Embedding.{u5, u4} β₁ γ₁) (Function.Embedding.{u2, u1} β₂ γ₂)) (Equiv.embeddingCongr.{u5, u2, u4, u1} β₁ β₂ γ₁ γ₂ eb ec) g))
+  forall {α₁ : Sort.{u6}} {β₁ : Sort.{u5}} {γ₁ : Sort.{u4}} {α₂ : Sort.{u3}} {β₂ : Sort.{u2}} {γ₂ : Sort.{u1}} (ea : Equiv.{u6, u3} α₁ α₂) (eb : Equiv.{u5, u2} β₁ β₂) (ec : Equiv.{u4, u1} γ₁ γ₂) (f : Function.Embedding.{u6, u5} α₁ β₁) (g : Function.Embedding.{u5, u4} β₁ γ₁), Eq.{max (max 1 u3) u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Function.Embedding.{u6, u4} α₁ γ₁) => Function.Embedding.{u3, u1} α₂ γ₂) (Function.Embedding.trans.{u6, u5, u4} α₁ β₁ γ₁ f g)) (FunLike.coe.{max (max (max (max 1 u6) u4) u3) u1, max (max 1 u6) u4, max (max 1 u3) u1} (Equiv.{max (max 1 u4) u6, max (max 1 u1) u3} (Function.Embedding.{u6, u4} α₁ γ₁) (Function.Embedding.{u3, u1} α₂ γ₂)) (Function.Embedding.{u6, u4} α₁ γ₁) (fun (_x : Function.Embedding.{u6, u4} α₁ γ₁) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Function.Embedding.{u6, u4} α₁ γ₁) => Function.Embedding.{u3, u1} α₂ γ₂) _x) (Equiv.instFunLikeEquiv.{max (max 1 u6) u4, max (max 1 u3) u1} (Function.Embedding.{u6, u4} α₁ γ₁) (Function.Embedding.{u3, u1} α₂ γ₂)) (Equiv.embeddingCongr.{u6, u3, u4, u1} α₁ α₂ γ₁ γ₂ ea ec) (Function.Embedding.trans.{u6, u5, u4} α₁ β₁ γ₁ f g)) (Function.Embedding.trans.{u3, u2, u1} α₂ β₂ γ₂ (FunLike.coe.{max (max (max (max 1 u6) u5) u3) u2, max (max 1 u6) u5, max (max 1 u3) u2} (Equiv.{max (max 1 u5) u6, max (max 1 u2) u3} (Function.Embedding.{u6, u5} α₁ β₁) (Function.Embedding.{u3, u2} α₂ β₂)) (Function.Embedding.{u6, u5} α₁ β₁) (fun (_x : Function.Embedding.{u6, u5} α₁ β₁) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Function.Embedding.{u6, u5} α₁ β₁) => Function.Embedding.{u3, u2} α₂ β₂) _x) (Equiv.instFunLikeEquiv.{max (max 1 u6) u5, max (max 1 u3) u2} (Function.Embedding.{u6, u5} α₁ β₁) (Function.Embedding.{u3, u2} α₂ β₂)) (Equiv.embeddingCongr.{u6, u3, u5, u2} α₁ α₂ β₁ β₂ ea eb) f) (FunLike.coe.{max (max (max (max 1 u5) u4) u2) u1, max (max 1 u5) u4, max (max 1 u2) u1} (Equiv.{max (max 1 u4) u5, max (max 1 u1) u2} (Function.Embedding.{u5, u4} β₁ γ₁) (Function.Embedding.{u2, u1} β₂ γ₂)) (Function.Embedding.{u5, u4} β₁ γ₁) (fun (_x : Function.Embedding.{u5, u4} β₁ γ₁) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Function.Embedding.{u5, u4} β₁ γ₁) => Function.Embedding.{u2, u1} β₂ γ₂) _x) (Equiv.instFunLikeEquiv.{max (max 1 u5) u4, max (max 1 u2) u1} (Function.Embedding.{u5, u4} β₁ γ₁) (Function.Embedding.{u2, u1} β₂ γ₂)) (Equiv.embeddingCongr.{u5, u2, u4, u1} β₁ β₂ γ₁ γ₂ eb ec) g))
 Case conversion may be inaccurate. Consider using '#align equiv.embedding_congr_apply_trans Equiv.embeddingCongr_apply_transₓ'. -/
 theorem embeddingCongr_apply_trans {α₁ β₁ γ₁ α₂ β₂ γ₂ : Sort _} (ea : α₁ ≃ α₂) (eb : β₁ ≃ β₂)
     (ec : γ₁ ≃ γ₂) (f : α₁ ↪ β₁) (g : β₁ ↪ γ₁) :

Changes in mathlib4

mathlib3
mathlib4
chore(Logic): reduce use of autoImplicit (#12135)

In one case, replacing this naively errored, so I just merged the single declaration using it.

Delete two unused variables in Logic/Basic.

Diff
@@ -13,9 +13,6 @@ import Mathlib.Logic.Equiv.Basic
 # Injective functions
 -/
 
-set_option autoImplicit true
-
-
 universe u v w x
 
 namespace Function
@@ -45,12 +42,12 @@ initialize_simps_projections Embedding (toFun → apply)
 -- Porting note: this needs `tactic.lift`.
 --instance {α β : Sort*} : CanLift (α → β) (α ↪ β) coeFn Injective where prf f hf := ⟨⟨f, hf⟩, rfl⟩
 
-theorem exists_surjective_iff :
+theorem exists_surjective_iff {α β : Sort*} :
     (∃ f : α → β, Surjective f) ↔ Nonempty (α → β) ∧ Nonempty (β ↪ α) :=
   ⟨fun ⟨f, h⟩ ↦ ⟨⟨f⟩, ⟨⟨_, injective_surjInv h⟩⟩⟩, fun ⟨h, ⟨e⟩⟩ ↦ (nonempty_fun.mp h).elim
     (fun _ ↦ ⟨isEmptyElim, (isEmptyElim <| e ·)⟩) fun _ ↦ ⟨_, invFun_surjective e.inj'⟩⟩
 
-instance : CanLift (α → β) (α ↪ β) (↑) Injective where
+instance {α β : Sort*} : CanLift (α → β) (α ↪ β) (↑) Injective where
   prf _ h := ⟨⟨_, h⟩, rfl⟩
 
 end Function
@@ -417,7 +414,7 @@ open Function Embedding
 /-- Given an equivalence to a subtype, produce an embedding to the elements of the corresponding
 set. -/
 @[simps!]
-def asEmbedding {p : β → Prop} (e : α ≃ Subtype p) : α ↪ β :=
+def asEmbedding {β α : Sort*} {p : β → Prop} (e : α ≃ Subtype p) : α ↪ β :=
   e.toEmbedding.trans (subtype p)
 #align equiv.as_embedding Equiv.asEmbedding
 #align equiv.as_embedding_apply Equiv.asEmbedding_apply
feat: Unique instance for embeddings of an empty space (#12149)
Diff
@@ -115,6 +115,10 @@ theorem ext {α β} {f g : Embedding α β} (h : ∀ x, f x = g x) : f = g :=
   DFunLike.ext f g h
 #align function.embedding.ext Function.Embedding.ext
 
+instance {α β : Sort*} [IsEmpty α] : Unique (α ↪ β) where
+  default := ⟨isEmptyElim, Function.injective_of_subsingleton _⟩
+  uniq := by intro; ext v; exact isEmptyElim v
+
 -- Porting note : in Lean 3 `DFunLike.ext_iff.symm` works
 theorem ext_iff {α β} {f g : Embedding α β} : (∀ x, f x = g x) ↔ f = g :=
   Iff.symm (DFunLike.ext_iff)
chore: classify porting notes referring to missing linters (#12098)

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

Diff
@@ -20,7 +20,8 @@ universe u v w x
 
 namespace Function
 
--- Porting note: in Lean 3 this was tagged @[nolint has_nonempty_instance]
+-- Porting note(#5171): this linter isn't ported yet.
+-- @[nolint has_nonempty_instance]
 /-- `α ↪ β` is a bundled injective function. -/
 structure Embedding (α : Sort*) (β : Sort*) where
   /-- An embedding as a function. Use coercion instead. -/
style: add missing spaces between a tactic name and its arguments (#11714)

After the (d)simp and rw tactics - hints to find further occurrences welcome.

zulip discussion

Co-authored-by: @sven-manthe

Diff
@@ -206,9 +206,9 @@ def setValue {α β} (f : α ↪ β) (a : α) (b : β) [∀ a', Decidable (a' =
     split_ifs at h with h₁ h₂ _ _ h₅ h₆ <;>
         (try subst b) <;>
         (try simp only [f.injective.eq_iff, not_true_eq_false] at *)
-    · rw[h₁,h₂]
-    · rw[h₁,h]
-    · rw[h₅, ← h]
+    · rw [h₁,h₂]
+    · rw [h₁,h]
+    · rw [h₅, ← h]
     · exact h₆.symm
     · exfalso; exact h₅ h.symm
     · exfalso; exact h₁ h
chore: replace λ by fun (#11301)

Per the style guidelines, λ is disallowed in mathlib. This is close to exhaustive; I left some tactic code alone when it seemed to me that tactic could be upstreamed soon.

Notes

  • In lines I was modifying anyway, I also converted => to .
  • Also contains some mild in-passing indentation fixes in Mathlib/Order/SupClosed.
  • Some doc comments still contained Lean 3 syntax λ x, , which I also replaced.
Diff
@@ -105,7 +105,7 @@ namespace Function
 
 namespace Embedding
 
-theorem coe_injective {α β} : @Injective (α ↪ β) (α → β) (λ f => ↑f) :=
+theorem coe_injective {α β} : @Injective (α ↪ β) (α → β) (fun f ↦ ↑f) :=
   DFunLike.coe_injective
 #align function.embedding.coe_injective Function.Embedding.coe_injective
 
style: homogenise porting notes (#11145)

Homogenises porting notes via capitalisation and addition of whitespace.

It makes the following changes:

  • converts "--porting note" into "-- Porting note";
  • converts "porting note" into "Porting note".
Diff
@@ -41,7 +41,7 @@ instance {α : Sort u} {β : Sort v} : EmbeddingLike (α ↪ β) α β where
 
 initialize_simps_projections Embedding (toFun → apply)
 
--- porting note: this needs `tactic.lift`.
+-- Porting note: this needs `tactic.lift`.
 --instance {α β : Sort*} : CanLift (α → β) (α ↪ β) coeFn Injective where prf f hf := ⟨⟨f, hf⟩, rfl⟩
 
 theorem exists_surjective_iff :
@@ -233,7 +233,7 @@ protected def some {α} : α ↪ Option α :=
 #align function.embedding.some Function.Embedding.some
 #align function.embedding.some_apply Function.Embedding.some_apply
 
--- porting note: Lean 4 unfolds coercion `α → Option α` to `some`, so there is no separate
+-- Porting note: Lean 4 unfolds coercion `α → Option α` to `some`, so there is no separate
 -- `Function.Embedding.coeOption`.
 #align function.embedding.coe_option Function.Embedding.some
 
@@ -427,7 +427,7 @@ def subtypeInjectiveEquivEmbedding (α β : Sort*) :
   right_inv _ := rfl
 #align equiv.subtype_injective_equiv_embedding Equiv.subtypeInjectiveEquivEmbedding
 
--- porting note: in Lean 3 this had `@[congr]`
+-- Porting note: in Lean 3 this had `@[congr]`
 /-- If `α₁ ≃ α₂` and `β₁ ≃ β₂`, then the type of embeddings `α₁ ↪ β₁`
 is equivalent to the type of embeddings `α₂ ↪ β₂`. -/
 @[simps apply]
style: fix typos in porting notes (#10931)
Diff
@@ -20,7 +20,7 @@ universe u v w x
 
 namespace Function
 
--- port note: in Lean 3 this was tagged @[nolint has_nonempty_instance]
+-- Porting note: in Lean 3 this was tagged @[nolint has_nonempty_instance]
 /-- `α ↪ β` is a bundled injective function. -/
 structure Embedding (α : Sort*) (β : Sort*) where
   /-- An embedding as a function. Use coercion instead. -/
@@ -96,7 +96,7 @@ instance Equiv.Perm.coeEmbedding : Coe (Equiv.Perm α) (α ↪ α) :=
   Equiv.coeEmbedding
 #align equiv.perm.coe_embedding Equiv.Perm.coeEmbedding
 
--- port note : `theorem Equiv.coe_eq_to_embedding : ↑f = f.toEmbedding` is a
+-- Porting note : `theorem Equiv.coe_eq_to_embedding : ↑f = f.toEmbedding` is a
 -- syntactic tautology in Lean 4
 
 end Equiv
@@ -114,7 +114,7 @@ theorem ext {α β} {f g : Embedding α β} (h : ∀ x, f x = g x) : f = g :=
   DFunLike.ext f g h
 #align function.embedding.ext Function.Embedding.ext
 
--- port note : in Lean 3 `DFunLike.ext_iff.symm` works
+-- Porting note : in Lean 3 `DFunLike.ext_iff.symm` works
 theorem ext_iff {α β} {f g : Embedding α β} : (∀ x, f x = g x) ↔ f = g :=
   Iff.symm (DFunLike.ext_iff)
 #align function.embedding.ext_iff Function.Embedding.ext_iff
chore: replace Lean 3 syntax λ x, in doc comments (#10727)

Use Lean 4 syntax fun x ↦ instead, matching the style guide. This is close to exhaustive for doc comments; mathlib has about 460 remaining uses of λ (not all in Lean 3 syntax).

Diff
@@ -296,7 +296,8 @@ theorem coe_prodMap {α β γ δ : Type*} (e₁ : α ↪ β) (e₂ : γ ↪ δ)
   rfl
 #align function.embedding.coe_prod_map Function.Embedding.coe_prodMap
 
-/-- If `e₁` and `e₂` are embeddings, then so is `λ ⟨a, b⟩, ⟨e₁ a, e₂ b⟩ : PProd α γ → PProd β δ`. -/
+/-- If `e₁` and `e₂` are embeddings,
+  then so is `fun ⟨a, b⟩ ↦ ⟨e₁ a, e₂ b⟩ : PProd α γ → PProd β δ`. -/
 def pprodMap {α β γ δ : Sort*} (e₁ : α ↪ β) (e₂ : γ ↪ δ) : PProd α γ ↪ PProd β δ :=
   ⟨fun x => ⟨e₁ x.1, e₂ x.2⟩, e₁.injective.pprod_map e₂.injective⟩
 #align function.embedding.pprod_map Function.Embedding.pprodMap
fix(Logic/Embedding/Basic): Generalise arrowCongrRight_apply (#10739)

f does not need to be an embedding, and this version is syntactically strictly more general.

Diff
@@ -367,7 +367,7 @@ def arrowCongrRight {α : Sort u} {β : Sort v} {γ : Sort w} (e : α ↪ β) :
 #align function.embedding.arrow_congr_right Function.Embedding.arrowCongrRight
 
 @[simp]
-theorem arrowCongrRight_apply {α : Sort u} {β : Sort v} {γ : Sort w} (e : α ↪ β) (f : γ ↪ α) :
+theorem arrowCongrRight_apply {α : Sort u} {β : Sort v} {γ : Sort w} (e : α ↪ β) (f : γ → α) :
     arrowCongrRight e f = e ∘ f :=
   rfl
 #align function.embedding.arrow_congr_right_apply Function.Embedding.arrowCongrRight_apply
refactor(Data/FunLike): use unbundled inheritance from FunLike (#8386)

The FunLike hierarchy is very big and gets scanned through each time we need a coercion (via the CoeFun instance). It looks like unbundled inheritance suits Lean 4 better here. The only class that still extends FunLike is EquivLike, since that has a custom coe_injective' field that is easier to implement. All other classes should take FunLike or EquivLike as a parameter.

Zulip thread

Important changes

Previously, morphism classes would be Type-valued and extend FunLike:

/-- `MyHomClass F A B` states that `F` is a type of `MyClass.op`-preserving morphisms.
You should extend this class when you extend `MyHom`. -/
class MyHomClass (F : Type*) (A B : outParam <| Type*) [MyClass A] [MyClass B]
  extends FunLike F A B :=
(map_op : ∀ (f : F) (x y : A), f (MyClass.op x y) = MyClass.op (f x) (f y))

After this PR, they should be Prop-valued and take FunLike as a parameter:

/-- `MyHomClass F A B` states that `F` is a type of `MyClass.op`-preserving morphisms.
You should extend this class when you extend `MyHom`. -/
class MyHomClass (F : Type*) (A B : outParam <| Type*) [MyClass A] [MyClass B]
  [FunLike F A B] : Prop :=
(map_op : ∀ (f : F) (x y : A), f (MyClass.op x y) = MyClass.op (f x) (f y))

(Note that A B stay marked as outParam even though they are not purely required to be so due to the FunLike parameter already filling them in. This is required to see through type synonyms, which is important in the category theory library. Also, I think keeping them as outParam is slightly faster.)

Similarly, MyEquivClass should take EquivLike as a parameter.

As a result, every mention of [MyHomClass F A B] should become [FunLike F A B] [MyHomClass F A B].

Remaining issues

Slower (failing) search

While overall this gives some great speedups, there are some cases that are noticeably slower. In particular, a failing application of a lemma such as map_mul is more expensive. This is due to suboptimal processing of arguments. For example:

variable [FunLike F M N] [Mul M] [Mul N] (f : F) (x : M) (y : M)

theorem map_mul [MulHomClass F M N] : f (x * y) = f x * f y

example [AddHomClass F A B] : f (x * y) = f x * f y := map_mul f _ _

Before this PR, applying map_mul f gives the goals [Mul ?M] [Mul ?N] [MulHomClass F ?M ?N]. Since M and N are out_params, [MulHomClass F ?M ?N] is synthesized first, supplies values for ?M and ?N and then the Mul M and Mul N instances can be found.

After this PR, the goals become [FunLike F ?M ?N] [Mul ?M] [Mul ?N] [MulHomClass F ?M ?N]. Now [FunLike F ?M ?N] is synthesized first, supplies values for ?M and ?N and then the Mul M and Mul N instances can be found, before trying MulHomClass F M N which fails. Since the Mul hierarchy is very big, this can be slow to fail, especially when there is no such Mul instance.

A long-term but harder to achieve solution would be to specify the order in which instance goals get solved. For example, we'd like to change the arguments to map_mul to look like [FunLike F M N] [Mul M] [Mul N] [highPriority <| MulHomClass F M N] because MulHomClass fails or succeeds much faster than the others.

As a consequence, the simpNF linter is much slower since by design it tries and fails to apply many map_ lemmas. The same issue occurs a few times in existing calls to simp [map_mul], where map_mul is tried "too soon" and fails. Thanks to the speedup of leanprover/lean4#2478 the impact is very limited, only in files that already were close to the timeout.

simp not firing sometimes

This affects map_smulₛₗ and related definitions. For simp lemmas Lean apparently uses a slightly different mechanism to find instances, so that rw can find every argument to map_smulₛₗ successfully but simp can't: leanprover/lean4#3701.

Missing instances due to unification failing

Especially in the category theory library, we might sometimes have a type A which is also accessible as a synonym (Bundled A hA).1. Instance synthesis doesn't always work if we have f : A →* B but x * y : (Bundled A hA).1 or vice versa. This seems to be mostly fixed by keeping A B as outParams in MulHomClass F A B. (Presumably because Lean will do a definitional check A =?= (Bundled A hA).1 instead of using the syntax in the discrimination tree.)

Workaround for issues

The timeouts can be worked around for now by specifying which map_mul we mean, either as map_mul f for some explicit f, or as e.g. MonoidHomClass.map_mul.

map_smulₛₗ not firing as simp lemma can be worked around by going back to the pre-FunLike situation and making LinearMap.map_smulₛₗ a simp lemma instead of the generic map_smulₛₗ. Writing simp [map_smulₛₗ _] also works.

Co-authored-by: Matthew Ballard <matt@mrb.email> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Scott Morrison <scott@tqft.net> Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>

Diff
@@ -32,11 +32,13 @@ structure Embedding (α : Sort*) (β : Sort*) where
 /-- An embedding, a.k.a. a bundled injective function. -/
 infixr:25 " ↪ " => Embedding
 
-instance {α : Sort u} {β : Sort v} : EmbeddingLike (α ↪ β) α β where
+instance {α : Sort u} {β : Sort v} : FunLike (α ↪ β) α β where
   coe := Embedding.toFun
-  injective' := Embedding.inj'
   coe_injective' f g h := by { cases f; cases g; congr }
 
+instance {α : Sort u} {β : Sort v} : EmbeddingLike (α ↪ β) α β where
+  injective' := Embedding.inj'
+
 initialize_simps_projections Embedding (toFun → apply)
 
 -- porting note: this needs `tactic.lift`.
feat(Logic/Embedding): add a lemma (#10096)
  • Make Function.Embedding.setValue_eq a simp lemma.
  • Add Function.Embedding.setValue_eq_iff.
Diff
@@ -213,11 +213,17 @@ def setValue {α β} (f : α ↪ β) (a : α) (b : β) [∀ a', Decidable (a' =
     · exact h ⟩
 #align function.embedding.set_value Function.Embedding.setValue
 
+@[simp]
 theorem setValue_eq {α β} (f : α ↪ β) (a : α) (b : β) [∀ a', Decidable (a' = a)]
     [∀ a', Decidable (f a' = b)] : setValue f a b a = b := by
   simp [setValue]
 #align function.embedding.set_value_eq Function.Embedding.setValue_eq
 
+@[simp]
+theorem setValue_eq_iff {α β} (f : α ↪ β) {a a' : α} {b : β} [∀ a', Decidable (a' = a)]
+    [∀ a', Decidable (f a' = b)] : setValue f a b a' = b ↔ a' = a :=
+  (setValue f a b).injective.eq_iff' <| setValue_eq ..
+
 /-- Embedding into `Option α` using `some`. -/
 @[simps (config := .asFn)]
 protected def some {α} : α ↪ Option α :=
feat(Algebra/InfiniteSum): drop [T2Space _] assumption (#10060)
  • Add CanLift instance for Function.Embedding.

  • Assume Injective i instead of an equivalent condition in hasSum_iff_hasSum_of_ne_zero_bij.

  • Add tsum_eq_sum', a version of tsum_eq_sum that explicitly mentions support f.

  • Add Function.Injective.tsum_eq, use it to drop [T2Space _] assumption in

    • Equiv.tsum_eq;
    • tsum_subtype_eq_of_support_subset;
    • tsum_subtype_support;
    • tsum_subtype;
    • tsum_univ;
    • tsum_image;
    • tsum_range;
    • tsum_setElem_eq_tsum_setElem_diff;
    • tsum_eq_tsum_diff_singleton;
    • tsum_eq_tsum_of_ne_zero_bij;
    • Equiv.tsum_eq_tsum_of_support;
    • tsum_extend_zero;
  • Golf some proofs.

  • Drop Equiv.Set.prod_singleton_left and Equiv.Set.prod_singleton_right added in #10038. @MichaelStollBayreuth, if you need these Equivs, then please

    • restore them in Logic/Equiv/Set, not in Data/Set/Prod;
    • call them Equiv.Set.singletonProd and Equiv.Set.prodSingleton, following the lowerCamelCase naming convention for defs;
    • reuse the existing Equiv.Set.prod and Equiv.prodUnique/Equiv.uniqueProd in the definitions.
Diff
@@ -47,6 +47,9 @@ theorem exists_surjective_iff :
   ⟨fun ⟨f, h⟩ ↦ ⟨⟨f⟩, ⟨⟨_, injective_surjInv h⟩⟩⟩, fun ⟨h, ⟨e⟩⟩ ↦ (nonempty_fun.mp h).elim
     (fun _ ↦ ⟨isEmptyElim, (isEmptyElim <| e ·)⟩) fun _ ↦ ⟨_, invFun_surjective e.inj'⟩⟩
 
+instance : CanLift (α → β) (α ↪ β) (↑) Injective where
+  prf _ h := ⟨⟨_, h⟩, rfl⟩
+
 end Function
 
 section Equiv
chore(*): rename FunLike to DFunLike (#9785)

This prepares for the introduction of a non-dependent synonym of FunLike, which helps a lot with keeping #8386 readable.

This is entirely search-and-replace in 680197f combined with manual fixes in 4145626, e900597 and b8428f8. The commands that generated this change:

sed -i 's/\bFunLike\b/DFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\btoFunLike\b/toDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/import Mathlib.Data.DFunLike/import Mathlib.Data.FunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\bHom_FunLike\b/Hom_DFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean     
sed -i 's/\binstFunLike\b/instDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\bfunLike\b/instDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\btoo many metavariables to apply `fun_like.has_coe_to_fun`/too many metavariables to apply `DFunLike.hasCoeToFun`/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean

Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>

Diff
@@ -80,7 +80,7 @@ theorem Equiv.toEmbedding_apply (a : α) : f.toEmbedding a = f a :=
 #align equiv.to_embedding_apply Equiv.toEmbedding_apply
 
 theorem Equiv.toEmbedding_injective : Function.Injective (Equiv.toEmbedding : (α ≃ β) → (α ↪ β)) :=
-  fun _ _ h ↦ by rwa [FunLike.ext'_iff] at h ⊢
+  fun _ _ h ↦ by rwa [DFunLike.ext'_iff] at h ⊢
 
 instance Equiv.coeEmbedding : Coe (α ≃ β) (α ↪ β) :=
   ⟨Equiv.toEmbedding⟩
@@ -101,17 +101,17 @@ namespace Function
 namespace Embedding
 
 theorem coe_injective {α β} : @Injective (α ↪ β) (α → β) (λ f => ↑f) :=
-  FunLike.coe_injective
+  DFunLike.coe_injective
 #align function.embedding.coe_injective Function.Embedding.coe_injective
 
 @[ext]
 theorem ext {α β} {f g : Embedding α β} (h : ∀ x, f x = g x) : f = g :=
-  FunLike.ext f g h
+  DFunLike.ext f g h
 #align function.embedding.ext Function.Embedding.ext
 
--- port note : in Lean 3 `FunLike.ext_iff.symm` works
+-- port note : in Lean 3 `DFunLike.ext_iff.symm` works
 theorem ext_iff {α β} {f g : Embedding α β} : (∀ x, f x = g x) ↔ f = g :=
-  Iff.symm (FunLike.ext_iff)
+  Iff.symm (DFunLike.ext_iff)
 #align function.embedding.ext_iff Function.Embedding.ext_iff
 
 @[simp]
feat(Cardinal): #(α ≃ β) and #(α ↪ β) in the infinite case (#9646)

Main results:

  • If two types have the same infinite cardinality, then there are as many Equivs between them as there are functions.

  • If B has infinite cardinality no less than #A, then there are as many embeddings from A into B as there are functions.

  • If A has infinite cardinality no less than #B, then there are as many surjective functions from A to B as there are functions.

Co-authored-by: Junyan Xu <junyanxu.math@gmail.com>

Diff
@@ -42,6 +42,11 @@ initialize_simps_projections Embedding (toFun → apply)
 -- porting note: this needs `tactic.lift`.
 --instance {α β : Sort*} : CanLift (α → β) (α ↪ β) coeFn Injective where prf f hf := ⟨⟨f, hf⟩, rfl⟩
 
+theorem exists_surjective_iff :
+    (∃ f : α → β, Surjective f) ↔ Nonempty (α → β) ∧ Nonempty (β ↪ α) :=
+  ⟨fun ⟨f, h⟩ ↦ ⟨⟨f⟩, ⟨⟨_, injective_surjInv h⟩⟩⟩, fun ⟨h, ⟨e⟩⟩ ↦ (nonempty_fun.mp h).elim
+    (fun _ ↦ ⟨isEmptyElim, (isEmptyElim <| e ·)⟩) fun _ ↦ ⟨_, invFun_surjective e.inj'⟩⟩
+
 end Function
 
 section Equiv
@@ -74,6 +79,9 @@ theorem Equiv.toEmbedding_apply (a : α) : f.toEmbedding a = f a :=
   rfl
 #align equiv.to_embedding_apply Equiv.toEmbedding_apply
 
+theorem Equiv.toEmbedding_injective : Function.Injective (Equiv.toEmbedding : (α ≃ β) → (α ↪ β)) :=
+  fun _ _ h ↦ by rwa [FunLike.ext'_iff] at h ⊢
+
 instance Equiv.coeEmbedding : Coe (α ≃ β) (α ↪ β) :=
   ⟨Equiv.toEmbedding⟩
 #align equiv.coe_embedding Equiv.coeEmbedding
chore: space after (#8178)

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

Diff
@@ -195,7 +195,7 @@ def setValue {α β} (f : α ↪ β) (a : α) (b : β) [∀ a', Decidable (a' =
         (try simp only [f.injective.eq_iff, not_true_eq_false] at *)
     · rw[h₁,h₂]
     · rw[h₁,h]
-    · rw[h₅,←h]
+    · rw[h₅, ← h]
     · exact h₆.symm
     · exfalso; exact h₅ h.symm
     · exfalso; exact h₁ h
chore: bump to v4.3.0-rc2 (#8366)

PR contents

This is the supremum of

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

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

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

Lean PRs involved in this bump

In particular this includes adjustments for the Lean PRs

leanprover/lean4#2778

We can get rid of all the

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

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

leanprover/lean4#2722

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

leanprover/lean4#2783

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

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

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

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

Diff
@@ -192,7 +192,7 @@ def setValue {α β} (f : α ↪ β) (a : α) (b : β) [∀ a', Decidable (a' =
     -- split_ifs at h <;> (try subst b) <;> (try simp only [f.injective.eq_iff] at *) <;> cc
     split_ifs at h with h₁ h₂ _ _ h₅ h₆ <;>
         (try subst b) <;>
-        (try simp only [f.injective.eq_iff] at *)
+        (try simp only [f.injective.eq_iff, not_true_eq_false] at *)
     · rw[h₁,h₂]
     · rw[h₁,h]
     · rw[h₅,←h]
style: shorten simps configurations (#8296)

Use .asFn and .lemmasOnly as simps configuration options.

For reference, these are defined here:

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

Diff
@@ -208,7 +208,7 @@ theorem setValue_eq {α β} (f : α ↪ β) (a : α) (b : β) [∀ a', Decidable
 #align function.embedding.set_value_eq Function.Embedding.setValue_eq
 
 /-- Embedding into `Option α` using `some`. -/
-@[simps (config := { fullyApplied := false })]
+@[simps (config := .asFn)]
 protected def some {α} : α ↪ Option α :=
   ⟨some, Option.some_injective α⟩
 #align function.embedding.some Function.Embedding.some
@@ -219,7 +219,7 @@ protected def some {α} : α ↪ Option α :=
 #align function.embedding.coe_option Function.Embedding.some
 
 /-- A version of `Option.map` for `Function.Embedding`s. -/
-@[simps (config := { fullyApplied := false })]
+@[simps (config := .asFn)]
 def optionMap {α β} (f : α ↪ β) : Option α ↪ Option β :=
   ⟨Option.map f, Option.map_injective f.injective⟩
 #align function.embedding.option_map Function.Embedding.optionMap
chore: fix some cases in names (#7469)

And fix some names in comments where this revealed issues

Diff
@@ -266,7 +266,7 @@ def sectr {α : Sort _} (a : α) (β : Sort _) : β ↪ α × β :=
 #align function.embedding.sectr Function.Embedding.sectr
 #align function.embedding.sectr_apply Function.Embedding.sectr_apply
 
-/-- If `e₁` and `e₂` are embeddings, then so is `prod.map e₁ e₂ : (a, b) ↦ (e₁ a, e₂ b)`. -/
+/-- If `e₁` and `e₂` are embeddings, then so is `Prod.map e₁ e₂ : (a, b) ↦ (e₁ a, e₂ b)`. -/
 def prodMap {α β γ δ : Type*} (e₁ : α ↪ β) (e₂ : γ ↪ δ) : α × γ ↪ β × δ :=
   ⟨Prod.map e₁ e₂, e₁.injective.Prod_map e₂.injective⟩
 #align function.embedding.prod_map Function.Embedding.prodMap
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
@@ -13,6 +13,8 @@ import Mathlib.Logic.Equiv.Basic
 # Injective functions
 -/
 
+set_option autoImplicit true
+
 
 universe u v w x
 
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
@@ -20,7 +20,7 @@ namespace Function
 
 -- port note: in Lean 3 this was tagged @[nolint has_nonempty_instance]
 /-- `α ↪ β` is a bundled injective function. -/
-structure Embedding (α : Sort _) (β : Sort _) where
+structure Embedding (α : Sort*) (β : Sort*) where
   /-- An embedding as a function. Use coercion instead. -/
   toFun : α → β
   /-- An embedding is an injective function. Use `Function.Embedding.injective` instead. -/
@@ -38,7 +38,7 @@ instance {α : Sort u} {β : Sort v} : EmbeddingLike (α ↪ β) α β where
 initialize_simps_projections Embedding (toFun → apply)
 
 -- porting note: this needs `tactic.lift`.
---instance {α β : Sort _} : CanLift (α → β) (α ↪ β) coeFn Injective where prf f hf := ⟨⟨f, hf⟩, rfl⟩
+--instance {α β : Sort*} : CanLift (α → β) (α ↪ β) coeFn Injective where prf f hf := ⟨⟨f, hf⟩, rfl⟩
 
 end Function
 
@@ -115,7 +115,7 @@ theorem coeFn_mk {α β} (f : α → β) (i) : (@mk _ _ f i : α → β) = f :=
 #align function.embedding.coe_fn_mk Function.Embedding.coeFn_mk
 
 @[simp]
-theorem mk_coe {α β : Type _} (f : α ↪ β) (inj) : (⟨f, inj⟩ : α ↪ β) = f :=
+theorem mk_coe {α β : Type*} (f : α ↪ β) (inj) : (⟨f, inj⟩ : α ↪ β) = f :=
   rfl
 #align function.embedding.mk_coe Function.Embedding.mk_coe
 
@@ -129,7 +129,7 @@ theorem apply_eq_iff_eq {α β} (f : α ↪ β) (x y : α) : f x = f y ↔ x = y
 
 /-- The identity map as a `Function.Embedding`. -/
 @[refl, simps (config := { simpRhs := true })]
-protected def refl (α : Sort _) : α ↪ α :=
+protected def refl (α : Sort*) : α ↪ α :=
   ⟨id, injective_id⟩
 #align function.embedding.refl Function.Embedding.refl
 #align function.embedding.refl_apply Function.Embedding.refl_apply
@@ -144,14 +144,14 @@ protected def trans {α β γ} (f : α ↪ β) (g : β ↪ γ) : α ↪ γ :=
 instance : Trans Embedding Embedding Embedding := ⟨Embedding.trans⟩
 
 @[simp]
-theorem equiv_toEmbedding_trans_symm_toEmbedding {α β : Sort _} (e : α ≃ β) :
+theorem equiv_toEmbedding_trans_symm_toEmbedding {α β : Sort*} (e : α ≃ β) :
     e.toEmbedding.trans e.symm.toEmbedding = Embedding.refl _ := by
   ext
   simp
 #align function.embedding.equiv_to_embedding_trans_symm_to_embedding Function.Embedding.equiv_toEmbedding_trans_symm_toEmbedding
 
 @[simp]
-theorem equiv_symm_toEmbedding_trans_toEmbedding {α β : Sort _} (e : α ≃ β) :
+theorem equiv_symm_toEmbedding_trans_toEmbedding {α β : Sort*} (e : α ≃ β) :
     e.symm.toEmbedding.trans e.toEmbedding = Embedding.refl _ := by
   ext
   simp
@@ -244,7 +244,7 @@ theorem coe_quotientOut (α) [Setoid α] : ↑(quotientOut α) = Quotient.out :=
 #align function.embedding.coe_quotient_out Function.Embedding.coe_quotientOut
 
 /-- Choosing an element `b : β` gives an embedding of `PUnit` into `β`. -/
-def punit {β : Sort _} (b : β) : PUnit ↪ β :=
+def punit {β : Sort*} (b : β) : PUnit ↪ β :=
   ⟨fun _ => b, by
     rintro ⟨⟩ ⟨⟩ _
     rfl⟩
@@ -265,18 +265,18 @@ def sectr {α : Sort _} (a : α) (β : Sort _) : β ↪ α × β :=
 #align function.embedding.sectr_apply Function.Embedding.sectr_apply
 
 /-- If `e₁` and `e₂` are embeddings, then so is `prod.map e₁ e₂ : (a, b) ↦ (e₁ a, e₂ b)`. -/
-def prodMap {α β γ δ : Type _} (e₁ : α ↪ β) (e₂ : γ ↪ δ) : α × γ ↪ β × δ :=
+def prodMap {α β γ δ : Type*} (e₁ : α ↪ β) (e₂ : γ ↪ δ) : α × γ ↪ β × δ :=
   ⟨Prod.map e₁ e₂, e₁.injective.Prod_map e₂.injective⟩
 #align function.embedding.prod_map Function.Embedding.prodMap
 
 @[simp]
-theorem coe_prodMap {α β γ δ : Type _} (e₁ : α ↪ β) (e₂ : γ ↪ δ) :
+theorem coe_prodMap {α β γ δ : Type*} (e₁ : α ↪ β) (e₂ : γ ↪ δ) :
     e₁.prodMap e₂ = Prod.map e₁ e₂ :=
   rfl
 #align function.embedding.coe_prod_map Function.Embedding.coe_prodMap
 
 /-- If `e₁` and `e₂` are embeddings, then so is `λ ⟨a, b⟩, ⟨e₁ a, e₂ b⟩ : PProd α γ → PProd β δ`. -/
-def pprodMap {α β γ δ : Sort _} (e₁ : α ↪ β) (e₂ : γ ↪ δ) : PProd α γ ↪ PProd β δ :=
+def pprodMap {α β γ δ : Sort*} (e₁ : α ↪ β) (e₂ : γ ↪ δ) : PProd α γ ↪ PProd β δ :=
   ⟨fun x => ⟨e₁ x.1, e₂ x.2⟩, e₁.injective.pprod_map e₂.injective⟩
 #align function.embedding.pprod_map Function.Embedding.pprodMap
 
@@ -285,7 +285,7 @@ section Sum
 open Sum
 
 /-- If `e₁` and `e₂` are embeddings, then so is `Sum.map e₁ e₂`. -/
-def sumMap {α β γ δ : Type _} (e₁ : α ↪ β) (e₂ : γ ↪ δ) : Sum α γ ↪ Sum β δ :=
+def sumMap {α β γ δ : Type*} (e₁ : α ↪ β) (e₂ : γ ↪ δ) : Sum α γ ↪ Sum β δ :=
   ⟨Sum.map e₁ e₂, e₁.injective.sum_map e₂.injective⟩
 #align function.embedding.sum_map Function.Embedding.sumMap
 
@@ -296,14 +296,14 @@ theorem coe_sumMap {α β γ δ} (e₁ : α ↪ β) (e₂ : γ ↪ δ) : sumMap
 
 /-- The embedding of `α` into the sum `α ⊕ β`. -/
 @[simps]
-def inl {α β : Type _} : α ↪ Sum α β :=
+def inl {α β : Type*} : α ↪ Sum α β :=
   ⟨Sum.inl, fun _ _ => Sum.inl.inj⟩
 #align function.embedding.inl Function.Embedding.inl
 #align function.embedding.inl_apply Function.Embedding.inl_apply
 
 /-- The embedding of `β` into the sum `α ⊕ β`. -/
 @[simps]
-def inr {α β : Type _} : β ↪ Sum α β :=
+def inr {α β : Type*} : β ↪ Sum α β :=
   ⟨Sum.inr, fun _ _ => Sum.inr.inj⟩
 #align function.embedding.inr Function.Embedding.inr
 #align function.embedding.inr_apply Function.Embedding.inr_apply
@@ -312,7 +312,7 @@ end Sum
 
 section Sigma
 
-variable {α α' : Type _} {β : α → Type _} {β' : α' → Type _}
+variable {α α' : Type*} {β : α → Type*} {β' : α' → Type*}
 
 /-- `Sigma.mk` as a `Function.Embedding`. -/
 @[simps apply]
@@ -334,7 +334,7 @@ end Sigma
 /-- Define an embedding `(Π a : α, β a) ↪ (Π a : α, γ a)` from a family of embeddings
 `e : Π a, (β a ↪ γ a)`. This embedding sends `f` to `fun a ↦ e a (f a)`. -/
 @[simps]
-def piCongrRight {α : Sort _} {β γ : α → Sort _} (e : ∀ a, β a ↪ γ a) : (∀ a, β a) ↪ ∀ a, γ a :=
+def piCongrRight {α : Sort*} {β γ : α → Sort*} (e : ∀ a, β a ↪ γ a) : (∀ a, β a) ↪ ∀ a, γ a :=
   ⟨fun f a => e a (f a), fun _ _ h => funext fun a => (e a).injective (congr_fun h a)⟩
 #align function.embedding.Pi_congr_right Function.Embedding.piCongrRight
 #align function.embedding.Pi_congr_right_apply Function.Embedding.piCongrRight_apply
@@ -369,12 +369,12 @@ protected def subtypeMap {α β} {p : α → Prop} {q : β → Prop} (f : α ↪
 
 open Set
 
-theorem swap_apply {α β : Type _} [DecidableEq α] [DecidableEq β] (f : α ↪ β) (x y z : α) :
+theorem swap_apply {α β : Type*} [DecidableEq α] [DecidableEq β] (f : α ↪ β) (x y z : α) :
     Equiv.swap (f x) (f y) (f z) = f (Equiv.swap x y z) :=
   f.injective.swap_apply x y z
 #align function.embedding.swap_apply Function.Embedding.swap_apply
 
-theorem swap_comp {α β : Type _} [DecidableEq α] [DecidableEq β] (f : α ↪ β) (x y : α) :
+theorem swap_comp {α β : Type*} [DecidableEq α] [DecidableEq β] (f : α ↪ β) (x y : α) :
     Equiv.swap (f x) (f y) ∘ f = f ∘ Equiv.swap x y :=
   f.injective.swap_comp x y
 #align function.embedding.swap_comp Function.Embedding.swap_comp
@@ -397,7 +397,7 @@ def asEmbedding {p : β → Prop} (e : α ≃ Subtype p) : α ↪ β :=
 
 /-- The type of embeddings `α ↪ β` is equivalent to
     the subtype of all injective functions `α → β`. -/
-def subtypeInjectiveEquivEmbedding (α β : Sort _) :
+def subtypeInjectiveEquivEmbedding (α β : Sort*) :
     { f : α → β // Injective f } ≃ (α ↪ β) where
   toFun f := ⟨f.val, f.property⟩
   invFun f := ⟨f, f.injective⟩
@@ -409,7 +409,7 @@ def subtypeInjectiveEquivEmbedding (α β : Sort _) :
 /-- If `α₁ ≃ α₂` and `β₁ ≃ β₂`, then the type of embeddings `α₁ ↪ β₁`
 is equivalent to the type of embeddings `α₂ ↪ β₂`. -/
 @[simps apply]
-def embeddingCongr {α β γ δ : Sort _} (h : α ≃ β) (h' : γ ≃ δ) : (α ↪ γ) ≃ (β ↪ δ) where
+def embeddingCongr {α β γ δ : Sort*} (h : α ≃ β) (h' : γ ≃ δ) : (α ↪ γ) ≃ (β ↪ δ) where
   toFun f := f.congr h h'
   invFun f := f.congr h.symm h'.symm
   left_inv x := by
@@ -422,13 +422,13 @@ def embeddingCongr {α β γ δ : Sort _} (h : α ≃ β) (h' : γ ≃ δ) : (α
 #align equiv.embedding_congr_apply Equiv.embeddingCongr_apply
 
 @[simp]
-theorem embeddingCongr_refl {α β : Sort _} :
+theorem embeddingCongr_refl {α β : Sort*} :
     embeddingCongr (Equiv.refl α) (Equiv.refl β) = Equiv.refl (α ↪ β) :=
   rfl
 #align equiv.embedding_congr_refl Equiv.embeddingCongr_refl
 
 @[simp]
-theorem embeddingCongr_trans {α₁ β₁ α₂ β₂ α₃ β₃ : Sort _} (e₁ : α₁ ≃ α₂) (e₁' : β₁ ≃ β₂)
+theorem embeddingCongr_trans {α₁ β₁ α₂ β₂ α₃ β₃ : Sort*} (e₁ : α₁ ≃ α₂) (e₁' : β₁ ≃ β₂)
     (e₂ : α₂ ≃ α₃) (e₂' : β₂ ≃ β₃) :
     embeddingCongr (e₁.trans e₂) (e₁'.trans e₂') =
       (embeddingCongr e₁ e₁').trans (embeddingCongr e₂ e₂') :=
@@ -436,12 +436,12 @@ theorem embeddingCongr_trans {α₁ β₁ α₂ β₂ α₃ β₃ : Sort _} (e
 #align equiv.embedding_congr_trans Equiv.embeddingCongr_trans
 
 @[simp]
-theorem embeddingCongr_symm {α₁ β₁ α₂ β₂ : Sort _} (e₁ : α₁ ≃ α₂) (e₂ : β₁ ≃ β₂) :
+theorem embeddingCongr_symm {α₁ β₁ α₂ β₂ : Sort*} (e₁ : α₁ ≃ α₂) (e₂ : β₁ ≃ β₂) :
     (embeddingCongr e₁ e₂).symm = embeddingCongr e₁.symm e₂.symm :=
   rfl
 #align equiv.embedding_congr_symm Equiv.embeddingCongr_symm
 
-theorem embeddingCongr_apply_trans {α₁ β₁ γ₁ α₂ β₂ γ₂ : Sort _} (ea : α₁ ≃ α₂) (eb : β₁ ≃ β₂)
+theorem embeddingCongr_apply_trans {α₁ β₁ γ₁ α₂ β₂ γ₂ : Sort*} (ea : α₁ ≃ α₂) (eb : β₁ ≃ β₂)
     (ec : γ₁ ≃ γ₂) (f : α₁ ↪ β₁) (g : β₁ ↪ γ₁) :
     Equiv.embeddingCongr ea ec (f.trans g) =
       (Equiv.embeddingCongr ea eb f).trans (Equiv.embeddingCongr eb ec g) := by
@@ -450,12 +450,12 @@ theorem embeddingCongr_apply_trans {α₁ β₁ γ₁ α₂ β₂ γ₂ : Sort _
 #align equiv.embedding_congr_apply_trans Equiv.embeddingCongr_apply_trans
 
 @[simp]
-theorem refl_toEmbedding {α : Type _} : (Equiv.refl α).toEmbedding = Embedding.refl α :=
+theorem refl_toEmbedding {α : Type*} : (Equiv.refl α).toEmbedding = Embedding.refl α :=
   rfl
 #align equiv.refl_to_embedding Equiv.refl_toEmbedding
 
 @[simp]
-theorem trans_toEmbedding {α β γ : Type _} (e : α ≃ β) (f : β ≃ γ) :
+theorem trans_toEmbedding {α β γ : Type*} (e : α ≃ β) (f : β ≃ γ) :
     (e.trans f).toEmbedding = e.toEmbedding.trans f.toEmbedding :=
   rfl
 #align equiv.trans_to_embedding Equiv.trans_toEmbedding
@@ -464,7 +464,7 @@ end Equiv
 
 section Subtype
 
-variable {α : Type _}
+variable {α : Type*}
 
 /-- A subtype `{x // p x ∨ q x}` over a disjunction of `p q : α → Prop` can be injectively split
 into a sum of subtypes `{x // p x} ⊕ {x // q x}` such that `¬ p x` is sent to the right. -/
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

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

Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2017 Johannes Hölzl. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Mario Carneiro
-
-! This file was ported from Lean 3 source module logic.embedding.basic
-! leanprover-community/mathlib commit 70d50ecfd4900dd6d328da39ab7ebd516abe4025
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Data.Option.Basic
 import Mathlib.Data.Prod.PProd
 import Mathlib.Logic.Equiv.Basic
 
+#align_import logic.embedding.basic from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025"
+
 /-!
 # Injective functions
 -/
chore: convert lambda in docs to fun (#5045)

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

Diff
@@ -335,7 +335,7 @@ def sigmaMap (f : α ↪ α') (g : ∀ a, β a ↪ β' (f a)) : (Σa, β a) ↪
 end Sigma
 
 /-- Define an embedding `(Π a : α, β a) ↪ (Π a : α, γ a)` from a family of embeddings
-`e : Π a, (β a ↪ γ a)`. This embedding sends `f` to `λ a, e a (f a)`. -/
+`e : Π a, (β a ↪ γ a)`. This embedding sends `f` to `fun a ↦ e a (f a)`. -/
 @[simps]
 def piCongrRight {α : Sort _} {β γ : α → Sort _} (e : ∀ a, β a ↪ γ a) : (∀ a, β a) ↪ ∀ a, γ a :=
   ⟨fun f a => e a (f a), fun _ _ h => funext fun a => (e a).injective (congr_fun h a)⟩
chore: fix grammar 2/3 (#5002)

Part 2 of #5001

Diff
@@ -317,7 +317,7 @@ section Sigma
 
 variable {α α' : Type _} {β : α → Type _} {β' : α' → Type _}
 
-/-- `Sigma.mk` as an `Function.Embedding`. -/
+/-- `Sigma.mk` as a `Function.Embedding`. -/
 @[simps apply]
 def sigmaMk (a : α) : β a ↪ Σx, β x :=
   ⟨Sigma.mk a, sigma_mk_injective⟩
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
@@ -246,7 +246,7 @@ theorem coe_quotientOut (α) [Setoid α] : ↑(quotientOut α) = Quotient.out :=
   rfl
 #align function.embedding.coe_quotient_out Function.Embedding.coe_quotientOut
 
-/-- Choosing an element `b : β` gives an embedding of `punit` into `β`. -/
+/-- Choosing an element `b : β` gives an embedding of `PUnit` into `β`. -/
 def punit {β : Sort _} (b : β) : PUnit ↪ β :=
   ⟨fun _ => b, by
     rintro ⟨⟩ ⟨⟩ _
@@ -278,7 +278,7 @@ theorem coe_prodMap {α β γ δ : Type _} (e₁ : α ↪ β) (e₂ : γ ↪ δ)
   rfl
 #align function.embedding.coe_prod_map Function.Embedding.coe_prodMap
 
-/-- If `e₁` and `e₂` are embeddings, then so is `λ ⟨a, b⟩, ⟨e₁ a, e₂ b⟩ : pprod α γ → pprod β δ`. -/
+/-- If `e₁` and `e₂` are embeddings, then so is `λ ⟨a, b⟩, ⟨e₁ a, e₂ b⟩ : PProd α γ → PProd β δ`. -/
 def pprodMap {α β γ δ : Sort _} (e₁ : α ↪ β) (e₂ : γ ↪ δ) : PProd α γ ↪ PProd β δ :=
   ⟨fun x => ⟨e₁ x.1, e₂ x.2⟩, e₁.injective.pprod_map e₂.injective⟩
 #align function.embedding.pprod_map Function.Embedding.pprodMap
@@ -287,7 +287,7 @@ section Sum
 
 open Sum
 
-/-- If `e₁` and `e₂` are embeddings, then so is `sum.map e₁ e₂`. -/
+/-- If `e₁` and `e₂` are embeddings, then so is `Sum.map e₁ e₂`. -/
 def sumMap {α β γ δ : Type _} (e₁ : α ↪ β) (e₂ : γ ↪ δ) : Sum α γ ↪ Sum β δ :=
   ⟨Sum.map e₁ e₂, e₁.injective.sum_map e₂.injective⟩
 #align function.embedding.sum_map Function.Embedding.sumMap
feat: initialize_simps_projections automatically finds coercions (#2045)
  • initialize_simps_projections automatically find coercions if there is a Funlike or SetLike instance defined by one of the projections.
  • Some improvements compared to Lean 3:
    • Find coercions even if it is defined by a field of a parent structure
    • Find SetLike coercions

Not yet implemented (and rarely - if ever - used in mathlib3):

  • Automatic custom projections for algebraic notation (like +,*,...)

Co-authored-by: Johan Commelin <johan@commelin.net>

Diff
@@ -38,9 +38,6 @@ instance {α : Sort u} {β : Sort v} : EmbeddingLike (α ↪ β) α β where
   injective' := Embedding.inj'
   coe_injective' f g h := by { cases f; cases g; congr }
 
-/-- See Note [custom simps projection] -/
-def Embedding.Simps.apply {α β} (e : α ↪ β) : α → β := e
-
 initialize_simps_projections Embedding (toFun → apply)
 
 -- porting note: this needs `tactic.lift`.
feat: require @[simps!] if simps runs in expensive mode (#1885)
  • This does not change the behavior of simps, just raises a linter error if you run simps in a more expensive mode without writing !.
  • Fixed some incorrect occurrences of to_additive, simps. Will do that systematically in future PR.
  • Fix port of OmegaCompletePartialOrder.ContinuousHom.ofMono a bit

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

Diff
@@ -164,7 +164,7 @@ theorem equiv_symm_toEmbedding_trans_toEmbedding {α β : Sort _} (e : α ≃ β
 #align function.embedding.equiv_symm_to_embedding_trans_to_embedding Function.Embedding.equiv_symm_toEmbedding_trans_toEmbedding
 
 /-- Transfer an embedding along a pair of equivalences. -/
-@[simps (config := { fullyApplied := false, simpRhs := true })]
+@[simps! (config := { fullyApplied := false, simpRhs := true })]
 protected def congr {α : Sort u} {β : Sort v} {γ : Sort w} {δ : Sort x} (e₁ : α ≃ β) (e₂ : γ ≃ δ)
     (f : α ↪ γ) : β ↪ δ :=
   (Equiv.toEmbedding e₁.symm).trans (f.trans e₂.toEmbedding)
@@ -395,7 +395,7 @@ open Function Embedding
 
 /-- Given an equivalence to a subtype, produce an embedding to the elements of the corresponding
 set. -/
-@[simps]
+@[simps!]
 def asEmbedding {p : β → Prop} (e : α ≃ Subtype p) : α ↪ β :=
   e.toEmbedding.trans (subtype p)
 #align equiv.as_embedding Equiv.asEmbedding
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
@@ -138,12 +138,14 @@ theorem apply_eq_iff_eq {α β} (f : α ↪ β) (x y : α) : f x = f y ↔ x = y
 protected def refl (α : Sort _) : α ↪ α :=
   ⟨id, injective_id⟩
 #align function.embedding.refl Function.Embedding.refl
+#align function.embedding.refl_apply Function.Embedding.refl_apply
 
 /-- Composition of `f : α ↪ β` and `g : β ↪ γ`. -/
 @[trans, simps (config := { simpRhs := true })]
 protected def trans {α β γ} (f : α ↪ β) (g : β ↪ γ) : α ↪ γ :=
   ⟨g ∘ f, g.injective.comp f.injective⟩
 #align function.embedding.trans Function.Embedding.trans
+#align function.embedding.trans_apply Function.Embedding.trans_apply
 
 instance : Trans Embedding Embedding Embedding := ⟨Embedding.trans⟩
 
@@ -167,6 +169,7 @@ protected def congr {α : Sort u} {β : Sort v} {γ : Sort w} {δ : Sort x} (e
     (f : α ↪ γ) : β ↪ δ :=
   (Equiv.toEmbedding e₁.symm).trans (f.trans e₂.toEmbedding)
 #align function.embedding.congr Function.Embedding.congr
+#align function.embedding.congr_apply Function.Embedding.congr_apply
 
 /-- A right inverse `surjInv` of a surjective function as an `Embedding`. -/
 protected noncomputable def ofSurjective {α β} (f : β → α) (hf : Surjective f) : α ↪ β :=
@@ -213,6 +216,7 @@ theorem setValue_eq {α β} (f : α ↪ β) (a : α) (b : β) [∀ a', Decidable
 protected def some {α} : α ↪ Option α :=
   ⟨some, Option.some_injective α⟩
 #align function.embedding.some Function.Embedding.some
+#align function.embedding.some_apply Function.Embedding.some_apply
 
 -- porting note: Lean 4 unfolds coercion `α → Option α` to `some`, so there is no separate
 -- `Function.Embedding.coeOption`.
@@ -223,6 +227,7 @@ protected def some {α} : α ↪ Option α :=
 def optionMap {α β} (f : α ↪ β) : Option α ↪ Option β :=
   ⟨Option.map f, Option.map_injective f.injective⟩
 #align function.embedding.option_map Function.Embedding.optionMap
+#align function.embedding.option_map_apply Function.Embedding.optionMap_apply
 
 /-- Embedding of a `Subtype`. -/
 def subtype {α} (p : α → Prop) : Subtype p ↪ α :=
@@ -256,12 +261,14 @@ def punit {β : Sort _} (b : β) : PUnit ↪ β :=
 def sectl (α : Sort _) {β : Sort _} (b : β) : α ↪ α × β :=
   ⟨fun a => (a, b), fun _ _ h => congr_arg Prod.fst h⟩
 #align function.embedding.sectl Function.Embedding.sectl
+#align function.embedding.sectl_apply Function.Embedding.sectl_apply
 
 /-- Fixing an element `a : α` gives an embedding `β ↪ α × β`. -/
 @[simps]
 def sectr {α : Sort _} (a : α) (β : Sort _) : β ↪ α × β :=
   ⟨fun b => (a, b), fun _ _ h => congr_arg Prod.snd h⟩
 #align function.embedding.sectr Function.Embedding.sectr
+#align function.embedding.sectr_apply Function.Embedding.sectr_apply
 
 /-- If `e₁` and `e₂` are embeddings, then so is `prod.map e₁ e₂ : (a, b) ↦ (e₁ a, e₂ b)`. -/
 def prodMap {α β γ δ : Type _} (e₁ : α ↪ β) (e₂ : γ ↪ δ) : α × γ ↪ β × δ :=
@@ -298,12 +305,14 @@ theorem coe_sumMap {α β γ δ} (e₁ : α ↪ β) (e₂ : γ ↪ δ) : sumMap
 def inl {α β : Type _} : α ↪ Sum α β :=
   ⟨Sum.inl, fun _ _ => Sum.inl.inj⟩
 #align function.embedding.inl Function.Embedding.inl
+#align function.embedding.inl_apply Function.Embedding.inl_apply
 
 /-- The embedding of `β` into the sum `α ⊕ β`. -/
 @[simps]
 def inr {α β : Type _} : β ↪ Sum α β :=
   ⟨Sum.inr, fun _ _ => Sum.inr.inj⟩
 #align function.embedding.inr Function.Embedding.inr
+#align function.embedding.inr_apply Function.Embedding.inr_apply
 
 end Sum
 
@@ -324,6 +333,7 @@ of embeddings, then `Sigma.map f g` is an embedding. -/
 def sigmaMap (f : α ↪ α') (g : ∀ a, β a ↪ β' (f a)) : (Σa, β a) ↪ Σa', β' a' :=
   ⟨Sigma.map f fun a => g a, f.injective.sigma_map fun a => (g a).injective⟩
 #align function.embedding.sigma_map Function.Embedding.sigmaMap
+#align function.embedding.sigma_map_apply Function.Embedding.sigmaMap_apply
 
 end Sigma
 
@@ -333,6 +343,7 @@ end Sigma
 def piCongrRight {α : Sort _} {β γ : α → Sort _} (e : ∀ a, β a ↪ γ a) : (∀ a, β a) ↪ ∀ a, γ a :=
   ⟨fun f a => e a (f a), fun _ _ h => funext fun a => (e a).injective (congr_fun h a)⟩
 #align function.embedding.Pi_congr_right Function.Embedding.piCongrRight
+#align function.embedding.Pi_congr_right_apply Function.Embedding.piCongrRight_apply
 
 /-- An embedding `e : α ↪ β` defines an embedding `(γ → α) ↪ (γ → β)` that sends each `f`
 to `e ∘ f`. -/
@@ -388,6 +399,7 @@ set. -/
 def asEmbedding {p : β → Prop} (e : α ≃ Subtype p) : α ↪ β :=
   e.toEmbedding.trans (subtype p)
 #align equiv.as_embedding Equiv.asEmbedding
+#align equiv.as_embedding_apply Equiv.asEmbedding_apply
 
 /-- The type of embeddings `α ↪ β` is equivalent to
     the subtype of all injective functions `α → β`. -/
@@ -413,6 +425,7 @@ def embeddingCongr {α β γ δ : Sort _} (h : α ≃ β) (h' : γ ≃ δ) : (α
     ext
     simp
 #align equiv.embedding_congr Equiv.embeddingCongr
+#align equiv.embedding_congr_apply Equiv.embeddingCongr_apply
 
 @[simp]
 theorem embeddingCongr_refl {α β : Sort _} :
@@ -487,5 +500,6 @@ if `p x → q x` for all `x : α`. -/
 def Subtype.impEmbedding (p q : α → Prop) (h : ∀ x, p x → q x) : { x // p x } ↪ { x // q x } :=
   ⟨fun x => ⟨x, h x x.prop⟩, fun x y => by simp [Subtype.ext_iff]⟩
 #align subtype.imp_embedding Subtype.impEmbedding
+#align subtype.imp_embedding_apply_coe Subtype.impEmbedding_apply_coe
 
 end Subtype
chore: the style linter shouldn't complain about long #align lines (#1643)
Diff
@@ -152,16 +152,14 @@ theorem equiv_toEmbedding_trans_symm_toEmbedding {α β : Sort _} (e : α ≃ β
     e.toEmbedding.trans e.symm.toEmbedding = Embedding.refl _ := by
   ext
   simp
-#align function.embedding.equiv_to_embedding_trans_symm_to_embedding
-  Function.Embedding.equiv_toEmbedding_trans_symm_toEmbedding
+#align function.embedding.equiv_to_embedding_trans_symm_to_embedding Function.Embedding.equiv_toEmbedding_trans_symm_toEmbedding
 
 @[simp]
 theorem equiv_symm_toEmbedding_trans_toEmbedding {α β : Sort _} (e : α ≃ β) :
     e.symm.toEmbedding.trans e.toEmbedding = Embedding.refl _ := by
   ext
   simp
-#align function.embedding.equiv_symm_to_embedding_trans_to_embedding
-  Function.Embedding.equiv_symm_toEmbedding_trans_toEmbedding
+#align function.embedding.equiv_symm_to_embedding_trans_to_embedding Function.Embedding.equiv_symm_toEmbedding_trans_toEmbedding
 
 /-- Transfer an embedding along a pair of equivalences. -/
 @[simps (config := { fullyApplied := false, simpRhs := true })]
feat: port Data.Finset.Sigma (#1620)
Diff
@@ -318,6 +318,7 @@ variable {α α' : Type _} {β : α → Type _} {β' : α' → Type _}
 def sigmaMk (a : α) : β a ↪ Σx, β x :=
   ⟨Sigma.mk a, sigma_mk_injective⟩
 #align function.embedding.sigma_mk Function.Embedding.sigmaMk
+#align function.embedding.sigma_mk_apply Function.Embedding.sigmaMk_apply
 
 /-- If `f : α ↪ α'` is an embedding and `g : Π a, β α ↪ β' (f α)` is a family
 of embeddings, then `Sigma.map f g` is an embedding. -/
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
@@ -54,15 +54,15 @@ variable {α : Sort u} {β : Sort v} (f : α ≃ β)
 
 /-- Convert an `α ≃ β` to `α ↪ β`.
 
-This is also available as a coercion `equiv.coeEmbedding`.
-The explicit `equiv.toEmbedding` version is preferred though, since the coercion can have issues
+This is also available as a coercion `Equiv.coeEmbedding`.
+The explicit `Equiv.toEmbedding` version is preferred though, since the coercion can have issues
 inferring the type of the resulting embedding. For example:
 
 ```lean
 -- Works:
-example (s : finset (fin 3)) (f : equiv.perm (fin 3)) : s.map f.to_embedding = s.map f := by simp
--- Error, `f` has type `fin 3 ≃ fin 3` but is expected to have type `fin 3 ↪ ?m_1 : Type ?`
-example (s : finset (fin 3)) (f : equiv.perm (fin 3)) : s.map f = s.map f.to_embedding := by simp
+example (s : Finset (Fin 3)) (f : Equiv.Perm (Fin 3)) : s.map f.toEmbedding = s.map f := by simp
+-- Error, `f` has type `Fin 3 ≃ Fin 3` but is expected to have type `Fin 3 ↪ ?m_1 : Type ?`
+example (s : Finset (Fin 3)) (f : Equiv.Perm (Fin 3)) : s.map f = s.map f.toEmbedding := by simp
 ```
 -/
 protected def Equiv.toEmbedding : α ↪ β :=
@@ -133,7 +133,7 @@ theorem apply_eq_iff_eq {α β} (f : α ↪ β) (x y : α) : f x = f y ↔ x = y
   EmbeddingLike.apply_eq_iff_eq f
 #align function.embedding.apply_eq_iff_eq Function.Embedding.apply_eq_iff_eq
 
-/-- The identity map as a `function.embedding`. -/
+/-- The identity map as a `Function.Embedding`. -/
 @[refl, simps (config := { simpRhs := true })]
 protected def refl (α : Sort _) : α ↪ α :=
   ⟨id, injective_id⟩
@@ -210,7 +210,7 @@ theorem setValue_eq {α β} (f : α ↪ β) (a : α) (b : β) [∀ a', Decidable
   simp [setValue]
 #align function.embedding.set_value_eq Function.Embedding.setValue_eq
 
-/-- Embedding into `option α` using `some`. -/
+/-- Embedding into `Option α` using `some`. -/
 @[simps (config := { fullyApplied := false })]
 protected def some {α} : α ↪ Option α :=
   ⟨some, Option.some_injective α⟩
@@ -220,13 +220,13 @@ protected def some {α} : α ↪ Option α :=
 -- `Function.Embedding.coeOption`.
 #align function.embedding.coe_option Function.Embedding.some
 
-/-- A version of `option.map` for `function.embedding`s. -/
+/-- A version of `Option.map` for `Function.Embedding`s. -/
 @[simps (config := { fullyApplied := false })]
 def optionMap {α β} (f : α ↪ β) : Option α ↪ Option β :=
   ⟨Option.map f, Option.map_injective f.injective⟩
 #align function.embedding.option_map Function.Embedding.optionMap
 
-/-- Embedding of a `subtype`. -/
+/-- Embedding of a `Subtype`. -/
 def subtype {α} (p : α → Prop) : Subtype p ↪ α :=
   ⟨Subtype.val, fun _ _ => Subtype.ext⟩
 #align function.embedding.subtype Function.Embedding.subtype
@@ -236,7 +236,7 @@ theorem coe_subtype {α} (p : α → Prop) : ↑(subtype p) = Subtype.val :=
   rfl
 #align function.embedding.coe_subtype Function.Embedding.coe_subtype
 
-/-- `quotient.out` as an embedding. -/
+/-- `Quotient.out` as an embedding. -/
 noncomputable def quotientOut (α) [s : Setoid α] : Quotient s ↪ α :=
   ⟨_, Quotient.out_injective⟩
 #align function.embedding.quotient_out Function.Embedding.quotientOut
@@ -313,14 +313,14 @@ section Sigma
 
 variable {α α' : Type _} {β : α → Type _} {β' : α' → Type _}
 
-/-- `sigma.mk` as an `function.embedding`. -/
+/-- `Sigma.mk` as an `Function.Embedding`. -/
 @[simps apply]
 def sigmaMk (a : α) : β a ↪ Σx, β x :=
   ⟨Sigma.mk a, sigma_mk_injective⟩
 #align function.embedding.sigma_mk Function.Embedding.sigmaMk
 
 /-- If `f : α ↪ α'` is an embedding and `g : Π a, β α ↪ β' (f α)` is a family
-of embeddings, then `sigma.map f g` is an embedding. -/
+of embeddings, then `Sigma.map f g` is an embedding. -/
 @[simps apply]
 def sigmaMap (f : α ↪ α') (g : ∀ a, β a ↪ β' (f a)) : (Σa, β a) ↪ Σa', β' a' :=
   ⟨Sigma.map f fun a => g a, f.injective.sigma_map fun a => (g a).injective⟩
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
@@ -2,6 +2,11 @@
 Copyright (c) 2017 Johannes Hölzl. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Mario Carneiro
+
+! This file was ported from Lean 3 source module logic.embedding.basic
+! leanprover-community/mathlib commit 70d50ecfd4900dd6d328da39ab7ebd516abe4025
+! Please do not edit these lines, except to modify the commit id
+! if you have ported upstream changes.
 -/
 import Mathlib.Data.Option.Basic
 import Mathlib.Data.Prod.PProd

Dependencies 18

19 files ported (100.0%)
8348 lines ported (100.0%)

All dependencies are ported!