data.fun_like.equivMathlib.Data.FunLike.Equiv

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)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(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
@@ -262,7 +262,7 @@ theorem comp_bijective (f : α → β) (e : F) : Function.Bijective (e ∘ f) 
 #print EquivLike.subsingleton_dom /-
 /-- This is not an instance to avoid slowing down every single `subsingleton` typeclass search.-/
 theorem subsingleton_dom [Subsingleton β] : Subsingleton F :=
-  ⟨fun f g => FunLike.ext f g fun x => (right_inv f).Injective <| Subsingleton.elim _ _⟩
+  ⟨fun f g => DFunLike.ext f g fun x => (right_inv f).Injective <| Subsingleton.elim _ _⟩
 #align equiv_like.subsingleton_dom EquivLike.subsingleton_dom
 -/
 
Diff
@@ -3,7 +3,7 @@ Copyright (c) 2021 Anne Baanen. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Anne Baanen
 -/
-import Mathbin.Data.FunLike.Embedding
+import Data.FunLike.Embedding
 
 #align_import data.fun_like.equiv from "leanprover-community/mathlib"@"448144f7ae193a8990cb7473c9e9a01990f64ac7"
 
Diff
@@ -2,14 +2,11 @@
 Copyright (c) 2021 Anne Baanen. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Anne Baanen
-
-! This file was ported from Lean 3 source module data.fun_like.equiv
-! 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
 
+#align_import data.fun_like.equiv from "leanprover-community/mathlib"@"448144f7ae193a8990cb7473c9e9a01990f64ac7"
+
 /-!
 # Typeclass for a type `F` with an injective map to `A ≃ B`
 
Diff
@@ -135,6 +135,7 @@ instead of linearly increasing the work per `my_iso`-related declaration.
 -/
 
 
+#print EquivLike /-
 /-- The class `equiv_like E α β` expresses that terms of type `E` have an
 injective coercion to bijections between `α` and `β`.
 
@@ -149,16 +150,17 @@ class EquivLike (E : Sort _) (α β : outParam (Sort _)) where
   -- The `inv` hypothesis makes this easier to prove with `congr'`
   coe_injective' : ∀ e g, coe e = coe g → inv e = inv g → e = g
 #align equiv_like EquivLike
+-/
 
 namespace EquivLike
 
 variable {E F α β γ : Sort _} [iE : EquivLike E α β] [iF : EquivLike F β γ]
 
-include iE
-
+#print EquivLike.inv_injective /-
 theorem inv_injective : Function.Injective (EquivLike.inv : E → β → α) := fun e g h =>
   coe_injective' e g ((right_inv e).eq_rightInverse (h.symm ▸ left_inv g)) h
 #align equiv_like.inv_injective EquivLike.inv_injective
+-/
 
 #print EquivLike.toEmbeddingLike /-
 instance (priority := 100) toEmbeddingLike : EmbeddingLike E α β
@@ -169,37 +171,52 @@ instance (priority := 100) toEmbeddingLike : EmbeddingLike E α β
 #align equiv_like.to_embedding_like EquivLike.toEmbeddingLike
 -/
 
+#print EquivLike.injective /-
 protected theorem injective (e : E) : Function.Injective e :=
   EmbeddingLike.injective e
 #align equiv_like.injective EquivLike.injective
+-/
 
+#print EquivLike.surjective /-
 protected theorem surjective (e : E) : Function.Surjective e :=
   (right_inv e).Surjective
 #align equiv_like.surjective EquivLike.surjective
+-/
 
+#print EquivLike.bijective /-
 protected theorem bijective (e : E) : Function.Bijective (e : α → β) :=
   ⟨EquivLike.injective e, EquivLike.surjective e⟩
 #align equiv_like.bijective EquivLike.bijective
+-/
 
+#print EquivLike.apply_eq_iff_eq /-
 theorem apply_eq_iff_eq (f : E) {x y : α} : f x = f y ↔ x = y :=
   EmbeddingLike.apply_eq_iff_eq f
 #align equiv_like.apply_eq_iff_eq EquivLike.apply_eq_iff_eq
+-/
 
+#print EquivLike.injective_comp /-
 @[simp]
 theorem injective_comp (e : E) (f : β → γ) : Function.Injective (f ∘ e) ↔ Function.Injective f :=
   Function.Injective.of_comp_iff' f (EquivLike.bijective e)
 #align equiv_like.injective_comp EquivLike.injective_comp
+-/
 
+#print EquivLike.surjective_comp /-
 @[simp]
 theorem surjective_comp (e : E) (f : β → γ) : Function.Surjective (f ∘ e) ↔ Function.Surjective f :=
   (EquivLike.surjective e).of_comp_iff f
 #align equiv_like.surjective_comp EquivLike.surjective_comp
+-/
 
+#print EquivLike.bijective_comp /-
 @[simp]
 theorem bijective_comp (e : E) (f : β → γ) : Function.Bijective (f ∘ e) ↔ Function.Bijective f :=
   (EquivLike.bijective e).of_comp_iff f
 #align equiv_like.bijective_comp EquivLike.bijective_comp
+-/
 
+#print EquivLike.inv_apply_apply /-
 /-- This lemma is only supposed to be used in the generic context, when working with instances
 of classes extending `equiv_like`.
 For concrete isomorphism types such as `equiv`, you should use `equiv.symm_apply_apply`
@@ -210,7 +227,9 @@ TODO: define a generic form of `equiv.symm`. -/
 theorem inv_apply_apply (e : E) (a : α) : EquivLike.inv e (e a) = a :=
   left_inv _ _
 #align equiv_like.inv_apply_apply EquivLike.inv_apply_apply
+-/
 
+#print EquivLike.apply_inv_apply /-
 /-- This lemma is only supposed to be used in the generic context, when working with instances
 of classes extending `equiv_like`.
 For concrete isomorphism types such as `equiv`, you should use `equiv.apply_symm_apply`
@@ -221,24 +240,27 @@ TODO: define a generic form of `equiv.symm`. -/
 theorem apply_inv_apply (e : E) (b : β) : e (EquivLike.inv e b) = b :=
   right_inv _ _
 #align equiv_like.apply_inv_apply EquivLike.apply_inv_apply
+-/
 
-omit iE
-
-include iF
-
+#print EquivLike.comp_injective /-
 theorem comp_injective (f : α → β) (e : F) : Function.Injective (e ∘ f) ↔ Function.Injective f :=
   EmbeddingLike.comp_injective f e
 #align equiv_like.comp_injective EquivLike.comp_injective
+-/
 
+#print EquivLike.comp_surjective /-
 @[simp]
 theorem comp_surjective (f : α → β) (e : F) : Function.Surjective (e ∘ f) ↔ Function.Surjective f :=
   Function.Surjective.of_comp_iff' (EquivLike.bijective e) f
 #align equiv_like.comp_surjective EquivLike.comp_surjective
+-/
 
+#print EquivLike.comp_bijective /-
 @[simp]
 theorem comp_bijective (f : α → β) (e : F) : Function.Bijective (e ∘ f) ↔ Function.Bijective f :=
   (EquivLike.bijective e).of_comp_iff' f
 #align equiv_like.comp_bijective EquivLike.comp_bijective
+-/
 
 #print EquivLike.subsingleton_dom /-
 /-- This is not an instance to avoid slowing down every single `subsingleton` typeclass search.-/
Diff
@@ -135,12 +135,6 @@ instead of linearly increasing the work per `my_iso`-related declaration.
 -/
 
 
-/- warning: equiv_like -> EquivLike is a dubious translation:
-lean 3 declaration is
-  Sort.{u1} -> (outParam.{succ u2} Sort.{u2}) -> (outParam.{succ u3} Sort.{u3}) -> Sort.{max 1 (imax u1 u2 u3) (imax u1 u3 u2)}
-but is expected to have type
-  Sort.{u1} -> (outParam.{succ u2} Sort.{u2}) -> (outParam.{succ u3} Sort.{u3}) -> Sort.{max (max (max 1 u1) u2) u3}
-Case conversion may be inaccurate. Consider using '#align equiv_like EquivLikeₓ'. -/
 /-- The class `equiv_like E α β` expresses that terms of type `E` have an
 injective coercion to bijections between `α` and `β`.
 
@@ -162,12 +156,6 @@ variable {E F α β γ : Sort _} [iE : EquivLike E α β] [iF : EquivLike F β 
 
 include iE
 
-/- warning: equiv_like.inv_injective -> EquivLike.inv_injective is a dubious translation:
-lean 3 declaration is
-  forall {E : Sort.{u1}} {α : Sort.{u2}} {β : Sort.{u3}} [iE : EquivLike.{u1, u2, u3} E α β], Function.Injective.{u1, imax u3 u2} E (β -> α) (EquivLike.inv.{u1, u2, u3} E α β iE)
-but is expected to have type
-  forall {E : Sort.{u3}} {α : Sort.{u1}} {β : Sort.{u2}} [iE : EquivLike.{u3, u1, u2} E α β], Function.Injective.{u3, imax u2 u1} E (β -> α) (EquivLike.inv.{u3, u1, u2} E α β iE)
-Case conversion may be inaccurate. Consider using '#align equiv_like.inv_injective EquivLike.inv_injectiveₓ'. -/
 theorem inv_injective : Function.Injective (EquivLike.inv : E → β → α) := fun e g h =>
   coe_injective' e g ((right_inv e).eq_rightInverse (h.symm ▸ left_inv g)) h
 #align equiv_like.inv_injective EquivLike.inv_injective
@@ -181,85 +169,37 @@ instance (priority := 100) toEmbeddingLike : EmbeddingLike E α β
 #align equiv_like.to_embedding_like EquivLike.toEmbeddingLike
 -/
 
-/- warning: equiv_like.injective -> EquivLike.injective is a dubious translation:
-lean 3 declaration is
-  forall {E : Sort.{u1}} {α : Sort.{u2}} {β : Sort.{u3}} [iE : EquivLike.{u1, u2, u3} E α β] (e : E), Function.Injective.{u2, u3} α β (coeFn.{u1, imax u2 u3} E (fun (_x : E) => α -> β) (FunLike.hasCoeToFun.{u1, u2, u3} E α (fun (_x : α) => β) (EmbeddingLike.toFunLike.{u1, u2, u3} E α β (EquivLike.toEmbeddingLike.{u1, u2, u3} E α β iE))) e)
-but is expected to have type
-  forall {E : Sort.{u1}} {α : Sort.{u3}} {β : Sort.{u2}} [iE : EquivLike.{u1, u3, u2} E α β] (e : E), Function.Injective.{u3, u2} α β (FunLike.coe.{u1, u3, u2} E α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{u1, u3, u2} E α β (EquivLike.toEmbeddingLike.{u1, u3, u2} E α β iE)) e)
-Case conversion may be inaccurate. Consider using '#align equiv_like.injective EquivLike.injectiveₓ'. -/
 protected theorem injective (e : E) : Function.Injective e :=
   EmbeddingLike.injective e
 #align equiv_like.injective EquivLike.injective
 
-/- warning: equiv_like.surjective -> EquivLike.surjective is a dubious translation:
-lean 3 declaration is
-  forall {E : Sort.{u1}} {α : Sort.{u2}} {β : Sort.{u3}} [iE : EquivLike.{u1, u2, u3} E α β] (e : E), Function.Surjective.{u2, u3} α β (coeFn.{u1, imax u2 u3} E (fun (_x : E) => α -> β) (FunLike.hasCoeToFun.{u1, u2, u3} E α (fun (_x : α) => β) (EmbeddingLike.toFunLike.{u1, u2, u3} E α β (EquivLike.toEmbeddingLike.{u1, u2, u3} E α β iE))) e)
-but is expected to have type
-  forall {E : Sort.{u1}} {α : Sort.{u3}} {β : Sort.{u2}} [iE : EquivLike.{u1, u3, u2} E α β] (e : E), Function.Surjective.{u3, u2} α β (FunLike.coe.{u1, u3, u2} E α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{u1, u3, u2} E α β (EquivLike.toEmbeddingLike.{u1, u3, u2} E α β iE)) e)
-Case conversion may be inaccurate. Consider using '#align equiv_like.surjective EquivLike.surjectiveₓ'. -/
 protected theorem surjective (e : E) : Function.Surjective e :=
   (right_inv e).Surjective
 #align equiv_like.surjective EquivLike.surjective
 
-/- warning: equiv_like.bijective -> EquivLike.bijective is a dubious translation:
-lean 3 declaration is
-  forall {E : Sort.{u1}} {α : Sort.{u2}} {β : Sort.{u3}} [iE : EquivLike.{u1, u2, u3} E α β] (e : E), Function.Bijective.{u2, u3} α β (coeFn.{u1, imax u2 u3} E (fun (_x : E) => α -> β) (FunLike.hasCoeToFun.{u1, u2, u3} E α (fun (_x : α) => β) (EmbeddingLike.toFunLike.{u1, u2, u3} E α β (EquivLike.toEmbeddingLike.{u1, u2, u3} E α β iE))) e)
-but is expected to have type
-  forall {E : Sort.{u1}} {α : Sort.{u3}} {β : Sort.{u2}} [iE : EquivLike.{u1, u3, u2} E α β] (e : E), Function.Bijective.{u3, u2} α β (FunLike.coe.{u1, u3, u2} E α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{u1, u3, u2} E α β (EquivLike.toEmbeddingLike.{u1, u3, u2} E α β iE)) e)
-Case conversion may be inaccurate. Consider using '#align equiv_like.bijective EquivLike.bijectiveₓ'. -/
 protected theorem bijective (e : E) : Function.Bijective (e : α → β) :=
   ⟨EquivLike.injective e, EquivLike.surjective e⟩
 #align equiv_like.bijective EquivLike.bijective
 
-/- warning: equiv_like.apply_eq_iff_eq -> EquivLike.apply_eq_iff_eq is a dubious translation:
-lean 3 declaration is
-  forall {E : Sort.{u1}} {α : Sort.{u2}} {β : Sort.{u3}} [iE : EquivLike.{u1, u2, u3} E α β] (f : E) {x : α} {y : α}, Iff (Eq.{u3} β (coeFn.{u1, imax u2 u3} E (fun (_x : E) => α -> β) (FunLike.hasCoeToFun.{u1, u2, u3} E α (fun (_x : α) => β) (EmbeddingLike.toFunLike.{u1, u2, u3} E α β (EquivLike.toEmbeddingLike.{u1, u2, u3} E α β iE))) f x) (coeFn.{u1, imax u2 u3} E (fun (_x : E) => α -> β) (FunLike.hasCoeToFun.{u1, u2, u3} E α (fun (_x : α) => β) (EmbeddingLike.toFunLike.{u1, u2, u3} E α β (EquivLike.toEmbeddingLike.{u1, u2, u3} E α β iE))) f y)) (Eq.{u2} α x y)
-but is expected to have type
-  forall {E : Sort.{u2}} {α : Sort.{u1}} {β : Sort.{u3}} [iE : EquivLike.{u2, u1, u3} E α β] (f : E) {x : α} {y : α}, Iff (Eq.{u3} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) x) (FunLike.coe.{u2, u1, u3} E α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{u2, u1, u3} E α β (EquivLike.toEmbeddingLike.{u2, u1, u3} E α β iE)) f x) (FunLike.coe.{u2, u1, u3} E α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{u2, u1, u3} E α β (EquivLike.toEmbeddingLike.{u2, u1, u3} E α β iE)) f y)) (Eq.{u1} α x y)
-Case conversion may be inaccurate. Consider using '#align equiv_like.apply_eq_iff_eq EquivLike.apply_eq_iff_eqₓ'. -/
 theorem apply_eq_iff_eq (f : E) {x y : α} : f x = f y ↔ x = y :=
   EmbeddingLike.apply_eq_iff_eq f
 #align equiv_like.apply_eq_iff_eq EquivLike.apply_eq_iff_eq
 
-/- warning: equiv_like.injective_comp -> EquivLike.injective_comp is a dubious translation:
-lean 3 declaration is
-  forall {E : Sort.{u1}} {α : Sort.{u2}} {β : Sort.{u3}} {γ : Sort.{u4}} [iE : EquivLike.{u1, u2, u3} E α β] (e : E) (f : β -> γ), Iff (Function.Injective.{u2, u4} α γ (Function.comp.{u2, u3, u4} α β γ f (coeFn.{u1, imax u2 u3} E (fun (_x : E) => α -> β) (FunLike.hasCoeToFun.{u1, u2, u3} E α (fun (_x : α) => β) (EmbeddingLike.toFunLike.{u1, u2, u3} E α β (EquivLike.toEmbeddingLike.{u1, u2, u3} E α β iE))) e))) (Function.Injective.{u3, u4} β γ f)
-but is expected to have type
-  forall {E : Sort.{u1}} {α : Sort.{u4}} {β : Sort.{u2}} {γ : Sort.{u3}} [iE : EquivLike.{u1, u4, u2} E α β] (e : E) (f : β -> γ), Iff (Function.Injective.{u4, u3} α γ (Function.comp.{u4, u2, u3} α β γ f (FunLike.coe.{u1, u4, u2} E α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{u1, u4, u2} E α β (EquivLike.toEmbeddingLike.{u1, u4, u2} E α β iE)) e))) (Function.Injective.{u2, u3} β γ f)
-Case conversion may be inaccurate. Consider using '#align equiv_like.injective_comp EquivLike.injective_compₓ'. -/
 @[simp]
 theorem injective_comp (e : E) (f : β → γ) : Function.Injective (f ∘ e) ↔ Function.Injective f :=
   Function.Injective.of_comp_iff' f (EquivLike.bijective e)
 #align equiv_like.injective_comp EquivLike.injective_comp
 
-/- warning: equiv_like.surjective_comp -> EquivLike.surjective_comp is a dubious translation:
-lean 3 declaration is
-  forall {E : Sort.{u1}} {α : Sort.{u2}} {β : Sort.{u3}} {γ : Sort.{u4}} [iE : EquivLike.{u1, u2, u3} E α β] (e : E) (f : β -> γ), Iff (Function.Surjective.{u2, u4} α γ (Function.comp.{u2, u3, u4} α β γ f (coeFn.{u1, imax u2 u3} E (fun (_x : E) => α -> β) (FunLike.hasCoeToFun.{u1, u2, u3} E α (fun (_x : α) => β) (EmbeddingLike.toFunLike.{u1, u2, u3} E α β (EquivLike.toEmbeddingLike.{u1, u2, u3} E α β iE))) e))) (Function.Surjective.{u3, u4} β γ f)
-but is expected to have type
-  forall {E : Sort.{u1}} {α : Sort.{u4}} {β : Sort.{u2}} {γ : Sort.{u3}} [iE : EquivLike.{u1, u4, u2} E α β] (e : E) (f : β -> γ), Iff (Function.Surjective.{u4, u3} α γ (Function.comp.{u4, u2, u3} α β γ f (FunLike.coe.{u1, u4, u2} E α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{u1, u4, u2} E α β (EquivLike.toEmbeddingLike.{u1, u4, u2} E α β iE)) e))) (Function.Surjective.{u2, u3} β γ f)
-Case conversion may be inaccurate. Consider using '#align equiv_like.surjective_comp EquivLike.surjective_compₓ'. -/
 @[simp]
 theorem surjective_comp (e : E) (f : β → γ) : Function.Surjective (f ∘ e) ↔ Function.Surjective f :=
   (EquivLike.surjective e).of_comp_iff f
 #align equiv_like.surjective_comp EquivLike.surjective_comp
 
-/- warning: equiv_like.bijective_comp -> EquivLike.bijective_comp is a dubious translation:
-lean 3 declaration is
-  forall {E : Sort.{u1}} {α : Sort.{u2}} {β : Sort.{u3}} {γ : Sort.{u4}} [iE : EquivLike.{u1, u2, u3} E α β] (e : E) (f : β -> γ), Iff (Function.Bijective.{u2, u4} α γ (Function.comp.{u2, u3, u4} α β γ f (coeFn.{u1, imax u2 u3} E (fun (_x : E) => α -> β) (FunLike.hasCoeToFun.{u1, u2, u3} E α (fun (_x : α) => β) (EmbeddingLike.toFunLike.{u1, u2, u3} E α β (EquivLike.toEmbeddingLike.{u1, u2, u3} E α β iE))) e))) (Function.Bijective.{u3, u4} β γ f)
-but is expected to have type
-  forall {E : Sort.{u1}} {α : Sort.{u4}} {β : Sort.{u2}} {γ : Sort.{u3}} [iE : EquivLike.{u1, u4, u2} E α β] (e : E) (f : β -> γ), Iff (Function.Bijective.{u4, u3} α γ (Function.comp.{u4, u2, u3} α β γ f (FunLike.coe.{u1, u4, u2} E α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{u1, u4, u2} E α β (EquivLike.toEmbeddingLike.{u1, u4, u2} E α β iE)) e))) (Function.Bijective.{u2, u3} β γ f)
-Case conversion may be inaccurate. Consider using '#align equiv_like.bijective_comp EquivLike.bijective_compₓ'. -/
 @[simp]
 theorem bijective_comp (e : E) (f : β → γ) : Function.Bijective (f ∘ e) ↔ Function.Bijective f :=
   (EquivLike.bijective e).of_comp_iff f
 #align equiv_like.bijective_comp EquivLike.bijective_comp
 
-/- warning: equiv_like.inv_apply_apply -> EquivLike.inv_apply_apply is a dubious translation:
-lean 3 declaration is
-  forall {E : Sort.{u1}} {α : Sort.{u2}} {β : Sort.{u3}} [iE : EquivLike.{u1, u2, u3} E α β] (e : E) (a : α), Eq.{u2} α (EquivLike.inv.{u1, u2, u3} E α β iE e (coeFn.{u1, imax u2 u3} E (fun (_x : E) => α -> β) (FunLike.hasCoeToFun.{u1, u2, u3} E α (fun (_x : α) => β) (EmbeddingLike.toFunLike.{u1, u2, u3} E α β (EquivLike.toEmbeddingLike.{u1, u2, u3} E α β iE))) e a)) a
-but is expected to have type
-  forall {E : Sort.{u2}} {α : Sort.{u3}} {β : Sort.{u1}} [iE : EquivLike.{u2, u3, u1} E α β] (e : E) (a : α), Eq.{u3} α (EquivLike.inv.{u2, u3, u1} E α ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) a) iE e (FunLike.coe.{u2, u3, u1} E α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{u2, u3, u1} E α β (EquivLike.toEmbeddingLike.{u2, u3, u1} E α β iE)) e a)) a
-Case conversion may be inaccurate. Consider using '#align equiv_like.inv_apply_apply EquivLike.inv_apply_applyₓ'. -/
 /-- This lemma is only supposed to be used in the generic context, when working with instances
 of classes extending `equiv_like`.
 For concrete isomorphism types such as `equiv`, you should use `equiv.symm_apply_apply`
@@ -271,12 +211,6 @@ theorem inv_apply_apply (e : E) (a : α) : EquivLike.inv e (e a) = a :=
   left_inv _ _
 #align equiv_like.inv_apply_apply EquivLike.inv_apply_apply
 
-/- warning: equiv_like.apply_inv_apply -> EquivLike.apply_inv_apply is a dubious translation:
-lean 3 declaration is
-  forall {E : Sort.{u1}} {α : Sort.{u2}} {β : Sort.{u3}} [iE : EquivLike.{u1, u2, u3} E α β] (e : E) (b : β), Eq.{u3} β (coeFn.{u1, imax u2 u3} E (fun (_x : E) => α -> β) (FunLike.hasCoeToFun.{u1, u2, u3} E α (fun (_x : α) => β) (EmbeddingLike.toFunLike.{u1, u2, u3} E α β (EquivLike.toEmbeddingLike.{u1, u2, u3} E α β iE))) e (EquivLike.inv.{u1, u2, u3} E α β iE e b)) b
-but is expected to have type
-  forall {E : Sort.{u2}} {α : Sort.{u1}} {β : Sort.{u3}} [iE : EquivLike.{u2, u1, u3} E α β] (e : E) (b : β), Eq.{u3} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) (EquivLike.inv.{u2, u1, u3} E α β iE e b)) (FunLike.coe.{u2, u1, u3} E α (fun (_x : α) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : α) => β) _x) (EmbeddingLike.toFunLike.{u2, u1, u3} E α β (EquivLike.toEmbeddingLike.{u2, u1, u3} E α β iE)) e (EquivLike.inv.{u2, u1, u3} E α β iE e b)) b
-Case conversion may be inaccurate. Consider using '#align equiv_like.apply_inv_apply EquivLike.apply_inv_applyₓ'. -/
 /-- This lemma is only supposed to be used in the generic context, when working with instances
 of classes extending `equiv_like`.
 For concrete isomorphism types such as `equiv`, you should use `equiv.apply_symm_apply`
@@ -292,33 +226,15 @@ omit iE
 
 include iF
 
-/- warning: equiv_like.comp_injective -> EquivLike.comp_injective is a dubious translation:
-lean 3 declaration is
-  forall {F : Sort.{u1}} {α : Sort.{u2}} {β : Sort.{u3}} {γ : Sort.{u4}} [iF : EquivLike.{u1, u3, u4} F β γ] (f : α -> β) (e : F), Iff (Function.Injective.{u2, u4} α γ (Function.comp.{u2, u3, u4} α β γ (coeFn.{u1, imax u3 u4} F (fun (_x : F) => β -> γ) (FunLike.hasCoeToFun.{u1, u3, u4} F β (fun (_x : β) => γ) (EmbeddingLike.toFunLike.{u1, u3, u4} F β γ (EquivLike.toEmbeddingLike.{u1, u3, u4} F β γ iF))) e) f)) (Function.Injective.{u2, u3} α β f)
-but is expected to have type
-  forall {F : Sort.{u1}} {α : Sort.{u4}} {β : Sort.{u2}} {γ : Sort.{u3}} [iF : EquivLike.{u1, u2, u3} F β γ] (f : α -> β) (e : F), Iff (Function.Injective.{u4, u3} α γ (Function.comp.{u4, u2, u3} α β γ (FunLike.coe.{u1, u2, u3} F β (fun (_x : β) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : β) => γ) _x) (EmbeddingLike.toFunLike.{u1, u2, u3} F β γ (EquivLike.toEmbeddingLike.{u1, u2, u3} F β γ iF)) e) f)) (Function.Injective.{u4, u2} α β f)
-Case conversion may be inaccurate. Consider using '#align equiv_like.comp_injective EquivLike.comp_injectiveₓ'. -/
 theorem comp_injective (f : α → β) (e : F) : Function.Injective (e ∘ f) ↔ Function.Injective f :=
   EmbeddingLike.comp_injective f e
 #align equiv_like.comp_injective EquivLike.comp_injective
 
-/- warning: equiv_like.comp_surjective -> EquivLike.comp_surjective is a dubious translation:
-lean 3 declaration is
-  forall {F : Sort.{u1}} {α : Sort.{u2}} {β : Sort.{u3}} {γ : Sort.{u4}} [iF : EquivLike.{u1, u3, u4} F β γ] (f : α -> β) (e : F), Iff (Function.Surjective.{u2, u4} α γ (Function.comp.{u2, u3, u4} α β γ (coeFn.{u1, imax u3 u4} F (fun (_x : F) => β -> γ) (FunLike.hasCoeToFun.{u1, u3, u4} F β (fun (_x : β) => γ) (EmbeddingLike.toFunLike.{u1, u3, u4} F β γ (EquivLike.toEmbeddingLike.{u1, u3, u4} F β γ iF))) e) f)) (Function.Surjective.{u2, u3} α β f)
-but is expected to have type
-  forall {F : Sort.{u1}} {α : Sort.{u4}} {β : Sort.{u2}} {γ : Sort.{u3}} [iF : EquivLike.{u1, u2, u3} F β γ] (f : α -> β) (e : F), Iff (Function.Surjective.{u4, u3} α γ (Function.comp.{u4, u2, u3} α β γ (FunLike.coe.{u1, u2, u3} F β (fun (_x : β) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : β) => γ) _x) (EmbeddingLike.toFunLike.{u1, u2, u3} F β γ (EquivLike.toEmbeddingLike.{u1, u2, u3} F β γ iF)) e) f)) (Function.Surjective.{u4, u2} α β f)
-Case conversion may be inaccurate. Consider using '#align equiv_like.comp_surjective EquivLike.comp_surjectiveₓ'. -/
 @[simp]
 theorem comp_surjective (f : α → β) (e : F) : Function.Surjective (e ∘ f) ↔ Function.Surjective f :=
   Function.Surjective.of_comp_iff' (EquivLike.bijective e) f
 #align equiv_like.comp_surjective EquivLike.comp_surjective
 
-/- warning: equiv_like.comp_bijective -> EquivLike.comp_bijective is a dubious translation:
-lean 3 declaration is
-  forall {F : Sort.{u1}} {α : Sort.{u2}} {β : Sort.{u3}} {γ : Sort.{u4}} [iF : EquivLike.{u1, u3, u4} F β γ] (f : α -> β) (e : F), Iff (Function.Bijective.{u2, u4} α γ (Function.comp.{u2, u3, u4} α β γ (coeFn.{u1, imax u3 u4} F (fun (_x : F) => β -> γ) (FunLike.hasCoeToFun.{u1, u3, u4} F β (fun (_x : β) => γ) (EmbeddingLike.toFunLike.{u1, u3, u4} F β γ (EquivLike.toEmbeddingLike.{u1, u3, u4} F β γ iF))) e) f)) (Function.Bijective.{u2, u3} α β f)
-but is expected to have type
-  forall {F : Sort.{u1}} {α : Sort.{u4}} {β : Sort.{u2}} {γ : Sort.{u3}} [iF : EquivLike.{u1, u2, u3} F β γ] (f : α -> β) (e : F), Iff (Function.Bijective.{u4, u3} α γ (Function.comp.{u4, u2, u3} α β γ (FunLike.coe.{u1, u2, u3} F β (fun (_x : β) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : β) => γ) _x) (EmbeddingLike.toFunLike.{u1, u2, u3} F β γ (EquivLike.toEmbeddingLike.{u1, u2, u3} F β γ iF)) e) f)) (Function.Bijective.{u4, u2} α β f)
-Case conversion may be inaccurate. Consider using '#align equiv_like.comp_bijective EquivLike.comp_bijectiveₓ'. -/
 @[simp]
 theorem comp_bijective (f : α → β) (e : F) : Function.Bijective (e ∘ f) ↔ Function.Bijective f :=
   (EquivLike.bijective e).of_comp_iff' f

Changes in mathlib4

mathlib3
mathlib4
style: replace '.-/' by '. -/' (#11938)

Purely automatic replacement. If this is in any way controversial; I'm happy to just close this PR.

Diff
@@ -233,7 +233,7 @@ theorem comp_bijective (f : α → β) (e : F) : Function.Bijective (e ∘ f) 
   (EquivLike.bijective e).of_comp_iff' f
 #align equiv_like.comp_bijective EquivLike.comp_bijective
 
-/-- This is not an instance to avoid slowing down every single `Subsingleton` typeclass search.-/
+/-- This is not an instance to avoid slowing down every single `Subsingleton` typeclass search. -/
 lemma subsingleton_dom [Subsingleton β] : Subsingleton F :=
   ⟨fun f g ↦ DFunLike.ext f g fun _ ↦ (right_inv f).injective <| Subsingleton.elim _ _⟩
 #align equiv_like.subsingleton_dom EquivLike.subsingleton_dom
chore(Data/Funlike): update examples and replace Lean 3 syntax (#11409)

Fully update the module docstrings (in particular, the examples given therein) after #8386.

This includes switching to where syntax, but also replacing Lean 3 syntax, replacing => by "\mapsto" while at it and indenting code per the style guide. As such, it's also a follow-up to #11301.

Co-authored-by: @Vierkantor

Co-authored-by: Vierkantor <vierkantor@vierkantor.com>

Diff
@@ -14,37 +14,33 @@ This typeclass is primarily for use by isomorphisms like `MonoidEquiv` and `Line
 
 ## Basic usage of `EquivLike`
 
-A typical type of morphisms should be declared as:
+A typical type of isomorphisms should be declared as:
 ```
-structure MyIso (A B : Type*) [MyClass A] [MyClass B]
-  extends Equiv A B :=
-(map_op' : ∀ {x y : A}, toFun (MyClass.op x y) = MyClass.op (toFun x) (toFun y))
+structure MyIso (A B : Type*) [MyClass A] [MyClass B] extends Equiv A B :=
+  (map_op' : ∀ (x y : A), toFun (MyClass.op x y) = MyClass.op (toFun x) (toFun y))
 
 namespace MyIso
 
 variable (A B : Type*) [MyClass A] [MyClass B]
 
--- This instance is optional if you follow the "Isomorphism class" design below:
-instance : EquivLike (MyIso A B) A (λ _, B) :=
-  { coe := MyIso.toEquiv.toFun,
-    inv := MyIso.toEquiv.invFun,
-    left_inv := MyIso.toEquiv.left_inv,
-    right_inv := MyIso.toEquiv.right_inv,
-    coe_injective' := λ f g h, by cases f; cases g; congr' }
-
-/-- Helper instance for when there's too many metavariables to apply `EquivLike.coe` directly. -/
-instance : CoeFun (MyIso A B) := DFunLike.instCoeFunForAll
+instance instEquivLike : EquivLike (MyIso A B) A B where
+  coe f := f.toFun
+  inv f := f.invFun
+  left_inv f := f.left_inv
+  right_inv f := f.right_inv
+  coe_injective' f g h₁ h₂ := by cases f; cases g; congr; exact EquivLike.coe_injective' _ _ h₁ h₂
 
 @[ext] theorem ext {f g : MyIso A B} (h : ∀ x, f x = g x) : f = g := DFunLike.ext f g h
 
 /-- Copy of a `MyIso` with a new `toFun` equal to the old one. Useful to fix definitional
 equalities. -/
-protected def copy (f : MyIso A B) (f' : A → B) (f_inv : B → A) (h : f' = ⇑f) : MyIso A B :=
-  { toFun := f',
-    invFun := f_inv,
-    left_inv := h.symm ▸ f.left_inv,
-    right_inv := h.symm ▸ f.right_inv,
-    map_op' := h.symm ▸ f.map_op' }
+protected def copy (f : MyIso A B) (f' : A → B) (f_inv : B → A)
+    (h₁ : f' = f) (h₂ : f_inv = f.invFun) : MyIso A B where
+  toFun := f'
+  invFun := f_inv
+  left_inv := h₁.symm ▸ h₂.symm ▸ f.left_inv
+  right_inv := h₁.symm ▸ h₂.symm ▸ f.right_inv
+  map_op' := h₁.symm ▸ f.map_op'
 
 end MyIso
 ```
@@ -60,61 +56,67 @@ the axioms of your new type of isomorphisms.
 Continuing the example above:
 
 ```
-
 /-- `MyIsoClass F A B` states that `F` is a type of `MyClass.op`-preserving morphisms.
 You should extend this class when you extend `MyIso`. -/
 class MyIsoClass (F : Type*) (A B : outParam <| Type*) [MyClass A] [MyClass B]
-  extends EquivLike F A (λ _, B), MyHomClass F A B
+    [EquivLike F A B]
+    extends MyHomClass F A B
+
+namespace MyIso
+
+variable {A B : Type*} [MyClass A] [MyClass B]
 
-end
+-- This goes after `MyIsoClass.instEquivLike`:
+instance : MyIsoClass (MyIso A B) A B where
+  map_op := MyIso.map_op'
 
--- You can replace `MyIso.EquivLike` with the below instance:
-instance : MyIsoClass (MyIso A B) A B :=
-  { coe := MyIso.toFun,
-    inv := MyIso.invFun,
-    left_inv := MyIso.left_inv,
-    right_inv := MyIso.right_inv,
-    coe_injective' := λ f g h, by cases f; cases g; congr',
-    map_op := MyIso.map_op' }
+-- [Insert `ext` and `copy` here]
 
--- [Insert `CoeFun`, `ext` and `copy` here]
+end MyIso
 ```
 
 The second step is to add instances of your new `MyIsoClass` for all types extending `MyIso`.
 Typically, you can just declare a new class analogous to `MyIsoClass`:
 
 ```
-structure CoolerIso (A B : Type*) [CoolClass A] [CoolClass B]
-  extends MyIso A B :=
-(map_cool' : toFun CoolClass.cool = CoolClass.cool)
-
-section
-set_option old_structure_cmd true
+structure CoolerIso (A B : Type*) [CoolClass A] [CoolClass B] extends MyIso A B :=
+  (map_cool' : toFun CoolClass.cool = CoolClass.cool)
 
 class CoolerIsoClass (F : Type*) (A B : outParam <| Type*) [CoolClass A] [CoolClass B]
-  extends MyIsoClass F A B :=
-(map_cool : ∀ (f : F), f CoolClass.cool = CoolClass.cool)
+    [EquivLike F A B]
+    extends MyIsoClass F A B :=
+  (map_cool : ∀ (f : F), f CoolClass.cool = CoolClass.cool)
+
+@[simp] lemma map_cool {F A B : Type*} [CoolClass A] [CoolClass B]
+    [EquivLike F A B] [CoolerIsoClass F A B] (f : F) :
+    f CoolClass.cool = CoolClass.cool :=
+  CoolerIsoClass.map_cool _
+
+namespace CoolerIso
+
+variable {A B : Type*} [CoolClass A] [CoolClass B]
 
-end
+instance : EquivLike (CoolerIso A B) A B where
+  coe f := f.toFun
+  inv f := f.invFun
+  left_inv f := f.left_inv
+  right_inv f := f.right_inv
+  coe_injective' f g h₁ h₂ := by cases f; cases g; congr; exact EquivLike.coe_injective' _ _ h₁ h₂
 
-@[simp] lemma map_cool {F A B : Type*} [CoolClass A] [CoolClass B] [CoolerIsoClass F A B]
-  (f : F) : f CoolClass.cool = CoolClass.cool :=
-CoolerIsoClass.map_cool
+instance : CoolerIsoClass (CoolerIso A B) A B where
+  map_op f := f.map_op'
+  map_cool f := f.map_cool'
 
-instance : CoolerIsoClass (CoolerIso A B) A B :=
-  { coe := CoolerIso.toFun,
-    coe_injective' := λ f g h, by cases f; cases g; congr',
-    map_op := CoolerIso.map_op',
-    map_cool := CoolerIso.map_cool' }
+-- [Insert `ext` and `copy` here]
 
--- [Insert `CoeFun`, `ext` and `copy` here]
+end CoolerIso
 ```
 
 Then any declaration taking a specific type of morphisms as parameter can instead take the
 class you just defined:
 ```
 -- Compare with: lemma do_something (f : MyIso A B) : sorry := sorry
-lemma do_something {F : Type*} [MyIsoClass F A B] (f : F) : sorry := sorry
+lemma do_something {F : Type*} [EquivLike F A B] [MyIsoClass F A B] (f : F) : sorry := sorry
 ```
 
 This means anything set up for `MyIso`s will automatically work for `CoolerIsoClass`es,
doc: replace variables, universes' syntax in doc comments (#11404)

It's deprecated in favour of variable; likely a leftover from the port. Also replace universes, which is invalid now.

Diff
@@ -22,7 +22,7 @@ structure MyIso (A B : Type*) [MyClass A] [MyClass B]
 
 namespace MyIso
 
-variables (A B : Type*) [MyClass A] [MyClass B]
+variable (A B : Type*) [MyClass A] [MyClass B]
 
 -- This instance is optional if you follow the "Isomorphism class" design below:
 instance : EquivLike (MyIso A B) A (λ _, B) :=
feat(Algebra/Ring/Equiv): add lemma isUnit_iff (#11237)

Add one lemma stating that an element is a unit if and only if its image through a ring equivalence is a unit.

Diff
@@ -130,7 +130,7 @@ injective coercion to bijections between `α` and `β`.
 Note that this does not directly extend `FunLike`, nor take `FunLike` as a parameter,
 so we can state `coe_injective'` in a nicer way.
 
-This typeclass is used in the definition of the homomorphism typeclasses,
+This typeclass is used in the definition of the isomorphism (or equivalence) typeclasses,
 such as `ZeroEquivClass`, `MulEquivClass`, `MonoidEquivClass`, ....
 -/
 class EquivLike (E : Sort*) (α β : outParam (Sort*)) where
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
@@ -127,6 +127,9 @@ instead of linearly increasing the work per `MyIso`-related declaration.
 /-- The class `EquivLike E α β` expresses that terms of type `E` have an
 injective coercion to bijections between `α` and `β`.
 
+Note that this does not directly extend `FunLike`, nor take `FunLike` as a parameter,
+so we can state `coe_injective'` in a nicer way.
+
 This typeclass is used in the definition of the homomorphism typeclasses,
 such as `ZeroEquivClass`, `MulEquivClass`, `MonoidEquivClass`, ....
 -/
@@ -153,10 +156,12 @@ theorem inv_injective : Function.Injective (EquivLike.inv : E → β → α) :=
   coe_injective' e g ((right_inv e).eq_rightInverse (h.symm ▸ left_inv g)) h
 #align equiv_like.inv_injective EquivLike.inv_injective
 
-instance (priority := 100) toEmbeddingLike : EmbeddingLike E α β where
+instance (priority := 100) toFunLike : FunLike E α β where
   coe := (coe : E → α → β)
   coe_injective' e g h :=
     coe_injective' e g h ((left_inv e).eq_rightInverse (h.symm ▸ right_inv g))
+
+instance (priority := 100) toEmbeddingLike : EmbeddingLike E α β where
   injective' e := (left_inv e).injective
 
 protected theorem injective (e : E) : Function.Injective e :=
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
@@ -33,9 +33,9 @@ instance : EquivLike (MyIso A B) A (λ _, B) :=
     coe_injective' := λ f g h, by cases f; cases g; congr' }
 
 /-- Helper instance for when there's too many metavariables to apply `EquivLike.coe` directly. -/
-instance : CoeFun (MyIso A B) := FunLike.instCoeFunForAll
+instance : CoeFun (MyIso A B) := DFunLike.instCoeFunForAll
 
-@[ext] theorem ext {f g : MyIso A B} (h : ∀ x, f x = g x) : f = g := FunLike.ext f g h
+@[ext] theorem ext {f g : MyIso A B} (h : ∀ x, f x = g x) : f = g := DFunLike.ext f g h
 
 /-- Copy of a `MyIso` with a new `toFun` equal to the old one. Useful to fix definitional
 equalities. -/
@@ -228,7 +228,7 @@ theorem comp_bijective (f : α → β) (e : F) : Function.Bijective (e ∘ f) 
 
 /-- This is not an instance to avoid slowing down every single `Subsingleton` typeclass search.-/
 lemma subsingleton_dom [Subsingleton β] : Subsingleton F :=
-  ⟨fun f g ↦ FunLike.ext f g fun _ ↦ (right_inv f).injective <| Subsingleton.elim _ _⟩
+  ⟨fun f g ↦ DFunLike.ext f g fun _ ↦ (right_inv f).injective <| Subsingleton.elim _ _⟩
 #align equiv_like.subsingleton_dom EquivLike.subsingleton_dom
 
 end EquivLike
chore(*): replace $ with <| (#9319)

See Zulip thread for the discussion.

Diff
@@ -228,7 +228,7 @@ theorem comp_bijective (f : α → β) (e : F) : Function.Bijective (e ∘ f) 
 
 /-- This is not an instance to avoid slowing down every single `Subsingleton` typeclass search.-/
 lemma subsingleton_dom [Subsingleton β] : Subsingleton F :=
-  ⟨fun f g ↦ FunLike.ext f g fun _ ↦ (right_inv f).injective $ Subsingleton.elim _ _⟩
+  ⟨fun f g ↦ FunLike.ext f g fun _ ↦ (right_inv f).injective <| Subsingleton.elim _ _⟩
 #align equiv_like.subsingleton_dom EquivLike.subsingleton_dom
 
 end EquivLike
chore(*): drop $/<| before fun (#9361)

Subset of #9319

Diff
@@ -228,7 +228,7 @@ theorem comp_bijective (f : α → β) (e : F) : Function.Bijective (e ∘ f) 
 
 /-- This is not an instance to avoid slowing down every single `Subsingleton` typeclass search.-/
 lemma subsingleton_dom [Subsingleton β] : Subsingleton F :=
-  ⟨fun f g ↦ FunLike.ext f g $ fun _ ↦ (right_inv f).injective $ Subsingleton.elim _ _⟩
+  ⟨fun f g ↦ FunLike.ext f g fun _ ↦ (right_inv f).injective $ Subsingleton.elim _ _⟩
 #align equiv_like.subsingleton_dom EquivLike.subsingleton_dom
 
 end EquivLike
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
@@ -16,13 +16,13 @@ This typeclass is primarily for use by isomorphisms like `MonoidEquiv` and `Line
 
 A typical type of morphisms should be declared as:
 ```
-structure MyIso (A B : Type _) [MyClass A] [MyClass B]
+structure MyIso (A B : Type*) [MyClass A] [MyClass B]
   extends Equiv A B :=
 (map_op' : ∀ {x y : A}, toFun (MyClass.op x y) = MyClass.op (toFun x) (toFun y))
 
 namespace MyIso
 
-variables (A B : Type _) [MyClass A] [MyClass B]
+variables (A B : Type*) [MyClass A] [MyClass B]
 
 -- This instance is optional if you follow the "Isomorphism class" design below:
 instance : EquivLike (MyIso A B) A (λ _, B) :=
@@ -63,7 +63,7 @@ Continuing the example above:
 
 /-- `MyIsoClass F A B` states that `F` is a type of `MyClass.op`-preserving morphisms.
 You should extend this class when you extend `MyIso`. -/
-class MyIsoClass (F : Type _) (A B : outParam <| Type _) [MyClass A] [MyClass B]
+class MyIsoClass (F : Type*) (A B : outParam <| Type*) [MyClass A] [MyClass B]
   extends EquivLike F A (λ _, B), MyHomClass F A B
 
 end
@@ -84,20 +84,20 @@ The second step is to add instances of your new `MyIsoClass` for all types exten
 Typically, you can just declare a new class analogous to `MyIsoClass`:
 
 ```
-structure CoolerIso (A B : Type _) [CoolClass A] [CoolClass B]
+structure CoolerIso (A B : Type*) [CoolClass A] [CoolClass B]
   extends MyIso A B :=
 (map_cool' : toFun CoolClass.cool = CoolClass.cool)
 
 section
 set_option old_structure_cmd true
 
-class CoolerIsoClass (F : Type _) (A B : outParam <| Type _) [CoolClass A] [CoolClass B]
+class CoolerIsoClass (F : Type*) (A B : outParam <| Type*) [CoolClass A] [CoolClass B]
   extends MyIsoClass F A B :=
 (map_cool : ∀ (f : F), f CoolClass.cool = CoolClass.cool)
 
 end
 
-@[simp] lemma map_cool {F A B : Type _} [CoolClass A] [CoolClass B] [CoolerIsoClass F A B]
+@[simp] lemma map_cool {F A B : Type*} [CoolClass A] [CoolClass B] [CoolerIsoClass F A B]
   (f : F) : f CoolClass.cool = CoolClass.cool :=
 CoolerIsoClass.map_cool
 
@@ -114,7 +114,7 @@ Then any declaration taking a specific type of morphisms as parameter can instea
 class you just defined:
 ```
 -- Compare with: lemma do_something (f : MyIso A B) : sorry := sorry
-lemma do_something {F : Type _} [MyIsoClass F A B] (f : F) : sorry := sorry
+lemma do_something {F : Type*} [MyIsoClass F A B] (f : F) : sorry := sorry
 ```
 
 This means anything set up for `MyIso`s will automatically work for `CoolerIsoClass`es,
@@ -130,7 +130,7 @@ injective coercion to bijections between `α` and `β`.
 This typeclass is used in the definition of the homomorphism typeclasses,
 such as `ZeroEquivClass`, `MulEquivClass`, `MonoidEquivClass`, ....
 -/
-class EquivLike (E : Sort _) (α β : outParam (Sort _)) where
+class EquivLike (E : Sort*) (α β : outParam (Sort*)) where
   /-- The coercion to a function in the forward direction. -/
   coe : E → α → β
   /-- The coercion to a function in the backwards direction. -/
@@ -147,7 +147,7 @@ class EquivLike (E : Sort _) (α β : outParam (Sort _)) where
 
 namespace EquivLike
 
-variable {E F α β γ : Sort _} [iE : EquivLike E α β] [iF : EquivLike F β γ]
+variable {E F α β γ : Sort*} [iE : EquivLike E α β] [iF : EquivLike F β γ]
 
 theorem inv_injective : Function.Injective (EquivLike.inv : E → β → α) := fun e g h ↦
   coe_injective' e g ((right_inv e).eq_rightInverse (h.symm ▸ left_inv g)) h
doc: fix grammar (#6027)
Diff
@@ -139,7 +139,7 @@ class EquivLike (E : Sort _) (α β : outParam (Sort _)) where
   left_inv : ∀ e, Function.LeftInverse (inv e) (coe e)
   /-- The coercions are right inverses. -/
   right_inv : ∀ e, Function.RightInverse (inv e) (coe e)
-  /-- If two coercions to functions are jointly injective. -/
+  /-- The two coercions to functions are jointly injective. -/
   coe_injective' : ∀ e g, coe e = coe g → inv e = inv g → e = g
   -- This is mathematically equivalent to either of the coercions to functions being injective, but
   -- the `inv` hypothesis makes this easier to prove with `congr'`
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

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

Diff
@@ -2,14 +2,11 @@
 Copyright (c) 2021 Anne Baanen. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Anne Baanen
-
-! This file was ported from Lean 3 source module data.fun_like.equiv
-! leanprover-community/mathlib commit f340f229b1f461aa1c8ee11e0a172d0a3b301a4a
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Data.FunLike.Embedding
 
+#align_import data.fun_like.equiv from "leanprover-community/mathlib"@"f340f229b1f461aa1c8ee11e0a172d0a3b301a4a"
+
 /-!
 # Typeclass for a type `F` with an injective map to `A ≃ B`
 
chore: formatting issues (#4947)

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

Diff
@@ -29,11 +29,11 @@ variables (A B : Type _) [MyClass A] [MyClass B]
 
 -- This instance is optional if you follow the "Isomorphism class" design below:
 instance : EquivLike (MyIso A B) A (λ _, B) :=
-{ coe := MyIso.toEquiv.toFun,
-  inv := MyIso.toEquiv.invFun,
-  left_inv := MyIso.toEquiv.left_inv,
-  right_inv := MyIso.toEquiv.right_inv,
-  coe_injective' := λ f g h, by cases f; cases g; congr' }
+  { coe := MyIso.toEquiv.toFun,
+    inv := MyIso.toEquiv.invFun,
+    left_inv := MyIso.toEquiv.left_inv,
+    right_inv := MyIso.toEquiv.right_inv,
+    coe_injective' := λ f g h, by cases f; cases g; congr' }
 
 /-- Helper instance for when there's too many metavariables to apply `EquivLike.coe` directly. -/
 instance : CoeFun (MyIso A B) := FunLike.instCoeFunForAll
@@ -43,11 +43,11 @@ instance : CoeFun (MyIso A B) := FunLike.instCoeFunForAll
 /-- Copy of a `MyIso` with a new `toFun` equal to the old one. Useful to fix definitional
 equalities. -/
 protected def copy (f : MyIso A B) (f' : A → B) (f_inv : B → A) (h : f' = ⇑f) : MyIso A B :=
-{ toFun := f',
-  invFun := f_inv,
-  left_inv := h.symm ▸ f.left_inv,
-  right_inv := h.symm ▸ f.right_inv,
-  map_op' := h.symm ▸ f.map_op' }
+  { toFun := f',
+    invFun := f_inv,
+    left_inv := h.symm ▸ f.left_inv,
+    right_inv := h.symm ▸ f.right_inv,
+    map_op' := h.symm ▸ f.map_op' }
 
 end MyIso
 ```
@@ -73,12 +73,12 @@ end
 
 -- You can replace `MyIso.EquivLike` with the below instance:
 instance : MyIsoClass (MyIso A B) A B :=
-{ coe := MyIso.toFun,
-  inv := MyIso.invFun,
-  left_inv := MyIso.left_inv,
-  right_inv := MyIso.right_inv,
-  coe_injective' := λ f g h, by cases f; cases g; congr',
-  map_op := MyIso.map_op' }
+  { coe := MyIso.toFun,
+    inv := MyIso.invFun,
+    left_inv := MyIso.left_inv,
+    right_inv := MyIso.right_inv,
+    coe_injective' := λ f g h, by cases f; cases g; congr',
+    map_op := MyIso.map_op' }
 
 -- [Insert `CoeFun`, `ext` and `copy` here]
 ```
@@ -105,10 +105,10 @@ end
 CoolerIsoClass.map_cool
 
 instance : CoolerIsoClass (CoolerIso A B) A B :=
-{ coe := CoolerIso.toFun,
-  coe_injective' := λ f g h, by cases f; cases g; congr',
-  map_op := CoolerIso.map_op',
-  map_cool := CoolerIso.map_cool' }
+  { coe := CoolerIso.toFun,
+    coe_injective' := λ f g h, by cases f; cases g; congr',
+    map_op := CoolerIso.map_op',
+    map_cool := CoolerIso.map_cool' }
 
 -- [Insert `CoeFun`, `ext` and `copy` here]
 ```
@@ -231,7 +231,7 @@ theorem comp_bijective (f : α → β) (e : F) : Function.Bijective (e ∘ f) 
 
 /-- This is not an instance to avoid slowing down every single `Subsingleton` typeclass search.-/
 lemma subsingleton_dom [Subsingleton β] : Subsingleton F :=
-⟨fun f g ↦ FunLike.ext f g $ fun _ ↦ (right_inv f).injective $ Subsingleton.elim _ _⟩
+  ⟨fun f g ↦ FunLike.ext f g $ fun _ ↦ (right_inv f).injective $ Subsingleton.elim _ _⟩
 #align equiv_like.subsingleton_dom EquivLike.subsingleton_dom
 
 end EquivLike
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
@@ -146,6 +146,7 @@ class EquivLike (E : Sort _) (α β : outParam (Sort _)) where
   coe_injective' : ∀ e g, coe e = coe g → inv e = inv g → e = g
   -- This is mathematically equivalent to either of the coercions to functions being injective, but
   -- the `inv` hypothesis makes this easier to prove with `congr'`
+#align equiv_like EquivLike
 
 namespace EquivLike
 
@@ -153,6 +154,7 @@ variable {E F α β γ : Sort _} [iE : EquivLike E α β] [iF : EquivLike F β 
 
 theorem inv_injective : Function.Injective (EquivLike.inv : E → β → α) := fun e g h ↦
   coe_injective' e g ((right_inv e).eq_rightInverse (h.symm ▸ left_inv g)) h
+#align equiv_like.inv_injective EquivLike.inv_injective
 
 instance (priority := 100) toEmbeddingLike : EmbeddingLike E α β where
   coe := (coe : E → α → β)
@@ -162,27 +164,34 @@ instance (priority := 100) toEmbeddingLike : EmbeddingLike E α β where
 
 protected theorem injective (e : E) : Function.Injective e :=
   EmbeddingLike.injective e
+#align equiv_like.injective EquivLike.injective
 
 protected theorem surjective (e : E) : Function.Surjective e :=
   (right_inv e).surjective
+#align equiv_like.surjective EquivLike.surjective
 
 protected theorem bijective (e : E) : Function.Bijective (e : α → β) :=
   ⟨EquivLike.injective e, EquivLike.surjective e⟩
+#align equiv_like.bijective EquivLike.bijective
 
 theorem apply_eq_iff_eq (f : E) {x y : α} : f x = f y ↔ x = y :=
   EmbeddingLike.apply_eq_iff_eq f
+#align equiv_like.apply_eq_iff_eq EquivLike.apply_eq_iff_eq
 
 @[simp]
 theorem injective_comp (e : E) (f : β → γ) : Function.Injective (f ∘ e) ↔ Function.Injective f :=
   Function.Injective.of_comp_iff' f (EquivLike.bijective e)
+#align equiv_like.injective_comp EquivLike.injective_comp
 
 @[simp]
 theorem surjective_comp (e : E) (f : β → γ) : Function.Surjective (f ∘ e) ↔ Function.Surjective f :=
   (EquivLike.surjective e).of_comp_iff f
+#align equiv_like.surjective_comp EquivLike.surjective_comp
 
 @[simp]
 theorem bijective_comp (e : E) (f : β → γ) : Function.Bijective (f ∘ e) ↔ Function.Bijective f :=
   (EquivLike.bijective e).of_comp_iff f
+#align equiv_like.bijective_comp EquivLike.bijective_comp
 
 /-- This lemma is only supposed to be used in the generic context, when working with instances
 of classes extending `EquivLike`.
@@ -193,6 +202,7 @@ TODO: define a generic form of `Equiv.symm`. -/
 @[simp]
 theorem inv_apply_apply (e : E) (a : α) : EquivLike.inv e (e a) = a :=
   left_inv _ _
+#align equiv_like.inv_apply_apply EquivLike.inv_apply_apply
 
 /-- This lemma is only supposed to be used in the generic context, when working with instances
 of classes extending `EquivLike`.
@@ -203,20 +213,25 @@ TODO: define a generic form of `Equiv.symm`. -/
 @[simp]
 theorem apply_inv_apply (e : E) (b : β) : e (EquivLike.inv e b) = b :=
   right_inv _ _
+#align equiv_like.apply_inv_apply EquivLike.apply_inv_apply
 
 theorem comp_injective (f : α → β) (e : F) : Function.Injective (e ∘ f) ↔ Function.Injective f :=
   EmbeddingLike.comp_injective f e
+#align equiv_like.comp_injective EquivLike.comp_injective
 
 @[simp]
 theorem comp_surjective (f : α → β) (e : F) : Function.Surjective (e ∘ f) ↔ Function.Surjective f :=
   Function.Surjective.of_comp_iff' (EquivLike.bijective e) f
+#align equiv_like.comp_surjective EquivLike.comp_surjective
 
 @[simp]
 theorem comp_bijective (f : α → β) (e : F) : Function.Bijective (e ∘ f) ↔ Function.Bijective f :=
   (EquivLike.bijective e).of_comp_iff' f
+#align equiv_like.comp_bijective EquivLike.comp_bijective
 
 /-- This is not an instance to avoid slowing down every single `Subsingleton` typeclass search.-/
 lemma subsingleton_dom [Subsingleton β] : Subsingleton F :=
 ⟨fun f g ↦ FunLike.ext f g $ fun _ ↦ (right_inv f).injective $ Subsingleton.elim _ _⟩
+#align equiv_like.subsingleton_dom EquivLike.subsingleton_dom
 
 end EquivLike
chore: Rename Type* to Type _ (#1866)

A bunch of docstrings were still mentioning Type*. This changes them to Type _.

Diff
@@ -19,13 +19,13 @@ This typeclass is primarily for use by isomorphisms like `MonoidEquiv` and `Line
 
 A typical type of morphisms should be declared as:
 ```
-structure MyIso (A B : Type*) [MyClass A] [MyClass B]
+structure MyIso (A B : Type _) [MyClass A] [MyClass B]
   extends Equiv A B :=
 (map_op' : ∀ {x y : A}, toFun (MyClass.op x y) = MyClass.op (toFun x) (toFun y))
 
 namespace MyIso
 
-variables (A B : Type*) [MyClass A] [MyClass B]
+variables (A B : Type _) [MyClass A] [MyClass B]
 
 -- This instance is optional if you follow the "Isomorphism class" design below:
 instance : EquivLike (MyIso A B) A (λ _, B) :=
@@ -66,7 +66,7 @@ Continuing the example above:
 
 /-- `MyIsoClass F A B` states that `F` is a type of `MyClass.op`-preserving morphisms.
 You should extend this class when you extend `MyIso`. -/
-class MyIsoClass (F : Type*) (A B : outParam <| Type _) [MyClass A] [MyClass B]
+class MyIsoClass (F : Type _) (A B : outParam <| Type _) [MyClass A] [MyClass B]
   extends EquivLike F A (λ _, B), MyHomClass F A B
 
 end
@@ -87,20 +87,20 @@ The second step is to add instances of your new `MyIsoClass` for all types exten
 Typically, you can just declare a new class analogous to `MyIsoClass`:
 
 ```
-structure CoolerIso (A B : Type*) [CoolClass A] [CoolClass B]
+structure CoolerIso (A B : Type _) [CoolClass A] [CoolClass B]
   extends MyIso A B :=
 (map_cool' : toFun CoolClass.cool = CoolClass.cool)
 
 section
 set_option old_structure_cmd true
 
-class CoolerIsoClass (F : Type*) (A B : outParam <| Type _) [CoolClass A] [CoolClass B]
+class CoolerIsoClass (F : Type _) (A B : outParam <| Type _) [CoolClass A] [CoolClass B]
   extends MyIsoClass F A B :=
 (map_cool : ∀ (f : F), f CoolClass.cool = CoolClass.cool)
 
 end
 
-@[simp] lemma map_cool {F A B : Type*} [CoolClass A] [CoolClass B] [CoolerIsoClass F A B]
+@[simp] lemma map_cool {F A B : Type _} [CoolClass A] [CoolClass B] [CoolerIsoClass F A B]
   (f : F) : f CoolClass.cool = CoolClass.cool :=
 CoolerIsoClass.map_cool
 
@@ -117,7 +117,7 @@ Then any declaration taking a specific type of morphisms as parameter can instea
 class you just defined:
 ```
 -- Compare with: lemma do_something (f : MyIso A B) : sorry := sorry
-lemma do_something {F : Type*} [MyIsoClass F A B] (f : F) : sorry := sorry
+lemma do_something {F : Type _} [MyIsoClass F A B] (f : F) : sorry := sorry
 ```
 
 This means anything set up for `MyIso`s will automatically work for `CoolerIsoClass`es,
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
@@ -131,7 +131,7 @@ instead of linearly increasing the work per `MyIso`-related declaration.
 injective coercion to bijections between `α` and `β`.
 
 This typeclass is used in the definition of the homomorphism typeclasses,
-such as `zero_equiv_class`, `mul_equiv_class`, `monoid_equiv_class`, ....
+such as `ZeroEquivClass`, `MulEquivClass`, `MonoidEquivClass`, ....
 -/
 class EquivLike (E : Sort _) (α β : outParam (Sort _)) where
   /-- The coercion to a function in the forward direction. -/
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) 2021 Anne Baanen. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Anne Baanen
+
+! This file was ported from Lean 3 source module data.fun_like.equiv
+! leanprover-community/mathlib commit f340f229b1f461aa1c8ee11e0a172d0a3b301a4a
+! Please do not edit these lines, except to modify the commit id
+! if you have ported upstream changes.
 -/
 import Mathlib.Data.FunLike.Embedding
 

Dependencies 6

7 files ported (100.0%)
3393 lines ported (100.0%)

All dependencies are ported!