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

Commit 8e25bb6

Browse files
committed
feat(algebra/homology): complexes in functor categories (#7744)
From LTE. Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
1 parent f4d145e commit 8e25bb6

1 file changed

Lines changed: 65 additions & 0 deletions

File tree

src/algebra/homology/functor.lean

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/-
2+
Copyright (c) 2021 Johan Commelin. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Johan Commelin
5+
-/
6+
import algebra.homology.homological_complex
7+
8+
/-!
9+
# Complexes in functor categories
10+
11+
We can view a complex valued in a functor category `T ⥤ V` as
12+
a functor from `T` to complexes valued in `V`.
13+
14+
## Future work
15+
In fact this is an equivalence of categories.
16+
17+
-/
18+
19+
universes v u
20+
21+
open category_theory
22+
open category_theory.limits
23+
24+
namespace homological_complex
25+
26+
variables {V : Type u} [category.{v} V] [has_zero_morphisms V]
27+
variables {ι : Type*} {c : complex_shape ι}
28+
29+
/-- A complex of functors gives a functor to complexes. -/
30+
@[simps obj map]
31+
def as_functor {T : Type*} [category T]
32+
(C : homological_complex (T ⥤ V) c) :
33+
T ⥤ homological_complex V c :=
34+
{ obj := λ t,
35+
{ X := λ i, (C.X i).obj t,
36+
d := λ i j, (C.d i j).app t,
37+
d_comp_d' := λ i j k hij hjk, begin
38+
have := C.d_comp_d i j k,
39+
rw [nat_trans.ext_iff, function.funext_iff] at this,
40+
exact this t
41+
end,
42+
shape' := λ i j h, begin
43+
have := C.shape _ _ h,
44+
rw [nat_trans.ext_iff, function.funext_iff] at this,
45+
exact this t
46+
end },
47+
map := λ t₁ t₂ h,
48+
{ f := λ i, (C.X i).map h,
49+
comm' := λ i j hij, nat_trans.naturality _ _ },
50+
map_id' := λ t, by { ext i, dsimp, rw (C.X i).map_id, },
51+
map_comp' := λ t₁ t₂ t₃ h₁ h₂, by { ext i, dsimp, rw functor.map_comp, } }
52+
53+
/-- The functorial version of `homological_complex.as_functor`. -/
54+
-- TODO in fact, this is an equivalence of categories.
55+
@[simps]
56+
def complex_of_functors_to_functor_to_complex {T : Type*} [category T] :
57+
(homological_complex (T ⥤ V) c) ⥤ (T ⥤ homological_complex V c) :=
58+
{ obj := λ C, C.as_functor,
59+
map := λ C D f,
60+
{ app := λ t,
61+
{ f := λ i, (f.f i).app t,
62+
comm' := λ i j w, nat_trans.congr_app (f.comm i j) t, },
63+
naturality' := λ t t' g, by { ext i, exact (f.f i).naturality g, }, } }
64+
65+
end homological_complex

0 commit comments

Comments
 (0)