lemma comp [L₁.IsLocalization W₁] [L₂.IsLocalization W₂]
    (W₃ : MorphismProperty C₁) (hW₃ : W₃.IsInvertedBy (L₁ ⋙ L₂))
    (hW₁₃ : W₁ ⊆ W₃) (hW₂₃ : W₂ ⊆ W₃.map L₁) :
    (L₁ ⋙ L₂).IsLocalization W₃ := by
  -- The proof proceeds by reducing to the case of the constructed
  -- localized categories, which satisfy the strict universal property
  -- of the localization. In order to do this, we introduce
  -- an equivalence of categories `E₂ : C₂ ≅ W₁.Localization`. Via
  -- this equivalence, we introduce `W₂' : MorphismProperty W₁.Localization`
  -- which corresponds to `W₂` via the equivalence `E₂`.
  -- Then, we have a localizer morphism `Φ : LocalizerMorphism W₂ W₂'` which
  -- is a localized equivalence (because `E₂` is an equivalence).
  let E₂ := Localization.uniq L₁ W₁.Q W₁
  let W₂' := W₂.map E₂.functor
  let Φ : LocalizerMorphism W₂ W₂' :=
    { functor := E₂.functor
      map := by
        have eq := W₂.isoClosure.inverseImage_map_eq_of_isEquivalence
          W₂.isoClosure_respectsIso E₂.functor
        rw [MorphismProperty.map_isoClosure] at eq
        rw [eq]
        apply W₂.subset_isoClosure }
  have := LocalizerMorphism.IsLocalizedEquivalence.of_equivalence Φ (by rfl)
  -- The fact that `Φ` is a localized equivalence allows to consider
  -- the induced equivalence of categories `E₃ : C₃ ≅ W₂'.Localization`, and
  -- the isomorphism `iso : (W₁.Q ⋙ W₂'.Q) ⋙ E₃.inverse ≅ L₁ ⋙ L₂`
  let E₃ := (Φ.localizedFunctor L₂ W₂'.Q).asEquivalence
  let iso : (W₁.Q ⋙ W₂'.Q) ⋙ E₃.inverse ≅ L₁ ⋙ L₂ := by
    calc
      _ ≅ L₁ ⋙ E₂.functor ⋙ W₂'.Q ⋙ E₃.inverse :=
          Functor.associator _ _ _ ≪≫ isoWhiskerRight (compUniqFunctor L₁ W₁.Q W₁).symm _ ≪≫
            Functor.associator _ _ _
      _ ≅ L₁ ⋙ L₂ ⋙ E₃.functor ⋙ E₃.inverse :=
          isoWhiskerLeft _ ((Functor.associator _ _ _).symm ≪≫
            isoWhiskerRight (Φ.catCommSq L₂ W₂'.Q).iso E₃.inverse ≪≫ Functor.associator _ _ _)
      _ ≅ L₁ ⋙ L₂ := isoWhiskerLeft _ (isoWhiskerLeft _ E₃.unitIso.symm ≪≫ L₂.rightUnitor)
  -- In order to show `(W₁.Q ⋙ W₂'.Q).IsLocalization W₃`, we need
  -- to check the assumptions of `StrictUniversalPropertyFixedTarget.comp`
  have hW₃' : W₃.IsInvertedBy (W₁.Q ⋙ W₂'.Q) := by
    

Proof state:
C₁ : Type u₁
C₂ : Type u₂
C₃ : Type u₃
E : Type u₄
inst✝⁵ : Category.{v₁, u₁} C₁
inst✝⁴ : Category.{v₂, u₂} C₂
inst✝³ : Category.{v₃, u₃} C₃
inst✝² : Category.{v₄, u₄} E
L₁ : C₁ ⥤ C₂
L₂ : C₂ ⥤ C₃
W₁ : MorphismProperty C₁
W₂ : MorphismProperty C₂
inst✝¹ : IsLocalization L₁ W₁
inst✝ : IsLocalization L₂ W₂
W₃ : MorphismProperty C₁
hW₃ : MorphismProperty.IsInvertedBy W₃ (L₁ ⋙ L₂)
hW₁₃ : W₁ ⊆ W₃
hW₂₃ : W₂ ⊆ MorphismProperty.map W₃ L₁
E₂ : C₂ ≌ MorphismProperty.Localization W₁ := uniq L₁ (MorphismProperty.Q W₁) W₁
W₂' : MorphismProperty (MorphismProperty.Localization W₁) := MorphismProperty.map W₂ E₂.functor
Φ : LocalizerMorphism W₂ W₂' :=
  { functor := E₂.functor, map := (_ : W₂ ⊆ MorphismProperty.inverseImage W₂' E₂.functor) }
this : LocalizerMorphism.IsLocalizedEquivalence Φ
E₃ : C₃ ≌ MorphismProperty.Localization W₂' :=
  asEquivalence (LocalizerMorphism.localizedFunctor Φ L₂ (MorphismProperty.Q W₂'))
iso : (MorphismProperty.Q W₁ ⋙ MorphismProperty.Q W₂') ⋙ E₃.inverse ≅ L₁ ⋙ L₂ :=
  Trans.trans
    (Trans.trans
      (associator (MorphismProperty.Q W₁) (MorphismProperty.Q W₂') E₃.inverse ≪≫
        isoWhiskerRight (compUniqFunctor L₁ (MorphismProperty.Q W₁) W₁).symm (MorphismProperty.Q W₂' ⋙ E₃.inverse) ≪≫
          associator L₁ (uniq L₁ (MorphismProperty.Q W₁) W₁).functor (MorphismProperty.Q W₂' ⋙ E₃.inverse))
      (isoWhiskerLeft L₁
        ((associator E₂.functor (MorphismProperty.Q W₂') E₃.inverse).symm ≪≫
          isoWhiskerRight
              (CatCommSq.iso Φ.functor L₂ (MorphismProperty.Q W₂')
                (LocalizerMorphism.localizedFunctor Φ L₂ (MorphismProperty.Q W₂')))
              E₃.inverse ≪≫
            associator L₂ (LocalizerMorphism.localizedFunctor Φ L₂ (MorphismProperty.Q W₂')) E₃.inverse)))
    (isoWhiskerLeft L₁ (isoWhiskerLeft L₂ E₃.unitIso.symm ≪≫ rightUnitor L₂))
⊢ MorphismProperty.IsInvertedBy W₃ (MorphismProperty.Q W₁ ⋙ MorphismProperty.Q W₂')

Next tactic:
simpa only [← MorphismProperty.IsInvertedBy.iff_comp _ _ E₃.inverse,
      MorphismProperty.IsInvertedBy.iff_of_iso W₃ iso] using hW₃