Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
feat(category_theory/idempotents): idempotent completeness of homolog…
Browse files Browse the repository at this point in the history
…ical_complex (#17921)
  • Loading branch information
joelriou committed Mar 28, 2023
1 parent f0bd2f6 commit 80f7a57
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 1 deletion.
37 changes: 37 additions & 0 deletions src/algebra/homology/additive.lean
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,17 @@ def functor.map_homological_complex (F : V ⥤ W) [F.additive] (c : complex_shap
{ f := λ i, F.map (f.f i),
comm' := λ i j h, by { dsimp, rw [←F.map_comp, ←F.map_comp, f.comm], }, }, }.

variable (V)

/-- The functor on homological complexes induced by the identity functor is
isomorphic to the identity functor. -/
@[simps]
def functor.map_homological_complex_id_iso (c : complex_shape ι) :
(𝟭 V).map_homological_complex c ≅ 𝟭 _ :=
nat_iso.of_components (λ K, hom.iso_of_components (λ i, iso.refl _) (by tidy)) (by tidy)

variable {V}

instance functor.map_homogical_complex_additive
(F : V ⥤ W) [F.additive] (c : complex_shape ι) : (F.map_homological_complex c).additive := {}

Expand Down Expand Up @@ -147,6 +158,32 @@ by tidy
(nat_trans.map_homological_complex α c).app C ≫ (G.map_homological_complex c).map f :=
by tidy

/--
A natural isomorphism between functors induces a natural isomorphism
between those functors applied to homological complexes.
-/
@[simps]
def nat_iso.map_homological_complex {F G : V ⥤ W} [F.additive] [G.additive]
(α : F ≅ G) (c : complex_shape ι) : F.map_homological_complex c ≅ G.map_homological_complex c :=
{ hom := α.hom.map_homological_complex c,
inv := α.inv.map_homological_complex c,
hom_inv_id' := by simpa only [← nat_trans.map_homological_complex_comp, α.hom_inv_id],
inv_hom_id' := by simpa only [← nat_trans.map_homological_complex_comp, α.inv_hom_id], }

/--
An equivalence of categories induces an equivalences between the respective categories
of homological complex.
-/
@[simps]
def equivalence.map_homological_complex (e : V ≌ W) [e.functor.additive] (c : complex_shape ι):
homological_complex V c ≌ homological_complex W c :=
{ functor := e.functor.map_homological_complex c,
inverse := e.inverse.map_homological_complex c,
unit_iso := (functor.map_homological_complex_id_iso V c).symm ≪≫
nat_iso.map_homological_complex e.unit_iso c,
counit_iso := nat_iso.map_homological_complex e.counit_iso c ≪≫
functor.map_homological_complex_id_iso W c, }

end category_theory

namespace chain_complex
Expand Down
13 changes: 12 additions & 1 deletion src/category_theory/idempotents/homological_complex.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joël Riou
-/

import algebra.homology.homological_complex
import algebra.homology.additive
import category_theory.idempotents.karoubi

/-!
Expand All @@ -14,6 +14,9 @@ This file contains simplifications lemmas for categories
`karoubi (homological_complex C c)` and the construction of an equivalence
of categories `karoubi (homological_complex C c) ≌ homological_complex (karoubi C) c`.
When the category `C` is idempotent complete, it is shown that
`homological_complex (karoubi C) c` is also idempotent complete.
-/

namespace category_theory
Expand Down Expand Up @@ -203,6 +206,14 @@ def karoubi_cochain_complex_equivalence :
karoubi (cochain_complex C α) ≌ cochain_complex (karoubi C) α :=
karoubi_homological_complex_equivalence C (complex_shape.up α)

instance [is_idempotent_complete C] : is_idempotent_complete (homological_complex C c) :=
begin
rw [is_idempotent_complete_iff_of_equivalence
((to_karoubi_equivalence C).map_homological_complex c),
← is_idempotent_complete_iff_of_equivalence (karoubi_homological_complex_equivalence C c)],
apply_instance,
end

end idempotents

end category_theory
8 changes: 8 additions & 0 deletions src/category_theory/idempotents/karoubi.lean
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,14 @@ def to_karoubi_is_equivalence [is_idempotent_complete C] :
is_equivalence (to_karoubi C) :=
equivalence.of_fully_faithfully_ess_surj (to_karoubi C)

/-- The equivalence `C ≅ karoubi C` when `C` is idempotent complete. -/
def to_karoubi_equivalence [is_idempotent_complete C] : C ≌ karoubi C :=
by { haveI := to_karoubi_is_equivalence C, exact functor.as_equivalence (to_karoubi C), }

instance to_karoubi_equivalence_functor_additive
[preadditive C] [is_idempotent_complete C] :
(to_karoubi_equivalence C).functor.additive := (infer_instance : (to_karoubi C).additive)

namespace karoubi

variables {C}
Expand Down

0 comments on commit 80f7a57

Please sign in to comment.