Theorem: CategoryTheory.HomOrthogonal.matrixDecomposition_id
File: Mathlib/CategoryTheory/Preadditive/HomOrthogonal.lean

tactic: ext ⟨b, ⟨⟩⟩ ⟨a, j_property⟩
state_before: C : Type u
inst✝³ : Category.{v, u} C
ι : Type u_1
s : ι → C
inst✝² : Preadditive C
inst✝¹ : HasFiniteBiproducts C
o : HomOrthogonal s
α : Type
inst✝ : Finite α
f : α → ι
i : ι
⊢ o.matrixDecomposition (𝟙 (⨁ fun a => s (f a))) i = 1
state_after: case a.mk.refl.mk
C : Type u
inst✝³ : Category.{v, u} C
ι : Type u_1
s : ι → C
inst✝² : Preadditive C
inst✝¹ : HasFiniteBiproducts C
o : HomOrthogonal s
α : Type
inst✝ : Finite α
f : α → ι
b a : α
j_property : a ∈ f ⁻¹' {f b}
⊢ o.matrixDecomposition (𝟙 (⨁ fun a => s (f a))) (f b) ⟨b, ⋯⟩ ⟨a, j_property⟩ = 1 ⟨b, ⋯⟩ ⟨a, j_property⟩

tactic: simp only [Set.mem_preimage, Set.mem_singleton_iff] at j_property
state_before: case a.mk.refl.mk
C : Type u
inst✝³ : Category.{v, u} C
ι : Type u_1
s : ι → C
inst✝² : Preadditive C
inst✝¹ : HasFiniteBiproducts C
o : HomOrthogonal s
α : Type
inst✝ : Finite α
f : α → ι
b a : α
j_property : a ∈ f ⁻¹' {f b}
⊢ o.matrixDecomposition (𝟙 (⨁ fun a => s (f a))) (f b) ⟨b, ⋯⟩ ⟨a, j_property⟩ = 1 ⟨b, ⋯⟩ ⟨a, j_property⟩
state_after: case a.mk.refl.mk
C : Type u
inst✝³ : Category.{v, u} C
ι : Type u_1
s : ι → C
inst✝² : Preadditive C
inst✝¹ : HasFiniteBiproducts C
o : HomOrthogonal s
α : Type
inst✝ : Finite α
f : α → ι
b a : α
j_property✝ : a ∈ f ⁻¹' {f b}
j_property : f a = f b
⊢ o.matrixDecomposition (𝟙 (⨁ fun a => s (f a))) (f b) ⟨b, ⋯⟩ ⟨a, j_property✝⟩ = 1 ⟨b, ⋯⟩ ⟨a, j_property✝⟩

tactic: simp only [Category.comp_id, Category.id_comp, Category.assoc, End.one_def, eqToHom_refl,
  Matrix.one_apply, HomOrthogonal.matrixDecomposition_apply, biproduct.components]
state_before: case a.mk.refl.mk
C : Type u
inst✝³ : Category.{v, u} C
ι : Type u_1
s : ι → C
inst✝² : Preadditive C
inst✝¹ : HasFiniteBiproducts C
o : HomOrthogonal s
α : Type
inst✝ : Finite α
f : α → ι
b a : α
j_property✝ : a ∈ f ⁻¹' {f b}
j_property : f a = f b
⊢ o.matrixDecomposition (𝟙 (⨁ fun a => s (f a))) (f b) ⟨b, ⋯⟩ ⟨a, j_property✝⟩ = 1 ⟨b, ⋯⟩ ⟨a, j_property✝⟩
state_after: case a.mk.refl.mk
C : Type u
inst✝³ : Category.{v, u} C
ι : Type u_1
s : ι → C
inst✝² : Preadditive C
inst✝¹ : HasFiniteBiproducts C
o : HomOrthogonal s
α : Type
inst✝ : Finite α
f : α → ι
b a : α
j_property✝ : a ∈ f ⁻¹' {f b}
j_property : f a = f b
⊢ eqToHom ⋯ ≫ biproduct.ι (fun a => s (f a)) a ≫ biproduct.π (fun b => s (f b)) b =
    if ⟨b, ⋯⟩ = ⟨a, j_property✝⟩ then 𝟙 (s (f b)) else 0

tactic: split_ifs with h
state_before: case a.mk.refl.mk
C : Type u
inst✝³ : Category.{v, u} C
ι : Type u_1
s : ι → C
inst✝² : Preadditive C
inst✝¹ : HasFiniteBiproducts C
o : HomOrthogonal s
α : Type
inst✝ : Finite α
f : α → ι
b a : α
j_property✝ : a ∈ f ⁻¹' {f b}
j_property : f a = f b
⊢ eqToHom ⋯ ≫ biproduct.ι (fun a => s (f a)) a ≫ biproduct.π (fun b => s (f b)) b =
    if ⟨b, ⋯⟩ = ⟨a, j_property✝⟩ then 𝟙 (s (f b)) else 0
state_after: case pos
C : Type u
inst✝³ : Category.{v, u} C
ι : Type u_1
s : ι → C
inst✝² : Preadditive C
inst✝¹ : HasFiniteBiproducts C
o : HomOrthogonal s
α : Type
inst✝ : Finite α
f : α → ι
b a : α
j_property✝ : a ∈ f ⁻¹' {f b}
j_property : f a = f b
h : ⟨b, ⋯⟩ = ⟨a, j_property✝⟩
⊢ eqToHom ⋯ ≫ biproduct.ι (fun a => s (f a)) a ≫ biproduct.π (fun b => s (f b)) b = 𝟙 (s (f b))

case neg
C : Type u
inst✝³ : Category.{v, u} C
ι : Type u_1
s : ι → C
inst✝² : Preadditive C
inst✝¹ : HasFiniteBiproducts C
o : HomOrthogonal s
α : Type
inst✝ : Finite α
f : α → ι
b a : α
j_property✝ : a ∈ f ⁻¹' {f b}
j_property : f a = f b
h : ¬⟨b, ⋯⟩ = ⟨a, j_property✝⟩
⊢ eqToHom ⋯ ≫ biproduct.ι (fun a => s (f a)) a ≫ biproduct.π (fun b => s (f b)) b = 0

tactic: cases h
state_before: case pos
C : Type u
inst✝³ : Category.{v, u} C
ι : Type u_1
s : ι → C
inst✝² : Preadditive C
inst✝¹ : HasFiniteBiproducts C
o : HomOrthogonal s
α : Type
inst✝ : Finite α
f : α → ι
b a : α
j_property✝ : a ∈ f ⁻¹' {f b}
j_property : f a = f b
h : ⟨b, ⋯⟩ = ⟨a, j_property✝⟩
⊢ eqToHom ⋯ ≫ biproduct.ι (fun a => s (f a)) a ≫ biproduct.π (fun b => s (f b)) b = 𝟙 (s (f b))
state_after: case pos.refl
C : Type u
inst✝³ : Category.{v, u} C
ι : Type u_1
s : ι → C
inst✝² : Preadditive C
inst✝¹ : HasFiniteBiproducts C
o : HomOrthogonal s
α : Type
inst✝ : Finite α
f : α → ι
b : α
j_property✝ : b ∈ f ⁻¹' {f b}
j_property : f b = f b
⊢ eqToHom ⋯ ≫ biproduct.ι (fun a => s (f a)) b ≫ biproduct.π (fun b => s (f b)) b = 𝟙 (s (f b))

tactic: simp
state_before: case pos.refl
C : Type u
inst✝³ : Category.{v, u} C
ι : Type u_1
s : ι → C
inst✝² : Preadditive C
inst✝¹ : HasFiniteBiproducts C
o : HomOrthogonal s
α : Type
inst✝ : Finite α
f : α → ι
b : α
j_property✝ : b ∈ f ⁻¹' {f b}
j_property : f b = f b
⊢ eqToHom ⋯ ≫ biproduct.ι (fun a => s (f a)) b ≫ biproduct.π (fun b => s (f b)) b = 𝟙 (s (f b))
state_after: no goals

tactic: simp at h
state_before: case neg
C : Type u
inst✝³ : Category.{v, u} C
ι : Type u_1
s : ι → C
inst✝² : Preadditive C
inst✝¹ : HasFiniteBiproducts C
o : HomOrthogonal s
α : Type
inst✝ : Finite α
f : α → ι
b a : α
j_property✝ : a ∈ f ⁻¹' {f b}
j_property : f a = f b
h : ¬⟨b, ⋯⟩ = ⟨a, j_property✝⟩
⊢ eqToHom ⋯ ≫ biproduct.ι (fun a => s (f a)) a ≫ biproduct.π (fun b => s (f b)) b = 0
state_after: case neg
C : Type u
inst✝³ : Category.{v, u} C
ι : Type u_1
s : ι → C
inst✝² : Preadditive C
inst✝¹ : HasFiniteBiproducts C
o : HomOrthogonal s
α : Type
inst✝ : Finite α
f : α → ι
b a : α
j_property✝ : a ∈ f ⁻¹' {f b}
j_property : f a = f b
h : ¬b = a
⊢ eqToHom ⋯ ≫ biproduct.ι (fun a => s (f a)) a ≫ biproduct.π (fun b => s (f b)) b = 0

tactic: have : biproduct.ι (fun a ↦ s (f a)) a ≫ biproduct.π (fun b ↦ s (f b)) b = 0 := by
  simpa using biproduct.ι_π_ne _ (Ne.symm h)
state_before: case neg
C : Type u
inst✝³ : Category.{v, u} C
ι : Type u_1
s : ι → C
inst✝² : Preadditive C
inst✝¹ : HasFiniteBiproducts C
o : HomOrthogonal s
α : Type
inst✝ : Finite α
f : α → ι
b a : α
j_property✝ : a ∈ f ⁻¹' {f b}
j_property : f a = f b
h : ¬b = a
⊢ eqToHom ⋯ ≫ biproduct.ι (fun a => s (f a)) a ≫ biproduct.π (fun b => s (f b)) b = 0
state_after: case neg
C : Type u
inst✝³ : Category.{v, u} C
ι : Type u_1
s : ι → C
inst✝² : Preadditive C
inst✝¹ : HasFiniteBiproducts C
o : HomOrthogonal s
α : Type
inst✝ : Finite α
f : α → ι
b a : α
j_property✝ : a ∈ f ⁻¹' {f b}
j_property : f a = f b
h : ¬b = a
this : biproduct.ι (fun a => s (f a)) a ≫ biproduct.π (fun b => s (f b)) b = 0
⊢ eqToHom ⋯ ≫ biproduct.ι (fun a => s (f a)) a ≫ biproduct.π (fun b => s (f b)) b = 0

tactic: rw [this, comp_zero]
state_before: case neg
C : Type u
inst✝³ : Category.{v, u} C
ι : Type u_1
s : ι → C
inst✝² : Preadditive C
inst✝¹ : HasFiniteBiproducts C
o : HomOrthogonal s
α : Type
inst✝ : Finite α
f : α → ι
b a : α
j_property✝ : a ∈ f ⁻¹' {f b}
j_property : f a = f b
h : ¬b = a
this : biproduct.ι (fun a => s (f a)) a ≫ biproduct.π (fun b => s (f b)) b = 0
⊢ eqToHom ⋯ ≫ biproduct.ι (fun a => s (f a)) a ≫ biproduct.π (fun b => s (f b)) b = 0
state_after: no goals

tactic: simpa using biproduct.ι_π_ne _ (Ne.symm h)
state_before: C : Type u
inst✝³ : Category.{v, u} C
ι : Type u_1
s : ι → C
inst✝² : Preadditive C
inst✝¹ : HasFiniteBiproducts C
o : HomOrthogonal s
α : Type
inst✝ : Finite α
f : α → ι
b a : α
j_property✝ : a ∈ f ⁻¹' {f b}
j_property : f a = f b
h : ¬b = a
⊢ biproduct.ι (fun a => s (f a)) a ≫ biproduct.π (fun b => s (f b)) b = 0
state_after: no goals