Skip to content

Commit

Permalink
feat(category_theory/yoneda): add iso_comp_punit (#5448)
Browse files Browse the repository at this point in the history
A presheaf P : C^{op} -> Type v is isomorphic to the composition of P with the coyoneda functor Type v -> Type v associated to `punit`.

[This is useful for developing the theory of sheaves taking values in a general category]
  • Loading branch information
kbuzzard committed Dec 21, 2020
1 parent c98d5bb commit c5c02ec
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/category_theory/yoneda.lean
Expand Up @@ -127,6 +127,13 @@ If `coyoneda.map f` is an isomorphism, so was `f`.
def is_iso {X Y : Cᵒᵖ} (f : X ⟶ Y) [is_iso (coyoneda.map f)] : is_iso f :=
is_iso_of_fully_faithful coyoneda f

-- No need to use Cᵒᵖ here, works with any category
/-- A Type-valued presheaf `P` is isomorphic to the composition of `P` with the
coyoneda functor coming from `punit`. -/
@[simps] def iso_comp_punit (P : C ⥤ Type v₁) : (P ⋙ coyoneda.obj (op punit.{v₁+1})) ≅ P :=
{ hom := { app := λ X f, f punit.star},
inv := { app := λ X a _, a } }

end coyoneda

/--
Expand Down

0 comments on commit c5c02ec

Please sign in to comment.