l3lab/ntp-mathlib huggingface dataset:
/-- A cone in `HomologicalComplex C c` is limit if the induced cones obtained
by applying `eval C c i : HomologicalComplex C c ⥤ C` for all `i` are limit. -/
def isLimitOfEval (s : Cone F)
    (hs : ∀ (i : ι), IsLimit ((eval C c i).mapCone s)) : IsLimit s where
  lift t :=
    { f := fun i => (hs i).lift ((eval C c i).mapCone t)
      comm' := fun i i' _ => by
        apply IsLimit.hom_ext (hs i')
        

Proof state:
C : Type u_1
ι : Type u_2
J : Type u_3
inst✝² : Category.{?u.152, u_1} C
inst✝¹ : Category.{?u.156, u_3} J
c : ComplexShape ι
inst✝ : HasZeroMorphisms C
F : J ⥤ HomologicalComplex C c
s : Cone F
hs : (i : ι) → IsLimit ((eval C c i).mapCone s)
t : Cone F
i i' : ι
x✝ : ComplexShape.Rel c i i'
⊢ ∀ (j : J),
    ((fun i => IsLimit.lift (hs i) ((eval C c i).mapCone t)) i ≫ d s.pt i i') ≫ ((eval C c i').mapCone s).π.app j =
      (d t.pt i i' ≫ (fun i => IsLimit.lift (hs i) ((eval C c i).mapCone t)) i') ≫ ((eval C c i').mapCone s).π.app j

Next tactic:
intro j
/-- A cone in `HomologicalComplex C c` is limit if the induced cones obtained
by applying `eval C c i : HomologicalComplex C c ⥤ C` for all `i` are limit. -/
def isLimitOfEval (s : Cone F)
    (hs : ∀ (i : ι), IsLimit ((eval C c i).mapCone s)) : IsLimit s where
  lift t :=
    { f := fun i => (hs i).lift ((eval C c i).mapCone t)
      comm' := fun i i' _ => by
        apply IsLimit.hom_ext (hs i')
        intro j
        

Proof state:
C : Type u_1
ι : Type u_2
J : Type u_3
inst✝² : Category.{?u.152, u_1} C
inst✝¹ : Category.{?u.156, u_3} J
c : ComplexShape ι
inst✝ : HasZeroMorphisms C
F : J ⥤ HomologicalComplex C c
s : Cone F
hs : (i : ι) → IsLimit ((eval C c i).mapCone s)
t : Cone F
i i' : ι
x✝ : ComplexShape.Rel c i i'
j : J
⊢ ((fun i => IsLimit.lift (hs i) ((eval C c i).mapCone t)) i ≫ d s.pt i i') ≫ ((eval C c i').mapCone s).π.app j =
    (d t.pt i i' ≫ (fun i => IsLimit.lift (hs i) ((eval C c i).mapCone t)) i') ≫ ((eval C c i').mapCone s).π.app j

Next tactic:
have eq := fun k => (hs k).fac ((eval C c k).mapCone t)
/-- A cone in `HomologicalComplex C c` is limit if the induced cones obtained
by applying `eval C c i : HomologicalComplex C c ⥤ C` for all `i` are limit. -/
def isLimitOfEval (s : Cone F)
    (hs : ∀ (i : ι), IsLimit ((eval C c i).mapCone s)) : IsLimit s where
  lift t :=
    { f := fun i => (hs i).lift ((eval C c i).mapCone t)
      comm' := fun i i' _ => by
        apply IsLimit.hom_ext (hs i')
        intro j
        have eq := fun k => (hs k).fac ((eval C c k).mapCone t)
        

Proof state:
C : Type u_1
ι : Type u_2
J : Type u_3
inst✝² : Category.{?u.152, u_1} C
inst✝¹ : Category.{?u.156, u_3} J
c : ComplexShape ι
inst✝ : HasZeroMorphisms C
F : J ⥤ HomologicalComplex C c
s : Cone F
hs : (i : ι) → IsLimit ((eval C c i).mapCone s)
t : Cone F
i i' : ι
x✝ : ComplexShape.Rel c i i'
j : J
eq :
  ∀ (k : ι) (j : J),
    IsLimit.lift (hs k) ((eval C c k).mapCone t) ≫ ((eval C c k).mapCone s).π.app j = ((eval C c k).mapCone t).π.app j
⊢ ((fun i => IsLimit.lift (hs i) ((eval C c i).mapCone t)) i ≫ d s.pt i i') ≫ ((eval C c i').mapCone s).π.app j =
    (d t.pt i i' ≫ (fun i => IsLimit.lift (hs i) ((eval C c i).mapCone t)) i') ≫ ((eval C c i').mapCone s).π.app j

Next tactic:
simp only [Functor.mapCone_π_app, eval_map] at eq
/-- A cone in `HomologicalComplex C c` is limit if the induced cones obtained
by applying `eval C c i : HomologicalComplex C c ⥤ C` for all `i` are limit. -/
def isLimitOfEval (s : Cone F)
    (hs : ∀ (i : ι), IsLimit ((eval C c i).mapCone s)) : IsLimit s where
  lift t :=
    { f := fun i => (hs i).lift ((eval C c i).mapCone t)
      comm' := fun i i' _ => by
        apply IsLimit.hom_ext (hs i')
        intro j
        have eq := fun k => (hs k).fac ((eval C c k).mapCone t)
        simp only [Functor.mapCone_π_app, eval_map] at eq
        

Proof state:
C : Type u_1
ι : Type u_2
J : Type u_3
inst✝² : Category.{?u.152, u_1} C
inst✝¹ : Category.{?u.156, u_3} J
c : ComplexShape ι
inst✝ : HasZeroMorphisms C
F : J ⥤ HomologicalComplex C c
s : Cone F
hs : (i : ι) → IsLimit ((eval C c i).mapCone s)
t : Cone F
i i' : ι
x✝ : ComplexShape.Rel c i i'
j : J
eq : ∀ (k : ι) (j : J), IsLimit.lift (hs k) ((eval C c k).mapCone t) ≫ Hom.f (s.π.app j) k = Hom.f (t.π.app j) k
⊢ ((fun i => IsLimit.lift (hs i) ((eval C c i).mapCone t)) i ≫ d s.pt i i') ≫ ((eval C c i').mapCone s).π.app j =
    (d t.pt i i' ≫ (fun i => IsLimit.lift (hs i) ((eval C c i).mapCone t)) i') ≫ ((eval C c i').mapCone s).π.app j

Next tactic:
simp only [Functor.mapCone_π_app, eval_map, assoc]
/-- A cone in `HomologicalComplex C c` is limit if the induced cones obtained
by applying `eval C c i : HomologicalComplex C c ⥤ C` for all `i` are limit. -/
def isLimitOfEval (s : Cone F)
    (hs : ∀ (i : ι), IsLimit ((eval C c i).mapCone s)) : IsLimit s where
  lift t :=
    { f := fun i => (hs i).lift ((eval C c i).mapCone t)
      comm' := fun i i' _ => by
        apply IsLimit.hom_ext (hs i')
        intro j
        have eq := fun k => (hs k).fac ((eval C c k).mapCone t)
        simp only [Functor.mapCone_π_app, eval_map] at eq
        simp only [Functor.mapCone_π_app, eval_map, assoc]
        

Proof state:
C : Type u_1
ι : Type u_2
J : Type u_3
inst✝² : Category.{?u.152, u_1} C
inst✝¹ : Category.{?u.156, u_3} J
c : ComplexShape ι
inst✝ : HasZeroMorphisms C
F : J ⥤ HomologicalComplex C c
s : Cone F
hs : (i : ι) → IsLimit ((eval C c i).mapCone s)
t : Cone F
i i' : ι
x✝ : ComplexShape.Rel c i i'
j : J
eq : ∀ (k : ι) (j : J), IsLimit.lift (hs k) ((eval C c k).mapCone t) ≫ Hom.f (s.π.app j) k = Hom.f (t.π.app j) k
⊢ IsLimit.lift (hs i) ((eval C c i).mapCone t) ≫ d s.pt i i' ≫ Hom.f (s.π.app j) i' =
    d t.pt i i' ≫ IsLimit.lift (hs i') ((eval C c i').mapCone t) ≫ Hom.f (s.π.app j) i'

Next tactic:
rw [eq i', ← Hom.comm, reassoc_of% (eq i), Hom.comm]
/-- A cone in `HomologicalComplex C c` is limit if the induced cones obtained
by applying `eval C c i : HomologicalComplex C c ⥤ C` for all `i` are limit. -/
def isLimitOfEval (s : Cone F)
    (hs : ∀ (i : ι), IsLimit ((eval C c i).mapCone s)) : IsLimit s where
  lift t :=
    { f := fun i => (hs i).lift ((eval C c i).mapCone t)
      comm' := fun i i' _ => by
        apply IsLimit.hom_ext (hs i')
        intro j
        have eq := fun k => (hs k).fac ((eval C c k).mapCone t)
        simp only [Functor.mapCone_π_app, eval_map] at eq
        simp only [Functor.mapCone_π_app, eval_map, assoc]
        rw [eq i', ← Hom.comm, reassoc_of% (eq i), Hom.comm] }
  fac t j := by
    

Proof state:
C : Type u_1
ι : Type u_2
J : Type u_3
inst✝² : Category.{?u.152, u_1} C
inst✝¹ : Category.{?u.156, u_3} J
c : ComplexShape ι
inst✝ : HasZeroMorphisms C
F : J ⥤ HomologicalComplex C c
s : Cone F
hs : (i : ι) → IsLimit ((eval C c i).mapCone s)
t : Cone F
j : J
⊢ (fun t => Hom.mk fun i => IsLimit.lift (hs i) ((eval C c i).mapCone t)) t ≫ s.π.app j = t.π.app j

Next tactic:
ext i
/-- A cone in `HomologicalComplex C c` is limit if the induced cones obtained
by applying `eval C c i : HomologicalComplex C c ⥤ C` for all `i` are limit. -/
def isLimitOfEval (s : Cone F)
    (hs : ∀ (i : ι), IsLimit ((eval C c i).mapCone s)) : IsLimit s where
  lift t :=
    { f := fun i => (hs i).lift ((eval C c i).mapCone t)
      comm' := fun i i' _ => by
        apply IsLimit.hom_ext (hs i')
        intro j
        have eq := fun k => (hs k).fac ((eval C c k).mapCone t)
        simp only [Functor.mapCone_π_app, eval_map] at eq
        simp only [Functor.mapCone_π_app, eval_map, assoc]
        rw [eq i', ← Hom.comm, reassoc_of% (eq i), Hom.comm] }
  fac t j := by
    ext i
    

Proof state:
case h
C : Type u_1
ι : Type u_2
J : Type u_3
inst✝² : Category.{?u.152, u_1} C
inst✝¹ : Category.{?u.156, u_3} J
c : ComplexShape ι
inst✝ : HasZeroMorphisms C
F : J ⥤ HomologicalComplex C c
s : Cone F
hs : (i : ι) → IsLimit ((eval C c i).mapCone s)
t : Cone F
j : J
i : ι
⊢ Hom.f ((fun t => Hom.mk fun i => IsLimit.lift (hs i) ((eval C c i).mapCone t)) t ≫ s.π.app j) i = Hom.f (t.π.app j) i

Next tactic:
apply (hs i).fac
/-- A cone in `HomologicalComplex C c` is limit if the induced cones obtained
by applying `eval C c i : HomologicalComplex C c ⥤ C` for all `i` are limit. -/
def isLimitOfEval (s : Cone F)
    (hs : ∀ (i : ι), IsLimit ((eval C c i).mapCone s)) : IsLimit s where
  lift t :=
    { f := fun i => (hs i).lift ((eval C c i).mapCone t)
      comm' := fun i i' _ => by
        apply IsLimit.hom_ext (hs i')
        intro j
        have eq := fun k => (hs k).fac ((eval C c k).mapCone t)
        simp only [Functor.mapCone_π_app, eval_map] at eq
        simp only [Functor.mapCone_π_app, eval_map, assoc]
        rw [eq i', ← Hom.comm, reassoc_of% (eq i), Hom.comm] }
  fac t j := by
    ext i
    apply (hs i).fac
  uniq t m hm := by
    

Proof state:
C : Type u_1
ι : Type u_2
J : Type u_3
inst✝² : Category.{?u.152, u_1} C
inst✝¹ : Category.{?u.156, u_3} J
c : ComplexShape ι
inst✝ : HasZeroMorphisms C
F : J ⥤ HomologicalComplex C c
s : Cone F
hs : (i : ι) → IsLimit ((eval C c i).mapCone s)
t : Cone F
m : t.pt ⟶ s.pt
hm : ∀ (j : J), m ≫ s.π.app j = t.π.app j
⊢ m = (fun t => Hom.mk fun i => IsLimit.lift (hs i) ((eval C c i).mapCone t)) t

Next tactic:
ext i
/-- A cone in `HomologicalComplex C c` is limit if the induced cones obtained
by applying `eval C c i : HomologicalComplex C c ⥤ C` for all `i` are limit. -/
def isLimitOfEval (s : Cone F)
    (hs : ∀ (i : ι), IsLimit ((eval C c i).mapCone s)) : IsLimit s where
  lift t :=
    { f := fun i => (hs i).lift ((eval C c i).mapCone t)
      comm' := fun i i' _ => by
        apply IsLimit.hom_ext (hs i')
        intro j
        have eq := fun k => (hs k).fac ((eval C c k).mapCone t)
        simp only [Functor.mapCone_π_app, eval_map] at eq
        simp only [Functor.mapCone_π_app, eval_map, assoc]
        rw [eq i', ← Hom.comm, reassoc_of% (eq i), Hom.comm] }
  fac t j := by
    ext i
    apply (hs i).fac
  uniq t m hm := by
    ext i
    

Proof state:
case h
C : Type u_1
ι : Type u_2
J : Type u_3
inst✝² : Category.{?u.152, u_1} C
inst✝¹ : Category.{?u.156, u_3} J
c : ComplexShape ι
inst✝ : HasZeroMorphisms C
F : J ⥤ HomologicalComplex C c
s : Cone F
hs : (i : ι) → IsLimit ((eval C c i).mapCone s)
t : Cone F
m : t.pt ⟶ s.pt
hm : ∀ (j : J), m ≫ s.π.app j = t.π.app j
i : ι
⊢ Hom.f m i = Hom.f ((fun t => Hom.mk fun i => IsLimit.lift (hs i) ((eval C c i).mapCone t)) t) i

Next tactic:
apply (hs i).uniq ((eval C c i).mapCone t)
/-- A cone in `HomologicalComplex C c` is limit if the induced cones obtained
by applying `eval C c i : HomologicalComplex C c ⥤ C` for all `i` are limit. -/
def isLimitOfEval (s : Cone F)
    (hs : ∀ (i : ι), IsLimit ((eval C c i).mapCone s)) : IsLimit s where
  lift t :=
    { f := fun i => (hs i).lift ((eval C c i).mapCone t)
      comm' := fun i i' _ => by
        apply IsLimit.hom_ext (hs i')
        intro j
        have eq := fun k => (hs k).fac ((eval C c k).mapCone t)
        simp only [Functor.mapCone_π_app, eval_map] at eq
        simp only [Functor.mapCone_π_app, eval_map, assoc]
        rw [eq i', ← Hom.comm, reassoc_of% (eq i), Hom.comm] }
  fac t j := by
    ext i
    apply (hs i).fac
  uniq t m hm := by
    ext i
    apply (hs i).uniq ((eval C c i).mapCone t)
    

Proof state:
case h.x
C : Type u_1
ι : Type u_2
J : Type u_3
inst✝² : Category.{?u.152, u_1} C
inst✝¹ : Category.{?u.156, u_3} J
c : ComplexShape ι
inst✝ : HasZeroMorphisms C
F : J ⥤ HomologicalComplex C c
s : Cone F
hs : (i : ι) → IsLimit ((eval C c i).mapCone s)
t : Cone F
m : t.pt ⟶ s.pt
hm : ∀ (j : J), m ≫ s.π.app j = t.π.app j
i : ι
⊢ ∀ (j : J), Hom.f m i ≫ ((eval C c i).mapCone s).π.app j = ((eval C c i).mapCone t).π.app j

Next tactic:
intro j
/-- A cone in `HomologicalComplex C c` is limit if the induced cones obtained
by applying `eval C c i : HomologicalComplex C c ⥤ C` for all `i` are limit. -/
def isLimitOfEval (s : Cone F)
    (hs : ∀ (i : ι), IsLimit ((eval C c i).mapCone s)) : IsLimit s where
  lift t :=
    { f := fun i => (hs i).lift ((eval C c i).mapCone t)
      comm' := fun i i' _ => by
        apply IsLimit.hom_ext (hs i')
        intro j
        have eq := fun k => (hs k).fac ((eval C c k).mapCone t)
        simp only [Functor.mapCone_π_app, eval_map] at eq
        simp only [Functor.mapCone_π_app, eval_map, assoc]
        rw [eq i', ← Hom.comm, reassoc_of% (eq i), Hom.comm] }
  fac t j := by
    ext i
    apply (hs i).fac
  uniq t m hm := by
    ext i
    apply (hs i).uniq ((eval C c i).mapCone t)
    intro j
    

Proof state:
case h.x
C : Type u_1
ι : Type u_2
J : Type u_3
inst✝² : Category.{?u.152, u_1} C
inst✝¹ : Category.{?u.156, u_3} J
c : ComplexShape ι
inst✝ : HasZeroMorphisms C
F : J ⥤ HomologicalComplex C c
s : Cone F
hs : (i : ι) → IsLimit ((eval C c i).mapCone s)
t : Cone F
m : t.pt ⟶ s.pt
hm : ∀ (j : J), m ≫ s.π.app j = t.π.app j
i : ι
j : J
⊢ Hom.f m i ≫ ((eval C c i).mapCone s).π.app j = ((eval C c i).mapCone t).π.app j

Next tactic:
dsimp
/-- A cone in `HomologicalComplex C c` is limit if the induced cones obtained
by applying `eval C c i : HomologicalComplex C c ⥤ C` for all `i` are limit. -/
def isLimitOfEval (s : Cone F)
    (hs : ∀ (i : ι), IsLimit ((eval C c i).mapCone s)) : IsLimit s where
  lift t :=
    { f := fun i => (hs i).lift ((eval C c i).mapCone t)
      comm' := fun i i' _ => by
        apply IsLimit.hom_ext (hs i')
        intro j
        have eq := fun k => (hs k).fac ((eval C c k).mapCone t)
        simp only [Functor.mapCone_π_app, eval_map] at eq
        simp only [Functor.mapCone_π_app, eval_map, assoc]
        rw [eq i', ← Hom.comm, reassoc_of% (eq i), Hom.comm] }
  fac t j := by
    ext i
    apply (hs i).fac
  uniq t m hm := by
    ext i
    apply (hs i).uniq ((eval C c i).mapCone t)
    intro j
    dsimp
    

Proof state:
case h.x
C : Type u_1
ι : Type u_2
J : Type u_3
inst✝² : Category.{?u.152, u_1} C
inst✝¹ : Category.{?u.156, u_3} J
c : ComplexShape ι
inst✝ : HasZeroMorphisms C
F : J ⥤ HomologicalComplex C c
s : Cone F
hs : (i : ι) → IsLimit ((eval C c i).mapCone s)
t : Cone F
m : t.pt ⟶ s.pt
hm : ∀ (j : J), m ≫ s.π.app j = t.π.app j
i : ι
j : J
⊢ Hom.f m i ≫ Hom.f (s.π.app j) i = Hom.f (t.π.app j) i

Next tactic:
simp only [← comp_f, hm]
/-- A cone for a functor `F : J ⥤ HomologicalComplex C c` which is given in degree `n` by
the limit `F ⋙ eval C c n`. -/
@[simps]
noncomputable def coneOfHasLimitEval : Cone F where
  pt :=
    { X := fun n => limit (F ⋙ eval C c n)
      d := fun n m => limMap { app := fun j => (F.obj j).d n m }
      shape := fun {n m} h => by
        

Proof state:
C : Type u_1
ι : Type u_2
J : Type u_3
inst✝³ : Category.{?u.5993, u_1} C
inst✝² : Category.{?u.5997, u_3} J
c : ComplexShape ι
inst✝¹ : HasZeroMorphisms C
F : J ⥤ HomologicalComplex C c
inst✝ : ∀ (n : ι), HasLimit (F ⋙ eval C c n)
n m : ι
h : ¬ComplexShape.Rel c n m
⊢ (fun n m => limMap (NatTrans.mk fun j => d (F.obj j) n m)) n m = 0

Next tactic:
ext j
/-- A cone for a functor `F : J ⥤ HomologicalComplex C c` which is given in degree `n` by
the limit `F ⋙ eval C c n`. -/
@[simps]
noncomputable def coneOfHasLimitEval : Cone F where
  pt :=
    { X := fun n => limit (F ⋙ eval C c n)
      d := fun n m => limMap { app := fun j => (F.obj j).d n m }
      shape := fun {n m} h => by
        ext j
        

Proof state:
case w
C : Type u_1
ι : Type u_2
J : Type u_3
inst✝³ : Category.{?u.5993, u_1} C
inst✝² : Category.{?u.5997, u_3} J
c : ComplexShape ι
inst✝¹ : HasZeroMorphisms C
F : J ⥤ HomologicalComplex C c
inst✝ : ∀ (n : ι), HasLimit (F ⋙ eval C c n)
n m : ι
h : ¬ComplexShape.Rel c n m
j : J
⊢ (fun n m => limMap (NatTrans.mk fun j => d (F.obj j) n m)) n m ≫ limit.π (F ⋙ eval C c m) j =
    0 ≫ limit.π (F ⋙ eval C c m) j

Next tactic:
rw [limMap_π]
/-- A cone for a functor `F : J ⥤ HomologicalComplex C c` which is given in degree `n` by
the limit `F ⋙ eval C c n`. -/
@[simps]
noncomputable def coneOfHasLimitEval : Cone F where
  pt :=
    { X := fun n => limit (F ⋙ eval C c n)
      d := fun n m => limMap { app := fun j => (F.obj j).d n m }
      shape := fun {n m} h => by
        ext j
        rw [limMap_π]
        

Proof state:
case w
C : Type u_1
ι : Type u_2
J : Type u_3
inst✝³ : Category.{?u.5993, u_1} C
inst✝² : Category.{?u.5997, u_3} J
c : ComplexShape ι
inst✝¹ : HasZeroMorphisms C
F : J ⥤ HomologicalComplex C c
inst✝ : ∀ (n : ι), HasLimit (F ⋙ eval C c n)
n m : ι
h : ¬ComplexShape.Rel c n m
j : J
⊢ limit.π (F ⋙ eval C c n) j ≫ (NatTrans.mk fun j => d (F.obj j) n m).app j = 0 ≫ limit.π (F ⋙ eval C c m) j

Next tactic:
dsimp
/-- A cone for a functor `F : J ⥤ HomologicalComplex C c` which is given in degree `n` by
the limit `F ⋙ eval C c n`. -/
@[simps]
noncomputable def coneOfHasLimitEval : Cone F where
  pt :=
    { X := fun n => limit (F ⋙ eval C c n)
      d := fun n m => limMap { app := fun j => (F.obj j).d n m }
      shape := fun {n m} h => by
        ext j
        rw [limMap_π]
        dsimp
        

Proof state:
case w
C : Type u_1
ι : Type u_2
J : Type u_3
inst✝³ : Category.{?u.5993, u_1} C
inst✝² : Category.{?u.5997, u_3} J
c : ComplexShape ι
inst✝¹ : HasZeroMorphisms C
F : J ⥤ HomologicalComplex C c
inst✝ : ∀ (n : ι), HasLimit (F ⋙ eval C c n)
n m : ι
h : ¬ComplexShape.Rel c n m
j : J
⊢ limit.π (F ⋙ eval C c n) j ≫ d (F.obj j) n m = 0 ≫ limit.π (F ⋙ eval C c m) j

Next tactic:
rw [(F.obj j).shape _ _ h, comp_zero, zero_comp]
/-- A cone for a functor `F : J ⥤ HomologicalComplex C c` which is given in degree `n` by
the limit `F ⋙ eval C c n`. -/
@[simps]
noncomputable def coneOfHasLimitEval : Cone F where
  pt :=
    { X := fun n => limit (F ⋙ eval C c n)
      d := fun n m => limMap { app := fun j => (F.obj j).d n m }
      shape := fun {n m} h => by
        ext j
        rw [limMap_π]
        dsimp
        rw [(F.obj j).shape _ _ h, comp_zero, zero_comp] }
  π :=
    { app := fun j => { f := fun n => limit.π _ j }
      naturality := fun i j φ => by
        

Proof state:
C : Type u_1
ι : Type u_2
J : Type u_3
inst✝³ : Category.{?u.5993, u_1} C
inst✝² : Category.{?u.5997, u_3} J
c : ComplexShape ι
inst✝¹ : HasZeroMorphisms C
F : J ⥤ HomologicalComplex C c
inst✝ : ∀ (n : ι), HasLimit (F ⋙ eval C c n)
i j : J
φ : i ⟶ j
⊢ ((Functor.const J).obj
            (mk (fun n => limit (F ⋙ eval C c n)) fun n m => limMap (NatTrans.mk fun j => d (F.obj j) n m))).map
        φ ≫
      (fun j => Hom.mk fun n => limit.π (F ⋙ eval C c n) j) j =
    (fun j => Hom.mk fun n => limit.π (F ⋙ eval C c n) j) i ≫ F.map φ

Next tactic:
ext n
/-- A cone for a functor `F : J ⥤ HomologicalComplex C c` which is given in degree `n` by
the limit `F ⋙ eval C c n`. -/
@[simps]
noncomputable def coneOfHasLimitEval : Cone F where
  pt :=
    { X := fun n => limit (F ⋙ eval C c n)
      d := fun n m => limMap { app := fun j => (F.obj j).d n m }
      shape := fun {n m} h => by
        ext j
        rw [limMap_π]
        dsimp
        rw [(F.obj j).shape _ _ h, comp_zero, zero_comp] }
  π :=
    { app := fun j => { f := fun n => limit.π _ j }
      naturality := fun i j φ => by
        ext n
        

Proof state:
case h
C : Type u_1
ι : Type u_2
J : Type u_3
inst✝³ : Category.{?u.5993, u_1} C
inst✝² : Category.{?u.5997, u_3} J
c : ComplexShape ι
inst✝¹ : HasZeroMorphisms C
F : J ⥤ HomologicalComplex C c
inst✝ : ∀ (n : ι), HasLimit (F ⋙ eval C c n)
i j : J
φ : i ⟶ j
n : ι
⊢ Hom.f
      (((Functor.const J).obj
              (mk (fun n => limit (F ⋙ eval C c n)) fun n m => limMap (NatTrans.mk fun j => d (F.obj j) n m))).map
          φ ≫
        (fun j => Hom.mk fun n => limit.π (F ⋙ eval C c n) j) j)
      n =
    Hom.f ((fun j => Hom.mk fun n => limit.π (F ⋙ eval C c n) j) i ≫ F.map φ) n

Next tactic:
dsimp
/-- A cone for a functor `F : J ⥤ HomologicalComplex C c` which is given in degree `n` by
the limit `F ⋙ eval C c n`. -/
@[simps]
noncomputable def coneOfHasLimitEval : Cone F where
  pt :=
    { X := fun n => limit (F ⋙ eval C c n)
      d := fun n m => limMap { app := fun j => (F.obj j).d n m }
      shape := fun {n m} h => by
        ext j
        rw [limMap_π]
        dsimp
        rw [(F.obj j).shape _ _ h, comp_zero, zero_comp] }
  π :=
    { app := fun j => { f := fun n => limit.π _ j }
      naturality := fun i j φ => by
        ext n
        dsimp
        

Proof state:
case h
C : Type u_1
ι : Type u_2
J : Type u_3
inst✝³ : Category.{?u.5993, u_1} C
inst✝² : Category.{?u.5997, u_3} J
c : ComplexShape ι
inst✝¹ : HasZeroMorphisms C
F : J ⥤ HomologicalComplex C c
inst✝ : ∀ (n : ι), HasLimit (F ⋙ eval C c n)
i j : J
φ : i ⟶ j
n : ι
⊢ 𝟙 (limit (F ⋙ eval C c n)) ≫ limit.π (F ⋙ eval C c n) j = limit.π (F ⋙ eval C c n) i ≫ Hom.f (F.map φ) n

Next tactic:
erw [limit.w, id_comp]
instance [HasFiniteLimits C] {K L : HomologicalComplex C c} (φ : K ⟶ L) [Mono φ] (n : ι) :
    Mono (φ.f n) := by
  

Proof state:
C : Type u_1
ι : Type u_2
J : Type u_3
inst✝⁴ : Category.{?u.35711, u_1} C
inst✝³ : Category.{?u.35715, u_3} J
c : ComplexShape ι
inst✝² : HasZeroMorphisms C
inst✝¹ : HasFiniteLimits C
K L : HomologicalComplex C c
φ : K ⟶ L
inst✝ : Mono φ
n : ι
⊢ Mono (Hom.f φ n)

Next tactic:
change Mono ((HomologicalComplex.eval C c n).map φ)
instance [HasFiniteLimits C] {K L : HomologicalComplex C c} (φ : K ⟶ L) [Mono φ] (n : ι) :
    Mono (φ.f n) := by
  change Mono ((HomologicalComplex.eval C c n).map φ)
  

Proof state:
C : Type u_1
ι : Type u_2
J : Type u_3
inst✝⁴ : Category.{?u.35711, u_1} C
inst✝³ : Category.{?u.35715, u_3} J
c : ComplexShape ι
inst✝² : HasZeroMorphisms C
inst✝¹ : HasFiniteLimits C
K L : HomologicalComplex C c
φ : K ⟶ L
inst✝ : Mono φ
n : ι
⊢ Mono ((eval C c n).map φ)

Next tactic:
infer_instance
/-- A cocone in `HomologicalComplex C c` is colimit if the induced cocones obtained
by applying `eval C c i : HomologicalComplex C c ⥤ C` for all `i` are colimit. -/
def isColimitOfEval (s : Cocone F)
    (hs : ∀ (i : ι), IsColimit ((eval C c i).mapCocone s)) : IsColimit s where
  desc t :=
    { f := fun i => (hs i).desc ((eval C c i).mapCocone t)
      comm' := fun i i' _ => by
        

Proof state:
C : Type u_1
ι : Type u_2
J : Type u_3
inst✝² : Category.{?u.39790, u_1} C
inst✝¹ : Category.{?u.39794, u_3} J
c : ComplexShape ι
inst✝ : HasZeroMorphisms C
F : J ⥤ HomologicalComplex C c
s : Cocone F
hs : (i : ι) → IsColimit ((eval C c i).mapCocone s)
t : Cocone F
i i' : ι
x✝ : ComplexShape.Rel c i i'
⊢ (fun i => IsColimit.desc (hs i) ((eval C c i).mapCocone t)) i ≫ d t.pt i i' =
    d s.pt i i' ≫ (fun i => IsColimit.desc (hs i) ((eval C c i).mapCocone t)) i'

Next tactic:
apply IsColimit.hom_ext (hs i)
/-- A cocone in `HomologicalComplex C c` is colimit if the induced cocones obtained
by applying `eval C c i : HomologicalComplex C c ⥤ C` for all `i` are colimit. -/
def isColimitOfEval (s : Cocone F)
    (hs : ∀ (i : ι), IsColimit ((eval C c i).mapCocone s)) : IsColimit s where
  desc t :=
    { f := fun i => (hs i).desc ((eval C c i).mapCocone t)
      comm' := fun i i' _ => by
        apply IsColimit.hom_ext (hs i)
        

Proof state:
C : Type u_1
ι : Type u_2
J : Type u_3
inst✝² : Category.{?u.39790, u_1} C
inst✝¹ : Category.{?u.39794, u_3} J
c : ComplexShape ι
inst✝ : HasZeroMorphisms C
F : J ⥤ HomologicalComplex C c
s : Cocone F
hs : (i : ι) → IsColimit ((eval C c i).mapCocone s)
t : Cocone F
i i' : ι
x✝ : ComplexShape.Rel c i i'
⊢ ∀ (j : J),
    ((eval C c i).mapCocone s).ι.app j ≫ (fun i => IsColimit.desc (hs i) ((eval C c i).mapCocone t)) i ≫ d t.pt i i' =
      ((eval C c i).mapCocone s).ι.app j ≫ d s.pt i i' ≫ (fun i => IsColimit.desc (hs i) ((eval C c i).mapCocone t)) i'

Next tactic:
intro j