order.category.PartOrdMathlib.Order.Category.PartOrd

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
@@ -3,8 +3,8 @@ Copyright (c) 2020 Johan Commelin. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johan Commelin
 -/
-import Mathbin.Order.Antisymmetrization
-import Mathbin.Order.Category.Preord
+import Order.Antisymmetrization
+import Order.Category.Preord
 
 #align_import order.category.PartOrd from "leanprover-community/mathlib"@"75be6b616681ab6ca66d798ead117e75cd64f125"
 
@@ -22,107 +22,105 @@ open CategoryTheory
 
 universe u
 
-#print PartOrdCat /-
+#print PartOrd /-
 /-- The category of partially ordered types. -/
-def PartOrdCat :=
+def PartOrd :=
   Bundled PartialOrder
-#align PartOrd PartOrdCat
+#align PartOrd PartOrd
 -/
 
-namespace PartOrdCat
+namespace PartOrd
 
 instance : BundledHom.ParentProjection @PartialOrder.toPreorder :=
   ⟨⟩
 
-deriving instance LargeCategory, ConcreteCategory for PartOrdCat
+deriving instance LargeCategory, ConcreteCategory for PartOrd
 
-instance : CoeSort PartOrdCat (Type _) :=
+instance : CoeSort PartOrd (Type _) :=
   Bundled.hasCoeToSort
 
-#print PartOrdCat.of /-
+#print PartOrd.of /-
 /-- Construct a bundled PartOrd from the underlying type and typeclass. -/
-def of (α : Type _) [PartialOrder α] : PartOrdCat :=
+def of (α : Type _) [PartialOrder α] : PartOrd :=
   Bundled.of α
-#align PartOrd.of PartOrdCat.of
+#align PartOrd.of PartOrd.of
 -/
 
-#print PartOrdCat.coe_of /-
+#print PartOrd.coe_of /-
 @[simp]
 theorem coe_of (α : Type _) [PartialOrder α] : ↥(of α) = α :=
   rfl
-#align PartOrd.coe_of PartOrdCat.coe_of
+#align PartOrd.coe_of PartOrd.coe_of
 -/
 
-instance : Inhabited PartOrdCat :=
+instance : Inhabited PartOrd :=
   ⟨of PUnit⟩
 
-instance (α : PartOrdCat) : PartialOrder α :=
+instance (α : PartOrd) : PartialOrder α :=
   α.str
 
-#print PartOrdCat.hasForgetToPreordCat /-
-instance hasForgetToPreordCat : HasForget₂ PartOrdCat PreordCat :=
+#print PartOrd.hasForgetToPreord /-
+instance hasForgetToPreord : HasForget₂ PartOrd Preord :=
   BundledHom.forget₂ _ _
-#align PartOrd.has_forget_to_Preord PartOrdCat.hasForgetToPreordCat
+#align PartOrd.has_forget_to_Preord PartOrd.hasForgetToPreord
 -/
 
-#print PartOrdCat.Iso.mk /-
+#print PartOrd.Iso.mk /-
 /-- Constructs an equivalence between partial orders from an order isomorphism between them. -/
 @[simps]
-def Iso.mk {α β : PartOrdCat.{u}} (e : α ≃o β) : α ≅ β
+def Iso.mk {α β : PartOrd.{u}} (e : α ≃o β) : α ≅ β
     where
   Hom := e
   inv := e.symm
   hom_inv_id' := by ext; exact e.symm_apply_apply x
   inv_hom_id' := by ext; exact e.apply_symm_apply x
-#align PartOrd.iso.mk PartOrdCat.Iso.mk
+#align PartOrd.iso.mk PartOrd.Iso.mk
 -/
 
-#print PartOrdCat.dual /-
+#print PartOrd.dual /-
 /-- `order_dual` as a functor. -/
 @[simps]
-def dual : PartOrdCat ⥤ PartOrdCat where
+def dual : PartOrd ⥤ PartOrd where
   obj X := of Xᵒᵈ
   map X Y := OrderHom.dual
-#align PartOrd.dual PartOrdCat.dual
+#align PartOrd.dual PartOrd.dual
 -/
 
-#print PartOrdCat.dualEquiv /-
+#print PartOrd.dualEquiv /-
 /-- The equivalence between `PartOrd` and itself induced by `order_dual` both ways. -/
 @[simps Functor inverse]
-def dualEquiv : PartOrdCat ≌ PartOrdCat :=
+def dualEquiv : PartOrd ≌ PartOrd :=
   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 PartOrd.dual_equiv PartOrdCat.dualEquiv
+#align PartOrd.dual_equiv PartOrd.dualEquiv
 -/
 
-end PartOrdCat
+end PartOrd
 
-#print partOrdCat_dual_comp_forget_to_preordCat /-
-theorem partOrdCat_dual_comp_forget_to_preordCat :
-    PartOrdCat.dual ⋙ forget₂ PartOrdCat PreordCat =
-      forget₂ PartOrdCat PreordCat ⋙ PreordCat.dual :=
+#print partOrd_dual_comp_forget_to_preord /-
+theorem partOrd_dual_comp_forget_to_preord :
+    PartOrd.dual ⋙ forget₂ PartOrd Preord = forget₂ PartOrd Preord ⋙ Preord.dual :=
   rfl
-#align PartOrd_dual_comp_forget_to_Preord partOrdCat_dual_comp_forget_to_preordCat
+#align PartOrd_dual_comp_forget_to_Preord partOrd_dual_comp_forget_to_preord
 -/
 
-#print preordCatToPartOrdCat /-
+#print preordToPartOrd /-
 /-- `antisymmetrization` as a functor. It is the free functor. -/
-def preordCatToPartOrdCat : PreordCat.{u} ⥤ PartOrdCat
+def preordToPartOrd : Preord.{u} ⥤ PartOrd
     where
-  obj X := PartOrdCat.of (Antisymmetrization X (· ≤ ·))
+  obj X := PartOrd.of (Antisymmetrization X (· ≤ ·))
   map X Y f := f.Antisymmetrization
   map_id' X := by ext; exact Quotient.inductionOn' x fun x => Quotient.map'_mk'' _ (fun a b => id) _
   map_comp' X Y Z f g := by ext;
     exact Quotient.inductionOn' x fun x => OrderHom.antisymmetrization_apply_mk _ _
-#align Preord_to_PartOrd preordCatToPartOrdCat
+#align Preord_to_PartOrd preordToPartOrd
 -/
 
-#print preordCatToPartOrdCatForgetAdjunction /-
+#print preordToPartOrdForgetAdjunction /-
 /-- `Preord_to_PartOrd` is left adjoint to the forgetful functor, meaning it is the free
 functor from `Preord` to `PartOrd`. -/
-def preordCatToPartOrdCatForgetAdjunction :
-    preordCatToPartOrdCat.{u} ⊣ forget₂ PartOrdCat PreordCat :=
+def preordToPartOrdForgetAdjunction : preordToPartOrd.{u} ⊣ forget₂ PartOrd Preord :=
   Adjunction.mkOfHomEquiv
     { homEquiv := fun X Y =>
         { toFun := fun f =>
@@ -136,16 +134,16 @@ def preordCatToPartOrdCatForgetAdjunction :
       homEquiv_naturality_left_symm := fun X Y Z f g =>
         OrderHom.ext _ _ <| funext fun x => Quotient.inductionOn' x fun x => rfl
       homEquiv_naturality_right := fun X Y Z f g => OrderHom.ext _ _ <| funext fun x => rfl }
-#align Preord_to_PartOrd_forget_adjunction preordCatToPartOrdCatForgetAdjunction
+#align Preord_to_PartOrd_forget_adjunction preordToPartOrdForgetAdjunction
 -/
 
-#print preordCatToPartOrdCatCompToDualIsoToDualCompPreordCatToPartOrdCat /-
+#print preordToPartOrdCompToDualIsoToDualCompPreordToPartOrd /-
 /-- `Preord_to_PartOrd` and `order_dual` commute. -/
 @[simps]
-def preordCatToPartOrdCatCompToDualIsoToDualCompPreordCatToPartOrdCat :
-    preordCatToPartOrdCat.{u} ⋙ PartOrdCat.dual ≅ PreordCat.dual ⋙ preordCatToPartOrdCat :=
-  NatIso.ofComponents (fun X => PartOrdCat.Iso.mk <| OrderIso.dualAntisymmetrization _) fun X Y f =>
+def preordToPartOrdCompToDualIsoToDualCompPreordToPartOrd :
+    preordToPartOrd.{u} ⋙ PartOrd.dual ≅ Preord.dual ⋙ preordToPartOrd :=
+  NatIso.ofComponents (fun X => PartOrd.Iso.mk <| OrderIso.dualAntisymmetrization _) fun X Y f =>
     OrderHom.ext _ _ <| funext fun x => Quotient.inductionOn' x fun x => rfl
-#align Preord_to_PartOrd_comp_to_dual_iso_to_dual_comp_Preord_to_PartOrd preordCatToPartOrdCatCompToDualIsoToDualCompPreordCatToPartOrdCat
+#align Preord_to_PartOrd_comp_to_dual_iso_to_dual_comp_Preord_to_PartOrd preordToPartOrdCompToDualIsoToDualCompPreordToPartOrd
 -/
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2020 Johan Commelin. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johan Commelin
-
-! This file was ported from Lean 3 source module order.category.PartOrd
-! 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.Antisymmetrization
 import Mathbin.Order.Category.Preord
 
+#align_import order.category.PartOrd from "leanprover-community/mathlib"@"75be6b616681ab6ca66d798ead117e75cd64f125"
+
 /-!
 # Category of partial orders
 
Diff
@@ -62,9 +62,11 @@ instance : Inhabited PartOrdCat :=
 instance (α : PartOrdCat) : PartialOrder α :=
   α.str
 
+#print PartOrdCat.hasForgetToPreordCat /-
 instance hasForgetToPreordCat : HasForget₂ PartOrdCat PreordCat :=
   BundledHom.forget₂ _ _
 #align PartOrd.has_forget_to_Preord PartOrdCat.hasForgetToPreordCat
+-/
 
 #print PartOrdCat.Iso.mk /-
 /-- Constructs an equivalence between partial orders from an order isomorphism between them. -/
@@ -87,6 +89,7 @@ def dual : PartOrdCat ⥤ PartOrdCat where
 #align PartOrd.dual PartOrdCat.dual
 -/
 
+#print PartOrdCat.dualEquiv /-
 /-- The equivalence between `PartOrd` and itself induced by `order_dual` both ways. -/
 @[simps Functor inverse]
 def dualEquiv : PartOrdCat ≌ PartOrdCat :=
@@ -94,6 +97,7 @@ def dualEquiv : PartOrdCat ≌ PartOrdCat :=
     (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 PartOrd.dual_equiv PartOrdCat.dualEquiv
+-/
 
 end PartOrdCat
 
Diff
@@ -62,11 +62,9 @@ instance : Inhabited PartOrdCat :=
 instance (α : PartOrdCat) : PartialOrder α :=
   α.str
 
-#print PartOrdCat.hasForgetToPreordCat /-
 instance hasForgetToPreordCat : HasForget₂ PartOrdCat PreordCat :=
   BundledHom.forget₂ _ _
 #align PartOrd.has_forget_to_Preord PartOrdCat.hasForgetToPreordCat
--/
 
 #print PartOrdCat.Iso.mk /-
 /-- Constructs an equivalence between partial orders from an order isomorphism between them. -/
Diff
@@ -68,6 +68,7 @@ instance hasForgetToPreordCat : HasForget₂ PartOrdCat PreordCat :=
 #align PartOrd.has_forget_to_Preord PartOrdCat.hasForgetToPreordCat
 -/
 
+#print PartOrdCat.Iso.mk /-
 /-- Constructs an equivalence between partial orders from an order isomorphism between them. -/
 @[simps]
 def Iso.mk {α β : PartOrdCat.{u}} (e : α ≃o β) : α ≅ β
@@ -77,6 +78,7 @@ def Iso.mk {α β : PartOrdCat.{u}} (e : α ≃o β) : α ≅ β
   hom_inv_id' := by ext; exact e.symm_apply_apply x
   inv_hom_id' := by ext; exact e.apply_symm_apply x
 #align PartOrd.iso.mk PartOrdCat.Iso.mk
+-/
 
 #print PartOrdCat.dual /-
 /-- `order_dual` as a functor. -/
Diff
@@ -68,12 +68,6 @@ instance hasForgetToPreordCat : HasForget₂ PartOrdCat PreordCat :=
 #align PartOrd.has_forget_to_Preord PartOrdCat.hasForgetToPreordCat
 -/
 
-/- warning: PartOrd.iso.mk -> PartOrdCat.Iso.mk is a dubious translation:
-lean 3 declaration is
-  forall {α : PartOrdCat.{u1}} {β : PartOrdCat.{u1}}, (OrderIso.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} PartOrdCat.{u1} Type.{u1} PartOrdCat.hasCoeToSort.{u1} α) (coeSort.{succ (succ u1), succ (succ u1)} PartOrdCat.{u1} Type.{u1} PartOrdCat.hasCoeToSort.{u1} β) (Preorder.toHasLe.{u1} (coeSort.{succ (succ u1), succ (succ u1)} PartOrdCat.{u1} Type.{u1} PartOrdCat.hasCoeToSort.{u1} α) (PartialOrder.toPreorder.{u1} (coeSort.{succ (succ u1), succ (succ u1)} PartOrdCat.{u1} Type.{u1} PartOrdCat.hasCoeToSort.{u1} α) (PartOrdCat.partialOrder.{u1} α))) (Preorder.toHasLe.{u1} (coeSort.{succ (succ u1), succ (succ u1)} PartOrdCat.{u1} Type.{u1} PartOrdCat.hasCoeToSort.{u1} β) (PartialOrder.toPreorder.{u1} (coeSort.{succ (succ u1), succ (succ u1)} PartOrdCat.{u1} Type.{u1} PartOrdCat.hasCoeToSort.{u1} β) (PartOrdCat.partialOrder.{u1} β)))) -> (CategoryTheory.Iso.{u1, succ u1} PartOrdCat.{u1} PartOrdCat.largeCategory.{u1} α β)
-but is expected to have type
-  forall {α : PartOrdCat.{u1}} {β : PartOrdCat.{u1}}, (OrderIso.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} PartialOrder.{u1} α) (CategoryTheory.Bundled.α.{u1, u1} PartialOrder.{u1} β) (Preorder.toLE.{u1} (CategoryTheory.Bundled.α.{u1, u1} PartialOrder.{u1} α) (PartialOrder.toPreorder.{u1} (CategoryTheory.Bundled.α.{u1, u1} PartialOrder.{u1} α) (PartOrdCat.instPartialOrderα.{u1} α))) (Preorder.toLE.{u1} (CategoryTheory.Bundled.α.{u1, u1} PartialOrder.{u1} β) (PartialOrder.toPreorder.{u1} (CategoryTheory.Bundled.α.{u1, u1} PartialOrder.{u1} β) (PartOrdCat.instPartialOrderα.{u1} β)))) -> (CategoryTheory.Iso.{u1, succ u1} PartOrdCat.{u1} instPartOrdCatLargeCategory.{u1} α β)
-Case conversion may be inaccurate. Consider using '#align PartOrd.iso.mk PartOrdCat.Iso.mkₓ'. -/
 /-- Constructs an equivalence between partial orders from an order isomorphism between them. -/
 @[simps]
 def Iso.mk {α β : PartOrdCat.{u}} (e : α ≃o β) : α ≅ β
@@ -93,12 +87,6 @@ def dual : PartOrdCat ⥤ PartOrdCat where
 #align PartOrd.dual PartOrdCat.dual
 -/
 
-/- warning: PartOrd.dual_equiv -> PartOrdCat.dualEquiv is a dubious translation:
-lean 3 declaration is
-  CategoryTheory.Equivalence.{u1, u1, succ u1, succ u1} PartOrdCat.{u1} PartOrdCat.largeCategory.{u1} PartOrdCat.{u1} PartOrdCat.largeCategory.{u1}
-but is expected to have type
-  CategoryTheory.Equivalence.{u1, u1, succ u1, succ u1} PartOrdCat.{u1} PartOrdCat.{u1} instPartOrdCatLargeCategory.{u1} instPartOrdCatLargeCategory.{u1}
-Case conversion may be inaccurate. Consider using '#align PartOrd.dual_equiv PartOrdCat.dualEquivₓ'. -/
 /-- The equivalence between `PartOrd` and itself induced by `order_dual` both ways. -/
 @[simps Functor inverse]
 def dualEquiv : PartOrdCat ≌ PartOrdCat :=
Diff
@@ -80,12 +80,8 @@ def Iso.mk {α β : PartOrdCat.{u}} (e : α ≃o β) : α ≅ β
     where
   Hom := e
   inv := e.symm
-  hom_inv_id' := by
-    ext
-    exact e.symm_apply_apply x
-  inv_hom_id' := by
-    ext
-    exact e.apply_symm_apply x
+  hom_inv_id' := by ext; exact e.symm_apply_apply x
+  inv_hom_id' := by ext; exact e.apply_symm_apply x
 #align PartOrd.iso.mk PartOrdCat.Iso.mk
 
 #print PartOrdCat.dual /-
@@ -127,11 +123,8 @@ def preordCatToPartOrdCat : PreordCat.{u} ⥤ PartOrdCat
     where
   obj X := PartOrdCat.of (Antisymmetrization X (· ≤ ·))
   map X Y f := f.Antisymmetrization
-  map_id' X := by
-    ext
-    exact Quotient.inductionOn' x fun x => Quotient.map'_mk'' _ (fun a b => id) _
-  map_comp' X Y Z f g := by
-    ext
+  map_id' X := by ext; exact Quotient.inductionOn' x fun x => Quotient.map'_mk'' _ (fun a b => id) _
+  map_comp' X Y Z f g := by ext;
     exact Quotient.inductionOn' x fun x => OrderHom.antisymmetrization_apply_mk _ _
 #align Preord_to_PartOrd preordCatToPartOrdCat
 -/
Diff
@@ -68,7 +68,12 @@ instance hasForgetToPreordCat : HasForget₂ PartOrdCat PreordCat :=
 #align PartOrd.has_forget_to_Preord PartOrdCat.hasForgetToPreordCat
 -/
 
-#print PartOrdCat.Iso.mk /-
+/- warning: PartOrd.iso.mk -> PartOrdCat.Iso.mk is a dubious translation:
+lean 3 declaration is
+  forall {α : PartOrdCat.{u1}} {β : PartOrdCat.{u1}}, (OrderIso.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} PartOrdCat.{u1} Type.{u1} PartOrdCat.hasCoeToSort.{u1} α) (coeSort.{succ (succ u1), succ (succ u1)} PartOrdCat.{u1} Type.{u1} PartOrdCat.hasCoeToSort.{u1} β) (Preorder.toHasLe.{u1} (coeSort.{succ (succ u1), succ (succ u1)} PartOrdCat.{u1} Type.{u1} PartOrdCat.hasCoeToSort.{u1} α) (PartialOrder.toPreorder.{u1} (coeSort.{succ (succ u1), succ (succ u1)} PartOrdCat.{u1} Type.{u1} PartOrdCat.hasCoeToSort.{u1} α) (PartOrdCat.partialOrder.{u1} α))) (Preorder.toHasLe.{u1} (coeSort.{succ (succ u1), succ (succ u1)} PartOrdCat.{u1} Type.{u1} PartOrdCat.hasCoeToSort.{u1} β) (PartialOrder.toPreorder.{u1} (coeSort.{succ (succ u1), succ (succ u1)} PartOrdCat.{u1} Type.{u1} PartOrdCat.hasCoeToSort.{u1} β) (PartOrdCat.partialOrder.{u1} β)))) -> (CategoryTheory.Iso.{u1, succ u1} PartOrdCat.{u1} PartOrdCat.largeCategory.{u1} α β)
+but is expected to have type
+  forall {α : PartOrdCat.{u1}} {β : PartOrdCat.{u1}}, (OrderIso.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} PartialOrder.{u1} α) (CategoryTheory.Bundled.α.{u1, u1} PartialOrder.{u1} β) (Preorder.toLE.{u1} (CategoryTheory.Bundled.α.{u1, u1} PartialOrder.{u1} α) (PartialOrder.toPreorder.{u1} (CategoryTheory.Bundled.α.{u1, u1} PartialOrder.{u1} α) (PartOrdCat.instPartialOrderα.{u1} α))) (Preorder.toLE.{u1} (CategoryTheory.Bundled.α.{u1, u1} PartialOrder.{u1} β) (PartialOrder.toPreorder.{u1} (CategoryTheory.Bundled.α.{u1, u1} PartialOrder.{u1} β) (PartOrdCat.instPartialOrderα.{u1} β)))) -> (CategoryTheory.Iso.{u1, succ u1} PartOrdCat.{u1} instPartOrdCatLargeCategory.{u1} α β)
+Case conversion may be inaccurate. Consider using '#align PartOrd.iso.mk PartOrdCat.Iso.mkₓ'. -/
 /-- Constructs an equivalence between partial orders from an order isomorphism between them. -/
 @[simps]
 def Iso.mk {α β : PartOrdCat.{u}} (e : α ≃o β) : α ≅ β
@@ -82,7 +87,6 @@ def Iso.mk {α β : PartOrdCat.{u}} (e : α ≃o β) : α ≅ β
     ext
     exact e.apply_symm_apply x
 #align PartOrd.iso.mk PartOrdCat.Iso.mk
--/
 
 #print PartOrdCat.dual /-
 /-- `order_dual` as a functor. -/
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johan Commelin
 
 ! This file was ported from Lean 3 source module order.category.PartOrd
-! 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.Category.Preord
 /-!
 # Category of partial orders
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 This defines `PartOrd`, the category of partial orders with monotone maps.
 -/
 
Diff
@@ -22,44 +22,53 @@ open CategoryTheory
 
 universe u
 
+#print PartOrdCat /-
 /-- The category of partially ordered types. -/
-def PartOrd :=
+def PartOrdCat :=
   Bundled PartialOrder
-#align PartOrd PartOrd
+#align PartOrd PartOrdCat
+-/
 
-namespace PartOrd
+namespace PartOrdCat
 
 instance : BundledHom.ParentProjection @PartialOrder.toPreorder :=
   ⟨⟩
 
-deriving instance LargeCategory, ConcreteCategory for PartOrd
+deriving instance LargeCategory, ConcreteCategory for PartOrdCat
 
-instance : CoeSort PartOrd (Type _) :=
+instance : CoeSort PartOrdCat (Type _) :=
   Bundled.hasCoeToSort
 
+#print PartOrdCat.of /-
 /-- Construct a bundled PartOrd from the underlying type and typeclass. -/
-def of (α : Type _) [PartialOrder α] : PartOrd :=
+def of (α : Type _) [PartialOrder α] : PartOrdCat :=
   Bundled.of α
-#align PartOrd.of PartOrd.of
+#align PartOrd.of PartOrdCat.of
+-/
 
+#print PartOrdCat.coe_of /-
 @[simp]
 theorem coe_of (α : Type _) [PartialOrder α] : ↥(of α) = α :=
   rfl
-#align PartOrd.coe_of PartOrd.coe_of
+#align PartOrd.coe_of PartOrdCat.coe_of
+-/
 
-instance : Inhabited PartOrd :=
+instance : Inhabited PartOrdCat :=
   ⟨of PUnit⟩
 
-instance (α : PartOrd) : PartialOrder α :=
+instance (α : PartOrdCat) : PartialOrder α :=
   α.str
 
-instance hasForgetToPreord : HasForget₂ PartOrd PreordCat :=
+#print PartOrdCat.hasForgetToPreordCat /-
+instance hasForgetToPreordCat : HasForget₂ PartOrdCat PreordCat :=
   BundledHom.forget₂ _ _
-#align PartOrd.has_forget_to_Preord PartOrd.hasForgetToPreord
+#align PartOrd.has_forget_to_Preord PartOrdCat.hasForgetToPreordCat
+-/
 
+#print PartOrdCat.Iso.mk /-
 /-- Constructs an equivalence between partial orders from an order isomorphism between them. -/
 @[simps]
-def Iso.mk {α β : PartOrd.{u}} (e : α ≃o β) : α ≅ β
+def Iso.mk {α β : PartOrdCat.{u}} (e : α ≃o β) : α ≅ β
     where
   Hom := e
   inv := e.symm
@@ -69,34 +78,47 @@ def Iso.mk {α β : PartOrd.{u}} (e : α ≃o β) : α ≅ β
   inv_hom_id' := by
     ext
     exact e.apply_symm_apply x
-#align PartOrd.iso.mk PartOrd.Iso.mk
+#align PartOrd.iso.mk PartOrdCat.Iso.mk
+-/
 
+#print PartOrdCat.dual /-
 /-- `order_dual` as a functor. -/
 @[simps]
-def dual : PartOrd ⥤ PartOrd where
+def dual : PartOrdCat ⥤ PartOrdCat where
   obj X := of Xᵒᵈ
   map X Y := OrderHom.dual
-#align PartOrd.dual PartOrd.dual
+#align PartOrd.dual PartOrdCat.dual
+-/
 
+/- warning: PartOrd.dual_equiv -> PartOrdCat.dualEquiv is a dubious translation:
+lean 3 declaration is
+  CategoryTheory.Equivalence.{u1, u1, succ u1, succ u1} PartOrdCat.{u1} PartOrdCat.largeCategory.{u1} PartOrdCat.{u1} PartOrdCat.largeCategory.{u1}
+but is expected to have type
+  CategoryTheory.Equivalence.{u1, u1, succ u1, succ u1} PartOrdCat.{u1} PartOrdCat.{u1} instPartOrdCatLargeCategory.{u1} instPartOrdCatLargeCategory.{u1}
+Case conversion may be inaccurate. Consider using '#align PartOrd.dual_equiv PartOrdCat.dualEquivₓ'. -/
 /-- The equivalence between `PartOrd` and itself induced by `order_dual` both ways. -/
 @[simps Functor inverse]
-def dualEquiv : PartOrd ≌ PartOrd :=
+def dualEquiv : PartOrdCat ≌ PartOrdCat :=
   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 PartOrd.dual_equiv PartOrd.dualEquiv
+#align PartOrd.dual_equiv PartOrdCat.dualEquiv
 
-end PartOrd
+end PartOrdCat
 
-theorem partOrd_dual_comp_forget_to_preordCat :
-    PartOrd.dual ⋙ forget₂ PartOrd PreordCat = forget₂ PartOrd PreordCat ⋙ PreordCat.dual :=
+#print partOrdCat_dual_comp_forget_to_preordCat /-
+theorem partOrdCat_dual_comp_forget_to_preordCat :
+    PartOrdCat.dual ⋙ forget₂ PartOrdCat PreordCat =
+      forget₂ PartOrdCat PreordCat ⋙ PreordCat.dual :=
   rfl
-#align PartOrd_dual_comp_forget_to_Preord partOrd_dual_comp_forget_to_preordCat
+#align PartOrd_dual_comp_forget_to_Preord partOrdCat_dual_comp_forget_to_preordCat
+-/
 
+#print preordCatToPartOrdCat /-
 /-- `antisymmetrization` as a functor. It is the free functor. -/
-def preordToPartOrd : PreordCat.{u} ⥤ PartOrd
+def preordCatToPartOrdCat : PreordCat.{u} ⥤ PartOrdCat
     where
-  obj X := PartOrd.of (Antisymmetrization X (· ≤ ·))
+  obj X := PartOrdCat.of (Antisymmetrization X (· ≤ ·))
   map X Y f := f.Antisymmetrization
   map_id' X := by
     ext
@@ -104,11 +126,14 @@ def preordToPartOrd : PreordCat.{u} ⥤ PartOrd
   map_comp' X Y Z f g := by
     ext
     exact Quotient.inductionOn' x fun x => OrderHom.antisymmetrization_apply_mk _ _
-#align Preord_to_PartOrd preordToPartOrd
+#align Preord_to_PartOrd preordCatToPartOrdCat
+-/
 
+#print preordCatToPartOrdCatForgetAdjunction /-
 /-- `Preord_to_PartOrd` is left adjoint to the forgetful functor, meaning it is the free
 functor from `Preord` to `PartOrd`. -/
-def preordToPartOrdForgetAdjunction : preordToPartOrd.{u} ⊣ forget₂ PartOrd PreordCat :=
+def preordCatToPartOrdCatForgetAdjunction :
+    preordCatToPartOrdCat.{u} ⊣ forget₂ PartOrdCat PreordCat :=
   Adjunction.mkOfHomEquiv
     { homEquiv := fun X Y =>
         { toFun := fun f =>
@@ -122,13 +147,16 @@ def preordToPartOrdForgetAdjunction : preordToPartOrd.{u} ⊣ forget₂ PartOrd
       homEquiv_naturality_left_symm := fun X Y Z f g =>
         OrderHom.ext _ _ <| funext fun x => Quotient.inductionOn' x fun x => rfl
       homEquiv_naturality_right := fun X Y Z f g => OrderHom.ext _ _ <| funext fun x => rfl }
-#align Preord_to_PartOrd_forget_adjunction preordToPartOrdForgetAdjunction
+#align Preord_to_PartOrd_forget_adjunction preordCatToPartOrdCatForgetAdjunction
+-/
 
+#print preordCatToPartOrdCatCompToDualIsoToDualCompPreordCatToPartOrdCat /-
 /-- `Preord_to_PartOrd` and `order_dual` commute. -/
 @[simps]
-def preordToPartOrdCompToDualIsoToDualCompPreordToPartOrd :
-    preordToPartOrd.{u} ⋙ PartOrd.dual ≅ PreordCat.dual ⋙ preordToPartOrd :=
-  NatIso.ofComponents (fun X => PartOrd.Iso.mk <| OrderIso.dualAntisymmetrization _) fun X Y f =>
+def preordCatToPartOrdCatCompToDualIsoToDualCompPreordCatToPartOrdCat :
+    preordCatToPartOrdCat.{u} ⋙ PartOrdCat.dual ≅ PreordCat.dual ⋙ preordCatToPartOrdCat :=
+  NatIso.ofComponents (fun X => PartOrdCat.Iso.mk <| OrderIso.dualAntisymmetrization _) fun X Y f =>
     OrderHom.ext _ _ <| funext fun x => Quotient.inductionOn' x fun x => rfl
-#align Preord_to_PartOrd_comp_to_dual_iso_to_dual_comp_Preord_to_PartOrd preordToPartOrdCompToDualIsoToDualCompPreordToPartOrd
+#align Preord_to_PartOrd_comp_to_dual_iso_to_dual_comp_Preord_to_PartOrd preordCatToPartOrdCatCompToDualIsoToDualCompPreordCatToPartOrdCat
+-/
 
Diff
@@ -53,7 +53,7 @@ instance : Inhabited PartOrd :=
 instance (α : PartOrd) : PartialOrder α :=
   α.str
 
-instance hasForgetToPreord : HasForget₂ PartOrd Preord :=
+instance hasForgetToPreord : HasForget₂ PartOrd PreordCat :=
   BundledHom.forget₂ _ _
 #align PartOrd.has_forget_to_Preord PartOrd.hasForgetToPreord
 
@@ -88,13 +88,13 @@ def dualEquiv : PartOrd ≌ PartOrd :=
 
 end PartOrd
 
-theorem partOrd_dual_comp_forget_to_preord :
-    PartOrd.dual ⋙ forget₂ PartOrd Preord = forget₂ PartOrd Preord ⋙ Preord.dual :=
+theorem partOrd_dual_comp_forget_to_preordCat :
+    PartOrd.dual ⋙ forget₂ PartOrd PreordCat = forget₂ PartOrd PreordCat ⋙ PreordCat.dual :=
   rfl
-#align PartOrd_dual_comp_forget_to_Preord partOrd_dual_comp_forget_to_preord
+#align PartOrd_dual_comp_forget_to_Preord partOrd_dual_comp_forget_to_preordCat
 
 /-- `antisymmetrization` as a functor. It is the free functor. -/
-def preordToPartOrd : Preord.{u} ⥤ PartOrd
+def preordToPartOrd : PreordCat.{u} ⥤ PartOrd
     where
   obj X := PartOrd.of (Antisymmetrization X (· ≤ ·))
   map X Y f := f.Antisymmetrization
@@ -108,7 +108,7 @@ def preordToPartOrd : Preord.{u} ⥤ PartOrd
 
 /-- `Preord_to_PartOrd` is left adjoint to the forgetful functor, meaning it is the free
 functor from `Preord` to `PartOrd`. -/
-def preordToPartOrdForgetAdjunction : preordToPartOrd.{u} ⊣ forget₂ PartOrd Preord :=
+def preordToPartOrdForgetAdjunction : preordToPartOrd.{u} ⊣ forget₂ PartOrd PreordCat :=
   Adjunction.mkOfHomEquiv
     { homEquiv := fun X Y =>
         { toFun := fun f =>
@@ -127,7 +127,7 @@ def preordToPartOrdForgetAdjunction : preordToPartOrd.{u} ⊣ forget₂ PartOrd
 /-- `Preord_to_PartOrd` and `order_dual` commute. -/
 @[simps]
 def preordToPartOrdCompToDualIsoToDualCompPreordToPartOrd :
-    preordToPartOrd.{u} ⋙ PartOrd.dual ≅ Preord.dual ⋙ preordToPartOrd :=
+    preordToPartOrd.{u} ⋙ PartOrd.dual ≅ PreordCat.dual ⋙ preordToPartOrd :=
   NatIso.ofComponents (fun X => PartOrd.Iso.mk <| OrderIso.dualAntisymmetrization _) fun X Y f =>
     OrderHom.ext _ _ <| funext fun x => Quotient.inductionOn' x fun x => rfl
 #align Preord_to_PartOrd_comp_to_dual_iso_to_dual_comp_Preord_to_PartOrd preordToPartOrdCompToDualIsoToDualCompPreordToPartOrd

Changes in mathlib4

mathlib3
mathlib4
doc(Order): remove some mathlib3 names in docs (#11953)
Diff
@@ -103,7 +103,7 @@ theorem partOrd_dual_comp_forget_to_preord :
 set_option linter.uppercaseLean3 false in
 #align PartOrd_dual_comp_forget_to_Preord partOrd_dual_comp_forget_to_preord
 
-/-- `antisymmetrization` as a functor. It is the free functor. -/
+/-- `Antisymmetrization` as a functor. It is the free functor. -/
 def preordToPartOrd : Preord.{u} ⥤ PartOrd where
   obj X := PartOrd.of (Antisymmetrization X (· ≤ ·))
   map f := f.antisymmetrization
@@ -116,7 +116,7 @@ def preordToPartOrd : Preord.{u} ⥤ PartOrd where
 set_option linter.uppercaseLean3 false in
 #align Preord_to_PartOrd preordToPartOrd
 
-/-- `Preord_to_PartOrd` is left adjoint to the forgetful functor, meaning it is the free
+/-- `preordToPartOrd` is left adjoint to the forgetful functor, meaning it is the free
 functor from `Preord` to `PartOrd`. -/
 def preordToPartOrdForgetAdjunction :
     preordToPartOrd.{u} ⊣ forget₂ PartOrd Preord :=
Revert "chore: revert #7703 (#7710)"

This reverts commit f3695eb2.

Diff
@@ -146,3 +146,6 @@ def preordToPartOrdCompToDualIsoToDualCompPreordToPartOrd :
     (fun _ => OrderHom.ext _ _ <| funext fun x => Quotient.inductionOn' x fun _ => rfl)
 set_option linter.uppercaseLean3 false in
 #align Preord_to_PartOrd_comp_to_dual_iso_to_dual_comp_Preord_to_PartOrd preordToPartOrdCompToDualIsoToDualCompPreordToPartOrd
+
+-- This lemma was always bad, but the linter only noticed after lean4#2644
+attribute [nolint simpNF] preordToPartOrdCompToDualIsoToDualCompPreordToPartOrd_inv_app_coe
chore: revert #7703 (#7710)

This reverts commit 26eb2b0a.

Diff
@@ -146,6 +146,3 @@ def preordToPartOrdCompToDualIsoToDualCompPreordToPartOrd :
     (fun _ => OrderHom.ext _ _ <| funext fun x => Quotient.inductionOn' x fun _ => rfl)
 set_option linter.uppercaseLean3 false in
 #align Preord_to_PartOrd_comp_to_dual_iso_to_dual_comp_Preord_to_PartOrd preordToPartOrdCompToDualIsoToDualCompPreordToPartOrd
-
--- This lemma was always bad, but the linter only noticed after lean4#2644
-attribute [nolint simpNF] preordToPartOrdCompToDualIsoToDualCompPreordToPartOrd_inv_app_coe
chore: bump toolchain to v4.2.0-rc2 (#7703)

This includes all the changes from #7606.

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

Diff
@@ -146,3 +146,6 @@ def preordToPartOrdCompToDualIsoToDualCompPreordToPartOrd :
     (fun _ => OrderHom.ext _ _ <| funext fun x => Quotient.inductionOn' x fun _ => rfl)
 set_option linter.uppercaseLean3 false in
 #align Preord_to_PartOrd_comp_to_dual_iso_to_dual_comp_Preord_to_PartOrd preordToPartOrdCompToDualIsoToDualCompPreordToPartOrd
+
+-- This lemma was always bad, but the linter only noticed after lean4#2644
+attribute [nolint simpNF] preordToPartOrdCompToDualIsoToDualCompPreordToPartOrd_inv_app_coe
chore: Remove Cat suffixes (#3730)

These names needn't change in the first place.

Diff
@@ -4,14 +4,14 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johan Commelin
 -/
 import Mathlib.Order.Antisymmetrization
-import Mathlib.Order.Category.PreordCat
+import Mathlib.Order.Category.Preord
 
 #align_import order.category.PartOrd from "leanprover-community/mathlib"@"e8ac6315bcfcbaf2d19a046719c3b553206dac75"
 
 /-!
 # Category of partial orders
 
-This defines `PartOrdCat`, the category of partial orders with monotone maps.
+This defines `PartOrd`, the category of partial orders with monotone maps.
 -/
 
 
@@ -20,51 +20,51 @@ open CategoryTheory
 universe u
 
 /-- The category of partially ordered types. -/
-def PartOrdCat :=
+def PartOrd :=
   Bundled PartialOrder
 set_option linter.uppercaseLean3 false in
-#align PartOrd PartOrdCat
+#align PartOrd PartOrd
 
-namespace PartOrdCat
+namespace PartOrd
 
 instance : BundledHom.ParentProjection @PartialOrder.toPreorder :=
   ⟨⟩
 
-deriving instance LargeCategory for PartOrdCat
+deriving instance LargeCategory for PartOrd
 
 -- Porting note: probably see https://github.com/leanprover-community/mathlib4/issues/5020
-instance : ConcreteCategory PartOrdCat :=
+instance : ConcreteCategory PartOrd :=
   BundledHom.concreteCategory _
 
-instance : CoeSort PartOrdCat (Type*) :=
+instance : CoeSort PartOrd Type* :=
   Bundled.coeSort
 
 /-- Construct a bundled PartOrd from the underlying type and typeclass. -/
-def of (α : Type*) [PartialOrder α] : PartOrdCat :=
+def of (α : Type*) [PartialOrder α] : PartOrd :=
   Bundled.of α
 set_option linter.uppercaseLean3 false in
-#align PartOrd.of PartOrdCat.of
+#align PartOrd.of PartOrd.of
 
 @[simp]
 theorem coe_of (α : Type*) [PartialOrder α] : ↥(of α) = α :=
   rfl
 set_option linter.uppercaseLean3 false in
-#align PartOrd.coe_of PartOrdCat.coe_of
+#align PartOrd.coe_of PartOrd.coe_of
 
-instance : Inhabited PartOrdCat :=
+instance : Inhabited PartOrd :=
   ⟨of PUnit⟩
 
-instance (α : PartOrdCat) : PartialOrder α :=
+instance (α : PartOrd) : PartialOrder α :=
   α.str
 
-instance hasForgetToPreordCat : HasForget₂ PartOrdCat PreordCat :=
+instance hasForgetToPreord : HasForget₂ PartOrd Preord :=
   BundledHom.forget₂ _ _
 set_option linter.uppercaseLean3 false in
-#align PartOrd.has_forget_to_Preord PartOrdCat.hasForgetToPreordCat
+#align PartOrd.has_forget_to_Preord PartOrd.hasForgetToPreord
 
 /-- Constructs an equivalence between partial orders from an order isomorphism between them. -/
 @[simps]
-def Iso.mk {α β : PartOrdCat.{u}} (e : α ≃o β) : α ≅ β where
+def Iso.mk {α β : PartOrd.{u}} (e : α ≃o β) : α ≅ β where
   hom := (e : OrderHom α β)
   inv := (e.symm : OrderHom β α)
   hom_inv_id := by
@@ -74,38 +74,38 @@ def Iso.mk {α β : PartOrdCat.{u}} (e : α ≃o β) : α ≅ β where
     ext x
     exact e.apply_symm_apply x
 set_option linter.uppercaseLean3 false in
-#align PartOrd.iso.mk PartOrdCat.Iso.mk
+#align PartOrd.iso.mk PartOrd.Iso.mk
 
 /-- `OrderDual` as a functor. -/
 @[simps]
-def dual : PartOrdCat ⥤ PartOrdCat where
+def dual : PartOrd ⥤ PartOrd where
   obj X := of Xᵒᵈ
   map := OrderHom.dual
 set_option linter.uppercaseLean3 false in
-#align PartOrd.dual PartOrdCat.dual
+#align PartOrd.dual PartOrd.dual
 
-/-- The equivalence between `PartOrdCat` and itself induced by `OrderDual` both ways. -/
+/-- The equivalence between `PartOrd` and itself induced by `OrderDual` both ways. -/
 @[simps functor inverse]
-def dualEquiv : PartOrdCat ≌ PartOrdCat where
+def dualEquiv : PartOrd ≌ PartOrd 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
 set_option linter.uppercaseLean3 false in
-#align PartOrd.dual_equiv PartOrdCat.dualEquiv
+#align PartOrd.dual_equiv PartOrd.dualEquiv
 
-end PartOrdCat
+end PartOrd
 
-theorem partOrdCat_dual_comp_forget_to_preordCat :
-    PartOrdCat.dual ⋙ forget₂ PartOrdCat PreordCat =
-      forget₂ PartOrdCat PreordCat ⋙ PreordCat.dual :=
+theorem partOrd_dual_comp_forget_to_preord :
+    PartOrd.dual ⋙ forget₂ PartOrd Preord =
+      forget₂ PartOrd Preord ⋙ Preord.dual :=
   rfl
 set_option linter.uppercaseLean3 false in
-#align PartOrd_dual_comp_forget_to_Preord partOrdCat_dual_comp_forget_to_preordCat
+#align PartOrd_dual_comp_forget_to_Preord partOrd_dual_comp_forget_to_preord
 
 /-- `antisymmetrization` as a functor. It is the free functor. -/
-def preordCatToPartOrdCat : PreordCat.{u} ⥤ PartOrdCat where
-  obj X := PartOrdCat.of (Antisymmetrization X (· ≤ ·))
+def preordToPartOrd : Preord.{u} ⥤ PartOrd where
+  obj X := PartOrd.of (Antisymmetrization X (· ≤ ·))
   map f := f.antisymmetrization
   map_id X := by
     ext x
@@ -114,12 +114,12 @@ def preordCatToPartOrdCat : PreordCat.{u} ⥤ PartOrdCat where
     ext x
     exact Quotient.inductionOn' x fun x => OrderHom.antisymmetrization_apply_mk _ _
 set_option linter.uppercaseLean3 false in
-#align Preord_to_PartOrd preordCatToPartOrdCat
+#align Preord_to_PartOrd preordToPartOrd
 
 /-- `Preord_to_PartOrd` is left adjoint to the forgetful functor, meaning it is the free
-functor from `PreordCat` to `PartOrdCat`. -/
-def preordCatToPartOrdCatForgetAdjunction :
-    preordCatToPartOrdCat.{u} ⊣ forget₂ PartOrdCat PreordCat :=
+functor from `Preord` to `PartOrd`. -/
+def preordToPartOrdForgetAdjunction :
+    preordToPartOrd.{u} ⊣ forget₂ PartOrd Preord :=
   Adjunction.mkOfHomEquiv
     { homEquiv := fun _ _ =>
         { toFun := fun f =>
@@ -134,15 +134,15 @@ def preordCatToPartOrdCatForgetAdjunction :
         OrderHom.ext _ _ <| funext fun x => Quotient.inductionOn' x fun _ => rfl
       homEquiv_naturality_right := fun _ _ => OrderHom.ext _ _ <| funext fun _ => rfl }
 set_option linter.uppercaseLean3 false in
-#align Preord_to_PartOrd_forget_adjunction preordCatToPartOrdCatForgetAdjunction
+#align Preord_to_PartOrd_forget_adjunction preordToPartOrdForgetAdjunction
 
--- The `simpNF` linter would complain as `Functor.comp_obj`, `PreordCat.dual_obj` both apply to LHS
--- of `preordCatToPartOrdCatCompToDualIsoToDualCompPreordCatToPartOrdCat_hom_app_coe`
-/-- `PreordCatToPartOrdCat` and `OrderDual` commute. -/
+-- The `simpNF` linter would complain as `Functor.comp_obj`, `Preord.dual_obj` both apply to LHS
+-- of `preordToPartOrdCompToDualIsoToDualCompPreordToPartOrd_hom_app_coe`
+/-- `PreordToPartOrd` and `OrderDual` commute. -/
 @[simps! inv_app_coe, simps! (config := .lemmasOnly) hom_app_coe]
-def preordCatToPartOrdCatCompToDualIsoToDualCompPreordCatToPartOrdCat :
-    preordCatToPartOrdCat.{u} ⋙ PartOrdCat.dual ≅ PreordCat.dual ⋙ preordCatToPartOrdCat :=
-  NatIso.ofComponents (fun _ => PartOrdCat.Iso.mk <| OrderIso.dualAntisymmetrization _)
+def preordToPartOrdCompToDualIsoToDualCompPreordToPartOrd :
+    preordToPartOrd.{u} ⋙ PartOrd.dual ≅ Preord.dual ⋙ preordToPartOrd :=
+  NatIso.ofComponents (fun _ => PartOrd.Iso.mk <| OrderIso.dualAntisymmetrization _)
     (fun _ => OrderHom.ext _ _ <| funext fun x => Quotient.inductionOn' x fun _ => rfl)
 set_option linter.uppercaseLean3 false in
-#align Preord_to_PartOrd_comp_to_dual_iso_to_dual_comp_Preord_to_PartOrd preordCatToPartOrdCatCompToDualIsoToDualCompPreordCatToPartOrdCat
+#align Preord_to_PartOrd_comp_to_dual_iso_to_dual_comp_Preord_to_PartOrd preordToPartOrdCompToDualIsoToDualCompPreordToPartOrd
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -36,17 +36,17 @@ deriving instance LargeCategory for PartOrdCat
 instance : ConcreteCategory PartOrdCat :=
   BundledHom.concreteCategory _
 
-instance : CoeSort PartOrdCat (Type _) :=
+instance : CoeSort PartOrdCat (Type*) :=
   Bundled.coeSort
 
 /-- Construct a bundled PartOrd from the underlying type and typeclass. -/
-def of (α : Type _) [PartialOrder α] : PartOrdCat :=
+def of (α : Type*) [PartialOrder α] : PartOrdCat :=
   Bundled.of α
 set_option linter.uppercaseLean3 false in
 #align PartOrd.of PartOrdCat.of
 
 @[simp]
-theorem coe_of (α : Type _) [PartialOrder α] : ↥(of α) = α :=
+theorem coe_of (α : Type*) [PartialOrder α] : ↥(of α) = α :=
   rfl
 set_option linter.uppercaseLean3 false in
 #align PartOrd.coe_of PartOrdCat.coe_of
chore: use FunLike for OrderHom (#5805)

Co-authored-by: Jujian Zhang <jujian.zhang1998@outlook.com> Co-authored-by: Oliver Nash <github@olivernash.org>

Diff
@@ -136,8 +136,10 @@ def preordCatToPartOrdCatForgetAdjunction :
 set_option linter.uppercaseLean3 false in
 #align Preord_to_PartOrd_forget_adjunction preordCatToPartOrdCatForgetAdjunction
 
+-- The `simpNF` linter would complain as `Functor.comp_obj`, `PreordCat.dual_obj` both apply to LHS
+-- of `preordCatToPartOrdCatCompToDualIsoToDualCompPreordCatToPartOrdCat_hom_app_coe`
 /-- `PreordCatToPartOrdCat` and `OrderDual` commute. -/
-@[simps!]
+@[simps! inv_app_coe, simps! (config := .lemmasOnly) hom_app_coe]
 def preordCatToPartOrdCatCompToDualIsoToDualCompPreordCatToPartOrdCat :
     preordCatToPartOrdCat.{u} ⋙ PartOrdCat.dual ≅ PreordCat.dual ⋙ preordCatToPartOrdCat :=
   NatIso.ofComponents (fun _ => PartOrdCat.Iso.mk <| OrderIso.dualAntisymmetrization _)
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) 2020 Johan Commelin. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johan Commelin
-
-! This file was ported from Lean 3 source module order.category.PartOrd
-! 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.Antisymmetrization
 import Mathlib.Order.Category.PreordCat
 
+#align_import order.category.PartOrd from "leanprover-community/mathlib"@"e8ac6315bcfcbaf2d19a046719c3b553206dac75"
+
 /-!
 # Category of partial orders
 
feat: port Order.Category.HeytAlgCat (#5021)

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

Diff
@@ -35,6 +35,7 @@ instance : BundledHom.ParentProjection @PartialOrder.toPreorder :=
 
 deriving instance LargeCategory for PartOrdCat
 
+-- Porting note: probably see https://github.com/leanprover-community/mathlib4/issues/5020
 instance : ConcreteCategory PartOrdCat :=
   BundledHom.concreteCategory _
 
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
@@ -91,8 +91,8 @@ set_option linter.uppercaseLean3 false in
 def dualEquiv : PartOrdCat ≌ PartOrdCat 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
 set_option linter.uppercaseLean3 false in
 #align PartOrd.dual_equiv PartOrdCat.dualEquiv
 
feat: port Order.Category.PartOrd (#3266)

Dependencies 117

118 files ported (100.0%)
46278 lines ported (100.0%)

All dependencies are ported!