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 <;> 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.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 k 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.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.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.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) <;> cases i <;> 

Proof state:
case zero.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
hjk hij : 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)
        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)
        Nat.zero Nat.zero =
    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 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) <;> cases i <;> try 

Proof state:
case zero.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
hjk hij : 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)
        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)
        Nat.zero Nat.zero =
    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
    · 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) <;> cases i <;> 

Proof state:
case zero.zero.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
hjk : ComplexShape.Rel (ComplexShape.up ℕ) Nat.zero Nat.zero
n✝ : ℕ
hij : ComplexShape.Rel (ComplexShape.up ℕ) (Nat.succ n✝) 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 n✝) 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:
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 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) <;> cases i <;> try 

Proof state:
case zero.zero.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
hjk : ComplexShape.Rel (ComplexShape.up ℕ) Nat.zero Nat.zero
n✝ : ℕ
hij : ComplexShape.Rel (ComplexShape.up ℕ) (Nat.succ n✝) 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 n✝) 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:
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
    · 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) <;> cases i <;> 

Proof state:
case zero.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
hjk : ComplexShape.Rel (ComplexShape.up ℕ) (Nat.succ Nat.zero) Nat.zero
hij : 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)
        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)
        (Nat.succ Nat.zero) Nat.zero =
    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 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) <;> cases i <;> try 

Proof state:
case zero.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
hjk : ComplexShape.Rel (ComplexShape.up ℕ) (Nat.succ Nat.zero) Nat.zero
hij : 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)
        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)
        (Nat.succ Nat.zero) Nat.zero =
    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
    · 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) <;> cases i <;> 

Proof state:
case zero.succ.zero.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
hjk : ComplexShape.Rel (ComplexShape.up ℕ) (Nat.succ Nat.zero) Nat.zero
n✝ : ℕ
hij : ComplexShape.Rel (ComplexShape.up ℕ) (Nat.succ n✝) (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 n✝) (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:
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 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) <;> cases i <;> try 

Proof state:
case zero.succ.zero.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
hjk : ComplexShape.Rel (ComplexShape.up ℕ) (Nat.succ Nat.zero) Nat.zero
n✝ : ℕ
hij : ComplexShape.Rel (ComplexShape.up ℕ) (Nat.succ n✝) (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 n✝) (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:
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
    · 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) <;> cases i <;> 

Proof state:
case zero.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
j : ℕ
hjk : ComplexShape.Rel (ComplexShape.up ℕ) (Nat.succ (Nat.succ j)) Nat.zero
hij : ComplexShape.Rel (ComplexShape.up ℕ) Nat.zero (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.zero (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:
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 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) <;> cases i <;> try 

Proof state:
case zero.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
j : ℕ
hjk : ComplexShape.Rel (ComplexShape.up ℕ) (Nat.succ (Nat.succ j)) Nat.zero
hij : ComplexShape.Rel (ComplexShape.up ℕ) Nat.zero (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.zero (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:
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
    · 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) <;> cases i <;> 

Proof state:
case zero.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 : ℕ
hjk : ComplexShape.Rel (ComplexShape.up ℕ) (Nat.succ (Nat.succ j)) Nat.zero
n✝ : ℕ
hij : ComplexShape.Rel (ComplexShape.up ℕ) (Nat.succ n✝) (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)) ≫
      (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:
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 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) <;> cases i <;> try 

Proof state:
case zero.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 : ℕ
hjk : ComplexShape.Rel (ComplexShape.up ℕ) (Nat.succ (Nat.succ j)) Nat.zero
n✝ : ℕ
hij : ComplexShape.Rel (ComplexShape.up ℕ) (Nat.succ n✝) (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)) ≫
      (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:
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
    · 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) <;> cases i <;> 

Proof state:
case succ.zero.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
hjk : ComplexShape.Rel (ComplexShape.up ℕ) Nat.zero (Nat.succ Nat.zero)
hij : 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)
        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)
        Nat.zero (Nat.succ Nat.zero) =
    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 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) <;> cases i <;> try 

Proof state:
case succ.zero.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
hjk : ComplexShape.Rel (ComplexShape.up ℕ) Nat.zero (Nat.succ Nat.zero)
hij : 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)
        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)
        Nat.zero (Nat.succ Nat.zero) =
    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
    · 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) <;> cases i <;> 

Proof state:
case succ.zero.zero.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
hjk : ComplexShape.Rel (ComplexShape.up ℕ) Nat.zero (Nat.succ Nat.zero)
n✝ : ℕ
hij : ComplexShape.Rel (ComplexShape.up ℕ) (Nat.succ n✝) 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 n✝) 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:
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 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) <;> cases i <;> try 

Proof state:
case succ.zero.zero.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
hjk : ComplexShape.Rel (ComplexShape.up ℕ) Nat.zero (Nat.succ Nat.zero)
n✝ : ℕ
hij : ComplexShape.Rel (ComplexShape.up ℕ) (Nat.succ n✝) 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 n✝) 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:
simp