Binary disjoint unions of categories #
We define the category instance on C ⊕ D
when C
and D
are categories.
We define:
inl_
: the functorC ⥤ C ⊕ D
inr_
: the functorD ⥤ C ⊕ D
swap
: the functorC ⊕ D ⥤ D ⊕ C
(and the fact this is an equivalence)
We provide an induction principle Sum.homInduction
to reason and work with morphisms in this
category.
The sum of two functors F : A ⥤ C
and G : B ⥤ C
is a functor A ⊕ B ⥤ C
, written F.sum' G
.
This construction should be preferred when defining functors out of a sum.
We provide natural isomorphisms inlCompSum' : inl_ ⋙ F.sum' G ≅ F
and
inrCompSum' : inl_ ⋙ F.sum' G ≅ G
.
Furthermore, we provide Functor.sumIsoExt
, which
constructs a natural isomorphism of functors out of a sum out of natural isomorphism with
their precomposition with the inclusion. This construction sholud be preferred when trying
to construct isomorphisms between functors out of a sum.
We further define sums of functors and natural transformations, written F.sum G
and α.sum β
.
sum C D
gives the direct sum of two categories.
Equations
inl_
is the functor X ↦ inl X
.
Equations
Instances For
inr_
is the functor X ↦ inr X
.
Equations
Instances For
An induction principle for morphisms in a sum of category: a morphism is either of the form
(inl_ _ _).map _
or of the form (inr_ _ _).map _)
.
Equations
Instances For
The sum of two functors that land in a given category C
.
Equations
Instances For
The sum F.sum' G
precomposed with the left inclusion functor is isomorphic to F
Equations
Instances For
The sum F.sum' G
precomposed with the right inclusion functor is isomorphic to G
Equations
Instances For
The sum of two functors.
Equations
Instances For
A functor out of a sum is uniquely characterized by its precompositions with inl_
and inr_
.
Equations
Instances For
Any functor out of a sum is the sum of its precomposition with the inclusions.
Equations
Instances For
The sum of two natural transformations, where all functors have the same target category.
Equations
Instances For
The sum of two natural transformations.
Equations
Instances For
The functor exchanging two direct summand categories.
Equations
Instances For
Precomposing swap
with the left inclusion gives the right inclusion.
Equations
Instances For
Precomposing swap
with the right inclusion gives the leftt inclusion.
Equations
Instances For
swap
gives an equivalence between C ⊕ D
and D ⊕ C
.
Equations
Instances For
The double swap on C ⊕ D
is naturally isomorphic to the identity functor.