-- Mathlib/CategoryTheory/Monoidal/Preadditive.lean
theorem leftDistributor_rightDistributor_assoc {J : Type _} [Fintype J]
    (X : C) (f : J → C) (Y : C) :
    (leftDistributor X f ⊗ asIso (𝟙 Y)) ≪≫ rightDistributor _ Y =
      α_ X (⨁ f) Y ≪≫
        (asIso (𝟙 X) ⊗ rightDistributor _ Y) ≪≫
          leftDistributor X _ ≪≫ biproduct.mapIso fun _ => (α_ _ _ _).symm

Proof state:
case w.w
C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : Preadditive C
inst✝³ : MonoidalCategory C
inst✝² : MonoidalPreadditive C
inst✝¹ : HasFiniteBiproducts C
J : Type
inst✝ : Fintype J
X : C
f : J → C
Y : C
j✝ : J
⊢ ∑ x : J,
      ((𝟙 X ⊗ biproduct.π f x) ⊗ 𝟙 Y) ≫
        (biproduct.ι (fun j => X ⊗ f j) x ⊗ 𝟙 Y) ≫ (biproduct.π (fun j => X ⊗ f j) j✝ ⊗ 𝟙 Y) =
    ∑ x : J,
      (α_ X (⨁ f) Y).hom ≫
        (𝟙 X ⊗ (biproduct.π f x ⊗ 𝟙 Y) ≫ biproduct.ι (fun j => f j ⊗ Y) x) ≫
          (𝟙 X ⊗ biproduct.π (fun j => f j ⊗ Y) j✝) ≫ (α_ X (f j✝) Y).inv

Tactic:
simp only [← comp_tensor_id, ← id_tensor_comp_assoc, Category.assoc, biproduct.ι_π, comp_dite,
  dite_comp, tensor_dite, dite_tensor]

Result:
case w.w
C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : Preadditive C
inst✝³ : MonoidalCategory C
inst✝² : MonoidalPreadditive C
inst✝¹ : HasFiniteBiproducts C
J : Type
inst✝ : Fintype J
X : C
f : J → C
Y : C
j✝ : J
⊢ (∑ x : J, if h : x = j✝ then (𝟙 X ⊗ biproduct.π f x) ≫ eqToHom ⋯ ⊗ 𝟙 Y else (𝟙 X ⊗ biproduct.π f x) ≫ 0 ⊗ 𝟙 Y) =
    ∑ x : J,
      if h : x = j✝ then (α_ X (⨁ f) Y).hom ≫ (𝟙 X ⊗ (biproduct.π f x ⊗ 𝟙 Y) ≫ eqToHom ⋯) ≫ (α_ X (f j✝) Y).inv
      else (α_ X (⨁ f) Y).hom ≫ (𝟙 X ⊗ (biproduct.π f x ⊗ 𝟙 Y) ≫ 0) ≫ (α_ X (f j✝) Y).inv

Proof state:
C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : Preadditive C
inst✝³ : MonoidalCategory C
inst✝² : MonoidalPreadditive C
inst✝¹ : HasFiniteBiproducts C
J : Type
inst✝ : Fintype J
X : C
f : J → C
Y : C
⊢ (leftDistributor X f ⊗ asIso (𝟙 Y)) ≪≫ rightDistributor (fun j => X ⊗ f j) Y =
    α_ X (⨁ f) Y ≪≫
      (asIso (𝟙 X) ⊗ rightDistributor f Y) ≪≫
        (leftDistributor X fun j => f j ⊗ Y) ≪≫ biproduct.mapIso fun x => (α_ X (f x) Y).symm

Tactic:
ext

Result:
case w.w
C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : Preadditive C
inst✝³ : MonoidalCategory C
inst✝² : MonoidalPreadditive C
inst✝¹ : HasFiniteBiproducts C
J : Type
inst✝ : Fintype J
X : C
f : J → C
Y : C
j✝ : J
⊢ ((leftDistributor X f ⊗ asIso (𝟙 Y)) ≪≫ rightDistributor (fun j => X ⊗ f j) Y).hom ≫
      biproduct.π (fun j => (X ⊗ f j) ⊗ Y) j✝ =
    (α_ X (⨁ f) Y ≪≫
          (asIso (𝟙 X) ⊗ rightDistributor f Y) ≪≫
            (leftDistributor X fun j => f j ⊗ Y) ≪≫ biproduct.mapIso fun x => (α_ X (f x) Y).symm).hom ≫
      biproduct.π (fun j => (X ⊗ f j) ⊗ Y) j✝

Proof state:
case w.w
C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : Preadditive C
inst✝³ : MonoidalCategory C
inst✝² : MonoidalPreadditive C
inst✝¹ : HasFiniteBiproducts C
J : Type
inst✝ : Fintype J
X : C
f : J → C
Y : C
j✝ : J
⊢ ((leftDistributor X f ⊗ asIso (𝟙 Y)) ≪≫ rightDistributor (fun j => X ⊗ f j) Y).hom ≫
      biproduct.π (fun j => (X ⊗ f j) ⊗ Y) j✝ =
    (α_ X (⨁ f) Y ≪≫
          (asIso (𝟙 X) ⊗ rightDistributor f Y) ≪≫
            (leftDistributor X fun j => f j ⊗ Y) ≪≫ biproduct.mapIso fun x => (α_ X (f x) Y).symm).hom ≫
      biproduct.π (fun j => (X ⊗ f j) ⊗ Y) j✝

Tactic:
simp only [Category.comp_id, Category.assoc, eqToHom_refl, Iso.symm_hom, Iso.trans_hom,
  asIso_hom, comp_zero, comp_dite, Preadditive.sum_comp, Preadditive.comp_sum, sum_tensor,
  tensor_sum, comp_tensor_id, tensorIso_hom, leftDistributor_hom, rightDistributor_hom,
  biproduct.mapIso_hom, biproduct.ι_map, biproduct.ι_π, Finset.sum_dite_irrel,
  Finset.sum_dite_eq', Finset.sum_const_zero, Finset.mem_univ, if_true]

Result:
case w.w
C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : Preadditive C
inst✝³ : MonoidalCategory C
inst✝² : MonoidalPreadditive C
inst✝¹ : HasFiniteBiproducts C
J : Type
inst✝ : Fintype J
X : C
f : J → C
Y : C
j✝ : J
⊢ ∑ x : J,
      (X ◁ biproduct.π f x ⊗ 𝟙 Y) ≫ (biproduct.ι (fun j => X ⊗ f j) x ⊗ 𝟙 Y) ≫ biproduct.π (fun j => X ⊗ f j) j✝ ▷ Y =
    ∑ x : J,
      (α_ X (⨁ f) Y).hom ≫
        (𝟙 X ⊗ biproduct.π f x ▷ Y ≫ biproduct.ι (fun j => f j ⊗ Y) x) ≫
          X ◁ biproduct.π (fun j => f j ⊗ Y) j✝ ≫ (α_ X (f j✝) Y).inv

Proof state:
case w.w
C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : Preadditive C
inst✝³ : MonoidalCategory C
inst✝² : MonoidalPreadditive C
inst✝¹ : HasFiniteBiproducts C
J : Type
inst✝ : Fintype J
X : C
f : J → C
Y : C
j✝ : J
⊢ (∑ x : J, if h : x = j✝ then (𝟙 X ⊗ biproduct.π f x) ≫ eqToHom ⋯ ⊗ 𝟙 Y else (𝟙 X ⊗ biproduct.π f x) ≫ 0 ⊗ 𝟙 Y) =
    ∑ x : J,
      if h : x = j✝ then (α_ X (⨁ f) Y).hom ≫ (𝟙 X ⊗ (biproduct.π f x ⊗ 𝟙 Y) ≫ eqToHom ⋯) ≫ (α_ X (f j✝) Y).inv
      else (α_ X (⨁ f) Y).hom ≫ (𝟙 X ⊗ (biproduct.π f x ⊗ 𝟙 Y) ≫ 0) ≫ (α_ X (f j✝) Y).inv

Tactic:
simp

Result:
no goals

Proof state:
case w.w
C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : Preadditive C
inst✝³ : MonoidalCategory C
inst✝² : MonoidalPreadditive C
inst✝¹ : HasFiniteBiproducts C
J : Type
inst✝ : Fintype J
X : C
f : J → C
Y : C
j✝ : J
⊢ ∑ x : J,
      (X ◁ biproduct.π f x ⊗ 𝟙 Y) ≫ (biproduct.ι (fun j => X ⊗ f j) x ⊗ 𝟙 Y) ≫ biproduct.π (fun j => X ⊗ f j) j✝ ▷ Y =
    ∑ x : J,
      (α_ X (⨁ f) Y).hom ≫
        (𝟙 X ⊗ biproduct.π f x ▷ Y ≫ biproduct.ι (fun j => f j ⊗ Y) x) ≫
          X ◁ biproduct.π (fun j => f j ⊗ Y) j✝ ≫ (α_ X (f j✝) Y).inv

Tactic:
simp_rw [← tensorHom_id, ← id_tensorHom]

Result:
case w.w
C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : Preadditive C
inst✝³ : MonoidalCategory C
inst✝² : MonoidalPreadditive C
inst✝¹ : HasFiniteBiproducts C
J : Type
inst✝ : Fintype J
X : C
f : J → C
Y : C
j✝ : J
⊢ ∑ x : J,
      ((𝟙 X ⊗ biproduct.π f x) ⊗ 𝟙 Y) ≫
        (biproduct.ι (fun j => X ⊗ f j) x ⊗ 𝟙 Y) ≫ (biproduct.π (fun j => X ⊗ f j) j✝ ⊗ 𝟙 Y) =
    ∑ x : J,
      (α_ X (⨁ f) Y).hom ≫
        (𝟙 X ⊗ (biproduct.π f x ⊗ 𝟙 Y) ≫ biproduct.ι (fun j => f j ⊗ Y) x) ≫
          (𝟙 X ⊗ biproduct.π (fun j => f j ⊗ Y) j✝) ≫ (α_ X (f j✝) Y).inv

Proof state:
C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : Preadditive C
inst✝³ : MonoidalCategory C
inst✝² : MonoidalPreadditive C
inst✝¹ : HasFiniteBiproducts C
J : Type
inst✝ : Fintype J
X : C
f : J → C
Y : C
⊢ (leftDistributor X f ⊗ asIso (𝟙 Y)) ≪≫ rightDistributor (fun j => X ⊗ f j) Y =
    α_ X (⨁ f) Y ≪≫
      (asIso (𝟙 X) ⊗ rightDistributor f Y) ≪≫
        (leftDistributor X fun j => f j ⊗ Y) ≪≫ biproduct.mapIso fun x => (α_ X (f x) Y).symm

Tactic:
classical
ext
simp only [Category.comp_id, Category.assoc, eqToHom_refl, Iso.symm_hom, Iso.trans_hom,
  asIso_hom, comp_zero, comp_dite, Preadditive.sum_comp, Preadditive.comp_sum, sum_tensor,
  tensor_sum, comp_tensor_id, tensorIso_hom, leftDistributor_hom, rightDistributor_hom,
  biproduct.mapIso_hom, biproduct.ι_map, biproduct.ι_π, Finset.sum_dite_irrel,
  Finset.sum_dite_eq', Finset.sum_const_zero, Finset.mem_univ, if_true]
simp_rw [← tensorHom_id, ← id_tensorHom]
simp only [← comp_tensor_id, ← id_tensor_comp_assoc, Category.assoc, biproduct.ι_π, comp_dite,
  dite_comp, tensor_dite, dite_tensor]
simp

Result:
no goals