l3lab/ntp-mathlib huggingface dataset:
instance : AddCommGroup (C ⟶ D) :=
  Function.Injective.addCommGroup Hom.f HomologicalComplex.hom_f_injective
    (by aesop_cat) (by aesop_cat) (by aesop_cat) (by aesop_cat) (by 

Proof state:
ι : Type u_1
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g : C ⟶ D
h k : D ⟶ E
i : ι
⊢ ∀ (x : C ⟶ D) (n : ℕ), (n • x).f = n • x.f

Next tactic:
aesop_cat
instance : AddCommGroup (C ⟶ D) :=
  Function.Injective.addCommGroup Hom.f HomologicalComplex.hom_f_injective
    (by aesop_cat) (by aesop_cat) (by aesop_cat) (by aesop_cat) (by aesop_cat) (by 

Proof state:
ι : Type u_1
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g : C ⟶ D
h k : D ⟶ E
i : ι
⊢ ∀ (x : C ⟶ D) (n : ℤ), (n • x).f = n • x.f

Next tactic:
aesop_cat
instance : Preadditive (HomologicalComplex V c) where
  add_comp _ _ _ f f' g := by
    

Proof state:
ι : Type u_1
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f✝ g✝ : C ⟶ D
h k : D ⟶ E
i : ι
x✝² x✝¹ x✝ : HomologicalComplex V c
f f' : x✝² ⟶ x✝¹
g : x✝¹ ⟶ x✝
⊢ (f + f') ≫ g = f ≫ g + f' ≫ g

Next tactic:
ext
instance : Preadditive (HomologicalComplex V c) where
  add_comp _ _ _ f f' g := by
    ext
    

Proof state:
case h
ι : Type u_1
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f✝ g✝ : C ⟶ D
h k : D ⟶ E
i : ι
x✝² x✝¹ x✝ : HomologicalComplex V c
f f' : x✝² ⟶ x✝¹
g : x✝¹ ⟶ x✝
i✝ : ι
⊢ Hom.f ((f + f') ≫ g) i✝ = Hom.f (f ≫ g + f' ≫ g) i✝

Next tactic:
simp only [comp_f, add_f_apply]
instance : Preadditive (HomologicalComplex V c) where
  add_comp _ _ _ f f' g := by
    ext
    simp only [comp_f, add_f_apply]
    

Proof state:
case h
ι : Type u_1
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f✝ g✝ : C ⟶ D
h k : D ⟶ E
i : ι
x✝² x✝¹ x✝ : HomologicalComplex V c
f f' : x✝² ⟶ x✝¹
g : x✝¹ ⟶ x✝
i✝ : ι
⊢ (Hom.f f i✝ + Hom.f f' i✝) ≫ Hom.f g i✝ = Hom.f f i✝ ≫ Hom.f g i✝ + Hom.f f' i✝ ≫ Hom.f g i✝

Next tactic:
rw [Preadditive.add_comp]
instance : Preadditive (HomologicalComplex V c) where
  add_comp _ _ _ f f' g := by
    ext
    simp only [comp_f, add_f_apply]
    rw [Preadditive.add_comp]
  comp_add _ _ _ f g g' := by
    

Proof state:
ι : Type u_1
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f✝ g✝ : C ⟶ D
h k : D ⟶ E
i : ι
x✝² x✝¹ x✝ : HomologicalComplex V c
f : x✝² ⟶ x✝¹
g g' : x✝¹ ⟶ x✝
⊢ f ≫ (g + g') = f ≫ g + f ≫ g'

Next tactic:
ext
instance : Preadditive (HomologicalComplex V c) where
  add_comp _ _ _ f f' g := by
    ext
    simp only [comp_f, add_f_apply]
    rw [Preadditive.add_comp]
  comp_add _ _ _ f g g' := by
    ext
    

Proof state:
case h
ι : Type u_1
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f✝ g✝ : C ⟶ D
h k : D ⟶ E
i : ι
x✝² x✝¹ x✝ : HomologicalComplex V c
f : x✝² ⟶ x✝¹
g g' : x✝¹ ⟶ x✝
i✝ : ι
⊢ Hom.f (f ≫ (g + g')) i✝ = Hom.f (f ≫ g + f ≫ g') i✝

Next tactic:
simp only [comp_f, add_f_apply]
instance : Preadditive (HomologicalComplex V c) where
  add_comp _ _ _ f f' g := by
    ext
    simp only [comp_f, add_f_apply]
    rw [Preadditive.add_comp]
  comp_add _ _ _ f g g' := by
    ext
    simp only [comp_f, add_f_apply]
    

Proof state:
case h
ι : Type u_1
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f✝ g✝ : C ⟶ D
h k : D ⟶ E
i : ι
x✝² x✝¹ x✝ : HomologicalComplex V c
f : x✝² ⟶ x✝¹
g g' : x✝¹ ⟶ x✝
i✝ : ι
⊢ Hom.f f i✝ ≫ (Hom.f g i✝ + Hom.f g' i✝) = Hom.f f i✝ ≫ Hom.f g i✝ + Hom.f f i✝ ≫ Hom.f g' i✝

Next tactic:
rw [Preadditive.comp_add]
instance homology_additive : (homology'Functor V c i).Additive where
  map_add {_ _ f g} := by
    

Proof state:
ι : Type u_1
V : Type u
inst✝⁵ : Category.{v, u} V
inst✝⁴ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f✝ g✝ : C ⟶ D
h k : D ⟶ E
i : ι
inst✝³ : HasImages V
inst✝² : HasImageMaps V
inst✝¹ : HasEqualizers V
inst✝ : HasCokernels V
x✝¹ x✝ : HomologicalComplex V c
f g : x✝¹ ⟶ x✝
⊢ (homology'Functor V c i).map (f + g) = (homology'Functor V c i).map f + (homology'Functor V c i).map g

Next tactic:
dsimp [homology'Functor]
instance homology_additive : (homology'Functor V c i).Additive where
  map_add {_ _ f g} := by
    dsimp [homology'Functor]
    

Proof state:
ι : Type u_1
V : Type u
inst✝⁵ : Category.{v, u} V
inst✝⁴ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f✝ g✝ : C ⟶ D
h k : D ⟶ E
i : ι
inst✝³ : HasImages V
inst✝² : HasImageMaps V
inst✝¹ : HasEqualizers V
inst✝ : HasCokernels V
x✝¹ x✝ : HomologicalComplex V c
f g : x✝¹ ⟶ x✝
⊢ homology'.map (_ : dTo x✝¹ i ≫ dFrom x✝¹ i = 0) (_ : dTo x✝ i ≫ dFrom x✝ i = 0) (Hom.sqTo (f + g) i)
      (Hom.sqFrom (f + g) i) (_ : (Hom.sqTo (f + g) i).right = (Hom.sqTo (f + g) i).right) =
    homology'.map (_ : dTo x✝¹ i ≫ dFrom x✝¹ i = 0) (_ : dTo x✝ i ≫ dFrom x✝ i = 0) (Hom.sqTo f i) (Hom.sqFrom f i)
        (_ : (Hom.sqTo f i).right = (Hom.sqTo f i).right) +
      homology'.map (_ : dTo x✝¹ i ≫ dFrom x✝¹ i = 0) (_ : dTo x✝ i ≫ dFrom x✝ i = 0) (Hom.sqTo g i) (Hom.sqFrom g i)
        (_ : (Hom.sqTo g i).right = (Hom.sqTo g i).right)

Next tactic:
ext
instance homology_additive : (homology'Functor V c i).Additive where
  map_add {_ _ f g} := by
    dsimp [homology'Functor]
    ext
    

Proof state:
case p
ι : Type u_1
V : Type u
inst✝⁵ : Category.{v, u} V
inst✝⁴ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f✝ g✝ : C ⟶ D
h k : D ⟶ E
i : ι
inst✝³ : HasImages V
inst✝² : HasImageMaps V
inst✝¹ : HasEqualizers V
inst✝ : HasCokernels V
x✝¹ x✝ : HomologicalComplex V c
f g : x✝¹ ⟶ x✝
⊢ homology'.π (dTo x✝¹ i) (dFrom x✝¹ i) (_ : dTo x✝¹ i ≫ dFrom x✝¹ i = 0) ≫
      homology'.map (_ : dTo x✝¹ i ≫ dFrom x✝¹ i = 0) (_ : dTo x✝ i ≫ dFrom x✝ i = 0) (Hom.sqTo (f + g) i)
        (Hom.sqFrom (f + g) i) (_ : (Hom.sqTo (f + g) i).right = (Hom.sqTo (f + g) i).right) =
    homology'.π (dTo x✝¹ i) (dFrom x✝¹ i) (_ : dTo x✝¹ i ≫ dFrom x✝¹ i = 0) ≫
      (homology'.map (_ : dTo x✝¹ i ≫ dFrom x✝¹ i = 0) (_ : dTo x✝ i ≫ dFrom x✝ i = 0) (Hom.sqTo f i) (Hom.sqFrom f i)
          (_ : (Hom.sqTo f i).right = (Hom.sqTo f i).right) +
        homology'.map (_ : dTo x✝¹ i ≫ dFrom x✝¹ i = 0) (_ : dTo x✝ i ≫ dFrom x✝ i = 0) (Hom.sqTo g i) (Hom.sqFrom g i)
          (_ : (Hom.sqTo g i).right = (Hom.sqTo g i).right))

Next tactic:
simp only [homology'.π_map, Preadditive.comp_add, ← Preadditive.add_comp]
instance homology_additive : (homology'Functor V c i).Additive where
  map_add {_ _ f g} := by
    dsimp [homology'Functor]
    ext
    simp only [homology'.π_map, Preadditive.comp_add, ← Preadditive.add_comp]
    

Proof state:
case p
ι : Type u_1
V : Type u
inst✝⁵ : Category.{v, u} V
inst✝⁴ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f✝ g✝ : C ⟶ D
h k : D ⟶ E
i : ι
inst✝³ : HasImages V
inst✝² : HasImageMaps V
inst✝¹ : HasEqualizers V
inst✝ : HasCokernels V
x✝¹ x✝ : HomologicalComplex V c
f g : x✝¹ ⟶ x✝
⊢ kernelSubobjectMap (Hom.sqFrom (f + g) i) ≫ homology'.π (dTo x✝ i) (dFrom x✝ i) (_ : dTo x✝ i ≫ dFrom x✝ i = 0) =
    (kernelSubobjectMap (Hom.sqFrom f i) + kernelSubobjectMap (Hom.sqFrom g i)) ≫
      homology'.π (dTo x✝ i) (dFrom x✝ i) (_ : dTo x✝ i ≫ dFrom x✝ i = 0)

Next tactic:
congr
instance homology_additive : (homology'Functor V c i).Additive where
  map_add {_ _ f g} := by
    dsimp [homology'Functor]
    ext
    simp only [homology'.π_map, Preadditive.comp_add, ← Preadditive.add_comp]
    congr
    

Proof state:
case p.e_a
ι : Type u_1
V : Type u
inst✝⁵ : Category.{v, u} V
inst✝⁴ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f✝ g✝ : C ⟶ D
h k : D ⟶ E
i : ι
inst✝³ : HasImages V
inst✝² : HasImageMaps V
inst✝¹ : HasEqualizers V
inst✝ : HasCokernels V
x✝¹ x✝ : HomologicalComplex V c
f g : x✝¹ ⟶ x✝
⊢ kernelSubobjectMap (Hom.sqFrom (f + g) i) = kernelSubobjectMap (Hom.sqFrom f i) + kernelSubobjectMap (Hom.sqFrom g i)

Next tactic:
ext
instance homology_additive : (homology'Functor V c i).Additive where
  map_add {_ _ f g} := by
    dsimp [homology'Functor]
    ext
    simp only [homology'.π_map, Preadditive.comp_add, ← Preadditive.add_comp]
    congr
    ext
    

Proof state:
case p.e_a.h
ι : Type u_1
V : Type u
inst✝⁵ : Category.{v, u} V
inst✝⁴ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f✝ g✝ : C ⟶ D
h k : D ⟶ E
i : ι
inst✝³ : HasImages V
inst✝² : HasImageMaps V
inst✝¹ : HasEqualizers V
inst✝ : HasCokernels V
x✝¹ x✝ : HomologicalComplex V c
f g : x✝¹ ⟶ x✝
⊢ kernelSubobjectMap (Hom.sqFrom (f + g) i) ≫ Subobject.arrow (kernelSubobject (dFrom x✝ i)) =
    (kernelSubobjectMap (Hom.sqFrom f i) + kernelSubobjectMap (Hom.sqFrom g i)) ≫
      Subobject.arrow (kernelSubobject (dFrom x✝ i))

Next tactic:
simp
/-- An additive functor induces a functor between homological complexes.
This is sometimes called the "prolongation".
-/
@[simps]
def Functor.mapHomologicalComplex (F : V ⥤ W) [F.Additive] (c : ComplexShape ι) :
    HomologicalComplex V c ⥤ HomologicalComplex W c where
  obj C :=
    { X := fun i => F.obj (C.X i)
      d := fun i j => F.map (C.d i j)
      shape := fun i j w => by
        

Proof state:
ι : Type u_1
V : Type u
inst✝⁴ : Category.{v, u} V
inst✝³ : Preadditive V
c✝ : ComplexShape ι
C✝ D E : HomologicalComplex V c✝
f g : C✝ ⟶ D
h k : D ⟶ E
i✝ : ι
W : Type u_2
inst✝² : Category.{?u.52932, u_2} W
inst✝¹ : Preadditive W
F : V ⥤ W
inst✝ : Additive F
c : ComplexShape ι
C : HomologicalComplex V c
i j : ι
w : ¬ComplexShape.Rel c i j
⊢ (fun i j => F.map (d C i j)) i j = 0

Next tactic:
dsimp only
/-- An additive functor induces a functor between homological complexes.
This is sometimes called the "prolongation".
-/
@[simps]
def Functor.mapHomologicalComplex (F : V ⥤ W) [F.Additive] (c : ComplexShape ι) :
    HomologicalComplex V c ⥤ HomologicalComplex W c where
  obj C :=
    { X := fun i => F.obj (C.X i)
      d := fun i j => F.map (C.d i j)
      shape := fun i j w => by
        dsimp only
        

Proof state:
ι : Type u_1
V : Type u
inst✝⁴ : Category.{v, u} V
inst✝³ : Preadditive V
c✝ : ComplexShape ι
C✝ D E : HomologicalComplex V c✝
f g : C✝ ⟶ D
h k : D ⟶ E
i✝ : ι
W : Type u_2
inst✝² : Category.{?u.52932, u_2} W
inst✝¹ : Preadditive W
F : V ⥤ W
inst✝ : Additive F
c : ComplexShape ι
C : HomologicalComplex V c
i j : ι
w : ¬ComplexShape.Rel c i j
⊢ F.map (d C i j) = 0

Next tactic:
rw [C.shape _ _ w, F.map_zero]
/-- An additive functor induces a functor between homological complexes.
This is sometimes called the "prolongation".
-/
@[simps]
def Functor.mapHomologicalComplex (F : V ⥤ W) [F.Additive] (c : ComplexShape ι) :
    HomologicalComplex V c ⥤ HomologicalComplex W c where
  obj C :=
    { X := fun i => F.obj (C.X i)
      d := fun i j => F.map (C.d i j)
      shape := fun i j w => by
        dsimp only
        rw [C.shape _ _ w, F.map_zero]
      d_comp_d' := fun i j k _ _ => by 

Proof state:
ι : Type u_1
V : Type u
inst✝⁴ : Category.{v, u} V
inst✝³ : Preadditive V
c✝ : ComplexShape ι
C✝ D E : HomologicalComplex V c✝
f g : C✝ ⟶ D
h k✝ : D ⟶ E
i✝ : ι
W : Type u_2
inst✝² : Category.{?u.52932, u_2} W
inst✝¹ : Preadditive W
F : V ⥤ W
inst✝ : Additive F
c : ComplexShape ι
C : HomologicalComplex V c
i j k : ι
x✝¹ : ComplexShape.Rel c i j
x✝ : ComplexShape.Rel c j k
⊢ (fun i j => F.map (d C i j)) i j ≫ (fun i j => F.map (d C i j)) j k = 0

Next tactic:
rw [← F.map_comp, C.d_comp_d, F.map_zero]
/-- An additive functor induces a functor between homological complexes.
This is sometimes called the "prolongation".
-/
@[simps]
def Functor.mapHomologicalComplex (F : V ⥤ W) [F.Additive] (c : ComplexShape ι) :
    HomologicalComplex V c ⥤ HomologicalComplex W c where
  obj C :=
    { X := fun i => F.obj (C.X i)
      d := fun i j => F.map (C.d i j)
      shape := fun i j w => by
        dsimp only
        rw [C.shape _ _ w, F.map_zero]
      d_comp_d' := fun i j k _ _ => by rw [← F.map_comp, C.d_comp_d, F.map_zero] }
  map f :=
    { f := fun i => F.map (f.f i)
      comm' := fun i j _ => by
        

Proof state:
ι : Type u_1
V : Type u
inst✝⁴ : Category.{v, u} V
inst✝³ : Preadditive V
c✝ : ComplexShape ι
C D E : HomologicalComplex V c✝
f✝ g : C ⟶ D
h k : D ⟶ E
i✝ : ι
W : Type u_2
inst✝² : Category.{?u.52932, u_2} W
inst✝¹ : Preadditive W
F : V ⥤ W
inst✝ : Additive F
c : ComplexShape ι
X✝ Y✝ : HomologicalComplex V c
f : X✝ ⟶ Y✝
i j : ι
x✝ : ComplexShape.Rel c i j
⊢ (fun i => F.map (Hom.f f i)) i ≫
      d ((fun C => HomologicalComplex.mk (fun i => F.obj (X C i)) fun i j => F.map (d C i j)) Y✝) i j =
    d ((fun C => HomologicalComplex.mk (fun i => F.obj (X C i)) fun i j => F.map (d C i j)) X✝) i j ≫
      (fun i => F.map (Hom.f f i)) j

Next tactic:
dsimp
/-- An additive functor induces a functor between homological complexes.
This is sometimes called the "prolongation".
-/
@[simps]
def Functor.mapHomologicalComplex (F : V ⥤ W) [F.Additive] (c : ComplexShape ι) :
    HomologicalComplex V c ⥤ HomologicalComplex W c where
  obj C :=
    { X := fun i => F.obj (C.X i)
      d := fun i j => F.map (C.d i j)
      shape := fun i j w => by
        dsimp only
        rw [C.shape _ _ w, F.map_zero]
      d_comp_d' := fun i j k _ _ => by rw [← F.map_comp, C.d_comp_d, F.map_zero] }
  map f :=
    { f := fun i => F.map (f.f i)
      comm' := fun i j _ => by
        dsimp
        

Proof state:
ι : Type u_1
V : Type u
inst✝⁴ : Category.{v, u} V
inst✝³ : Preadditive V
c✝ : ComplexShape ι
C D E : HomologicalComplex V c✝
f✝ g : C ⟶ D
h k : D ⟶ E
i✝ : ι
W : Type u_2
inst✝² : Category.{?u.52932, u_2} W
inst✝¹ : Preadditive W
F : V ⥤ W
inst✝ : Additive F
c : ComplexShape ι
X✝ Y✝ : HomologicalComplex V c
f : X✝ ⟶ Y✝
i j : ι
x✝ : ComplexShape.Rel c i j
⊢ F.map (Hom.f f i) ≫ F.map (d Y✝ i j) = F.map (d X✝ i j) ≫ F.map (Hom.f f j)

Next tactic:
rw [← F.map_comp, ← F.map_comp, f.comm]
instance Functor.mapHomologicalComplex_reflects_iso (F : V ⥤ W) [F.Additive]
    [ReflectsIsomorphisms F] (c : ComplexShape ι) :
    ReflectsIsomorphisms (F.mapHomologicalComplex c) :=
  ⟨fun f => by
    

Proof state:
ι : Type u_1
V : Type u
inst✝⁵ : Category.{v, u} V
inst✝⁴ : Preadditive V
c✝ : ComplexShape ι
C D E : HomologicalComplex V c✝
f✝ g : C ⟶ D
h k : D ⟶ E
i : ι
W : Type u_2
inst✝³ : Category.{?u.89708, u_2} W
inst✝² : Preadditive W
F : V ⥤ W
inst✝¹ : Additive F
inst✝ : ReflectsIsomorphisms F
c : ComplexShape ι
A✝ B✝ : HomologicalComplex V c
f : A✝ ⟶ B✝
⊢ ∀ [inst : IsIso ((mapHomologicalComplex F c).map f)], IsIso f

Next tactic:
intro
instance Functor.mapHomologicalComplex_reflects_iso (F : V ⥤ W) [F.Additive]
    [ReflectsIsomorphisms F] (c : ComplexShape ι) :
    ReflectsIsomorphisms (F.mapHomologicalComplex c) :=
  ⟨fun f => by
    intro
    

Proof state:
ι : Type u_1
V : Type u
inst✝⁶ : Category.{v, u} V
inst✝⁵ : Preadditive V
c✝ : ComplexShape ι
C D E : HomologicalComplex V c✝
f✝ g : C ⟶ D
h k : D ⟶ E
i : ι
W : Type u_2
inst✝⁴ : Category.{?u.89708, u_2} W
inst✝³ : Preadditive W
F : V ⥤ W
inst✝² : Additive F
inst✝¹ : ReflectsIsomorphisms F
c : ComplexShape ι
A✝ B✝ : HomologicalComplex V c
f : A✝ ⟶ B✝
inst✝ : IsIso ((mapHomologicalComplex F c).map f)
⊢ IsIso f

Next tactic:
haveI : ∀ n : ι, IsIso (F.map (f.f n)) := fun n =>
      IsIso.of_iso
        ((HomologicalComplex.eval W c n).mapIso (asIso ((F.mapHomologicalComplex c).map f)))
instance Functor.mapHomologicalComplex_reflects_iso (F : V ⥤ W) [F.Additive]
    [ReflectsIsomorphisms F] (c : ComplexShape ι) :
    ReflectsIsomorphisms (F.mapHomologicalComplex c) :=
  ⟨fun f => by
    intro
    haveI : ∀ n : ι, IsIso (F.map (f.f n)) := fun n =>
      IsIso.of_iso
        ((HomologicalComplex.eval W c n).mapIso (asIso ((F.mapHomologicalComplex c).map f)))
    

Proof state:
ι : Type u_1
V : Type u
inst✝⁶ : Category.{v, u} V
inst✝⁵ : Preadditive V
c✝ : ComplexShape ι
C D E : HomologicalComplex V c✝
f✝ g : C ⟶ D
h k : D ⟶ E
i : ι
W : Type u_2
inst✝⁴ : Category.{?u.89708, u_2} W
inst✝³ : Preadditive W
F : V ⥤ W
inst✝² : Additive F
inst✝¹ : ReflectsIsomorphisms F
c : ComplexShape ι
A✝ B✝ : HomologicalComplex V c
f : A✝ ⟶ B✝
inst✝ : IsIso ((mapHomologicalComplex F c).map f)
this : ∀ (n : ι), IsIso (F.map (Hom.f f n))
⊢ IsIso f

Next tactic:
haveI := fun n => isIso_of_reflects_iso (f.f n) F
instance Functor.mapHomologicalComplex_reflects_iso (F : V ⥤ W) [F.Additive]
    [ReflectsIsomorphisms F] (c : ComplexShape ι) :
    ReflectsIsomorphisms (F.mapHomologicalComplex c) :=
  ⟨fun f => by
    intro
    haveI : ∀ n : ι, IsIso (F.map (f.f n)) := fun n =>
      IsIso.of_iso
        ((HomologicalComplex.eval W c n).mapIso (asIso ((F.mapHomologicalComplex c).map f)))
    haveI := fun n => isIso_of_reflects_iso (f.f n) F
    

Proof state:
ι : Type u_1
V : Type u
inst✝⁶ : Category.{v, u} V
inst✝⁵ : Preadditive V
c✝ : ComplexShape ι
C D E : HomologicalComplex V c✝
f✝ g : C ⟶ D
h k : D ⟶ E
i : ι
W : Type u_2
inst✝⁴ : Category.{?u.89708, u_2} W
inst✝³ : Preadditive W
F : V ⥤ W
inst✝² : Additive F
inst✝¹ : ReflectsIsomorphisms F
c : ComplexShape ι
A✝ B✝ : HomologicalComplex V c
f : A✝ ⟶ B✝
inst✝ : IsIso ((mapHomologicalComplex F c).map f)
this✝ : ∀ (n : ι), IsIso (F.map (Hom.f f n))
this : ∀ (n : ι), IsIso (Hom.f f n)
⊢ IsIso f

Next tactic:
exact HomologicalComplex.Hom.isIso_of_components f
@[simp]
theorem NatTrans.mapHomologicalComplex_id (c : ComplexShape ι) (F : V ⥤ W) [F.Additive] :
    NatTrans.mapHomologicalComplex (𝟙 F) c = 𝟙 (F.mapHomologicalComplex c) := by 

Proof state:
ι : Type u_1
V : Type u
inst✝⁴ : Category.{v, u} V
inst✝³ : Preadditive V
c✝ : ComplexShape ι
C D E : HomologicalComplex V c✝
f g : C ⟶ D
h k : D ⟶ E
i : ι
W : Type u_2
inst✝² : Category.{u_3, u_2} W
inst✝¹ : Preadditive W
c : ComplexShape ι
F : V ⥤ W
inst✝ : Functor.Additive F
⊢ mapHomologicalComplex (𝟙 F) c = 𝟙 (Functor.mapHomologicalComplex F c)

Next tactic:
aesop_cat
@[simp]
theorem NatTrans.mapHomologicalComplex_comp (c : ComplexShape ι) {F G H : V ⥤ W} [F.Additive]
    [G.Additive] [H.Additive] (α : F ⟶ G) (β : G ⟶ H) :
    NatTrans.mapHomologicalComplex (α ≫ β) c =
      NatTrans.mapHomologicalComplex α c ≫ NatTrans.mapHomologicalComplex β c :=
  by 

Proof state:
ι : Type u_1
V : Type u
inst✝⁶ : Category.{v, u} V
inst✝⁵ : Preadditive V
c✝ : ComplexShape ι
C D E : HomologicalComplex V c✝
f g : C ⟶ D
h k : D ⟶ E
i : ι
W : Type u_2
inst✝⁴ : Category.{u_3, u_2} W
inst✝³ : Preadditive W
c : ComplexShape ι
F G H : V ⥤ W
inst✝² : Functor.Additive F
inst✝¹ : Functor.Additive G
inst✝ : Functor.Additive H
α : F ⟶ G
β : G ⟶ H
⊢ mapHomologicalComplex (α ≫ β) c = mapHomologicalComplex α c ≫ mapHomologicalComplex β c

Next tactic:
aesop_cat
@[reassoc (attr := simp 1100)]
theorem NatTrans.mapHomologicalComplex_naturality {c : ComplexShape ι} {F G : V ⥤ W} [F.Additive]
    [G.Additive] (α : F ⟶ G) {C D : HomologicalComplex V c} (f : C ⟶ D) :
    (F.mapHomologicalComplex c).map f ≫ (NatTrans.mapHomologicalComplex α c).app D =
      (NatTrans.mapHomologicalComplex α c).app C ≫ (G.mapHomologicalComplex c).map f :=
  by 

Proof state:
ι : Type u_1
V : Type u
inst✝⁵ : Category.{v, u} V
inst✝⁴ : Preadditive V
c✝ : ComplexShape ι
C✝ D✝ E : HomologicalComplex V c✝
f✝ g : C✝ ⟶ D✝
h k : D✝ ⟶ E
i : ι
W : Type u_2
inst✝³ : Category.{u_3, u_2} W
inst✝² : Preadditive W
c : ComplexShape ι
F G : V ⥤ W
inst✝¹ : Functor.Additive F
inst✝ : Functor.Additive G
α : F ⟶ G
C D : HomologicalComplex V c
f : C ⟶ D
⊢ (Functor.mapHomologicalComplex F c).map f ≫ (mapHomologicalComplex α c).app D =
    (mapHomologicalComplex α c).app C ≫ (Functor.mapHomologicalComplex G c).map f

Next tactic:
aesop_cat
/-- A natural isomorphism between functors induces a natural isomorphism
between those functors applied to homological complexes.
-/
@[simps!]
def NatIso.mapHomologicalComplex {F G : V ⥤ W} [F.Additive] [G.Additive] (α : F ≅ G)
    (c : ComplexShape ι) : F.mapHomologicalComplex c ≅ G.mapHomologicalComplex c where
  hom := NatTrans.mapHomologicalComplex α.hom c
  inv := NatTrans.mapHomologicalComplex α.inv c
  hom_inv_id := by 

Proof state:
ι : Type u_1
V : Type u
inst✝⁵ : Category.{v, u} V
inst✝⁴ : Preadditive V
c✝ : ComplexShape ι
C D E : HomologicalComplex V c✝
f g : C ⟶ D
h k : D ⟶ E
i : ι
W : Type u_2
inst✝³ : Category.{?u.105270, u_2} W
inst✝² : Preadditive W
F G : V ⥤ W
inst✝¹ : Functor.Additive F
inst✝ : Functor.Additive G
α : F ≅ G
c : ComplexShape ι
⊢ NatTrans.mapHomologicalComplex α.hom c ≫ NatTrans.mapHomologicalComplex α.inv c =
    𝟙 (Functor.mapHomologicalComplex F c)

Next tactic:
simp only [← NatTrans.mapHomologicalComplex_comp, α.hom_inv_id,
    NatTrans.mapHomologicalComplex_id]
/-- A natural isomorphism between functors induces a natural isomorphism
between those functors applied to homological complexes.
-/
@[simps!]
def NatIso.mapHomologicalComplex {F G : V ⥤ W} [F.Additive] [G.Additive] (α : F ≅ G)
    (c : ComplexShape ι) : F.mapHomologicalComplex c ≅ G.mapHomologicalComplex c where
  hom := NatTrans.mapHomologicalComplex α.hom c
  inv := NatTrans.mapHomologicalComplex α.inv c
  hom_inv_id := by simp only [← NatTrans.mapHomologicalComplex_comp, α.hom_inv_id,
    NatTrans.mapHomologicalComplex_id]
  inv_hom_id := by 

Proof state:
ι : Type u_1
V : Type u
inst✝⁵ : Category.{v, u} V
inst✝⁴ : Preadditive V
c✝ : ComplexShape ι
C D E : HomologicalComplex V c✝
f g : C ⟶ D
h k : D ⟶ E
i : ι
W : Type u_2
inst✝³ : Category.{?u.105270, u_2} W
inst✝² : Preadditive W
F G : V ⥤ W
inst✝¹ : Functor.Additive F
inst✝ : Functor.Additive G
α : F ≅ G
c : ComplexShape ι
⊢ NatTrans.mapHomologicalComplex α.inv c ≫ NatTrans.mapHomologicalComplex α.hom c =
    𝟙 (Functor.mapHomologicalComplex G c)

Next tactic:
simp only [← NatTrans.mapHomologicalComplex_comp, α.inv_hom_id,
    NatTrans.mapHomologicalComplex_id]
theorem map_chain_complex_of (F : V ⥤ W) [F.Additive] (X : α → V) (d : ∀ n, X (n + 1) ⟶ X n)
    (sq : ∀ n, d (n + 1) ≫ d n = 0) :
    (F.mapHomologicalComplex _).obj (ChainComplex.of X d sq) =
      ChainComplex.of (fun n => F.obj (X n)) (fun n => F.map (d n)) fun n => by
        

Proof state:
ι : Type u_1
V : Type u
inst✝⁷ : Category.{v, u} V
inst✝⁶ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g : C ⟶ D
h k : D ⟶ E
i : ι
W : Type u_2
inst✝⁵ : Category.{?u.118608, u_2} W
inst✝⁴ : Preadditive W
α : Type u_3
inst✝³ : AddRightCancelSemigroup α
inst✝² : One α
inst✝¹ : DecidableEq α
F : V ⥤ W
inst✝ : Functor.Additive F
X : α → V
d : (n : α) → X (n + 1) ⟶ X n
sq : ∀ (n : α), d (n + 1) ≫ d n = 0
n : α
⊢ (fun n => F.map (d n)) (n + 1) ≫ (fun n => F.map (d n)) n = 0

Next tactic:
rw [← F.map_comp, sq n, Functor.map_zero]
theorem map_chain_complex_of (F : V ⥤ W) [F.Additive] (X : α → V) (d : ∀ n, X (n + 1) ⟶ X n)
    (sq : ∀ n, d (n + 1) ≫ d n = 0) :
    (F.mapHomologicalComplex _).obj (ChainComplex.of X d sq) =
      ChainComplex.of (fun n => F.obj (X n)) (fun n => F.map (d n)) fun n => by
        rw [← F.map_comp, sq n, Functor.map_zero] := by
  

Proof state:
ι : Type u_1
V : Type u
inst✝⁷ : Category.{v, u} V
inst✝⁶ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g : C ⟶ D
h k : D ⟶ E
i : ι
W : Type u_2
inst✝⁵ : Category.{u_4, u_2} W
inst✝⁴ : Preadditive W
α : Type u_3
inst✝³ : AddRightCancelSemigroup α
inst✝² : One α
inst✝¹ : DecidableEq α
F : V ⥤ W
inst✝ : Functor.Additive F
X : α → V
d : (n : α) → X (n + 1) ⟶ X n
sq : ∀ (n : α), d (n + 1) ≫ d n = 0
⊢ (Functor.mapHomologicalComplex F (ComplexShape.down α)).obj (of X d sq) =
    of (fun n => F.obj (X n)) (fun n => F.map (d n))
      (_ : ∀ (n : α), (fun n => F.map (d n)) (n + 1) ≫ (fun n => F.map (d n)) n = 0)

Next tactic:
refine' HomologicalComplex.ext rfl _