Theorem: SimplexCategory.δ_comp_σ_self
File: Mathlib/AlgebraicTopology/SimplexCategory.lean

tactic: rcases i with ⟨i, hi⟩
state_before: n : ℕ
i : Fin (n + 1)
⊢ δ i.castSucc ≫ σ i = 𝟙 [n]
state_after: case mk
n i : ℕ
hi : i < n + 1
⊢ δ ⟨i, hi⟩.castSucc ≫ σ ⟨i, hi⟩ = 𝟙 [n]

tactic: ext ⟨j, hj⟩
state_before: case mk
n i : ℕ
hi : i < n + 1
⊢ δ ⟨i, hi⟩.castSucc ≫ σ ⟨i, hi⟩ = 𝟙 [n]
state_after: case mk.a.h.h.mk.h
n i : ℕ
hi : i < n + 1
j : ℕ
hj : j < [n].len + 1
⊢ ↑((Hom.toOrderHom (δ ⟨i, hi⟩.castSucc ≫ σ ⟨i, hi⟩)) ⟨j, hj⟩) = ↑((Hom.toOrderHom (𝟙 [n])) ⟨j, hj⟩)

tactic: simp? at hj says simp only [len_mk] at hj
state_before: case mk.a.h.h.mk.h
n i : ℕ
hi : i < n + 1
j : ℕ
hj : j < [n].len + 1
⊢ ↑((Hom.toOrderHom (δ ⟨i, hi⟩.castSucc ≫ σ ⟨i, hi⟩)) ⟨j, hj⟩) = ↑((Hom.toOrderHom (𝟙 [n])) ⟨j, hj⟩)
state_after: case mk.a.h.h.mk.h
n i : ℕ
hi : i < n + 1
j : ℕ
hj : j < n + 1
⊢ ↑((Hom.toOrderHom (δ ⟨i, hi⟩.castSucc ≫ σ ⟨i, hi⟩)) ⟨j, hj⟩) = ↑((Hom.toOrderHom (𝟙 [n])) ⟨j, hj⟩)

tactic: dsimp [σ, δ, Fin.predAbove, Fin.succAbove]
state_before: case mk.a.h.h.mk.h
n i : ℕ
hi : i < n + 1
j : ℕ
hj : j < n + 1
⊢ ↑((Hom.toOrderHom (δ ⟨i, hi⟩.castSucc ≫ σ ⟨i, hi⟩)) ⟨j, hj⟩) = ↑((Hom.toOrderHom (𝟙 [n])) ⟨j, hj⟩)
state_after: case mk.a.h.h.mk.h
n i : ℕ
hi : i < n + 1
j : ℕ
hj : j < n + 1
⊢ ↑(if h : ⟨i, ⋯⟩ < if ⟨j, ⋯⟩ < ⟨i, ⋯⟩ then ⟨j, ⋯⟩ else ⟨j + 1, ⋯⟩ then
        (if ⟨j, ⋯⟩ < ⟨i, ⋯⟩ then ⟨j, ⋯⟩ else ⟨j + 1, ⋯⟩).pred ⋯
      else (if ⟨j, ⋯⟩ < ⟨i, ⋯⟩ then ⟨j, ⋯⟩ else ⟨j + 1, ⋯⟩).castPred ⋯) =
    j

tactic: simp only [Fin.lt_iff_val_lt_val, Fin.dite_val, Fin.ite_val, Fin.coe_pred, ge_iff_le,
  Fin.coe_castLT, dite_eq_ite]
state_before: case mk.a.h.h.mk.h
n i : ℕ
hi : i < n + 1
j : ℕ
hj : j < n + 1
⊢ ↑(if h : ⟨i, ⋯⟩ < if ⟨j, ⋯⟩ < ⟨i, ⋯⟩ then ⟨j, ⋯⟩ else ⟨j + 1, ⋯⟩ then
        (if ⟨j, ⋯⟩ < ⟨i, ⋯⟩ then ⟨j, ⋯⟩ else ⟨j + 1, ⋯⟩).pred ⋯
      else (if ⟨j, ⋯⟩ < ⟨i, ⋯⟩ then ⟨j, ⋯⟩ else ⟨j + 1, ⋯⟩).castPred ⋯) =
    j
state_after: case mk.a.h.h.mk.h
n i : ℕ
hi : i < n + 1
j : ℕ
hj : j < n + 1
⊢ (if h : i < if j < i then j else j + 1 then (if j < i then j else j + 1) - 1
    else ↑((if j < i then ⟨j, ⋯⟩ else ⟨j + 1, ⋯⟩).castPred ⋯)) =
    j

tactic: split_ifs
state_before: case mk.a.h.h.mk.h
n i : ℕ
hi : i < n + 1
j : ℕ
hj : j < n + 1
⊢ (if h : i < if j < i then j else j + 1 then (if j < i then j else j + 1) - 1
    else ↑((if j < i then ⟨j, ⋯⟩ else ⟨j + 1, ⋯⟩).castPred ⋯)) =
    j
state_after: case pos
n i : ℕ
hi : i < n + 1
j : ℕ
hj : j < n + 1
h✝¹ : j < i
h✝ : i < j
⊢ j - 1 = j

case neg
n i : ℕ
hi : i < n + 1
j : ℕ
hj : j < n + 1
h✝¹ : j < i
h✝ : ¬i < j
⊢ ↑(⟨j, ⋯⟩.castPred ⋯) = j

case pos
n i : ℕ
hi : i < n + 1
j : ℕ
hj : j < n + 1
h✝¹ : ¬j < i
h✝ : i < j + 1
⊢ j + 1 - 1 = j

case neg
n i : ℕ
hi : i < n + 1
j : ℕ
hj : j < n + 1
h✝¹ : ¬j < i
h✝ : ¬i < j + 1
⊢ ↑(⟨j + 1, ⋯⟩.castPred ⋯) = j

tactic: any_goals simp
state_before: case pos
n i : ℕ
hi : i < n + 1
j : ℕ
hj : j < n + 1
h✝¹ : j < i
h✝ : i < j
⊢ j - 1 = j

case neg
n i : ℕ
hi : i < n + 1
j : ℕ
hj : j < n + 1
h✝¹ : j < i
h✝ : ¬i < j
⊢ ↑(⟨j, ⋯⟩.castPred ⋯) = j

case pos
n i : ℕ
hi : i < n + 1
j : ℕ
hj : j < n + 1
h✝¹ : ¬j < i
h✝ : i < j + 1
⊢ j + 1 - 1 = j

case neg
n i : ℕ
hi : i < n + 1
j : ℕ
hj : j < n + 1
h✝¹ : ¬j < i
h✝ : ¬i < j + 1
⊢ ↑(⟨j + 1, ⋯⟩.castPred ⋯) = j
state_after: case pos
n i : ℕ
hi : i < n + 1
j : ℕ
hj : j < n + 1
h✝¹ : j < i
h✝ : i < j
⊢ j - 1 = j

case neg
n i : ℕ
hi : i < n + 1
j : ℕ
hj : j < n + 1
h✝¹ : ¬j < i
h✝ : ¬i < j + 1
⊢ False

tactic: all_goals omega
state_before: case pos
n i : ℕ
hi : i < n + 1
j : ℕ
hj : j < n + 1
h✝¹ : j < i
h✝ : i < j
⊢ j - 1 = j

case neg
n i : ℕ
hi : i < n + 1
j : ℕ
hj : j < n + 1
h✝¹ : ¬j < i
h✝ : ¬i < j + 1
⊢ False
state_after: no goals

tactic: simp only [len_mk] at hj
state_before: case mk.a.h.h.mk.h
n i : ℕ
hi : i < n + 1
j : ℕ
hj : j < [n].len + 1
⊢ ↑((Hom.toOrderHom (δ ⟨i, hi⟩.castSucc ≫ σ ⟨i, hi⟩)) ⟨j, hj⟩) = ↑((Hom.toOrderHom (𝟙 [n])) ⟨j, hj⟩)
state_after: case mk.a.h.h.mk.h
n i : ℕ
hi : i < n + 1
j : ℕ
hj : j < n + 1
⊢ ↑((Hom.toOrderHom (δ ⟨i, hi⟩.castSucc ≫ σ ⟨i, hi⟩)) ⟨j, hj⟩) = ↑((Hom.toOrderHom (𝟙 [n])) ⟨j, hj⟩)

tactic: simp
state_before: case neg
n i : ℕ
hi : i < n + 1
j : ℕ
hj : j < n + 1
h✝¹ : ¬j < i
h✝ : ¬i < j + 1
⊢ ↑(⟨j + 1, ⋯⟩.castPred ⋯) = j
state_after: case neg
n i : ℕ
hi : i < n + 1
j : ℕ
hj : j < n + 1
h✝¹ : ¬j < i
h✝ : ¬i < j + 1
⊢ False

tactic: omega
state_before: case neg
n i : ℕ
hi : i < n + 1
j : ℕ
hj : j < n + 1
h✝¹ : ¬j < i
h✝ : ¬i < j + 1
⊢ False
state_after: no goals