Theorem: CategoryTheory.Localization.Construction.uniq
File: Mathlib/CategoryTheory/Localization/Construction.lean

tactic: suffices h' : Quotient.functor _ ⋙ G₁ = Quotient.functor _ ⋙ G₂
state_before: C : Type u_1
inst✝¹ : Category C
W : MorphismProperty C
D : Type u_4
inst✝ : Category 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₂

tactic: refine' Functor.ext _ _
state_before: C : Type u_1
inst✝¹ : Category C
W : MorphismProperty C
D : Type u_4
inst✝ : Category 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₂

tactic: rintro ⟨⟨X⟩⟩
state_before: case refine'_1
C : Type u_1
inst✝¹ : Category C
W : MorphismProperty C
D : Type u_4
inst✝ : Category 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

tactic: apply Functor.congr_obj h
state_before: case refine'_1.mk.mk
C : Type u_1
inst✝¹ : Category C
W : MorphismProperty C
D : Type u_4
inst✝ : Category 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 } }

tactic: rintro ⟨⟨X⟩⟩ ⟨⟨Y⟩⟩ ⟨f⟩
state_before: case refine'_2
C : Type u_1
inst✝¹ : Category C
W : MorphismProperty C
D : Type u_4
inst✝ : Category 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)

tactic: apply Functor.congr_hom h'
state_before: case refine'_2.mk.mk.mk.mk.mk
C : Type u_1
inst✝¹ : Category C
W : MorphismProperty C
D : Type u_4
inst✝ : Category 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 } })

tactic: refine' Paths.ext_functor _ _
state_before: case h'
C : Type u_1
inst✝¹ : Category C
W : MorphismProperty C
D : Type u_4
inst✝ : Category 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₂

tactic: ext X
state_before: case h'.refine'_1
C : Type u_1
inst✝¹ : Category C
W : MorphismProperty C
D : Type u_4
inst✝ : Category 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

tactic: cases X
state_before: case h'.refine'_1.h
C : Type u_1
inst✝¹ : Category C
W : MorphismProperty C
D : Type u_4
inst✝ : Category 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

tactic: apply Functor.congr_obj h
state_before: case h'.refine'_1.h.mk
C : Type u_1
inst✝¹ : Category C
W : MorphismProperty C
D : Type u_4
inst✝ : Category 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✝ }

tactic: rintro ⟨X⟩ ⟨Y⟩ (f | ⟨w, hw⟩)
state_before: case h'.refine'_2
C : Type u_1
inst✝¹ : Category C
W : MorphismProperty C
D : Type u_4
inst✝ : Category 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)

tactic: simpa only using Functor.congr_hom h f
state_before: case h'.refine'_2.mk.mk.inl
C : Type u_1
inst✝¹ : Category C
W : MorphismProperty C
D : Type u_4
inst✝ : Category 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 })

tactic: have hw : W.Q.map w = (wIso w hw).hom := rfl
state_before: case h'.refine'_2.mk.mk.inr.mk
C : Type u_1
inst✝¹ : Category C
W : MorphismProperty C
D : Type u_4
inst✝ : Category 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 })

tactic: have hw' := Functor.congr_hom h w
state_before: case h'.refine'_2.mk.mk.inr.mk
C : Type u_1
inst✝¹ : Category C
W : MorphismProperty C
D : Type u_4
inst✝ : Category 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 })

tactic: simp only [Functor.comp_map, hw] at hw'
state_before: case h'.refine'_2.mk.mk.inr.mk
C : Type u_1
inst✝¹ : Category C
W : MorphismProperty C
D : Type u_4
inst✝ : Category 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 })

tactic: refine' Functor.congr_inv_of_congr_hom _ _ _ _ _ hw'
state_before: case h'.refine'_2.mk.mk.inr.mk
C : Type u_1
inst✝¹ : Category C
W : MorphismProperty C
D : Type u_4
inst✝ : Category 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 })

tactic: all_goals apply Functor.congr_obj h
state_before: case h'.refine'_2.mk.mk.inr.mk.refine'_1
C : Type u_1
inst✝¹ : Category C
W : MorphismProperty C
D : Type u_4
inst✝ : Category 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 u_1
inst✝¹ : Category C
W : MorphismProperty C
D : Type u_4
inst✝ : Category 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)

tactic: apply Functor.congr_obj h
state_before: case h'.refine'_2.mk.mk.inr.mk.refine'_2
C : Type u_1
inst✝¹ : Category C
W : MorphismProperty C
D : Type u_4
inst✝ : Category 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)