@@ -9,8 +9,9 @@ import order.complete_lattice
9
9
universes u
10
10
11
11
open category_theory
12
+ open category_theory.limits
12
13
13
- namespace category_theory.limits
14
+ namespace category_theory.limits.complete_lattice
14
15
15
16
variables {α : Type u}
16
17
@@ -34,30 +35,67 @@ instance has_finite_colimits_of_semilattice_sup_bot [semilattice_sup_bot α] :
34
35
ι := { app := λ i, hom_of_le (finset.le_sup (fintype.complete _)) } },
35
36
is_colimit := { desc := λ s, hom_of_le (finset.sup_le (λ j _, (s.ι.app j).down.down)) } } }
36
37
38
+ variables {J : Type u} [small_category J]
39
+
40
+ /--
41
+ The limit cone over any functor into a complete lattice.
42
+ -/
43
+ def limit_cone [complete_lattice α] (F : J ⥤ α) : limit_cone F :=
44
+ { cone :=
45
+ { X := infi F.obj,
46
+ π :=
47
+ { app := λ j, hom_of_le (complete_lattice.Inf_le _ _ (set.mem_range_self _)) } },
48
+ is_limit :=
49
+ { lift := λ s, hom_of_le (complete_lattice.le_Inf _ _
50
+ begin rintros _ ⟨j, rfl⟩, exact le_of_hom (s.π.app j), end ) } }
51
+
52
+ /--
53
+ The colimit cocone over any functor into a complete lattice.
54
+ -/
55
+ def colimit_cocone [complete_lattice α] (F : J ⥤ α) : colimit_cocone F :=
56
+ { cocone :=
57
+ { X := supr F.obj,
58
+ ι :=
59
+ { app := λ j, hom_of_le (complete_lattice.le_Sup _ _ (set.mem_range_self _)) } },
60
+ is_colimit :=
61
+ { desc := λ s, hom_of_le (complete_lattice.Sup_le _ _
62
+ begin rintros _ ⟨j, rfl⟩, exact le_of_hom (s.ι.app j), end ) } }
63
+
37
64
-- It would be nice to only use the `Inf` half of the complete lattice, but
38
65
-- this seems not to have been described separately.
39
66
@[priority 100 ] -- see Note [lower instance priority]
40
67
instance has_limits_of_complete_lattice [complete_lattice α] : has_limits α :=
41
68
{ has_limits_of_shape := λ J 𝒥, by exactI
42
- { has_limit := λ F, has_limit.mk
43
- { cone :=
44
- { X := Inf (set.range F.obj),
45
- π :=
46
- { app := λ j, hom_of_le (complete_lattice.Inf_le _ _ (set.mem_range_self _)) } },
47
- is_limit :=
48
- { lift := λ s, hom_of_le (complete_lattice.le_Inf _ _
49
- begin rintros _ ⟨j, rfl⟩, exact le_of_hom (s.π.app j), end ) } } } }
69
+ { has_limit := λ F, has_limit.mk (limit_cone F) } }
50
70
51
71
@[priority 100 ] -- see Note [lower instance priority]
52
72
instance has_colimits_of_complete_lattice [complete_lattice α] : has_colimits α :=
53
73
{ has_colimits_of_shape := λ J 𝒥, by exactI
54
- { has_colimit := λ F, has_colimit.mk
55
- { cocone :=
56
- { X := Sup (set.range F.obj),
57
- ι :=
58
- { app := λ j, hom_of_le (complete_lattice.le_Sup _ _ (set.mem_range_self _)) } },
59
- is_colimit :=
60
- { desc := λ s, hom_of_le (complete_lattice.Sup_le _ _
61
- begin rintros _ ⟨j, rfl⟩, exact le_of_hom (s.ι.app j), end ) } } } }
62
-
63
- end category_theory.limits
74
+ { has_colimit := λ F, has_colimit.mk (colimit_cocone F) } }
75
+
76
+ noncomputable theory
77
+ variables [complete_lattice α] (F : J ⥤ α)
78
+
79
+ /--
80
+ The limit of a functor into a complete lattice is the infimum of the objects in the image.
81
+ -/
82
+ def limit_iso_infi : limit F ≅ infi F.obj :=
83
+ is_limit.cone_point_unique_up_to_iso (limit.is_limit F) (limit_cone F).is_limit
84
+
85
+ @[simp] lemma limit_iso_infi_hom (j : J) :
86
+ (limit_iso_infi F).hom ≫ hom_of_le (infi_le _ j) = limit.π F j := by tidy
87
+ @[simp] lemma limit_iso_infi_inv (j : J) :
88
+ (limit_iso_infi F).inv ≫ limit.π F j = hom_of_le (infi_le _ j) := rfl
89
+
90
+ /--
91
+ The colimit of a functor into a complete lattice is the supremum of the objects in the image.
92
+ -/
93
+ def colimit_iso_supr : colimit F ≅ supr F.obj :=
94
+ is_colimit.cocone_point_unique_up_to_iso (colimit.is_colimit F) (colimit_cocone F).is_colimit
95
+
96
+ @[simp] lemma colimit_iso_supr_hom (j : J) :
97
+ colimit.ι F j ≫ (colimit_iso_supr F).hom = hom_of_le (le_supr _ j) := rfl
98
+ @[simp] lemma colimit_iso_supr_inv (j : J) :
99
+ hom_of_le (le_supr _ j) ≫ (colimit_iso_supr F).inv = colimit.ι F j := by tidy
100
+
101
+ end category_theory.limits.complete_lattice
0 commit comments