order.category.LatMathlib.Order.Category.Lat

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)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -66,7 +66,7 @@ instance : BundledHom @LatticeHom where
   toFun _ _ _ _ := coeFn
   id := @LatticeHom.id
   comp := @LatticeHom.comp
-  hom_ext X Y _ _ := FunLike.coe_injective
+  hom_ext X Y _ _ := DFunLike.coe_injective
 
 instance : LargeCategory.{u} Lat :=
   BundledHom.category LatticeHom
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2022 Yaël Dillies. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yaël Dillies
 -/
-import Mathbin.Order.Category.PartOrd
-import Mathbin.Order.Hom.Lattice
+import Order.Category.PartOrd
+import Order.Hom.Lattice
 
 #align_import order.category.Lat from "leanprover-community/mathlib"@"75be6b616681ab6ca66d798ead117e75cd64f125"
 
@@ -30,36 +30,36 @@ universe u
 
 open CategoryTheory
 
-#print LatCat /-
+#print Lat /-
 /-- The category of lattices. -/
-def LatCat :=
+def Lat :=
   Bundled Lattice
-#align Lat LatCat
+#align Lat Lat
 -/
 
-namespace LatCat
+namespace Lat
 
-instance : CoeSort LatCat (Type _) :=
+instance : CoeSort Lat (Type _) :=
   Bundled.hasCoeToSort
 
-instance (X : LatCat) : Lattice X :=
+instance (X : Lat) : Lattice X :=
   X.str
 
-#print LatCat.of /-
+#print Lat.of /-
 /-- Construct a bundled `Lat` from a `lattice`. -/
-def of (α : Type _) [Lattice α] : LatCat :=
+def of (α : Type _) [Lattice α] : Lat :=
   Bundled.of α
-#align Lat.of LatCat.of
+#align Lat.of Lat.of
 -/
 
-#print LatCat.coe_of /-
+#print Lat.coe_of /-
 @[simp]
 theorem coe_of (α : Type _) [Lattice α] : ↥(of α) = α :=
   rfl
-#align Lat.coe_of LatCat.coe_of
+#align Lat.coe_of Lat.coe_of
 -/
 
-instance : Inhabited LatCat :=
+instance : Inhabited Lat :=
   ⟨of Bool⟩
 
 instance : BundledHom @LatticeHom where
@@ -68,59 +68,59 @@ instance : BundledHom @LatticeHom where
   comp := @LatticeHom.comp
   hom_ext X Y _ _ := FunLike.coe_injective
 
-instance : LargeCategory.{u} LatCat :=
+instance : LargeCategory.{u} Lat :=
   BundledHom.category LatticeHom
 
-instance : ConcreteCategory LatCat :=
+instance : ConcreteCategory Lat :=
   BundledHom.concreteCategory LatticeHom
 
-#print LatCat.hasForgetToPartOrd /-
-instance hasForgetToPartOrd : HasForget₂ LatCat PartOrdCat
+#print Lat.hasForgetToPartOrd /-
+instance hasForgetToPartOrd : HasForget₂ Lat PartOrd
     where
   forget₂ :=
     { obj := fun X => ⟨X⟩
       map := fun X Y f => f }
   forget_comp := rfl
-#align Lat.has_forget_to_PartOrd LatCat.hasForgetToPartOrd
+#align Lat.has_forget_to_PartOrd Lat.hasForgetToPartOrd
 -/
 
-#print LatCat.Iso.mk /-
+#print Lat.Iso.mk /-
 /-- Constructs an isomorphism of lattices from an order isomorphism between them. -/
 @[simps]
-def Iso.mk {α β : LatCat.{u}} (e : α ≃o β) : α ≅ β
+def Iso.mk {α β : Lat.{u}} (e : α ≃o β) : α ≅ β
     where
   Hom := e
   inv := e.symm
   hom_inv_id' := by ext; exact e.symm_apply_apply _
   inv_hom_id' := by ext; exact e.apply_symm_apply _
-#align Lat.iso.mk LatCat.Iso.mk
+#align Lat.iso.mk Lat.Iso.mk
 -/
 
-#print LatCat.dual /-
+#print Lat.dual /-
 /-- `order_dual` as a functor. -/
 @[simps]
-def dual : LatCat ⥤ LatCat where
+def dual : Lat ⥤ Lat where
   obj X := of Xᵒᵈ
   map X Y := LatticeHom.dual
-#align Lat.dual LatCat.dual
+#align Lat.dual Lat.dual
 -/
 
-#print LatCat.dualEquiv /-
+#print Lat.dualEquiv /-
 /-- The equivalence between `Lat` and itself induced by `order_dual` both ways. -/
 @[simps Functor inverse]
-def dualEquiv : LatCat ≌ LatCat :=
+def dualEquiv : Lat ≌ Lat :=
   Equivalence.mk dual dual
     (NatIso.ofComponents (fun X => Iso.mk <| OrderIso.dualDual X) fun X Y f => rfl)
     (NatIso.ofComponents (fun X => Iso.mk <| OrderIso.dualDual X) fun X Y f => rfl)
-#align Lat.dual_equiv LatCat.dualEquiv
+#align Lat.dual_equiv Lat.dualEquiv
 -/
 
-end LatCat
+end Lat
 
-#print latCat_dual_comp_forget_to_partOrdCat /-
-theorem latCat_dual_comp_forget_to_partOrdCat :
-    LatCat.dual ⋙ forget₂ LatCat PartOrdCat = forget₂ LatCat PartOrdCat ⋙ PartOrdCat.dual :=
+#print Lat_dual_comp_forget_to_partOrd /-
+theorem Lat_dual_comp_forget_to_partOrd :
+    Lat.dual ⋙ forget₂ Lat PartOrd = forget₂ Lat PartOrd ⋙ PartOrd.dual :=
   rfl
-#align Lat_dual_comp_forget_to_PartOrd latCat_dual_comp_forget_to_partOrdCat
+#align Lat_dual_comp_forget_to_PartOrd Lat_dual_comp_forget_to_partOrd
 -/
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2022 Yaël Dillies. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yaël Dillies
-
-! This file was ported from Lean 3 source module order.category.Lat
-! leanprover-community/mathlib commit 75be6b616681ab6ca66d798ead117e75cd64f125
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Order.Category.PartOrd
 import Mathbin.Order.Hom.Lattice
 
+#align_import order.category.Lat from "leanprover-community/mathlib"@"75be6b616681ab6ca66d798ead117e75cd64f125"
+
 /-!
 # The category of lattices
 
Diff
@@ -77,6 +77,7 @@ instance : LargeCategory.{u} LatCat :=
 instance : ConcreteCategory LatCat :=
   BundledHom.concreteCategory LatticeHom
 
+#print LatCat.hasForgetToPartOrd /-
 instance hasForgetToPartOrd : HasForget₂ LatCat PartOrdCat
     where
   forget₂ :=
@@ -84,7 +85,9 @@ instance hasForgetToPartOrd : HasForget₂ LatCat PartOrdCat
       map := fun X Y f => f }
   forget_comp := rfl
 #align Lat.has_forget_to_PartOrd LatCat.hasForgetToPartOrd
+-/
 
+#print LatCat.Iso.mk /-
 /-- Constructs an isomorphism of lattices from an order isomorphism between them. -/
 @[simps]
 def Iso.mk {α β : LatCat.{u}} (e : α ≃o β) : α ≅ β
@@ -94,14 +97,18 @@ def Iso.mk {α β : LatCat.{u}} (e : α ≃o β) : α ≅ β
   hom_inv_id' := by ext; exact e.symm_apply_apply _
   inv_hom_id' := by ext; exact e.apply_symm_apply _
 #align Lat.iso.mk LatCat.Iso.mk
+-/
 
+#print LatCat.dual /-
 /-- `order_dual` as a functor. -/
 @[simps]
 def dual : LatCat ⥤ LatCat where
   obj X := of Xᵒᵈ
   map X Y := LatticeHom.dual
 #align Lat.dual LatCat.dual
+-/
 
+#print LatCat.dualEquiv /-
 /-- The equivalence between `Lat` and itself induced by `order_dual` both ways. -/
 @[simps Functor inverse]
 def dualEquiv : LatCat ≌ LatCat :=
@@ -109,11 +116,14 @@ def dualEquiv : LatCat ≌ LatCat :=
     (NatIso.ofComponents (fun X => Iso.mk <| OrderIso.dualDual X) fun X Y f => rfl)
     (NatIso.ofComponents (fun X => Iso.mk <| OrderIso.dualDual X) fun X Y f => rfl)
 #align Lat.dual_equiv LatCat.dualEquiv
+-/
 
 end LatCat
 
+#print latCat_dual_comp_forget_to_partOrdCat /-
 theorem latCat_dual_comp_forget_to_partOrdCat :
     LatCat.dual ⋙ forget₂ LatCat PartOrdCat = forget₂ LatCat PartOrdCat ⋙ PartOrdCat.dual :=
   rfl
 #align Lat_dual_comp_forget_to_PartOrd latCat_dual_comp_forget_to_partOrdCat
+-/
 
Diff
@@ -77,12 +77,6 @@ instance : LargeCategory.{u} LatCat :=
 instance : ConcreteCategory LatCat :=
   BundledHom.concreteCategory LatticeHom
 
-/- warning: Lat.has_forget_to_PartOrd -> LatCat.hasForgetToPartOrd is a dubious translation:
-lean 3 declaration is
-  CategoryTheory.HasForget₂.{succ u1, succ u1, u1, u1, u1} LatCat.{u1} PartOrdCat.{u1} LatCat.CategoryTheory.largeCategory.{u1} LatCat.CategoryTheory.concreteCategory.{u1} PartOrdCat.largeCategory.{u1} PartOrdCat.concreteCategory.{u1}
-but is expected to have type
-  CategoryTheory.HasForget₂.{succ u1, succ u1, u1, u1, u1} LatCat.{u1} PartOrdCat.{u1} LatCat.instLargeCategoryLatCat.{u1} LatCat.instConcreteCategoryLatCatInstLargeCategoryLatCat.{u1} instPartOrdCatLargeCategory.{u1} PartOrdCat.instConcreteCategoryPartOrdCatInstPartOrdCatLargeCategory.{u1}
-Case conversion may be inaccurate. Consider using '#align Lat.has_forget_to_PartOrd LatCat.hasForgetToPartOrdₓ'. -/
 instance hasForgetToPartOrd : HasForget₂ LatCat PartOrdCat
     where
   forget₂ :=
@@ -91,12 +85,6 @@ instance hasForgetToPartOrd : HasForget₂ LatCat PartOrdCat
   forget_comp := rfl
 #align Lat.has_forget_to_PartOrd LatCat.hasForgetToPartOrd
 
-/- warning: Lat.iso.mk -> LatCat.Iso.mk is a dubious translation:
-lean 3 declaration is
-  forall {α : LatCat.{u1}} {β : LatCat.{u1}}, (OrderIso.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} α) (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} β) (Preorder.toHasLe.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} α) (PartialOrder.toPreorder.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} α) (SemilatticeInf.toPartialOrder.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} α) (Lattice.toSemilatticeInf.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} α) (LatCat.lattice.{u1} α))))) (Preorder.toHasLe.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} β) (PartialOrder.toPreorder.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} β) (SemilatticeInf.toPartialOrder.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} β) (Lattice.toSemilatticeInf.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} β) (LatCat.lattice.{u1} β)))))) -> (CategoryTheory.Iso.{u1, succ u1} LatCat.{u1} LatCat.CategoryTheory.largeCategory.{u1} α β)
-but is expected to have type
-  forall {α : LatCat.{u1}} {β : LatCat.{u1}}, (OrderIso.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} α) (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} β) (Preorder.toLE.{u1} (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} α) (PartialOrder.toPreorder.{u1} (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} α) (SemilatticeInf.toPartialOrder.{u1} (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} α) (Lattice.toSemilatticeInf.{u1} (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} α) (LatCat.instLatticeα.{u1} α))))) (Preorder.toLE.{u1} (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} β) (PartialOrder.toPreorder.{u1} (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} β) (SemilatticeInf.toPartialOrder.{u1} (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} β) (Lattice.toSemilatticeInf.{u1} (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} β) (LatCat.instLatticeα.{u1} β)))))) -> (CategoryTheory.Iso.{u1, succ u1} LatCat.{u1} LatCat.instLargeCategoryLatCat.{u1} α β)
-Case conversion may be inaccurate. Consider using '#align Lat.iso.mk LatCat.Iso.mkₓ'. -/
 /-- Constructs an isomorphism of lattices from an order isomorphism between them. -/
 @[simps]
 def Iso.mk {α β : LatCat.{u}} (e : α ≃o β) : α ≅ β
@@ -107,12 +95,6 @@ def Iso.mk {α β : LatCat.{u}} (e : α ≃o β) : α ≅ β
   inv_hom_id' := by ext; exact e.apply_symm_apply _
 #align Lat.iso.mk LatCat.Iso.mk
 
-/- warning: Lat.dual -> LatCat.dual is a dubious translation:
-lean 3 declaration is
-  CategoryTheory.Functor.{u1, u1, succ u1, succ u1} LatCat.{u1} LatCat.CategoryTheory.largeCategory.{u1} LatCat.{u1} LatCat.CategoryTheory.largeCategory.{u1}
-but is expected to have type
-  CategoryTheory.Functor.{u1, u1, succ u1, succ u1} LatCat.{u1} LatCat.instLargeCategoryLatCat.{u1} LatCat.{u1} LatCat.instLargeCategoryLatCat.{u1}
-Case conversion may be inaccurate. Consider using '#align Lat.dual LatCat.dualₓ'. -/
 /-- `order_dual` as a functor. -/
 @[simps]
 def dual : LatCat ⥤ LatCat where
@@ -120,12 +102,6 @@ def dual : LatCat ⥤ LatCat where
   map X Y := LatticeHom.dual
 #align Lat.dual LatCat.dual
 
-/- warning: Lat.dual_equiv -> LatCat.dualEquiv is a dubious translation:
-lean 3 declaration is
-  CategoryTheory.Equivalence.{u1, u1, succ u1, succ u1} LatCat.{u1} LatCat.CategoryTheory.largeCategory.{u1} LatCat.{u1} LatCat.CategoryTheory.largeCategory.{u1}
-but is expected to have type
-  CategoryTheory.Equivalence.{u1, u1, succ u1, succ u1} LatCat.{u1} LatCat.{u1} LatCat.instLargeCategoryLatCat.{u1} LatCat.instLargeCategoryLatCat.{u1}
-Case conversion may be inaccurate. Consider using '#align Lat.dual_equiv LatCat.dualEquivₓ'. -/
 /-- The equivalence between `Lat` and itself induced by `order_dual` both ways. -/
 @[simps Functor inverse]
 def dualEquiv : LatCat ≌ LatCat :=
@@ -136,12 +112,6 @@ def dualEquiv : LatCat ≌ LatCat :=
 
 end LatCat
 
-/- warning: Lat_dual_comp_forget_to_PartOrd -> latCat_dual_comp_forget_to_partOrdCat is a dubious translation:
-lean 3 declaration is
-  Eq.{succ (succ u1)} (CategoryTheory.Functor.{u1, u1, succ u1, succ u1} LatCat.{u1} LatCat.CategoryTheory.largeCategory.{u1} PartOrdCat.{u1} PartOrdCat.largeCategory.{u1}) (CategoryTheory.Functor.comp.{u1, u1, u1, succ u1, succ u1, succ u1} LatCat.{u1} LatCat.CategoryTheory.largeCategory.{u1} LatCat.{u1} LatCat.CategoryTheory.largeCategory.{u1} PartOrdCat.{u1} PartOrdCat.largeCategory.{u1} LatCat.dual.{u1} (CategoryTheory.forget₂.{succ u1, succ u1, u1, u1, u1} LatCat.{u1} PartOrdCat.{u1} LatCat.CategoryTheory.largeCategory.{u1} LatCat.CategoryTheory.concreteCategory.{u1} PartOrdCat.largeCategory.{u1} PartOrdCat.concreteCategory.{u1} LatCat.hasForgetToPartOrd.{u1})) (CategoryTheory.Functor.comp.{u1, u1, u1, succ u1, succ u1, succ u1} LatCat.{u1} LatCat.CategoryTheory.largeCategory.{u1} PartOrdCat.{u1} PartOrdCat.largeCategory.{u1} PartOrdCat.{u1} PartOrdCat.largeCategory.{u1} (CategoryTheory.forget₂.{succ u1, succ u1, u1, u1, u1} LatCat.{u1} PartOrdCat.{u1} LatCat.CategoryTheory.largeCategory.{u1} LatCat.CategoryTheory.concreteCategory.{u1} PartOrdCat.largeCategory.{u1} PartOrdCat.concreteCategory.{u1} LatCat.hasForgetToPartOrd.{u1}) PartOrdCat.dual.{u1})
-but is expected to have type
-  Eq.{succ (succ u1)} (CategoryTheory.Functor.{u1, u1, succ u1, succ u1} LatCat.{u1} LatCat.instLargeCategoryLatCat.{u1} PartOrdCat.{u1} instPartOrdCatLargeCategory.{u1}) (CategoryTheory.Functor.comp.{u1, u1, u1, succ u1, succ u1, succ u1} LatCat.{u1} LatCat.instLargeCategoryLatCat.{u1} LatCat.{u1} LatCat.instLargeCategoryLatCat.{u1} PartOrdCat.{u1} instPartOrdCatLargeCategory.{u1} LatCat.dual.{u1} (CategoryTheory.forget₂.{succ u1, succ u1, u1, u1, u1} LatCat.{u1} PartOrdCat.{u1} LatCat.instLargeCategoryLatCat.{u1} LatCat.instConcreteCategoryLatCatInstLargeCategoryLatCat.{u1} instPartOrdCatLargeCategory.{u1} PartOrdCat.instConcreteCategoryPartOrdCatInstPartOrdCatLargeCategory.{u1} LatCat.hasForgetToPartOrd.{u1})) (CategoryTheory.Functor.comp.{u1, u1, u1, succ u1, succ u1, succ u1} LatCat.{u1} LatCat.instLargeCategoryLatCat.{u1} PartOrdCat.{u1} instPartOrdCatLargeCategory.{u1} PartOrdCat.{u1} instPartOrdCatLargeCategory.{u1} (CategoryTheory.forget₂.{succ u1, succ u1, u1, u1, u1} LatCat.{u1} PartOrdCat.{u1} LatCat.instLargeCategoryLatCat.{u1} LatCat.instConcreteCategoryLatCatInstLargeCategoryLatCat.{u1} instPartOrdCatLargeCategory.{u1} PartOrdCat.instConcreteCategoryPartOrdCatInstPartOrdCatLargeCategory.{u1} LatCat.hasForgetToPartOrd.{u1}) PartOrdCat.dual.{u1})
-Case conversion may be inaccurate. Consider using '#align Lat_dual_comp_forget_to_PartOrd latCat_dual_comp_forget_to_partOrdCatₓ'. -/
 theorem latCat_dual_comp_forget_to_partOrdCat :
     LatCat.dual ⋙ forget₂ LatCat PartOrdCat = forget₂ LatCat PartOrdCat ⋙ PartOrdCat.dual :=
   rfl
Diff
@@ -103,12 +103,8 @@ def Iso.mk {α β : LatCat.{u}} (e : α ≃o β) : α ≅ β
     where
   Hom := e
   inv := e.symm
-  hom_inv_id' := by
-    ext
-    exact e.symm_apply_apply _
-  inv_hom_id' := by
-    ext
-    exact e.apply_symm_apply _
+  hom_inv_id' := by ext; exact e.symm_apply_apply _
+  inv_hom_id' := by ext; exact e.apply_symm_apply _
 #align Lat.iso.mk LatCat.Iso.mk
 
 /- warning: Lat.dual -> LatCat.dual is a dubious translation:
Diff
@@ -93,7 +93,7 @@ instance hasForgetToPartOrd : HasForget₂ LatCat PartOrdCat
 
 /- warning: Lat.iso.mk -> LatCat.Iso.mk is a dubious translation:
 lean 3 declaration is
-  forall {α : LatCat.{u1}} {β : LatCat.{u1}}, (OrderIso.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} α) (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} β) (Preorder.toLE.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} α) (PartialOrder.toPreorder.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} α) (SemilatticeInf.toPartialOrder.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} α) (Lattice.toSemilatticeInf.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} α) (LatCat.lattice.{u1} α))))) (Preorder.toLE.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} β) (PartialOrder.toPreorder.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} β) (SemilatticeInf.toPartialOrder.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} β) (Lattice.toSemilatticeInf.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} β) (LatCat.lattice.{u1} β)))))) -> (CategoryTheory.Iso.{u1, succ u1} LatCat.{u1} LatCat.CategoryTheory.largeCategory.{u1} α β)
+  forall {α : LatCat.{u1}} {β : LatCat.{u1}}, (OrderIso.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} α) (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} β) (Preorder.toHasLe.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} α) (PartialOrder.toPreorder.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} α) (SemilatticeInf.toPartialOrder.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} α) (Lattice.toSemilatticeInf.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} α) (LatCat.lattice.{u1} α))))) (Preorder.toHasLe.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} β) (PartialOrder.toPreorder.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} β) (SemilatticeInf.toPartialOrder.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} β) (Lattice.toSemilatticeInf.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} β) (LatCat.lattice.{u1} β)))))) -> (CategoryTheory.Iso.{u1, succ u1} LatCat.{u1} LatCat.CategoryTheory.largeCategory.{u1} α β)
 but is expected to have type
   forall {α : LatCat.{u1}} {β : LatCat.{u1}}, (OrderIso.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} α) (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} β) (Preorder.toLE.{u1} (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} α) (PartialOrder.toPreorder.{u1} (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} α) (SemilatticeInf.toPartialOrder.{u1} (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} α) (Lattice.toSemilatticeInf.{u1} (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} α) (LatCat.instLatticeα.{u1} α))))) (Preorder.toLE.{u1} (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} β) (PartialOrder.toPreorder.{u1} (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} β) (SemilatticeInf.toPartialOrder.{u1} (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} β) (Lattice.toSemilatticeInf.{u1} (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} β) (LatCat.instLatticeα.{u1} β)))))) -> (CategoryTheory.Iso.{u1, succ u1} LatCat.{u1} LatCat.instLargeCategoryLatCat.{u1} α β)
 Case conversion may be inaccurate. Consider using '#align Lat.iso.mk LatCat.Iso.mkₓ'. -/
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yaël Dillies
 
 ! This file was ported from Lean 3 source module order.category.Lat
-! leanprover-community/mathlib commit e8ac6315bcfcbaf2d19a046719c3b553206dac75
+! leanprover-community/mathlib commit 75be6b616681ab6ca66d798ead117e75cd64f125
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -14,6 +14,9 @@ import Mathbin.Order.Hom.Lattice
 /-!
 # The category of lattices
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 This defines `Lat`, the category of lattices.
 
 Note that `Lat` doesn't correspond to the literature definition of [`Lat`]
Diff
@@ -30,30 +30,36 @@ universe u
 
 open CategoryTheory
 
+#print LatCat /-
 /-- The category of lattices. -/
-def Lat :=
+def LatCat :=
   Bundled Lattice
-#align Lat Lat
+#align Lat LatCat
+-/
 
-namespace Lat
+namespace LatCat
 
-instance : CoeSort Lat (Type _) :=
+instance : CoeSort LatCat (Type _) :=
   Bundled.hasCoeToSort
 
-instance (X : Lat) : Lattice X :=
+instance (X : LatCat) : Lattice X :=
   X.str
 
+#print LatCat.of /-
 /-- Construct a bundled `Lat` from a `lattice`. -/
-def of (α : Type _) [Lattice α] : Lat :=
+def of (α : Type _) [Lattice α] : LatCat :=
   Bundled.of α
-#align Lat.of Lat.of
+#align Lat.of LatCat.of
+-/
 
+#print LatCat.coe_of /-
 @[simp]
 theorem coe_of (α : Type _) [Lattice α] : ↥(of α) = α :=
   rfl
-#align Lat.coe_of Lat.coe_of
+#align Lat.coe_of LatCat.coe_of
+-/
 
-instance : Inhabited Lat :=
+instance : Inhabited LatCat :=
   ⟨of Bool⟩
 
 instance : BundledHom @LatticeHom where
@@ -62,23 +68,35 @@ instance : BundledHom @LatticeHom where
   comp := @LatticeHom.comp
   hom_ext X Y _ _ := FunLike.coe_injective
 
-instance : LargeCategory.{u} Lat :=
+instance : LargeCategory.{u} LatCat :=
   BundledHom.category LatticeHom
 
-instance : ConcreteCategory Lat :=
+instance : ConcreteCategory LatCat :=
   BundledHom.concreteCategory LatticeHom
 
-instance hasForgetToPartOrd : HasForget₂ Lat PartOrdCat
+/- warning: Lat.has_forget_to_PartOrd -> LatCat.hasForgetToPartOrd is a dubious translation:
+lean 3 declaration is
+  CategoryTheory.HasForget₂.{succ u1, succ u1, u1, u1, u1} LatCat.{u1} PartOrdCat.{u1} LatCat.CategoryTheory.largeCategory.{u1} LatCat.CategoryTheory.concreteCategory.{u1} PartOrdCat.largeCategory.{u1} PartOrdCat.concreteCategory.{u1}
+but is expected to have type
+  CategoryTheory.HasForget₂.{succ u1, succ u1, u1, u1, u1} LatCat.{u1} PartOrdCat.{u1} LatCat.instLargeCategoryLatCat.{u1} LatCat.instConcreteCategoryLatCatInstLargeCategoryLatCat.{u1} instPartOrdCatLargeCategory.{u1} PartOrdCat.instConcreteCategoryPartOrdCatInstPartOrdCatLargeCategory.{u1}
+Case conversion may be inaccurate. Consider using '#align Lat.has_forget_to_PartOrd LatCat.hasForgetToPartOrdₓ'. -/
+instance hasForgetToPartOrd : HasForget₂ LatCat PartOrdCat
     where
   forget₂ :=
     { obj := fun X => ⟨X⟩
       map := fun X Y f => f }
   forget_comp := rfl
-#align Lat.has_forget_to_PartOrd Lat.hasForgetToPartOrd
-
+#align Lat.has_forget_to_PartOrd LatCat.hasForgetToPartOrd
+
+/- warning: Lat.iso.mk -> LatCat.Iso.mk is a dubious translation:
+lean 3 declaration is
+  forall {α : LatCat.{u1}} {β : LatCat.{u1}}, (OrderIso.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} α) (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} β) (Preorder.toLE.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} α) (PartialOrder.toPreorder.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} α) (SemilatticeInf.toPartialOrder.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} α) (Lattice.toSemilatticeInf.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} α) (LatCat.lattice.{u1} α))))) (Preorder.toLE.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} β) (PartialOrder.toPreorder.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} β) (SemilatticeInf.toPartialOrder.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} β) (Lattice.toSemilatticeInf.{u1} (coeSort.{succ (succ u1), succ (succ u1)} LatCat.{u1} Type.{u1} LatCat.hasCoeToSort.{u1} β) (LatCat.lattice.{u1} β)))))) -> (CategoryTheory.Iso.{u1, succ u1} LatCat.{u1} LatCat.CategoryTheory.largeCategory.{u1} α β)
+but is expected to have type
+  forall {α : LatCat.{u1}} {β : LatCat.{u1}}, (OrderIso.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} α) (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} β) (Preorder.toLE.{u1} (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} α) (PartialOrder.toPreorder.{u1} (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} α) (SemilatticeInf.toPartialOrder.{u1} (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} α) (Lattice.toSemilatticeInf.{u1} (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} α) (LatCat.instLatticeα.{u1} α))))) (Preorder.toLE.{u1} (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} β) (PartialOrder.toPreorder.{u1} (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} β) (SemilatticeInf.toPartialOrder.{u1} (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} β) (Lattice.toSemilatticeInf.{u1} (CategoryTheory.Bundled.α.{u1, u1} Lattice.{u1} β) (LatCat.instLatticeα.{u1} β)))))) -> (CategoryTheory.Iso.{u1, succ u1} LatCat.{u1} LatCat.instLargeCategoryLatCat.{u1} α β)
+Case conversion may be inaccurate. Consider using '#align Lat.iso.mk LatCat.Iso.mkₓ'. -/
 /-- Constructs an isomorphism of lattices from an order isomorphism between them. -/
 @[simps]
-def Iso.mk {α β : Lat.{u}} (e : α ≃o β) : α ≅ β
+def Iso.mk {α β : LatCat.{u}} (e : α ≃o β) : α ≅ β
     where
   Hom := e
   inv := e.symm
@@ -88,27 +106,45 @@ def Iso.mk {α β : Lat.{u}} (e : α ≃o β) : α ≅ β
   inv_hom_id' := by
     ext
     exact e.apply_symm_apply _
-#align Lat.iso.mk Lat.Iso.mk
-
+#align Lat.iso.mk LatCat.Iso.mk
+
+/- warning: Lat.dual -> LatCat.dual is a dubious translation:
+lean 3 declaration is
+  CategoryTheory.Functor.{u1, u1, succ u1, succ u1} LatCat.{u1} LatCat.CategoryTheory.largeCategory.{u1} LatCat.{u1} LatCat.CategoryTheory.largeCategory.{u1}
+but is expected to have type
+  CategoryTheory.Functor.{u1, u1, succ u1, succ u1} LatCat.{u1} LatCat.instLargeCategoryLatCat.{u1} LatCat.{u1} LatCat.instLargeCategoryLatCat.{u1}
+Case conversion may be inaccurate. Consider using '#align Lat.dual LatCat.dualₓ'. -/
 /-- `order_dual` as a functor. -/
 @[simps]
-def dual : Lat ⥤ Lat where
+def dual : LatCat ⥤ LatCat where
   obj X := of Xᵒᵈ
   map X Y := LatticeHom.dual
-#align Lat.dual Lat.dual
-
+#align Lat.dual LatCat.dual
+
+/- warning: Lat.dual_equiv -> LatCat.dualEquiv is a dubious translation:
+lean 3 declaration is
+  CategoryTheory.Equivalence.{u1, u1, succ u1, succ u1} LatCat.{u1} LatCat.CategoryTheory.largeCategory.{u1} LatCat.{u1} LatCat.CategoryTheory.largeCategory.{u1}
+but is expected to have type
+  CategoryTheory.Equivalence.{u1, u1, succ u1, succ u1} LatCat.{u1} LatCat.{u1} LatCat.instLargeCategoryLatCat.{u1} LatCat.instLargeCategoryLatCat.{u1}
+Case conversion may be inaccurate. Consider using '#align Lat.dual_equiv LatCat.dualEquivₓ'. -/
 /-- The equivalence between `Lat` and itself induced by `order_dual` both ways. -/
 @[simps Functor inverse]
-def dualEquiv : Lat ≌ Lat :=
+def dualEquiv : LatCat ≌ LatCat :=
   Equivalence.mk dual dual
     (NatIso.ofComponents (fun X => Iso.mk <| OrderIso.dualDual X) fun X Y f => rfl)
     (NatIso.ofComponents (fun X => Iso.mk <| OrderIso.dualDual X) fun X Y f => rfl)
-#align Lat.dual_equiv Lat.dualEquiv
-
-end Lat
-
-theorem lat_dual_comp_forget_to_partOrdCat :
-    Lat.dual ⋙ forget₂ Lat PartOrdCat = forget₂ Lat PartOrdCat ⋙ PartOrdCat.dual :=
+#align Lat.dual_equiv LatCat.dualEquiv
+
+end LatCat
+
+/- warning: Lat_dual_comp_forget_to_PartOrd -> latCat_dual_comp_forget_to_partOrdCat is a dubious translation:
+lean 3 declaration is
+  Eq.{succ (succ u1)} (CategoryTheory.Functor.{u1, u1, succ u1, succ u1} LatCat.{u1} LatCat.CategoryTheory.largeCategory.{u1} PartOrdCat.{u1} PartOrdCat.largeCategory.{u1}) (CategoryTheory.Functor.comp.{u1, u1, u1, succ u1, succ u1, succ u1} LatCat.{u1} LatCat.CategoryTheory.largeCategory.{u1} LatCat.{u1} LatCat.CategoryTheory.largeCategory.{u1} PartOrdCat.{u1} PartOrdCat.largeCategory.{u1} LatCat.dual.{u1} (CategoryTheory.forget₂.{succ u1, succ u1, u1, u1, u1} LatCat.{u1} PartOrdCat.{u1} LatCat.CategoryTheory.largeCategory.{u1} LatCat.CategoryTheory.concreteCategory.{u1} PartOrdCat.largeCategory.{u1} PartOrdCat.concreteCategory.{u1} LatCat.hasForgetToPartOrd.{u1})) (CategoryTheory.Functor.comp.{u1, u1, u1, succ u1, succ u1, succ u1} LatCat.{u1} LatCat.CategoryTheory.largeCategory.{u1} PartOrdCat.{u1} PartOrdCat.largeCategory.{u1} PartOrdCat.{u1} PartOrdCat.largeCategory.{u1} (CategoryTheory.forget₂.{succ u1, succ u1, u1, u1, u1} LatCat.{u1} PartOrdCat.{u1} LatCat.CategoryTheory.largeCategory.{u1} LatCat.CategoryTheory.concreteCategory.{u1} PartOrdCat.largeCategory.{u1} PartOrdCat.concreteCategory.{u1} LatCat.hasForgetToPartOrd.{u1}) PartOrdCat.dual.{u1})
+but is expected to have type
+  Eq.{succ (succ u1)} (CategoryTheory.Functor.{u1, u1, succ u1, succ u1} LatCat.{u1} LatCat.instLargeCategoryLatCat.{u1} PartOrdCat.{u1} instPartOrdCatLargeCategory.{u1}) (CategoryTheory.Functor.comp.{u1, u1, u1, succ u1, succ u1, succ u1} LatCat.{u1} LatCat.instLargeCategoryLatCat.{u1} LatCat.{u1} LatCat.instLargeCategoryLatCat.{u1} PartOrdCat.{u1} instPartOrdCatLargeCategory.{u1} LatCat.dual.{u1} (CategoryTheory.forget₂.{succ u1, succ u1, u1, u1, u1} LatCat.{u1} PartOrdCat.{u1} LatCat.instLargeCategoryLatCat.{u1} LatCat.instConcreteCategoryLatCatInstLargeCategoryLatCat.{u1} instPartOrdCatLargeCategory.{u1} PartOrdCat.instConcreteCategoryPartOrdCatInstPartOrdCatLargeCategory.{u1} LatCat.hasForgetToPartOrd.{u1})) (CategoryTheory.Functor.comp.{u1, u1, u1, succ u1, succ u1, succ u1} LatCat.{u1} LatCat.instLargeCategoryLatCat.{u1} PartOrdCat.{u1} instPartOrdCatLargeCategory.{u1} PartOrdCat.{u1} instPartOrdCatLargeCategory.{u1} (CategoryTheory.forget₂.{succ u1, succ u1, u1, u1, u1} LatCat.{u1} PartOrdCat.{u1} LatCat.instLargeCategoryLatCat.{u1} LatCat.instConcreteCategoryLatCatInstLargeCategoryLatCat.{u1} instPartOrdCatLargeCategory.{u1} PartOrdCat.instConcreteCategoryPartOrdCatInstPartOrdCatLargeCategory.{u1} LatCat.hasForgetToPartOrd.{u1}) PartOrdCat.dual.{u1})
+Case conversion may be inaccurate. Consider using '#align Lat_dual_comp_forget_to_PartOrd latCat_dual_comp_forget_to_partOrdCatₓ'. -/
+theorem latCat_dual_comp_forget_to_partOrdCat :
+    LatCat.dual ⋙ forget₂ LatCat PartOrdCat = forget₂ LatCat PartOrdCat ⋙ PartOrdCat.dual :=
   rfl
-#align Lat_dual_comp_forget_to_PartOrd lat_dual_comp_forget_to_partOrdCat
+#align Lat_dual_comp_forget_to_PartOrd latCat_dual_comp_forget_to_partOrdCat
 
Diff
@@ -68,7 +68,7 @@ instance : LargeCategory.{u} Lat :=
 instance : ConcreteCategory Lat :=
   BundledHom.concreteCategory LatticeHom
 
-instance hasForgetToPartOrd : HasForget₂ Lat PartOrd
+instance hasForgetToPartOrd : HasForget₂ Lat PartOrdCat
     where
   forget₂ :=
     { obj := fun X => ⟨X⟩
@@ -107,8 +107,8 @@ def dualEquiv : Lat ≌ Lat :=
 
 end Lat
 
-theorem lat_dual_comp_forget_to_partOrd :
-    Lat.dual ⋙ forget₂ Lat PartOrd = forget₂ Lat PartOrd ⋙ PartOrd.dual :=
+theorem lat_dual_comp_forget_to_partOrdCat :
+    Lat.dual ⋙ forget₂ Lat PartOrdCat = forget₂ Lat PartOrdCat ⋙ PartOrdCat.dual :=
   rfl
-#align Lat_dual_comp_forget_to_PartOrd lat_dual_comp_forget_to_partOrd
+#align Lat_dual_comp_forget_to_PartOrd lat_dual_comp_forget_to_partOrdCat
 
Diff
@@ -3,26 +3,26 @@ Copyright (c) 2022 Yaël Dillies. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yaël Dillies
 
-! This file was ported from Lean 3 source module order.category.Lattice
-! leanprover-community/mathlib commit a057441eb14fe0e65a5588084e7e2c1193b82579
+! This file was ported from Lean 3 source module order.category.Lat
+! leanprover-community/mathlib commit e8ac6315bcfcbaf2d19a046719c3b553206dac75
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
-import Mathbin.Order.Category.PartialOrder
+import Mathbin.Order.Category.PartOrd
 import Mathbin.Order.Hom.Lattice
 
 /-!
 # The category of lattices
 
-This defines `Lattice`, the category of lattices.
+This defines `Lat`, the category of lattices.
 
-Note that `Lattice` doesn't correspond to the literature definition of [`Lat`]
+Note that `Lat` doesn't correspond to the literature definition of [`Lat`]
 (https://ncatlab.org/nlab/show/Lat) as we don't require bottom or top elements. Instead, `Lat`
-corresponds to `BoundedLattice` (not yet in mathlib).
+corresponds to `BddLat`.
 
 ## TODO
 
-The free functor from `Lattice` to `BoundedLattice` is `X → with_top (with_bot X)`.
+The free functor from `Lat` to `BddLat` is `X → with_top (with_bot X)`.
 -/
 
 
@@ -31,29 +31,29 @@ universe u
 open CategoryTheory
 
 /-- The category of lattices. -/
-def LatticeCat :=
+def Lat :=
   Bundled Lattice
-#align Lattice LatticeCat
+#align Lat Lat
 
-namespace LatticeCat
+namespace Lat
 
-instance : CoeSort LatticeCat (Type _) :=
+instance : CoeSort Lat (Type _) :=
   Bundled.hasCoeToSort
 
-instance (X : LatticeCat) : Lattice X :=
+instance (X : Lat) : Lattice X :=
   X.str
 
-/-- Construct a bundled `Lattice` from a `lattice`. -/
-def of (α : Type _) [Lattice α] : LatticeCat :=
+/-- Construct a bundled `Lat` from a `lattice`. -/
+def of (α : Type _) [Lattice α] : Lat :=
   Bundled.of α
-#align Lattice.of LatticeCat.of
+#align Lat.of Lat.of
 
 @[simp]
 theorem coe_of (α : Type _) [Lattice α] : ↥(of α) = α :=
   rfl
-#align Lattice.coe_of LatticeCat.coe_of
+#align Lat.coe_of Lat.coe_of
 
-instance : Inhabited LatticeCat :=
+instance : Inhabited Lat :=
   ⟨of Bool⟩
 
 instance : BundledHom @LatticeHom where
@@ -62,23 +62,23 @@ instance : BundledHom @LatticeHom where
   comp := @LatticeHom.comp
   hom_ext X Y _ _ := FunLike.coe_injective
 
-instance : LargeCategory.{u} LatticeCat :=
+instance : LargeCategory.{u} Lat :=
   BundledHom.category LatticeHom
 
-instance : ConcreteCategory LatticeCat :=
+instance : ConcreteCategory Lat :=
   BundledHom.concreteCategory LatticeHom
 
-instance hasForgetToPartialOrder : HasForget₂ LatticeCat PartialOrderCat
+instance hasForgetToPartOrd : HasForget₂ Lat PartOrd
     where
   forget₂ :=
     { obj := fun X => ⟨X⟩
       map := fun X Y f => f }
   forget_comp := rfl
-#align Lattice.has_forget_to_PartialOrder LatticeCat.hasForgetToPartialOrder
+#align Lat.has_forget_to_PartOrd Lat.hasForgetToPartOrd
 
 /-- Constructs an isomorphism of lattices from an order isomorphism between them. -/
 @[simps]
-def Iso.mk {α β : LatticeCat.{u}} (e : α ≃o β) : α ≅ β
+def Iso.mk {α β : Lat.{u}} (e : α ≃o β) : α ≅ β
     where
   Hom := e
   inv := e.symm
@@ -88,28 +88,27 @@ def Iso.mk {α β : LatticeCat.{u}} (e : α ≃o β) : α ≅ β
   inv_hom_id' := by
     ext
     exact e.apply_symm_apply _
-#align Lattice.iso.mk LatticeCat.Iso.mk
+#align Lat.iso.mk Lat.Iso.mk
 
 /-- `order_dual` as a functor. -/
 @[simps]
-def dual : LatticeCat ⥤ LatticeCat where
+def dual : Lat ⥤ Lat where
   obj X := of Xᵒᵈ
   map X Y := LatticeHom.dual
-#align Lattice.dual LatticeCat.dual
+#align Lat.dual Lat.dual
 
-/-- The equivalence between `Lattice` and itself induced by `order_dual` both ways. -/
+/-- The equivalence between `Lat` and itself induced by `order_dual` both ways. -/
 @[simps Functor inverse]
-def dualEquiv : LatticeCat ≌ LatticeCat :=
+def dualEquiv : Lat ≌ Lat :=
   Equivalence.mk dual dual
     (NatIso.ofComponents (fun X => Iso.mk <| OrderIso.dualDual X) fun X Y f => rfl)
     (NatIso.ofComponents (fun X => Iso.mk <| OrderIso.dualDual X) fun X Y f => rfl)
-#align Lattice.dual_equiv LatticeCat.dualEquiv
+#align Lat.dual_equiv Lat.dualEquiv
 
-end LatticeCat
+end Lat
 
-theorem latticeCat_dual_comp_forget_to_partialOrderCat :
-    LatticeCat.dual ⋙ forget₂ LatticeCat PartialOrderCat =
-      forget₂ LatticeCat PartialOrderCat ⋙ PartialOrderCat.dual :=
+theorem lat_dual_comp_forget_to_partOrd :
+    Lat.dual ⋙ forget₂ Lat PartOrd = forget₂ Lat PartOrd ⋙ PartOrd.dual :=
   rfl
-#align Lattice_dual_comp_forget_to_PartialOrder latticeCat_dual_comp_forget_to_partialOrderCat
+#align Lat_dual_comp_forget_to_PartOrd lat_dual_comp_forget_to_partOrd
 

Changes in mathlib4

mathlib3
mathlib4
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
@@ -58,7 +58,7 @@ instance : BundledHom @LatticeHom where
   toFun _ _ f := f.toFun
   id := @LatticeHom.id
   comp := @LatticeHom.comp
-  hom_ext _ _ _ _ h := FunLike.coe_injective h
+  hom_ext _ _ _ _ h := DFunLike.coe_injective h
 
 instance : LargeCategory.{u} Lat :=
   BundledHom.category LatticeHom
chore: Remove Cat suffixes (#3730)

These names needn't change in the first place.

Diff
@@ -3,7 +3,7 @@ Copyright (c) 2022 Yaël Dillies. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yaël Dillies
 -/
-import Mathlib.Order.Category.PartOrdCat
+import Mathlib.Order.Category.PartOrd
 import Mathlib.Order.Hom.Lattice
 
 #align_import order.category.Lat from "leanprover-community/mathlib"@"e8ac6315bcfcbaf2d19a046719c3b553206dac75"
@@ -11,15 +11,15 @@ import Mathlib.Order.Hom.Lattice
 /-!
 # The category of lattices
 
-This defines `LatCat`, the category of lattices.
+This defines `Lat`, the category of lattices.
 
-Note that `LatCat` doesn't correspond to the literature definition of [`LatCat`]
-(https://ncatlab.org/nlab/show/Lat) as we don't require bottom or top elements. Instead, `LatCat`
-corresponds to `BddLatCat`.
+Note that `Lat` doesn't correspond to the literature definition of [`Lat`]
+(https://ncatlab.org/nlab/show/Lat) as we don't require bottom or top elements. Instead, `Lat`
+corresponds to `BddLat`.
 
 ## TODO
 
-The free functor from `LatCat` to `BddLat` is `X → WithTop (WithBot X)`.
+The free functor from `Lat` to `BddLat` is `X → WithTop (WithBot X)`.
 -/
 
 
@@ -28,30 +28,30 @@ universe u
 open CategoryTheory
 
 /-- The category of lattices. -/
-def LatCat :=
+def Lat :=
   Bundled Lattice
 set_option linter.uppercaseLean3 false
-#align Lat LatCat
+#align Lat Lat
 
-namespace LatCat
+namespace Lat
 
-instance : CoeSort LatCat (Type*) :=
+instance : CoeSort Lat Type* :=
   Bundled.coeSort
 
-instance (X : LatCat) : Lattice X :=
+instance (X : Lat) : Lattice X :=
   X.str
 
-/-- Construct a bundled `LatCat` from a `Lattice`. -/
-def of (α : Type*) [Lattice α] : LatCat :=
+/-- Construct a bundled `Lat` from a `Lattice`. -/
+def of (α : Type*) [Lattice α] : Lat :=
   Bundled.of α
-#align Lat.of LatCat.of
+#align Lat.of Lat.of
 
 @[simp]
 theorem coe_of (α : Type*) [Lattice α] : ↥(of α) = α :=
   rfl
-#align Lat.coe_of LatCat.coe_of
+#align Lat.coe_of Lat.coe_of
 
-instance : Inhabited LatCat :=
+instance : Inhabited Lat :=
   ⟨of Bool⟩
 
 instance : BundledHom @LatticeHom where
@@ -60,21 +60,21 @@ instance : BundledHom @LatticeHom where
   comp := @LatticeHom.comp
   hom_ext _ _ _ _ h := FunLike.coe_injective h
 
-instance : LargeCategory.{u} LatCat :=
+instance : LargeCategory.{u} Lat :=
   BundledHom.category LatticeHom
 
-instance : ConcreteCategory LatCat :=
+instance : ConcreteCategory Lat :=
   BundledHom.concreteCategory LatticeHom
 
-instance hasForgetToPartOrd : HasForget₂ LatCat PartOrdCat where
+instance hasForgetToPartOrd : HasForget₂ Lat PartOrd where
   forget₂ :=
     { obj := fun X => Bundled.mk X inferInstance
       map := fun {X Y} (f : LatticeHom X Y) => (f : OrderHom X Y) }
-#align Lat.has_forget_to_PartOrd LatCat.hasForgetToPartOrd
+#align Lat.has_forget_to_PartOrd Lat.hasForgetToPartOrd
 
 /-- Constructs an isomorphism of lattices from an order isomorphism between them. -/
 @[simps]
-def Iso.mk {α β : LatCat.{u}} (e : α ≃o β) : α ≅ β where
+def Iso.mk {α β : Lat.{u}} (e : α ≃o β) : α ≅ β where
   hom := (e : LatticeHom _ _)
   inv := (e.symm : LatticeHom _ _)
   hom_inv_id := by
@@ -83,27 +83,27 @@ def Iso.mk {α β : LatCat.{u}} (e : α ≃o β) : α ≅ β where
   inv_hom_id := by
     ext
     exact e.apply_symm_apply _
-#align Lat.iso.mk LatCat.Iso.mk
+#align Lat.iso.mk Lat.Iso.mk
 
 /-- `OrderDual` as a functor. -/
 @[simps]
-def dual : LatCat ⥤ LatCat where
+def dual : Lat ⥤ Lat where
   obj X := of Xᵒᵈ
   map := LatticeHom.dual
-#align Lat.dual LatCat.dual
+#align Lat.dual Lat.dual
 
-/-- The equivalence between `LatCat` and itself induced by `OrderDual` both ways. -/
+/-- The equivalence between `Lat` and itself induced by `OrderDual` both ways. -/
 @[simps functor inverse]
-def dualEquiv : LatCat ≌ LatCat where
+def dualEquiv : Lat ≌ Lat where
   functor := dual
   inverse := dual
   unitIso := NatIso.ofComponents fun X => Iso.mk <| OrderIso.dualDual X
   counitIso := NatIso.ofComponents fun X => Iso.mk <| OrderIso.dualDual X
-#align Lat.dual_equiv LatCat.dualEquiv
+#align Lat.dual_equiv Lat.dualEquiv
 
-end LatCat
+end Lat
 
-theorem latCat_dual_comp_forget_to_partOrdCat :
-    LatCat.dual ⋙ forget₂ LatCat PartOrdCat = forget₂ LatCat PartOrdCat ⋙ PartOrdCat.dual :=
+theorem Lat_dual_comp_forget_to_partOrd :
+    Lat.dual ⋙ forget₂ Lat PartOrd = forget₂ Lat PartOrd ⋙ PartOrd.dual :=
   rfl
-#align Lat_dual_comp_forget_to_PartOrd latCat_dual_comp_forget_to_partOrdCat
+#align Lat_dual_comp_forget_to_PartOrd Lat_dual_comp_forget_to_partOrd
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
@@ -35,19 +35,19 @@ set_option linter.uppercaseLean3 false
 
 namespace LatCat
 
-instance : CoeSort LatCat (Type _) :=
+instance : CoeSort LatCat (Type*) :=
   Bundled.coeSort
 
 instance (X : LatCat) : Lattice X :=
   X.str
 
 /-- Construct a bundled `LatCat` from a `Lattice`. -/
-def of (α : Type _) [Lattice α] : LatCat :=
+def of (α : Type*) [Lattice α] : LatCat :=
   Bundled.of α
 #align Lat.of LatCat.of
 
 @[simp]
-theorem coe_of (α : Type _) [Lattice α] : ↥(of α) = α :=
+theorem coe_of (α : Type*) [Lattice α] : ↥(of α) = α :=
   rfl
 #align Lat.coe_of LatCat.coe_of
 
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,15 +2,12 @@
 Copyright (c) 2022 Yaël Dillies. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yaël Dillies
-
-! This file was ported from Lean 3 source module order.category.Lat
-! leanprover-community/mathlib commit e8ac6315bcfcbaf2d19a046719c3b553206dac75
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Order.Category.PartOrdCat
 import Mathlib.Order.Hom.Lattice
 
+#align_import order.category.Lat from "leanprover-community/mathlib"@"e8ac6315bcfcbaf2d19a046719c3b553206dac75"
+
 /-!
 # The category of lattices
 
chore: review of automation in category theory (#4793)

Clean up of automation in the category theory library. Leaving out unnecessary proof steps, or fields done by aesop_cat, and making more use of available autoparameters.

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

Diff
@@ -100,8 +100,8 @@ def dual : LatCat ⥤ LatCat where
 def dualEquiv : LatCat ≌ LatCat where
   functor := dual
   inverse := dual
-  unitIso := NatIso.ofComponents (fun X => Iso.mk <| OrderIso.dualDual X) (fun _ => rfl)
-  counitIso := NatIso.ofComponents (fun X => Iso.mk <| OrderIso.dualDual X) (fun _ => rfl)
+  unitIso := NatIso.ofComponents fun X => Iso.mk <| OrderIso.dualDual X
+  counitIso := NatIso.ofComponents fun X => Iso.mk <| OrderIso.dualDual X
 #align Lat.dual_equiv LatCat.dualEquiv
 
 end LatCat
feat: port Order.Category.Lat (#3268)

Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com>

Dependencies 120

121 files ported (100.0%)
48037 lines ported (100.0%)

All dependencies are ported!