mathlib documentation

category_theory.limits.shapes.products

Categorical (co)products #

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 #

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.

@[reducible]
def category_theory.limits.fan {β : Type w} {C : Type u} [category_theory.category C] (f : β → C) :
Type (max w u v)

A fan over f : β → C consists of a collection of maps from an object P to every f b.

@[reducible]
def category_theory.limits.cofan {β : Type w} {C : Type u} [category_theory.category C] (f : β → C) :
Type (max w u v)

A cofan over f : β → C consists of a collection of maps from every f b to an object P.

@[simp]
theorem category_theory.limits.fan.mk_π_app {β : Type w} {C : Type u} [category_theory.category C] {f : β → C} (P : C) (p : Π (b : β), P f b) (X : category_theory.discrete β) :
@[simp]
theorem category_theory.limits.fan.mk_X {β : Type w} {C : Type u} [category_theory.category C] {f : β → C} (P : C) (p : Π (b : β), P f b) :
def category_theory.limits.fan.mk {β : Type w} {C : Type u} [category_theory.category C] {f : β → C} (P : C) (p : Π (b : β), P f b) :

A fan over f : β → C consists of a collection of maps from an object P to every f b.

Equations
@[simp]
theorem category_theory.limits.cofan.mk_X {β : Type w} {C : Type u} [category_theory.category C] {f : β → C} (P : C) (p : Π (b : β), f b P) :
@[simp]
theorem category_theory.limits.cofan.mk_ι_app {β : Type w} {C : Type u} [category_theory.category C] {f : β → C} (P : C) (p : Π (b : β), f b P) (X : category_theory.discrete β) :
def category_theory.limits.cofan.mk {β : Type w} {C : Type u} [category_theory.category C] {f : β → C} (P : C) (p : Π (b : β), f b P) :

A cofan over f : β → C consists of a collection of maps from every f b to an object P.

Equations
def category_theory.limits.fan.proj {β : Type w} {C : Type u} [category_theory.category C] {f : β → C} (p : category_theory.limits.fan f) (j : β) :
p.X f j

Get the jth map in the fan

Equations
@[simp]
theorem category_theory.limits.fan_mk_proj {β : Type w} {C : Type u} [category_theory.category C] {f : β → C} (P : C) (p : Π (b : β), P f b) (j : β) :
@[reducible]
def category_theory.limits.has_product {β : Type w} {C : Type u} [category_theory.category C] (f : β → C) :
Prop

An abbreviation for has_limit (discrete.functor f).

@[reducible]
def category_theory.limits.has_coproduct {β : Type w} {C : Type u} [category_theory.category C] (f : β → C) :
Prop

An abbreviation for has_colimit (discrete.functor f).

@[simp]
theorem category_theory.limits.mk_fan_limit_lift {β : Type w} {C : Type u} [category_theory.category C] {f : β → C} (t : category_theory.limits.fan f) (lift : Π (s : category_theory.limits.fan f), s.X t.X) (fac : ∀ (s : category_theory.limits.fan f) (j : β), lift s t.proj j = s.proj j) (uniq : ∀ (s : category_theory.limits.fan f) (m : s.X t.X), (∀ (j : β), m t.proj j = s.proj j)m = lift s) (s : category_theory.limits.fan f) :
(category_theory.limits.mk_fan_limit t lift fac uniq).lift s = lift s
def category_theory.limits.mk_fan_limit {β : Type w} {C : Type u} [category_theory.category C] {f : β → C} (t : category_theory.limits.fan f) (lift : Π (s : category_theory.limits.fan f), s.X t.X) (fac : ∀ (s : category_theory.limits.fan f) (j : β), lift s t.proj j = s.proj j) (uniq : ∀ (s : category_theory.limits.fan f) (m : s.X t.X), (∀ (j : β), m t.proj j = s.proj j)m = lift s) :

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

Equations
@[reducible]
def category_theory.limits.has_products_of_shape (β : Type v) (C : Type u_1) [category_theory.category C] :
Prop

An abbreviation for has_limits_of_shape (discrete f).

@[reducible]
def category_theory.limits.has_coproducts_of_shape (β : Type v) (C : Type u_1) [category_theory.category C] :
Prop

An abbreviation for has_colimits_of_shape (discrete f).

@[reducible]
noncomputable def category_theory.limits.pi_obj {β : Type w} {C : Type u} [category_theory.category C] (f : β → C) [category_theory.limits.has_product f] :
C

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.)

@[reducible]
noncomputable def category_theory.limits.sigma_obj {β : Type w} {C : Type u} [category_theory.category C] (f : β → C) [category_theory.limits.has_coproduct f] :
C

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.)

@[reducible]
noncomputable def category_theory.limits.pi.π {β : Type w} {C : Type u} [category_theory.category C] (f : β → C) [category_theory.limits.has_product f] (b : β) :
f f b

The b-th projection from the pi object over f has the form ∏ f ⟶ f b.

@[reducible]
noncomputable def category_theory.limits.sigma.ι {β : Type w} {C : Type u} [category_theory.category C] (f : β → C) [category_theory.limits.has_coproduct f] (b : β) :
f b f

The b-th inclusion into the sigma object over f has the form f b ⟶ ∐ f.

@[reducible]
noncomputable def category_theory.limits.pi.lift {β : Type w} {C : Type u} [category_theory.category C] {f : β → C} [category_theory.limits.has_product f] {P : C} (p : Π (b : β), P f b) :
P f

A collection of morphisms P ⟶ f b induces a morphism P ⟶ ∏ f.

@[reducible]
noncomputable def category_theory.limits.sigma.desc {β : Type w} {C : Type u} [category_theory.category C] {f : β → C} [category_theory.limits.has_coproduct f] {P : C} (p : Π (b : β), f b P) :
f P

A collection of morphisms f b ⟶ P induces a morphism ∐ f ⟶ P.

@[reducible]
noncomputable def category_theory.limits.pi.map {β : Type w} {C : Type u} [category_theory.category C] {f g : β → C} [category_theory.limits.has_product f] [category_theory.limits.has_product g] (p : Π (b : β), f b g b) :
f g

Construct a morphism between categorical products (indexed by the same type) from a family of morphisms between the factors.

@[reducible]
noncomputable def category_theory.limits.pi.map_iso {β : Type w} {C : Type u} [category_theory.category C] {f g : β → C} [category_theory.limits.has_products_of_shape β C] (p : Π (b : β), f b g b) :
f g

Construct an isomorphism between categorical products (indexed by the same type) from a family of isomorphisms between the factors.

@[reducible]
noncomputable def category_theory.limits.sigma.map {β : Type w} {C : Type u} [category_theory.category C] {f g : β → C} [category_theory.limits.has_coproduct f] [category_theory.limits.has_coproduct g] (p : Π (b : β), f b g b) :
f g

Construct a morphism between categorical coproducts (indexed by the same type) from a family of morphisms between the factors.

@[reducible]
noncomputable def category_theory.limits.sigma.map_iso {β : Type w} {C : Type u} [category_theory.category C] {f g : β → C} [category_theory.limits.has_coproducts_of_shape β C] (p : Π (b : β), f b g b) :
f g

Construct an isomorphism between categorical coproducts (indexed by the same type) from a family of isomorphisms between the factors.

noncomputable def category_theory.limits.pi_comparison {β : Type w} {C : Type u} [category_theory.category C] {D : Type u₂} [category_theory.category D] (G : C D) (f : β → C) [category_theory.limits.has_product f] [category_theory.limits.has_product (λ (b : β), G.obj (f b))] :
G.obj ( f) λ (b : β), G.obj (f b)

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
Instances for category_theory.limits.pi_comparison
@[simp]
@[simp]
theorem category_theory.limits.pi_comparison_comp_π_assoc {β : Type w} {C : Type u} [category_theory.category C] {D : Type u₂} [category_theory.category D] (G : C D) (f : β → C) [category_theory.limits.has_product f] [category_theory.limits.has_product (λ (b : β), G.obj (f b))] (b : β) {X' : D} (f' : G.obj (f b) X') :
@[simp]
theorem category_theory.limits.map_lift_pi_comparison {β : Type w} {C : Type u} [category_theory.category C] {D : Type u₂} [category_theory.category D] (G : C D) (f : β → C) [category_theory.limits.has_product f] [category_theory.limits.has_product (λ (b : β), G.obj (f b))] (P : C) (g : Π (j : β), P f j) :
@[simp]
theorem category_theory.limits.map_lift_pi_comparison_assoc {β : Type w} {C : Type u} [category_theory.category C] {D : Type u₂} [category_theory.category D] (G : C D) (f : β → C) [category_theory.limits.has_product f] [category_theory.limits.has_product (λ (b : β), G.obj (f b))] (P : C) (g : Π (j : β), P f j) {X' : D} (f' : ( λ (b : β), G.obj (f b)) X') :
noncomputable def category_theory.limits.sigma_comparison {β : Type w} {C : Type u} [category_theory.category C] {D : Type u₂} [category_theory.category D] (G : C D) (f : β → C) [category_theory.limits.has_coproduct f] [category_theory.limits.has_coproduct (λ (b : β), G.obj (f b))] :
( λ (b : β), G.obj (f b)) G.obj ( f)

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
Instances for category_theory.limits.sigma_comparison
@[simp]
theorem category_theory.limits.ι_comp_sigma_comparison_assoc {β : Type w} {C : Type u} [category_theory.category C] {D : Type u₂} [category_theory.category D] (G : C D) (f : β → C) [category_theory.limits.has_coproduct f] [category_theory.limits.has_coproduct (λ (b : β), G.obj (f b))] (b : β) {X' : D} (f' : G.obj ( f) X') :
@[simp]
theorem category_theory.limits.sigma_comparison_map_desc_assoc {β : Type w} {C : Type u} [category_theory.category C] {D : Type u₂} [category_theory.category D] (G : C D) (f : β → C) [category_theory.limits.has_coproduct f] [category_theory.limits.has_coproduct (λ (b : β), G.obj (f b))] (P : C) (g : Π (j : β), f j P) {X' : D} (f' : G.obj P X') :
@[simp]
theorem category_theory.limits.sigma_comparison_map_desc {β : Type w} {C : Type u} [category_theory.category C] {D : Type u₂} [category_theory.category D] (G : C D) (f : β → C) [category_theory.limits.has_coproduct f] [category_theory.limits.has_coproduct (λ (b : β), G.obj (f b))] (P : C) (g : Π (j : β), f j P) :
@[reducible]

An abbreviation for Π J, has_limits_of_shape (discrete J) C

@[reducible]

An abbreviation for Π J, has_colimits_of_shape (discrete J) C

theorem category_theory.limits.has_products_of_limit_fans {C : Type u} [category_theory.category C] (lf : Π {J : Type w} (f : J → C), category_theory.limits.fan f) (lf_is_limit : Π {J : Type w} (f : J → C), category_theory.limits.is_limit (lf f)) :

(Co)products over a type with a unique term.

@[protected, instance]
noncomputable def category_theory.limits.product_unique_iso {β : Type w} {C : Type u} [category_theory.category C] [unique β] (f : β → C) :

A product over a index type with exactly one term is just the object over that term.

Equations
@[protected, instance]
@[simp]
theorem category_theory.limits.pi.reindex_hom_π_assoc {β : Type w} {C : Type u} [category_theory.category C] {γ : Type v} (ε : β γ) (f : γ → C) [category_theory.limits.has_product f] [category_theory.limits.has_product (f ε)] (b : β) {X' : C} (f' : f (ε b) X') :
@[simp]
theorem category_theory.limits.pi.reindex_inv_π_assoc {β : Type w} {C : Type u} [category_theory.category C] {γ : Type v} (ε : β γ) (f : γ → C) [category_theory.limits.has_product f] [category_theory.limits.has_product (f ε)] (b : β) {X' : C} (f' : (f ε) b X') :