Theorem: CategoryTheory.Functor.IsLocalization.of_equivalence_source
File: Mathlib/CategoryTheory/Localization/Equivalence.lean

tactic: have h : W₁.IsInvertedBy (E.functor ⋙ W₂.Q) := fun _ _ f hf => by
  obtain ⟨_, _, f', hf', ⟨e⟩⟩ := hW₁ f hf
  exact ((MorphismProperty.RespectsIso.isomorphisms _).arrow_mk_iso_iff
    (W₂.Q.mapArrow.mapIso e)).1 (Localization.inverts W₂.Q W₂ _ hf')
state_before: C₁ : Type u_1
C₂ : Type u_2
D : Type u_3
D₁ : Type u_4
D₂ : Type u_5
inst✝⁵ : Category.{u_6, u_1} C₁
inst✝⁴ : Category.{u_8, u_2} C₂
inst✝³ : Category.{u_7, u_3} D
inst✝² : Category.{?u.10785, u_4} D₁
inst✝¹ : Category.{?u.10789, u_5} D₂
L₁ : C₁ ⥤ D
W₁ : MorphismProperty C₁
L₂ : C₂ ⥤ D
W₂ : MorphismProperty C₂
E : C₁ ≌ C₂
hW₁ : W₁ ≤ W₂.isoClosure.inverseImage E.functor
hW₂ : W₂.IsInvertedBy L₂
inst✝ : L₁.IsLocalization W₁
iso : E.functor ⋙ L₂ ≅ L₁
⊢ L₂.IsLocalization W₂
state_after: C₁ : Type u_1
C₂ : Type u_2
D : Type u_3
D₁ : Type u_4
D₂ : Type u_5
inst✝⁵ : Category.{u_6, u_1} C₁
inst✝⁴ : Category.{u_8, u_2} C₂
inst✝³ : Category.{u_7, u_3} D
inst✝² : Category.{?u.10785, u_4} D₁
inst✝¹ : Category.{?u.10789, u_5} D₂
L₁ : C₁ ⥤ D
W₁ : MorphismProperty C₁
L₂ : C₂ ⥤ D
W₂ : MorphismProperty C₂
E : C₁ ≌ C₂
hW₁ : W₁ ≤ W₂.isoClosure.inverseImage E.functor
hW₂ : W₂.IsInvertedBy L₂
inst✝ : L₁.IsLocalization W₁
iso : E.functor ⋙ L₂ ≅ L₁
h : W₁.IsInvertedBy (E.functor ⋙ W₂.Q)
⊢ L₂.IsLocalization W₂

tactic: exact
  { inverts := hW₂
    isEquivalence :=
      Localization.isEquivalence W₂.Q W₂ L₁ W₁ L₂ (Construction.lift L₂ hW₂)
        (E.functor ⋙ W₂.Q) (Localization.lift (E.functor ⋙ W₂.Q) h L₁) (by
          calc
            L₂ ⋙ lift (E.functor ⋙ W₂.Q) h L₁ ≅ _ := (leftUnitor _).symm
            _ ≅ _ := isoWhiskerRight E.counitIso.symm _
            _ ≅ E.inverse ⋙ E.functor ⋙ L₂ ⋙ lift (E.functor ⋙ W₂.Q) h L₁ :=
                  Functor.associator _ _ _
            _ ≅ E.inverse ⋙ L₁ ⋙ lift (E.functor ⋙ W₂.Q) h L₁ :=
                  isoWhiskerLeft E.inverse ((Functor.associator _ _ _).symm ≪≫
                    isoWhiskerRight iso _)
            _ ≅ E.inverse ⋙ E.functor ⋙ W₂.Q :=
                  isoWhiskerLeft _ (Localization.fac (E.functor ⋙ W₂.Q) h L₁)
            _ ≅ (E.inverse ⋙ E.functor) ⋙ W₂.Q := (Functor.associator _ _ _).symm
            _ ≅ 𝟭 C₂ ⋙ W₂.Q := isoWhiskerRight E.counitIso _
            _ ≅ W₂.Q := leftUnitor _)
        (Functor.associator _ _ _ ≪≫ isoWhiskerLeft _ (Lifting.iso W₂.Q W₂ _ _)  ≪≫ iso) }
state_before: C₁ : Type u_1
C₂ : Type u_2
D : Type u_3
D₁ : Type u_4
D₂ : Type u_5
inst✝⁵ : Category.{u_6, u_1} C₁
inst✝⁴ : Category.{u_8, u_2} C₂
inst✝³ : Category.{u_7, u_3} D
inst✝² : Category.{?u.10785, u_4} D₁
inst✝¹ : Category.{?u.10789, u_5} D₂
L₁ : C₁ ⥤ D
W₁ : MorphismProperty C₁
L₂ : C₂ ⥤ D
W₂ : MorphismProperty C₂
E : C₁ ≌ C₂
hW₁ : W₁ ≤ W₂.isoClosure.inverseImage E.functor
hW₂ : W₂.IsInvertedBy L₂
inst✝ : L₁.IsLocalization W₁
iso : E.functor ⋙ L₂ ≅ L₁
h : W₁.IsInvertedBy (E.functor ⋙ W₂.Q)
⊢ L₂.IsLocalization W₂
state_after: no goals

tactic: obtain ⟨_, _, f', hf', ⟨e⟩⟩ := hW₁ f hf
state_before: C₁ : Type u_1
C₂ : Type u_2
D : Type u_3
D₁ : Type u_4
D₂ : Type u_5
inst✝⁵ : Category.{u_6, u_1} C₁
inst✝⁴ : Category.{u_8, u_2} C₂
inst✝³ : Category.{u_7, u_3} D
inst✝² : Category.{?u.10785, u_4} D₁
inst✝¹ : Category.{?u.10789, u_5} D₂
L₁ : C₁ ⥤ D
W₁ : MorphismProperty C₁
L₂ : C₂ ⥤ D
W₂ : MorphismProperty C₂
E : C₁ ≌ C₂
hW₁ : W₁ ≤ W₂.isoClosure.inverseImage E.functor
hW₂ : W₂.IsInvertedBy L₂
inst✝ : L₁.IsLocalization W₁
iso : E.functor ⋙ L₂ ≅ L₁
x✝¹ x✝ : C₁
f : x✝¹ ⟶ x✝
hf : W₁ f
⊢ IsIso ((E.functor ⋙ W₂.Q).map f)
state_after: case intro.intro.intro.intro.intro
C₁ : Type u_1
C₂ : Type u_2
D : Type u_3
D₁ : Type u_4
D₂ : Type u_5
inst✝⁵ : Category.{u_6, u_1} C₁
inst✝⁴ : Category.{u_8, u_2} C₂
inst✝³ : Category.{u_7, u_3} D
inst✝² : Category.{?u.10785, u_4} D₁
inst✝¹ : Category.{?u.10789, u_5} D₂
L₁ : C₁ ⥤ D
W₁ : MorphismProperty C₁
L₂ : C₂ ⥤ D
W₂ : MorphismProperty C₂
E : C₁ ≌ C₂
hW₁ : W₁ ≤ W₂.isoClosure.inverseImage E.functor
hW₂ : W₂.IsInvertedBy L₂
inst✝ : L₁.IsLocalization W₁
iso : E.functor ⋙ L₂ ≅ L₁
x✝¹ x✝ : C₁
f : x✝¹ ⟶ x✝
hf : W₁ f
w✝¹ w✝ : C₂
f' : w✝¹ ⟶ w✝
hf' : W₂ f'
e : Arrow.mk f' ≅ Arrow.mk (E.functor.map f)
⊢ IsIso ((E.functor ⋙ W₂.Q).map f)

tactic: exact ((MorphismProperty.RespectsIso.isomorphisms _).arrow_mk_iso_iff
  (W₂.Q.mapArrow.mapIso e)).1 (Localization.inverts W₂.Q W₂ _ hf')
state_before: case intro.intro.intro.intro.intro
C₁ : Type u_1
C₂ : Type u_2
D : Type u_3
D₁ : Type u_4
D₂ : Type u_5
inst✝⁵ : Category.{u_6, u_1} C₁
inst✝⁴ : Category.{u_8, u_2} C₂
inst✝³ : Category.{u_7, u_3} D
inst✝² : Category.{?u.10785, u_4} D₁
inst✝¹ : Category.{?u.10789, u_5} D₂
L₁ : C₁ ⥤ D
W₁ : MorphismProperty C₁
L₂ : C₂ ⥤ D
W₂ : MorphismProperty C₂
E : C₁ ≌ C₂
hW₁ : W₁ ≤ W₂.isoClosure.inverseImage E.functor
hW₂ : W₂.IsInvertedBy L₂
inst✝ : L₁.IsLocalization W₁
iso : E.functor ⋙ L₂ ≅ L₁
x✝¹ x✝ : C₁
f : x✝¹ ⟶ x✝
hf : W₁ f
w✝¹ w✝ : C₂
f' : w✝¹ ⟶ w✝
hf' : W₂ f'
e : Arrow.mk f' ≅ Arrow.mk (E.functor.map f)
⊢ IsIso ((E.functor ⋙ W₂.Q).map f)
state_after: no goals

tactic: calc
  L₂ ⋙ lift (E.functor ⋙ W₂.Q) h L₁ ≅ _ := (leftUnitor _).symm
  _ ≅ _ := isoWhiskerRight E.counitIso.symm _
  _ ≅ E.inverse ⋙ E.functor ⋙ L₂ ⋙ lift (E.functor ⋙ W₂.Q) h L₁ :=
        Functor.associator _ _ _
  _ ≅ E.inverse ⋙ L₁ ⋙ lift (E.functor ⋙ W₂.Q) h L₁ :=
        isoWhiskerLeft E.inverse ((Functor.associator _ _ _).symm ≪≫
          isoWhiskerRight iso _)
  _ ≅ E.inverse ⋙ E.functor ⋙ W₂.Q :=
        isoWhiskerLeft _ (Localization.fac (E.functor ⋙ W₂.Q) h L₁)
  _ ≅ (E.inverse ⋙ E.functor) ⋙ W₂.Q := (Functor.associator _ _ _).symm
  _ ≅ 𝟭 C₂ ⋙ W₂.Q := isoWhiskerRight E.counitIso _
  _ ≅ W₂.Q := leftUnitor _
state_before: C₁ : Type u_1
C₂ : Type u_2
D : Type u_3
D₁ : Type u_4
D₂ : Type u_5
inst✝⁵ : Category.{u_6, u_1} C₁
inst✝⁴ : Category.{u_8, u_2} C₂
inst✝³ : Category.{u_7, u_3} D
inst✝² : Category.{?u.10785, u_4} D₁
inst✝¹ : Category.{?u.10789, u_5} D₂
L₁ : C₁ ⥤ D
W₁ : MorphismProperty C₁
L₂ : C₂ ⥤ D
W₂ : MorphismProperty C₂
E : C₁ ≌ C₂
hW₁ : W₁ ≤ W₂.isoClosure.inverseImage E.functor
hW₂ : W₂.IsInvertedBy L₂
inst✝ : L₁.IsLocalization W₁
iso : E.functor ⋙ L₂ ≅ L₁
h : W₁.IsInvertedBy (E.functor ⋙ W₂.Q)
⊢ L₂ ⋙ lift (E.functor ⋙ W₂.Q) h L₁ ≅ W₂.Q
state_after: no goals