l3lab/ntp-mathlib huggingface dataset:
/-- Under some conditions on the `MorphismProperty`, functors satisfying the strict
universal property of the localization are stable under composition -/
def StrictUniversalPropertyFixedTarget.comp
    (h₁ : StrictUniversalPropertyFixedTarget L₁ W₁ E)
    (h₂ : StrictUniversalPropertyFixedTarget L₂ W₂ E)
    (W₃ : MorphismProperty C₁) (hW₃ : W₃.IsInvertedBy (L₁ ⋙ L₂))
    (hW₁₃ : W₁ ⊆ W₃) (hW₂₃ : W₂ ⊆ W₃.map L₁) :
    StrictUniversalPropertyFixedTarget (L₁ ⋙ L₂) W₃ E where
  inverts := hW₃
  lift F hF := h₂.lift (h₁.lift F (MorphismProperty.IsInvertedBy.of_subset _ _  F hF hW₁₃)) (by
    refine' MorphismProperty.IsInvertedBy.of_subset _ _ _ _ hW₂₃
    

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₂
h₁ : StrictUniversalPropertyFixedTarget L₁ W₁ E
h₂ : StrictUniversalPropertyFixedTarget L₂ W₂ E
W₃ : MorphismProperty C₁
hW₃ : MorphismProperty.IsInvertedBy W₃ (L₁ ⋙ L₂)
hW₁₃ : W₁ ⊆ W₃
hW₂₃ : W₂ ⊆ MorphismProperty.map W₃ L₁
F : C₁ ⥤ E
hF : MorphismProperty.IsInvertedBy W₃ F
⊢ MorphismProperty.IsInvertedBy (MorphismProperty.map W₃ L₁) (lift h₁ F (_ : MorphismProperty.IsInvertedBy W₁ F))

Next tactic:
simpa only [MorphismProperty.IsInvertedBy.map_iff, h₁.fac F] using hF
/-- Under some conditions on the `MorphismProperty`, functors satisfying the strict
universal property of the localization are stable under composition -/
def StrictUniversalPropertyFixedTarget.comp
    (h₁ : StrictUniversalPropertyFixedTarget L₁ W₁ E)
    (h₂ : StrictUniversalPropertyFixedTarget L₂ W₂ E)
    (W₃ : MorphismProperty C₁) (hW₃ : W₃.IsInvertedBy (L₁ ⋙ L₂))
    (hW₁₃ : W₁ ⊆ W₃) (hW₂₃ : W₂ ⊆ W₃.map L₁) :
    StrictUniversalPropertyFixedTarget (L₁ ⋙ L₂) W₃ E where
  inverts := hW₃
  lift F hF := h₂.lift (h₁.lift F (MorphismProperty.IsInvertedBy.of_subset _ _  F hF hW₁₃)) (by
    refine' MorphismProperty.IsInvertedBy.of_subset _ _ _ _ hW₂₃
    simpa only [MorphismProperty.IsInvertedBy.map_iff, h₁.fac F] using hF)
  fac F hF := 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₂
h₁ : StrictUniversalPropertyFixedTarget L₁ W₁ E
h₂ : StrictUniversalPropertyFixedTarget L₂ W₂ E
W₃ : MorphismProperty C₁
hW₃ : MorphismProperty.IsInvertedBy W₃ (L₁ ⋙ L₂)
hW₁₃ : W₁ ⊆ W₃
hW₂₃ : W₂ ⊆ MorphismProperty.map W₃ L₁
F : C₁ ⥤ E
hF : MorphismProperty.IsInvertedBy W₃ F
⊢ (L₁ ⋙ L₂) ⋙
      (fun F hF =>
          lift h₂ (lift h₁ F (_ : MorphismProperty.IsInvertedBy W₁ F))
            (_ : MorphismProperty.IsInvertedBy W₂ (lift h₁ F (_ : MorphismProperty.IsInvertedBy W₁ F))))
        F hF =
    F

Next tactic:
rw [Functor.assoc, h₂.fac, h₁.fac]
/-- Under some conditions on the `MorphismProperty`, functors satisfying the strict
universal property of the localization are stable under composition -/
def StrictUniversalPropertyFixedTarget.comp
    (h₁ : StrictUniversalPropertyFixedTarget L₁ W₁ E)
    (h₂ : StrictUniversalPropertyFixedTarget L₂ W₂ E)
    (W₃ : MorphismProperty C₁) (hW₃ : W₃.IsInvertedBy (L₁ ⋙ L₂))
    (hW₁₃ : W₁ ⊆ W₃) (hW₂₃ : W₂ ⊆ W₃.map L₁) :
    StrictUniversalPropertyFixedTarget (L₁ ⋙ L₂) W₃ E where
  inverts := hW₃
  lift F hF := h₂.lift (h₁.lift F (MorphismProperty.IsInvertedBy.of_subset _ _  F hF hW₁₃)) (by
    refine' MorphismProperty.IsInvertedBy.of_subset _ _ _ _ hW₂₃
    simpa only [MorphismProperty.IsInvertedBy.map_iff, h₁.fac F] using hF)
  fac F hF := by rw [Functor.assoc, h₂.fac, h₁.fac]
  uniq F₁ F₂ h := h₂.uniq _ _ (h₁.uniq _ _ (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₂
h₁ : StrictUniversalPropertyFixedTarget L₁ W₁ E
h₂ : StrictUniversalPropertyFixedTarget L₂ W₂ E
W₃ : MorphismProperty C₁
hW₃ : MorphismProperty.IsInvertedBy W₃ (L₁ ⋙ L₂)
hW₁₃ : W₁ ⊆ W₃
hW₂₃ : W₂ ⊆ MorphismProperty.map W₃ L₁
F₁ F₂ : C₃ ⥤ E
h : (L₁ ⋙ L₂) ⋙ F₁ = (L₁ ⋙ L₂) ⋙ F₂
⊢ L₁ ⋙ L₂ ⋙ F₁ = L₁ ⋙ L₂ ⋙ F₂

Next tactic:
simpa only [Functor.assoc] using h
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).
  

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₁
⊢ IsLocalization (L₁ ⋙ L₂) W₃

Next tactic:
let E₂ := Localization.uniq L₁ W₁.Q W₁
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₁
  

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₁
⊢ IsLocalization (L₁ ⋙ L₂) W₃

Next tactic:
let W₂' := W₂.map E₂.functor
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
  

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
⊢ IsLocalization (L₁ ⋙ L₂) W₃

Next tactic:
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 }
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
        

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
⊢ W₂ ⊆ MorphismProperty.inverseImage W₂' E₂.functor

Next tactic:
have eq := W₂.isoClosure.inverseImage_map_eq_of_isEquivalence
          W₂.isoClosure_respectsIso E₂.functor
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
        

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
eq :
  MorphismProperty.inverseImage (MorphismProperty.map (MorphismProperty.isoClosure W₂) E₂.functor) E₂.functor =
    MorphismProperty.isoClosure W₂
⊢ W₂ ⊆ MorphismProperty.inverseImage W₂' E₂.functor

Next tactic:
rw [MorphismProperty.map_isoClosure] at eq
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
        

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
eq : MorphismProperty.inverseImage (MorphismProperty.map W₂ E₂.functor) E₂.functor = MorphismProperty.isoClosure W₂
⊢ W₂ ⊆ MorphismProperty.inverseImage W₂' E₂.functor

Next tactic:
rw [eq]
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]
        

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
eq : MorphismProperty.inverseImage (MorphismProperty.map W₂ E₂.functor) E₂.functor = MorphismProperty.isoClosure W₂
⊢ W₂ ⊆ MorphismProperty.isoClosure W₂

Next tactic:
apply W₂.subset_isoClosure
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 }
  

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) }
⊢ IsLocalization (L₁ ⋙ L₂) W₃

Next tactic:
have := LocalizerMorphism.IsLocalizedEquivalence.of_equivalence Φ (by rfl)
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 

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) }
⊢ W₂' ⊆ MorphismProperty.map W₂ Φ.functor

Next tactic:
rfl
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₂`
  

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 Φ
⊢ IsLocalization (L₁ ⋙ L₂) W₃

Next tactic:
let E₃ := (Φ.localizedFunctor L₂ W₂'.Q).asEquivalence