awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Lean 4 proof step from Mathlib.Algebra.Homology.Embedding.ExtendHomotopy (goal)
Goal:
ι : Type u_1
ι' : Type u_2
c : ComplexShape ι
c' : ComplexShape ι'
C : Type u_3
inst : Category.{v_1, u_3} C
inst_1 : HasZeroObject.{v_1, u_3} C
inst_2 : Preadditive.{v_1, u_3} C
K L : HomologicalComplex.{v_1, u_3, u_1} C c
f g : K ⟶ L
h : Homotopy f g
e : c.Embedding c'
inst_3 : e.IsRelIff
i : ι
hi : ¬c.Rel i (c.next i)
pos :
  ∀ (hi' : c'.Rel (e.f i) (c'.next (e.f i))),
    Eq (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
      (Iso.hom (K.extendXIso e ⋯) ≫ 0 ≫ Iso.inv (L.extendXIso e ⋯))
      ((dNext (e.f i) :
          (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
        (extend.hom e h.hom))
⊢ Eq (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
    (Iso.hom (K.extendXIso e ⋯) ≫ 0 ≫ Iso.inv (L.extendXIso e ⋯))
    ((dNext (e.f i) :
        (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
      (extend.hom e h.hom))
have neg : ∀ (hi' : ¬c'.Rel (e.f i) (c'.next (e.f i))),
  Eq (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
    (Iso.hom (K.extendXIso e sorry) ≫ 0 ≫ Iso.inv (L.extendXIso e sorry))
    ((dNext (e.f i) :
        (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
      (extend.hom e h.hom))
Tactic: by_cases hi' : c'.Rel (e.f i) (c'.next (e.f i))
-- Lean 4 proof step from Mathlib.Algebra.Homology.Embedding.ExtendHomotopy (goal)
Goal:
ι : Type u_1
ι' : Type u_2
c : ComplexShape ι
c' : ComplexShape ι'
C : Type u_3
inst : Category.{v_1, u_3} C
inst_1 : HasZeroObject.{v_1, u_3} C
inst_2 : Preadditive.{v_1, u_3} C
K L : HomologicalComplex.{v_1, u_3, u_1} C c
f g : K ⟶ L
h : Homotopy f g
e : c.Embedding c'
inst_3 : e.IsRelIff
i : ι
⊢ Eq (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
    (Iso.hom (K.extendXIso e ⋯) ≫
      (prevD i : (a : (i j : ι) → K.X i ⟶ L.X j) → K.X i ⟶ L.X i) h.hom ≫ Iso.inv (L.extendXIso e ⋯))
    ((prevD (e.f i) :
        (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
      (extend.hom e h.hom))
have pos : ∀ (hi : c.Rel (c.prev i) i),
  Eq (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
    (Iso.hom (K.extendXIso e sorry) ≫
      (prevD i : (a : (i j : ι) → K.X i ⟶ L.X j) → K.X i ⟶ L.X i) h.hom ≫ Iso.inv (L.extendXIso e sorry))
    ((prevD (e.f i) :
        (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
      (extend.hom e h.hom))
Tactic: by_cases hi : c.Rel (c.prev i) i
-- Lean 4 proof step from Mathlib.Algebra.Homology.Embedding.ExtendHomotopy (goal)
Goal:
ι : Type u_1
ι' : Type u_2
c : ComplexShape ι
c' : ComplexShape ι'
C : Type u_3
inst : Category.{v_1, u_3} C
inst_1 : HasZeroObject.{v_1, u_3} C
inst_2 : Preadditive.{v_1, u_3} C
K L : HomologicalComplex.{v_1, u_3, u_1} C c
f g : K ⟶ L
h : Homotopy f g
e : c.Embedding c'
inst_3 : e.IsRelIff
i : ι
pos :
  ∀ (hi : c.Rel (c.prev i) i),
    Eq (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
      (Iso.hom (K.extendXIso e ⋯) ≫
        (prevD i : (a : (i j : ι) → K.X i ⟶ L.X j) → K.X i ⟶ L.X i) h.hom ≫ Iso.inv (L.extendXIso e ⋯))
      ((prevD (e.f i) :
          (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
        (extend.hom e h.hom))
⊢ Eq (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
    (Iso.hom (K.extendXIso e ⋯) ≫
      (prevD i : (a : (i j : ι) → K.X i ⟶ L.X j) → K.X i ⟶ L.X i) h.hom ≫ Iso.inv (L.extendXIso e ⋯))
    ((prevD (e.f i) :
        (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
      (extend.hom e h.hom))
have neg : ∀ (hi : ¬c.Rel (c.prev i) i),
  Eq (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
    (Iso.hom (K.extendXIso e sorry) ≫
      (prevD i : (a : (i j : ι) → K.X i ⟶ L.X j) → K.X i ⟶ L.X i) h.hom ≫ Iso.inv (L.extendXIso e sorry))
    ((prevD (e.f i) :
        (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
      (extend.hom e h.hom))
Tactic: by_cases hi : c.Rel (c.prev i) i
-- Lean 4 proof step from Mathlib.Algebra.Homology.Embedding.ExtendHomotopy (hypothesis)
Goal:
ι : Type u_1
ι' : Type u_2
c : ComplexShape ι
c' : ComplexShape ι'
C : Type u_3
inst : Category.{v_1, u_3} C
inst_1 : HasZeroObject.{v_1, u_3} C
inst_2 : Preadditive.{v_1, u_3} C
K L : HomologicalComplex.{v_1, u_3, u_1} C c
f g : K ⟶ L
h : Homotopy f g
e : c.Embedding c'
inst_3 : e.IsRelIff
i : ι
hi : c.Rel (c.prev i) i
⊢ Eq (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
    (Iso.hom (K.extendXIso e ⋯) ≫
      (prevD i : (a : (i j : ι) → K.X i ⟶ L.X j) → K.X i ⟶ L.X i) h.hom ≫ Iso.inv (L.extendXIso e ⋯))
    ((prevD (e.f i) :
        (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
      (extend.hom e h.hom))
have hi' : c'.Rel (e.f (c.prev i)) (e.f i)
Tactic: have hi' : c'.Rel (e.f (c.prev i)) (e.f i) := by rwa [e.rel_iff]
-- Lean 4 proof step from Mathlib.Algebra.Homology.Embedding.ExtendHomotopy (goal)
Goal:
ι : Type u_1
ι' : Type u_2
c : ComplexShape ι
c' : ComplexShape ι'
C : Type u_3
inst : Category.{v_1, u_3} C
inst_1 : HasZeroObject.{v_1, u_3} C
inst_2 : Preadditive.{v_1, u_3} C
K L : HomologicalComplex.{v_1, u_3, u_1} C c
f g : K ⟶ L
h : Homotopy f g
e : c.Embedding c'
inst_3 : e.IsRelIff
i : ι
hi : ¬c.Rel (c.prev i) i
⊢ Eq (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
    (Iso.hom (K.extendXIso e ⋯) ≫
      (prevD i : (a : (i j : ι) → K.X i ⟶ L.X j) → K.X i ⟶ L.X i) h.hom ≫ Iso.inv (L.extendXIso e ⋯))
    ((prevD (e.f i) :
        (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
      (extend.hom e h.hom))
have neg : Eq (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i)) (Iso.hom (K.extendXIso e sorry) ≫ 0 ≫ Iso.inv (L.extendXIso e sorry))
  ((prevD (e.f i) :
      (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
    (extend.hom e h.hom))
Tactic: rw [prevD_eq_zero _ _ hi]
-- Lean 4 proof step from Mathlib.Algebra.Homology.Embedding.ExtendHomotopy (goal)
Goal:
ι : Type u_1
ι' : Type u_2
c : ComplexShape ι
c' : ComplexShape ι'
C : Type u_3
inst : Category.{v_1, u_3} C
inst_1 : HasZeroObject.{v_1, u_3} C
inst_2 : Preadditive.{v_1, u_3} C
K L : HomologicalComplex.{v_1, u_3, u_1} C c
f g : K ⟶ L
h : Homotopy f g
e : c.Embedding c'
inst_3 : e.IsRelIff
i : ι
hi : ¬c.Rel (c.prev i) i
⊢ Eq (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
    (Iso.hom (K.extendXIso e ⋯) ≫ 0 ≫ Iso.inv (L.extendXIso e ⋯))
    ((prevD (e.f i) :
        (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
      (extend.hom e h.hom))
have pos : ∀ (hi' : c'.Rel (c'.prev (e.f i)) (e.f i)),
  Eq (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
    (Iso.hom (K.extendXIso e sorry) ≫ 0 ≫ Iso.inv (L.extendXIso e sorry))
    ((prevD (e.f i) :
        (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
      (extend.hom e h.hom))
Tactic: by_cases hi' : c'.Rel (c'.prev (e.f i)) (e.f i)
-- Lean 4 proof step from Mathlib.Algebra.Homology.Embedding.ExtendHomotopy (goal)
Goal:
ι : Type u_1
ι' : Type u_2
c : ComplexShape ι
c' : ComplexShape ι'
C : Type u_3
inst : Category.{v_1, u_3} C
inst_1 : HasZeroObject.{v_1, u_3} C
inst_2 : Preadditive.{v_1, u_3} C
K L : HomologicalComplex.{v_1, u_3, u_1} C c
f g : K ⟶ L
h : Homotopy f g
e : c.Embedding c'
inst_3 : e.IsRelIff
i : ι
hi : ¬c.Rel (c.prev i) i
pos :
  ∀ (hi' : c'.Rel (c'.prev (e.f i)) (e.f i)),
    Eq (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
      (Iso.hom (K.extendXIso e ⋯) ≫ 0 ≫ Iso.inv (L.extendXIso e ⋯))
      ((prevD (e.f i) :
          (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
        (extend.hom e h.hom))
⊢ Eq (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
    (Iso.hom (K.extendXIso e ⋯) ≫ 0 ≫ Iso.inv (L.extendXIso e ⋯))
    ((prevD (e.f i) :
        (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
      (extend.hom e h.hom))
have neg : ∀ (hi' : ¬c'.Rel (c'.prev (e.f i)) (e.f i)),
  Eq (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
    (Iso.hom (K.extendXIso e sorry) ≫ 0 ≫ Iso.inv (L.extendXIso e sorry))
    ((prevD (e.f i) :
        (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
      (extend.hom e h.hom))
Tactic: by_cases hi' : c'.Rel (c'.prev (e.f i)) (e.f i)
-- Lean 4 proof step from Mathlib.Algebra.Homology.Embedding.ExtendHomotopy (goal)
Goal:
ι : Type u_1
ι' : Type u_2
c : ComplexShape ι
c' : ComplexShape ι'
C : Type u_3
inst : Category.{v_1, u_3} C
inst_1 : HasZeroObject.{v_1, u_3} C
inst_2 : Preadditive.{v_1, u_3} C
K L : HomologicalComplex.{v_1, u_3, u_1} C c
f g : K ⟶ L
e : c.Embedding c'
inst_3 : e.IsRelIff
h : Homotopy (C := K.extend e) (extendMap f e) (extendMap g e)
i j : ι
hij : ¬c.Rel j i
⊢ Eq (α := K.X i ⟶ L.X j) (Iso.inv (K.extendXIso e ⋯) ≫ h.hom (e.f i) (e.f j) ≫ Iso.hom (L.extendXIso e ⋯)) 0
have rw : Eq (α := K.X i ⟶ L.X j)
  (CategoryStruct.comp (Y := (K.extend e).X (e.f i)) (Iso.inv (K.extendXIso e sorry))
    (CategoryStruct.comp (Y := (L.extend e).X (e.f j)) 0 (Iso.hom (L.extendXIso e sorry))))
  0
Tactic: rw [h.zero _ _ (by rwa [e.rel_iff]), zero_comp, comp_zero]
-- Lean 4 proof step from Mathlib.Algebra.Homology.Embedding.ExtendHomotopy (goal)
Goal:
ι : Type u_1
ι' : Type u_2
c : ComplexShape ι
c' : ComplexShape ι'
C : Type u_3
inst : Category.{v_1, u_3} C
inst_1 : HasZeroObject.{v_1, u_3} C
inst_2 : Preadditive.{v_1, u_3} C
K L : HomologicalComplex.{v_1, u_3, u_1} C c
f g : K ⟶ L
e : c.Embedding c'
inst_3 : e.IsRelIff
h : Homotopy (C := K.extend e) (extendMap f e) (extendMap g e)
i j : ι
hij : ¬c.Rel j i
rw :
  Eq (α := K.X i ⟶ L.X j)
    (CategoryStruct.comp (Y := (K.extend e).X (e.f i)) (Iso.inv (K.extendXIso e ⋯))
      (CategoryStruct.comp (Y := (L.extend e).X (e.f j)) 0 (Iso.hom (L.extendXIso e ⋯))))
    0
⊢ Eq (α := K.X i ⟶ L.X j) (Iso.inv (K.extendXIso e ⋯) ≫ h.hom (e.f i) (e.f j) ≫ Iso.hom (L.extendXIso e ⋯)) 0
have rw₁ : Eq (α := K.X i ⟶ L.X j) (CategoryStruct.comp (Y := (K.extend e).X (e.f i)) (Iso.inv (K.extendXIso e sorry)) 0) 0
Tactic: rw [h.zero _ _ (by rwa [e.rel_iff]), zero_comp, comp_zero]
-- Lean 4 proof step from Mathlib.Algebra.Homology.Embedding.ExtendHomotopy (goal)
Goal:
ι : Type u_1
ι' : Type u_2
c : ComplexShape ι
c' : ComplexShape ι'
C : Type u_3
inst : Category.{v_1, u_3} C
inst_1 : HasZeroObject.{v_1, u_3} C
inst_2 : Preadditive.{v_1, u_3} C
K L : HomologicalComplex.{v_1, u_3, u_1} C c
f g : K ⟶ L
e : c.Embedding c'
inst_3 : e.IsRelIff
h : Homotopy (C := K.extend e) (extendMap f e) (extendMap g e)
i j : ι
hij : ¬c.Rel j i
rw :
  Eq (α := K.X i ⟶ L.X j)
    (CategoryStruct.comp (Y := (K.extend e).X (e.f i)) (Iso.inv (K.extendXIso e ⋯))
      (CategoryStruct.comp (Y := (L.extend e).X (e.f j)) 0 (Iso.hom (L.extendXIso e ⋯))))
    0
rw₁ : Eq (α := K.X i ⟶ L.X j) (CategoryStruct.comp (Y := (K.extend e).X (e.f i)) (Iso.inv (K.extendXIso e ⋯)) 0) 0
⊢ Eq (α := K.X i ⟶ L.X j) (Iso.inv (K.extendXIso e ⋯) ≫ h.hom (e.f i) (e.f j) ≫ Iso.hom (L.extendXIso e ⋯)) 0
have rw₂ : Eq.{v_1 + 1} (α := K.X i ⟶ L.X j) 0 0
Tactic: rw [h.zero _ _ (by rwa [e.rel_iff]), zero_comp, comp_zero]
-- Lean 4 proof step from Mathlib.Algebra.Homology.Embedding.ExtendHomotopy (hypothesis)
Goal:
ι : Type u_1
ι' : Type u_2
c : ComplexShape ι
c' : ComplexShape ι'
C : Type u_3
inst : Category.{v_1, u_3} C
inst_1 : HasZeroObject.{v_1, u_3} C
inst_2 : Preadditive.{v_1, u_3} C
K L : HomologicalComplex.{v_1, u_3, u_1} C c
f g : K ⟶ L
e : c.Embedding c'
inst_3 : e.IsRelIff
h : Homotopy (C := K.extend e) (extendMap f e) (extendMap g e)
i : ι
⊢ f.f i =
    HAdd.hAdd (α := K.X i ⟶ L.X i)
        ((dNext i : (a : (i j : ι) → K.X i ⟶ L.X j) → K.X i ⟶ L.X i) fun (i j : ι) ↦
          Iso.inv (K.extendXIso e ⋯) ≫ h.hom (e.f i) (e.f j) ≫ Iso.hom (L.extendXIso e ⋯))
        ((prevD i : (a : (i j : ι) → K.X i ⟶ L.X j) → K.X i ⟶ L.X i) fun (i j : ι) ↦
          Iso.inv (K.extendXIso e ⋯) ≫ h.hom (e.f i) (e.f j) ≫ Iso.hom (L.extendXIso e ⋯)) +
      g.f i
have this : Hom.f (extendMap f e) (e.f i) =
  HAdd.hAdd (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i)) (β :=
      (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
      ((dNext (e.f i) :
            (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
          h.hom :
        (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
      ((prevD (e.f i) :
            (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
          h.hom :
        (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i)) +
    Hom.f (extendMap g e) (e.f i)
Tactic: have := h.comm (e.f i)
-- Lean 4 proof step from Mathlib.Algebra.Homology.Embedding.ExtendHomotopy (hypothesis)
Goal:
ι : Type u_1
ι' : Type u_2
c : ComplexShape ι
c' : ComplexShape ι'
C : Type u_3
inst : Category.{v_1, u_3} C
inst_1 : HasZeroObject.{v_1, u_3} C
inst_2 : Preadditive.{v_1, u_3} C
K L : HomologicalComplex.{v_1, u_3, u_1} C c
f g : K ⟶ L
e : c.Embedding c'
inst_3 : e.IsRelIff
h : Homotopy (C := K.extend e) (extendMap f e) (extendMap g e)
i : ι
this :
  Hom.f (extendMap f e) (e.f i) =
    HAdd.hAdd (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i)) (β :=
        (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
        ((dNext (e.f i) :
              (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
            h.hom :
          (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
        ((prevD (e.f i) :
              (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
            h.hom :
          (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i)) +
      Hom.f (extendMap g e) (e.f i)
⊢ f.f i =
    HAdd.hAdd (α := K.X i ⟶ L.X i)
        ((dNext i : (a : (i j : ι) → K.X i ⟶ L.X j) → K.X i ⟶ L.X i) fun (i j : ι) ↦
          Iso.inv (K.extendXIso e ⋯) ≫ h.hom (e.f i) (e.f j) ≫ Iso.hom (L.extendXIso e ⋯))
        ((prevD i : (a : (i j : ι) → K.X i ⟶ L.X j) → K.X i ⟶ L.X i) fun (i j : ι) ↦
          Iso.inv (K.extendXIso e ⋯) ≫ h.hom (e.f i) (e.f j) ≫ Iso.hom (L.extendXIso e ⋯)) +
      g.f i
have this₁ : Iso.hom (K.extendXIso e sorry) ≫ f.f i ≫ Iso.inv (L.extendXIso e sorry) =
  HAdd.hAdd (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i)) (β :=
      (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
      ((dNext (e.f i) :
            (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
          h.hom :
        (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
      ((prevD (e.f i) :
            (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
          h.hom :
        (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i)) +
    Iso.hom (K.extendXIso e sorry) ≫ g.f i ≫ Iso.inv (L.extendXIso e sorry)
Tactic: simp only [extendMap_f _ _ rfl] at this
Cleared hypotheses: this
-- Lean 4 proof step from Mathlib.Algebra.Homology.Embedding.ExtendHomotopy (goal)
Goal:
ι : Type u_1
ι' : Type u_2
c : ComplexShape ι
c' : ComplexShape ι'
C : Type u_3
inst : Category.{v_1, u_3} C
inst_1 : HasZeroObject.{v_1, u_3} C
inst_2 : Preadditive.{v_1, u_3} C
K L : HomologicalComplex.{v_1, u_3, u_1} C c
f g : K ⟶ L
e : c.Embedding c'
inst_3 : e.IsRelIff
h : Homotopy (C := K.extend e) (extendMap f e) (extendMap g e)
i : ι
this :
  Iso.hom (K.extendXIso e ⋯) ≫ f.f i ≫ Iso.inv (L.extendXIso e ⋯) =
    HAdd.hAdd (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i)) (β :=
        (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
        ((dNext (e.f i) :
              (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
            h.hom :
          (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
        ((prevD (e.f i) :
              (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
            h.hom :
          (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i)) +
      Iso.hom (K.extendXIso e ⋯) ≫ g.f i ≫ Iso.inv (L.extendXIso e ⋯)
⊢ f.f i =
    HAdd.hAdd (α := K.X i ⟶ L.X i)
        ((dNext i : (a : (i j : ι) → K.X i ⟶ L.X j) → K.X i ⟶ L.X i) fun (i j : ι) ↦
          Iso.inv (K.extendXIso e ⋯) ≫ h.hom (e.f i) (e.f j) ≫ Iso.hom (L.extendXIso e ⋯))
        ((prevD i : (a : (i j : ι) → K.X i ⟶ L.X j) → K.X i ⟶ L.X i) fun (i j : ι) ↦
          Iso.inv (K.extendXIso e ⋯) ≫ h.hom (e.f i) (e.f j) ≫ Iso.hom (L.extendXIso e ⋯)) +
      g.f i
have simp : HAdd.hAdd (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i)) (β := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
    ((dNext (e.f i) :
          (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
        h.hom :
      (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
    ((prevD (e.f i) :
          (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
        h.hom :
      (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i)) =
  HAdd.hAdd (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
    (Iso.hom (K.extendXIso e sorry) ≫
      ((dNext i : (a : (i j : ι) → K.X i ⟶ L.X j) → K.X i ⟶ L.X i) fun (i j : ι) ↦
          Iso.inv (K.extendXIso e sorry) ≫ h.hom (e.f i) (e.f j) ≫ Iso.hom (L.extendXIso e sorry)) ≫
        Iso.inv (L.extendXIso e sorry))
    (Iso.hom (K.extendXIso e sorry) ≫
      ((prevD i : (a : (i j : ι) → K.X i ⟶ L.X j) → K.X i ⟶ L.X i) fun (i j : ι) ↦
          Iso.inv (K.extendXIso e sorry) ≫ h.hom (e.f i) (e.f j) ≫ Iso.hom (L.extendXIso e sorry)) ≫
        Iso.inv (L.extendXIso e sorry))
Tactic: simp only [← cancel_mono (L.extendXIso e rfl).inv,
      ← cancel_epi (K.extendXIso e rfl).hom, this, Preadditive.add_comp,
      Preadditive.comp_add, add_left_inj]
-- Lean 4 proof step from Mathlib.Algebra.Homology.Embedding.ExtendHomotopy (goal)
Goal:
ι : Type u_1
ι' : Type u_2
c : ComplexShape ι
c' : ComplexShape ι'
C : Type u_3
inst : Category.{v_1, u_3} C
inst_1 : HasZeroObject.{v_1, u_3} C
inst_2 : Preadditive.{v_1, u_3} C
K L : HomologicalComplex.{v_1, u_3, u_1} C c
f g : K ⟶ L
e : c.Embedding c'
inst_3 : e.IsRelIff
h : Homotopy (C := K.extend e) (extendMap f e) (extendMap g e)
i : ι
this :
  Iso.hom (K.extendXIso e ⋯) ≫ f.f i ≫ Iso.inv (L.extendXIso e ⋯) =
    HAdd.hAdd (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i)) (β :=
        (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
        ((dNext (e.f i) :
              (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
            h.hom :
          (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
        ((prevD (e.f i) :
              (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
            h.hom :
          (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i)) +
      Iso.hom (K.extendXIso e ⋯) ≫ g.f i ≫ Iso.inv (L.extendXIso e ⋯)
⊢ HAdd.hAdd (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i)) (β :=
      (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
      ((dNext (e.f i) :
            (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
          h.hom :
        (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
      ((prevD (e.f i) :
            (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
          h.hom :
        (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i)) =
    HAdd.hAdd (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
      (Iso.hom (K.extendXIso e ⋯) ≫
        ((dNext i : (a : (i j : ι) → K.X i ⟶ L.X j) → K.X i ⟶ L.X i) fun (i j : ι) ↦
            Iso.inv (K.extendXIso e ⋯) ≫ h.hom (e.f i) (e.f j) ≫ Iso.hom (L.extendXIso e ⋯)) ≫
          Iso.inv (L.extendXIso e ⋯))
      (Iso.hom (K.extendXIso e ⋯) ≫
        ((prevD i : (a : (i j : ι) → K.X i ⟶ L.X j) → K.X i ⟶ L.X i) fun (i j : ι) ↦
            Iso.inv (K.extendXIso e ⋯) ≫ h.hom (e.f i) (e.f j) ≫ Iso.hom (L.extendXIso e ⋯)) ≫
          Iso.inv (L.extendXIso e ⋯))
have e_a : Eq.{v_1 + 1} (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
  ((dNext (e.f i) :
        (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
      h.hom :
    (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
  (Iso.hom (K.extendXIso e sorry) ≫
      ((dNext i : (a : (i j : ι) → K.X i ⟶ L.X j) → K.X i ⟶ L.X i) fun (i j : ι) ↦
          Iso.inv (K.extendXIso e sorry) ≫ h.hom (e.f i) (e.f j) ≫ Iso.hom (L.extendXIso e sorry)) ≫
        Iso.inv (L.extendXIso e sorry) :
    (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
Tactic: congr 1
-- Lean 4 proof step from Mathlib.Algebra.Homology.Embedding.ExtendHomotopy (goal)
Goal:
ι : Type u_1
ι' : Type u_2
c : ComplexShape ι
c' : ComplexShape ι'
C : Type u_3
inst : Category.{v_1, u_3} C
inst_1 : HasZeroObject.{v_1, u_3} C
inst_2 : Preadditive.{v_1, u_3} C
K L : HomologicalComplex.{v_1, u_3, u_1} C c
f g : K ⟶ L
e : c.Embedding c'
inst_3 : e.IsRelIff
h : Homotopy (C := K.extend e) (extendMap f e) (extendMap g e)
i : ι
this :
  Iso.hom (K.extendXIso e ⋯) ≫ f.f i ≫ Iso.inv (L.extendXIso e ⋯) =
    HAdd.hAdd (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i)) (β :=
        (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
        ((dNext (e.f i) :
              (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
            h.hom :
          (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
        ((prevD (e.f i) :
              (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
            h.hom :
          (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i)) +
      Iso.hom (K.extendXIso e ⋯) ≫ g.f i ≫ Iso.inv (L.extendXIso e ⋯)
⊢ Eq.{v_1 + 1} (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
    ((dNext (e.f i) :
          (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
        h.hom :
      (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
    (Iso.hom (K.extendXIso e ⋯) ≫
        ((dNext i : (a : (i j : ι) → K.X i ⟶ L.X j) → K.X i ⟶ L.X i) fun (i j : ι) ↦
            Iso.inv (K.extendXIso e ⋯) ≫ h.hom (e.f i) (e.f j) ≫ Iso.hom (L.extendXIso e ⋯)) ≫
          Iso.inv (L.extendXIso e ⋯) :
      (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
have pos : ∀ (hi : c.Rel i (c.next i)),
  Eq.{v_1 + 1} (α := (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
    ((dNext (e.f i) :
          (a : (i j : ι') → (K.extend e).X i ⟶ (L.extend e).X j) → (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
        h.hom :
      (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
    (Iso.hom (K.extendXIso e sorry) ≫
        ((dNext i : (a : (i j : ι) → K.X i ⟶ L.X j) → K.X i ⟶ L.X i) fun (i j : ι) ↦
            Iso.inv (K.extendXIso e sorry) ≫ h.hom (e.f i) (e.f j) ≫ Iso.hom (L.extendXIso e sorry)) ≫
          Iso.inv (L.extendXIso e sorry) :
      (K.extend e).X (e.f i) ⟶ (L.extend e).X (e.f i))
Tactic: by_cases hi : c.Rel i (c.next i)