order.category.Preord
⟷
Mathlib.Order.Category.Preord
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.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(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)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -109,10 +109,10 @@ def preordToCat : Preord.{u} ⥤ Cat where
#align Preord_to_Cat preordToCat
-/
-instance : Faithful preordToCat.{u}
+instance : CategoryTheory.Functor.Faithful preordToCat.{u}
where map_injective' X Y f g h := by ext x; exact functor.congr_obj h x
-instance : Full preordToCat.{u}
+instance : CategoryTheory.Functor.Full preordToCat.{u}
where
preimage X Y f := ⟨f.obj, f.Monotone⟩
witness' X Y f := by apply CategoryTheory.Functor.ext; tidy
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,10 +3,10 @@ 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.CategoryTheory.Category.Cat
-import Mathbin.CategoryTheory.Category.Preorder
-import Mathbin.CategoryTheory.ConcreteCategory.BundledHom
-import Mathbin.Order.Hom.Basic
+import CategoryTheory.Category.Cat
+import CategoryTheory.Category.Preorder
+import CategoryTheory.ConcreteCategory.BundledHom
+import Order.Hom.Basic
#align_import order.category.Preord from "leanprover-community/mathlib"@"75be6b616681ab6ca66d798ead117e75cd64f125"
@@ -24,14 +24,14 @@ universe u
open CategoryTheory
-#print PreordCat /-
+#print Preord /-
/-- The category of preorders. -/
-def PreordCat :=
+def Preord :=
Bundled Preorder
-#align Preord PreordCat
+#align Preord Preord
-/
-namespace PreordCat
+namespace Preord
instance : BundledHom @OrderHom where
toFun := @OrderHom.toFun
@@ -39,81 +39,80 @@ instance : BundledHom @OrderHom where
comp := @OrderHom.comp
hom_ext := @OrderHom.ext
-deriving instance LargeCategory, ConcreteCategory for PreordCat
+deriving instance LargeCategory, ConcreteCategory for Preord
-instance : CoeSort PreordCat (Type _) :=
+instance : CoeSort Preord (Type _) :=
Bundled.hasCoeToSort
-#print PreordCat.of /-
+#print Preord.of /-
/-- Construct a bundled Preord from the underlying type and typeclass. -/
-def of (α : Type _) [Preorder α] : PreordCat :=
+def of (α : Type _) [Preorder α] : Preord :=
Bundled.of α
-#align Preord.of PreordCat.of
+#align Preord.of Preord.of
-/
-#print PreordCat.coe_of /-
+#print Preord.coe_of /-
@[simp]
theorem coe_of (α : Type _) [Preorder α] : ↥(of α) = α :=
rfl
-#align Preord.coe_of PreordCat.coe_of
+#align Preord.coe_of Preord.coe_of
-/
-instance : Inhabited PreordCat :=
+instance : Inhabited Preord :=
⟨of PUnit⟩
-instance (α : PreordCat) : Preorder α :=
+instance (α : Preord) : Preorder α :=
α.str
-#print PreordCat.Iso.mk /-
+#print Preord.Iso.mk /-
/-- Constructs an equivalence between preorders from an order isomorphism between them. -/
@[simps]
-def Iso.mk {α β : PreordCat.{u}} (e : α ≃o β) : α ≅ β
+def Iso.mk {α β : Preord.{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 Preord.iso.mk PreordCat.Iso.mk
+#align Preord.iso.mk Preord.Iso.mk
-/
-#print PreordCat.dual /-
+#print Preord.dual /-
/-- `order_dual` as a functor. -/
@[simps]
-def dual : PreordCat ⥤ PreordCat where
+def dual : Preord ⥤ Preord where
obj X := of Xᵒᵈ
map X Y := OrderHom.dual
-#align Preord.dual PreordCat.dual
+#align Preord.dual Preord.dual
-/
-#print PreordCat.dualEquiv /-
+#print Preord.dualEquiv /-
/-- The equivalence between `Preord` and itself induced by `order_dual` both ways. -/
@[simps Functor inverse]
-def dualEquiv : PreordCat ≌ PreordCat :=
+def dualEquiv : Preord ≌ Preord :=
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 Preord.dual_equiv PreordCat.dualEquiv
+#align Preord.dual_equiv Preord.dualEquiv
-/
-end PreordCat
+end Preord
-#print preordCatToCat /-
+#print preordToCat /-
/-- The embedding of `Preord` into `Cat`.
-/
@[simps]
-def preordCatToCat : PreordCat.{u} ⥤ Cat
- where
+def preordToCat : Preord.{u} ⥤ Cat where
obj X := Cat.of X.1
map X Y f := f.Monotone.Functor
map_id' X := by apply CategoryTheory.Functor.ext; tidy
map_comp' X Y Z f g := by apply CategoryTheory.Functor.ext; tidy
-#align Preord_to_Cat preordCatToCat
+#align Preord_to_Cat preordToCat
-/
-instance : Faithful preordCatToCat.{u}
+instance : Faithful preordToCat.{u}
where map_injective' X Y f g h := by ext x; exact functor.congr_obj h x
-instance : Full preordCatToCat.{u}
+instance : Full preordToCat.{u}
where
preimage X Y f := ⟨f.obj, f.Monotone⟩
witness' X Y f := by apply CategoryTheory.Functor.ext; tidy
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,17 +2,14 @@
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.Preord
-! 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.CategoryTheory.Category.Cat
import Mathbin.CategoryTheory.Category.Preorder
import Mathbin.CategoryTheory.ConcreteCategory.BundledHom
import Mathbin.Order.Hom.Basic
+#align_import order.category.Preord from "leanprover-community/mathlib"@"75be6b616681ab6ca66d798ead117e75cd64f125"
+
/-!
# Category of preorders
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -88,6 +88,7 @@ def dual : PreordCat ⥤ PreordCat where
#align Preord.dual PreordCat.dual
-/
+#print PreordCat.dualEquiv /-
/-- The equivalence between `Preord` and itself induced by `order_dual` both ways. -/
@[simps Functor inverse]
def dualEquiv : PreordCat ≌ PreordCat :=
@@ -95,6 +96,7 @@ def dualEquiv : PreordCat ≌ PreordCat :=
(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 Preord.dual_equiv PreordCat.dualEquiv
+-/
end PreordCat
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -67,6 +67,7 @@ instance : Inhabited PreordCat :=
instance (α : PreordCat) : Preorder α :=
α.str
+#print PreordCat.Iso.mk /-
/-- Constructs an equivalence between preorders from an order isomorphism between them. -/
@[simps]
def Iso.mk {α β : PreordCat.{u}} (e : α ≃o β) : α ≅ β
@@ -76,6 +77,7 @@ def Iso.mk {α β : PreordCat.{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 Preord.iso.mk PreordCat.Iso.mk
+-/
#print PreordCat.dual /-
/-- `order_dual` as a functor. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -67,12 +67,6 @@ instance : Inhabited PreordCat :=
instance (α : PreordCat) : Preorder α :=
α.str
-/- warning: Preord.iso.mk -> PreordCat.Iso.mk is a dubious translation:
-lean 3 declaration is
- forall {α : PreordCat.{u1}} {β : PreordCat.{u1}}, (OrderIso.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} PreordCat.{u1} Type.{u1} PreordCat.hasCoeToSort.{u1} α) (coeSort.{succ (succ u1), succ (succ u1)} PreordCat.{u1} Type.{u1} PreordCat.hasCoeToSort.{u1} β) (Preorder.toHasLe.{u1} (coeSort.{succ (succ u1), succ (succ u1)} PreordCat.{u1} Type.{u1} PreordCat.hasCoeToSort.{u1} α) (PreordCat.preorder.{u1} α)) (Preorder.toHasLe.{u1} (coeSort.{succ (succ u1), succ (succ u1)} PreordCat.{u1} Type.{u1} PreordCat.hasCoeToSort.{u1} β) (PreordCat.preorder.{u1} β))) -> (CategoryTheory.Iso.{u1, succ u1} PreordCat.{u1} PreordCat.largeCategory.{u1} α β)
-but is expected to have type
- forall {α : PreordCat.{u1}} {β : PreordCat.{u1}}, (OrderIso.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Preorder.{u1} α) (CategoryTheory.Bundled.α.{u1, u1} Preorder.{u1} β) (Preorder.toLE.{u1} (CategoryTheory.Bundled.α.{u1, u1} Preorder.{u1} α) (PreordCat.instPreorderα.{u1} α)) (Preorder.toLE.{u1} (CategoryTheory.Bundled.α.{u1, u1} Preorder.{u1} β) (PreordCat.instPreorderα.{u1} β))) -> (CategoryTheory.Iso.{u1, succ u1} PreordCat.{u1} instPreordCatLargeCategory.{u1} α β)
-Case conversion may be inaccurate. Consider using '#align Preord.iso.mk PreordCat.Iso.mkₓ'. -/
/-- Constructs an equivalence between preorders from an order isomorphism between them. -/
@[simps]
def Iso.mk {α β : PreordCat.{u}} (e : α ≃o β) : α ≅ β
@@ -92,12 +86,6 @@ def dual : PreordCat ⥤ PreordCat where
#align Preord.dual PreordCat.dual
-/
-/- warning: Preord.dual_equiv -> PreordCat.dualEquiv is a dubious translation:
-lean 3 declaration is
- CategoryTheory.Equivalence.{u1, u1, succ u1, succ u1} PreordCat.{u1} PreordCat.largeCategory.{u1} PreordCat.{u1} PreordCat.largeCategory.{u1}
-but is expected to have type
- CategoryTheory.Equivalence.{u1, u1, succ u1, succ u1} PreordCat.{u1} PreordCat.{u1} instPreordCatLargeCategory.{u1} instPreordCatLargeCategory.{u1}
-Case conversion may be inaccurate. Consider using '#align Preord.dual_equiv PreordCat.dualEquivₓ'. -/
/-- The equivalence between `Preord` and itself induced by `order_dual` both ways. -/
@[simps Functor inverse]
def dualEquiv : PreordCat ≌ PreordCat :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -79,12 +79,8 @@ def Iso.mk {α β : PreordCat.{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 Preord.iso.mk PreordCat.Iso.mk
#print PreordCat.dual /-
mathlib commit https://github.com/leanprover-community/mathlib/commit/0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
@@ -67,7 +67,12 @@ instance : Inhabited PreordCat :=
instance (α : PreordCat) : Preorder α :=
α.str
-#print PreordCat.Iso.mk /-
+/- warning: Preord.iso.mk -> PreordCat.Iso.mk is a dubious translation:
+lean 3 declaration is
+ forall {α : PreordCat.{u1}} {β : PreordCat.{u1}}, (OrderIso.{u1, u1} (coeSort.{succ (succ u1), succ (succ u1)} PreordCat.{u1} Type.{u1} PreordCat.hasCoeToSort.{u1} α) (coeSort.{succ (succ u1), succ (succ u1)} PreordCat.{u1} Type.{u1} PreordCat.hasCoeToSort.{u1} β) (Preorder.toHasLe.{u1} (coeSort.{succ (succ u1), succ (succ u1)} PreordCat.{u1} Type.{u1} PreordCat.hasCoeToSort.{u1} α) (PreordCat.preorder.{u1} α)) (Preorder.toHasLe.{u1} (coeSort.{succ (succ u1), succ (succ u1)} PreordCat.{u1} Type.{u1} PreordCat.hasCoeToSort.{u1} β) (PreordCat.preorder.{u1} β))) -> (CategoryTheory.Iso.{u1, succ u1} PreordCat.{u1} PreordCat.largeCategory.{u1} α β)
+but is expected to have type
+ forall {α : PreordCat.{u1}} {β : PreordCat.{u1}}, (OrderIso.{u1, u1} (CategoryTheory.Bundled.α.{u1, u1} Preorder.{u1} α) (CategoryTheory.Bundled.α.{u1, u1} Preorder.{u1} β) (Preorder.toLE.{u1} (CategoryTheory.Bundled.α.{u1, u1} Preorder.{u1} α) (PreordCat.instPreorderα.{u1} α)) (Preorder.toLE.{u1} (CategoryTheory.Bundled.α.{u1, u1} Preorder.{u1} β) (PreordCat.instPreorderα.{u1} β))) -> (CategoryTheory.Iso.{u1, succ u1} PreordCat.{u1} instPreordCatLargeCategory.{u1} α β)
+Case conversion may be inaccurate. Consider using '#align Preord.iso.mk PreordCat.Iso.mkₓ'. -/
/-- Constructs an equivalence between preorders from an order isomorphism between them. -/
@[simps]
def Iso.mk {α β : PreordCat.{u}} (e : α ≃o β) : α ≅ β
@@ -81,7 +86,6 @@ def Iso.mk {α β : PreordCat.{u}} (e : α ≃o β) : α ≅ β
ext
exact e.apply_symm_apply x
#align Preord.iso.mk PreordCat.Iso.mk
--/
#print PreordCat.dual /-
/-- `order_dual` as a functor. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/5ec62c8106221a3f9160e4e4fcc3eed79fe213e9
@@ -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.Preord
-! 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.
-/
@@ -16,6 +16,9 @@ import Mathbin.Order.Hom.Basic
/-!
# Category of preorders
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
This defines `Preord`, the category of preorders with monotone maps.
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/1a4df69ca1a9a0e5e26bfe12e2b92814216016d0
@@ -24,12 +24,14 @@ universe u
open CategoryTheory
+#print PreordCat /-
/-- The category of preorders. -/
-def Preord :=
+def PreordCat :=
Bundled Preorder
-#align Preord Preord
+#align Preord PreordCat
+-/
-namespace Preord
+namespace PreordCat
instance : BundledHom @OrderHom where
toFun := @OrderHom.toFun
@@ -37,30 +39,35 @@ instance : BundledHom @OrderHom where
comp := @OrderHom.comp
hom_ext := @OrderHom.ext
-deriving instance LargeCategory, ConcreteCategory for Preord
+deriving instance LargeCategory, ConcreteCategory for PreordCat
-instance : CoeSort Preord (Type _) :=
+instance : CoeSort PreordCat (Type _) :=
Bundled.hasCoeToSort
+#print PreordCat.of /-
/-- Construct a bundled Preord from the underlying type and typeclass. -/
-def of (α : Type _) [Preorder α] : Preord :=
+def of (α : Type _) [Preorder α] : PreordCat :=
Bundled.of α
-#align Preord.of Preord.of
+#align Preord.of PreordCat.of
+-/
+#print PreordCat.coe_of /-
@[simp]
theorem coe_of (α : Type _) [Preorder α] : ↥(of α) = α :=
rfl
-#align Preord.coe_of Preord.coe_of
+#align Preord.coe_of PreordCat.coe_of
+-/
-instance : Inhabited Preord :=
+instance : Inhabited PreordCat :=
⟨of PUnit⟩
-instance (α : Preord) : Preorder α :=
+instance (α : PreordCat) : Preorder α :=
α.str
+#print PreordCat.Iso.mk /-
/-- Constructs an equivalence between preorders from an order isomorphism between them. -/
@[simps]
-def Iso.mk {α β : Preord.{u}} (e : α ≃o β) : α ≅ β
+def Iso.mk {α β : PreordCat.{u}} (e : α ≃o β) : α ≅ β
where
Hom := e
inv := e.symm
@@ -70,39 +77,51 @@ def Iso.mk {α β : Preord.{u}} (e : α ≃o β) : α ≅ β
inv_hom_id' := by
ext
exact e.apply_symm_apply x
-#align Preord.iso.mk Preord.Iso.mk
+#align Preord.iso.mk PreordCat.Iso.mk
+-/
+#print PreordCat.dual /-
/-- `order_dual` as a functor. -/
@[simps]
-def dual : Preord ⥤ Preord where
+def dual : PreordCat ⥤ PreordCat where
obj X := of Xᵒᵈ
map X Y := OrderHom.dual
-#align Preord.dual Preord.dual
+#align Preord.dual PreordCat.dual
+-/
+/- warning: Preord.dual_equiv -> PreordCat.dualEquiv is a dubious translation:
+lean 3 declaration is
+ CategoryTheory.Equivalence.{u1, u1, succ u1, succ u1} PreordCat.{u1} PreordCat.largeCategory.{u1} PreordCat.{u1} PreordCat.largeCategory.{u1}
+but is expected to have type
+ CategoryTheory.Equivalence.{u1, u1, succ u1, succ u1} PreordCat.{u1} PreordCat.{u1} instPreordCatLargeCategory.{u1} instPreordCatLargeCategory.{u1}
+Case conversion may be inaccurate. Consider using '#align Preord.dual_equiv PreordCat.dualEquivₓ'. -/
/-- The equivalence between `Preord` and itself induced by `order_dual` both ways. -/
@[simps Functor inverse]
-def dualEquiv : Preord ≌ Preord :=
+def dualEquiv : PreordCat ≌ PreordCat :=
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 Preord.dual_equiv Preord.dualEquiv
+#align Preord.dual_equiv PreordCat.dualEquiv
-end Preord
+end PreordCat
+#print preordCatToCat /-
/-- The embedding of `Preord` into `Cat`.
-/
@[simps]
-def preordToCat : Preord.{u} ⥤ Cat where
+def preordCatToCat : PreordCat.{u} ⥤ Cat
+ where
obj X := Cat.of X.1
map X Y f := f.Monotone.Functor
map_id' X := by apply CategoryTheory.Functor.ext; tidy
map_comp' X Y Z f g := by apply CategoryTheory.Functor.ext; tidy
-#align Preord_to_Cat preordToCat
+#align Preord_to_Cat preordCatToCat
+-/
-instance : Faithful preordToCat.{u}
+instance : Faithful preordCatToCat.{u}
where map_injective' X Y f g h := by ext x; exact functor.congr_obj h x
-instance : Full preordToCat.{u}
+instance : Full preordCatToCat.{u}
where
preimage X Y f := ⟨f.obj, f.Monotone⟩
witness' X Y f := by apply CategoryTheory.Functor.ext; tidy
mathlib commit https://github.com/leanprover-community/mathlib/commit/b685f506164f8d17a6404048bc4d696739c5d976
@@ -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
-! This file was ported from Lean 3 source module order.category.Preorder
-! leanprover-community/mathlib commit 5306f2df04c869c95c48367d75ad3051c359e9b5
+! This file was ported from Lean 3 source module order.category.Preord
+! leanprover-community/mathlib commit e8ac6315bcfcbaf2d19a046719c3b553206dac75
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -16,7 +16,7 @@ import Mathbin.Order.Hom.Basic
/-!
# Category of preorders
-This defines `Preorder`, the category of preorders with monotone maps.
+This defines `Preord`, the category of preorders with monotone maps.
-/
@@ -25,11 +25,11 @@ universe u
open CategoryTheory
/-- The category of preorders. -/
-def PreorderCat :=
+def Preord :=
Bundled Preorder
-#align Preorder PreorderCat
+#align Preord Preord
-namespace PreorderCat
+namespace Preord
instance : BundledHom @OrderHom where
toFun := @OrderHom.toFun
@@ -37,30 +37,30 @@ instance : BundledHom @OrderHom where
comp := @OrderHom.comp
hom_ext := @OrderHom.ext
-deriving instance LargeCategory, ConcreteCategory for PreorderCat
+deriving instance LargeCategory, ConcreteCategory for Preord
-instance : CoeSort PreorderCat (Type _) :=
+instance : CoeSort Preord (Type _) :=
Bundled.hasCoeToSort
-/-- Construct a bundled Preorder from the underlying type and typeclass. -/
-def of (α : Type _) [Preorder α] : PreorderCat :=
+/-- Construct a bundled Preord from the underlying type and typeclass. -/
+def of (α : Type _) [Preorder α] : Preord :=
Bundled.of α
-#align Preorder.of PreorderCat.of
+#align Preord.of Preord.of
@[simp]
theorem coe_of (α : Type _) [Preorder α] : ↥(of α) = α :=
rfl
-#align Preorder.coe_of PreorderCat.coe_of
+#align Preord.coe_of Preord.coe_of
-instance : Inhabited PreorderCat :=
+instance : Inhabited Preord :=
⟨of PUnit⟩
-instance (α : PreorderCat) : Preorder α :=
+instance (α : Preord) : Preorder α :=
α.str
/-- Constructs an equivalence between preorders from an order isomorphism between them. -/
@[simps]
-def Iso.mk {α β : PreorderCat.{u}} (e : α ≃o β) : α ≅ β
+def Iso.mk {α β : Preord.{u}} (e : α ≃o β) : α ≅ β
where
Hom := e
inv := e.symm
@@ -70,40 +70,39 @@ def Iso.mk {α β : PreorderCat.{u}} (e : α ≃o β) : α ≅ β
inv_hom_id' := by
ext
exact e.apply_symm_apply x
-#align Preorder.iso.mk PreorderCat.Iso.mk
+#align Preord.iso.mk Preord.Iso.mk
/-- `order_dual` as a functor. -/
@[simps]
-def dual : PreorderCat ⥤ PreorderCat where
+def dual : Preord ⥤ Preord where
obj X := of Xᵒᵈ
map X Y := OrderHom.dual
-#align Preorder.dual PreorderCat.dual
+#align Preord.dual Preord.dual
-/-- The equivalence between `Preorder` and itself induced by `order_dual` both ways. -/
+/-- The equivalence between `Preord` and itself induced by `order_dual` both ways. -/
@[simps Functor inverse]
-def dualEquiv : PreorderCat ≌ PreorderCat :=
+def dualEquiv : Preord ≌ Preord :=
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 Preorder.dual_equiv PreorderCat.dualEquiv
+#align Preord.dual_equiv Preord.dualEquiv
-end PreorderCat
+end Preord
-/-- The embedding of `Preorder` into `Cat`.
+/-- The embedding of `Preord` into `Cat`.
-/
@[simps]
-def preorderToCat : PreorderCat.{u} ⥤ Cat
- where
+def preordToCat : Preord.{u} ⥤ Cat where
obj X := Cat.of X.1
map X Y f := f.Monotone.Functor
map_id' X := by apply CategoryTheory.Functor.ext; tidy
map_comp' X Y Z f g := by apply CategoryTheory.Functor.ext; tidy
-#align Preorder_to_Cat preorderToCat
+#align Preord_to_Cat preordToCat
-instance : Faithful preorderToCat.{u}
+instance : Faithful preordToCat.{u}
where map_injective' X Y f g h := by ext x; exact functor.congr_obj h x
-instance : Full preorderToCat.{u}
+instance : Full preordToCat.{u}
where
preimage X Y f := ⟨f.obj, f.Monotone⟩
witness' X Y f := by apply CategoryTheory.Functor.ext; tidy
Functor.Full
a Prop (#12449)
Before this PR, Functor.Full
contained the data of the preimage of maps by a full functor F
. This PR makes Functor.Full
a proposition. This is to prevent any diamond to appear.
The lemma Functor.image_preimage
is also renamed Functor.map_preimage
.
Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
@@ -109,4 +109,4 @@ instance : preordToCat.{u}.Faithful where
map_injective h := by ext x; exact Functor.congr_obj h x
instance : preordToCat.{u}.Full where
- preimage {X Y} f := ⟨f.obj, @CategoryTheory.Functor.monotone X Y _ _ f⟩
+ map_surjective {X Y} f := ⟨⟨f.obj, @CategoryTheory.Functor.monotone X Y _ _ f⟩, rfl⟩
These notions on functors are now Functor.Full
, Functor.Faithful
, Functor.EssSurj
, Functor.IsEquivalence
, Functor.ReflectsIsomorphisms
. Deprecated aliases are introduced for the previous names.
@@ -105,8 +105,8 @@ def preordToCat : Preord.{u} ⥤ Cat where
set_option linter.uppercaseLean3 false in
#align Preord_to_Cat preordToCat
-instance : Faithful preordToCat.{u} where
+instance : preordToCat.{u}.Faithful where
map_injective h := by ext x; exact Functor.congr_obj h x
-instance : Full preordToCat.{u} where
+instance : preordToCat.{u}.Full where
preimage {X Y} f := ⟨f.obj, @CategoryTheory.Functor.monotone X Y _ _ f⟩
@@ -13,7 +13,7 @@ import Mathlib.Order.Hom.Basic
/-!
# Category of preorders
-This defines `PreordCat`, the category of preorders with monotone maps.
+This defines `Preord`, the category of preorders with monotone maps.
-/
@@ -22,12 +22,12 @@ universe u
open CategoryTheory
/-- The category of preorders. -/
-def PreordCat :=
+def Preord :=
Bundled Preorder
set_option linter.uppercaseLean3 false in
-#align Preord PreordCat
+#align Preord Preord
-namespace PreordCat
+namespace Preord
instance : BundledHom @OrderHom where
toFun := @OrderHom.toFun
@@ -35,36 +35,36 @@ instance : BundledHom @OrderHom where
comp := @OrderHom.comp
hom_ext := @OrderHom.ext
-deriving instance LargeCategory for PreordCat
+deriving instance LargeCategory for Preord
-- Porting note: probably see https://github.com/leanprover-community/mathlib4/issues/5020
-instance : ConcreteCategory PreordCat :=
+instance : ConcreteCategory Preord :=
BundledHom.concreteCategory _
-instance : CoeSort PreordCat (Type*) :=
+instance : CoeSort Preord Type* :=
Bundled.coeSort
-/-- Construct a bundled PreordCat from the underlying type and typeclass. -/
-def of (α : Type*) [Preorder α] : PreordCat :=
+/-- Construct a bundled Preord from the underlying type and typeclass. -/
+def of (α : Type*) [Preorder α] : Preord :=
Bundled.of α
set_option linter.uppercaseLean3 false in
-#align Preord.of PreordCat.of
+#align Preord.of Preord.of
@[simp]
theorem coe_of (α : Type*) [Preorder α] : ↥(of α) = α :=
rfl
set_option linter.uppercaseLean3 false in
-#align Preord.coe_of PreordCat.coe_of
+#align Preord.coe_of Preord.coe_of
-instance : Inhabited PreordCat :=
+instance : Inhabited Preord :=
⟨of PUnit⟩
-instance (α : PreordCat) : Preorder α :=
+instance (α : Preord) : Preorder α :=
α.str
/-- Constructs an equivalence between preorders from an order isomorphism between them. -/
@[simps]
-def Iso.mk {α β : PreordCat.{u}} (e : α ≃o β) : α ≅ β where
+def Iso.mk {α β : Preord.{u}} (e : α ≃o β) : α ≅ β where
hom := (e : OrderHom α β)
inv := (e.symm : OrderHom β α)
hom_inv_id := by
@@ -74,39 +74,39 @@ def Iso.mk {α β : PreordCat.{u}} (e : α ≃o β) : α ≅ β where
ext x
exact e.apply_symm_apply x
set_option linter.uppercaseLean3 false in
-#align Preord.iso.mk PreordCat.Iso.mk
+#align Preord.iso.mk Preord.Iso.mk
/-- `OrderDual` as a functor. -/
@[simps]
-def dual : PreordCat ⥤ PreordCat where
+def dual : Preord ⥤ Preord where
obj X := of Xᵒᵈ
map := OrderHom.dual
set_option linter.uppercaseLean3 false in
-#align Preord.dual PreordCat.dual
+#align Preord.dual Preord.dual
-/-- The equivalence between `PreordCat` and itself induced by `OrderDual` both ways. -/
+/-- The equivalence between `Preord` and itself induced by `OrderDual` both ways. -/
@[simps functor inverse]
-def dualEquiv : PreordCat ≌ PreordCat where
+def dualEquiv : Preord ≌ Preord 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 Preord.dual_equiv PreordCat.dualEquiv
+#align Preord.dual_equiv Preord.dualEquiv
-end PreordCat
+end Preord
-/-- The embedding of `PreordCat` into `Cat`.
+/-- The embedding of `Preord` into `Cat`.
-/
@[simps]
-def preordCatToCat : PreordCat.{u} ⥤ Cat where
+def preordToCat : Preord.{u} ⥤ Cat where
obj X := Cat.of X.1
map f := f.monotone.functor
set_option linter.uppercaseLean3 false in
-#align Preord_to_Cat preordCatToCat
+#align Preord_to_Cat preordToCat
-instance : Faithful preordCatToCat.{u} where
+instance : Faithful preordToCat.{u} where
map_injective h := by ext x; exact Functor.congr_obj h x
-instance : Full preordCatToCat.{u} where
+instance : Full preordToCat.{u} where
preimage {X Y} f := ⟨f.obj, @CategoryTheory.Functor.monotone X Y _ _ f⟩
@@ -105,8 +105,8 @@ def preordCatToCat : PreordCat.{u} ⥤ Cat where
set_option linter.uppercaseLean3 false in
#align Preord_to_Cat preordCatToCat
-instance : Faithful preordCatToCat.{u}
- where map_injective h := by ext x; exact Functor.congr_obj h x
+instance : Faithful preordCatToCat.{u} where
+ map_injective h := by ext x; exact Functor.congr_obj h x
instance : Full preordCatToCat.{u} where
preimage {X Y} f := ⟨f.obj, @CategoryTheory.Functor.monotone X Y _ _ f⟩
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -41,17 +41,17 @@ deriving instance LargeCategory for PreordCat
instance : ConcreteCategory PreordCat :=
BundledHom.concreteCategory _
-instance : CoeSort PreordCat (Type _) :=
+instance : CoeSort PreordCat (Type*) :=
Bundled.coeSort
/-- Construct a bundled PreordCat from the underlying type and typeclass. -/
-def of (α : Type _) [Preorder α] : PreordCat :=
+def of (α : Type*) [Preorder α] : PreordCat :=
Bundled.of α
set_option linter.uppercaseLean3 false in
#align Preord.of PreordCat.of
@[simp]
-theorem coe_of (α : Type _) [Preorder α] : ↥(of α) = α :=
+theorem coe_of (α : Type*) [Preorder α] : ↥(of α) = α :=
rfl
set_option linter.uppercaseLean3 false in
#align Preord.coe_of PreordCat.coe_of
@@ -2,17 +2,14 @@
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.Preord
-! 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.Cat
import Mathlib.CategoryTheory.Category.Preorder
import Mathlib.CategoryTheory.ConcreteCategory.BundledHom
import Mathlib.Order.Hom.Basic
+#align_import order.category.Preord from "leanprover-community/mathlib"@"e8ac6315bcfcbaf2d19a046719c3b553206dac75"
+
/-!
# Category of preorders
@@ -40,6 +40,7 @@ instance : BundledHom @OrderHom where
deriving instance LargeCategory for PreordCat
+-- Porting note: probably see https://github.com/leanprover-community/mathlib4/issues/5020
instance : ConcreteCategory PreordCat :=
BundledHom.concreteCategory _
@@ -91,8 +91,8 @@ set_option linter.uppercaseLean3 false in
def dualEquiv : PreordCat ≌ PreordCat 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 Preord.dual_equiv PreordCat.dualEquiv
All dependencies are ported!