mathlib3 documentation

category_theory.limits.shapes.biproducts

Biproducts and binary biproducts #

THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.

We introduce the notion of (finite) biproducts and binary biproducts.

These are slightly unusual relative to the other shapes in the library, as they are simultaneously limits and colimits. (Zero objects are similar; they are "biterminal".)

For results about biproducts in preadditive categories see category_theory.preadditive.biproducts.

In a category with zero morphisms, we model the (binary) biproduct of P Q : C using a binary_bicone, which has a cone point X, and morphisms fst : X ⟶ P, snd : X ⟶ Q, inl : P ⟶ X and inr : X ⟶ Q, such that inl ≫ fst = 𝟙 P, inl ≫ snd = 0, inr ≫ fst = 0, and inr ≫ snd = 𝟙 Q. Such a binary_bicone is a biproduct if the cone is a limit cone, and the cocone is a colimit cocone.

For biproducts indexed by a fintype J, a bicone again consists of a cone point X and morphisms π j : X ⟶ F j and ι j : F j ⟶ X for each j, such that ι j ≫ π j' is the identity when j = j' and zero otherwise.

Notation #

As is already taken for the sum of types, we introduce the notation X ⊞ Y for a binary biproduct. We introduce ⨁ f for the indexed biproduct.

Implementation #

Prior to #14046, has_finite_biproducts required a decidable_eq instance on the indexing type. As this had no pay-off (everything about limits is non-constructive in mathlib), and occasional cost (constructing decidability instances appropriate for constructions involving the indexing type), we made everything classical.

@[nolint]

A c : bicone F is:

  • an object c.X and
  • morphisms π j : X ⟶ F j and ι j : F j ⟶ X for each j,
  • such that ι j ≫ π j' is the identity when j = j' and zero otherwise.
Instances for category_theory.limits.bicone
  • category_theory.limits.bicone.has_sizeof_inst
@[simp]
theorem category_theory.limits.bicone_ι_π_self_assoc {J : Type w} {C : Type u} [category_theory.category C] [category_theory.limits.has_zero_morphisms C] {F : J C} (B : category_theory.limits.bicone F) (j : J) {X' : C} (f' : F j X') :
B.ι j B.π j f' = f'
@[simp]
@[simp]
theorem category_theory.limits.bicone_ι_π_ne_assoc {J : Type w} {C : Type u} [category_theory.category C] [category_theory.limits.has_zero_morphisms C] {F : J C} (B : category_theory.limits.bicone F) {j j' : J} (h : j j') {X' : C} (f' : F j' X') :
B.ι j B.π j' f' = 0 f'

We can turn any limit cone over a discrete collection of objects into a bicone.

Equations

We can turn any colimit cocone over a discrete collection of objects into a bicone.

Equations
@[nolint]

Structure witnessing that a bicone is both a limit cone and a colimit cocone.

Instances for category_theory.limits.bicone.is_bilimit
@[simp]

Whisker a bicone with an equivalence between the indexing types.

Equations
@[simp]

Whiskering a bicone with an equivalence between types preserves being a bilimit bicone.

Equations
@[nolint]

A bicone over F : J → C, which is both a limit cone and a colimit cocone.

Instances for category_theory.limits.limit_bicone
  • category_theory.limits.limit_bicone.has_sizeof_inst
@[class]

has_biproduct F expresses the mere existence of a bicone which is simultaneously a limit and a colimit of the diagram F.

Instances of this typeclass
@[class]

C has biproducts of shape J if we have a limit and a colimit, with the same cone points, of every function F : J → C.

Instances of this typeclass
@[class]

has_finite_biproducts C represents a choice of biproduct for every family of objects in C indexed by a finite type.

@[reducible]

biproduct f computes the biproduct of a family of elements f. (It is defined as an abbreviation for limit (discrete.functor f), so for most facts about biproduct f, you will just use general facts about limits and colimits.)

@[reducible]

The projection onto a summand of a biproduct.

@[reducible]

The inclusion into a summand of a biproduct.

Note that as this lemma has a if in the statement, we include a decidable_eq argument. This means you may not be able to simp using this lemma unless you open_locale classical.

@[reducible]

Given a collection of maps into the summands, we obtain a map into the biproduct.

@[reducible]

Given a collection of maps out of the summands, we obtain a map out of the biproduct.

@[reducible]

Given a collection of maps between corresponding summands of a pair of biproducts indexed by the same type, we obtain a map between the biproducts.

@[reducible]

An alternative to biproduct.map constructed via colimits. This construction only exists in order to show it is equal to biproduct.map.

Given a collection of isomorphisms between corresponding summands of a pair of biproducts indexed by the same type, we obtain an isomorphism between the biproducts.

Equations

The canonical morphism from the biproduct over a restricted index type to the biproduct of the full index type.

Equations
noncomputable def category_theory.limits.biproduct.matrix {J : Type} [fintype J] {K : Type} [fintype K] {C : Type u} [category_theory.category C] [category_theory.limits.has_zero_morphisms C] [category_theory.limits.has_finite_biproducts C] {f : J C} {g : K C} (m : Π (j : J) (k : K), f j g k) :
f g

Convert a (dependently typed) matrix to a morphism of biproducts.

Equations
noncomputable def category_theory.limits.biproduct.components {J : Type} [fintype J] {K : Type} [fintype K] {C : Type u} [category_theory.category C] [category_theory.limits.has_zero_morphisms C] [category_theory.limits.has_finite_biproducts C] {f : J C} {g : K C} (m : f g) (j : J) (k : K) :
f j g k

Extract the matrix components from a morphism of biproducts.

Equations

Biproducts are unique up to isomorphism. This already follows because bilimits are limits, but in the case of biproducts we can give an isomorphism with particularly nice definitional properties, namely that biproduct.lift b.π and biproduct.desc b.ι are inverses of each other.

Equations
@[nolint]

A binary bicone for a pair of objects P Q : C consists of the cone point X, maps from X to both P and Q, and maps from both P and Q to X, so that inl ≫ fst = 𝟙 P, inl ≫ snd = 0, inr ≫ fst = 0, and inr ≫ snd = 𝟙 Q

Instances for category_theory.limits.binary_bicone
  • category_theory.limits.binary_bicone.has_sizeof_inst
@[nolint]

Structure witnessing that a binary bicone is a limit cone and a limit cocone.

Instances for category_theory.limits.binary_bicone.is_bilimit
  • category_theory.limits.binary_bicone.is_bilimit.has_sizeof_inst
@[nolint]

A bicone over P Q : C, which is both a limit cone and a colimit cocone.

Instances for category_theory.limits.binary_biproduct_data
  • category_theory.limits.binary_biproduct_data.has_sizeof_inst
@[class]

has_binary_biproduct P Q expresses the mere existence of a bicone which is simultaneously a limit and a colimit of the diagram pair P Q.

Instances of this typeclass
@[class]

has_binary_biproducts C represents the existence of a bicone which is simultaneously a limit and a colimit of the diagram pair P Q, for every P Q : C.

A category with finite biproducts has binary biproducts.

This is not an instance as typically in concrete categories there will be an alternative construction with nicer definitional properties.

@[reducible]

An arbitrary choice of biproduct of a pair of objects.

@[reducible]

The projection onto the first summand of a binary biproduct.

@[reducible]

The projection onto the second summand of a binary biproduct.

@[reducible]

The inclusion into the first summand of a binary biproduct.

@[reducible]

The inclusion into the second summand of a binary biproduct.

@[reducible]

Given a pair of maps into the summands of a binary biproduct, we obtain a map into the binary biproduct.

@[reducible]

Given a pair of maps out of the summands of a binary biproduct, we obtain a map out of the binary biproduct.

@[reducible]

Given a pair of maps between the summands of a pair of binary biproducts, we obtain a map between the binary biproducts.

@[reducible]

An alternative to biprod.map constructed via colimits. This construction only exists in order to show it is equal to biprod.map.

Given a pair of isomorphisms between the summands of a pair of binary biproducts, we obtain an isomorphism between the binary biproducts.

Equations

Binary biproducts are unique up to isomorphism. This already follows because bilimits are limits, but in the case of biproducts we can give an isomorphism with particularly nice definitional properties, namely that biprod.lift b.fst b.snd and biprod.desc b.inl b.inr are inverses of each other.

Equations