l3lab/ntp-mathlib huggingface dataset:
theorem sign_prodCongrLeft (σ : α → Perm β) : sign (prodCongrLeft σ) = ∏ k, sign (σ k) := by
  refine' (sign_eq_sign_of_equiv _ _ (prodComm β α) _).trans (sign_prodCongrRight σ)
  rintro ⟨b, α⟩
  

Proof state:
case mk
α✝ : Type u
β : Type v
inst✝³ : DecidableEq α✝
inst✝² : Fintype α✝
inst✝¹ : DecidableEq β
inst✝ : Fintype β
σ : α✝ → Perm β
b : β
α : α✝
⊢ (prodComm β α✝) ((prodCongrLeft σ) (b, α)) = (prodCongrRight σ) ((prodComm β α✝) (b, α))

Next tactic:
rfl
@[simp]
theorem sign_permCongr (e : α ≃ β) (p : Perm α) : sign (e.permCongr p) = sign p :=
  sign_eq_sign_of_equiv _ _ e.symm (by 

Proof state:
α : Type u
β : Type v
inst✝³ : DecidableEq α
inst✝² : Fintype α
inst✝¹ : DecidableEq β
inst✝ : Fintype β
e : α ≃ β
p : Perm α
⊢ ∀ (x : β), e.symm (((permCongr e) p) x) = p (e.symm x)

Next tactic:
simp
@[simp]
theorem sign_sumCongr (σa : Perm α) (σb : Perm β) : sign (sumCongr σa σb) = sign σa * sign σb := by
  

Proof state:
α : Type u
β : Type v
inst✝³ : DecidableEq α
inst✝² : Fintype α
inst✝¹ : DecidableEq β
inst✝ : Fintype β
σa : Perm α
σb : Perm β
⊢ sign (sumCongr σa σb) = sign σa * sign σb

Next tactic:
suffices sign (sumCongr σa (1 : Perm β)) = sign σa ∧ sign (sumCongr (1 : Perm α) σb) = sign σb
    by rw [← this.1, ← this.2, ← sign_mul, sumCongr_mul, one_mul, mul_one]
@[simp]
theorem sign_sumCongr (σa : Perm α) (σb : Perm β) : sign (sumCongr σa σb) = sign σa * sign σb := by
  suffices sign (sumCongr σa (1 : Perm β)) = sign σa ∧ sign (sumCongr (1 : Perm α) σb) = sign σb
    by 

Proof state:
α : Type u
β : Type v
inst✝³ : DecidableEq α
inst✝² : Fintype α
inst✝¹ : DecidableEq β
inst✝ : Fintype β
σa : Perm α
σb : Perm β
this : sign (sumCongr σa 1) = sign σa ∧ sign (sumCongr 1 σb) = sign σb
⊢ sign (sumCongr σa σb) = sign σa * sign σb

Next tactic:
rw [← this.1, ← this.2, ← sign_mul, sumCongr_mul, one_mul, mul_one]
@[simp]
theorem sign_sumCongr (σa : Perm α) (σb : Perm β) : sign (sumCongr σa σb) = sign σa * sign σb := by
  suffices sign (sumCongr σa (1 : Perm β)) = sign σa ∧ sign (sumCongr (1 : Perm α) σb) = sign σb
    by rw [← this.1, ← this.2, ← sign_mul, sumCongr_mul, one_mul, mul_one]
  

Proof state:
α : Type u
β : Type v
inst✝³ : DecidableEq α
inst✝² : Fintype α
inst✝¹ : DecidableEq β
inst✝ : Fintype β
σa : Perm α
σb : Perm β
⊢ sign (sumCongr σa 1) = sign σa ∧ sign (sumCongr 1 σb) = sign σb

Next tactic:
constructor
@[simp]
theorem sign_sumCongr (σa : Perm α) (σb : Perm β) : sign (sumCongr σa σb) = sign σa * sign σb := by
  suffices sign (sumCongr σa (1 : Perm β)) = sign σa ∧ sign (sumCongr (1 : Perm α) σb) = sign σb
    by rw [← this.1, ← this.2, ← sign_mul, sumCongr_mul, one_mul, mul_one]
  constructor
  · 

Proof state:
case left
α : Type u
β : Type v
inst✝³ : DecidableEq α
inst✝² : Fintype α
inst✝¹ : DecidableEq β
inst✝ : Fintype β
σa : Perm α
σb : Perm β
⊢ sign (sumCongr σa 1) = sign σa

Next tactic:
refine' σa.swap_induction_on ?_ fun σa' a₁ a₂ ha ih => ?_
@[simp]
theorem sign_sumCongr (σa : Perm α) (σb : Perm β) : sign (sumCongr σa σb) = sign σa * sign σb := by
  suffices sign (sumCongr σa (1 : Perm β)) = sign σa ∧ sign (sumCongr (1 : Perm α) σb) = sign σb
    by rw [← this.1, ← this.2, ← sign_mul, sumCongr_mul, one_mul, mul_one]
  constructor
  · refine' σa.swap_induction_on ?_ fun σa' a₁ a₂ ha ih => ?_
    · 

Proof state:
case left.refine'_1
α : Type u
β : Type v
inst✝³ : DecidableEq α
inst✝² : Fintype α
inst✝¹ : DecidableEq β
inst✝ : Fintype β
σa : Perm α
σb : Perm β
⊢ sign (sumCongr 1 1) = sign 1

Next tactic:
simp
@[simp]
theorem sign_sumCongr (σa : Perm α) (σb : Perm β) : sign (sumCongr σa σb) = sign σa * sign σb := by
  suffices sign (sumCongr σa (1 : Perm β)) = sign σa ∧ sign (sumCongr (1 : Perm α) σb) = sign σb
    by rw [← this.1, ← this.2, ← sign_mul, sumCongr_mul, one_mul, mul_one]
  constructor
  · refine' σa.swap_induction_on ?_ fun σa' a₁ a₂ ha ih => ?_
    · simp
    · 

Proof state:
case left.refine'_2
α : Type u
β : Type v
inst✝³ : DecidableEq α
inst✝² : Fintype α
inst✝¹ : DecidableEq β
inst✝ : Fintype β
σa : Perm α
σb : Perm β
σa' : Perm α
a₁ a₂ : α
ha : a₁ ≠ a₂
ih : sign (sumCongr σa' 1) = sign σa'
⊢ sign (sumCongr (swap a₁ a₂ * σa') 1) = sign (swap a₁ a₂ * σa')

Next tactic:
rw [← one_mul (1 : Perm β), ← sumCongr_mul, sign_mul, sign_mul, ih, sumCongr_swap_one,
        sign_swap ha, sign_swap (Sum.inl_injective.ne_iff.mpr ha)]
@[simp]
theorem sign_sumCongr (σa : Perm α) (σb : Perm β) : sign (sumCongr σa σb) = sign σa * sign σb := by
  suffices sign (sumCongr σa (1 : Perm β)) = sign σa ∧ sign (sumCongr (1 : Perm α) σb) = sign σb
    by rw [← this.1, ← this.2, ← sign_mul, sumCongr_mul, one_mul, mul_one]
  constructor
  · refine' σa.swap_induction_on ?_ fun σa' a₁ a₂ ha ih => ?_
    · simp
    · rw [← one_mul (1 : Perm β), ← sumCongr_mul, sign_mul, sign_mul, ih, sumCongr_swap_one,
        sign_swap ha, sign_swap (Sum.inl_injective.ne_iff.mpr ha)]
  · 

Proof state:
case right
α : Type u
β : Type v
inst✝³ : DecidableEq α
inst✝² : Fintype α
inst✝¹ : DecidableEq β
inst✝ : Fintype β
σa : Perm α
σb : Perm β
⊢ sign (sumCongr 1 σb) = sign σb

Next tactic:
refine' σb.swap_induction_on ?_ fun σb' b₁ b₂ hb ih => ?_
@[simp]
theorem sign_sumCongr (σa : Perm α) (σb : Perm β) : sign (sumCongr σa σb) = sign σa * sign σb := by
  suffices sign (sumCongr σa (1 : Perm β)) = sign σa ∧ sign (sumCongr (1 : Perm α) σb) = sign σb
    by rw [← this.1, ← this.2, ← sign_mul, sumCongr_mul, one_mul, mul_one]
  constructor
  · refine' σa.swap_induction_on ?_ fun σa' a₁ a₂ ha ih => ?_
    · simp
    · rw [← one_mul (1 : Perm β), ← sumCongr_mul, sign_mul, sign_mul, ih, sumCongr_swap_one,
        sign_swap ha, sign_swap (Sum.inl_injective.ne_iff.mpr ha)]
  · refine' σb.swap_induction_on ?_ fun σb' b₁ b₂ hb ih => ?_
    · 

Proof state:
case right.refine'_1
α : Type u
β : Type v
inst✝³ : DecidableEq α
inst✝² : Fintype α
inst✝¹ : DecidableEq β
inst✝ : Fintype β
σa : Perm α
σb : Perm β
⊢ sign (sumCongr 1 1) = sign 1

Next tactic:
simp
@[simp]
theorem sign_sumCongr (σa : Perm α) (σb : Perm β) : sign (sumCongr σa σb) = sign σa * sign σb := by
  suffices sign (sumCongr σa (1 : Perm β)) = sign σa ∧ sign (sumCongr (1 : Perm α) σb) = sign σb
    by rw [← this.1, ← this.2, ← sign_mul, sumCongr_mul, one_mul, mul_one]
  constructor
  · refine' σa.swap_induction_on ?_ fun σa' a₁ a₂ ha ih => ?_
    · simp
    · rw [← one_mul (1 : Perm β), ← sumCongr_mul, sign_mul, sign_mul, ih, sumCongr_swap_one,
        sign_swap ha, sign_swap (Sum.inl_injective.ne_iff.mpr ha)]
  · refine' σb.swap_induction_on ?_ fun σb' b₁ b₂ hb ih => ?_
    · simp
    · 

Proof state:
case right.refine'_2
α : Type u
β : Type v
inst✝³ : DecidableEq α
inst✝² : Fintype α
inst✝¹ : DecidableEq β
inst✝ : Fintype β
σa : Perm α
σb σb' : Perm β
b₁ b₂ : β
hb : b₁ ≠ b₂
ih : sign (sumCongr 1 σb') = sign σb'
⊢ sign (sumCongr 1 (swap b₁ b₂ * σb')) = sign (swap b₁ b₂ * σb')

Next tactic:
rw [← one_mul (1 : Perm α), ← sumCongr_mul, sign_mul, sign_mul, ih, sumCongr_one_swap,
        sign_swap hb, sign_swap (Sum.inr_injective.ne_iff.mpr hb)]
@[simp]
theorem sign_subtypeCongr {p : α → Prop} [DecidablePred p] (ep : Perm { a // p a })
    (en : Perm { a // ¬p a }) : sign (ep.subtypeCongr en) = sign ep * sign en := by
  

Proof state:
α : Type u
β : Type v
inst✝⁴ : DecidableEq α
inst✝³ : Fintype α
inst✝² : DecidableEq β
inst✝¹ : Fintype β
p : α → Prop
inst✝ : DecidablePred p
ep : Perm { a // p a }
en : Perm { a // ¬p a }
⊢ sign (subtypeCongr ep en) = sign ep * sign en

Next tactic:
simp [subtypeCongr]
@[simp]
theorem sign_extendDomain (e : Perm α) {p : β → Prop} [DecidablePred p] (f : α ≃ Subtype p) :
    Equiv.Perm.sign (e.extendDomain f) = Equiv.Perm.sign e := by
  

Proof state:
α : Type u
β : Type v
inst✝⁴ : DecidableEq α
inst✝³ : Fintype α
inst✝² : DecidableEq β
inst✝¹ : Fintype β
e : Perm α
p : β → Prop
inst✝ : DecidablePred p
f : α ≃ Subtype p
⊢ sign (extendDomain e f) = sign e

Next tactic:
simp only [Equiv.Perm.extendDomain, sign_subtypeCongr, sign_permCongr, sign_refl, mul_one]
/-- The `i`th object (with `i : ℕ` such that `i ≤ n`) of `F : ComposableArrows C n`. -/
@[simp]
abbrev obj' (i : ℕ) (hi : i ≤ n := by linarith) : C := F.obj ⟨i, by 

Proof state:
C : Type u_1
inst✝ : Category.{?u.186, u_1} C
n m : ℕ
F G : ComposableArrows C n
i : ℕ
hi : autoParam (i ≤ n) _auto✝
⊢ i < n + 1

Next tactic:
linarith
/-- The map `F.obj' i ⟶ F.obj' j` when `F : ComposableArrows C n`, and `i` and `j`
are natural numbers such that `i ≤ j ≤ n`. -/
@[simp]
abbrev map' (i j : ℕ) (hij : i ≤ j := by linarith) (hjn : j ≤ n := by linarith) :
  F.obj ⟨i, by 

Proof state:
C : Type u_1
inst✝ : Category.{?u.2390, u_1} C
n m : ℕ
F G : ComposableArrows C n
i j : ℕ
hij : autoParam (i ≤ j) _auto✝
hjn : autoParam (j ≤ n) _auto✝
⊢ i < n + 1

Next tactic:
linarith
/-- The map `F.obj' i ⟶ F.obj' j` when `F : ComposableArrows C n`, and `i` and `j`
are natural numbers such that `i ≤ j ≤ n`. -/
@[simp]
abbrev map' (i j : ℕ) (hij : i ≤ j := by linarith) (hjn : j ≤ n := by linarith) :
  F.obj ⟨i, by linarith⟩ ⟶ F.obj ⟨j, by 

Proof state:
C : Type u_1
inst✝ : Category.{?u.2390, u_1} C
n m : ℕ
F G : ComposableArrows C n
i j : ℕ
hij : autoParam (i ≤ j) _auto✝
hjn : autoParam (j ≤ n) _auto✝
⊢ j < n + 1

Next tactic:
linarith
/-- The map `F.obj' i ⟶ F.obj' j` when `F : ComposableArrows C n`, and `i` and `j`
are natural numbers such that `i ≤ j ≤ n`. -/
@[simp]
abbrev map' (i j : ℕ) (hij : i ≤ j := by linarith) (hjn : j ≤ n := by linarith) :
  F.obj ⟨i, by linarith⟩ ⟶ F.obj ⟨j, by linarith⟩ := F.map (homOfLE (by
    

Proof state:
C : Type u_1
inst✝ : Category.{?u.2390, u_1} C
n m : ℕ
F G : ComposableArrows C n
i j : ℕ
hij : autoParam (i ≤ j) _auto✝
hjn : autoParam (j ≤ n) _auto✝
⊢ { val := i, isLt := (_ : i < n + 1) } ≤ { val := j, isLt := (_ : j < n + 1) }

Next tactic:
simp only [Fin.mk_le_mk]
/-- The map `F.obj' i ⟶ F.obj' j` when `F : ComposableArrows C n`, and `i` and `j`
are natural numbers such that `i ≤ j ≤ n`. -/
@[simp]
abbrev map' (i j : ℕ) (hij : i ≤ j := by linarith) (hjn : j ≤ n := by linarith) :
  F.obj ⟨i, by linarith⟩ ⟶ F.obj ⟨j, by linarith⟩ := F.map (homOfLE (by
    simp only [Fin.mk_le_mk]
    

Proof state:
C : Type u_1
inst✝ : Category.{?u.2390, u_1} C
n m : ℕ
F G : ComposableArrows C n
i j : ℕ
hij : autoParam (i ≤ j) _auto✝
hjn : autoParam (j ≤ n) _auto✝
⊢ i ≤ j

Next tactic:
linarith
lemma map_id (i : Fin 2) : map f i i (by 

Proof state:
C : Type u_1
inst✝ : Category.{?u.65453, u_1} C
n m : ℕ
F G : ComposableArrows C n
X₀ X₁ : C
f : X₀ ⟶ X₁
i : Fin 2
⊢ i ≤ i

Next tactic:
simp
lemma map_comp {i j k : Fin 2} (hij : i ≤ j) (hjk : j ≤ k) :
    map f i k (hij.trans hjk) = map f i j hij ≫ map f j k hjk :=
  match i with
    | 0 =>
        match j with
          | 0 => by 

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F G : ComposableArrows C n
X₀ X₁ : C
f : X₀ ⟶ X₁
i j k : Fin 2
hjk : 0 ≤ k
hij : 0 ≤ 0
⊢ map f 0 k (_ : 0 ≤ k) = map f 0 0 hij ≫ map f 0 k hjk

Next tactic:
rw [map_id, id_comp]
lemma map_comp {i j k : Fin 2} (hij : i ≤ j) (hjk : j ≤ k) :
    map f i k (hij.trans hjk) = map f i j hij ≫ map f j k hjk :=
  match i with
    | 0 =>
        match j with
          | 0 => by rw [map_id, id_comp]
          | 1 => by
              

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F G : ComposableArrows C n
X₀ X₁ : C
f : X₀ ⟶ X₁
i j k : Fin 2
hjk : 1 ≤ k
hij : 0 ≤ 1
⊢ map f 0 k (_ : 0 ≤ k) = map f 0 1 hij ≫ map f 1 k hjk

Next tactic:
obtain rfl : k = 1 := k.eq_one_of_neq_zero (by rintro rfl; simp at hjk)
lemma map_comp {i j k : Fin 2} (hij : i ≤ j) (hjk : j ≤ k) :
    map f i k (hij.trans hjk) = map f i j hij ≫ map f j k hjk :=
  match i with
    | 0 =>
        match j with
          | 0 => by rw [map_id, id_comp]
          | 1 => by
              obtain rfl : k = 1 := k.eq_one_of_neq_zero (by 

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F G : ComposableArrows C n
X₀ X₁ : C
f : X₀ ⟶ X₁
i j k : Fin 2
hjk : 1 ≤ k
hij : 0 ≤ 1
⊢ k ≠ 0

Next tactic:
rintro rfl
lemma map_comp {i j k : Fin 2} (hij : i ≤ j) (hjk : j ≤ k) :
    map f i k (hij.trans hjk) = map f i j hij ≫ map f j k hjk :=
  match i with
    | 0 =>
        match j with
          | 0 => by rw [map_id, id_comp]
          | 1 => by
              obtain rfl : k = 1 := k.eq_one_of_neq_zero (by rintro rfl; 

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F G : ComposableArrows C n
X₀ X₁ : C
f : X₀ ⟶ X₁
i j : Fin 2
hij : 0 ≤ 1
hjk : 1 ≤ 0
⊢ False

Next tactic:
simp at hjk
lemma map_comp {i j k : Fin 2} (hij : i ≤ j) (hjk : j ≤ k) :
    map f i k (hij.trans hjk) = map f i j hij ≫ map f j k hjk :=
  match i with
    | 0 =>
        match j with
          | 0 => by rw [map_id, id_comp]
          | 1 => by
              obtain rfl : k = 1 := k.eq_one_of_neq_zero (by rintro rfl; simp at hjk)
              

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F G : ComposableArrows C n
X₀ X₁ : C
f : X₀ ⟶ X₁
i j : Fin 2
hij : 0 ≤ 1
hjk : 1 ≤ 1
⊢ map f 0 1 (_ : 0 ≤ 1) = map f 0 1 hij ≫ map f 1 1 hjk

Next tactic:
rw [map_id, comp_id]
lemma map_comp {i j k : Fin 2} (hij : i ≤ j) (hjk : j ≤ k) :
    map f i k (hij.trans hjk) = map f i j hij ≫ map f j k hjk :=
  match i with
    | 0 =>
        match j with
          | 0 => by rw [map_id, id_comp]
          | 1 => by
              obtain rfl : k = 1 := k.eq_one_of_neq_zero (by rintro rfl; simp at hjk)
              rw [map_id, comp_id]
    | 1 => by
        

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F G : ComposableArrows C n
X₀ X₁ : C
f : X₀ ⟶ X₁
i j k : Fin 2
hjk : j ≤ k
hij : 1 ≤ j
⊢ map f 1 k (_ : 1 ≤ k) = map f 1 j hij ≫ map f j k hjk

Next tactic:
obtain rfl := j.eq_one_of_neq_zero (by rintro rfl; simp at hij)
lemma map_comp {i j k : Fin 2} (hij : i ≤ j) (hjk : j ≤ k) :
    map f i k (hij.trans hjk) = map f i j hij ≫ map f j k hjk :=
  match i with
    | 0 =>
        match j with
          | 0 => by rw [map_id, id_comp]
          | 1 => by
              obtain rfl : k = 1 := k.eq_one_of_neq_zero (by rintro rfl; simp at hjk)
              rw [map_id, comp_id]
    | 1 => by
        obtain rfl := j.eq_one_of_neq_zero (by 

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F G : ComposableArrows C n
X₀ X₁ : C
f : X₀ ⟶ X₁
i j k : Fin 2
hjk : j ≤ k
hij : 1 ≤ j
⊢ j ≠ 0

Next tactic:
rintro rfl
lemma map_comp {i j k : Fin 2} (hij : i ≤ j) (hjk : j ≤ k) :
    map f i k (hij.trans hjk) = map f i j hij ≫ map f j k hjk :=
  match i with
    | 0 =>
        match j with
          | 0 => by rw [map_id, id_comp]
          | 1 => by
              obtain rfl : k = 1 := k.eq_one_of_neq_zero (by rintro rfl; simp at hjk)
              rw [map_id, comp_id]
    | 1 => by
        obtain rfl := j.eq_one_of_neq_zero (by rintro rfl; 

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F G : ComposableArrows C n
X₀ X₁ : C
f : X₀ ⟶ X₁
i k : Fin 2
hjk : 0 ≤ k
hij : 1 ≤ 0
⊢ False

Next tactic:
simp at hij
lemma map_comp {i j k : Fin 2} (hij : i ≤ j) (hjk : j ≤ k) :
    map f i k (hij.trans hjk) = map f i j hij ≫ map f j k hjk :=
  match i with
    | 0 =>
        match j with
          | 0 => by rw [map_id, id_comp]
          | 1 => by
              obtain rfl : k = 1 := k.eq_one_of_neq_zero (by rintro rfl; simp at hjk)
              rw [map_id, comp_id]
    | 1 => by
        obtain rfl := j.eq_one_of_neq_zero (by rintro rfl; simp at hij)
        

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F G : ComposableArrows C n
X₀ X₁ : C
f : X₀ ⟶ X₁
i k : Fin 2
hjk : 1 ≤ k
hij : 1 ≤ 1
⊢ map f 1 k (_ : 1 ≤ k) = map f 1 1 hij ≫ map f 1 k hjk

Next tactic:
obtain rfl := k.eq_one_of_neq_zero (by rintro rfl; simp at hjk)
lemma map_comp {i j k : Fin 2} (hij : i ≤ j) (hjk : j ≤ k) :
    map f i k (hij.trans hjk) = map f i j hij ≫ map f j k hjk :=
  match i with
    | 0 =>
        match j with
          | 0 => by rw [map_id, id_comp]
          | 1 => by
              obtain rfl : k = 1 := k.eq_one_of_neq_zero (by rintro rfl; simp at hjk)
              rw [map_id, comp_id]
    | 1 => by
        obtain rfl := j.eq_one_of_neq_zero (by rintro rfl; simp at hij)
        obtain rfl := k.eq_one_of_neq_zero (by 

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F G : ComposableArrows C n
X₀ X₁ : C
f : X₀ ⟶ X₁
i k : Fin 2
hjk : 1 ≤ k
hij : 1 ≤ 1
⊢ k ≠ 0

Next tactic:
rintro rfl
lemma map_comp {i j k : Fin 2} (hij : i ≤ j) (hjk : j ≤ k) :
    map f i k (hij.trans hjk) = map f i j hij ≫ map f j k hjk :=
  match i with
    | 0 =>
        match j with
          | 0 => by rw [map_id, id_comp]
          | 1 => by
              obtain rfl : k = 1 := k.eq_one_of_neq_zero (by rintro rfl; simp at hjk)
              rw [map_id, comp_id]
    | 1 => by
        obtain rfl := j.eq_one_of_neq_zero (by rintro rfl; simp at hij)
        obtain rfl := k.eq_one_of_neq_zero (by rintro rfl; 

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F G : ComposableArrows C n
X₀ X₁ : C
f : X₀ ⟶ X₁
i : Fin 2
hij : 1 ≤ 1
hjk : 1 ≤ 0
⊢ False

Next tactic:
simp at hjk
lemma map_comp {i j k : Fin 2} (hij : i ≤ j) (hjk : j ≤ k) :
    map f i k (hij.trans hjk) = map f i j hij ≫ map f j k hjk :=
  match i with
    | 0 =>
        match j with
          | 0 => by rw [map_id, id_comp]
          | 1 => by
              obtain rfl : k = 1 := k.eq_one_of_neq_zero (by rintro rfl; simp at hjk)
              rw [map_id, comp_id]
    | 1 => by
        obtain rfl := j.eq_one_of_neq_zero (by rintro rfl; simp at hij)
        obtain rfl := k.eq_one_of_neq_zero (by rintro rfl; simp at hjk)
        

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
n m : ℕ
F G : ComposableArrows C n
X₀ X₁ : C
f : X₀ ⟶ X₁
i : Fin 2
hij hjk : 1 ≤ 1
⊢ map f 1 1 (_ : 1 ≤ 1) = map f 1 1 hij ≫ map f 1 1 hjk

Next tactic:
rw [map_id, id_comp]
/-- Constructor for morphisms `F ⟶ G` in `ComposableArrows C n` which takes as inputs
a family of morphisms `F.obj i ⟶ G.obj i` and the naturality condition only for the
maps in `Fin (n + 1)` given by inequalities of the form `i ≤ i + 1`. -/
@[simps]
def homMk {F G : ComposableArrows C n} (app : ∀ i, F.obj i ⟶ G.obj i)
    (w : ∀ (i : ℕ) (hi : i < n), F.map' i (i + 1) ≫ app _ = app _ ≫ G.map' i (i + 1)) :
    F ⟶ G where
  app := app
  naturality := by
    

Proof state:
C : Type u_1
inst✝ : Category.{?u.72425, u_1} C
n m : ℕ
F✝ G✝ F G : ComposableArrows C n
app : (i : Fin (n + 1)) → F.obj i ⟶ G.obj i
w :
  ∀ (i : ℕ) (hi : i < n),
    map' F i (i + 1) ≫ app { val := i + 1, isLt := (_ : i + 1 < n + 1) } =
      app { val := i, isLt := (_ : i < n + 1) } ≫ map' G i (i + 1)
⊢ ∀ ⦃X Y : Fin (n + 1)⦄ (f : X ⟶ Y), F.map f ≫ app Y = app X ≫ G.map f

Next tactic:
suffices ∀ (k i j : ℕ) (hj : i + k = j) (hj' : j ≤ n),
        F.map' i j ≫ app _ = app _ ≫ G.map' i j by
      rintro ⟨i, hi⟩ ⟨j, hj⟩ hij
      have hij' := leOfHom hij
      simp only [Fin.mk_le_mk] at hij'
      obtain ⟨k, hk⟩ := Nat.le.dest hij'
      exact this k i j hk (by linarith)
/-- Constructor for morphisms `F ⟶ G` in `ComposableArrows C n` which takes as inputs
a family of morphisms `F.obj i ⟶ G.obj i` and the naturality condition only for the
maps in `Fin (n + 1)` given by inequalities of the form `i ≤ i + 1`. -/
@[simps]
def homMk {F G : ComposableArrows C n} (app : ∀ i, F.obj i ⟶ G.obj i)
    (w : ∀ (i : ℕ) (hi : i < n), F.map' i (i + 1) ≫ app _ = app _ ≫ G.map' i (i + 1)) :
    F ⟶ G where
  app := app
  naturality := by
    suffices ∀ (k i j : ℕ) (hj : i + k = j) (hj' : j ≤ n),
        F.map' i j ≫ app _ = app _ ≫ G.map' i j by
      

Proof state:
C : Type u_1
inst✝ : Category.{?u.72425, u_1} C
n m : ℕ
F✝ G✝ F G : ComposableArrows C n
app : (i : Fin (n + 1)) → F.obj i ⟶ G.obj i
w :
  ∀ (i : ℕ) (hi : i < n),
    map' F i (i + 1) ≫ app { val := i + 1, isLt := (_ : i + 1 < n + 1) } =
      app { val := i, isLt := (_ : i < n + 1) } ≫ map' G i (i + 1)
this :
  ∀ (k i j : ℕ) (hj : i + k = j) (hj' : j ≤ n),
    map' F i j ≫ app { val := j, isLt := (_ : j < n + 1) } = app { val := i, isLt := (_ : i < n + 1) } ≫ map' G i j
⊢ ∀ ⦃X Y : Fin (n + 1)⦄ (f : X ⟶ Y), F.map f ≫ app Y = app X ≫ G.map f

Next tactic:
rintro ⟨i, hi⟩ ⟨j, hj⟩ hij
/-- Constructor for morphisms `F ⟶ G` in `ComposableArrows C n` which takes as inputs
a family of morphisms `F.obj i ⟶ G.obj i` and the naturality condition only for the
maps in `Fin (n + 1)` given by inequalities of the form `i ≤ i + 1`. -/
@[simps]
def homMk {F G : ComposableArrows C n} (app : ∀ i, F.obj i ⟶ G.obj i)
    (w : ∀ (i : ℕ) (hi : i < n), F.map' i (i + 1) ≫ app _ = app _ ≫ G.map' i (i + 1)) :
    F ⟶ G where
  app := app
  naturality := by
    suffices ∀ (k i j : ℕ) (hj : i + k = j) (hj' : j ≤ n),
        F.map' i j ≫ app _ = app _ ≫ G.map' i j by
      rintro ⟨i, hi⟩ ⟨j, hj⟩ hij
      

Proof state:
case mk.mk
C : Type u_1
inst✝ : Category.{?u.72425, u_1} C
n m : ℕ
F✝ G✝ F G : ComposableArrows C n
app : (i : Fin (n + 1)) → F.obj i ⟶ G.obj i
w :
  ∀ (i : ℕ) (hi : i < n),
    map' F i (i + 1) ≫ app { val := i + 1, isLt := (_ : i + 1 < n + 1) } =
      app { val := i, isLt := (_ : i < n + 1) } ≫ map' G i (i + 1)
this :
  ∀ (k i j : ℕ) (hj : i + k = j) (hj' : j ≤ n),
    map' F i j ≫ app { val := j, isLt := (_ : j < n + 1) } = app { val := i, isLt := (_ : i < n + 1) } ≫ map' G i j
i : ℕ
hi : i < n + 1
j : ℕ
hj : j < n + 1
hij : { val := i, isLt := hi } ⟶ { val := j, isLt := hj }
⊢ F.map hij ≫ app { val := j, isLt := hj } = app { val := i, isLt := hi } ≫ G.map hij

Next tactic:
have hij' := leOfHom hij
/-- Constructor for morphisms `F ⟶ G` in `ComposableArrows C n` which takes as inputs
a family of morphisms `F.obj i ⟶ G.obj i` and the naturality condition only for the
maps in `Fin (n + 1)` given by inequalities of the form `i ≤ i + 1`. -/
@[simps]
def homMk {F G : ComposableArrows C n} (app : ∀ i, F.obj i ⟶ G.obj i)
    (w : ∀ (i : ℕ) (hi : i < n), F.map' i (i + 1) ≫ app _ = app _ ≫ G.map' i (i + 1)) :
    F ⟶ G where
  app := app
  naturality := by
    suffices ∀ (k i j : ℕ) (hj : i + k = j) (hj' : j ≤ n),
        F.map' i j ≫ app _ = app _ ≫ G.map' i j by
      rintro ⟨i, hi⟩ ⟨j, hj⟩ hij
      have hij' := leOfHom hij
      

Proof state:
case mk.mk
C : Type u_1
inst✝ : Category.{?u.72425, u_1} C
n m : ℕ
F✝ G✝ F G : ComposableArrows C n
app : (i : Fin (n + 1)) → F.obj i ⟶ G.obj i
w :
  ∀ (i : ℕ) (hi : i < n),
    map' F i (i + 1) ≫ app { val := i + 1, isLt := (_ : i + 1 < n + 1) } =
      app { val := i, isLt := (_ : i < n + 1) } ≫ map' G i (i + 1)
this :
  ∀ (k i j : ℕ) (hj : i + k = j) (hj' : j ≤ n),
    map' F i j ≫ app { val := j, isLt := (_ : j < n + 1) } = app { val := i, isLt := (_ : i < n + 1) } ≫ map' G i j
i : ℕ
hi : i < n + 1
j : ℕ
hj : j < n + 1
hij : { val := i, isLt := hi } ⟶ { val := j, isLt := hj }
hij' : { val := i, isLt := hi } ≤ { val := j, isLt := hj }
⊢ F.map hij ≫ app { val := j, isLt := hj } = app { val := i, isLt := hi } ≫ G.map hij

Next tactic:
simp only [Fin.mk_le_mk] at hij'
/-- Constructor for morphisms `F ⟶ G` in `ComposableArrows C n` which takes as inputs
a family of morphisms `F.obj i ⟶ G.obj i` and the naturality condition only for the
maps in `Fin (n + 1)` given by inequalities of the form `i ≤ i + 1`. -/
@[simps]
def homMk {F G : ComposableArrows C n} (app : ∀ i, F.obj i ⟶ G.obj i)
    (w : ∀ (i : ℕ) (hi : i < n), F.map' i (i + 1) ≫ app _ = app _ ≫ G.map' i (i + 1)) :
    F ⟶ G where
  app := app
  naturality := by
    suffices ∀ (k i j : ℕ) (hj : i + k = j) (hj' : j ≤ n),
        F.map' i j ≫ app _ = app _ ≫ G.map' i j by
      rintro ⟨i, hi⟩ ⟨j, hj⟩ hij
      have hij' := leOfHom hij
      simp only [Fin.mk_le_mk] at hij'
      

Proof state:
case mk.mk
C : Type u_1
inst✝ : Category.{?u.72425, u_1} C
n m : ℕ
F✝ G✝ F G : ComposableArrows C n
app : (i : Fin (n + 1)) → F.obj i ⟶ G.obj i
w :
  ∀ (i : ℕ) (hi : i < n),
    map' F i (i + 1) ≫ app { val := i + 1, isLt := (_ : i + 1 < n + 1) } =
      app { val := i, isLt := (_ : i < n + 1) } ≫ map' G i (i + 1)
this :
  ∀ (k i j : ℕ) (hj : i + k = j) (hj' : j ≤ n),
    map' F i j ≫ app { val := j, isLt := (_ : j < n + 1) } = app { val := i, isLt := (_ : i < n + 1) } ≫ map' G i j
i : ℕ
hi : i < n + 1
j : ℕ
hj : j < n + 1
hij : { val := i, isLt := hi } ⟶ { val := j, isLt := hj }
hij' : i ≤ j
⊢ F.map hij ≫ app { val := j, isLt := hj } = app { val := i, isLt := hi } ≫ G.map hij

Next tactic:
obtain ⟨k, hk⟩ := Nat.le.dest hij'