l3lab/ntp-mathlib huggingface dataset:
/-- We can "augment" a cochain complex by inserting an arbitrary object in degree zero
(shifting everything else up), along with a suitable differential.
-/
def augment (C : CochainComplex V ℕ) {X : V} (f : X ⟶ C.X 0) (w : f ≫ C.d 0 1 = 0) :
    CochainComplex V ℕ where
  X | 0 => X
    | i + 1 => C.X i
  d | 0, 1 => f
    | i + 1, j + 1 => C.d i j
    | _, _ => 0
  shape i j s := by
    simp? at s says simp only [ComplexShape.up_Rel] at s
    rcases j with (_ | _ | j) <;> cases i <;> 

Proof state:
case succ.succ.succ
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
C : CochainComplex V ℕ
X : V
f : X ⟶ HomologicalComplex.X C 0
w : f ≫ d C 0 1 = 0
j n✝ : ℕ
s : ¬Nat.succ n✝ + 1 = Nat.succ (Nat.succ j)
⊢ (fun x x_1 =>
        match x, x_1 with
        | 0, 1 => f
        | Nat.succ i, Nat.succ j => d C i j
        | x, x_2 => 0)
      (Nat.succ n✝) (Nat.succ (Nat.succ j)) =
    0

Next tactic:
try simp
/-- We can "augment" a cochain complex by inserting an arbitrary object in degree zero
(shifting everything else up), along with a suitable differential.
-/
def augment (C : CochainComplex V ℕ) {X : V} (f : X ⟶ C.X 0) (w : f ≫ C.d 0 1 = 0) :
    CochainComplex V ℕ where
  X | 0 => X
    | i + 1 => C.X i
  d | 0, 1 => f
    | i + 1, j + 1 => C.d i j
    | _, _ => 0
  shape i j s := by
    simp? at s says simp only [ComplexShape.up_Rel] at s
    rcases j with (_ | _ | j) <;> cases i <;> try 

Proof state:
case succ.succ.succ
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
C : CochainComplex V ℕ
X : V
f : X ⟶ HomologicalComplex.X C 0
w : f ≫ d C 0 1 = 0
j n✝ : ℕ
s : ¬Nat.succ n✝ + 1 = Nat.succ (Nat.succ j)
⊢ (fun x x_1 =>
        match x, x_1 with
        | 0, 1 => f
        | Nat.succ i, Nat.succ j => d C i j
        | x, x_2 => 0)
      (Nat.succ n✝) (Nat.succ (Nat.succ j)) =
    0

Next tactic:
simp
/-- We can "augment" a cochain complex by inserting an arbitrary object in degree zero
(shifting everything else up), along with a suitable differential.
-/
def augment (C : CochainComplex V ℕ) {X : V} (f : X ⟶ C.X 0) (w : f ≫ C.d 0 1 = 0) :
    CochainComplex V ℕ where
  X | 0 => X
    | i + 1 => C.X i
  d | 0, 1 => f
    | i + 1, j + 1 => C.d i j
    | _, _ => 0
  shape i j s := by
    simp? at s says simp only [ComplexShape.up_Rel] at s
    rcases j with (_ | _ | j) <;> cases i <;> try simp
    · 

Proof state:
case succ.zero.zero
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
C : CochainComplex V ℕ
X : V
f : X ⟶ HomologicalComplex.X C 0
w : f ≫ d C 0 1 = 0
s : ¬Nat.zero + 1 = Nat.succ Nat.zero
⊢ f = 0

Next tactic:
contradiction
/-- We can "augment" a cochain complex by inserting an arbitrary object in degree zero
(shifting everything else up), along with a suitable differential.
-/
def augment (C : CochainComplex V ℕ) {X : V} (f : X ⟶ C.X 0) (w : f ≫ C.d 0 1 = 0) :
    CochainComplex V ℕ where
  X | 0 => X
    | i + 1 => C.X i
  d | 0, 1 => f
    | i + 1, j + 1 => C.d i j
    | _, _ => 0
  shape i j s := by
    simp? at s says simp only [ComplexShape.up_Rel] at s
    rcases j with (_ | _ | j) <;> cases i <;> try simp
    · contradiction
    · 

Proof state:
case succ.succ.succ
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
C : CochainComplex V ℕ
X : V
f : X ⟶ HomologicalComplex.X C 0
w : f ≫ d C 0 1 = 0
j n✝ : ℕ
s : ¬Nat.succ n✝ + 1 = Nat.succ (Nat.succ j)
⊢ d C n✝ (Nat.succ j) = 0

Next tactic:
rw [C.shape]
/-- We can "augment" a cochain complex by inserting an arbitrary object in degree zero
(shifting everything else up), along with a suitable differential.
-/
def augment (C : CochainComplex V ℕ) {X : V} (f : X ⟶ C.X 0) (w : f ≫ C.d 0 1 = 0) :
    CochainComplex V ℕ where
  X | 0 => X
    | i + 1 => C.X i
  d | 0, 1 => f
    | i + 1, j + 1 => C.d i j
    | _, _ => 0
  shape i j s := by
    simp? at s says simp only [ComplexShape.up_Rel] at s
    rcases j with (_ | _ | j) <;> cases i <;> try simp
    · contradiction
    · rw [C.shape]
      

Proof state:
case succ.succ.succ.a
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
C : CochainComplex V ℕ
X : V
f : X ⟶ HomologicalComplex.X C 0
w : f ≫ d C 0 1 = 0
j n✝ : ℕ
s : ¬Nat.succ n✝ + 1 = Nat.succ (Nat.succ j)
⊢ ¬ComplexShape.Rel (ComplexShape.up ℕ) n✝ (Nat.succ j)

Next tactic:
simp only [ComplexShape.up_Rel]
/-- We can "augment" a cochain complex by inserting an arbitrary object in degree zero
(shifting everything else up), along with a suitable differential.
-/
def augment (C : CochainComplex V ℕ) {X : V} (f : X ⟶ C.X 0) (w : f ≫ C.d 0 1 = 0) :
    CochainComplex V ℕ where
  X | 0 => X
    | i + 1 => C.X i
  d | 0, 1 => f
    | i + 1, j + 1 => C.d i j
    | _, _ => 0
  shape i j s := by
    simp? at s says simp only [ComplexShape.up_Rel] at s
    rcases j with (_ | _ | j) <;> cases i <;> try simp
    · contradiction
    · rw [C.shape]
      simp only [ComplexShape.up_Rel]
      

Proof state:
case succ.succ.succ.a
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
C : CochainComplex V ℕ
X : V
f : X ⟶ HomologicalComplex.X C 0
w : f ≫ d C 0 1 = 0
j n✝ : ℕ
s : ¬Nat.succ n✝ + 1 = Nat.succ (Nat.succ j)
⊢ ¬n✝ + 1 = Nat.succ j

Next tactic:
contrapose! s
/-- We can "augment" a cochain complex by inserting an arbitrary object in degree zero
(shifting everything else up), along with a suitable differential.
-/
def augment (C : CochainComplex V ℕ) {X : V} (f : X ⟶ C.X 0) (w : f ≫ C.d 0 1 = 0) :
    CochainComplex V ℕ where
  X | 0 => X
    | i + 1 => C.X i
  d | 0, 1 => f
    | i + 1, j + 1 => C.d i j
    | _, _ => 0
  shape i j s := by
    simp? at s says simp only [ComplexShape.up_Rel] at s
    rcases j with (_ | _ | j) <;> cases i <;> try simp
    · contradiction
    · rw [C.shape]
      simp only [ComplexShape.up_Rel]
      contrapose! s
      

Proof state:
case succ.succ.succ.a
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
C : CochainComplex V ℕ
X : V
f : X ⟶ HomologicalComplex.X C 0
w : f ≫ d C 0 1 = 0
j n✝ : ℕ
s : n✝ + 1 = Nat.succ j
⊢ Nat.succ n✝ + 1 = Nat.succ (Nat.succ j)

Next tactic:
rw [← s]
/-- We can "augment" a cochain complex by inserting an arbitrary object in degree zero
(shifting everything else up), along with a suitable differential.
-/
def augment (C : CochainComplex V ℕ) {X : V} (f : X ⟶ C.X 0) (w : f ≫ C.d 0 1 = 0) :
    CochainComplex V ℕ where
  X | 0 => X
    | i + 1 => C.X i
  d | 0, 1 => f
    | i + 1, j + 1 => C.d i j
    | _, _ => 0
  shape i j s := by
    simp? at s says simp only [ComplexShape.up_Rel] at s
    rcases j with (_ | _ | j) <;> cases i <;> try simp
    · contradiction
    · rw [C.shape]
      simp only [ComplexShape.up_Rel]
      contrapose! s
      rw [← s]
      

Proof state:
case succ.succ.succ.a
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
C : CochainComplex V ℕ
X : V
f : X ⟶ HomologicalComplex.X C 0
w : f ≫ d C 0 1 = 0
j n✝ : ℕ
s : n✝ + 1 = Nat.succ j
⊢ Nat.succ n✝ + 1 = Nat.succ (n✝ + 1)

Next tactic:
rfl
/-- We can "augment" a cochain complex by inserting an arbitrary object in degree zero
(shifting everything else up), along with a suitable differential.
-/
def augment (C : CochainComplex V ℕ) {X : V} (f : X ⟶ C.X 0) (w : f ≫ C.d 0 1 = 0) :
    CochainComplex V ℕ where
  X | 0 => X
    | i + 1 => C.X i
  d | 0, 1 => f
    | i + 1, j + 1 => C.d i j
    | _, _ => 0
  shape i j s := by
    simp? at s says simp only [ComplexShape.up_Rel] at s
    rcases j with (_ | _ | j) <;> cases i <;> try simp
    · contradiction
    · rw [C.shape]
      simp only [ComplexShape.up_Rel]
      contrapose! s
      rw [← s]
      rfl
  d_comp_d' i j k hij hjk := by
    

Proof state:
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
C : CochainComplex V ℕ
X : V
f : X ⟶ HomologicalComplex.X C 0
w : f ≫ d C 0 1 = 0
i j k : ℕ
hij : ComplexShape.Rel (ComplexShape.up ℕ) i j
hjk : ComplexShape.Rel (ComplexShape.up ℕ) j k
⊢ (fun x x_1 =>
          match x, x_1 with
          | 0, 1 => f
          | Nat.succ i, Nat.succ j => d C i j
          | x, x_2 => 0)
        i j ≫
      (fun x x_1 =>
          match x, x_1 with
          | 0, 1 => f
          | Nat.succ i, Nat.succ j => d C i j
          | x, x_2 => 0)
        j k =
    0

Next tactic:
rcases k with (_ | _ | k)
/-- We can "augment" a cochain complex by inserting an arbitrary object in degree zero
(shifting everything else up), along with a suitable differential.
-/
def augment (C : CochainComplex V ℕ) {X : V} (f : X ⟶ C.X 0) (w : f ≫ C.d 0 1 = 0) :
    CochainComplex V ℕ where
  X | 0 => X
    | i + 1 => C.X i
  d | 0, 1 => f
    | i + 1, j + 1 => C.d i j
    | _, _ => 0
  shape i j s := by
    simp? at s says simp only [ComplexShape.up_Rel] at s
    rcases j with (_ | _ | j) <;> cases i <;> try simp
    · contradiction
    · rw [C.shape]
      simp only [ComplexShape.up_Rel]
      contrapose! s
      rw [← s]
      rfl
  d_comp_d' i j k hij hjk := by
    rcases k with (_ | _ | k) <;> 

Proof state:
case zero
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
C : CochainComplex V ℕ
X : V
f : X ⟶ HomologicalComplex.X C 0
w : f ≫ d C 0 1 = 0
i j : ℕ
hij : ComplexShape.Rel (ComplexShape.up ℕ) i j
hjk : ComplexShape.Rel (ComplexShape.up ℕ) j Nat.zero
⊢ (fun x x_1 =>
          match x, x_1 with
          | 0, 1 => f
          | Nat.succ i, Nat.succ j => d C i j
          | x, x_2 => 0)
        i j ≫
      (fun x x_1 =>
          match x, x_1 with
          | 0, 1 => f
          | Nat.succ i, Nat.succ j => d C i j
          | x, x_2 => 0)
        j Nat.zero =
    0

Next tactic:
rcases j with (_ | _ | j)
/-- We can "augment" a cochain complex by inserting an arbitrary object in degree zero
(shifting everything else up), along with a suitable differential.
-/
def augment (C : CochainComplex V ℕ) {X : V} (f : X ⟶ C.X 0) (w : f ≫ C.d 0 1 = 0) :
    CochainComplex V ℕ where
  X | 0 => X
    | i + 1 => C.X i
  d | 0, 1 => f
    | i + 1, j + 1 => C.d i j
    | _, _ => 0
  shape i j s := by
    simp? at s says simp only [ComplexShape.up_Rel] at s
    rcases j with (_ | _ | j) <;> cases i <;> try simp
    · contradiction
    · rw [C.shape]
      simp only [ComplexShape.up_Rel]
      contrapose! s
      rw [← s]
      rfl
  d_comp_d' i j k hij hjk := by
    rcases k with (_ | _ | k) <;> 

Proof state:
case succ.zero
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
C : CochainComplex V ℕ
X : V
f : X ⟶ HomologicalComplex.X C 0
w : f ≫ d C 0 1 = 0
i j : ℕ
hij : ComplexShape.Rel (ComplexShape.up ℕ) i j
hjk : ComplexShape.Rel (ComplexShape.up ℕ) j (Nat.succ Nat.zero)
⊢ (fun x x_1 =>
          match x, x_1 with
          | 0, 1 => f
          | Nat.succ i, Nat.succ j => d C i j
          | x, x_2 => 0)
        i j ≫
      (fun x x_1 =>
          match x, x_1 with
          | 0, 1 => f
          | Nat.succ i, Nat.succ j => d C i j
          | x, x_2 => 0)
        j (Nat.succ Nat.zero) =
    0

Next tactic:
rcases j with (_ | _ | j)
/-- We can "augment" a cochain complex by inserting an arbitrary object in degree zero
(shifting everything else up), along with a suitable differential.
-/
def augment (C : CochainComplex V ℕ) {X : V} (f : X ⟶ C.X 0) (w : f ≫ C.d 0 1 = 0) :
    CochainComplex V ℕ where
  X | 0 => X
    | i + 1 => C.X i
  d | 0, 1 => f
    | i + 1, j + 1 => C.d i j
    | _, _ => 0
  shape i j s := by
    simp? at s says simp only [ComplexShape.up_Rel] at s
    rcases j with (_ | _ | j) <;> cases i <;> try simp
    · contradiction
    · rw [C.shape]
      simp only [ComplexShape.up_Rel]
      contrapose! s
      rw [← s]
      rfl
  d_comp_d' i j k hij hjk := by
    rcases k with (_ | _ | k) <;> 

Proof state:
case succ.succ
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
C : CochainComplex V ℕ
X : V
f : X ⟶ HomologicalComplex.X C 0
w : f ≫ d C 0 1 = 0
i j : ℕ
hij : ComplexShape.Rel (ComplexShape.up ℕ) i j
k : ℕ
hjk : ComplexShape.Rel (ComplexShape.up ℕ) j (Nat.succ (Nat.succ k))
⊢ (fun x x_1 =>
          match x, x_1 with
          | 0, 1 => f
          | Nat.succ i, Nat.succ j => d C i j
          | x, x_2 => 0)
        i j ≫
      (fun x x_1 =>
          match x, x_1 with
          | 0, 1 => f
          | Nat.succ i, Nat.succ j => d C i j
          | x, x_2 => 0)
        j (Nat.succ (Nat.succ k)) =
    0

Next tactic:
rcases j with (_ | _ | j)
/-- We can "augment" a cochain complex by inserting an arbitrary object in degree zero
(shifting everything else up), along with a suitable differential.
-/
def augment (C : CochainComplex V ℕ) {X : V} (f : X ⟶ C.X 0) (w : f ≫ C.d 0 1 = 0) :
    CochainComplex V ℕ where
  X | 0 => X
    | i + 1 => C.X i
  d | 0, 1 => f
    | i + 1, j + 1 => C.d i j
    | _, _ => 0
  shape i j s := by
    simp? at s says simp only [ComplexShape.up_Rel] at s
    rcases j with (_ | _ | j) <;> cases i <;> try simp
    · contradiction
    · rw [C.shape]
      simp only [ComplexShape.up_Rel]
      contrapose! s
      rw [← s]
      rfl
  d_comp_d' i j k hij hjk := by
    rcases k with (_ | _ | k) <;> rcases j with (_ | _ | j) <;> 

Proof state:
case zero.zero
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
C : CochainComplex V ℕ
X : V
f : X ⟶ HomologicalComplex.X C 0
w : f ≫ d C 0 1 = 0
i : ℕ
hij : ComplexShape.Rel (ComplexShape.up ℕ) i Nat.zero
hjk : ComplexShape.Rel (ComplexShape.up ℕ) Nat.zero Nat.zero
⊢ (fun x x_1 =>
          match x, x_1 with
          | 0, 1 => f
          | Nat.succ i, Nat.succ j => d C i j
          | x, x_2 => 0)
        i Nat.zero ≫
      (fun x x_1 =>
          match x, x_1 with
          | 0, 1 => f
          | Nat.succ i, Nat.succ j => d C i j
          | x, x_2 => 0)
        Nat.zero Nat.zero =
    0

Next tactic:
cases i
/-- We can "augment" a cochain complex by inserting an arbitrary object in degree zero
(shifting everything else up), along with a suitable differential.
-/
def augment (C : CochainComplex V ℕ) {X : V} (f : X ⟶ C.X 0) (w : f ≫ C.d 0 1 = 0) :
    CochainComplex V ℕ where
  X | 0 => X
    | i + 1 => C.X i
  d | 0, 1 => f
    | i + 1, j + 1 => C.d i j
    | _, _ => 0
  shape i j s := by
    simp? at s says simp only [ComplexShape.up_Rel] at s
    rcases j with (_ | _ | j) <;> cases i <;> try simp
    · contradiction
    · rw [C.shape]
      simp only [ComplexShape.up_Rel]
      contrapose! s
      rw [← s]
      rfl
  d_comp_d' i j k hij hjk := by
    rcases k with (_ | _ | k) <;> rcases j with (_ | _ | j) <;> 

Proof state:
case zero.succ.zero
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
C : CochainComplex V ℕ
X : V
f : X ⟶ HomologicalComplex.X C 0
w : f ≫ d C 0 1 = 0
i : ℕ
hij : ComplexShape.Rel (ComplexShape.up ℕ) i (Nat.succ Nat.zero)
hjk : ComplexShape.Rel (ComplexShape.up ℕ) (Nat.succ Nat.zero) Nat.zero
⊢ (fun x x_1 =>
          match x, x_1 with
          | 0, 1 => f
          | Nat.succ i, Nat.succ j => d C i j
          | x, x_2 => 0)
        i (Nat.succ Nat.zero) ≫
      (fun x x_1 =>
          match x, x_1 with
          | 0, 1 => f
          | Nat.succ i, Nat.succ j => d C i j
          | x, x_2 => 0)
        (Nat.succ Nat.zero) Nat.zero =
    0

Next tactic:
cases i
/-- We can "augment" a cochain complex by inserting an arbitrary object in degree zero
(shifting everything else up), along with a suitable differential.
-/
def augment (C : CochainComplex V ℕ) {X : V} (f : X ⟶ C.X 0) (w : f ≫ C.d 0 1 = 0) :
    CochainComplex V ℕ where
  X | 0 => X
    | i + 1 => C.X i
  d | 0, 1 => f
    | i + 1, j + 1 => C.d i j
    | _, _ => 0
  shape i j s := by
    simp? at s says simp only [ComplexShape.up_Rel] at s
    rcases j with (_ | _ | j) <;> cases i <;> try simp
    · contradiction
    · rw [C.shape]
      simp only [ComplexShape.up_Rel]
      contrapose! s
      rw [← s]
      rfl
  d_comp_d' i j k hij hjk := by
    rcases k with (_ | _ | k) <;> rcases j with (_ | _ | j) <;> 

Proof state:
case zero.succ.succ
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
C : CochainComplex V ℕ
X : V
f : X ⟶ HomologicalComplex.X C 0
w : f ≫ d C 0 1 = 0
i j : ℕ
hij : ComplexShape.Rel (ComplexShape.up ℕ) i (Nat.succ (Nat.succ j))
hjk : ComplexShape.Rel (ComplexShape.up ℕ) (Nat.succ (Nat.succ j)) Nat.zero
⊢ (fun x x_1 =>
          match x, x_1 with
          | 0, 1 => f
          | Nat.succ i, Nat.succ j => d C i j
          | x, x_2 => 0)
        i (Nat.succ (Nat.succ j)) ≫
      (fun x x_1 =>
          match x, x_1 with
          | 0, 1 => f
          | Nat.succ i, Nat.succ j => d C i j
          | x, x_2 => 0)
        (Nat.succ (Nat.succ j)) Nat.zero =
    0

Next tactic:
cases i
/-- We can "augment" a cochain complex by inserting an arbitrary object in degree zero
(shifting everything else up), along with a suitable differential.
-/
def augment (C : CochainComplex V ℕ) {X : V} (f : X ⟶ C.X 0) (w : f ≫ C.d 0 1 = 0) :
    CochainComplex V ℕ where
  X | 0 => X
    | i + 1 => C.X i
  d | 0, 1 => f
    | i + 1, j + 1 => C.d i j
    | _, _ => 0
  shape i j s := by
    simp? at s says simp only [ComplexShape.up_Rel] at s
    rcases j with (_ | _ | j) <;> cases i <;> try simp
    · contradiction
    · rw [C.shape]
      simp only [ComplexShape.up_Rel]
      contrapose! s
      rw [← s]
      rfl
  d_comp_d' i j k hij hjk := by
    rcases k with (_ | _ | k) <;> rcases j with (_ | _ | j) <;> 

Proof state:
case succ.zero.zero
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
C : CochainComplex V ℕ
X : V
f : X ⟶ HomologicalComplex.X C 0
w : f ≫ d C 0 1 = 0
i : ℕ
hij : ComplexShape.Rel (ComplexShape.up ℕ) i Nat.zero
hjk : ComplexShape.Rel (ComplexShape.up ℕ) Nat.zero (Nat.succ Nat.zero)
⊢ (fun x x_1 =>
          match x, x_1 with
          | 0, 1 => f
          | Nat.succ i, Nat.succ j => d C i j
          | x, x_2 => 0)
        i Nat.zero ≫
      (fun x x_1 =>
          match x, x_1 with
          | 0, 1 => f
          | Nat.succ i, Nat.succ j => d C i j
          | x, x_2 => 0)
        Nat.zero (Nat.succ Nat.zero) =
    0

Next tactic:
cases i
/-- We can "augment" a cochain complex by inserting an arbitrary object in degree zero
(shifting everything else up), along with a suitable differential.
-/
def augment (C : CochainComplex V ℕ) {X : V} (f : X ⟶ C.X 0) (w : f ≫ C.d 0 1 = 0) :
    CochainComplex V ℕ where
  X | 0 => X
    | i + 1 => C.X i
  d | 0, 1 => f
    | i + 1, j + 1 => C.d i j
    | _, _ => 0
  shape i j s := by
    simp? at s says simp only [ComplexShape.up_Rel] at s
    rcases j with (_ | _ | j) <;> cases i <;> try simp
    · contradiction
    · rw [C.shape]
      simp only [ComplexShape.up_Rel]
      contrapose! s
      rw [← s]
      rfl
  d_comp_d' i j k hij hjk := by
    rcases k with (_ | _ | k) <;> rcases j with (_ | _ | j) <;> 

Proof state:
case succ.zero.succ.zero
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
C : CochainComplex V ℕ
X : V
f : X ⟶ HomologicalComplex.X C 0
w : f ≫ d C 0 1 = 0
i : ℕ
hij : ComplexShape.Rel (ComplexShape.up ℕ) i (Nat.succ Nat.zero)
hjk : ComplexShape.Rel (ComplexShape.up ℕ) (Nat.succ Nat.zero) (Nat.succ Nat.zero)
⊢ (fun x x_1 =>
          match x, x_1 with
          | 0, 1 => f
          | Nat.succ i, Nat.succ j => d C i j
          | x, x_2 => 0)
        i (Nat.succ Nat.zero) ≫
      (fun x x_1 =>
          match x, x_1 with
          | 0, 1 => f
          | Nat.succ i, Nat.succ j => d C i j
          | x, x_2 => 0)
        (Nat.succ Nat.zero) (Nat.succ Nat.zero) =
    0

Next tactic:
cases i
/-- We can "augment" a cochain complex by inserting an arbitrary object in degree zero
(shifting everything else up), along with a suitable differential.
-/
def augment (C : CochainComplex V ℕ) {X : V} (f : X ⟶ C.X 0) (w : f ≫ C.d 0 1 = 0) :
    CochainComplex V ℕ where
  X | 0 => X
    | i + 1 => C.X i
  d | 0, 1 => f
    | i + 1, j + 1 => C.d i j
    | _, _ => 0
  shape i j s := by
    simp? at s says simp only [ComplexShape.up_Rel] at s
    rcases j with (_ | _ | j) <;> cases i <;> try simp
    · contradiction
    · rw [C.shape]
      simp only [ComplexShape.up_Rel]
      contrapose! s
      rw [← s]
      rfl
  d_comp_d' i j k hij hjk := by
    rcases k with (_ | _ | k) <;> rcases j with (_ | _ | j) <;> 

Proof state:
case succ.zero.succ.succ
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
C : CochainComplex V ℕ
X : V
f : X ⟶ HomologicalComplex.X C 0
w : f ≫ d C 0 1 = 0
i j : ℕ
hij : ComplexShape.Rel (ComplexShape.up ℕ) i (Nat.succ (Nat.succ j))
hjk : ComplexShape.Rel (ComplexShape.up ℕ) (Nat.succ (Nat.succ j)) (Nat.succ Nat.zero)
⊢ (fun x x_1 =>
          match x, x_1 with
          | 0, 1 => f
          | Nat.succ i, Nat.succ j => d C i j
          | x, x_2 => 0)
        i (Nat.succ (Nat.succ j)) ≫
      (fun x x_1 =>
          match x, x_1 with
          | 0, 1 => f
          | Nat.succ i, Nat.succ j => d C i j
          | x, x_2 => 0)
        (Nat.succ (Nat.succ j)) (Nat.succ Nat.zero) =
    0

Next tactic:
cases i
/-- We can "augment" a cochain complex by inserting an arbitrary object in degree zero
(shifting everything else up), along with a suitable differential.
-/
def augment (C : CochainComplex V ℕ) {X : V} (f : X ⟶ C.X 0) (w : f ≫ C.d 0 1 = 0) :
    CochainComplex V ℕ where
  X | 0 => X
    | i + 1 => C.X i
  d | 0, 1 => f
    | i + 1, j + 1 => C.d i j
    | _, _ => 0
  shape i j s := by
    simp? at s says simp only [ComplexShape.up_Rel] at s
    rcases j with (_ | _ | j) <;> cases i <;> try simp
    · contradiction
    · rw [C.shape]
      simp only [ComplexShape.up_Rel]
      contrapose! s
      rw [← s]
      rfl
  d_comp_d' i j k hij hjk := by
    rcases k with (_ | _ | k) <;> rcases j with (_ | _ | j) <;> 

Proof state:
case succ.succ.zero
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
C : CochainComplex V ℕ
X : V
f : X ⟶ HomologicalComplex.X C 0
w : f ≫ d C 0 1 = 0
i k : ℕ
hij : ComplexShape.Rel (ComplexShape.up ℕ) i Nat.zero
hjk : ComplexShape.Rel (ComplexShape.up ℕ) Nat.zero (Nat.succ (Nat.succ k))
⊢ (fun x x_1 =>
          match x, x_1 with
          | 0, 1 => f
          | Nat.succ i, Nat.succ j => d C i j
          | x, x_2 => 0)
        i Nat.zero ≫
      (fun x x_1 =>
          match x, x_1 with
          | 0, 1 => f
          | Nat.succ i, Nat.succ j => d C i j
          | x, x_2 => 0)
        Nat.zero (Nat.succ (Nat.succ k)) =
    0

Next tactic:
cases i
/-- We can "augment" a cochain complex by inserting an arbitrary object in degree zero
(shifting everything else up), along with a suitable differential.
-/
def augment (C : CochainComplex V ℕ) {X : V} (f : X ⟶ C.X 0) (w : f ≫ C.d 0 1 = 0) :
    CochainComplex V ℕ where
  X | 0 => X
    | i + 1 => C.X i
  d | 0, 1 => f
    | i + 1, j + 1 => C.d i j
    | _, _ => 0
  shape i j s := by
    simp? at s says simp only [ComplexShape.up_Rel] at s
    rcases j with (_ | _ | j) <;> cases i <;> try simp
    · contradiction
    · rw [C.shape]
      simp only [ComplexShape.up_Rel]
      contrapose! s
      rw [← s]
      rfl
  d_comp_d' i j k hij hjk := by
    rcases k with (_ | _ | k) <;> rcases j with (_ | _ | j) <;> 

Proof state:
case succ.succ.succ.zero
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
C : CochainComplex V ℕ
X : V
f : X ⟶ HomologicalComplex.X C 0
w : f ≫ d C 0 1 = 0
i k : ℕ
hij : ComplexShape.Rel (ComplexShape.up ℕ) i (Nat.succ Nat.zero)
hjk : ComplexShape.Rel (ComplexShape.up ℕ) (Nat.succ Nat.zero) (Nat.succ (Nat.succ k))
⊢ (fun x x_1 =>
          match x, x_1 with
          | 0, 1 => f
          | Nat.succ i, Nat.succ j => d C i j
          | x, x_2 => 0)
        i (Nat.succ Nat.zero) ≫
      (fun x x_1 =>
          match x, x_1 with
          | 0, 1 => f
          | Nat.succ i, Nat.succ j => d C i j
          | x, x_2 => 0)
        (Nat.succ Nat.zero) (Nat.succ (Nat.succ k)) =
    0

Next tactic:
cases i