The areas / V25. Higher structures in categories
Mathlib.CategoryTheory.Preadditive.Mat
97 declarations. Mathlib docs · Source
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.
TODO
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.
theorem CategoryTheory.Functor.mapMat_.congr_simp E1 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C] {D : Type u_1}
[inst_2 : CategoryTheory.Category.{v₁, u_1} D] [inst_3 : CategoryTheory.Preadditive D]
(F F_1 : CategoryTheory.Functor C D) (e_F : F = F_1) [inst_4 : F.Additive], F.mapMat_ = F_1.mapMat_
def CategoryTheory.Mat_.ctorIdx E1 #
{C : Type u₁} → CategoryTheory.Mat_ C → ℕ
theorem CategoryTheory.Mat_.mk.injEq E0 #
∀ {C : Type u₁} (ι : Type) [fintype : Fintype ι] (X : ι → C) (ι_1 : Type) (fintype_1 : Fintype ι_1) (X_1 : ι_1 → C),
({ ι := ι, fintype := fintype, X := X } = { ι := ι_1, fintype := fintype_1, X := X_1 }) =
(ι = ι_1 ∧ fintype ≍ fintype_1 ∧ X ≍ X_1)
theorem CategoryTheory.Mat_.lift.congr_simp E1 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C] {D : Type u₁}
[inst_2 : CategoryTheory.Category.{v₁, u₁} D] [inst_3 : CategoryTheory.Preadditive D]
[inst_4 : CategoryTheory.Limits.HasFiniteBiproducts D] (F F_1 : CategoryTheory.Functor C D) (e_F : F = F_1)
[inst_5 : F.Additive], CategoryTheory.Mat_.lift F = CategoryTheory.Mat_.lift F_1
theorem CategoryTheory.Mat_.mk.inj E1 #
∀ {C : Type u₁} {ι : Type} {fintype : Fintype ι} {X : ι → C} {ι_1 : Type} {fintype_1 : Fintype ι_1} {X_1 : ι_1 → C},
{ ι := ι, fintype := fintype, X := X } = { ι := ι_1, fintype := fintype_1, X := X_1 } →
ι = ι_1 ∧ fintype ≍ fintype_1 ∧ X ≍ X_1
structure CategoryTheory.Mat_ E1 #
Type u₁ → Type (max 1 u₁)
An object in Mat_ C is a finite tuple of objects in C.
ctor CategoryTheory.Mat_.mk E0 #
{C : Type u₁} → (ι : Type) → [fintype : Fintype ι] → (ι → C) → CategoryTheory.Mat_ C
abbrev CategoryTheory.Mat_.ι E1 #
{C : Type u₁} → CategoryTheory.Mat_ C → Type
The index type ι
instance CategoryTheory.Mat_.fintype E0 #
{C : Type u₁} → (self : CategoryTheory.Mat_ C) → Fintype self.ι
abbrev CategoryTheory.Mat_.X E1 #
{C : Type u₁} → (self : CategoryTheory.Mat_ C) → self.ι → C
The map from ι to objects in C
def CategoryTheory.Mat_.Hom E1 #
{C : Type u₁} → [CategoryTheory.Category.{v₁, u₁} C] → CategoryTheory.Mat_ C → CategoryTheory.Mat_ C → Type v₁
A morphism in Mat_ C is a dependently typed matrix of morphisms.
def CategoryTheory.Mat_.Hom.id E1 #
{C : Type u₁} →
[inst : CategoryTheory.Category.{v₁, u₁} C] → [CategoryTheory.Preadditive C] → (M : CategoryTheory.Mat_ C) → M.Hom M
The identity matrix consists of identity morphisms on the diagonal, and zeros elsewhere.
def CategoryTheory.Mat_.Hom.comp E1 #
{C : Type u₁} →
[inst : CategoryTheory.Category.{v₁, u₁} C] →
[CategoryTheory.Preadditive C] → {M N K : CategoryTheory.Mat_ C} → M.Hom N → N.Hom K → M.Hom K
Composition of matrices using matrix multiplication.
instance CategoryTheory.Mat_.instCategory E0 #
{C : Type u₁} →
[inst : CategoryTheory.Category.{v₁, u₁} C] →
[CategoryTheory.Preadditive C] → CategoryTheory.Category.{v₁, max 1 u₁} (CategoryTheory.Mat_ C)
theorem CategoryTheory.Mat_.hom_ext E1 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C]
{M N : CategoryTheory.Mat_ C} (f g : M ⟶ N), (∀ (i : M.ι) (j : N.ι), f i j = g i j) → f = g
theorem CategoryTheory.Mat_.hom_ext_iff E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C]
{M N : CategoryTheory.Mat_ C} {f g : M ⟶ N}, f = g ↔ ∀ (i : M.ι) (j : N.ι), f i j = g i j
theorem CategoryTheory.Mat_.id_def E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C]
(M : CategoryTheory.Mat_ C),
CategoryTheory.CategoryStruct.id M = fun i j ↦ if h : i = j then CategoryTheory.eqToHom ⋯ else 0
theorem CategoryTheory.Mat_.id_apply E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C]
(M : CategoryTheory.Mat_ C) (i j : M.ι),
CategoryTheory.CategoryStruct.id M i j = if h : i = j then CategoryTheory.eqToHom ⋯ else 0
theorem CategoryTheory.Mat_.id_apply_self E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C]
(M : CategoryTheory.Mat_ C) (i : M.ι),
CategoryTheory.CategoryStruct.id M i i = CategoryTheory.CategoryStruct.id (M.X i)
theorem CategoryTheory.Mat_.id_apply_of_ne E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C]
(M : CategoryTheory.Mat_ C) (i j : M.ι), i ≠ j → CategoryTheory.CategoryStruct.id M i j = 0
theorem CategoryTheory.Mat_.comp_def E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C]
{M N K : CategoryTheory.Mat_ C} (f : M ⟶ N) (g : N ⟶ K),
CategoryTheory.CategoryStruct.comp f g = fun i k ↦ ∑ j, CategoryTheory.CategoryStruct.comp (f i j) (g j k)
theorem CategoryTheory.Mat_.comp_apply E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C]
{M N K : CategoryTheory.Mat_ C} (f : M ⟶ N) (g : N ⟶ K) (i : M.ι) (k : K.ι),
CategoryTheory.CategoryStruct.comp f g i k = ∑ j, CategoryTheory.CategoryStruct.comp (f i j) (g j k)
instance CategoryTheory.Mat_.instInhabitedHom E0 #
{C : Type u₁} →
[inst : CategoryTheory.Category.{v₁, u₁} C] →
[inst_1 : CategoryTheory.Preadditive C] → (M N : CategoryTheory.Mat_ C) → Inhabited (M ⟶ N)
instance CategoryTheory.Mat_.instAddCommGroupHom E0 #
{C : Type u₁} →
[inst : CategoryTheory.Category.{v₁, u₁} C] →
[inst_1 : CategoryTheory.Preadditive C] → (M N : CategoryTheory.Mat_ C) → AddCommGroup (M ⟶ N)
theorem CategoryTheory.Mat_.add_apply E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C]
{M N : CategoryTheory.Mat_ C} (f g : M ⟶ N) (i : M.ι) (j : N.ι), (f + g) i j = f i j + g i j
instance CategoryTheory.Mat_.instPreadditive E0 #
{C : Type u₁} →
[inst : CategoryTheory.Category.{v₁, u₁} C] →
[inst_1 : CategoryTheory.Preadditive C] → CategoryTheory.Preadditive (CategoryTheory.Mat_ C)
instance CategoryTheory.Mat_.hasFiniteBiproducts E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C],
CategoryTheory.Limits.HasFiniteBiproducts (CategoryTheory.Mat_ C)
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.
def CategoryTheory.Functor.mapMat_ E1 #
{C : Type u₁} →
[inst : CategoryTheory.Category.{v₁, u₁} C] →
[inst_1 : CategoryTheory.Preadditive C] →
{D : Type u_1} →
[inst_2 : CategoryTheory.Category.{v₁, u_1} D] →
[inst_3 : CategoryTheory.Preadditive D] →
(F : CategoryTheory.Functor C D) →
[F.Additive] → CategoryTheory.Functor (CategoryTheory.Mat_ C) (CategoryTheory.Mat_ D)
A functor induces a functor of matrix categories.
theorem CategoryTheory.Functor.mapMat__obj_X E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C] {D : Type u_1}
[inst_2 : CategoryTheory.Category.{v₁, u_1} D] [inst_3 : CategoryTheory.Preadditive D]
(F : CategoryTheory.Functor C D) [inst_4 : F.Additive] (M : CategoryTheory.Mat_ C) (i : M.ι),
(F.mapMat_.obj M).X i = F.obj (M.X i)
theorem CategoryTheory.Functor.mapMat__obj_ι E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C] {D : Type u_1}
[inst_2 : CategoryTheory.Category.{v₁, u_1} D] [inst_3 : CategoryTheory.Preadditive D]
(F : CategoryTheory.Functor C D) [inst_4 : F.Additive] (M : CategoryTheory.Mat_ C), (F.mapMat_.obj M).ι = M.ι
theorem CategoryTheory.Functor.mapMat__obj_fintype E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C] {D : Type u_1}
[inst_2 : CategoryTheory.Category.{v₁, u_1} D] [inst_3 : CategoryTheory.Preadditive D]
(F : CategoryTheory.Functor C D) [inst_4 : F.Additive] (M : CategoryTheory.Mat_ C),
(F.mapMat_.obj M).fintype = M.fintype
theorem CategoryTheory.Functor.mapMat__map E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C] {D : Type u_1}
[inst_2 : CategoryTheory.Category.{v₁, u_1} D] [inst_3 : CategoryTheory.Preadditive D]
(F : CategoryTheory.Functor C D) [inst_4 : F.Additive] {X Y : CategoryTheory.Mat_ C} (f : X ⟶ Y)
(i : { ι := X.ι, fintype := X.fintype, X := fun i ↦ F.obj (X.X i) }.ι)
(j : { ι := Y.ι, fintype := Y.fintype, X := fun i ↦ F.obj (Y.X i) }.ι), F.mapMat_.map f i j = F.map (f i j)
def CategoryTheory.Functor.mapMatId E1 #
{C : Type u₁} →
[inst : CategoryTheory.Category.{v₁, u₁} C] →
[inst_1 : CategoryTheory.Preadditive C] →
(CategoryTheory.Functor.id C).mapMat_ ≅ CategoryTheory.Functor.id (CategoryTheory.Mat_ C)
The identity functor induces the identity functor on matrix categories.
theorem CategoryTheory.Functor.mapMatId_hom_app E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C]
(X : CategoryTheory.Mat_ C),
CategoryTheory.Functor.mapMatId.hom.app X =
CategoryTheory.CategoryStruct.id ((CategoryTheory.Functor.id C).mapMat_.obj X)
theorem CategoryTheory.Functor.mapMatId_inv_app E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C]
(X : CategoryTheory.Mat_ C),
CategoryTheory.Functor.mapMatId.inv.app X =
CategoryTheory.CategoryStruct.id ((CategoryTheory.Functor.id C).mapMat_.obj X)
def CategoryTheory.Functor.mapMatComp E1 #
{C : Type u₁} →
[inst : CategoryTheory.Category.{v₁, u₁} C] →
[inst_1 : CategoryTheory.Preadditive C] →
{D : Type u_1} →
[inst_2 : CategoryTheory.Category.{v₁, u_1} D] →
[inst_3 : CategoryTheory.Preadditive D] →
{E : Type u_2} →
[inst_4 : CategoryTheory.Category.{v₁, u_2} E] →
[inst_5 : CategoryTheory.Preadditive E] →
(F : CategoryTheory.Functor C D) →
[inst_6 : F.Additive] →
(G : CategoryTheory.Functor D E) →
[inst_7 : G.Additive] → (F.comp G).mapMat_ ≅ F.mapMat_.comp G.mapMat_
Composite functors induce composite functors on matrix categories.
theorem CategoryTheory.Functor.mapMatComp_hom_app E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C] {D : Type u_1}
[inst_2 : CategoryTheory.Category.{v₁, u_1} D] [inst_3 : CategoryTheory.Preadditive D] {E : Type u_2}
[inst_4 : CategoryTheory.Category.{v₁, u_2} E] [inst_5 : CategoryTheory.Preadditive E]
(F : CategoryTheory.Functor C D) [inst_6 : F.Additive] (G : CategoryTheory.Functor D E) [inst_7 : G.Additive]
(X : CategoryTheory.Mat_ C), (F.mapMatComp G).hom.app X = CategoryTheory.CategoryStruct.id ((F.comp G).mapMat_.obj X)
theorem CategoryTheory.Functor.mapMatComp_inv_app E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C] {D : Type u_1}
[inst_2 : CategoryTheory.Category.{v₁, u_1} D] [inst_3 : CategoryTheory.Preadditive D] {E : Type u_2}
[inst_4 : CategoryTheory.Category.{v₁, u_2} E] [inst_5 : CategoryTheory.Preadditive E]
(F : CategoryTheory.Functor C D) [inst_6 : F.Additive] (G : CategoryTheory.Functor D E) [inst_7 : G.Additive]
(X : CategoryTheory.Mat_ C), (F.mapMatComp G).inv.app X = CategoryTheory.CategoryStruct.id ((F.comp G).mapMat_.obj X)
def CategoryTheory.Mat_.embedding E1 #
(C : Type u₁) →
[inst : CategoryTheory.Category.{v₁, u₁} C] →
[inst_1 : CategoryTheory.Preadditive C] → CategoryTheory.Functor C (CategoryTheory.Mat_ C)
The embedding of C into Mat_ C as one-by-one matrices.
(We index the summands by PUnit.)
theorem CategoryTheory.Mat_.embedding_obj_ι E0 #
∀ (C : Type u₁) [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C] (X : C),
((CategoryTheory.Mat_.embedding C).obj X).ι = PUnit.{1}
theorem CategoryTheory.Mat_.embedding_obj_X E0 #
∀ (C : Type u₁) [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C] (X : C)
(x : PUnit.{1}), ((CategoryTheory.Mat_.embedding C).obj X).X x = X
theorem CategoryTheory.Mat_.embedding_obj_fintype E0 #
∀ (C : Type u₁) [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C] (X : C),
((CategoryTheory.Mat_.embedding C).obj X).fintype = PUnit.fintype
theorem CategoryTheory.Mat_.embedding_map E0 #
∀ (C : Type u₁) [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C] {X Y : C}
(f : X ⟶ Y) (x : { ι := PUnit.{1}, fintype := PUnit.fintype, X := fun x ↦ X }.ι)
(x_1 : { ι := PUnit.{1}, fintype := PUnit.fintype, X := fun x ↦ Y }.ι),
(CategoryTheory.Mat_.embedding C).map f x x_1 = f
instance CategoryTheory.Mat_.Embedding.instFaithfulEmbedding E0 #
∀ (C : Type u₁) [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C],
(CategoryTheory.Mat_.embedding C).Faithful
instance CategoryTheory.Mat_.Embedding.instFullEmbedding E0 #
∀ (C : Type u₁) [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C],
(CategoryTheory.Mat_.embedding C).Full
instance CategoryTheory.Mat_.Embedding.instAdditiveEmbedding E0 #
∀ (C : Type u₁) [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C],
(CategoryTheory.Mat_.embedding C).Additive
instance CategoryTheory.Mat_.instInhabited E0 #
(C : Type u₁) →
[inst : CategoryTheory.Category.{v₁, u₁} C] →
[CategoryTheory.Preadditive C] → [Inhabited C] → Inhabited (CategoryTheory.Mat_ C)
def CategoryTheory.Mat_.isoBiproductEmbedding E1 #
{C : Type u₁} →
[inst : CategoryTheory.Category.{v₁, u₁} C] →
[inst_1 : CategoryTheory.Preadditive C] →
(M : CategoryTheory.Mat_ C) → M ≅ ⨁ fun i ↦ (CategoryTheory.Mat_.embedding C).obj (M.X i)
Every object in Mat_ C is isomorphic to the biproduct of its summands.
theorem CategoryTheory.Mat_.isoBiproductEmbedding_hom E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C]
(M : CategoryTheory.Mat_ C),
M.isoBiproductEmbedding.hom =
CategoryTheory.Limits.biproduct.lift fun i j x ↦ if h : j = i then CategoryTheory.eqToHom ⋯ else 0
theorem CategoryTheory.Mat_.isoBiproductEmbedding_inv E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C]
(M : CategoryTheory.Mat_ C),
M.isoBiproductEmbedding.inv =
CategoryTheory.Limits.biproduct.desc fun i x k ↦ if h : i = k then CategoryTheory.eqToHom ⋯ else 0
instance CategoryTheory.Mat_.instHasBiproductιObjEmbeddingXOfAdditive E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C] {D : Type u₁}
[inst_2 : CategoryTheory.Category.{v₁, u₁} D] [inst_3 : CategoryTheory.Preadditive D]
(F : CategoryTheory.Functor (CategoryTheory.Mat_ C) D) [F.Additive] (M : CategoryTheory.Mat_ C),
CategoryTheory.Limits.HasBiproduct fun i ↦ F.obj ((CategoryTheory.Mat_.embedding C).obj (M.X i))
This instance can be found using Functor.hasBiproduct_of_preserves', but it is faster
to keep it here.
def CategoryTheory.Mat_.additiveObjIsoBiproduct E1 #
{C : Type u₁} →
[inst : CategoryTheory.Category.{v₁, u₁} C] →
[inst_1 : CategoryTheory.Preadditive C] →
{D : Type u₁} →
[inst_2 : CategoryTheory.Category.{v₁, u₁} D] →
[inst_3 : CategoryTheory.Preadditive D] →
(F : CategoryTheory.Functor (CategoryTheory.Mat_ C) D) →
[inst_4 : F.Additive] →
(M : CategoryTheory.Mat_ C) → F.obj M ≅ ⨁ fun i ↦ F.obj ((CategoryTheory.Mat_.embedding C).obj (M.X i))
Every M is a direct sum of objects from C, and F preserves biproducts.
theorem CategoryTheory.Mat_.additiveObjIsoBiproduct_hom_π E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C] {D : Type u₁}
[inst_2 : CategoryTheory.Category.{v₁, u₁} D] [inst_3 : CategoryTheory.Preadditive D]
(F : CategoryTheory.Functor (CategoryTheory.Mat_ C) D) [inst_4 : F.Additive] (M : CategoryTheory.Mat_ C) (i : M.ι),
CategoryTheory.CategoryStruct.comp (CategoryTheory.Mat_.additiveObjIsoBiproduct F M).hom
(CategoryTheory.Limits.biproduct.π (fun i ↦ F.obj ((CategoryTheory.Mat_.embedding C).obj (M.X i))) i) =
F.map
(CategoryTheory.CategoryStruct.comp M.isoBiproductEmbedding.hom
(CategoryTheory.Limits.biproduct.π (fun i ↦ (CategoryTheory.Mat_.embedding C).obj (M.X i)) i))
theorem CategoryTheory.Mat_.additiveObjIsoBiproduct_hom_π_assoc E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C] {D : Type u₁}
[inst_2 : CategoryTheory.Category.{v₁, u₁} D] [inst_3 : CategoryTheory.Preadditive D]
(F : CategoryTheory.Functor (CategoryTheory.Mat_ C) D) [inst_4 : F.Additive] (M : CategoryTheory.Mat_ C) (i : M.ι)
{Z : D} (h : F.obj ((CategoryTheory.Mat_.embedding C).obj (M.X i)) ⟶ Z),
CategoryTheory.CategoryStruct.comp (CategoryTheory.Mat_.additiveObjIsoBiproduct F M).hom
(CategoryTheory.CategoryStruct.comp
(CategoryTheory.Limits.biproduct.π (fun i ↦ F.obj ((CategoryTheory.Mat_.embedding C).obj (M.X i))) i) h) =
CategoryTheory.CategoryStruct.comp
(F.map
(CategoryTheory.CategoryStruct.comp M.isoBiproductEmbedding.hom
(CategoryTheory.Limits.biproduct.π (fun i ↦ (CategoryTheory.Mat_.embedding C).obj (M.X i)) i)))
h
theorem CategoryTheory.Mat_.ι_additiveObjIsoBiproduct_inv_assoc E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C] {D : Type u₁}
[inst_2 : CategoryTheory.Category.{v₁, u₁} D] [inst_3 : CategoryTheory.Preadditive D]
(F : CategoryTheory.Functor (CategoryTheory.Mat_ C) D) [inst_4 : F.Additive] (M : CategoryTheory.Mat_ C) (i : M.ι)
{Z : D} (h : F.obj M ⟶ Z),
CategoryTheory.CategoryStruct.comp
(CategoryTheory.Limits.biproduct.ι (fun i ↦ F.obj ((CategoryTheory.Mat_.embedding C).obj (M.X i))) i)
(CategoryTheory.CategoryStruct.comp (CategoryTheory.Mat_.additiveObjIsoBiproduct F M).inv h) =
CategoryTheory.CategoryStruct.comp
(F.map
(CategoryTheory.CategoryStruct.comp
(CategoryTheory.Limits.biproduct.ι (fun i ↦ (CategoryTheory.Mat_.embedding C).obj (M.X i)) i)
M.isoBiproductEmbedding.inv))
h
theorem CategoryTheory.Mat_.ι_additiveObjIsoBiproduct_inv E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C] {D : Type u₁}
[inst_2 : CategoryTheory.Category.{v₁, u₁} D] [inst_3 : CategoryTheory.Preadditive D]
(F : CategoryTheory.Functor (CategoryTheory.Mat_ C) D) [inst_4 : F.Additive] (M : CategoryTheory.Mat_ C) (i : M.ι),
CategoryTheory.CategoryStruct.comp
(CategoryTheory.Limits.biproduct.ι (fun i ↦ F.obj ((CategoryTheory.Mat_.embedding C).obj (M.X i))) i)
(CategoryTheory.Mat_.additiveObjIsoBiproduct F M).inv =
F.map
(CategoryTheory.CategoryStruct.comp
(CategoryTheory.Limits.biproduct.ι (fun i ↦ (CategoryTheory.Mat_.embedding C).obj (M.X i)) i)
M.isoBiproductEmbedding.inv)
theorem CategoryTheory.Mat_.additiveObjIsoBiproduct_naturality E1 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C] {D : Type u₁}
[inst_2 : CategoryTheory.Category.{v₁, u₁} D] [inst_3 : CategoryTheory.Preadditive D]
[inst_4 : CategoryTheory.Limits.HasFiniteBiproducts D] (F : CategoryTheory.Functor (CategoryTheory.Mat_ C) D)
[inst_5 : F.Additive] {M N : CategoryTheory.Mat_ C} (f : M ⟶ N),
CategoryTheory.CategoryStruct.comp (F.map f) (CategoryTheory.Mat_.additiveObjIsoBiproduct F N).hom =
CategoryTheory.CategoryStruct.comp (CategoryTheory.Mat_.additiveObjIsoBiproduct F M).hom
(CategoryTheory.Limits.biproduct.matrix fun i j ↦ F.map ((CategoryTheory.Mat_.embedding C).map (f i j)))
theorem CategoryTheory.Mat_.additiveObjIsoBiproduct_naturality_assoc E1 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C] {D : Type u₁}
[inst_2 : CategoryTheory.Category.{v₁, u₁} D] [inst_3 : CategoryTheory.Preadditive D]
[inst_4 : CategoryTheory.Limits.HasFiniteBiproducts D] (F : CategoryTheory.Functor (CategoryTheory.Mat_ C) D)
[inst_5 : F.Additive] {M N : CategoryTheory.Mat_ C} (f : M ⟶ N) {Z : D}
(h : (⨁ fun i ↦ F.obj ((CategoryTheory.Mat_.embedding C).obj (N.X i))) ⟶ Z),
CategoryTheory.CategoryStruct.comp (F.map f)
(CategoryTheory.CategoryStruct.comp (CategoryTheory.Mat_.additiveObjIsoBiproduct F N).hom h) =
CategoryTheory.CategoryStruct.comp (CategoryTheory.Mat_.additiveObjIsoBiproduct F M).hom
(CategoryTheory.CategoryStruct.comp
(CategoryTheory.Limits.biproduct.matrix fun i j ↦ F.map ((CategoryTheory.Mat_.embedding C).map (f i j))) h)
theorem CategoryTheory.Mat_.additiveObjIsoBiproduct_naturality' E1 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C] {D : Type u₁}
[inst_2 : CategoryTheory.Category.{v₁, u₁} D] [inst_3 : CategoryTheory.Preadditive D]
[inst_4 : CategoryTheory.Limits.HasFiniteBiproducts D] (F : CategoryTheory.Functor (CategoryTheory.Mat_ C) D)
[inst_5 : F.Additive] {M N : CategoryTheory.Mat_ C} (f : M ⟶ N),
CategoryTheory.CategoryStruct.comp (CategoryTheory.Mat_.additiveObjIsoBiproduct F M).inv (F.map f) =
CategoryTheory.CategoryStruct.comp
(CategoryTheory.Limits.biproduct.matrix fun i j ↦ F.map ((CategoryTheory.Mat_.embedding C).map (f i j)))
(CategoryTheory.Mat_.additiveObjIsoBiproduct F N).inv
theorem CategoryTheory.Mat_.additiveObjIsoBiproduct_naturality'_assoc E1 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C] {D : Type u₁}
[inst_2 : CategoryTheory.Category.{v₁, u₁} D] [inst_3 : CategoryTheory.Preadditive D]
[inst_4 : CategoryTheory.Limits.HasFiniteBiproducts D] (F : CategoryTheory.Functor (CategoryTheory.Mat_ C) D)
[inst_5 : F.Additive] {M N : CategoryTheory.Mat_ C} (f : M ⟶ N) {Z : D} (h : F.obj N ⟶ Z),
CategoryTheory.CategoryStruct.comp (CategoryTheory.Mat_.additiveObjIsoBiproduct F M).inv
(CategoryTheory.CategoryStruct.comp (F.map f) h) =
CategoryTheory.CategoryStruct.comp
(CategoryTheory.Limits.biproduct.matrix fun i j ↦ F.map ((CategoryTheory.Mat_.embedding C).map (f i j)))
(CategoryTheory.CategoryStruct.comp (CategoryTheory.Mat_.additiveObjIsoBiproduct F N).inv h)
def CategoryTheory.Mat_.lift E1 #
{C : Type u₁} →
[inst : CategoryTheory.Category.{v₁, u₁} C] →
[inst_1 : CategoryTheory.Preadditive C] →
{D : Type u₁} →
[inst_2 : CategoryTheory.Category.{v₁, u₁} D] →
[inst_3 : CategoryTheory.Preadditive D] →
[CategoryTheory.Limits.HasFiniteBiproducts D] →
(F : CategoryTheory.Functor C D) → [F.Additive] → CategoryTheory.Functor (CategoryTheory.Mat_ C) D
Any additive functor C ⥤ D to a category D with finite biproducts extends to
a functor Mat_ C ⥤ D.
theorem CategoryTheory.Mat_.lift_obj E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C] {D : Type u₁}
[inst_2 : CategoryTheory.Category.{v₁, u₁} D] [inst_3 : CategoryTheory.Preadditive D]
[inst_4 : CategoryTheory.Limits.HasFiniteBiproducts D] (F : CategoryTheory.Functor C D) [inst_5 : F.Additive]
(X : CategoryTheory.Mat_ C), (CategoryTheory.Mat_.lift F).obj X = ⨁ fun i ↦ F.obj (X.X i)
theorem CategoryTheory.Mat_.lift_map E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C] {D : Type u₁}
[inst_2 : CategoryTheory.Category.{v₁, u₁} D] [inst_3 : CategoryTheory.Preadditive D]
[inst_4 : CategoryTheory.Limits.HasFiniteBiproducts D] (F : CategoryTheory.Functor C D) [inst_5 : F.Additive]
{X Y : CategoryTheory.Mat_ C} (f : X ⟶ Y),
(CategoryTheory.Mat_.lift F).map f = CategoryTheory.Limits.biproduct.matrix fun i j ↦ F.map (f i j)
instance CategoryTheory.Mat_.lift_additive E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C] {D : Type u₁}
[inst_2 : CategoryTheory.Category.{v₁, u₁} D] [inst_3 : CategoryTheory.Preadditive D]
[inst_4 : CategoryTheory.Limits.HasFiniteBiproducts D] (F : CategoryTheory.Functor C D) [inst_5 : F.Additive],
(CategoryTheory.Mat_.lift F).Additive
def CategoryTheory.Mat_.embeddingLiftIso E1 #
{C : Type u₁} →
[inst : CategoryTheory.Category.{v₁, u₁} C] →
[inst_1 : CategoryTheory.Preadditive C] →
{D : Type u₁} →
[inst_2 : CategoryTheory.Category.{v₁, u₁} D] →
[inst_3 : CategoryTheory.Preadditive D] →
[inst_4 : CategoryTheory.Limits.HasFiniteBiproducts D] →
(F : CategoryTheory.Functor C D) →
[inst_5 : F.Additive] → (CategoryTheory.Mat_.embedding C).comp (CategoryTheory.Mat_.lift F) ≅ F
An additive functor C ⥤ D factors through its lift to Mat_ C ⥤ D.
theorem CategoryTheory.Mat_.embeddingLiftIso_hom_app E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C] {D : Type u₁}
[inst_2 : CategoryTheory.Category.{v₁, u₁} D] [inst_3 : CategoryTheory.Preadditive D]
[inst_4 : CategoryTheory.Limits.HasFiniteBiproducts D] (F : CategoryTheory.Functor C D) [inst_5 : F.Additive] (X : C),
(CategoryTheory.Mat_.embeddingLiftIso F).hom.app X =
CategoryTheory.Limits.biproduct.desc fun x ↦ CategoryTheory.CategoryStruct.id (F.obj X)
theorem CategoryTheory.Mat_.embeddingLiftIso_inv_app E0 #
∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] [inst_1 : CategoryTheory.Preadditive C] {D : Type u₁}
[inst_2 : CategoryTheory.Category.{v₁, u₁} D] [inst_3 : CategoryTheory.Preadditive D]
[inst_4 : CategoryTheory.Limits.HasFiniteBiproducts D] (F : CategoryTheory.Functor C D) [inst_5 : F.Additive] (X : C),
(CategoryTheory.Mat_.embeddingLiftIso F).inv.app X =
CategoryTheory.Limits.biproduct.lift fun x ↦ CategoryTheory.CategoryStruct.id (F.obj X)
def CategoryTheory.Mat_.liftUnique E1 #
{C : Type u₁} →
[inst : CategoryTheory.Category.{v₁, u₁} C] →
[inst_1 : CategoryTheory.Preadditive C] →
{D : Type u₁} →
[inst_2 : CategoryTheory.Category.{v₁, u₁} D] →
[inst_3 : CategoryTheory.Preadditive D] →
[inst_4 : CategoryTheory.Limits.HasFiniteBiproducts D] →
(F : CategoryTheory.Functor C D) →
[inst_5 : F.Additive] →
(L : CategoryTheory.Functor (CategoryTheory.Mat_ C) D) →
[L.Additive] → ((CategoryTheory.Mat_.embedding C).comp L ≅ F) → (L ≅ CategoryTheory.Mat_.lift F)
Mat_.lift F is the unique additive functor L : Mat_ C ⥤ D such that F ≅ embedding C ⋙ L.
def CategoryTheory.Mat_.ext E1 #
{C : Type u₁} →
[inst : CategoryTheory.Category.{v₁, u₁} C] →
[inst_1 : CategoryTheory.Preadditive C] →
{D : Type u₁} →
[inst_2 : CategoryTheory.Category.{v₁, u₁} D] →
[inst_3 : CategoryTheory.Preadditive D] →
[CategoryTheory.Limits.HasFiniteBiproducts D] →
{F G : CategoryTheory.Functor (CategoryTheory.Mat_ C) D} →
[F.Additive] →
[G.Additive] →
((CategoryTheory.Mat_.embedding C).comp F ≅ (CategoryTheory.Mat_.embedding C).comp G) → (F ≅ G)
Two additive functors Mat_ C ⥤ D are naturally isomorphic if
their precompositions with embedding C are naturally isomorphic as functors C ⥤ D.
def CategoryTheory.Mat_.equivalenceSelfOfHasFiniteBiproductsAux E0 #
{C : Type u₁} →
[inst : CategoryTheory.Category.{v₁, u₁} C] →
[inst_1 : CategoryTheory.Preadditive C] →
[inst_2 : CategoryTheory.Limits.HasFiniteBiproducts C] →
(CategoryTheory.Mat_.embedding C).comp (CategoryTheory.Functor.id (CategoryTheory.Mat_ C)) ≅
(CategoryTheory.Mat_.embedding C).comp
((CategoryTheory.Mat_.lift (CategoryTheory.Functor.id C)).comp (CategoryTheory.Mat_.embedding C))
Natural isomorphism needed in the construction of equivalenceSelfOfHasFiniteBiproducts.
def CategoryTheory.Mat_.equivalenceSelfOfHasFiniteBiproducts E1 #
(C : Type (u₁ + 1)) →
[inst : CategoryTheory.LargeCategory C] →
[inst_1 : CategoryTheory.Preadditive C] → [CategoryTheory.Limits.HasFiniteBiproducts C] → CategoryTheory.Mat_ C ≌ C
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.
theorem CategoryTheory.Mat_.equivalenceSelfOfHasFiniteBiproducts_functor E0 #
∀ {C : Type (u₁ + 1)} [inst : CategoryTheory.LargeCategory C] [inst_1 : CategoryTheory.Preadditive C]
[inst_2 : CategoryTheory.Limits.HasFiniteBiproducts C],
(CategoryTheory.Mat_.equivalenceSelfOfHasFiniteBiproducts C).functor =
CategoryTheory.Mat_.lift (CategoryTheory.Functor.id C)
theorem CategoryTheory.Mat_.equivalenceSelfOfHasFiniteBiproducts_inverse E0 #
∀ {C : Type (u₁ + 1)} [inst : CategoryTheory.LargeCategory C] [inst_1 : CategoryTheory.Preadditive C]
[inst_2 : CategoryTheory.Limits.HasFiniteBiproducts C],
(CategoryTheory.Mat_.equivalenceSelfOfHasFiniteBiproducts C).inverse = CategoryTheory.Mat_.embedding C
def CategoryTheory.Mat E1 #
Type u → Type (u + 1)
A type synonym for Fintype, which we will equip with a category structure
where the morphisms are matrices with components in R.
instance CategoryTheory.instInhabitedMat E0 #
(x : Type u_1) → Inhabited (CategoryTheory.Mat x)
instance CategoryTheory.instCoeSortMatType E0 #
(R : Type u) → CoeSort (CategoryTheory.Mat R) (Type u)
instance CategoryTheory.instCategoryMatOfSemiring E0 #
(R : Type u) → [Semiring R] → CategoryTheory.Category.{u, u + 1} (CategoryTheory.Mat R)
theorem CategoryTheory.Mat.hom_ext_iff E0 #
∀ {R : Type u} [inst : Semiring R] {X Y : CategoryTheory.Mat R} {f g : X ⟶ Y},
f = g ↔ ∀ (i : X.obj) (j : Y.obj), f i j = g i j
theorem CategoryTheory.Mat.hom_ext E1 #
∀ {R : Type u} [inst : Semiring R] {X Y : CategoryTheory.Mat R} (f g : X ⟶ Y),
(∀ (i : X.obj) (j : Y.obj), f i j = g i j) → f = g
theorem CategoryTheory.Mat.id_def E0 #
∀ (R : Type u) [inst : Semiring R] (M : CategoryTheory.Mat R),
CategoryTheory.CategoryStruct.id M = fun i j ↦ if i = j then 1 else 0
theorem CategoryTheory.Mat.id_apply E0 #
∀ (R : Type u) [inst : Semiring R] (M : CategoryTheory.Mat R) (i j : M.obj),
CategoryTheory.CategoryStruct.id M i j = if i = j then 1 else 0
theorem CategoryTheory.Mat.id_apply_self E0 #
∀ (R : Type u) [inst : Semiring R] (M : CategoryTheory.Mat R) (i : M.obj), CategoryTheory.CategoryStruct.id M i i = 1
theorem CategoryTheory.Mat.id_apply_of_ne E0 #
∀ (R : Type u) [inst : Semiring R] (M : CategoryTheory.Mat R) (i j : M.obj),
i ≠ j → CategoryTheory.CategoryStruct.id M i j = 0
theorem CategoryTheory.Mat.comp_def E0 #
∀ (R : Type u) [inst : Semiring R] {M N K : CategoryTheory.Mat R} (f : M ⟶ N) (g : N ⟶ K),
CategoryTheory.CategoryStruct.comp f g = fun i k ↦ ∑ j, f i j * g j k
theorem CategoryTheory.Mat.comp_apply E0 #
∀ (R : Type u) [inst : Semiring R] {M N K : CategoryTheory.Mat R} (f : M ⟶ N) (g : N ⟶ K) (i : M.obj) (k : K.obj),
CategoryTheory.CategoryStruct.comp f g i k = ∑ j, f i j * g j k
instance CategoryTheory.Mat.instInhabitedHom E0 #
(R : Type u) → [inst : Semiring R] → (M N : CategoryTheory.Mat R) → Inhabited (M ⟶ N)
def CategoryTheory.Mat.equivalenceSingleObjInverse E1 #
(R : Type) →
[inst : Ring R] → CategoryTheory.Functor (CategoryTheory.Mat_ (CategoryTheory.SingleObj Rᵐᵒᵖ)) (CategoryTheory.Mat R)
Auxiliary definition for CategoryTheory.Mat.equivalenceSingleObj.
theorem CategoryTheory.Mat.equivalenceSingleObjInverse_obj_obj E0 #
∀ (R : Type) [inst : Ring R] (X : CategoryTheory.Mat_ (CategoryTheory.SingleObj Rᵐᵒᵖ)),
((CategoryTheory.Mat.equivalenceSingleObjInverse R).obj X).obj = X.ι
theorem CategoryTheory.Mat.equivalenceSingleObjInverse_map E0 #
∀ (R : Type) [inst : Ring R] {X Y : CategoryTheory.Mat_ (CategoryTheory.SingleObj Rᵐᵒᵖ)} (f : X ⟶ Y) (i : (↧X.ι).obj)
(j : (↧Y.ι).obj), (CategoryTheory.Mat.equivalenceSingleObjInverse R).map f i j = MulOpposite.unop (f i j)
instance CategoryTheory.Mat.instFaithfulMat_SingleObjMulOppositeEquivalenceSingleObjInverse E0 #
∀ (R : Type) [inst : Ring R], (CategoryTheory.Mat.equivalenceSingleObjInverse R).Faithful
instance CategoryTheory.Mat.instFullMat_SingleObjMulOppositeEquivalenceSingleObjInverse E0 #
∀ (R : Type) [inst : Ring R], (CategoryTheory.Mat.equivalenceSingleObjInverse R).Full
instance CategoryTheory.Mat.instEssSurjMat_SingleObjMulOppositeEquivalenceSingleObjInverse E0 #
∀ (R : Type) [inst : Ring R], (CategoryTheory.Mat.equivalenceSingleObjInverse R).EssSurj
instance CategoryTheory.Mat.instIsEquivalenceMat_SingleObjMulOppositeEquivalenceSingleObjInverse E0 #
∀ (R : Type) [inst : Ring R], (CategoryTheory.Mat.equivalenceSingleObjInverse R).IsEquivalence
def CategoryTheory.Mat.equivalenceSingleObj E1 #
(R : Type) → [inst : Ring R] → CategoryTheory.Mat R ≌ CategoryTheory.Mat_ (CategoryTheory.SingleObj Rᵐᵒᵖ)
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.
instance CategoryTheory.Mat.instAddCommGroupHom E0 #
(R : Type) → [inst : Ring R] → (X Y : CategoryTheory.Mat R) → AddCommGroup (X ⟶ Y)
theorem CategoryTheory.Mat.add_apply E0 #
∀ {R : Type} [inst : Ring R] {M N : CategoryTheory.Mat R} (f g : M ⟶ N) (i : M.obj) (j : N.obj),
(f + g) i j = f i j + g i j
instance CategoryTheory.Mat.instPreadditive E0 #
{R : Type} → [inst : Ring R] → CategoryTheory.Preadditive (CategoryTheory.Mat R)