Categorical (co)products #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file defines (co)products as special cases of (co)limits.
A product is the categorical generalization of the object Π i, f i where f : ι → C. It is a
limit cone over the diagram formed by f, implemented by converting f into a functor
discrete ι ⥤ C.
A coproduct is the dual concept.
Main definitions #
- a
fanis a cone over a discrete category fan.mkconstructs a fan from an indexed collection of maps- a
piis alimit (discrete.functor f)
Each of these has a dual.
Implementation notes #
As with the other special shapes in the limits library, all the definitions here are given as
abbreviations of the general statements for limits, so all the simp lemmas and theorems about
general limits can be used.
A fan over f : β → C consists of a collection of maps from an object P to every f b.
A cofan over f : β → C consists of a collection of maps from every f b to an object P.
A fan over f : β → C consists of a collection of maps from an object P to every f b.
Equations
- category_theory.limits.fan.mk P p = {X := P, π := {app := λ (X : category_theory.discrete β), p X.as, naturality' := _}}
A cofan over f : β → C consists of a collection of maps from every f b to an object P.
Equations
- category_theory.limits.cofan.mk P p = {X := P, ι := {app := λ (X : category_theory.discrete β), p X.as, naturality' := _}}
Get the jth map in the fan
An abbreviation for has_limit (discrete.functor f).
An abbreviation for has_colimit (discrete.functor f).
Make a fan f into a limit fan by providing lift, fac, and uniq --
just a convenience lemma to avoid having to go through discrete
An abbreviation for has_limits_of_shape (discrete f).
An abbreviation for has_colimits_of_shape (discrete f).
pi_obj f computes the product of a family of elements f.
(It is defined as an abbreviation for limit (discrete.functor f),
so for most facts about pi_obj f, you will just use general facts about limits.)
sigma_obj f computes the coproduct of a family of elements f.
(It is defined as an abbreviation for colimit (discrete.functor f),
so for most facts about sigma_obj f, you will just use general facts about colimits.)
The b-th projection from the pi object over f has the form ∏ f ⟶ f b.
The b-th inclusion into the sigma object over f has the form f b ⟶ ∐ f.
The fan constructed of the projections from the product is limiting.
The cofan constructed of the inclusions from the coproduct is colimiting.
Equations
- category_theory.limits.coproduct_is_coproduct f = (category_theory.limits.colimit.is_colimit (category_theory.discrete.functor f)).of_iso_colimit (category_theory.limits.cocones.ext (category_theory.iso.refl (category_theory.limits.colimit.cocone (category_theory.discrete.functor (λ (b : β), f b))).X) _)
A collection of morphisms P ⟶ f b induces a morphism P ⟶ ∏ f.
A collection of morphisms f b ⟶ P induces a morphism ∐ f ⟶ P.
Construct a morphism between categorical products (indexed by the same type) from a family of morphisms between the factors.
Construct an isomorphism between categorical products (indexed by the same type) from a family of isomorphisms between the factors.
Construct a morphism between categorical coproducts (indexed by the same type) from a family of morphisms between the factors.
Construct an isomorphism between categorical coproducts (indexed by the same type) from a family of isomorphisms between the factors.
The comparison morphism for the product of f. This is an iso iff G preserves the product
of f, see preserves_product.of_iso_comparison.
Equations
- category_theory.limits.pi_comparison G f = category_theory.limits.pi.lift (λ (b : β), G.map (category_theory.limits.pi.π f b))
Instances for category_theory.limits.pi_comparison
The comparison morphism for the coproduct of f. This is an iso iff G preserves the coproduct
of f, see preserves_coproduct.of_iso_comparison.
Equations
- category_theory.limits.sigma_comparison G f = category_theory.limits.sigma.desc (λ (b : β), G.map (category_theory.limits.sigma.ι f b))
Instances for category_theory.limits.sigma_comparison
An abbreviation for Π J, has_limits_of_shape (discrete J) C
An abbreviation for Π J, has_colimits_of_shape (discrete J) C
(Co)products over a type with a unique term.
The limit cone for the product over an index type with exactly one term.
Equations
- category_theory.limits.limit_cone_of_unique f = {cone := {X := f inhabited.default, π := {app := λ (j : category_theory.discrete β), category_theory.eq_to_hom _, naturality' := _}}, is_limit := {lift := λ (s : category_theory.limits.cone (category_theory.discrete.functor f)), s.π.app inhabited.default, fac' := _, uniq' := _}}
A product over a index type with exactly one term is just the object over that term.
The colimit cocone for the coproduct over an index type with exactly one term.
Equations
- category_theory.limits.colimit_cocone_of_unique f = {cocone := {X := f inhabited.default, ι := {app := λ (j : category_theory.discrete β), category_theory.eq_to_hom _, naturality' := _}}, is_colimit := {desc := λ (s : category_theory.limits.cocone (category_theory.discrete.functor f)), s.ι.app inhabited.default, fac' := _, uniq' := _}}
A coproduct over a index type with exactly one term is just the object over that term.
Reindex a categorical product via an equivalence of the index types.
Equations
- category_theory.limits.pi.reindex ε f = category_theory.limits.has_limit.iso_of_equivalence (category_theory.discrete.equivalence ε) (category_theory.discrete.nat_iso (λ (i : category_theory.discrete β), category_theory.iso.refl (((category_theory.discrete.equivalence ε).functor ⋙ category_theory.discrete.functor f).obj i)))
Reindex a categorical coproduct via an equivalence of the index types.
Equations
- category_theory.limits.sigma.reindex ε f = category_theory.limits.has_colimit.iso_of_equivalence (category_theory.discrete.equivalence ε) (category_theory.discrete.nat_iso (λ (i : category_theory.discrete β), category_theory.iso.refl (((category_theory.discrete.equivalence ε).functor ⋙ category_theory.discrete.functor f).obj i)))