order.category.BddOrdMathlib.Order.Category.BddOrd

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
@@ -74,7 +74,7 @@ instance largeCategory : LargeCategory.{u} BddOrd
 instance concreteCategory : ConcreteCategory BddOrd
     where
   forget := ⟨coeSort, fun X Y => coeFn, fun X => rfl, fun X Y Z f g => rfl⟩
-  forget_faithful := ⟨fun X Y => by convert FunLike.coe_injective⟩
+  forget_faithful := ⟨fun X Y => by convert DFunLike.coe_injective⟩
 #align BddOrd.concrete_category BddOrd.concreteCategory
 -/
 
Diff
@@ -3,9 +3,9 @@ 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.CategoryTheory.Category.Bipointed
-import Mathbin.Order.Category.PartOrd
-import Mathbin.Order.Hom.Bounded
+import CategoryTheory.Category.Bipointed
+import Order.Category.PartOrd
+import Order.Hom.Bounded
 
 #align_import order.category.BddOrd from "leanprover-community/mathlib"@"d07a9c875ed7139abfde6a333b2be205c5bd404e"
 
@@ -23,43 +23,43 @@ universe u v
 
 open CategoryTheory
 
-#print BddOrdCat /-
+#print BddOrd /-
 /-- The category of bounded orders with monotone functions. -/
-structure BddOrdCat where
-  toPartOrd : PartOrdCat
+structure BddOrd where
+  toPartOrd : PartOrd
   [isBoundedOrder : BoundedOrder to_PartOrd]
-#align BddOrd BddOrdCat
+#align BddOrd BddOrd
 -/
 
-namespace BddOrdCat
+namespace BddOrd
 
-instance : CoeSort BddOrdCat (Type _) :=
+instance : CoeSort BddOrd (Type _) :=
   InducedCategory.hasCoeToSort toPartOrd
 
-instance (X : BddOrdCat) : PartialOrder X :=
+instance (X : BddOrd) : PartialOrder X :=
   X.toPartOrd.str
 
-attribute [instance] BddOrdCat.isBoundedOrder
+attribute [instance] BddOrd.isBoundedOrder
 
-#print BddOrdCat.of /-
+#print BddOrd.of /-
 /-- Construct a bundled `BddOrd` from a `fintype` `partial_order`. -/
-def of (α : Type _) [PartialOrder α] [BoundedOrder α] : BddOrdCat :=
+def of (α : Type _) [PartialOrder α] [BoundedOrder α] : BddOrd :=
   ⟨⟨α⟩⟩
-#align BddOrd.of BddOrdCat.of
+#align BddOrd.of BddOrd.of
 -/
 
-#print BddOrdCat.coe_of /-
+#print BddOrd.coe_of /-
 @[simp]
 theorem coe_of (α : Type _) [PartialOrder α] [BoundedOrder α] : ↥(of α) = α :=
   rfl
-#align BddOrd.coe_of BddOrdCat.coe_of
+#align BddOrd.coe_of BddOrd.coe_of
 -/
 
-instance : Inhabited BddOrdCat :=
+instance : Inhabited BddOrd :=
   ⟨of PUnit⟩
 
-#print BddOrdCat.largeCategory /-
-instance largeCategory : LargeCategory.{u} BddOrdCat
+#print BddOrd.largeCategory /-
+instance largeCategory : LargeCategory.{u} BddOrd
     where
   Hom X Y := BoundedOrderHom X Y
   id X := BoundedOrderHom.id X
@@ -67,79 +67,78 @@ instance largeCategory : LargeCategory.{u} BddOrdCat
   id_comp' X Y := BoundedOrderHom.comp_id
   comp_id' X Y := BoundedOrderHom.id_comp
   assoc' W X Y Z _ _ _ := BoundedOrderHom.comp_assoc _ _ _
-#align BddOrd.large_category BddOrdCat.largeCategory
+#align BddOrd.large_category BddOrd.largeCategory
 -/
 
-#print BddOrdCat.concreteCategory /-
-instance concreteCategory : ConcreteCategory BddOrdCat
+#print BddOrd.concreteCategory /-
+instance concreteCategory : ConcreteCategory BddOrd
     where
   forget := ⟨coeSort, fun X Y => coeFn, fun X => rfl, fun X Y Z f g => rfl⟩
   forget_faithful := ⟨fun X Y => by convert FunLike.coe_injective⟩
-#align BddOrd.concrete_category BddOrdCat.concreteCategory
+#align BddOrd.concrete_category BddOrd.concreteCategory
 -/
 
-#print BddOrdCat.hasForgetToPartOrd /-
-instance hasForgetToPartOrd : HasForget₂ BddOrdCat PartOrdCat
+#print BddOrd.hasForgetToPartOrd /-
+instance hasForgetToPartOrd : HasForget₂ BddOrd PartOrd
     where forget₂ :=
     { obj := fun X => X.toPartOrd
       map := fun X Y => BoundedOrderHom.toOrderHom }
-#align BddOrd.has_forget_to_PartOrd BddOrdCat.hasForgetToPartOrd
+#align BddOrd.has_forget_to_PartOrd BddOrd.hasForgetToPartOrd
 -/
 
-#print BddOrdCat.hasForgetToBipointed /-
-instance hasForgetToBipointed : HasForget₂ BddOrdCat Bipointed
+#print BddOrd.hasForgetToBipointed /-
+instance hasForgetToBipointed : HasForget₂ BddOrd Bipointed
     where
   forget₂ :=
     { obj := fun X => ⟨X, ⊥, ⊤⟩
       map := fun X Y f => ⟨f, map_bot f, map_top f⟩ }
   forget_comp := rfl
-#align BddOrd.has_forget_to_Bipointed BddOrdCat.hasForgetToBipointed
+#align BddOrd.has_forget_to_Bipointed BddOrd.hasForgetToBipointed
 -/
 
-#print BddOrdCat.dual /-
+#print BddOrd.dual /-
 /-- `order_dual` as a functor. -/
 @[simps]
-def dual : BddOrdCat ⥤ BddOrdCat where
+def dual : BddOrd ⥤ BddOrd where
   obj X := of Xᵒᵈ
   map X Y := BoundedOrderHom.dual
-#align BddOrd.dual BddOrdCat.dual
+#align BddOrd.dual BddOrd.dual
 -/
 
-#print BddOrdCat.Iso.mk /-
+#print BddOrd.Iso.mk /-
 /-- Constructs an equivalence between bounded orders from an order isomorphism between them. -/
 @[simps]
-def Iso.mk {α β : BddOrdCat.{u}} (e : α ≃o β) : α ≅ β
+def Iso.mk {α β : BddOrd.{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 BddOrd.iso.mk BddOrdCat.Iso.mk
+#align BddOrd.iso.mk BddOrd.Iso.mk
 -/
 
-#print BddOrdCat.dualEquiv /-
+#print BddOrd.dualEquiv /-
 /-- The equivalence between `BddOrd` and itself induced by `order_dual` both ways. -/
 @[simps Functor inverse]
-def dualEquiv : BddOrdCat ≌ BddOrdCat :=
+def dualEquiv : BddOrd ≌ BddOrd :=
   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 BddOrd.dual_equiv BddOrdCat.dualEquiv
+#align BddOrd.dual_equiv BddOrd.dualEquiv
 -/
 
-end BddOrdCat
+end BddOrd
 
-#print bddOrd_dual_comp_forget_to_partOrdCat /-
-theorem bddOrd_dual_comp_forget_to_partOrdCat :
-    BddOrdCat.dual ⋙ forget₂ BddOrdCat PartOrdCat =
-      forget₂ BddOrdCat PartOrdCat ⋙ PartOrdCat.dual :=
+#print bddOrd_dual_comp_forget_to_partOrd /-
+theorem bddOrd_dual_comp_forget_to_partOrd :
+    BddOrd.dual ⋙ forget₂ BddOrd PartOrd = forget₂ BddOrd PartOrd ⋙ PartOrd.dual :=
   rfl
-#align BddOrd_dual_comp_forget_to_PartOrd bddOrd_dual_comp_forget_to_partOrdCat
+#align BddOrd_dual_comp_forget_to_PartOrd bddOrd_dual_comp_forget_to_partOrd
 -/
 
 #print bddOrd_dual_comp_forget_to_bipointed /-
 theorem bddOrd_dual_comp_forget_to_bipointed :
-    BddOrdCat.dual ⋙ forget₂ BddOrdCat Bipointed = forget₂ BddOrdCat Bipointed ⋙ Bipointed.swap :=
+    BddOrd.dual ⋙ forget₂ BddOrd Bipointed = forget₂ BddOrd Bipointed ⋙ Bipointed.swap :=
   rfl
 #align BddOrd_dual_comp_forget_to_Bipointed bddOrd_dual_comp_forget_to_bipointed
 -/
Diff
@@ -2,16 +2,13 @@
 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.BddOrd
-! leanprover-community/mathlib commit d07a9c875ed7139abfde6a333b2be205c5bd404e
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.CategoryTheory.Category.Bipointed
 import Mathbin.Order.Category.PartOrd
 import Mathbin.Order.Hom.Bounded
 
+#align_import order.category.BddOrd from "leanprover-community/mathlib"@"d07a9c875ed7139abfde6a333b2be205c5bd404e"
+
 /-!
 # The category of bounded orders
 
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.BddOrd
-! leanprover-community/mathlib commit e8ac6315bcfcbaf2d19a046719c3b553206dac75
+! leanprover-community/mathlib commit d07a9c875ed7139abfde6a333b2be205c5bd404e
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -15,6 +15,9 @@ import Mathbin.Order.Hom.Bounded
 /-!
 # The category of bounded orders
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 This defines `BddOrd`, the category of bounded orders.
 -/
 
Diff
@@ -48,10 +48,12 @@ def of (α : Type _) [PartialOrder α] [BoundedOrder α] : BddOrdCat :=
 #align BddOrd.of BddOrdCat.of
 -/
 
+#print BddOrdCat.coe_of /-
 @[simp]
 theorem coe_of (α : Type _) [PartialOrder α] [BoundedOrder α] : ↥(of α) = α :=
   rfl
 #align BddOrd.coe_of BddOrdCat.coe_of
+-/
 
 instance : Inhabited BddOrdCat :=
   ⟨of PUnit⟩
@@ -76,12 +78,15 @@ instance concreteCategory : ConcreteCategory BddOrdCat
 #align BddOrd.concrete_category BddOrdCat.concreteCategory
 -/
 
+#print BddOrdCat.hasForgetToPartOrd /-
 instance hasForgetToPartOrd : HasForget₂ BddOrdCat PartOrdCat
     where forget₂ :=
     { obj := fun X => X.toPartOrd
       map := fun X Y => BoundedOrderHom.toOrderHom }
 #align BddOrd.has_forget_to_PartOrd BddOrdCat.hasForgetToPartOrd
+-/
 
+#print BddOrdCat.hasForgetToBipointed /-
 instance hasForgetToBipointed : HasForget₂ BddOrdCat Bipointed
     where
   forget₂ :=
@@ -89,6 +94,7 @@ instance hasForgetToBipointed : HasForget₂ BddOrdCat Bipointed
       map := fun X Y f => ⟨f, map_bot f, map_top f⟩ }
   forget_comp := rfl
 #align BddOrd.has_forget_to_Bipointed BddOrdCat.hasForgetToBipointed
+-/
 
 #print BddOrdCat.dual /-
 /-- `order_dual` as a functor. -/
@@ -99,6 +105,7 @@ def dual : BddOrdCat ⥤ BddOrdCat where
 #align BddOrd.dual BddOrdCat.dual
 -/
 
+#print BddOrdCat.Iso.mk /-
 /-- Constructs an equivalence between bounded orders from an order isomorphism between them. -/
 @[simps]
 def Iso.mk {α β : BddOrdCat.{u}} (e : α ≃o β) : α ≅ β
@@ -108,7 +115,9 @@ def Iso.mk {α β : BddOrdCat.{u}} (e : α ≃o β) : α ≅ β
   hom_inv_id' := by ext; exact e.symm_apply_apply _
   inv_hom_id' := by ext; exact e.apply_symm_apply _
 #align BddOrd.iso.mk BddOrdCat.Iso.mk
+-/
 
+#print BddOrdCat.dualEquiv /-
 /-- The equivalence between `BddOrd` and itself induced by `order_dual` both ways. -/
 @[simps Functor inverse]
 def dualEquiv : BddOrdCat ≌ BddOrdCat :=
@@ -116,6 +125,7 @@ def dualEquiv : BddOrdCat ≌ BddOrdCat :=
     (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 BddOrd.dual_equiv BddOrdCat.dualEquiv
+-/
 
 end BddOrdCat
 
Diff
@@ -23,36 +23,41 @@ universe u v
 
 open CategoryTheory
 
+#print BddOrdCat /-
 /-- The category of bounded orders with monotone functions. -/
-structure BddOrd where
+structure BddOrdCat where
   toPartOrd : PartOrdCat
   [isBoundedOrder : BoundedOrder to_PartOrd]
-#align BddOrd BddOrd
+#align BddOrd BddOrdCat
+-/
 
-namespace BddOrd
+namespace BddOrdCat
 
-instance : CoeSort BddOrd (Type _) :=
+instance : CoeSort BddOrdCat (Type _) :=
   InducedCategory.hasCoeToSort toPartOrd
 
-instance (X : BddOrd) : PartialOrder X :=
+instance (X : BddOrdCat) : PartialOrder X :=
   X.toPartOrd.str
 
-attribute [instance] BddOrd.isBoundedOrder
+attribute [instance] BddOrdCat.isBoundedOrder
 
+#print BddOrdCat.of /-
 /-- Construct a bundled `BddOrd` from a `fintype` `partial_order`. -/
-def of (α : Type _) [PartialOrder α] [BoundedOrder α] : BddOrd :=
+def of (α : Type _) [PartialOrder α] [BoundedOrder α] : BddOrdCat :=
   ⟨⟨α⟩⟩
-#align BddOrd.of BddOrd.of
+#align BddOrd.of BddOrdCat.of
+-/
 
 @[simp]
 theorem coe_of (α : Type _) [PartialOrder α] [BoundedOrder α] : ↥(of α) = α :=
   rfl
-#align BddOrd.coe_of BddOrd.coe_of
+#align BddOrd.coe_of BddOrdCat.coe_of
 
-instance : Inhabited BddOrd :=
+instance : Inhabited BddOrdCat :=
   ⟨of PUnit⟩
 
-instance largeCategory : LargeCategory.{u} BddOrd
+#print BddOrdCat.largeCategory /-
+instance largeCategory : LargeCategory.{u} BddOrdCat
     where
   Hom X Y := BoundedOrderHom X Y
   id X := BoundedOrderHom.id X
@@ -60,62 +65,72 @@ instance largeCategory : LargeCategory.{u} BddOrd
   id_comp' X Y := BoundedOrderHom.comp_id
   comp_id' X Y := BoundedOrderHom.id_comp
   assoc' W X Y Z _ _ _ := BoundedOrderHom.comp_assoc _ _ _
-#align BddOrd.large_category BddOrd.largeCategory
+#align BddOrd.large_category BddOrdCat.largeCategory
+-/
 
-instance concreteCategory : ConcreteCategory BddOrd
+#print BddOrdCat.concreteCategory /-
+instance concreteCategory : ConcreteCategory BddOrdCat
     where
   forget := ⟨coeSort, fun X Y => coeFn, fun X => rfl, fun X Y Z f g => rfl⟩
   forget_faithful := ⟨fun X Y => by convert FunLike.coe_injective⟩
-#align BddOrd.concrete_category BddOrd.concreteCategory
+#align BddOrd.concrete_category BddOrdCat.concreteCategory
+-/
 
-instance hasForgetToPartOrd : HasForget₂ BddOrd PartOrdCat
+instance hasForgetToPartOrd : HasForget₂ BddOrdCat PartOrdCat
     where forget₂ :=
     { obj := fun X => X.toPartOrd
       map := fun X Y => BoundedOrderHom.toOrderHom }
-#align BddOrd.has_forget_to_PartOrd BddOrd.hasForgetToPartOrd
+#align BddOrd.has_forget_to_PartOrd BddOrdCat.hasForgetToPartOrd
 
-instance hasForgetToBipointed : HasForget₂ BddOrd Bipointed
+instance hasForgetToBipointed : HasForget₂ BddOrdCat Bipointed
     where
   forget₂ :=
     { obj := fun X => ⟨X, ⊥, ⊤⟩
       map := fun X Y f => ⟨f, map_bot f, map_top f⟩ }
   forget_comp := rfl
-#align BddOrd.has_forget_to_Bipointed BddOrd.hasForgetToBipointed
+#align BddOrd.has_forget_to_Bipointed BddOrdCat.hasForgetToBipointed
 
+#print BddOrdCat.dual /-
 /-- `order_dual` as a functor. -/
 @[simps]
-def dual : BddOrd ⥤ BddOrd where
+def dual : BddOrdCat ⥤ BddOrdCat where
   obj X := of Xᵒᵈ
   map X Y := BoundedOrderHom.dual
-#align BddOrd.dual BddOrd.dual
+#align BddOrd.dual BddOrdCat.dual
+-/
 
 /-- Constructs an equivalence between bounded orders from an order isomorphism between them. -/
 @[simps]
-def Iso.mk {α β : BddOrd.{u}} (e : α ≃o β) : α ≅ β
+def Iso.mk {α β : BddOrdCat.{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 BddOrd.iso.mk BddOrd.Iso.mk
+#align BddOrd.iso.mk BddOrdCat.Iso.mk
 
 /-- The equivalence between `BddOrd` and itself induced by `order_dual` both ways. -/
 @[simps Functor inverse]
-def dualEquiv : BddOrd ≌ BddOrd :=
+def dualEquiv : BddOrdCat ≌ BddOrdCat :=
   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 BddOrd.dual_equiv BddOrd.dualEquiv
+#align BddOrd.dual_equiv BddOrdCat.dualEquiv
 
-end BddOrd
+end BddOrdCat
 
+#print bddOrd_dual_comp_forget_to_partOrdCat /-
 theorem bddOrd_dual_comp_forget_to_partOrdCat :
-    BddOrd.dual ⋙ forget₂ BddOrd PartOrdCat = forget₂ BddOrd PartOrdCat ⋙ PartOrdCat.dual :=
+    BddOrdCat.dual ⋙ forget₂ BddOrdCat PartOrdCat =
+      forget₂ BddOrdCat PartOrdCat ⋙ PartOrdCat.dual :=
   rfl
 #align BddOrd_dual_comp_forget_to_PartOrd bddOrd_dual_comp_forget_to_partOrdCat
+-/
 
+#print bddOrd_dual_comp_forget_to_bipointed /-
 theorem bddOrd_dual_comp_forget_to_bipointed :
-    BddOrd.dual ⋙ forget₂ BddOrd Bipointed = forget₂ BddOrd Bipointed ⋙ Bipointed.swap :=
+    BddOrdCat.dual ⋙ forget₂ BddOrdCat Bipointed = forget₂ BddOrdCat Bipointed ⋙ Bipointed.swap :=
   rfl
 #align BddOrd_dual_comp_forget_to_Bipointed bddOrd_dual_comp_forget_to_bipointed
+-/
 
Diff
@@ -95,12 +95,8 @@ def Iso.mk {α β : BddOrd.{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 BddOrd.iso.mk BddOrd.Iso.mk
 
 /-- The equivalence between `BddOrd` and itself induced by `order_dual` both ways. -/
Diff
@@ -25,7 +25,7 @@ open CategoryTheory
 
 /-- The category of bounded orders with monotone functions. -/
 structure BddOrd where
-  toPartOrd : PartOrd
+  toPartOrd : PartOrdCat
   [isBoundedOrder : BoundedOrder to_PartOrd]
 #align BddOrd BddOrd
 
@@ -68,7 +68,7 @@ instance concreteCategory : ConcreteCategory BddOrd
   forget_faithful := ⟨fun X Y => by convert FunLike.coe_injective⟩
 #align BddOrd.concrete_category BddOrd.concreteCategory
 
-instance hasForgetToPartOrd : HasForget₂ BddOrd PartOrd
+instance hasForgetToPartOrd : HasForget₂ BddOrd PartOrdCat
     where forget₂ :=
     { obj := fun X => X.toPartOrd
       map := fun X Y => BoundedOrderHom.toOrderHom }
@@ -113,10 +113,10 @@ def dualEquiv : BddOrd ≌ BddOrd :=
 
 end BddOrd
 
-theorem bddOrd_dual_comp_forget_to_partOrd :
-    BddOrd.dual ⋙ forget₂ BddOrd PartOrd = forget₂ BddOrd PartOrd ⋙ PartOrd.dual :=
+theorem bddOrd_dual_comp_forget_to_partOrdCat :
+    BddOrd.dual ⋙ forget₂ BddOrd PartOrdCat = forget₂ BddOrd PartOrdCat ⋙ PartOrdCat.dual :=
   rfl
-#align BddOrd_dual_comp_forget_to_PartOrd bddOrd_dual_comp_forget_to_partOrd
+#align BddOrd_dual_comp_forget_to_PartOrd bddOrd_dual_comp_forget_to_partOrdCat
 
 theorem bddOrd_dual_comp_forget_to_bipointed :
     BddOrd.dual ⋙ forget₂ BddOrd Bipointed = forget₂ BddOrd Bipointed ⋙ Bipointed.swap :=

Changes in mathlib4

mathlib3
mathlib4
refactor(*): abbreviation for non-dependent FunLike (#9833)

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

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

Diff
@@ -63,8 +63,8 @@ instance largeCategory : LargeCategory.{u} BddOrd where
 
 -- Porting note: added.
 -- see https://github.com/leanprover-community/mathlib4/issues/5017
-instance instDFunLike (X Y : BddOrd) : DFunLike (X ⟶ Y) X (fun _ => Y) :=
-  show DFunLike (BoundedOrderHom X Y) X (fun _ => Y) from inferInstance
+instance instFunLike (X Y : BddOrd) : FunLike (X ⟶ Y) X Y :=
+  show FunLike (BoundedOrderHom X Y) X Y from inferInstance
 
 instance concreteCategory : ConcreteCategory BddOrd where
   forget :=
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
@@ -63,14 +63,14 @@ instance largeCategory : LargeCategory.{u} BddOrd where
 
 -- Porting note: added.
 -- see https://github.com/leanprover-community/mathlib4/issues/5017
-instance instFunLike (X Y : BddOrd) : FunLike (X ⟶ Y) X (fun _ => Y) :=
-  show FunLike (BoundedOrderHom X Y) X (fun _ => Y) from inferInstance
+instance instDFunLike (X Y : BddOrd) : DFunLike (X ⟶ Y) X (fun _ => Y) :=
+  show DFunLike (BoundedOrderHom X Y) X (fun _ => Y) from inferInstance
 
 instance concreteCategory : ConcreteCategory BddOrd where
   forget :=
     { obj := (↥)
-      map := FunLike.coe }
-  forget_faithful := ⟨(FunLike.coe_injective ·)⟩
+      map := DFunLike.coe }
+  forget_faithful := ⟨(DFunLike.coe_injective ·)⟩
 #align BddOrd.concrete_category BddOrd.concreteCategory
 
 instance hasForgetToPartOrd : HasForget₂ BddOrd PartOrd where
chore: Remove Cat suffixes (#3730)

These names needn't change in the first place.

Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yaël Dillies
 -/
 import Mathlib.CategoryTheory.Category.Bipointed
-import Mathlib.Order.Category.PartOrdCat
+import Mathlib.Order.Category.PartOrd
 import Mathlib.Order.Hom.Bounded
 
 #align_import order.category.BddOrd from "leanprover-community/mathlib"@"e8ac6315bcfcbaf2d19a046719c3b553206dac75"
@@ -12,7 +12,7 @@ import Mathlib.Order.Hom.Bounded
 /-!
 # The category of bounded orders
 
-This defines `BddOrdCat`, the category of bounded orders.
+This defines `BddOrd`, the category of bounded orders.
 -/
 
 set_option linter.uppercaseLean3 false
@@ -22,105 +22,105 @@ universe u v
 open CategoryTheory
 
 /-- The category of bounded orders with monotone functions. -/
-structure BddOrdCat where
+structure BddOrd where
   /-- The underlying object in the category of partial orders. -/
-  toPartOrd : PartOrdCat
+  toPartOrd : PartOrd
   [isBoundedOrder : BoundedOrder toPartOrd]
-#align BddOrd BddOrdCat
+#align BddOrd BddOrd
 
-namespace BddOrdCat
+namespace BddOrd
 
-instance : CoeSort BddOrdCat (Type*) :=
+instance : CoeSort BddOrd (Type*) :=
   InducedCategory.hasCoeToSort toPartOrd
 
-instance (X : BddOrdCat) : PartialOrder X :=
+instance (X : BddOrd) : PartialOrder X :=
   X.toPartOrd.str
 
-attribute [instance] BddOrdCat.isBoundedOrder
+attribute [instance] BddOrd.isBoundedOrder
 
-/-- Construct a bundled `BddOrdCat` from a `Fintype` `PartialOrder`. -/
-def of (α : Type*) [PartialOrder α] [BoundedOrder α] : BddOrdCat :=
+/-- Construct a bundled `BddOrd` from a `Fintype` `PartialOrder`. -/
+def of (α : Type*) [PartialOrder α] [BoundedOrder α] : BddOrd :=
   -- Porting note: was ⟨⟨α⟩⟩, see https://github.com/leanprover-community/mathlib4/issues/4998
   ⟨{ α := α }⟩
-#align BddOrd.of BddOrdCat.of
+#align BddOrd.of BddOrd.of
 
 @[simp]
 theorem coe_of (α : Type*) [PartialOrder α] [BoundedOrder α] : ↥(of α) = α :=
   rfl
-#align BddOrd.coe_of BddOrdCat.coe_of
+#align BddOrd.coe_of BddOrd.coe_of
 
-instance : Inhabited BddOrdCat :=
+instance : Inhabited BddOrd :=
   ⟨of PUnit⟩
 
-instance largeCategory : LargeCategory.{u} BddOrdCat where
+instance largeCategory : LargeCategory.{u} BddOrd where
   Hom X Y := BoundedOrderHom X Y
   id X := BoundedOrderHom.id X
   comp f g := g.comp f
   id_comp := BoundedOrderHom.comp_id
   comp_id := BoundedOrderHom.id_comp
   assoc _ _ _ := BoundedOrderHom.comp_assoc _ _ _
-#align BddOrd.large_category BddOrdCat.largeCategory
+#align BddOrd.large_category BddOrd.largeCategory
 
 -- Porting note: added.
 -- see https://github.com/leanprover-community/mathlib4/issues/5017
-instance instFunLike (X Y : BddOrdCat) : FunLike (X ⟶ Y) X (fun _ => Y) :=
+instance instFunLike (X Y : BddOrd) : FunLike (X ⟶ Y) X (fun _ => Y) :=
   show FunLike (BoundedOrderHom X Y) X (fun _ => Y) from inferInstance
 
-instance concreteCategory : ConcreteCategory BddOrdCat where
+instance concreteCategory : ConcreteCategory BddOrd where
   forget :=
     { obj := (↥)
       map := FunLike.coe }
   forget_faithful := ⟨(FunLike.coe_injective ·)⟩
-#align BddOrd.concrete_category BddOrdCat.concreteCategory
+#align BddOrd.concrete_category BddOrd.concreteCategory
 
-instance hasForgetToPartOrd : HasForget₂ BddOrdCat PartOrdCat where
+instance hasForgetToPartOrd : HasForget₂ BddOrd PartOrd where
   forget₂ :=
     { obj := fun X => X.toPartOrd
       map := fun {X Y} => BoundedOrderHom.toOrderHom }
-#align BddOrd.has_forget_to_PartOrd BddOrdCat.hasForgetToPartOrd
+#align BddOrd.has_forget_to_PartOrd BddOrd.hasForgetToPartOrd
 
-instance hasForgetToBipointed : HasForget₂ BddOrdCat Bipointed where
+instance hasForgetToBipointed : HasForget₂ BddOrd Bipointed where
   forget₂ :=
     { obj := fun X => ⟨X, ⊥, ⊤⟩
       map := fun f => ⟨f, f.map_bot', f.map_top'⟩ }
   forget_comp := rfl
-#align BddOrd.has_forget_to_Bipointed BddOrdCat.hasForgetToBipointed
+#align BddOrd.has_forget_to_Bipointed BddOrd.hasForgetToBipointed
 
 /-- `OrderDual` as a functor. -/
 @[simps]
-def dual : BddOrdCat ⥤ BddOrdCat where
+def dual : BddOrd ⥤ BddOrd where
   obj X := of Xᵒᵈ
   map {X Y} := BoundedOrderHom.dual
-#align BddOrd.dual BddOrdCat.dual
+#align BddOrd.dual BddOrd.dual
 
 /-- Constructs an equivalence between bounded orders from an order isomorphism between them. -/
 @[simps]
-def Iso.mk {α β : BddOrdCat.{u}} (e : α ≃o β) : α ≅ β where
+def Iso.mk {α β : BddOrd.{u}} (e : α ≃o β) : α ≅ β where
   hom := (e : BoundedOrderHom _ _)
   inv := (e.symm : BoundedOrderHom _ _)
   hom_inv_id := by ext; exact e.symm_apply_apply _
   inv_hom_id := by ext; exact e.apply_symm_apply _
-#align BddOrd.iso.mk BddOrdCat.Iso.mk
+#align BddOrd.iso.mk BddOrd.Iso.mk
 
 /-- The equivalence between `BddOrd` and itself induced by `OrderDual` both ways. -/
 @[simps functor inverse]
-def dualEquiv : BddOrdCat ≌ BddOrdCat where
+def dualEquiv : BddOrd ≌ BddOrd 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 BddOrd.dual_equiv BddOrdCat.dualEquiv
+#align BddOrd.dual_equiv BddOrd.dualEquiv
 
-end BddOrdCat
+end BddOrd
 
-theorem bddOrd_dual_comp_forget_to_partOrdCat :
-    BddOrdCat.dual ⋙ forget₂ BddOrdCat PartOrdCat =
-    forget₂ BddOrdCat PartOrdCat ⋙ PartOrdCat.dual :=
+theorem bddOrd_dual_comp_forget_to_partOrd :
+    BddOrd.dual ⋙ forget₂ BddOrd PartOrd =
+    forget₂ BddOrd PartOrd ⋙ PartOrd.dual :=
   rfl
-#align BddOrd_dual_comp_forget_to_PartOrd bddOrd_dual_comp_forget_to_partOrdCat
+#align BddOrd_dual_comp_forget_to_PartOrd bddOrd_dual_comp_forget_to_partOrd
 
 theorem bddOrd_dual_comp_forget_to_bipointed :
-    BddOrdCat.dual ⋙ forget₂ BddOrdCat Bipointed =
-    forget₂ BddOrdCat Bipointed ⋙ Bipointed.swap :=
+    BddOrd.dual ⋙ forget₂ BddOrd Bipointed =
+    forget₂ BddOrd Bipointed ⋙ Bipointed.swap :=
   rfl
 #align BddOrd_dual_comp_forget_to_Bipointed bddOrd_dual_comp_forget_to_bipointed
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
@@ -30,7 +30,7 @@ structure BddOrdCat where
 
 namespace BddOrdCat
 
-instance : CoeSort BddOrdCat (Type _) :=
+instance : CoeSort BddOrdCat (Type*) :=
   InducedCategory.hasCoeToSort toPartOrd
 
 instance (X : BddOrdCat) : PartialOrder X :=
@@ -39,13 +39,13 @@ instance (X : BddOrdCat) : PartialOrder X :=
 attribute [instance] BddOrdCat.isBoundedOrder
 
 /-- Construct a bundled `BddOrdCat` from a `Fintype` `PartialOrder`. -/
-def of (α : Type _) [PartialOrder α] [BoundedOrder α] : BddOrdCat :=
+def of (α : Type*) [PartialOrder α] [BoundedOrder α] : BddOrdCat :=
   -- Porting note: was ⟨⟨α⟩⟩, see https://github.com/leanprover-community/mathlib4/issues/4998
   ⟨{ α := α }⟩
 #align BddOrd.of BddOrdCat.of
 
 @[simp]
-theorem coe_of (α : Type _) [PartialOrder α] [BoundedOrder α] : ↥(of α) = α :=
+theorem coe_of (α : Type*) [PartialOrder α] [BoundedOrder α] : ↥(of α) = α :=
   rfl
 #align BddOrd.coe_of BddOrdCat.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,16 +2,13 @@
 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.BddOrd
-! 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.CategoryTheory.Category.Bipointed
 import Mathlib.Order.Category.PartOrdCat
 import Mathlib.Order.Hom.Bounded
 
+#align_import order.category.BddOrd from "leanprover-community/mathlib"@"e8ac6315bcfcbaf2d19a046719c3b553206dac75"
+
 /-!
 # The category of bounded orders
 
feat: port Order.Category.CompleteLatCat (#5019)

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

Diff
@@ -65,6 +65,7 @@ instance largeCategory : LargeCategory.{u} BddOrdCat where
 #align BddOrd.large_category BddOrdCat.largeCategory
 
 -- Porting note: added.
+-- see https://github.com/leanprover-community/mathlib4/issues/5017
 instance instFunLike (X Y : BddOrdCat) : FunLike (X ⟶ Y) X (fun _ => Y) :=
   show FunLike (BoundedOrderHom X Y) X (fun _ => Y) from inferInstance
 
feat: port Order.Category.BddOrdCat (#4984)

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

Dependencies 121

122 files ported (100.0%)
47160 lines ported (100.0%)

All dependencies are ported!