Matrices over a category. #
When C
is a preadditive category, Mat_ C
is the preadditive category
whose objects are finite tuples of objects in C
, and
whose morphisms are matrices of morphisms from C
.
There is a functor Mat_.embedding : C ⥤ Mat_ C
sending morphisms to one-by-one matrices.
Mat_ C
has finite biproducts.
The additive envelope #
We show that this construction is the "additive envelope" of C
,
in the sense that any additive functor F : C ⥤ D
to a category D
with biproducts
lifts to a functor Mat_.lift F : Mat_ C ⥤ D
,
Moreover, this functor is unique (up to natural isomorphisms) amongst functors L : Mat_ C ⥤ D
such that embedding C ⋙ L ≅ F
.
(As we don't have 2-category theory, we can't explicitly state that Mat_ C
is
the initial object in the 2-category of categories under C
which have biproducts.)
As a consequence, when C
already has finite biproducts we have Mat_ C ≌ C
.
Future work #
We should provide a more convenient Mat R
, when R
is a ring,
as a category with objects n : FinType
,
and whose morphisms are matrices with components in R
.
Ideally this would conveniently interact with both Mat_
and Matrix
.
A morphism in Mat_ C
is a dependently typed matrix of morphisms.
Equations
- CategoryTheory.Mat_.Hom M N = DMatrix M.ι N.ι fun (i : M.ι) (j : N.ι) => M.X i ⟶ N.X j
Instances For
The identity matrix consists of identity morphisms on the diagonal, and zeros elsewhere.
Equations
- CategoryTheory.Mat_.Hom.id M i j = if h : i = j then CategoryTheory.eqToHom (_ : M.X i = M.X j) else 0
Instances For
Composition of matrices using matrix multiplication.
Equations
- CategoryTheory.Mat_.Hom.comp f g i k = Finset.sum Finset.univ fun (j : N.ι) => CategoryTheory.CategoryStruct.comp (f i j) (g j k)
Instances For
Equations
- CategoryTheory.Mat_.instCategoryMat_ = CategoryTheory.Category.mk
Equations
- CategoryTheory.Mat_.instInhabitedHomMat_ToQuiverToCategoryStructInstCategoryMat_ M N = { default := fun (i : M.ι) (j : N.ι) => 0 }
Equations
- CategoryTheory.Mat_.instAddCommGroupHomMat_ToQuiverToCategoryStructInstCategoryMat_ M N = let_fun this := inferInstance; this
Equations
- CategoryTheory.Mat_.instPreadditiveMat_InstCategoryMat_ = CategoryTheory.Preadditive.mk
We now prove that Mat_ C
has finite biproducts.
Be warned, however, that Mat_ C
is not necessarily Krull-Schmidt,
and so the internal indexing of a biproduct may have nothing to do with the external indexing,
even though the construction we give uses a sigma type.
See however isoBiproductEmbedding
.
Equations
A functor induces a functor of matrix categories.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The identity functor induces the identity functor on matrix categories.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Composite functors induce composite functors on matrix categories.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The embedding of C
into Mat_ C
as one-by-one matrices.
(We index the summands by punit
.)
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Equations
- CategoryTheory.Mat_.instInhabitedMat_ C = { default := (CategoryTheory.Mat_.embedding C).toPrefunctor.obj default }
Every object in Mat_ C
is isomorphic to the biproduct of its summands.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Every M
is a direct sum of objects from C
, and F
preserves biproducts.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Any additive functor C ⥤ D
to a category D
with finite biproducts extends to
a functor Mat_ C ⥤ D
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
An additive functor C ⥤ D
factors through its lift to Mat_ C ⥤ D
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Mat_.lift F
is the unique additive functor L : Mat_ C ⥤ D
such that F ≅ embedding C ⋙ L
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Two additive functors Mat_ C ⥤ D
are naturally isomorphic if
their precompositions with embedding C
are naturally isomorphic as functors C ⥤ D
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Natural isomorphism needed in the construction of equivalenceSelfOfHasFiniteBiproducts
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A preadditive category that already has finite biproducts is equivalent to its additive envelope.
Note that we only prove this for a large category; otherwise there are universe issues that I haven't attempted to sort out.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A type synonym for Fintype
, which we will equip with a category structure
where the morphisms are matrices with components in R
.
Equations
Instances For
Equations
- CategoryTheory.instInhabitedMat R = id inferInstance
Equations
- CategoryTheory.instCoeSortMatType R = CategoryTheory.Bundled.coeSort
Equations
- CategoryTheory.instCategoryMat R = CategoryTheory.Category.mk
Equations
- CategoryTheory.Mat.instInhabitedHomMatToQuiverToCategoryStructInstCategoryMat R M N = { default := fun (x : ↑M) (x : ↑N) => 0 }
Auxiliary definition for CategoryTheory.Mat.equivalenceSingleObj
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
The categorical equivalence between the category of matrices over a ring, and the category of matrices over that ring considered as a single-object category.
Equations
Instances For
Equations
- CategoryTheory.Mat.instAddCommGroupHomMatToQuiverToCategoryStructInstCategoryMatToSemiring R X Y = let_fun this := inferInstance; this
Equations
- CategoryTheory.Mat.instPreadditiveMatInstCategoryMatToSemiring = CategoryTheory.Preadditive.mk