data.fun_like.fintypeMathlib.Data.FunLike.Fintype

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)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -48,15 +48,15 @@ noncomputable def DFunLike.fintype [DecidableEq α] [Fintype α] [∀ i, Fintype
 #align fun_like.fintype DFunLike.fintype
 -/
 
-#print DFunLike.fintype' /-
+#print FunLike.fintype /-
 /-- All `fun_like`s are finite if their domain and codomain are.
 
 Non-dependent version of `fun_like.fintype` that might be easier to infer.
 This is not an instance because specific `fun_like` types might have a better-suited definition.
 -/
-noncomputable def DFunLike.fintype' [DecidableEq α] [Fintype α] [Fintype γ] : Fintype G :=
+noncomputable def FunLike.fintype [DecidableEq α] [Fintype α] [Fintype γ] : Fintype G :=
   DFunLike.fintype G
-#align fun_like.fintype' DFunLike.fintype'
+#align fun_like.fintype' FunLike.fintype
 -/
 
 end Type
@@ -75,15 +75,15 @@ theorem DFunLike.finite [Finite α] [∀ i, Finite (β i)] : Finite F :=
 #align fun_like.finite DFunLike.finite
 -/
 
-#print DFunLike.finite' /-
+#print FunLike.finite /-
 /-- All `fun_like`s are finite if their domain and codomain are.
 
 Non-dependent version of `fun_like.finite` that might be easier to infer.
 Can't be an instance because it can cause infinite loops.
 -/
-theorem DFunLike.finite' [Finite α] [Finite γ] : Finite G :=
+theorem FunLike.finite [Finite α] [Finite γ] : Finite G :=
   DFunLike.finite G
-#align fun_like.finite' DFunLike.finite'
+#align fun_like.finite' FunLike.finite
 -/
 
 end Sort
Diff
@@ -34,56 +34,56 @@ They can't be instances themselves since they can cause loops.
 
 section Type
 
-variable (F G : Type _) {α γ : Type _} {β : α → Type _} [FunLike F α β] [FunLike G α fun _ => γ]
+variable (F G : Type _) {α γ : Type _} {β : α → Type _} [DFunLike F α β] [DFunLike G α fun _ => γ]
 
-#print FunLike.fintype /-
+#print DFunLike.fintype /-
 /-- All `fun_like`s are finite if their domain and codomain are.
 
 This is not an instance because specific `fun_like` types might have a better-suited definition.
 
 See also `fun_like.finite`.
 -/
-noncomputable def FunLike.fintype [DecidableEq α] [Fintype α] [∀ i, Fintype (β i)] : Fintype F :=
-  Fintype.ofInjective _ FunLike.coe_injective
-#align fun_like.fintype FunLike.fintype
+noncomputable def DFunLike.fintype [DecidableEq α] [Fintype α] [∀ i, Fintype (β i)] : Fintype F :=
+  Fintype.ofInjective _ DFunLike.coe_injective
+#align fun_like.fintype DFunLike.fintype
 -/
 
-#print FunLike.fintype' /-
+#print DFunLike.fintype' /-
 /-- All `fun_like`s are finite if their domain and codomain are.
 
 Non-dependent version of `fun_like.fintype` that might be easier to infer.
 This is not an instance because specific `fun_like` types might have a better-suited definition.
 -/
-noncomputable def FunLike.fintype' [DecidableEq α] [Fintype α] [Fintype γ] : Fintype G :=
-  FunLike.fintype G
-#align fun_like.fintype' FunLike.fintype'
+noncomputable def DFunLike.fintype' [DecidableEq α] [Fintype α] [Fintype γ] : Fintype G :=
+  DFunLike.fintype G
+#align fun_like.fintype' DFunLike.fintype'
 -/
 
 end Type
 
 section Sort
 
-variable (F G : Sort _) {α γ : Sort _} {β : α → Sort _} [FunLike F α β] [FunLike G α fun _ => γ]
+variable (F G : Sort _) {α γ : Sort _} {β : α → Sort _} [DFunLike F α β] [DFunLike G α fun _ => γ]
 
-#print FunLike.finite /-
+#print DFunLike.finite /-
 /-- All `fun_like`s are finite if their domain and codomain are.
 
 Can't be an instance because it can cause infinite loops.
 -/
-theorem FunLike.finite [Finite α] [∀ i, Finite (β i)] : Finite F :=
-  Finite.of_injective _ FunLike.coe_injective
-#align fun_like.finite FunLike.finite
+theorem DFunLike.finite [Finite α] [∀ i, Finite (β i)] : Finite F :=
+  Finite.of_injective _ DFunLike.coe_injective
+#align fun_like.finite DFunLike.finite
 -/
 
-#print FunLike.finite' /-
+#print DFunLike.finite' /-
 /-- All `fun_like`s are finite if their domain and codomain are.
 
 Non-dependent version of `fun_like.finite` that might be easier to infer.
 Can't be an instance because it can cause infinite loops.
 -/
-theorem FunLike.finite' [Finite α] [Finite γ] : Finite G :=
-  FunLike.finite G
-#align fun_like.finite' FunLike.finite'
+theorem DFunLike.finite' [Finite α] [Finite γ] : Finite G :=
+  DFunLike.finite G
+#align fun_like.finite' DFunLike.finite'
 -/
 
 end Sort
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2022 Anne Baanen. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Anne Baanen
 -/
-import Mathbin.Data.Finite.Basic
-import Mathbin.Data.Fintype.Basic
-import Mathbin.Data.FunLike.Basic
+import Data.Finite.Basic
+import Data.Fintype.Basic
+import Data.FunLike.Basic
 
 #align_import data.fun_like.fintype from "leanprover-community/mathlib"@"13a5329a8625701af92e9a96ffc90fa787fff24d"
 
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2022 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.fintype
-! leanprover-community/mathlib commit 13a5329a8625701af92e9a96ffc90fa787fff24d
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Data.Finite.Basic
 import Mathbin.Data.Fintype.Basic
 import Mathbin.Data.FunLike.Basic
 
+#align_import data.fun_like.fintype from "leanprover-community/mathlib"@"13a5329a8625701af92e9a96ffc90fa787fff24d"
+
 /-!
 # Finiteness of `fun_like` types
 
Diff
@@ -68,6 +68,7 @@ section Sort
 
 variable (F G : Sort _) {α γ : Sort _} {β : α → Sort _} [FunLike F α β] [FunLike G α fun _ => γ]
 
+#print FunLike.finite /-
 /-- All `fun_like`s are finite if their domain and codomain are.
 
 Can't be an instance because it can cause infinite loops.
@@ -75,7 +76,9 @@ Can't be an instance because it can cause infinite loops.
 theorem FunLike.finite [Finite α] [∀ i, Finite (β i)] : Finite F :=
   Finite.of_injective _ FunLike.coe_injective
 #align fun_like.finite FunLike.finite
+-/
 
+#print FunLike.finite' /-
 /-- All `fun_like`s are finite if their domain and codomain are.
 
 Non-dependent version of `fun_like.finite` that might be easier to infer.
@@ -84,6 +87,7 @@ Can't be an instance because it can cause infinite loops.
 theorem FunLike.finite' [Finite α] [Finite γ] : Finite G :=
   FunLike.finite G
 #align fun_like.finite' FunLike.finite'
+-/
 
 end Sort
 
Diff
@@ -68,12 +68,6 @@ section Sort
 
 variable (F G : Sort _) {α γ : Sort _} {β : α → Sort _} [FunLike F α β] [FunLike G α fun _ => γ]
 
-/- warning: fun_like.finite -> FunLike.finite is a dubious translation:
-lean 3 declaration is
-  forall (F : Sort.{u1}) {α : Sort.{u2}} {β : α -> Sort.{u3}} [_inst_1 : FunLike.{u1, u2, u3} F α β] [_inst_3 : Finite.{u2} α] [_inst_4 : forall (i : α), Finite.{u3} (β i)], Finite.{u1} F
-but is expected to have type
-  forall (F : Sort.{u1}) {α : Sort.{u3}} {β : α -> Sort.{u2}} [_inst_1 : FunLike.{u1, u3, u2} F α β] [_inst_3 : Finite.{u3} α] [_inst_4 : forall (i : α), Finite.{u2} (β i)], Finite.{u1} F
-Case conversion may be inaccurate. Consider using '#align fun_like.finite FunLike.finiteₓ'. -/
 /-- All `fun_like`s are finite if their domain and codomain are.
 
 Can't be an instance because it can cause infinite loops.
@@ -82,12 +76,6 @@ theorem FunLike.finite [Finite α] [∀ i, Finite (β i)] : Finite F :=
   Finite.of_injective _ FunLike.coe_injective
 #align fun_like.finite FunLike.finite
 
-/- warning: fun_like.finite' -> FunLike.finite' is a dubious translation:
-lean 3 declaration is
-  forall (G : Sort.{u1}) {α : Sort.{u2}} {γ : Sort.{u3}} [_inst_2 : FunLike.{u1, u2, u3} G α (fun (_x : α) => γ)] [_inst_3 : Finite.{u2} α] [_inst_4 : Finite.{u3} γ], Finite.{u1} G
-but is expected to have type
-  forall (G : Sort.{u1}) {α : Sort.{u3}} {γ : Sort.{u2}} [_inst_2 : FunLike.{u1, u3, u2} G α (fun (_x : α) => γ)] [_inst_3 : Finite.{u3} α] [_inst_4 : Finite.{u2} γ], Finite.{u1} G
-Case conversion may be inaccurate. Consider using '#align fun_like.finite' FunLike.finite'ₓ'. -/
 /-- All `fun_like`s are finite if their domain and codomain are.
 
 Non-dependent version of `fun_like.finite` that might be easier to infer.

Changes in mathlib4

mathlib3
mathlib4
docs(FunLike/Fintype): fix typo in doc comments (#11402)

The non-dependent version of DFunLike.{fintype,finite} is called FunLike.{fintype,finite}; the names in the docstring do not exist.

Diff
@@ -19,8 +19,8 @@ This corresponds to the following two pairs of declarations:
    codomain are.
  * `DFunLike.finite` is a lemma stating all `DFunLike`s are finite if their domain and
    codomain are.
- * `DFunLike.fintype'` is a non-dependent version of `DFunLike.fintype` and
- * `DFunLike.finite` is a non-dependent version of `DFunLike.finite`, because dependent instances
+ * `FunLike.fintype` is a non-dependent version of `DFunLike.fintype` and
+ * `FunLike.finite` is a non-dependent version of `DFunLike.finite`, because dependent instances
    are harder to infer.
 
 You can use these to produce instances for specific `DFunLike` types.
chore: change from plural to singular in porting notes (#10761)
Diff
@@ -28,7 +28,7 @@ You can use these to produce instances for specific `DFunLike` types.
 They can't be instances themselves since they can cause loops.
 -/
 
--- porting notes: `Type` is a reserved word, switched to `Type'`
+-- Porting note: `Type` is a reserved word, switched to `Type'`
 section Type'
 
 variable (F G : Type*) {α γ : Type*} {β : α → Type*} [DFunLike F α β] [FunLike G α γ]
@@ -54,7 +54,7 @@ noncomputable def FunLike.fintype [DecidableEq α] [Fintype α] [Fintype γ] : F
 
 end Type'
 
--- porting notes: `Sort` is a reserved word, switched to `Sort'`
+-- Porting note: `Sort` is a reserved word, switched to `Sort'`
 section Sort'
 
 variable (F G : Sort*) {α γ : Sort*} {β : α → Sort*} [DFunLike F α β] [FunLike G α γ]
refactor(*): abbreviation for non-dependent FunLike (#9833)

This follows up from #9785, which renamed FunLike to DFunLike, by introducing a new abbreviation FunLike F α β := DFunLike F α (fun _ => β), to make the non-dependent use of FunLike easier.

I searched for the pattern DFunLike.*fun and DFunLike.*λ in all files to replace expressions of the form DFunLike F α (fun _ => β) with FunLike F α β. I did this everywhere except for extends clauses for two reasons: it would conflict with #8386, and more importantly extends must directly refer to a structure with no unfolding of defs or abbrevs.

Diff
@@ -31,7 +31,7 @@ They can't be instances themselves since they can cause loops.
 -- porting notes: `Type` is a reserved word, switched to `Type'`
 section Type'
 
-variable (F G : Type*) {α γ : Type*} {β : α → Type*} [DFunLike F α β] [DFunLike G α fun _ => γ]
+variable (F G : Type*) {α γ : Type*} {β : α → Type*} [DFunLike F α β] [FunLike G α γ]
 
 /-- All `DFunLike`s are finite if their domain and codomain are.
 
@@ -43,21 +43,21 @@ noncomputable def DFunLike.fintype [DecidableEq α] [Fintype α] [∀ i, Fintype
   Fintype.ofInjective _ DFunLike.coe_injective
 #align fun_like.fintype DFunLike.fintype
 
-/-- All `DFunLike`s are finite if their domain and codomain are.
+/-- All `FunLike`s are finite if their domain and codomain are.
 
 Non-dependent version of `DFunLike.fintype` that might be easier to infer.
-This is not an instance because specific `DFunLike` types might have a better-suited definition.
+This is not an instance because specific `FunLike` types might have a better-suited definition.
 -/
-noncomputable def DFunLike.fintype' [DecidableEq α] [Fintype α] [Fintype γ] : Fintype G :=
+noncomputable def FunLike.fintype [DecidableEq α] [Fintype α] [Fintype γ] : Fintype G :=
   DFunLike.fintype G
-#align fun_like.fintype' DFunLike.fintype'
+#align fun_like.fintype' FunLike.fintype
 
 end Type'
 
 -- porting notes: `Sort` is a reserved word, switched to `Sort'`
 section Sort'
 
-variable (F G : Sort*) {α γ : Sort*} {β : α → Sort*} [DFunLike F α β] [DFunLike G α fun _ => γ]
+variable (F G : Sort*) {α γ : Sort*} {β : α → Sort*} [DFunLike F α β] [FunLike G α γ]
 
 /-- All `DFunLike`s are finite if their domain and codomain are.
 
@@ -67,13 +67,13 @@ theorem DFunLike.finite [Finite α] [∀ i, Finite (β i)] : Finite F :=
   Finite.of_injective _ DFunLike.coe_injective
 #align fun_like.finite DFunLike.finite
 
-/-- All `DFunLike`s are finite if their domain and codomain are.
+/-- All `FunLike`s are finite if their domain and codomain are.
 
 Non-dependent version of `DFunLike.finite` that might be easier to infer.
 Can't be an instance because it can cause infinite loops.
 -/
-theorem DFunLike.finite' [Finite α] [Finite γ] : Finite G :=
+theorem FunLike.finite [Finite α] [Finite γ] : Finite G :=
   DFunLike.finite G
-#align fun_like.finite' DFunLike.finite'
+#align fun_like.finite' FunLike.finite
 
 end Sort'
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
@@ -10,20 +10,20 @@ import Mathlib.Data.FunLike.Basic
 #align_import data.fun_like.fintype from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
 
 /-!
-# Finiteness of `FunLike` types
+# Finiteness of `DFunLike` types
 
-We show a type `F` with a `FunLike F α β` is finite if both `α` and `β` are finite.
+We show a type `F` with a `DFunLike F α β` is finite if both `α` and `β` are finite.
 This corresponds to the following two pairs of declarations:
 
- * `FunLike.fintype` is a definition stating all `FunLike`s are finite if their domain and
+ * `DFunLike.fintype` is a definition stating all `DFunLike`s are finite if their domain and
    codomain are.
- * `FunLike.finite` is a lemma stating all `FunLike`s are finite if their domain and
+ * `DFunLike.finite` is a lemma stating all `DFunLike`s are finite if their domain and
    codomain are.
- * `FunLike.fintype'` is a non-dependent version of `FunLike.fintype` and
- * `FunLike.finite` is a non-dependent version of `FunLike.finite`, because dependent instances
+ * `DFunLike.fintype'` is a non-dependent version of `DFunLike.fintype` and
+ * `DFunLike.finite` is a non-dependent version of `DFunLike.finite`, because dependent instances
    are harder to infer.
 
-You can use these to produce instances for specific `FunLike` types.
+You can use these to produce instances for specific `DFunLike` types.
 (Although there might be options for `Fintype` instances with better definitional behaviour.)
 They can't be instances themselves since they can cause loops.
 -/
@@ -31,49 +31,49 @@ They can't be instances themselves since they can cause loops.
 -- porting notes: `Type` is a reserved word, switched to `Type'`
 section Type'
 
-variable (F G : Type*) {α γ : Type*} {β : α → Type*} [FunLike F α β] [FunLike G α fun _ => γ]
+variable (F G : Type*) {α γ : Type*} {β : α → Type*} [DFunLike F α β] [DFunLike G α fun _ => γ]
 
-/-- All `FunLike`s are finite if their domain and codomain are.
+/-- All `DFunLike`s are finite if their domain and codomain are.
 
-This is not an instance because specific `FunLike` types might have a better-suited definition.
+This is not an instance because specific `DFunLike` types might have a better-suited definition.
 
-See also `FunLike.finite`.
+See also `DFunLike.finite`.
 -/
-noncomputable def FunLike.fintype [DecidableEq α] [Fintype α] [∀ i, Fintype (β i)] : Fintype F :=
-  Fintype.ofInjective _ FunLike.coe_injective
-#align fun_like.fintype FunLike.fintype
+noncomputable def DFunLike.fintype [DecidableEq α] [Fintype α] [∀ i, Fintype (β i)] : Fintype F :=
+  Fintype.ofInjective _ DFunLike.coe_injective
+#align fun_like.fintype DFunLike.fintype
 
-/-- All `FunLike`s are finite if their domain and codomain are.
+/-- All `DFunLike`s are finite if their domain and codomain are.
 
-Non-dependent version of `FunLike.fintype` that might be easier to infer.
-This is not an instance because specific `FunLike` types might have a better-suited definition.
+Non-dependent version of `DFunLike.fintype` that might be easier to infer.
+This is not an instance because specific `DFunLike` types might have a better-suited definition.
 -/
-noncomputable def FunLike.fintype' [DecidableEq α] [Fintype α] [Fintype γ] : Fintype G :=
-  FunLike.fintype G
-#align fun_like.fintype' FunLike.fintype'
+noncomputable def DFunLike.fintype' [DecidableEq α] [Fintype α] [Fintype γ] : Fintype G :=
+  DFunLike.fintype G
+#align fun_like.fintype' DFunLike.fintype'
 
 end Type'
 
 -- porting notes: `Sort` is a reserved word, switched to `Sort'`
 section Sort'
 
-variable (F G : Sort*) {α γ : Sort*} {β : α → Sort*} [FunLike F α β] [FunLike G α fun _ => γ]
+variable (F G : Sort*) {α γ : Sort*} {β : α → Sort*} [DFunLike F α β] [DFunLike G α fun _ => γ]
 
-/-- All `FunLike`s are finite if their domain and codomain are.
+/-- All `DFunLike`s are finite if their domain and codomain are.
 
 Can't be an instance because it can cause infinite loops.
 -/
-theorem FunLike.finite [Finite α] [∀ i, Finite (β i)] : Finite F :=
-  Finite.of_injective _ FunLike.coe_injective
-#align fun_like.finite FunLike.finite
+theorem DFunLike.finite [Finite α] [∀ i, Finite (β i)] : Finite F :=
+  Finite.of_injective _ DFunLike.coe_injective
+#align fun_like.finite DFunLike.finite
 
-/-- All `FunLike`s are finite if their domain and codomain are.
+/-- All `DFunLike`s are finite if their domain and codomain are.
 
-Non-dependent version of `FunLike.finite` that might be easier to infer.
+Non-dependent version of `DFunLike.finite` that might be easier to infer.
 Can't be an instance because it can cause infinite loops.
 -/
-theorem FunLike.finite' [Finite α] [Finite γ] : Finite G :=
-  FunLike.finite G
-#align fun_like.finite' FunLike.finite'
+theorem DFunLike.finite' [Finite α] [Finite γ] : Finite G :=
+  DFunLike.finite G
+#align fun_like.finite' DFunLike.finite'
 
 end Sort'
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
@@ -31,7 +31,7 @@ They can't be instances themselves since they can cause loops.
 -- porting notes: `Type` is a reserved word, switched to `Type'`
 section Type'
 
-variable (F G : Type _) {α γ : Type _} {β : α → Type _} [FunLike F α β] [FunLike G α fun _ => γ]
+variable (F G : Type*) {α γ : Type*} {β : α → Type*} [FunLike F α β] [FunLike G α fun _ => γ]
 
 /-- All `FunLike`s are finite if their domain and codomain are.
 
@@ -57,7 +57,7 @@ end Type'
 -- porting notes: `Sort` is a reserved word, switched to `Sort'`
 section Sort'
 
-variable (F G : Sort _) {α γ : Sort _} {β : α → Sort _} [FunLike F α β] [FunLike G α fun _ => γ]
+variable (F G : Sort*) {α γ : Sort*} {β : α → Sort*} [FunLike F α β] [FunLike G α fun _ => γ]
 
 /-- All `FunLike`s are finite if their domain and codomain are.
 
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) 2022 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.fintype
-! leanprover-community/mathlib commit f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Data.Finite.Basic
 import Mathlib.Data.Fintype.Basic
 import Mathlib.Data.FunLike.Basic
 
+#align_import data.fun_like.fintype from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
+
 /-!
 # Finiteness of `FunLike` types
 
feat: Port/Data.FunLike.Fintype (#1933)

port of data.fun_like.fintype

Dependencies 6 + 207

208 files ported (97.2%)
90491 lines ported (97.7%)
Show graph

The unported dependencies are