|
| 1 | +/- |
| 2 | +Copyright (c) 2022 Scott Morrison. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Scott Morrison |
| 5 | +-/ |
| 6 | +import category_theory.abelian.basic |
| 7 | +import category_theory.preadditive.functor_category |
| 8 | +import category_theory.limits.shapes.functor_category |
| 9 | +import category_theory.limits.preserves.shapes.kernels |
| 10 | + |
| 11 | +/-! |
| 12 | +# If `D` is abelian, then the functor category `C ⥤ D` is also abelian. |
| 13 | +
|
| 14 | +-/ |
| 15 | + |
| 16 | +noncomputable theory |
| 17 | + |
| 18 | +namespace category_theory |
| 19 | +open category_theory.limits |
| 20 | + |
| 21 | +universes w v u |
| 22 | +variables {C : Type (max v u)} [category.{v} C] |
| 23 | +variables {D : Type w} [category.{max v u} D] [abelian D] |
| 24 | + |
| 25 | +namespace abelian |
| 26 | + |
| 27 | +namespace functor_category |
| 28 | +variables {F G : C ⥤ D} (α : F ⟶ G) (X : C) |
| 29 | + |
| 30 | +/-- The evaluation of the abelian coimage in a functor category is |
| 31 | +the abelian coimage of the corresponding component. -/ |
| 32 | +@[simps] |
| 33 | +def coimage_obj_iso : (abelian.coimage α).obj X ≅ abelian.coimage (α.app X) := |
| 34 | +preserves_cokernel.iso ((evaluation C D).obj X) _ ≪≫ |
| 35 | + cokernel.map_iso _ _ (preserves_kernel.iso ((evaluation C D).obj X) _) (iso.refl _) |
| 36 | + begin |
| 37 | + dsimp, |
| 38 | + simp only [category.comp_id], |
| 39 | + exact (kernel_comparison_comp_ι _ ((evaluation C D).obj X)).symm, |
| 40 | + end |
| 41 | + |
| 42 | +/-- The evaluation of the abelian image in a functor category is |
| 43 | +the abelian image of the corresponding component. -/ |
| 44 | +@[simps] |
| 45 | +def image_obj_iso : (abelian.image α).obj X ≅ abelian.image (α.app X) := |
| 46 | +preserves_kernel.iso ((evaluation C D).obj X) _ ≪≫ |
| 47 | + kernel.map_iso _ _ (iso.refl _) (preserves_cokernel.iso ((evaluation C D).obj X) _) |
| 48 | + begin |
| 49 | + apply (cancel_mono (preserves_cokernel.iso ((evaluation C D).obj X) α).inv).1, |
| 50 | + simp only [category.assoc, iso.hom_inv_id], |
| 51 | + dsimp, |
| 52 | + simp only [category.id_comp, category.comp_id], |
| 53 | + exact (π_comp_cokernel_comparison _ ((evaluation C D).obj X)).symm, |
| 54 | + end |
| 55 | + |
| 56 | +lemma coimage_image_comparison_app : |
| 57 | + coimage_image_comparison (α.app X) = |
| 58 | + (coimage_obj_iso α X).inv ≫ (coimage_image_comparison α).app X ≫ (image_obj_iso α X).hom := |
| 59 | +begin |
| 60 | + ext, |
| 61 | + dsimp, |
| 62 | + simp only [category.comp_id, category.id_comp, category.assoc, |
| 63 | + coimage_image_factorisation, limits.cokernel.π_desc_assoc, limits.kernel.lift_ι], |
| 64 | + simp only [←evaluation_obj_map C D X], |
| 65 | + erw kernel_comparison_comp_ι _ ((evaluation C D).obj X), |
| 66 | + erw π_comp_cokernel_comparison_assoc _ ((evaluation C D).obj X), |
| 67 | + simp only [←functor.map_comp], |
| 68 | + simp only [coimage_image_factorisation, evaluation_obj_map], |
| 69 | +end |
| 70 | + |
| 71 | +lemma coimage_image_comparison_app' : |
| 72 | + (coimage_image_comparison α).app X = |
| 73 | + (coimage_obj_iso α X).hom ≫ coimage_image_comparison (α.app X) ≫ (image_obj_iso α X).inv := |
| 74 | +by simp only [coimage_image_comparison_app, iso.hom_inv_id_assoc, iso.hom_inv_id, category.assoc, |
| 75 | + category.comp_id] |
| 76 | + |
| 77 | +instance functor_category_is_iso_coimage_image_comparison : |
| 78 | + is_iso (abelian.coimage_image_comparison α) := |
| 79 | +begin |
| 80 | + haveI : ∀ X : C, is_iso ((abelian.coimage_image_comparison α).app X), |
| 81 | + { intros, rw coimage_image_comparison_app', apply_instance, }, |
| 82 | + apply nat_iso.is_iso_of_is_iso_app, |
| 83 | +end |
| 84 | + |
| 85 | +end functor_category |
| 86 | + |
| 87 | +noncomputable instance : abelian (C ⥤ D) := |
| 88 | +abelian.of_coimage_image_comparison_is_iso |
| 89 | + |
| 90 | +end abelian |
| 91 | + |
| 92 | +end category_theory |
0 commit comments