-- Mathlib/CategoryTheory/Functor/OfSequence.lean
@[reassoc]
lemma map_comp (i j k : ℕ) (hij : i ≤ j) (hjk : j ≤ k) :
    map f i k (hij.trans hjk) = map f i j hij ≫ map f j k hjk

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
j : ℕ
hj :
  ∀ {X : ℕ → C} (f : (n : ℕ) → X n ⟶ X (n + 1)) (k : ℕ) (hij : 0 ≤ j) (hjk : j ≤ k),
    map f 0 k ⋯ = map f 0 j hij ≫ map f j k hjk
X : ℕ → C
f : (n : ℕ) → X n ⟶ X (n + 1)
k : ℕ
hij : 0 ≤ j + 1
hjk : j + 1 ≤ k + 1 + 1
⊢ 0 ≤ j

Tactic:
omega

Result:
no goals

Proof state:
case zero.zero
C : Type u_1
inst✝ : Category.{u_2, u_1} C
⊢ ∀ {X : ℕ → C} (f : (n : ℕ) → X n ⟶ X (n + 1)) (k : ℕ) (hij : 0 ≤ 0) (hjk : 0 ≤ k),
    map f 0 k ⋯ = map f 0 0 hij ≫ map f 0 k hjk

Tactic:
intros X f k hij hjk

Result:
case zero.zero
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X : ℕ → C
f : (n : ℕ) → X n ⟶ X (n + 1)
k : ℕ
hij : 0 ≤ 0
hjk : 0 ≤ k
⊢ map f 0 k ⋯ = map f 0 0 hij ≫ map f 0 k hjk

Proof state:
case zero.succ
C : Type u_1
inst✝ : Category.{u_2, u_1} C
j : ℕ
hj :
  ∀ {X : ℕ → C} (f : (n : ℕ) → X n ⟶ X (n + 1)) (k : ℕ) (hij : 0 ≤ j) (hjk : j ≤ k),
    map f 0 k ⋯ = map f 0 j hij ≫ map f j k hjk
⊢ ∀ {X : ℕ → C} (f : (n : ℕ) → X n ⟶ X (n + 1)) (k : ℕ) (hij : 0 ≤ j + 1) (hjk : j + 1 ≤ k),
    map f 0 k ⋯ = map f 0 (j + 1) hij ≫ map f (j + 1) k hjk

Tactic:
rintro X f (_|_|k) hij hjk

Result:
case zero.succ.zero
C : Type u_1
inst✝ : Category.{u_2, u_1} C
j : ℕ
hj :
  ∀ {X : ℕ → C} (f : (n : ℕ) → X n ⟶ X (n + 1)) (k : ℕ) (hij : 0 ≤ j) (hjk : j ≤ k),
    map f 0 k ⋯ = map f 0 j hij ≫ map f j k hjk
X : ℕ → C
f : (n : ℕ) → X n ⟶ X (n + 1)
hij : 0 ≤ j + 1
hjk : j + 1 ≤ 0
⊢ map f 0 0 ⋯ = map f 0 (j + 1) hij ≫ map f (j + 1) 0 hjk

case zero.succ.succ.zero
C : Type u_1
inst✝ : Category.{u_2, u_1} C
j : ℕ
hj :
  ∀ {X : ℕ → C} (f : (n : ℕ) → X n ⟶ X (n + 1)) (k : ℕ) (hij : 0 ≤ j) (hjk : j ≤ k),
    map f 0 k ⋯ = map f 0 j hij ≫ map f j k hjk
X : ℕ → C
f : (n : ℕ) → X n ⟶ X (n + 1)
hij : 0 ≤ j + 1
hjk : j + 1 ≤ 0 + 1
⊢ map f 0 (0 + 1) ⋯ = map f 0 (j + 1) hij ≫ map f (j + 1) (0 + 1) hjk

case zero.succ.succ.succ
C : Type u_1
inst✝ : Category.{u_2, u_1} C
j : ℕ
hj :
  ∀ {X : ℕ → C} (f : (n : ℕ) → X n ⟶ X (n + 1)) (k : ℕ) (hij : 0 ≤ j) (hjk : j ≤ k),
    map f 0 k ⋯ = map f 0 j hij ≫ map f j k hjk
X : ℕ → C
f : (n : ℕ) → X n ⟶ X (n + 1)
k : ℕ
hij : 0 ≤ j + 1
hjk : j + 1 ≤ k + 1 + 1
⊢ map f 0 (k + 1 + 1) ⋯ = map f 0 (j + 1) hij ≫ map f (j + 1) (k + 1 + 1) hjk

Proof state:
case zero.succ.succ.succ.zero
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X : ℕ → C
f : (n : ℕ) → X n ⟶ X (n + 1)
k : ℕ
hj :
  ∀ {X : ℕ → C} (f : (n : ℕ) → X n ⟶ X (n + 1)) (k : ℕ) (hij : 0 ≤ 0) (hjk : 0 ≤ k),
    map f 0 k ⋯ = map f 0 0 hij ≫ map f 0 k hjk
hij : 0 ≤ 0 + 1
hjk : 0 + 1 ≤ k + 1 + 1
⊢ f 0 ≫ map (fun n => f (n + 1)) 0 0 ⋯ ≫ map (fun n => f (n + 1)) 0 (k + 1) ⋯ =
    map f 0 (0 + 1) hij ≫ map (fun n => f (n + 1)) 0 (k + 1) ⋯

case zero.succ.succ.succ.succ
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X : ℕ → C
f : (n : ℕ) → X n ⟶ X (n + 1)
k j : ℕ
hj :
  ∀ {X : ℕ → C} (f : (n : ℕ) → X n ⟶ X (n + 1)) (k : ℕ) (hij : 0 ≤ j + 1) (hjk : j + 1 ≤ k),
    map f 0 k ⋯ = map f 0 (j + 1) hij ≫ map f (j + 1) k hjk
hij : 0 ≤ j + 1 + 1
hjk : j + 1 + 1 ≤ k + 1 + 1
⊢ f 0 ≫ map (fun n => f (n + 1)) 0 (j + 1) ⋯ ≫ map (fun n => f (n + 1)) (j + 1) (k + 1) ⋯ =
    map f 0 (j + 1 + 1) hij ≫ map (fun n => f (n + 1)) (j + 1) (k + 1) ⋯

Tactic:
all_goals simp [map]

Result:
no goals

Proof state:
case zero.succ.succ.succ
C : Type u_1
inst✝ : Category.{u_2, u_1} C
j : ℕ
hj :
  ∀ {X : ℕ → C} (f : (n : ℕ) → X n ⟶ X (n + 1)) (k : ℕ) (hij : 0 ≤ j) (hjk : j ≤ k),
    map f 0 k ⋯ = map f 0 j hij ≫ map f j k hjk
X : ℕ → C
f : (n : ℕ) → X n ⟶ X (n + 1)
k : ℕ
hij : 0 ≤ j + 1
hjk : j + 1 ≤ k + 1 + 1
⊢ f 0 ≫ map (fun n => f (n + 1)) 0 (k + 1) ⋯ = map f 0 (j + 1) hij ≫ map (fun n => f (n + 1)) j (k + 1) ⋯

Tactic:
rw [hj (fun n ↦ f (n + 1)) (k + 1) (by omega) (by omega)]

Result:
case zero.succ.succ.succ
C : Type u_1
inst✝ : Category.{u_2, u_1} C
j : ℕ
hj :
  ∀ {X : ℕ → C} (f : (n : ℕ) → X n ⟶ X (n + 1)) (k : ℕ) (hij : 0 ≤ j) (hjk : j ≤ k),
    map f 0 k ⋯ = map f 0 j hij ≫ map f j k hjk
X : ℕ → C
f : (n : ℕ) → X n ⟶ X (n + 1)
k : ℕ
hij : 0 ≤ j + 1
hjk : j + 1 ≤ k + 1 + 1
⊢ f 0 ≫ map (fun n => f (n + 1)) 0 j ⋯ ≫ map (fun n => f (n + 1)) j (k + 1) ⋯ =
    map f 0 (j + 1) hij ≫ map (fun n => f (n + 1)) j (k + 1) ⋯

Proof state:
case zero.succ.succ.zero
C : Type u_1
inst✝ : Category.{u_2, u_1} C
j : ℕ
hj :
  ∀ {X : ℕ → C} (f : (n : ℕ) → X n ⟶ X (n + 1)) (k : ℕ) (hij : 0 ≤ j) (hjk : j ≤ k),
    map f 0 k ⋯ = map f 0 j hij ≫ map f j k hjk
X : ℕ → C
f : (n : ℕ) → X n ⟶ X (n + 1)
hij : 0 ≤ j + 1
hjk : j + 1 ≤ 0 + 1
⊢ map f 0 (0 + 1) ⋯ = map f 0 (j + 1) hij ≫ map f (j + 1) (0 + 1) hjk

Tactic:
obtain rfl : j = 0 := by omega

Result:
case zero.succ.succ.zero
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X : ℕ → C
f : (n : ℕ) → X n ⟶ X (n + 1)
hj :
  ∀ {X : ℕ → C} (f : (n : ℕ) → X n ⟶ X (n + 1)) (k : ℕ) (hij : 0 ≤ 0) (hjk : 0 ≤ k),
    map f 0 k ⋯ = map f 0 0 hij ≫ map f 0 k hjk
hij : 0 ≤ 0 + 1
hjk : 0 + 1 ≤ 0 + 1
⊢ map f 0 (0 + 1) ⋯ = map f 0 (0 + 1) hij ≫ map f (0 + 1) (0 + 1) hjk

Proof state:
case succ.succ.zero
C : Type u_1
inst✝ : Category.{u_2, u_1} C
i : ℕ
hi :
  ∀ {X : ℕ → C} (f : (n : ℕ) → X n ⟶ X (n + 1)) (j k : ℕ) (hij : i ≤ j) (hjk : j ≤ k),
    map f i k ⋯ = map f i j hij ≫ map f j k hjk
X : ℕ → C
f : (n : ℕ) → X n ⟶ X (n + 1)
j : ℕ
⊢ ∀ (hij : i + 1 ≤ j + 1) (hjk : j + 1 ≤ 0), map f (i + 1) 0 ⋯ = map f (i + 1) (j + 1) hij ≫ map f (j + 1) 0 hjk

Tactic:
omega

Result:
no goals

Proof state:
case zero.succ.succ.succ.succ
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X : ℕ → C
f : (n : ℕ) → X n ⟶ X (n + 1)
k j : ℕ
hj :
  ∀ {X : ℕ → C} (f : (n : ℕ) → X n ⟶ X (n + 1)) (k : ℕ) (hij : 0 ≤ j + 1) (hjk : j + 1 ≤ k),
    map f 0 k ⋯ = map f 0 (j + 1) hij ≫ map f (j + 1) k hjk
hij : 0 ≤ j + 1 + 1
hjk : j + 1 + 1 ≤ k + 1 + 1
⊢ f 0 ≫ map (fun n => f (n + 1)) 0 (j + 1) ⋯ ≫ map (fun n => f (n + 1)) (j + 1) (k + 1) ⋯ =
    map f 0 (j + 1 + 1) hij ≫ map (fun n => f (n + 1)) (j + 1) (k + 1) ⋯

Tactic:
simp [map]

Result:
no goals

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
i : ℕ
hi :
  ∀ {X : ℕ → C} (f : (n : ℕ) → X n ⟶ X (n + 1)) (j k : ℕ) (hij : i ≤ j) (hjk : j ≤ k),
    map f i k ⋯ = map f i j hij ≫ map f j k hjk
X : ℕ → C
f : (n : ℕ) → X n ⟶ X (n + 1)
j k : ℕ
hij✝ : i + 1 ≤ j + 1
hjk✝ : j + 1 ≤ k + 1
⊢ j ≤ k

Tactic:
omega

Result:
no goals

Proof state:
case succ.succ.succ
C : Type u_1
inst✝ : Category.{u_2, u_1} C
i : ℕ
hi :
  ∀ {X : ℕ → C} (f : (n : ℕ) → X n ⟶ X (n + 1)) (j k : ℕ) (hij : i ≤ j) (hjk : j ≤ k),
    map f i k ⋯ = map f i j hij ≫ map f j k hjk
X : ℕ → C
f : (n : ℕ) → X n ⟶ X (n + 1)
j k : ℕ
⊢ ∀ (hij : i + 1 ≤ j + 1) (hjk : j + 1 ≤ k + 1),
    map f (i + 1) (k + 1) ⋯ = map f (i + 1) (j + 1) hij ≫ map f (j + 1) (k + 1) hjk

Tactic:
intros

Result:
case succ.succ.succ
C : Type u_1
inst✝ : Category.{u_2, u_1} C
i : ℕ
hi :
  ∀ {X : ℕ → C} (f : (n : ℕ) → X n ⟶ X (n + 1)) (j k : ℕ) (hij : i ≤ j) (hjk : j ≤ k),
    map f i k ⋯ = map f i j hij ≫ map f j k hjk
X : ℕ → C
f : (n : ℕ) → X n ⟶ X (n + 1)
j k : ℕ
hij✝ : i + 1 ≤ j + 1
hjk✝ : j + 1 ≤ k + 1
⊢ map f (i + 1) (k + 1) ⋯ = map f (i + 1) (j + 1) hij✝ ≫ map f (j + 1) (k + 1) hjk✝