-- Mathlib/CategoryTheory/Localization/SmallHom.lean
lemma equiv_comp (L : C ⥤ D) [L.IsLocalization W] {X Y Z : C} [HasSmallLocalizedHom.{w} W X Y]
    [HasSmallLocalizedHom.{w} W Y Z] [HasSmallLocalizedHom.{w} W X Z]
    (α : SmallHom.{w} W X Y) (β : SmallHom.{w} W Y Z) :
    equiv W L (α.comp β) = equiv W L α ≫ equiv W L β

Proof state:
case intro
C : Type u₁
inst✝⁵ : Category.{v₁, u₁} C
W : MorphismProperty C
D : Type u₂
inst✝⁴ : Category.{v₂, u₂} D
L : C ⥤ D
inst✝³ : L.IsLocalization W
X Y Z : C
inst✝² : HasSmallLocalizedHom W X Y
inst✝¹ : HasSmallLocalizedHom W Y Z
inst✝ : HasSmallLocalizedHom W X Z
β : SmallHom W Y Z
this✝ : Small.{w, max u₁ v₁} (W.Q.obj X ⟶ W.Q.obj Y) := small_of_hasSmallLocalizedHom W W.Q X Y
this : Small.{w, max u₁ v₁} (W.Q.obj Y ⟶ W.Q.obj Z) := small_of_hasSmallLocalizedHom W W.Q Y Z
α : W.Q.obj X ⟶ W.Q.obj Y
⊢ (equiv W L) (comp ((equivShrink (W.Q.obj X ⟶ W.Q.obj Y)) α) β) =
    (equiv W L) ((equivShrink (W.Q.obj X ⟶ W.Q.obj Y)) α) ≫ (equiv W L) β

Tactic:
obtain ⟨β, rfl⟩ := (equivShrink _).surjective β

Result:
case intro.intro
C : Type u₁
inst✝⁵ : Category.{v₁, u₁} C
W : MorphismProperty C
D : Type u₂
inst✝⁴ : Category.{v₂, u₂} D
L : C ⥤ D
inst✝³ : L.IsLocalization W
X Y Z : C
inst✝² : HasSmallLocalizedHom W X Y
inst✝¹ : HasSmallLocalizedHom W Y Z
inst✝ : HasSmallLocalizedHom W X Z
this✝ : Small.{w, max u₁ v₁} (W.Q.obj X ⟶ W.Q.obj Y) := small_of_hasSmallLocalizedHom W W.Q X Y
this : Small.{w, max u₁ v₁} (W.Q.obj Y ⟶ W.Q.obj Z) := small_of_hasSmallLocalizedHom W W.Q Y Z
α : W.Q.obj X ⟶ W.Q.obj Y
β : W.Q.obj Y ⟶ W.Q.obj Z
⊢ (equiv W L) (comp ((equivShrink (W.Q.obj X ⟶ W.Q.obj Y)) α) ((equivShrink (W.Q.obj Y ⟶ W.Q.obj Z)) β)) =
    (equiv W L) ((equivShrink (W.Q.obj X ⟶ W.Q.obj Y)) α) ≫ (equiv W L) ((equivShrink (W.Q.obj Y ⟶ W.Q.obj Z)) β)

Proof state:
C : Type u₁
inst✝⁵ : Category.{v₁, u₁} C
W : MorphismProperty C
D : Type u₂
inst✝⁴ : Category.{v₂, u₂} D
L : C ⥤ D
inst✝³ : L.IsLocalization W
X Y Z : C
inst✝² : HasSmallLocalizedHom W X Y
inst✝¹ : HasSmallLocalizedHom W Y Z
inst✝ : HasSmallLocalizedHom W X Z
α : SmallHom W X Y
β : SmallHom W Y Z
this✝ : Small.{w, max u₁ v₁} (W.Q.obj X ⟶ W.Q.obj Y) := small_of_hasSmallLocalizedHom W W.Q X Y
this : Small.{w, max u₁ v₁} (W.Q.obj Y ⟶ W.Q.obj Z) := small_of_hasSmallLocalizedHom W W.Q Y Z
⊢ (equiv W L) (α.comp β) = (equiv W L) α ≫ (equiv W L) β

Tactic:
obtain ⟨α, rfl⟩ := (equivShrink _).surjective α

Result:
case intro
C : Type u₁
inst✝⁵ : Category.{v₁, u₁} C
W : MorphismProperty C
D : Type u₂
inst✝⁴ : Category.{v₂, u₂} D
L : C ⥤ D
inst✝³ : L.IsLocalization W
X Y Z : C
inst✝² : HasSmallLocalizedHom W X Y
inst✝¹ : HasSmallLocalizedHom W Y Z
inst✝ : HasSmallLocalizedHom W X Z
β : SmallHom W Y Z
this✝ : Small.{w, max u₁ v₁} (W.Q.obj X ⟶ W.Q.obj Y) := small_of_hasSmallLocalizedHom W W.Q X Y
this : Small.{w, max u₁ v₁} (W.Q.obj Y ⟶ W.Q.obj Z) := small_of_hasSmallLocalizedHom W W.Q Y Z
α : W.Q.obj X ⟶ W.Q.obj Y
⊢ (equiv W L) (comp ((equivShrink (W.Q.obj X ⟶ W.Q.obj Y)) α) β) =
    (equiv W L) ((equivShrink (W.Q.obj X ⟶ W.Q.obj Y)) α) ≫ (equiv W L) β

Proof state:
case intro.intro
C : Type u₁
inst✝⁵ : Category.{v₁, u₁} C
W : MorphismProperty C
D : Type u₂
inst✝⁴ : Category.{v₂, u₂} D
L : C ⥤ D
inst✝³ : L.IsLocalization W
X Y Z : C
inst✝² : HasSmallLocalizedHom W X Y
inst✝¹ : HasSmallLocalizedHom W Y Z
inst✝ : HasSmallLocalizedHom W X Z
this✝ : Small.{w, max u₁ v₁} (W.Q.obj X ⟶ W.Q.obj Y) := small_of_hasSmallLocalizedHom W W.Q X Y
this : Small.{w, max u₁ v₁} (W.Q.obj Y ⟶ W.Q.obj Z) := small_of_hasSmallLocalizedHom W W.Q Y Z
α : W.Q.obj X ⟶ W.Q.obj Y
β : W.Q.obj Y ⟶ W.Q.obj Z
⊢ (homEquiv W W.Q L)
      ((homEquiv W W.Q W.Q)
        ((homEquiv W W.Q W.Q) ((equivShrink (W.Q.obj X ⟶ W.Q.obj Y)).symm ((equivShrink (W.Q.obj X ⟶ W.Q.obj Y)) α)) ≫
          (homEquiv W W.Q W.Q)
            ((equivShrink (W.Q.obj Y ⟶ W.Q.obj Z)).symm ((equivShrink (W.Q.obj Y ⟶ W.Q.obj Z)) β)))) =
    (homEquiv W W.Q L) ((equivShrink (W.Q.obj X ⟶ W.Q.obj Y)).symm ((equivShrink (W.Q.obj X ⟶ W.Q.obj Y)) α)) ≫
      (homEquiv W W.Q L) ((equivShrink (W.Q.obj Y ⟶ W.Q.obj Z)).symm ((equivShrink (W.Q.obj Y ⟶ W.Q.obj Z)) β))

Tactic:
erw [(equivShrink _).symm_apply_apply, (equivShrink _).symm_apply_apply]

Result:
case intro.intro
C : Type u₁
inst✝⁵ : Category.{v₁, u₁} C
W : MorphismProperty C
D : Type u₂
inst✝⁴ : Category.{v₂, u₂} D
L : C ⥤ D
inst✝³ : L.IsLocalization W
X Y Z : C
inst✝² : HasSmallLocalizedHom W X Y
inst✝¹ : HasSmallLocalizedHom W Y Z
inst✝ : HasSmallLocalizedHom W X Z
this✝ : Small.{w, max u₁ v₁} (W.Q.obj X ⟶ W.Q.obj Y) := small_of_hasSmallLocalizedHom W W.Q X Y
this : Small.{w, max u₁ v₁} (W.Q.obj Y ⟶ W.Q.obj Z) := small_of_hasSmallLocalizedHom W W.Q Y Z
α : W.Q.obj X ⟶ W.Q.obj Y
β : W.Q.obj Y ⟶ W.Q.obj Z
⊢ (homEquiv W W.Q L) ((homEquiv W W.Q W.Q) ((homEquiv W W.Q W.Q) α ≫ (homEquiv W W.Q W.Q) β)) =
    (homEquiv W W.Q L) α ≫ (homEquiv W W.Q L) β