l3lab/ntp-mathlib huggingface dataset:
/-- The lifting of a functor `C ⥤ D` inverting `W` as a functor `W.Localization ⥤ D` -/
@[simps!]
def lift : W.Localization ⥤ D :=
  Quotient.lift (relations W) (liftToPathCategory G hG)
    (by
      rintro ⟨X⟩ ⟨Y⟩ f₁ f₂ r
      --Porting note: rest of proof was `rcases r with ⟨⟩; tidy`
      rcases r with (_|_|⟨f,hf⟩|⟨f,hf⟩)
      · aesop_cat
      · aesop_cat
      all_goals
        dsimp
        haveI := hG f hf
        

Proof state:
case mk.mk.Winv₁
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
X Y : Paths (LocQuiver W)
Y✝ : C
f : X✝ ⟶ Y✝
hf : W f
this : IsIso (G.map f)
⊢ composePath
      (Prefunctor.mapPath
        { obj := fun X => G.obj X.obj,
          map := fun {X Y} a => Sum.rec (fun val => G.map val) (fun val => inv (G.map ↑val)) a }
        (Quiver.Hom.toPath (Sum.inl f) ≫ Quiver.Hom.toPath (Sum.inr { val := f, property := hf }))) =
    composePath
      (Prefunctor.mapPath
        { obj := fun X => G.obj X.obj,
          map := fun {X Y} a => Sum.rec (fun val => G.map val) (fun val => inv (G.map ↑val)) a }
        (𝟙 (ιPaths W X✝)))

Next tactic:
simp
/-- The lifting of a functor `C ⥤ D` inverting `W` as a functor `W.Localization ⥤ D` -/
@[simps!]
def lift : W.Localization ⥤ D :=
  Quotient.lift (relations W) (liftToPathCategory G hG)
    (by
      rintro ⟨X⟩ ⟨Y⟩ f₁ f₂ r
      --Porting note: rest of proof was `rcases r with ⟨⟩; tidy`
      rcases r with (_|_|⟨f,hf⟩|⟨f,hf⟩)
      · aesop_cat
      · aesop_cat
      all_goals
        dsimp
        haveI := hG f hf
        simp
        

Proof state:
case mk.mk.Winv₁
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
X Y : Paths (LocQuiver W)
Y✝ : C
f : X✝ ⟶ Y✝
hf : W f
this : IsIso (G.map f)
⊢ 𝟙 (G.obj X✝) =
    composePath
      (Prefunctor.mapPath
        { obj := fun X => G.obj X.obj,
          map := fun {X Y} a => Sum.rec (fun val => G.map val) (fun val => inv (G.map ↑val)) a }
        (𝟙 (ιPaths W X✝)))

Next tactic:
rfl
/-- The lifting of a functor `C ⥤ D` inverting `W` as a functor `W.Localization ⥤ D` -/
@[simps!]
def lift : W.Localization ⥤ D :=
  Quotient.lift (relations W) (liftToPathCategory G hG)
    (by
      rintro ⟨X⟩ ⟨Y⟩ f₁ f₂ r
      --Porting note: rest of proof was `rcases r with ⟨⟩; tidy`
      rcases r with (_|_|⟨f,hf⟩|⟨f,hf⟩)
      · aesop_cat
      · aesop_cat
      all_goals
        

Proof state:
case mk.mk.Winv₂
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
X Y : Paths (LocQuiver W)
X✝ : C
f : X✝ ⟶ X✝¹
hf : W f
⊢ (liftToPathCategory G hG).map (ψ₂ W f hf ≫ ψ₁ W f) = (liftToPathCategory G hG).map (𝟙 (ιPaths W X✝¹))

Next tactic:
dsimp
/-- The lifting of a functor `C ⥤ D` inverting `W` as a functor `W.Localization ⥤ D` -/
@[simps!]
def lift : W.Localization ⥤ D :=
  Quotient.lift (relations W) (liftToPathCategory G hG)
    (by
      rintro ⟨X⟩ ⟨Y⟩ f₁ f₂ r
      --Porting note: rest of proof was `rcases r with ⟨⟩; tidy`
      rcases r with (_|_|⟨f,hf⟩|⟨f,hf⟩)
      · aesop_cat
      · aesop_cat
      all_goals
        dsimp
        

Proof state:
case mk.mk.Winv₂
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
X Y : Paths (LocQuiver W)
X✝ : C
f : X✝ ⟶ X✝¹
hf : W f
⊢ composePath
      (Prefunctor.mapPath
        { obj := fun X => G.obj X.obj,
          map := fun {X Y} a => Sum.rec (fun val => G.map val) (fun val => inv (G.map ↑val)) a }
        (Quiver.Hom.toPath (Sum.inr { val := f, property := hf }) ≫ Quiver.Hom.toPath (Sum.inl f))) =
    composePath
      (Prefunctor.mapPath
        { obj := fun X => G.obj X.obj,
          map := fun {X Y} a => Sum.rec (fun val => G.map val) (fun val => inv (G.map ↑val)) a }
        (𝟙 (ιPaths W X✝¹)))

Next tactic:
haveI := hG f hf
/-- The lifting of a functor `C ⥤ D` inverting `W` as a functor `W.Localization ⥤ D` -/
@[simps!]
def lift : W.Localization ⥤ D :=
  Quotient.lift (relations W) (liftToPathCategory G hG)
    (by
      rintro ⟨X⟩ ⟨Y⟩ f₁ f₂ r
      --Porting note: rest of proof was `rcases r with ⟨⟩; tidy`
      rcases r with (_|_|⟨f,hf⟩|⟨f,hf⟩)
      · aesop_cat
      · aesop_cat
      all_goals
        dsimp
        haveI := hG f hf
        

Proof state:
case mk.mk.Winv₂
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
X Y : Paths (LocQuiver W)
X✝ : C
f : X✝ ⟶ X✝¹
hf : W f
this : IsIso (G.map f)
⊢ composePath
      (Prefunctor.mapPath
        { obj := fun X => G.obj X.obj,
          map := fun {X Y} a => Sum.rec (fun val => G.map val) (fun val => inv (G.map ↑val)) a }
        (Quiver.Hom.toPath (Sum.inr { val := f, property := hf }) ≫ Quiver.Hom.toPath (Sum.inl f))) =
    composePath
      (Prefunctor.mapPath
        { obj := fun X => G.obj X.obj,
          map := fun {X Y} a => Sum.rec (fun val => G.map val) (fun val => inv (G.map ↑val)) a }
        (𝟙 (ιPaths W X✝¹)))

Next tactic:
simp
/-- The lifting of a functor `C ⥤ D` inverting `W` as a functor `W.Localization ⥤ D` -/
@[simps!]
def lift : W.Localization ⥤ D :=
  Quotient.lift (relations W) (liftToPathCategory G hG)
    (by
      rintro ⟨X⟩ ⟨Y⟩ f₁ f₂ r
      --Porting note: rest of proof was `rcases r with ⟨⟩; tidy`
      rcases r with (_|_|⟨f,hf⟩|⟨f,hf⟩)
      · aesop_cat
      · aesop_cat
      all_goals
        dsimp
        haveI := hG f hf
        simp
        

Proof state:
case mk.mk.Winv₂
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
X Y : Paths (LocQuiver W)
X✝ : C
f : X✝ ⟶ X✝¹
hf : W f
this : IsIso (G.map f)
⊢ 𝟙 (G.obj X✝¹) =
    composePath
      (Prefunctor.mapPath
        { obj := fun X => G.obj X.obj,
          map := fun {X Y} a => Sum.rec (fun val => G.map val) (fun val => inv (G.map ↑val)) a }
        (𝟙 (ιPaths W X✝¹)))

Next tactic:
rfl
@[simp]
theorem fac : W.Q ⋙ lift G hG = G :=
  Functor.ext (fun X => rfl)
    (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
⊢ ∀ (X Y : C) (f : X ⟶ Y),
    (MorphismProperty.Q W ⋙ lift G hG).map f =
      eqToHom (_ : (MorphismProperty.Q W ⋙ lift G hG).obj X = (MorphismProperty.Q W ⋙ lift G hG).obj X) ≫
        G.map f ≫ eqToHom (_ : G.obj Y = (MorphismProperty.Q W ⋙ lift G hG).obj Y)

Next tactic:
intro X Y f
@[simp]
theorem fac : W.Q ⋙ lift G hG = G :=
  Functor.ext (fun X => rfl)
    (by
      intro X Y f
      

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
X Y : C
f : X ⟶ Y
⊢ (MorphismProperty.Q W ⋙ lift G hG).map f =
    eqToHom (_ : (MorphismProperty.Q W ⋙ lift G hG).obj X = (MorphismProperty.Q W ⋙ lift G hG).obj X) ≫
      G.map f ≫ eqToHom (_ : G.obj Y = (MorphismProperty.Q W ⋙ lift G hG).obj Y)

Next tactic:
simp only [Functor.comp_map, eqToHom_refl, comp_id, id_comp]
@[simp]
theorem fac : W.Q ⋙ lift G hG = G :=
  Functor.ext (fun X => rfl)
    (by
      intro X Y f
      simp only [Functor.comp_map, eqToHom_refl, comp_id, id_comp]
      

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
X Y : C
f : X ⟶ Y
⊢ (lift G hG).map ((MorphismProperty.Q W).map f) = G.map f

Next tactic:
dsimp [MorphismProperty.Q, Quot.liftOn, Quotient.functor]
@[simp]
theorem fac : W.Q ⋙ lift G hG = G :=
  Functor.ext (fun X => rfl)
    (by
      intro X Y f
      simp only [Functor.comp_map, eqToHom_refl, comp_id, id_comp]
      dsimp [MorphismProperty.Q, Quot.liftOn, Quotient.functor]
      

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
X Y : C
f : X ⟶ Y
⊢ composePath (Quiver.Hom.toPath (G.map f)) = G.map f

Next tactic:
rw [composePath_toPath]
theorem uniq (G₁ G₂ : W.Localization ⥤ D) (h : W.Q ⋙ G₁ = W.Q ⋙ G₂) : G₁ = G₂ := 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
G₁ G₂ : MorphismProperty.Localization W ⥤ D
h : MorphismProperty.Q W ⋙ G₁ = MorphismProperty.Q W ⋙ G₂
⊢ G₁ = G₂

Next tactic:
suffices h' : Quotient.functor _ ⋙ G₁ = Quotient.functor _ ⋙ G₂
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₂
  · 

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
G₁ G₂ : MorphismProperty.Localization W ⥤ D
h : MorphismProperty.Q W ⋙ G₁ = MorphismProperty.Q W ⋙ G₂
h' : Quotient.functor (relations W) ⋙ G₁ = Quotient.functor (relations W) ⋙ G₂
⊢ G₁ = G₂

Next tactic:
refine' Functor.ext _ _
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 _ _
    · 

Proof state:
case 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₂
h' : Quotient.functor (relations W) ⋙ G₁ = Quotient.functor (relations W) ⋙ G₂
⊢ ∀ (X : MorphismProperty.Localization W), G₁.obj X = G₂.obj X

Next tactic:
rintro ⟨⟨X⟩⟩
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⟩⟩
      

Proof state:
case refine'_1.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
G₁ G₂ : MorphismProperty.Localization W ⥤ D
h : MorphismProperty.Q W ⋙ G₁ = MorphismProperty.Q W ⋙ G₂
h' : Quotient.functor (relations W) ⋙ G₁ = Quotient.functor (relations W) ⋙ G₂
X : C
⊢ G₁.obj { as := { obj := X } } = G₂.obj { as := { obj := X } }

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
    · 

Proof state:
case 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₂
h' : Quotient.functor (relations W) ⋙ G₁ = Quotient.functor (relations W) ⋙ G₂
⊢ ∀ (X Y : MorphismProperty.Localization W) (f : X ⟶ Y),
    G₁.map f = eqToHom (_ : G₁.obj X = G₂.obj X) ≫ G₂.map f ≫ eqToHom (_ : G₂.obj Y = G₁.obj Y)

Next tactic:
rintro ⟨⟨X⟩⟩ ⟨⟨Y⟩⟩ ⟨f⟩
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⟩
      

Proof state:
case refine'_2.mk.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
G₁ G₂ : MorphismProperty.Localization W ⥤ D
h : MorphismProperty.Q W ⋙ G₁ = MorphismProperty.Q W ⋙ G₂
h' : Quotient.functor (relations W) ⋙ G₁ = Quotient.functor (relations W) ⋙ G₂
X Y : C
f✝ : { as := { obj := X } } ⟶ { as := { obj := Y } }
f : { as := { obj := X } }.as ⟶ { as := { obj := Y } }.as
⊢ G₁.map (Quot.mk (Quotient.CompClosure (relations W)) f) =
    eqToHom (_ : G₁.obj { as := { obj := X } } = G₂.obj { as := { obj := X } }) ≫
      G₂.map (Quot.mk (Quotient.CompClosure (relations W)) f) ≫
        eqToHom (_ : G₂.obj { as := { obj := Y } } = G₁.obj { as := { obj := Y } })

Next tactic:
apply Functor.congr_hom 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'
  · 

Proof state:
case 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
G₁ G₂ : MorphismProperty.Localization W ⥤ D
h : MorphismProperty.Q W ⋙ G₁ = MorphismProperty.Q W ⋙ G₂
⊢ Quotient.functor (relations W) ⋙ G₁ = Quotient.functor (relations W) ⋙ G₂

Next tactic:
refine' Paths.ext_functor _ _
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 _ _
    · 

Proof state:
case h'.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₂
⊢ (Quotient.functor (relations W) ⋙ G₁).toPrefunctor.obj = (Quotient.functor (relations W) ⋙ G₂).toPrefunctor.obj

Next tactic:
ext X
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
      

Proof state:
case h'.refine'_1.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
G₁ G₂ : MorphismProperty.Localization W ⥤ D
h : MorphismProperty.Q W ⋙ G₁ = MorphismProperty.Q W ⋙ G₂
X : Paths (LocQuiver W)
⊢ (Quotient.functor (relations W) ⋙ G₁).obj X = (Quotient.functor (relations W) ⋙ G₂).obj X

Next tactic:
cases X
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
      

Proof state:
case h'.refine'_1.h.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₂
obj✝ : C
⊢ (Quotient.functor (relations W) ⋙ G₁).obj { obj := obj✝ } = (Quotient.functor (relations W) ⋙ G₂).obj { obj := obj✝ }

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
    · 

Proof state:
case h'.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₂
⊢ ∀ (a b : LocQuiver W) (e : a ⟶ b),
    (Quotient.functor (relations W) ⋙ G₁).map (Quiver.Hom.toPath e) =
      eqToHom (_ : (Quotient.functor (relations W) ⋙ G₁).obj a = (Quotient.functor (relations W) ⋙ G₂).obj a) ≫
        (Quotient.functor (relations W) ⋙ G₂).map (Quiver.Hom.toPath e) ≫
          eqToHom (_ : (Quotient.functor (relations W) ⋙ G₂).obj b = (Quotient.functor (relations W) ⋙ G₁).obj b)

Next tactic:
rintro ⟨X⟩ ⟨Y⟩ (f | ⟨w, 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⟩)
      · 

Proof state:
case h'.refine'_2.mk.mk.inl
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
f : { obj := X }.obj ⟶ { obj := Y }.obj
⊢ (Quotient.functor (relations W) ⋙ G₁).map (Quiver.Hom.toPath (Sum.inl f)) =
    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.inl f)) ≫
        eqToHom
          (_ :
            (Quotient.functor (relations W) ⋙ G₂).obj { obj := Y } =
              (Quotient.functor (relations W) ⋙ G₁).obj { obj := Y })

Next tactic:
simpa only using Functor.congr_hom h f
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
      · 

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
⊢ (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:
have hw : W.Q.map w = (wIso w hw).hom := rfl
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
        

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
⊢ (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:
have hw' := Functor.congr_hom h w
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
        

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' :
  (MorphismProperty.Q W ⋙ G₁).map w =
    eqToHom (_ : (MorphismProperty.Q W ⋙ G₁).obj { obj := Y }.obj = (MorphismProperty.Q W ⋙ G₂).obj { obj := Y }.obj) ≫
      (MorphismProperty.Q W ⋙ G₂).map w ≫
        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:
simp only [Functor.comp_map, hw] at hw'