Cartesian products of categories #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
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]
.
The isomorphism between (X.1, X.2)
and X
.
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
.
Equations
Instances for category_theory.prod.swap
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 constant functor followed by the evalutation functor is just the identity.
Equations
The cartesian product of two functors.
Similar to prod
, but both functors start from the same category A
The product F.prod' G
followed by projection on the first component is isomorphic to F
Equations
- F.prod'_comp_fst G = category_theory.nat_iso.of_components (λ (X : A), category_theory.iso.refl ((F.prod' G ⋙ category_theory.prod.fst B C).obj X)) _
The product F.prod' G
followed by projection on the second component is isomorphic to G
Equations
- F.prod'_comp_snd G = category_theory.nat_iso.of_components (λ (X : A), category_theory.iso.refl ((F.prod' G ⋙ category_theory.prod.snd B C).obj X)) _
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
.
Equations
The forward direction for functor_prod_functor_equiv
The backward direction for functor_prod_functor_equiv
Equations
- category_theory.functor_prod_to_prod_functor A B C = {obj := λ (F : A ⥤ B × C), (F ⋙ category_theory.prod.fst B C, F ⋙ category_theory.prod.snd B C), map := λ (F G : A ⥤ B × C) (α : F ⟶ G), ({app := λ (X : A), (α.app X).fst, naturality' := _}, {app := λ (X : A), (α.app X).snd, naturality' := _}), map_id' := _, map_comp' := _}
The unit isomorphism for functor_prod_functor_equiv
Equations
- category_theory.functor_prod_functor_equiv_unit_iso A B C = category_theory.nat_iso.of_components (λ (F : (A ⥤ B) × (A ⥤ C)), ((F.fst.prod'_comp_fst F.snd).prod (F.fst.prod'_comp_snd F.snd) ≪≫ category_theory.prod.eta_iso F).symm) _
The counit isomorphism for functor_prod_functor_equiv
Equations
- category_theory.functor_prod_functor_equiv_counit_iso A B C = category_theory.nat_iso.of_components (λ (F : A ⥤ B × C), category_theory.nat_iso.of_components (λ (X : A), category_theory.prod.eta_iso (F.obj X)) _) _
The equivalence of categories between (A ⥤ B) × (A ⥤ C)
and A ⥤ (B × C)
Equations
- category_theory.functor_prod_functor_equiv A B C = {functor := category_theory.prod_functor_to_functor_prod A B C _inst_3, inverse := category_theory.functor_prod_to_prod_functor A B C _inst_3, unit_iso := category_theory.functor_prod_functor_equiv_unit_iso A B C _inst_3, counit_iso := category_theory.functor_prod_functor_equiv_counit_iso A B C _inst_3, functor_unit_iso_comp' := _}