l3lab/ntp-mathlib huggingface dataset:
/-- The functor `V ⥤ HomologicalComplex V c` creating a chain complex supported in a single degree.
-/
noncomputable def single (j : ι) : V ⥤ HomologicalComplex V c where
  obj A :=
    { X := fun i => if i = j then A else 0
      d := fun i j => 0 }
  map f :=
    { f := fun i => if h : i = j then eqToHom (by dsimp; rw [if_pos h]) ≫ f ≫
              eqToHom (by dsimp; rw [if_pos h]) else 0 }
  map_id A := by
    

Proof state:
V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A : V
⊢ { obj := fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0,
          map := fun {X Y} f =>
            Hom.mk fun i =>
              if h : i = j then
                eqToHom
                    (_ :
                      HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) X) i = X) ≫
                  f ≫
                    eqToHom
                      (_ :
                        Y = HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) Y) i)
              else 0 }.map
      (𝟙 A) =
    𝟙
      ({ obj := fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0,
            map := fun {X Y} f =>
              Hom.mk fun i =>
                if h : i = j then
                  eqToHom
                      (_ :
                        HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) X) i = X) ≫
                    f ≫
                      eqToHom
                        (_ :
                          Y = HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) Y) i)
                else 0 }.obj
        A)

Next tactic:
ext
/-- The functor `V ⥤ HomologicalComplex V c` creating a chain complex supported in a single degree.
-/
noncomputable def single (j : ι) : V ⥤ HomologicalComplex V c where
  obj A :=
    { X := fun i => if i = j then A else 0
      d := fun i j => 0 }
  map f :=
    { f := fun i => if h : i = j then eqToHom (by dsimp; rw [if_pos h]) ≫ f ≫
              eqToHom (by dsimp; rw [if_pos h]) else 0 }
  map_id A := by
    ext
    

Proof state:
case h
V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A : V
i✝ : ι
⊢ Hom.f
      ({ obj := fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0,
            map := fun {X Y} f =>
              Hom.mk fun i =>
                if h : i = j then
                  eqToHom
                      (_ :
                        HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) X) i = X) ≫
                    f ≫
                      eqToHom
                        (_ :
                          Y = HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) Y) i)
                else 0 }.map
        (𝟙 A))
      i✝ =
    Hom.f
      (𝟙
        ({ obj := fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0,
              map := fun {X Y} f =>
                Hom.mk fun i =>
                  if h : i = j then
                    eqToHom
                        (_ :
                          HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) X) i =
                            X) ≫
                      f ≫
                        eqToHom
                          (_ :
                            Y =
                              HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) Y) i)
                  else 0 }.obj
          A))
      i✝

Next tactic:
dsimp
/-- The functor `V ⥤ HomologicalComplex V c` creating a chain complex supported in a single degree.
-/
noncomputable def single (j : ι) : V ⥤ HomologicalComplex V c where
  obj A :=
    { X := fun i => if i = j then A else 0
      d := fun i j => 0 }
  map f :=
    { f := fun i => if h : i = j then eqToHom (by dsimp; rw [if_pos h]) ≫ f ≫
              eqToHom (by dsimp; rw [if_pos h]) else 0 }
  map_id A := by
    ext
    dsimp
    

Proof state:
case h
V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A : V
i✝ : ι
⊢ (if h : i✝ = j then eqToHom (_ : (if i✝ = j then A else 0) = A) ≫ 𝟙 A ≫ eqToHom (_ : A = if i✝ = j then A else 0)
    else 0) =
    𝟙 (if i✝ = j then A else 0)

Next tactic:
split_ifs with h
/-- The functor `V ⥤ HomologicalComplex V c` creating a chain complex supported in a single degree.
-/
noncomputable def single (j : ι) : V ⥤ HomologicalComplex V c where
  obj A :=
    { X := fun i => if i = j then A else 0
      d := fun i j => 0 }
  map f :=
    { f := fun i => if h : i = j then eqToHom (by dsimp; rw [if_pos h]) ≫ f ≫
              eqToHom (by dsimp; rw [if_pos h]) else 0 }
  map_id A := by
    ext
    dsimp
    split_ifs with h
    · 

Proof state:
case pos
V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A : V
i✝ : ι
h : i✝ = j
⊢ eqToHom (_ : (if i✝ = j then A else 0) = A) ≫ 𝟙 A ≫ eqToHom (_ : A = if i✝ = j then A else 0) =
    𝟙 (if i✝ = j then A else 0)

Next tactic:
subst h
/-- The functor `V ⥤ HomologicalComplex V c` creating a chain complex supported in a single degree.
-/
noncomputable def single (j : ι) : V ⥤ HomologicalComplex V c where
  obj A :=
    { X := fun i => if i = j then A else 0
      d := fun i j => 0 }
  map f :=
    { f := fun i => if h : i = j then eqToHom (by dsimp; rw [if_pos h]) ≫ f ≫
              eqToHom (by dsimp; rw [if_pos h]) else 0 }
  map_id A := by
    ext
    dsimp
    split_ifs with h
    · subst h
      

Proof state:
case pos
V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
A : V
i✝ : ι
⊢ eqToHom (_ : (if i✝ = i✝ then A else 0) = A) ≫ 𝟙 A ≫ eqToHom (_ : A = if i✝ = i✝ then A else 0) =
    𝟙 (if i✝ = i✝ then A else 0)

Next tactic:
simp
/-- The functor `V ⥤ HomologicalComplex V c` creating a chain complex supported in a single degree.
-/
noncomputable def single (j : ι) : V ⥤ HomologicalComplex V c where
  obj A :=
    { X := fun i => if i = j then A else 0
      d := fun i j => 0 }
  map f :=
    { f := fun i => if h : i = j then eqToHom (by dsimp; rw [if_pos h]) ≫ f ≫
              eqToHom (by dsimp; rw [if_pos h]) else 0 }
  map_id A := by
    ext
    dsimp
    split_ifs with h
    · subst h
      simp
    · 

Proof state:
case neg
V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A : V
i✝ : ι
h : ¬i✝ = j
⊢ 0 = 𝟙 (if i✝ = j then A else 0)

Next tactic:
rw [if_neg h]
/-- The functor `V ⥤ HomologicalComplex V c` creating a chain complex supported in a single degree.
-/
noncomputable def single (j : ι) : V ⥤ HomologicalComplex V c where
  obj A :=
    { X := fun i => if i = j then A else 0
      d := fun i j => 0 }
  map f :=
    { f := fun i => if h : i = j then eqToHom (by dsimp; rw [if_pos h]) ≫ f ≫
              eqToHom (by dsimp; rw [if_pos h]) else 0 }
  map_id A := by
    ext
    dsimp
    split_ifs with h
    · subst h
      simp
    · rw [if_neg h]
      

Proof state:
case neg
V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A : V
i✝ : ι
h : ¬i✝ = j
⊢ 0 = 𝟙 0

Next tactic:
simp
/-- The functor `V ⥤ HomologicalComplex V c` creating a chain complex supported in a single degree.
-/
noncomputable def single (j : ι) : V ⥤ HomologicalComplex V c where
  obj A :=
    { X := fun i => if i = j then A else 0
      d := fun i j => 0 }
  map f :=
    { f := fun i => if h : i = j then eqToHom (by dsimp; rw [if_pos h]) ≫ f ≫
              eqToHom (by dsimp; rw [if_pos h]) else 0 }
  map_id A := by
    ext
    dsimp
    split_ifs with h
    · subst h
      simp
    · rw [if_neg h]
      simp
  map_comp f g := by
    

Proof state:
V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
X✝ Y✝ Z✝ : V
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
⊢ { obj := fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0,
          map := fun {X Y} f =>
            Hom.mk fun i =>
              if h : i = j then
                eqToHom
                    (_ :
                      HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) X) i = X) ≫
                  f ≫
                    eqToHom
                      (_ :
                        Y = HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) Y) i)
              else 0 }.map
      (f ≫ g) =
    { obj := fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0,
            map := fun {X Y} f =>
              Hom.mk fun i =>
                if h : i = j then
                  eqToHom
                      (_ :
                        HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) X) i = X) ≫
                    f ≫
                      eqToHom
                        (_ :
                          Y = HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) Y) i)
                else 0 }.map
        f ≫
      { obj := fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0,
            map := fun {X Y} f =>
              Hom.mk fun i =>
                if h : i = j then
                  eqToHom
                      (_ :
                        HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) X) i = X) ≫
                    f ≫
                      eqToHom
                        (_ :
                          Y = HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) Y) i)
                else 0 }.map
        g

Next tactic:
ext
/-- The functor `V ⥤ HomologicalComplex V c` creating a chain complex supported in a single degree.
-/
noncomputable def single (j : ι) : V ⥤ HomologicalComplex V c where
  obj A :=
    { X := fun i => if i = j then A else 0
      d := fun i j => 0 }
  map f :=
    { f := fun i => if h : i = j then eqToHom (by dsimp; rw [if_pos h]) ≫ f ≫
              eqToHom (by dsimp; rw [if_pos h]) else 0 }
  map_id A := by
    ext
    dsimp
    split_ifs with h
    · subst h
      simp
    · rw [if_neg h]
      simp
  map_comp f g := by
    ext
    

Proof state:
case h
V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
X✝ Y✝ Z✝ : V
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
i✝ : ι
⊢ Hom.f
      ({ obj := fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0,
            map := fun {X Y} f =>
              Hom.mk fun i =>
                if h : i = j then
                  eqToHom
                      (_ :
                        HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) X) i = X) ≫
                    f ≫
                      eqToHom
                        (_ :
                          Y = HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) Y) i)
                else 0 }.map
        (f ≫ g))
      i✝ =
    Hom.f
      ({ obj := fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0,
              map := fun {X Y} f =>
                Hom.mk fun i =>
                  if h : i = j then
                    eqToHom
                        (_ :
                          HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) X) i =
                            X) ≫
                      f ≫
                        eqToHom
                          (_ :
                            Y =
                              HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) Y) i)
                  else 0 }.map
          f ≫
        { obj := fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0,
              map := fun {X Y} f =>
                Hom.mk fun i =>
                  if h : i = j then
                    eqToHom
                        (_ :
                          HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) X) i =
                            X) ≫
                      f ≫
                        eqToHom
                          (_ :
                            Y =
                              HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) Y) i)
                  else 0 }.map
          g)
      i✝

Next tactic:
dsimp
/-- The functor `V ⥤ HomologicalComplex V c` creating a chain complex supported in a single degree.
-/
noncomputable def single (j : ι) : V ⥤ HomologicalComplex V c where
  obj A :=
    { X := fun i => if i = j then A else 0
      d := fun i j => 0 }
  map f :=
    { f := fun i => if h : i = j then eqToHom (by dsimp; rw [if_pos h]) ≫ f ≫
              eqToHom (by dsimp; rw [if_pos h]) else 0 }
  map_id A := by
    ext
    dsimp
    split_ifs with h
    · subst h
      simp
    · rw [if_neg h]
      simp
  map_comp f g := by
    ext
    dsimp
    

Proof state:
case h
V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
X✝ Y✝ Z✝ : V
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
i✝ : ι
⊢ (if h : i✝ = j then
      eqToHom (_ : (if i✝ = j then X✝ else 0) = X✝) ≫ (f ≫ g) ≫ eqToHom (_ : Z✝ = if i✝ = j then Z✝ else 0)
    else 0) =
    (if h : i✝ = j then eqToHom (_ : (if i✝ = j then X✝ else 0) = X✝) ≫ f ≫ eqToHom (_ : Y✝ = if i✝ = j then Y✝ else 0)
      else 0) ≫
      if h : i✝ = j then eqToHom (_ : (if i✝ = j then Y✝ else 0) = Y✝) ≫ g ≫ eqToHom (_ : Z✝ = if i✝ = j then Z✝ else 0)
      else 0

Next tactic:
split_ifs with h
/-- The functor `V ⥤ HomologicalComplex V c` creating a chain complex supported in a single degree.
-/
noncomputable def single (j : ι) : V ⥤ HomologicalComplex V c where
  obj A :=
    { X := fun i => if i = j then A else 0
      d := fun i j => 0 }
  map f :=
    { f := fun i => if h : i = j then eqToHom (by dsimp; rw [if_pos h]) ≫ f ≫
              eqToHom (by dsimp; rw [if_pos h]) else 0 }
  map_id A := by
    ext
    dsimp
    split_ifs with h
    · subst h
      simp
    · rw [if_neg h]
      simp
  map_comp f g := by
    ext
    dsimp
    split_ifs with h
    · 

Proof state:
case pos
V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
X✝ Y✝ Z✝ : V
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
i✝ : ι
h : i✝ = j
⊢ eqToHom (_ : (if i✝ = j then X✝ else 0) = X✝) ≫ (f ≫ g) ≫ eqToHom (_ : Z✝ = if i✝ = j then Z✝ else 0) =
    (eqToHom (_ : (if i✝ = j then X✝ else 0) = X✝) ≫ f ≫ eqToHom (_ : Y✝ = if i✝ = j then Y✝ else 0)) ≫
      eqToHom (_ : (if i✝ = j then Y✝ else 0) = Y✝) ≫ g ≫ eqToHom (_ : Z✝ = if i✝ = j then Z✝ else 0)

Next tactic:
subst h
/-- The functor `V ⥤ HomologicalComplex V c` creating a chain complex supported in a single degree.
-/
noncomputable def single (j : ι) : V ⥤ HomologicalComplex V c where
  obj A :=
    { X := fun i => if i = j then A else 0
      d := fun i j => 0 }
  map f :=
    { f := fun i => if h : i = j then eqToHom (by dsimp; rw [if_pos h]) ≫ f ≫
              eqToHom (by dsimp; rw [if_pos h]) else 0 }
  map_id A := by
    ext
    dsimp
    split_ifs with h
    · subst h
      simp
    · rw [if_neg h]
      simp
  map_comp f g := by
    ext
    dsimp
    split_ifs with h
    · subst h
      

Proof state:
case pos
V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
X✝ Y✝ Z✝ : V
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
i✝ : ι
⊢ eqToHom (_ : (if i✝ = i✝ then X✝ else 0) = X✝) ≫ (f ≫ g) ≫ eqToHom (_ : Z✝ = if i✝ = i✝ then Z✝ else 0) =
    (eqToHom (_ : (if i✝ = i✝ then X✝ else 0) = X✝) ≫ f ≫ eqToHom (_ : Y✝ = if i✝ = i✝ then Y✝ else 0)) ≫
      eqToHom (_ : (if i✝ = i✝ then Y✝ else 0) = Y✝) ≫ g ≫ eqToHom (_ : Z✝ = if i✝ = i✝ then Z✝ else 0)

Next tactic:
simp
/-- The functor `V ⥤ HomologicalComplex V c` creating a chain complex supported in a single degree.
-/
noncomputable def single (j : ι) : V ⥤ HomologicalComplex V c where
  obj A :=
    { X := fun i => if i = j then A else 0
      d := fun i j => 0 }
  map f :=
    { f := fun i => if h : i = j then eqToHom (by dsimp; rw [if_pos h]) ≫ f ≫
              eqToHom (by dsimp; rw [if_pos h]) else 0 }
  map_id A := by
    ext
    dsimp
    split_ifs with h
    · subst h
      simp
    · rw [if_neg h]
      simp
  map_comp f g := by
    ext
    dsimp
    split_ifs with h
    · subst h
      simp
    · 

Proof state:
case neg
V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
X✝ Y✝ Z✝ : V
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
i✝ : ι
h : ¬i✝ = j
⊢ 0 = 0 ≫ 0

Next tactic:
simp
lemma isZero_single_obj_X (j : ι) (A : V) (i : ι) (hi : i ≠ j) :
    IsZero (((single V c j).obj A).X i) := by
  

Proof state:
V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A : V
i : ι
hi : i ≠ j
⊢ IsZero (X ((single V c j).obj A) i)

Next tactic:
dsimp [single]
lemma isZero_single_obj_X (j : ι) (A : V) (i : ι) (hi : i ≠ j) :
    IsZero (((single V c j).obj A).X i) := by
  dsimp [single]
  

Proof state:
V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A : V
i : ι
hi : i ≠ j
⊢ IsZero (if i = j then A else 0)

Next tactic:
rw [if_neg hi]
lemma isZero_single_obj_X (j : ι) (A : V) (i : ι) (hi : i ≠ j) :
    IsZero (((single V c j).obj A).X i) := by
  dsimp [single]
  rw [if_neg hi]
  

Proof state:
V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A : V
i : ι
hi : i ≠ j
⊢ IsZero 0

Next tactic:
exact Limits.isZero_zero V
/-- The object in degree `i` of `(single V c h).obj A` is just `A` when `i = j`. -/
noncomputable def singleObjXIsoOfEq (j : ι) (A : V) (i : ι) (hi : i = j) :
    ((single V c j).obj A).X i ≅ A :=
  eqToIso (by 

Proof state:
V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A : V
i : ι
hi : i = j
⊢ X ((single V c j).obj A) i = A

Next tactic:
subst hi
/-- The object in degree `i` of `(single V c h).obj A` is just `A` when `i = j`. -/
noncomputable def singleObjXIsoOfEq (j : ι) (A : V) (i : ι) (hi : i = j) :
    ((single V c j).obj A).X i ≅ A :=
  eqToIso (by subst hi; 

Proof state:
V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
A : V
i : ι
⊢ X ((single V c i).obj A) i = A

Next tactic:
simp [single]
@[reassoc]
theorem single_map_f_self (j : ι) {A B : V} (f : A ⟶ B) :
    ((single V c j).map f).f j = (singleObjXSelf c j A).hom ≫
      f ≫ (singleObjXSelf c j B).inv := by
  

Proof state:
V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A B : V
f : A ⟶ B
⊢ Hom.f ((single V c j).map f) j = (singleObjXSelf c j A).hom ≫ f ≫ (singleObjXSelf c j B).inv

Next tactic:
dsimp [single]
@[reassoc]
theorem single_map_f_self (j : ι) {A B : V} (f : A ⟶ B) :
    ((single V c j).map f).f j = (singleObjXSelf c j A).hom ≫
      f ≫ (singleObjXSelf c j B).inv := by
  dsimp [single]
  

Proof state:
V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A B : V
f : A ⟶ B
⊢ (if h : j = j then
      eqToHom (_ : X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) A) j = A) ≫
        f ≫ eqToHom (_ : B = X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) B) j)
    else 0) =
    (singleObjXSelf c j A).hom ≫ f ≫ (singleObjXSelf c j B).inv

Next tactic:
rw [dif_pos rfl]
@[reassoc]
theorem single_map_f_self (j : ι) {A B : V} (f : A ⟶ B) :
    ((single V c j).map f).f j = (singleObjXSelf c j A).hom ≫
      f ≫ (singleObjXSelf c j B).inv := by
  dsimp [single]
  rw [dif_pos rfl]
  

Proof state:
V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
j : ι
A B : V
f : A ⟶ B
⊢ eqToHom (_ : X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) A) j = A) ≫
      f ≫ eqToHom (_ : B = X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) B) j) =
    (singleObjXSelf c j A).hom ≫ f ≫ (singleObjXSelf c j B).inv

Next tactic:
rfl
@[ext]
lemma from_single_hom_ext {K : HomologicalComplex V c} {j : ι} {A : V}
    {f g : (single V c j).obj A ⟶ K} (hfg : f.f j = g.f j) : f = g := by
  

Proof state:
V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
K : HomologicalComplex V c
j : ι
A : V
f g : (single V c j).obj A ⟶ K
hfg : Hom.f f j = Hom.f g j
⊢ f = g

Next tactic:
ext i
@[ext]
lemma from_single_hom_ext {K : HomologicalComplex V c} {j : ι} {A : V}
    {f g : (single V c j).obj A ⟶ K} (hfg : f.f j = g.f j) : f = g := by
  ext i
  

Proof state:
case h
V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
K : HomologicalComplex V c
j : ι
A : V
f g : (single V c j).obj A ⟶ K
hfg : Hom.f f j = Hom.f g j
i : ι
⊢ Hom.f f i = Hom.f g i

Next tactic:
by_cases h : i = j
@[ext]
lemma from_single_hom_ext {K : HomologicalComplex V c} {j : ι} {A : V}
    {f g : (single V c j).obj A ⟶ K} (hfg : f.f j = g.f j) : f = g := by
  ext i
  by_cases h : i = j
  · 

Proof state:
case pos
V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
K : HomologicalComplex V c
j : ι
A : V
f g : (single V c j).obj A ⟶ K
hfg : Hom.f f j = Hom.f g j
i : ι
h : i = j
⊢ Hom.f f i = Hom.f g i

Next tactic:
subst h
@[ext]
lemma from_single_hom_ext {K : HomologicalComplex V c} {j : ι} {A : V}
    {f g : (single V c j).obj A ⟶ K} (hfg : f.f j = g.f j) : f = g := by
  ext i
  by_cases h : i = j
  · subst h
    

Proof state:
case pos
V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
K : HomologicalComplex V c
A : V
i : ι
f g : (single V c i).obj A ⟶ K
hfg : Hom.f f i = Hom.f g i
⊢ Hom.f f i = Hom.f g i

Next tactic:
exact hfg
@[ext]
lemma from_single_hom_ext {K : HomologicalComplex V c} {j : ι} {A : V}
    {f g : (single V c j).obj A ⟶ K} (hfg : f.f j = g.f j) : f = g := by
  ext i
  by_cases h : i = j
  · subst h
    exact hfg
  · 

Proof state:
case neg
V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
K : HomologicalComplex V c
j : ι
A : V
f g : (single V c j).obj A ⟶ K
hfg : Hom.f f j = Hom.f g j
i : ι
h : ¬i = j
⊢ Hom.f f i = Hom.f g i

Next tactic:
apply (isZero_single_obj_X c j A i h).eq_of_src
@[ext]
lemma to_single_hom_ext {K : HomologicalComplex V c} {j : ι} {A : V}
    {f g : K ⟶ (single V c j).obj A} (hfg : f.f j = g.f j) : f = g := by
  

Proof state:
V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
K : HomologicalComplex V c
j : ι
A : V
f g : K ⟶ (single V c j).obj A
hfg : Hom.f f j = Hom.f g j
⊢ f = g

Next tactic:
ext i