Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit cdab35d

Browse files
jcommelindigama0
authored andcommitted
fix(category_theory/punit): fix regression (#550)
1 parent b11b83b commit cdab35d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

category_theory/punit.lean

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,20 @@ instance punit_category : small_category punit :=
1313
id := λ _, punit.star,
1414
comp := λ _ _ _ _ _, punit.star }
1515

16+
namespace functor
17+
variables {C : Type u} [𝒞 : category.{u v} C]
18+
include 𝒞
19+
20+
/-- The constant functor. For `X : C`, `of.obj X` is the functor `punit ⥤ C`
21+
that maps `punit.star` to `X`. -/
22+
def of : C ⥤ (punit.{w+1} ⥤ C) := const punit
23+
24+
namespace of
25+
@[simp] lemma obj_obj (X : C) : (of.obj X).obj = λ _, X := rfl
26+
@[simp] lemma obj_map (X : C) : (of.obj X).map = λ _ _ _, 𝟙 X := rfl
27+
@[simp] lemma map_app {X Y : C} (f : X ⟶ Y) : (of.map f).app = λ _, f := rfl
28+
end of
29+
30+
end functor
31+
1632
end category_theory

0 commit comments

Comments
 (0)