Cartesian products of categories #
We define the category instance on C × D
when C
and D
are categories.
We define:
sectl C Z
: the functorC ⥤ C × D
given byX ↦ ⟨X, Z⟩
sectr Z D
: the functorD ⥤ C × D
given byY ↦ ⟨Z, Y⟩
fst
: the functor⟨X, Y⟩ ↦ X
snd
: the functor⟨X, Y⟩ ↦ Y
swap
: the functorC × D ⥤ D × C
given by⟨X, Y⟩ ↦ ⟨Y, X⟩
(and the fact this is an equivalence)
We further define evaluation : C ⥤ (C ⥤ D) ⥤ D
and evaluation_uncurried : C × (C ⥤ D) ⥤ D
,
and products of functors and natural transformations, written F.prod G
and α.prod β
.
prod C D
gives the cartesian product of two categories.
See https://stacks.math.columbia.edu/tag/001K.
Equations
- category_theory.prod C D = {to_category_struct := {to_quiver := {hom := λ (X Y : C × D), (X.fst ⟶ Y.fst) × (X.snd ⟶ Y.snd)}, id := λ (X : C × D), (𝟙 X.fst, 𝟙 X.snd), comp := λ (_x _x_1 _x_2 : C × D) (f : _x ⟶ _x_1) (g : _x_1 ⟶ _x_2), (f.fst ≫ g.fst, f.snd ≫ g.snd)}, id_comp' := _, comp_id' := _, assoc' := _}
Two rfl lemmas that cannot be generated by @[simps]
.
Construct an isomorphism in C × D
out of two isomorphisms in C
and D
.
prod.category.uniform C D
is an additional instance specialised so both factors have the same
universe levels. This helps typeclass resolution.
Equations
sectl C Z
is the functor C ⥤ C × D
given by X ↦ (X, Z)
.
sectr Z D
is the functor D ⥤ C × D
given by Y ↦ (Z, Y)
.
fst
is the functor (X, Y) ↦ X
.
snd
is the functor (X, Y) ↦ Y
.
The functor swapping the factors of a cartesian product of categories, C × D ⥤ D × C
.
Swapping the factors of a cartesion product of categories twice is naturally isomorphic to the identity functor.
Equations
- category_theory.prod.symmetry C D = {hom := {app := λ (X : C × D), 𝟙 X, naturality' := _}, inv := {app := λ (X : C × D), 𝟙 X, naturality' := _}, hom_inv_id' := _, inv_hom_id' := _}
The equivalence, given by swapping factors, between C × D
and D × C
.
Equations
- category_theory.prod.braiding C D = category_theory.equivalence.mk (category_theory.prod.swap C D) (category_theory.prod.swap D C) (category_theory.nat_iso.of_components (λ (X : C × D), category_theory.eq_to_iso _) _) (category_theory.nat_iso.of_components (λ (X : D × C), category_theory.eq_to_iso _) _)
The "evaluation at X
" functor, such that
(evaluation.obj X).obj F = F.obj X
,
which is functorial in both X
and F
.
The "evaluation of F
at X
" functor,
as a functor C × (C ⥤ D) ⥤ D
.
The cartesian product of two functors.
Similar to prod
, but both functors start from the same category A
The diagonal functor.
Equations
- category_theory.functor.diag C = (𝟭 C).prod' (𝟭 C)
The cartesian product of two natural transformations.
Equations
- category_theory.nat_trans.prod α β = {app := λ (X : A × C), (α.app X.fst, β.app X.snd), naturality' := _}
F.flip
composed with evaluation is the same as evaluating F
.