l3lab/ntp-mathlib huggingface dataset:
theorem uniq (G₁ G₂ : W.Localization ⥤ D) (h : W.Q ⋙ G₁ = W.Q ⋙ G₂) : G₁ = G₂ := by
  suffices h' : Quotient.functor _ ⋙ G₁ = Quotient.functor _ ⋙ G₂
  · refine' Functor.ext _ _
    · rintro ⟨⟨X⟩⟩
      apply Functor.congr_obj h
    · rintro ⟨⟨X⟩⟩ ⟨⟨Y⟩⟩ ⟨f⟩
      apply Functor.congr_hom h'
  · refine' Paths.ext_functor _ _
    · ext X
      cases X
      apply Functor.congr_obj h
    · rintro ⟨X⟩ ⟨Y⟩ (f | ⟨w, hw⟩)
      · simpa only using Functor.congr_hom h f
      · have hw : W.Q.map w = (wIso w hw).hom := rfl
        have hw' := Functor.congr_hom h w
        simp only [Functor.comp_map, hw] at hw'
        

Proof state:
case h'.refine'_2.mk.mk.inr.mk
C : Type uC
inst✝¹ : Category.{uC', uC} C
W : MorphismProperty C
D : Type uD
inst✝ : Category.{uD', uD} D
G : C ⥤ D
hG : MorphismProperty.IsInvertedBy W G
G₁ G₂ : MorphismProperty.Localization W ⥤ D
h : MorphismProperty.Q W ⋙ G₁ = MorphismProperty.Q W ⋙ G₂
X Y : C
w : { obj := Y }.obj ⟶ { obj := X }.obj
hw✝ : W w
hw : (MorphismProperty.Q W).map w = (wIso w hw✝).hom
hw' :
  G₁.map (wIso w hw✝).hom =
    eqToHom (_ : (MorphismProperty.Q W ⋙ G₁).obj { obj := Y }.obj = (MorphismProperty.Q W ⋙ G₂).obj { obj := Y }.obj) ≫
      G₂.map (wIso w hw✝).hom ≫
        eqToHom
          (_ : (MorphismProperty.Q W ⋙ G₂).obj { obj := X }.obj = (MorphismProperty.Q W ⋙ G₁).obj { obj := X }.obj)
⊢ (Quotient.functor (relations W) ⋙ G₁).map (Quiver.Hom.toPath (Sum.inr { val := w, property := hw✝ })) =
    eqToHom
        (_ :
          (Quotient.functor (relations W) ⋙ G₁).obj { obj := X } =
            (Quotient.functor (relations W) ⋙ G₂).obj { obj := X }) ≫
      (Quotient.functor (relations W) ⋙ G₂).map (Quiver.Hom.toPath (Sum.inr { val := w, property := hw✝ })) ≫
        eqToHom
          (_ :
            (Quotient.functor (relations W) ⋙ G₂).obj { obj := Y } =
              (Quotient.functor (relations W) ⋙ G₁).obj { obj := Y })

Next tactic:
refine' Functor.congr_inv_of_congr_hom _ _ _ _ _ hw'
theorem uniq (G₁ G₂ : W.Localization ⥤ D) (h : W.Q ⋙ G₁ = W.Q ⋙ G₂) : G₁ = G₂ := by
  suffices h' : Quotient.functor _ ⋙ G₁ = Quotient.functor _ ⋙ G₂
  · refine' Functor.ext _ _
    · rintro ⟨⟨X⟩⟩
      apply Functor.congr_obj h
    · rintro ⟨⟨X⟩⟩ ⟨⟨Y⟩⟩ ⟨f⟩
      apply Functor.congr_hom h'
  · refine' Paths.ext_functor _ _
    · ext X
      cases X
      apply Functor.congr_obj h
    · rintro ⟨X⟩ ⟨Y⟩ (f | ⟨w, hw⟩)
      · simpa only using Functor.congr_hom h f
      · have hw : W.Q.map w = (wIso w hw).hom := rfl
        have hw' := Functor.congr_hom h w
        simp only [Functor.comp_map, hw] at hw'
        refine' Functor.congr_inv_of_congr_hom _ _ _ _ _ hw'
        

Proof state:
case h'.refine'_2.mk.mk.inr.mk.refine'_1
C : Type uC
inst✝¹ : Category.{uC', uC} C
W : MorphismProperty C
D : Type uD
inst✝ : Category.{uD', uD} D
G : C ⥤ D
hG : MorphismProperty.IsInvertedBy W G
G₁ G₂ : MorphismProperty.Localization W ⥤ D
h : MorphismProperty.Q W ⋙ G₁ = MorphismProperty.Q W ⋙ G₂
X Y : C
w : { obj := Y }.obj ⟶ { obj := X }.obj
hw✝ : W w
hw : (MorphismProperty.Q W).map w = (wIso w hw✝).hom
hw' :
  G₁.map (wIso w hw✝).hom =
    eqToHom (_ : (MorphismProperty.Q W ⋙ G₁).obj { obj := Y }.obj = (MorphismProperty.Q W ⋙ G₂).obj { obj := Y }.obj) ≫
      G₂.map (wIso w hw✝).hom ≫
        eqToHom
          (_ : (MorphismProperty.Q W ⋙ G₂).obj { obj := X }.obj = (MorphismProperty.Q W ⋙ G₁).obj { obj := X }.obj)
⊢ G₁.obj ((MorphismProperty.Q W).obj Y) = G₂.obj ((MorphismProperty.Q W).obj Y)
case h'.refine'_2.mk.mk.inr.mk.refine'_2
C : Type uC
inst✝¹ : Category.{uC', uC} C
W : MorphismProperty C
D : Type uD
inst✝ : Category.{uD', uD} D
G : C ⥤ D
hG : MorphismProperty.IsInvertedBy W G
G₁ G₂ : MorphismProperty.Localization W ⥤ D
h : MorphismProperty.Q W ⋙ G₁ = MorphismProperty.Q W ⋙ G₂
X Y : C
w : { obj := Y }.obj ⟶ { obj := X }.obj
hw✝ : W w
hw : (MorphismProperty.Q W).map w = (wIso w hw✝).hom
hw' :
  G₁.map (wIso w hw✝).hom =
    eqToHom (_ : (MorphismProperty.Q W ⋙ G₁).obj { obj := Y }.obj = (MorphismProperty.Q W ⋙ G₂).obj { obj := Y }.obj) ≫
      G₂.map (wIso w hw✝).hom ≫
        eqToHom
          (_ : (MorphismProperty.Q W ⋙ G₂).obj { obj := X }.obj = (MorphismProperty.Q W ⋙ G₁).obj { obj := X }.obj)
⊢ G₁.obj ((MorphismProperty.Q W).obj X) = G₂.obj ((MorphismProperty.Q W).obj X)

Next tactic:
all_goals apply Functor.congr_obj h
theorem uniq (G₁ G₂ : W.Localization ⥤ D) (h : W.Q ⋙ G₁ = W.Q ⋙ G₂) : G₁ = G₂ := by
  suffices h' : Quotient.functor _ ⋙ G₁ = Quotient.functor _ ⋙ G₂
  · refine' Functor.ext _ _
    · rintro ⟨⟨X⟩⟩
      apply Functor.congr_obj h
    · rintro ⟨⟨X⟩⟩ ⟨⟨Y⟩⟩ ⟨f⟩
      apply Functor.congr_hom h'
  · refine' Paths.ext_functor _ _
    · ext X
      cases X
      apply Functor.congr_obj h
    · rintro ⟨X⟩ ⟨Y⟩ (f | ⟨w, hw⟩)
      · simpa only using Functor.congr_hom h f
      · have hw : W.Q.map w = (wIso w hw).hom := rfl
        have hw' := Functor.congr_hom h w
        simp only [Functor.comp_map, hw] at hw'
        refine' Functor.congr_inv_of_congr_hom _ _ _ _ _ hw'
        all_goals 

Proof state:
case h'.refine'_2.mk.mk.inr.mk.refine'_1
C : Type uC
inst✝¹ : Category.{uC', uC} C
W : MorphismProperty C
D : Type uD
inst✝ : Category.{uD', uD} D
G : C ⥤ D
hG : MorphismProperty.IsInvertedBy W G
G₁ G₂ : MorphismProperty.Localization W ⥤ D
h : MorphismProperty.Q W ⋙ G₁ = MorphismProperty.Q W ⋙ G₂
X Y : C
w : { obj := Y }.obj ⟶ { obj := X }.obj
hw✝ : W w
hw : (MorphismProperty.Q W).map w = (wIso w hw✝).hom
hw' :
  G₁.map (wIso w hw✝).hom =
    eqToHom (_ : (MorphismProperty.Q W ⋙ G₁).obj { obj := Y }.obj = (MorphismProperty.Q W ⋙ G₂).obj { obj := Y }.obj) ≫
      G₂.map (wIso w hw✝).hom ≫
        eqToHom
          (_ : (MorphismProperty.Q W ⋙ G₂).obj { obj := X }.obj = (MorphismProperty.Q W ⋙ G₁).obj { obj := X }.obj)
⊢ G₁.obj ((MorphismProperty.Q W).obj Y) = G₂.obj ((MorphismProperty.Q W).obj Y)

Next tactic:
apply Functor.congr_obj h
theorem uniq (G₁ G₂ : W.Localization ⥤ D) (h : W.Q ⋙ G₁ = W.Q ⋙ G₂) : G₁ = G₂ := by
  suffices h' : Quotient.functor _ ⋙ G₁ = Quotient.functor _ ⋙ G₂
  · refine' Functor.ext _ _
    · rintro ⟨⟨X⟩⟩
      apply Functor.congr_obj h
    · rintro ⟨⟨X⟩⟩ ⟨⟨Y⟩⟩ ⟨f⟩
      apply Functor.congr_hom h'
  · refine' Paths.ext_functor _ _
    · ext X
      cases X
      apply Functor.congr_obj h
    · rintro ⟨X⟩ ⟨Y⟩ (f | ⟨w, hw⟩)
      · simpa only using Functor.congr_hom h f
      · have hw : W.Q.map w = (wIso w hw).hom := rfl
        have hw' := Functor.congr_hom h w
        simp only [Functor.comp_map, hw] at hw'
        refine' Functor.congr_inv_of_congr_hom _ _ _ _ _ hw'
        all_goals 

Proof state:
case h'.refine'_2.mk.mk.inr.mk.refine'_2
C : Type uC
inst✝¹ : Category.{uC', uC} C
W : MorphismProperty C
D : Type uD
inst✝ : Category.{uD', uD} D
G : C ⥤ D
hG : MorphismProperty.IsInvertedBy W G
G₁ G₂ : MorphismProperty.Localization W ⥤ D
h : MorphismProperty.Q W ⋙ G₁ = MorphismProperty.Q W ⋙ G₂
X Y : C
w : { obj := Y }.obj ⟶ { obj := X }.obj
hw✝ : W w
hw : (MorphismProperty.Q W).map w = (wIso w hw✝).hom
hw' :
  G₁.map (wIso w hw✝).hom =
    eqToHom (_ : (MorphismProperty.Q W ⋙ G₁).obj { obj := Y }.obj = (MorphismProperty.Q W ⋙ G₂).obj { obj := Y }.obj) ≫
      G₂.map (wIso w hw✝).hom ≫
        eqToHom
          (_ : (MorphismProperty.Q W ⋙ G₂).obj { obj := X }.obj = (MorphismProperty.Q W ⋙ G₁).obj { obj := X }.obj)
⊢ G₁.obj ((MorphismProperty.Q W).obj X) = G₂.obj ((MorphismProperty.Q W).obj X)

Next tactic:
apply Functor.congr_obj h
/-- The canonical bijection between objects in a category and its
localization with respect to a morphism_property `W` -/
@[simps]
def objEquiv : C ≃ W.Localization where
  toFun := W.Q.obj
  invFun X := X.as.obj
  left_inv X := rfl
  right_inv := by
    

Proof state:
C : Type uC
inst✝¹ : Category.{uC', uC} C
W : MorphismProperty C
D : Type uD
inst✝ : Category.{uD', uD} D
G : C ⥤ D
hG : MorphismProperty.IsInvertedBy W G
⊢ Function.RightInverse (fun X => X.as.obj) (MorphismProperty.Q W).toPrefunctor.obj

Next tactic:
rintro ⟨⟨X⟩⟩
/-- The canonical bijection between objects in a category and its
localization with respect to a morphism_property `W` -/
@[simps]
def objEquiv : C ≃ W.Localization where
  toFun := W.Q.obj
  invFun X := X.as.obj
  left_inv X := rfl
  right_inv := by
    rintro ⟨⟨X⟩⟩
    

Proof state:
case mk.mk
C : Type uC
inst✝¹ : Category.{uC', uC} C
W : MorphismProperty C
D : Type uD
inst✝ : Category.{uD', uD} D
G : C ⥤ D
hG : MorphismProperty.IsInvertedBy W G
X : C
⊢ (MorphismProperty.Q W).obj ((fun X => X.as.obj) { as := { obj := X } }) = { as := { obj := X } }

Next tactic:
rfl
/-- A `MorphismProperty` in `W.Localization` is satisfied by all
morphisms in the localized category if it contains the image of the
morphisms in the original category, the inverses of the morphisms
in `W` and if it is stable under composition -/
theorem morphismProperty_is_top (P : MorphismProperty W.Localization)
    (hP₁ : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), P (W.Q.map f))
    (hP₂ : ∀ ⦃X Y : C⦄ (w : X ⟶ Y) (hw : W w), P (winv w hw)) (hP₃ : P.StableUnderComposition) :
    P = ⊤ := by
  

Proof state:
C : Type uC
inst✝¹ : Category.{uC', uC} C
W : MorphismProperty C
D : Type uD
inst✝ : Category.{uD', uD} D
G : C ⥤ D
hG : MorphismProperty.IsInvertedBy W G
P : MorphismProperty (MorphismProperty.Localization W)
hP₁ : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), P ((MorphismProperty.Q W).map f)
hP₂ : ∀ ⦃X Y : C⦄ (w : X ⟶ Y) (hw : W w), P (winv w hw)
hP₃ : MorphismProperty.StableUnderComposition P
⊢ P = ⊤

Next tactic:
funext X Y f
/-- A `MorphismProperty` in `W.Localization` is satisfied by all
morphisms in the localized category if it contains the image of the
morphisms in the original category, the inverses of the morphisms
in `W` and if it is stable under composition -/
theorem morphismProperty_is_top (P : MorphismProperty W.Localization)
    (hP₁ : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), P (W.Q.map f))
    (hP₂ : ∀ ⦃X Y : C⦄ (w : X ⟶ Y) (hw : W w), P (winv w hw)) (hP₃ : P.StableUnderComposition) :
    P = ⊤ := by
  funext X Y f
  

Proof state:
case h.h.h
C : Type uC
inst✝¹ : Category.{uC', uC} C
W : MorphismProperty C
D : Type uD
inst✝ : Category.{uD', uD} D
G : C ⥤ D
hG : MorphismProperty.IsInvertedBy W G
P : MorphismProperty (MorphismProperty.Localization W)
hP₁ : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), P ((MorphismProperty.Q W).map f)
hP₂ : ∀ ⦃X Y : C⦄ (w : X ⟶ Y) (hw : W w), P (winv w hw)
hP₃ : MorphismProperty.StableUnderComposition P
X Y : MorphismProperty.Localization W
f : X ⟶ Y
⊢ P f = ⊤ f

Next tactic:
ext
/-- A `MorphismProperty` in `W.Localization` is satisfied by all
morphisms in the localized category if it contains the image of the
morphisms in the original category, the inverses of the morphisms
in `W` and if it is stable under composition -/
theorem morphismProperty_is_top (P : MorphismProperty W.Localization)
    (hP₁ : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), P (W.Q.map f))
    (hP₂ : ∀ ⦃X Y : C⦄ (w : X ⟶ Y) (hw : W w), P (winv w hw)) (hP₃ : P.StableUnderComposition) :
    P = ⊤ := by
  funext X Y f
  ext
  

Proof state:
case h.h.h.a
C : Type uC
inst✝¹ : Category.{uC', uC} C
W : MorphismProperty C
D : Type uD
inst✝ : Category.{uD', uD} D
G : C ⥤ D
hG : MorphismProperty.IsInvertedBy W G
P : MorphismProperty (MorphismProperty.Localization W)
hP₁ : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), P ((MorphismProperty.Q W).map f)
hP₂ : ∀ ⦃X Y : C⦄ (w : X ⟶ Y) (hw : W w), P (winv w hw)
hP₃ : MorphismProperty.StableUnderComposition P
X Y : MorphismProperty.Localization W
f : X ⟶ Y
⊢ P f ↔ ⊤ f

Next tactic:
constructor
/-- A `MorphismProperty` in `W.Localization` is satisfied by all
morphisms in the localized category if it contains the image of the
morphisms in the original category, the inverses of the morphisms
in `W` and if it is stable under composition -/
theorem morphismProperty_is_top (P : MorphismProperty W.Localization)
    (hP₁ : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), P (W.Q.map f))
    (hP₂ : ∀ ⦃X Y : C⦄ (w : X ⟶ Y) (hw : W w), P (winv w hw)) (hP₃ : P.StableUnderComposition) :
    P = ⊤ := by
  funext X Y f
  ext
  constructor
  · 

Proof state:
case h.h.h.a.mp
C : Type uC
inst✝¹ : Category.{uC', uC} C
W : MorphismProperty C
D : Type uD
inst✝ : Category.{uD', uD} D
G : C ⥤ D
hG : MorphismProperty.IsInvertedBy W G
P : MorphismProperty (MorphismProperty.Localization W)
hP₁ : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), P ((MorphismProperty.Q W).map f)
hP₂ : ∀ ⦃X Y : C⦄ (w : X ⟶ Y) (hw : W w), P (winv w hw)
hP₃ : MorphismProperty.StableUnderComposition P
X Y : MorphismProperty.Localization W
f : X ⟶ Y
⊢ P f → ⊤ f

Next tactic:
intro
/-- A `MorphismProperty` in `W.Localization` is satisfied by all
morphisms in the localized category if it contains the image of the
morphisms in the original category, the inverses of the morphisms
in `W` and if it is stable under composition -/
theorem morphismProperty_is_top (P : MorphismProperty W.Localization)
    (hP₁ : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), P (W.Q.map f))
    (hP₂ : ∀ ⦃X Y : C⦄ (w : X ⟶ Y) (hw : W w), P (winv w hw)) (hP₃ : P.StableUnderComposition) :
    P = ⊤ := by
  funext X Y f
  ext
  constructor
  · intro
    

Proof state:
case h.h.h.a.mp
C : Type uC
inst✝¹ : Category.{uC', uC} C
W : MorphismProperty C
D : Type uD
inst✝ : Category.{uD', uD} D
G : C ⥤ D
hG : MorphismProperty.IsInvertedBy W G
P : MorphismProperty (MorphismProperty.Localization W)
hP₁ : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), P ((MorphismProperty.Q W).map f)
hP₂ : ∀ ⦃X Y : C⦄ (w : X ⟶ Y) (hw : W w), P (winv w hw)
hP₃ : MorphismProperty.StableUnderComposition P
X Y : MorphismProperty.Localization W
f : X ⟶ Y
a✝ : P f
⊢ ⊤ f

Next tactic:
apply MorphismProperty.top_apply
/-- A `MorphismProperty` in `W.Localization` is satisfied by all
morphisms in the localized category if it contains the image of the
morphisms in the original category, the inverses of the morphisms
in `W` and if it is stable under composition -/
theorem morphismProperty_is_top (P : MorphismProperty W.Localization)
    (hP₁ : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), P (W.Q.map f))
    (hP₂ : ∀ ⦃X Y : C⦄ (w : X ⟶ Y) (hw : W w), P (winv w hw)) (hP₃ : P.StableUnderComposition) :
    P = ⊤ := by
  funext X Y f
  ext
  constructor
  · intro
    apply MorphismProperty.top_apply
  · 

Proof state:
case h.h.h.a.mpr
C : Type uC
inst✝¹ : Category.{uC', uC} C
W : MorphismProperty C
D : Type uD
inst✝ : Category.{uD', uD} D
G : C ⥤ D
hG : MorphismProperty.IsInvertedBy W G
P : MorphismProperty (MorphismProperty.Localization W)
hP₁ : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), P ((MorphismProperty.Q W).map f)
hP₂ : ∀ ⦃X Y : C⦄ (w : X ⟶ Y) (hw : W w), P (winv w hw)
hP₃ : MorphismProperty.StableUnderComposition P
X Y : MorphismProperty.Localization W
f : X ⟶ Y
⊢ ⊤ f → P f

Next tactic:
intro
/-- A `MorphismProperty` in `W.Localization` is satisfied by all
morphisms in the localized category if it contains the image of the
morphisms in the original category, the inverses of the morphisms
in `W` and if it is stable under composition -/
theorem morphismProperty_is_top (P : MorphismProperty W.Localization)
    (hP₁ : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), P (W.Q.map f))
    (hP₂ : ∀ ⦃X Y : C⦄ (w : X ⟶ Y) (hw : W w), P (winv w hw)) (hP₃ : P.StableUnderComposition) :
    P = ⊤ := by
  funext X Y f
  ext
  constructor
  · intro
    apply MorphismProperty.top_apply
  · intro
    

Proof state:
case h.h.h.a.mpr
C : Type uC
inst✝¹ : Category.{uC', uC} C
W : MorphismProperty C
D : Type uD
inst✝ : Category.{uD', uD} D
G : C ⥤ D
hG : MorphismProperty.IsInvertedBy W G
P : MorphismProperty (MorphismProperty.Localization W)
hP₁ : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), P ((MorphismProperty.Q W).map f)
hP₂ : ∀ ⦃X Y : C⦄ (w : X ⟶ Y) (hw : W w), P (winv w hw)
hP₃ : MorphismProperty.StableUnderComposition P
X Y : MorphismProperty.Localization W
f : X ⟶ Y
a✝ : ⊤ f
⊢ P f

Next tactic:
let G : _ ⥤ W.Localization := Quotient.functor _
/-- A `MorphismProperty` in `W.Localization` is satisfied by all
morphisms in the localized category if it contains the image of the
morphisms in the original category, the inverses of the morphisms
in `W` and if it is stable under composition -/
theorem morphismProperty_is_top (P : MorphismProperty W.Localization)
    (hP₁ : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), P (W.Q.map f))
    (hP₂ : ∀ ⦃X Y : C⦄ (w : X ⟶ Y) (hw : W w), P (winv w hw)) (hP₃ : P.StableUnderComposition) :
    P = ⊤ := by
  funext X Y f
  ext
  constructor
  · intro
    apply MorphismProperty.top_apply
  · intro
    let G : _ ⥤ W.Localization := Quotient.functor _
    

Proof state:
case h.h.h.a.mpr
C : Type uC
inst✝¹ : Category.{uC', uC} C
W : MorphismProperty C
D : Type uD
inst✝ : Category.{uD', uD} D
G✝ : C ⥤ D
hG : MorphismProperty.IsInvertedBy W G✝
P : MorphismProperty (MorphismProperty.Localization W)
hP₁ : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), P ((MorphismProperty.Q W).map f)
hP₂ : ∀ ⦃X Y : C⦄ (w : X ⟶ Y) (hw : W w), P (winv w hw)
hP₃ : MorphismProperty.StableUnderComposition P
X Y : MorphismProperty.Localization W
f : X ⟶ Y
a✝ : ⊤ f
G : Paths (LocQuiver W) ⥤ MorphismProperty.Localization W := Quotient.functor (relations W)
⊢ P f

Next tactic:
haveI : Full G := Quotient.fullFunctor _
/-- A `MorphismProperty` in `W.Localization` is satisfied by all
morphisms in the localized category if it contains the image of the
morphisms in the original category, the inverses of the morphisms
in `W` and if it is stable under composition -/
theorem morphismProperty_is_top (P : MorphismProperty W.Localization)
    (hP₁ : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), P (W.Q.map f))
    (hP₂ : ∀ ⦃X Y : C⦄ (w : X ⟶ Y) (hw : W w), P (winv w hw)) (hP₃ : P.StableUnderComposition) :
    P = ⊤ := by
  funext X Y f
  ext
  constructor
  · intro
    apply MorphismProperty.top_apply
  · intro
    let G : _ ⥤ W.Localization := Quotient.functor _
    haveI : Full G := Quotient.fullFunctor _
    

Proof state:
case h.h.h.a.mpr
C : Type uC
inst✝¹ : Category.{uC', uC} C
W : MorphismProperty C
D : Type uD
inst✝ : Category.{uD', uD} D
G✝ : C ⥤ D
hG : MorphismProperty.IsInvertedBy W G✝
P : MorphismProperty (MorphismProperty.Localization W)
hP₁ : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), P ((MorphismProperty.Q W).map f)
hP₂ : ∀ ⦃X Y : C⦄ (w : X ⟶ Y) (hw : W w), P (winv w hw)
hP₃ : MorphismProperty.StableUnderComposition P
X Y : MorphismProperty.Localization W
f : X ⟶ Y
a✝ : ⊤ f
G : Paths (LocQuiver W) ⥤ MorphismProperty.Localization W := Quotient.functor (relations W)
this : Full G
⊢ P f

Next tactic:
suffices ∀ (X₁ X₂ : Paths (LocQuiver W)) (f : X₁ ⟶ X₂), P (G.map f) by
      rcases X with ⟨⟨X⟩⟩
      rcases Y with ⟨⟨Y⟩⟩
      simpa only [Functor.image_preimage] using this _ _ (G.preimage f)
/-- A `MorphismProperty` in `W.Localization` is satisfied by all
morphisms in the localized category if it contains the image of the
morphisms in the original category, the inverses of the morphisms
in `W` and if it is stable under composition -/
theorem morphismProperty_is_top (P : MorphismProperty W.Localization)
    (hP₁ : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), P (W.Q.map f))
    (hP₂ : ∀ ⦃X Y : C⦄ (w : X ⟶ Y) (hw : W w), P (winv w hw)) (hP₃ : P.StableUnderComposition) :
    P = ⊤ := by
  funext X Y f
  ext
  constructor
  · intro
    apply MorphismProperty.top_apply
  · intro
    let G : _ ⥤ W.Localization := Quotient.functor _
    haveI : Full G := Quotient.fullFunctor _
    suffices ∀ (X₁ X₂ : Paths (LocQuiver W)) (f : X₁ ⟶ X₂), P (G.map f) by
      

Proof state:
C : Type uC
inst✝¹ : Category.{uC', uC} C
W : MorphismProperty C
D : Type uD
inst✝ : Category.{uD', uD} D
G✝ : C ⥤ D
hG : MorphismProperty.IsInvertedBy W G✝
P : MorphismProperty (MorphismProperty.Localization W)
hP₁ : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), P ((MorphismProperty.Q W).map f)
hP₂ : ∀ ⦃X Y : C⦄ (w : X ⟶ Y) (hw : W w), P (winv w hw)
hP₃ : MorphismProperty.StableUnderComposition P
X Y : MorphismProperty.Localization W
f : X ⟶ Y
a✝ : ⊤ f
G : Paths (LocQuiver W) ⥤ MorphismProperty.Localization W := Quotient.functor (relations W)
this✝ : Full G
this : ∀ (X₁ X₂ : Paths (LocQuiver W)) (f : X₁ ⟶ X₂), P (G.map f)
⊢ P f

Next tactic:
rcases X with ⟨⟨X⟩⟩
/-- A `MorphismProperty` in `W.Localization` is satisfied by all
morphisms in the localized category if it contains the image of the
morphisms in the original category, the inverses of the morphisms
in `W` and if it is stable under composition -/
theorem morphismProperty_is_top (P : MorphismProperty W.Localization)
    (hP₁ : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), P (W.Q.map f))
    (hP₂ : ∀ ⦃X Y : C⦄ (w : X ⟶ Y) (hw : W w), P (winv w hw)) (hP₃ : P.StableUnderComposition) :
    P = ⊤ := by
  funext X Y f
  ext
  constructor
  · intro
    apply MorphismProperty.top_apply
  · intro
    let G : _ ⥤ W.Localization := Quotient.functor _
    haveI : Full G := Quotient.fullFunctor _
    suffices ∀ (X₁ X₂ : Paths (LocQuiver W)) (f : X₁ ⟶ X₂), P (G.map f) by
      rcases X with ⟨⟨X⟩⟩
      

Proof state:
case mk.mk
C : Type uC
inst✝¹ : Category.{uC', uC} C
W : MorphismProperty C
D : Type uD
inst✝ : Category.{uD', uD} D
G✝ : C ⥤ D
hG : MorphismProperty.IsInvertedBy W G✝
P : MorphismProperty (MorphismProperty.Localization W)
hP₁ : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), P ((MorphismProperty.Q W).map f)
hP₂ : ∀ ⦃X Y : C⦄ (w : X ⟶ Y) (hw : W w), P (winv w hw)
hP₃ : MorphismProperty.StableUnderComposition P
Y : MorphismProperty.Localization W
G : Paths (LocQuiver W) ⥤ MorphismProperty.Localization W := Quotient.functor (relations W)
this✝ : Full G
this : ∀ (X₁ X₂ : Paths (LocQuiver W)) (f : X₁ ⟶ X₂), P (G.map f)
X : C
f : { as := { obj := X } } ⟶ Y
a✝ : ⊤ f
⊢ P f

Next tactic:
rcases Y with ⟨⟨Y⟩⟩
/-- A `MorphismProperty` in `W.Localization` is satisfied by all
morphisms in the localized category if it contains the image of the
morphisms in the original category, the inverses of the morphisms
in `W` and if it is stable under composition -/
theorem morphismProperty_is_top (P : MorphismProperty W.Localization)
    (hP₁ : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), P (W.Q.map f))
    (hP₂ : ∀ ⦃X Y : C⦄ (w : X ⟶ Y) (hw : W w), P (winv w hw)) (hP₃ : P.StableUnderComposition) :
    P = ⊤ := by
  funext X Y f
  ext
  constructor
  · intro
    apply MorphismProperty.top_apply
  · intro
    let G : _ ⥤ W.Localization := Quotient.functor _
    haveI : Full G := Quotient.fullFunctor _
    suffices ∀ (X₁ X₂ : Paths (LocQuiver W)) (f : X₁ ⟶ X₂), P (G.map f) by
      rcases X with ⟨⟨X⟩⟩
      rcases Y with ⟨⟨Y⟩⟩
      

Proof state:
case mk.mk.mk.mk
C : Type uC
inst✝¹ : Category.{uC', uC} C
W : MorphismProperty C
D : Type uD
inst✝ : Category.{uD', uD} D
G✝ : C ⥤ D
hG : MorphismProperty.IsInvertedBy W G✝
P : MorphismProperty (MorphismProperty.Localization W)
hP₁ : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), P ((MorphismProperty.Q W).map f)
hP₂ : ∀ ⦃X Y : C⦄ (w : X ⟶ Y) (hw : W w), P (winv w hw)
hP₃ : MorphismProperty.StableUnderComposition P
G : Paths (LocQuiver W) ⥤ MorphismProperty.Localization W := Quotient.functor (relations W)
this✝ : Full G
this : ∀ (X₁ X₂ : Paths (LocQuiver W)) (f : X₁ ⟶ X₂), P (G.map f)
X Y : C
f : { as := { obj := X } } ⟶ { as := { obj := Y } }
a✝ : ⊤ f
⊢ P f

Next tactic:
simpa only [Functor.image_preimage] using this _ _ (G.preimage f)
/-- A `MorphismProperty` in `W.Localization` is satisfied by all
morphisms in the localized category if it contains the image of the
morphisms in the original category, the inverses of the morphisms
in `W` and if it is stable under composition -/
theorem morphismProperty_is_top (P : MorphismProperty W.Localization)
    (hP₁ : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), P (W.Q.map f))
    (hP₂ : ∀ ⦃X Y : C⦄ (w : X ⟶ Y) (hw : W w), P (winv w hw)) (hP₃ : P.StableUnderComposition) :
    P = ⊤ := by
  funext X Y f
  ext
  constructor
  · intro
    apply MorphismProperty.top_apply
  · intro
    let G : _ ⥤ W.Localization := Quotient.functor _
    haveI : Full G := Quotient.fullFunctor _
    suffices ∀ (X₁ X₂ : Paths (LocQuiver W)) (f : X₁ ⟶ X₂), P (G.map f) by
      rcases X with ⟨⟨X⟩⟩
      rcases Y with ⟨⟨Y⟩⟩
      simpa only [Functor.image_preimage] using this _ _ (G.preimage f)
    

Proof state:
case h.h.h.a.mpr
C : Type uC
inst✝¹ : Category.{uC', uC} C
W : MorphismProperty C
D : Type uD
inst✝ : Category.{uD', uD} D
G✝ : C ⥤ D
hG : MorphismProperty.IsInvertedBy W G✝
P : MorphismProperty (MorphismProperty.Localization W)
hP₁ : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), P ((MorphismProperty.Q W).map f)
hP₂ : ∀ ⦃X Y : C⦄ (w : X ⟶ Y) (hw : W w), P (winv w hw)
hP₃ : MorphismProperty.StableUnderComposition P
X Y : MorphismProperty.Localization W
f : X ⟶ Y
a✝ : ⊤ f
G : Paths (LocQuiver W) ⥤ MorphismProperty.Localization W := Quotient.functor (relations W)
this : Full G
⊢ ∀ (X₁ X₂ : Paths (LocQuiver W)) (f : X₁ ⟶ X₂), P (G.map f)

Next tactic:
intros X₁ X₂ p