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 #
- a
Fan
is a cone over a discrete category Fan.mk
constructs a fan from an indexed collection of maps- a
Pi
is 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
abbreviation
s 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
- CategoryTheory.Limits.Fan.mk P p = { pt := P, π := CategoryTheory.Discrete.natTrans fun (X : CategoryTheory.Discrete β) => p X.as }
A cofan over f : β → C
consists of a collection of maps from every f b
to an object P
.
Equations
- CategoryTheory.Limits.Cofan.mk P p = { pt := P, ι := CategoryTheory.Discrete.natTrans fun (X : CategoryTheory.Discrete β) => p X.as }
Get the j
th "projection" in the fan.
(Note that the initial letter of proj
matches the greek letter in Cone.π
.)
Equations
- p.proj j = p.π.app { as := j }
Get the j
th "injection" in the cofan.
(Note that the initial letter of inj
matches the greek letter in Cocone.ι
.)
Equations
- p.inj j = p.ι.app { as := j }
An abbreviation for HasLimit (Discrete.functor f)
.
An abbreviation for HasColimit (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
Equations
- CategoryTheory.Limits.mkFanLimit t lift fac uniq = { lift := lift, fac := ⋯, uniq := ⋯ }
Constructor for morphisms to the point of a limit fan.
Equations
- CategoryTheory.Limits.Fan.IsLimit.desc hc f = hc.lift (CategoryTheory.Limits.Fan.mk A f)
Make a cofan f
into a colimit cofan by providing desc
, fac
, and uniq
--
just a convenience lemma to avoid having to go through Discrete
Equations
- CategoryTheory.Limits.mkCofanColimit s desc fac uniq = { desc := desc, fac := ⋯, uniq := ⋯ }
Constructor for morphisms from the point of a colimit cofan.
Equations
- CategoryTheory.Limits.Cofan.IsColimit.desc hc f = hc.desc (CategoryTheory.Limits.Cofan.mk A f)
An abbreviation for HasLimitsOfShape (Discrete f)
.
An abbreviation for HasColimitsOfShape (Discrete f)
.
piObj 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 piObj f
, you will just use general facts about limits.)
Equations
sigmaObj 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 sigmaObj f
, you will just use general facts about colimits.)
Equations
notation for categorical products. We need ᶜ
to avoid conflict with Finset.prod
.
Equations
- CategoryTheory.Limits.«term∏ᶜ_» = Lean.ParserDescr.node `CategoryTheory.Limits.«term∏ᶜ_» 1022 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "∏ᶜ ") (Lean.ParserDescr.cat `term 60))
notation for categorical coproducts
Equations
- CategoryTheory.Limits.«term∐_» = Lean.ParserDescr.node `CategoryTheory.Limits.«term∐_» 1022 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "∐ ") (Lean.ParserDescr.cat `term 60))
The b
-th projection from the pi object over f
has the form ∏ᶜ f ⟶ f b
.
Equations
- CategoryTheory.Limits.Pi.π f b = CategoryTheory.Limits.limit.π (CategoryTheory.Discrete.functor f) { as := b }
Instances For
The b
-th inclusion into the sigma object over f
has the form f b ⟶ ∐ f
.
Equations
- CategoryTheory.Limits.Sigma.ι f b = CategoryTheory.Limits.colimit.ι (CategoryTheory.Discrete.functor f) { as := b }
Instances For
The fan constructed of the projections from the product is limiting.
Equations
- One or more equations did not get rendered due to their size.
The cofan constructed of the inclusions from the coproduct is colimiting.
Equations
- One or more equations did not get rendered due to their size.
A collection of morphisms P ⟶ f b
induces a morphism P ⟶ ∏ᶜ f
.
A version of Cones.ext
for Fan
s.
Equations
A collection of morphisms f b ⟶ P
induces a morphism ∐ f ⟶ P
.
Equations
Instances For
Equations
- ⋯ = ⋯
A version of Cocones.ext
for Cofan
s.
Equations
A cofan c
on f
such that the induced map ∐ f ⟶ c.pt
is an iso, is a coproduct.
Equations
- One or more equations did not get rendered due to their size.
A coproduct of coproducts is a coproduct
Equations
- One or more equations did not get rendered due to their size.
Construct a morphism between categorical products (indexed by the same type) from a family of morphisms between the factors.
Equations
- CategoryTheory.Limits.Pi.map p = CategoryTheory.Limits.limMap (CategoryTheory.Discrete.natTrans fun (X : CategoryTheory.Discrete β) => p X.as)
Equations
- ⋯ = ⋯
Construct a morphism between categorical products from a family of morphisms between the factors.
Equations
- CategoryTheory.Limits.Pi.map' p q = CategoryTheory.Limits.Pi.lift fun (a : β) => CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.Pi.π f (p a)) (q a)
Construct an isomorphism between categorical products (indexed by the same type) from a family of isomorphisms between the factors.
Equations
- CategoryTheory.Limits.Pi.mapIso p = CategoryTheory.Limits.lim.mapIso (CategoryTheory.Discrete.natIso fun (X : CategoryTheory.Discrete β) => p X.as)
Equations
- ⋯ = ⋯
A limit cone for X : Discrete α ⥤ C
that is given
by ∏ᶜ (fun j => X.obj (Discrete.mk j))
.
Equations
- One or more equations did not get rendered due to their size.
The cone Pi.cone X
is a limit cone.
Equations
- CategoryTheory.Limits.productIsProduct' X = { lift := fun (s : CategoryTheory.Limits.Cone X) => CategoryTheory.Limits.Pi.lift fun (j : α) => s.π.app { as := j }, fac := ⋯, uniq := ⋯ }
The isomorphism ∏ᶜ (fun j => X.obj (Discrete.mk j)) ≅ limit X
.
Equations
- CategoryTheory.Limits.Pi.isoLimit X = (CategoryTheory.Limits.productIsProduct' X).conePointUniqueUpToIso (CategoryTheory.Limits.limit.isLimit X)
Construct a morphism between categorical coproducts (indexed by the same type) from a family of morphisms between the factors.
Equations
- CategoryTheory.Limits.Sigma.map p = CategoryTheory.Limits.colimMap (CategoryTheory.Discrete.natTrans fun (X : CategoryTheory.Discrete β) => p X.as)
Equations
- ⋯ = ⋯
Construct a morphism between categorical coproducts from a family of morphisms between the factors.
Equations
- CategoryTheory.Limits.Sigma.map' p q = CategoryTheory.Limits.Sigma.desc fun (a : α) => CategoryTheory.CategoryStruct.comp (q a) (CategoryTheory.Limits.Sigma.ι g (p a))
Construct an isomorphism between categorical coproducts (indexed by the same type) from a family of isomorphisms between the factors.
Equations
- CategoryTheory.Limits.Sigma.mapIso p = CategoryTheory.Limits.colim.mapIso (CategoryTheory.Discrete.natIso fun (X : CategoryTheory.Discrete β) => p X.as)
Equations
- ⋯ = ⋯
A colimit cocone for X : Discrete α ⥤ C
that is given
by ∐ (fun j => X.obj (Discrete.mk j))
.
Equations
- One or more equations did not get rendered due to their size.
The cocone Sigma.cocone X
is a colimit cocone.
Equations
- One or more equations did not get rendered due to their size.
The isomorphism ∐ (fun j => X.obj (Discrete.mk j)) ≅ colimit X
.
Equations
- CategoryTheory.Limits.Sigma.isoColimit X = (CategoryTheory.Limits.coproductIsCoproduct' X).coconePointUniqueUpToIso (CategoryTheory.Limits.colimit.isColimit X)
Two products which differ by an equivalence in the indexing type, and up to isomorphism in the factors, are isomorphic.
Equations
- One or more equations did not get rendered due to their size.
Two coproducts which differ by an equivalence in the indexing type, and up to isomorphism in the factors, are isomorphic.
Equations
- One or more equations did not get rendered due to their size.
Equations
- ⋯ = ⋯
An iterated product is a product over a sigma type.
Equations
- One or more equations did not get rendered due to their size.
Equations
- ⋯ = ⋯
An iterated coproduct is a coproduct over a sigma type.
Equations
- One or more equations did not get rendered due to their size.
The comparison morphism for the product of f
. This is an iso iff G
preserves the product
of f
, see PreservesProduct.ofIsoComparison
.
Equations
- CategoryTheory.Limits.piComparison G f = CategoryTheory.Limits.Pi.lift fun (b : β) => G.map (CategoryTheory.Limits.Pi.π f b)
The comparison morphism for the coproduct of f
. This is an iso iff G
preserves the coproduct
of f
, see PreservesCoproduct.ofIsoComparison
.
Equations
- CategoryTheory.Limits.sigmaComparison G f = CategoryTheory.Limits.Sigma.desc fun (b : β) => G.map (CategoryTheory.Limits.Sigma.ι f b)
An abbreviation for Π J, HasLimitsOfShape (Discrete J) C
Equations
- CategoryTheory.Limits.HasProducts C = ∀ (J : Type ?u.18), CategoryTheory.Limits.HasLimitsOfShape (CategoryTheory.Discrete J) C
An abbreviation for Π J, HasColimitsOfShape (Discrete J) C
Equations
- CategoryTheory.Limits.HasCoproducts C = ∀ (J : Type ?u.18), CategoryTheory.Limits.HasColimitsOfShape (CategoryTheory.Discrete J) C
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
(Co)products over a type with a unique term.
The limit cone for the product over an index type with exactly one term.
Equations
- One or more equations did not get rendered due to their size.
Equations
- ⋯ = ⋯
A product over an index type with exactly one term is just the object over that term.
Equations
- CategoryTheory.Limits.productUniqueIso f = (CategoryTheory.Limits.limit.isLimit (CategoryTheory.Discrete.functor f)).conePointUniqueUpToIso (CategoryTheory.Limits.limitConeOfUnique f).isLimit
The colimit cocone for the coproduct over an index type with exactly one term.
Equations
- One or more equations did not get rendered due to their size.
Equations
- ⋯ = ⋯
A coproduct over an index type with exactly one term is just the object over that term.
Equations
- One or more equations did not get rendered due to their size.
Reindex a categorical product via an equivalence of the index types.
Equations
- One or more equations did not get rendered due to their size.
Reindex a categorical coproduct via an equivalence of the index types.
Equations
- One or more equations did not get rendered due to their size.