-
Notifications
You must be signed in to change notification settings - Fork 251
/
Hom.lean
34 lines (24 loc) · 876 Bytes
/
Hom.lean
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/-
Copyright (c) 2018 Reid Barton. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Reid Barton, Scott Morrison
-/
import Mathlib.CategoryTheory.Products.Basic
import Mathlib.CategoryTheory.Types
#align_import category_theory.functor.hom from "leanprover-community/mathlib"@"369525b73f229ccd76a6ec0e0e0bf2be57599768"
/-!
The hom functor, sending `(X, Y)` to the type `X ⟶ Y`.
-/
universe v u
open Opposite
open CategoryTheory
namespace CategoryTheory.Functor
variable (C : Type u) [Category.{v} C]
/-- `Functor.hom` is the hom-pairing, sending `(X, Y)` to `X ⟶ Y`, contravariant in `X` and
covariant in `Y`. -/
@[simps]
def hom : Cᵒᵖ × C ⥤ Type v where
obj p := unop p.1 ⟶ p.2
map f h := f.1.unop ≫ h ≫ f.2
#align category_theory.functor.hom CategoryTheory.Functor.hom
end CategoryTheory.Functor