l3lab/ntp-mathlib huggingface dataset:
theorem corec_unique (g : α → P α) (f : α → M P) (hyp : ∀ x, M.dest (f x) = P.map f (g x)) :
    f = M.corec g := by
  ext x
  apply bisim' (fun _ => True) _ _ _ _ trivial
  clear x
  intro x _
  cases' gxeq : g x with a f'
  have h₀ : M.dest (f x) = ⟨a, f ∘ f'⟩ := by rw [hyp, gxeq, PFunctor.map_eq]
  have h₁ : M.dest (M.corec g x) = ⟨a, M.corec g ∘ f'⟩ := by rw [dest_corec, gxeq, PFunctor.map_eq]
  

Proof state:
case mk
F : PFunctor.{u}
X : Type u_1
f✝ : X → ↑F X
P : PFunctor.{u}
α : Type u_2
g : α → ↑P α
f : α → M P
hyp : ∀ (x : α), dest (f x) = map P f (g x)
x : α
a✝ : True
a : P.A
f' : B P a → α
gxeq : g x = { fst := a, snd := f' }
h₀ : dest (f x) = { fst := a, snd := f ∘ f' }
h₁ : dest (M.corec g x) = { fst := a, snd := M.corec g ∘ f' }
⊢ ∃ a f_1 f',
    dest (f x) = { fst := a, snd := f_1 } ∧
      dest (M.corec g x) = { fst := a, snd := f' } ∧
        ∀ (i : B P a), ∃ x', (fun x => True) x' ∧ f_1 i = f x' ∧ f' i = M.corec g x'

Next tactic:
refine' ⟨_, _, _, h₀, h₁, _⟩
theorem corec_unique (g : α → P α) (f : α → M P) (hyp : ∀ x, M.dest (f x) = P.map f (g x)) :
    f = M.corec g := by
  ext x
  apply bisim' (fun _ => True) _ _ _ _ trivial
  clear x
  intro x _
  cases' gxeq : g x with a f'
  have h₀ : M.dest (f x) = ⟨a, f ∘ f'⟩ := by rw [hyp, gxeq, PFunctor.map_eq]
  have h₁ : M.dest (M.corec g x) = ⟨a, M.corec g ∘ f'⟩ := by rw [dest_corec, gxeq, PFunctor.map_eq]
  refine' ⟨_, _, _, h₀, h₁, _⟩
  

Proof state:
case mk
F : PFunctor.{u}
X : Type u_1
f✝ : X → ↑F X
P : PFunctor.{u}
α : Type u_2
g : α → ↑P α
f : α → M P
hyp : ∀ (x : α), dest (f x) = map P f (g x)
x : α
a✝ : True
a : P.A
f' : B P a → α
gxeq : g x = { fst := a, snd := f' }
h₀ : dest (f x) = { fst := a, snd := f ∘ f' }
h₁ : dest (M.corec g x) = { fst := a, snd := M.corec g ∘ f' }
⊢ ∀ (i : B P a), ∃ x', (fun x => True) x' ∧ (f ∘ f') i = f x' ∧ (M.corec g ∘ f') i = M.corec g x'

Next tactic:
intro i
theorem corec_unique (g : α → P α) (f : α → M P) (hyp : ∀ x, M.dest (f x) = P.map f (g x)) :
    f = M.corec g := by
  ext x
  apply bisim' (fun _ => True) _ _ _ _ trivial
  clear x
  intro x _
  cases' gxeq : g x with a f'
  have h₀ : M.dest (f x) = ⟨a, f ∘ f'⟩ := by rw [hyp, gxeq, PFunctor.map_eq]
  have h₁ : M.dest (M.corec g x) = ⟨a, M.corec g ∘ f'⟩ := by rw [dest_corec, gxeq, PFunctor.map_eq]
  refine' ⟨_, _, _, h₀, h₁, _⟩
  intro i
  

Proof state:
case mk
F : PFunctor.{u}
X : Type u_1
f✝ : X → ↑F X
P : PFunctor.{u}
α : Type u_2
g : α → ↑P α
f : α → M P
hyp : ∀ (x : α), dest (f x) = map P f (g x)
x : α
a✝ : True
a : P.A
f' : B P a → α
gxeq : g x = { fst := a, snd := f' }
h₀ : dest (f x) = { fst := a, snd := f ∘ f' }
h₁ : dest (M.corec g x) = { fst := a, snd := M.corec g ∘ f' }
i : B P a
⊢ ∃ x', (fun x => True) x' ∧ (f ∘ f') i = f x' ∧ (M.corec g ∘ f') i = M.corec g x'

Next tactic:
exact ⟨f' i, trivial, rfl, rfl⟩
instance q_isLocalization : W.Q.IsLocalization W
    where
  inverts := W.Q_inverts
  nonempty_isEquivalence := by
    

Proof state:
C : Type u_1
D : Type u_2
inst✝² : Category.{?u.923, u_1} C
inst✝¹ : Category.{?u.927, u_2} D
L : C ⥤ D
W : MorphismProperty C
E : Type u_3
inst✝ : Category.{?u.976, u_3} E
⊢ Nonempty
    (IsEquivalence
      (Localization.Construction.lift (MorphismProperty.Q W)
        (_ : MorphismProperty.IsInvertedBy W (MorphismProperty.Q W))))

Next tactic:
suffices Localization.Construction.lift W.Q W.Q_inverts = 𝟭 _ by
      apply Nonempty.intro
      rw [this]
      infer_instance
instance q_isLocalization : W.Q.IsLocalization W
    where
  inverts := W.Q_inverts
  nonempty_isEquivalence := by
    suffices Localization.Construction.lift W.Q W.Q_inverts = 𝟭 _ by
      

Proof state:
C : Type u_1
D : Type u_2
inst✝² : Category.{?u.923, u_1} C
inst✝¹ : Category.{?u.927, u_2} D
L : C ⥤ D
W : MorphismProperty C
E : Type u_3
inst✝ : Category.{?u.976, u_3} E
this :
  Localization.Construction.lift (MorphismProperty.Q W) (_ : MorphismProperty.IsInvertedBy W (MorphismProperty.Q W)) =
    𝟭 (MorphismProperty.Localization W)
⊢ Nonempty
    (IsEquivalence
      (Localization.Construction.lift (MorphismProperty.Q W)
        (_ : MorphismProperty.IsInvertedBy W (MorphismProperty.Q W))))

Next tactic:
apply Nonempty.intro
instance q_isLocalization : W.Q.IsLocalization W
    where
  inverts := W.Q_inverts
  nonempty_isEquivalence := by
    suffices Localization.Construction.lift W.Q W.Q_inverts = 𝟭 _ by
      apply Nonempty.intro
      

Proof state:
case val
C : Type u_1
D : Type u_2
inst✝² : Category.{?u.923, u_1} C
inst✝¹ : Category.{?u.927, u_2} D
L : C ⥤ D
W : MorphismProperty C
E : Type u_3
inst✝ : Category.{?u.976, u_3} E
this :
  Localization.Construction.lift (MorphismProperty.Q W) (_ : MorphismProperty.IsInvertedBy W (MorphismProperty.Q W)) =
    𝟭 (MorphismProperty.Localization W)
⊢ IsEquivalence
    (Localization.Construction.lift (MorphismProperty.Q W) (_ : MorphismProperty.IsInvertedBy W (MorphismProperty.Q W)))

Next tactic:
rw [this]
instance q_isLocalization : W.Q.IsLocalization W
    where
  inverts := W.Q_inverts
  nonempty_isEquivalence := by
    suffices Localization.Construction.lift W.Q W.Q_inverts = 𝟭 _ by
      apply Nonempty.intro
      rw [this]
      

Proof state:
case val
C : Type u_1
D : Type u_2
inst✝² : Category.{?u.923, u_1} C
inst✝¹ : Category.{?u.927, u_2} D
L : C ⥤ D
W : MorphismProperty C
E : Type u_3
inst✝ : Category.{?u.976, u_3} E
this :
  Localization.Construction.lift (MorphismProperty.Q W) (_ : MorphismProperty.IsInvertedBy W (MorphismProperty.Q W)) =
    𝟭 (MorphismProperty.Localization W)
⊢ IsEquivalence (𝟭 (MorphismProperty.Localization W))

Next tactic:
infer_instance
instance q_isLocalization : W.Q.IsLocalization W
    where
  inverts := W.Q_inverts
  nonempty_isEquivalence := by
    suffices Localization.Construction.lift W.Q W.Q_inverts = 𝟭 _ by
      apply Nonempty.intro
      rw [this]
      infer_instance
    

Proof state:
C : Type u_1
D : Type u_2
inst✝² : Category.{?u.923, u_1} C
inst✝¹ : Category.{?u.927, u_2} D
L : C ⥤ D
W : MorphismProperty C
E : Type u_3
inst✝ : Category.{?u.976, u_3} E
⊢ Localization.Construction.lift (MorphismProperty.Q W) (_ : MorphismProperty.IsInvertedBy W (MorphismProperty.Q W)) =
    𝟭 (MorphismProperty.Localization W)

Next tactic:
apply Localization.Construction.uniq
instance q_isLocalization : W.Q.IsLocalization W
    where
  inverts := W.Q_inverts
  nonempty_isEquivalence := by
    suffices Localization.Construction.lift W.Q W.Q_inverts = 𝟭 _ by
      apply Nonempty.intro
      rw [this]
      infer_instance
    apply Localization.Construction.uniq
    

Proof state:
case h
C : Type u_1
D : Type u_2
inst✝² : Category.{?u.923, u_1} C
inst✝¹ : Category.{?u.927, u_2} D
L : C ⥤ D
W : MorphismProperty C
E : Type u_3
inst✝ : Category.{?u.976, u_3} E
⊢ MorphismProperty.Q W ⋙
      Localization.Construction.lift (MorphismProperty.Q W)
        (_ : MorphismProperty.IsInvertedBy W (MorphismProperty.Q W)) =
    MorphismProperty.Q W ⋙ 𝟭 (MorphismProperty.Localization W)

Next tactic:
simp only [Localization.Construction.fac]
instance q_isLocalization : W.Q.IsLocalization W
    where
  inverts := W.Q_inverts
  nonempty_isEquivalence := by
    suffices Localization.Construction.lift W.Q W.Q_inverts = 𝟭 _ by
      apply Nonempty.intro
      rw [this]
      infer_instance
    apply Localization.Construction.uniq
    simp only [Localization.Construction.fac]
    

Proof state:
case h
C : Type u_1
D : Type u_2
inst✝² : Category.{?u.923, u_1} C
inst✝¹ : Category.{?u.927, u_2} D
L : C ⥤ D
W : MorphismProperty C
E : Type u_3
inst✝ : Category.{?u.976, u_3} E
⊢ MorphismProperty.Q W = MorphismProperty.Q W ⋙ 𝟭 (MorphismProperty.Localization W)

Next tactic:
rfl
/-- When `W` consists of isomorphisms, the identity satisfies the universal property
of the localization. -/
@[simps]
def strictUniversalPropertyFixedTargetId (hW : W ⊆ MorphismProperty.isomorphisms C) :
    StrictUniversalPropertyFixedTarget (𝟭 C) W E
    where
  inverts X Y f hf := hW f hf
  lift F _ := F
  fac F hF := by
    

Proof state:
C : Type u_1
D : Type u_2
inst✝² : Category.{?u.5525, u_1} C
inst✝¹ : Category.{?u.5529, u_2} D
L : C ⥤ D
W : MorphismProperty C
E : Type u_3
inst✝ : Category.{?u.5578, u_3} E
hW : W ⊆ MorphismProperty.isomorphisms C
F : C ⥤ E
hF : MorphismProperty.IsInvertedBy W F
⊢ 𝟭 C ⋙ (fun F x => F) F hF = F

Next tactic:
cases F
/-- When `W` consists of isomorphisms, the identity satisfies the universal property
of the localization. -/
@[simps]
def strictUniversalPropertyFixedTargetId (hW : W ⊆ MorphismProperty.isomorphisms C) :
    StrictUniversalPropertyFixedTarget (𝟭 C) W E
    where
  inverts X Y f hf := hW f hf
  lift F _ := F
  fac F hF := by
    cases F
    

Proof state:
case mk
C : Type u_1
D : Type u_2
inst✝² : Category.{?u.5525, u_1} C
inst✝¹ : Category.{?u.5529, u_2} D
L : C ⥤ D
W : MorphismProperty C
E : Type u_3
inst✝ : Category.{?u.5578, u_3} E
hW : W ⊆ MorphismProperty.isomorphisms C
toPrefunctor✝ : C ⥤q E
map_id✝ : ∀ (X : C), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)
map_comp✝ : ∀ {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g
hF : MorphismProperty.IsInvertedBy W (Functor.mk toPrefunctor✝)
⊢ 𝟭 C ⋙ (fun F x => F) (Functor.mk toPrefunctor✝) hF = Functor.mk toPrefunctor✝

Next tactic:
rfl
/-- When `W` consists of isomorphisms, the identity satisfies the universal property
of the localization. -/
@[simps]
def strictUniversalPropertyFixedTargetId (hW : W ⊆ MorphismProperty.isomorphisms C) :
    StrictUniversalPropertyFixedTarget (𝟭 C) W E
    where
  inverts X Y f hf := hW f hf
  lift F _ := F
  fac F hF := by
    cases F
    rfl
  uniq F₁ F₂ eq := by
    

Proof state:
C : Type u_1
D : Type u_2
inst✝² : Category.{?u.5525, u_1} C
inst✝¹ : Category.{?u.5529, u_2} D
L : C ⥤ D
W : MorphismProperty C
E : Type u_3
inst✝ : Category.{?u.5578, u_3} E
hW : W ⊆ MorphismProperty.isomorphisms C
F₁ F₂ : C ⥤ E
eq : 𝟭 C ⋙ F₁ = 𝟭 C ⋙ F₂
⊢ F₁ = F₂

Next tactic:
cases F₁
/-- When `W` consists of isomorphisms, the identity satisfies the universal property
of the localization. -/
@[simps]
def strictUniversalPropertyFixedTargetId (hW : W ⊆ MorphismProperty.isomorphisms C) :
    StrictUniversalPropertyFixedTarget (𝟭 C) W E
    where
  inverts X Y f hf := hW f hf
  lift F _ := F
  fac F hF := by
    cases F
    rfl
  uniq F₁ F₂ eq := by
    cases F₁
    

Proof state:
case mk
C : Type u_1
D : Type u_2
inst✝² : Category.{?u.5525, u_1} C
inst✝¹ : Category.{?u.5529, u_2} D
L : C ⥤ D
W : MorphismProperty C
E : Type u_3
inst✝ : Category.{?u.5578, u_3} E
hW : W ⊆ MorphismProperty.isomorphisms C
F₂ : C ⥤ E
toPrefunctor✝ : C ⥤q E
map_id✝ : ∀ (X : C), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)
map_comp✝ : ∀ {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g
eq : 𝟭 C ⋙ Functor.mk toPrefunctor✝ = 𝟭 C ⋙ F₂
⊢ Functor.mk toPrefunctor✝ = F₂

Next tactic:
cases F₂
/-- When `W` consists of isomorphisms, the identity satisfies the universal property
of the localization. -/
@[simps]
def strictUniversalPropertyFixedTargetId (hW : W ⊆ MorphismProperty.isomorphisms C) :
    StrictUniversalPropertyFixedTarget (𝟭 C) W E
    where
  inverts X Y f hf := hW f hf
  lift F _ := F
  fac F hF := by
    cases F
    rfl
  uniq F₁ F₂ eq := by
    cases F₁
    cases F₂
    

Proof state:
case mk.mk
C : Type u_1
D : Type u_2
inst✝² : Category.{?u.5525, u_1} C
inst✝¹ : Category.{?u.5529, u_2} D
L : C ⥤ D
W : MorphismProperty C
E : Type u_3
inst✝ : Category.{?u.5578, u_3} E
hW : W ⊆ MorphismProperty.isomorphisms C
toPrefunctor✝¹ : C ⥤q E
map_id✝¹ : ∀ (X : C), toPrefunctor✝¹.map (𝟙 X) = 𝟙 (toPrefunctor✝¹.obj X)
map_comp✝¹ :
  ∀ {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝¹.map (f ≫ g) = toPrefunctor✝¹.map f ≫ toPrefunctor✝¹.map g
toPrefunctor✝ : C ⥤q E
map_id✝ : ∀ (X : C), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)
map_comp✝ : ∀ {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g
eq : 𝟭 C ⋙ Functor.mk toPrefunctor✝¹ = 𝟭 C ⋙ Functor.mk toPrefunctor✝
⊢ Functor.mk toPrefunctor✝¹ = Functor.mk toPrefunctor✝

Next tactic:
exact eq
theorem IsLocalization.mk' (h₁ : Localization.StrictUniversalPropertyFixedTarget L W D)
    (h₂ : Localization.StrictUniversalPropertyFixedTarget L W W.Localization) :
    IsLocalization L W :=
  { inverts := h₁.inverts
    nonempty_isEquivalence :=
      Nonempty.intro
        { inverse := h₂.lift W.Q W.Q_inverts
          unitIso :=
            eqToIso
              (Localization.Construction.uniq _ _
                (by
                  

Proof state:
C : Type u_1
D : Type u_2
inst✝² : Category.{u_4, u_1} C
inst✝¹ : Category.{u_5, u_2} D
L : C ⥤ D
W : MorphismProperty C
E : Type u_3
inst✝ : Category.{?u.6539, u_3} E
h₁ : Localization.StrictUniversalPropertyFixedTarget L W D
h₂ : Localization.StrictUniversalPropertyFixedTarget L W (MorphismProperty.Localization W)
⊢ MorphismProperty.Q W ⋙ 𝟭 (MorphismProperty.Localization W) =
    MorphismProperty.Q W ⋙
      Localization.Construction.lift L (_ : MorphismProperty.IsInvertedBy W L) ⋙
        Localization.StrictUniversalPropertyFixedTarget.lift h₂ (MorphismProperty.Q W)
          (_ : MorphismProperty.IsInvertedBy W (MorphismProperty.Q W))

Next tactic:
simp only [← Functor.assoc, Localization.Construction.fac, h₂.fac,
                    Functor.comp_id]
theorem IsLocalization.mk' (h₁ : Localization.StrictUniversalPropertyFixedTarget L W D)
    (h₂ : Localization.StrictUniversalPropertyFixedTarget L W W.Localization) :
    IsLocalization L W :=
  { inverts := h₁.inverts
    nonempty_isEquivalence :=
      Nonempty.intro
        { inverse := h₂.lift W.Q W.Q_inverts
          unitIso :=
            eqToIso
              (Localization.Construction.uniq _ _
                (by
                  simp only [← Functor.assoc, Localization.Construction.fac, h₂.fac,
                    Functor.comp_id]))
          counitIso :=
            eqToIso
              (h₁.uniq _ _
                (by
                  

Proof state:
C : Type u_1
D : Type u_2
inst✝² : Category.{u_4, u_1} C
inst✝¹ : Category.{u_5, u_2} D
L : C ⥤ D
W : MorphismProperty C
E : Type u_3
inst✝ : Category.{?u.6539, u_3} E
h₁ : Localization.StrictUniversalPropertyFixedTarget L W D
h₂ : Localization.StrictUniversalPropertyFixedTarget L W (MorphismProperty.Localization W)
⊢ L ⋙
      Localization.StrictUniversalPropertyFixedTarget.lift h₂ (MorphismProperty.Q W)
          (_ : MorphismProperty.IsInvertedBy W (MorphismProperty.Q W)) ⋙
        Localization.Construction.lift L (_ : MorphismProperty.IsInvertedBy W L) =
    L ⋙ 𝟭 D

Next tactic:
simp only [← Functor.assoc, h₂.fac, Localization.Construction.fac,
                    Functor.comp_id]
theorem IsLocalization.mk' (h₁ : Localization.StrictUniversalPropertyFixedTarget L W D)
    (h₂ : Localization.StrictUniversalPropertyFixedTarget L W W.Localization) :
    IsLocalization L W :=
  { inverts := h₁.inverts
    nonempty_isEquivalence :=
      Nonempty.intro
        { inverse := h₂.lift W.Q W.Q_inverts
          unitIso :=
            eqToIso
              (Localization.Construction.uniq _ _
                (by
                  simp only [← Functor.assoc, Localization.Construction.fac, h₂.fac,
                    Functor.comp_id]))
          counitIso :=
            eqToIso
              (h₁.uniq _ _
                (by
                  simp only [← Functor.assoc, h₂.fac, Localization.Construction.fac,
                    Functor.comp_id]))
          functor_unitIso_comp := fun X => by
            

Proof state:
C : Type u_1
D : Type u_2
inst✝² : Category.{u_4, u_1} C
inst✝¹ : Category.{u_5, u_2} D
L : C ⥤ D
W : MorphismProperty C
E : Type u_3
inst✝ : Category.{?u.6539, u_3} E
h₁ : Localization.StrictUniversalPropertyFixedTarget L W D
h₂ : Localization.StrictUniversalPropertyFixedTarget L W (MorphismProperty.Localization W)
X : MorphismProperty.Localization W
⊢ (Localization.Construction.lift L (_ : MorphismProperty.IsInvertedBy W L)).map
        ((eqToIso
                (_ :
                  𝟭 (MorphismProperty.Localization W) =
                    Localization.Construction.lift L (_ : MorphismProperty.IsInvertedBy W L) ⋙
                      Localization.StrictUniversalPropertyFixedTarget.lift h₂ (MorphismProperty.Q W)
                        (_ : MorphismProperty.IsInvertedBy W (MorphismProperty.Q W)))).hom.app
          X) ≫
      (eqToIso
              (_ :
                Localization.StrictUniversalPropertyFixedTarget.lift h₂ (MorphismProperty.Q W)
                      (_ : MorphismProperty.IsInvertedBy W (MorphismProperty.Q W)) ⋙
                    Localization.Construction.lift L (_ : MorphismProperty.IsInvertedBy W L) =
                  𝟭 D)).hom.app
        ((Localization.Construction.lift L (_ : MorphismProperty.IsInvertedBy W L)).obj X) =
    𝟙 ((Localization.Construction.lift L (_ : MorphismProperty.IsInvertedBy W L)).obj X)

Next tactic:
simp only [eqToIso.hom, eqToHom_app, eqToHom_map, eqToHom_trans,
              eqToHom_refl]
theorem IsLocalization.mk' (h₁ : Localization.StrictUniversalPropertyFixedTarget L W D)
    (h₂ : Localization.StrictUniversalPropertyFixedTarget L W W.Localization) :
    IsLocalization L W :=
  { inverts := h₁.inverts
    nonempty_isEquivalence :=
      Nonempty.intro
        { inverse := h₂.lift W.Q W.Q_inverts
          unitIso :=
            eqToIso
              (Localization.Construction.uniq _ _
                (by
                  simp only [← Functor.assoc, Localization.Construction.fac, h₂.fac,
                    Functor.comp_id]))
          counitIso :=
            eqToIso
              (h₁.uniq _ _
                (by
                  simp only [← Functor.assoc, h₂.fac, Localization.Construction.fac,
                    Functor.comp_id]))
          functor_unitIso_comp := fun X => by
            simp only [eqToIso.hom, eqToHom_app, eqToHom_map, eqToHom_trans,
              eqToHom_refl]
            

Proof state:
C : Type u_1
D : Type u_2
inst✝² : Category.{u_4, u_1} C
inst✝¹ : Category.{u_5, u_2} D
L : C ⥤ D
W : MorphismProperty C
E : Type u_3
inst✝ : Category.{?u.6539, u_3} E
h₁ : Localization.StrictUniversalPropertyFixedTarget L W D
h₂ : Localization.StrictUniversalPropertyFixedTarget L W (MorphismProperty.Localization W)
X : MorphismProperty.Localization W
⊢ 𝟙
      ((Localization.Construction.lift L (_ : MorphismProperty.IsInvertedBy W L)).obj
        ((𝟭 (MorphismProperty.Localization W)).obj X)) =
    𝟙 ((Localization.Construction.lift L (_ : MorphismProperty.IsInvertedBy W L)).obj X)

Next tactic:
rfl
instance : IsEquivalence (whiskeringLeftFunctor L W E) := by
  

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{?u.22534, u_1} C
inst✝² : Category.{?u.22538, u_2} D
L : C ⥤ D
W : MorphismProperty C
E : Type u_3
inst✝¹ : Category.{?u.22587, u_3} E
inst✝ : Functor.IsLocalization L W
⊢ IsEquivalence (whiskeringLeftFunctor L W E)

Next tactic:
refine'
    IsEquivalence.ofIso _
      (IsEquivalence.ofEquivalence
        ((Equivalence.congrLeft (equivalenceFromModel L W).symm).trans
          (Construction.whiskeringLeftEquivalence W E)))
instance : IsEquivalence (whiskeringLeftFunctor L W E) := by
  refine'
    IsEquivalence.ofIso _
      (IsEquivalence.ofEquivalence
        ((Equivalence.congrLeft (equivalenceFromModel L W).symm).trans
          (Construction.whiskeringLeftEquivalence W E)))
  

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{?u.22534, u_1} C
inst✝² : Category.{?u.22538, u_2} D
L : C ⥤ D
W : MorphismProperty C
E : Type u_3
inst✝¹ : Category.{?u.22587, u_3} E
inst✝ : Functor.IsLocalization L W
⊢ ((Equivalence.congrLeft (equivalenceFromModel L W).symm).trans (Construction.whiskeringLeftEquivalence W E)).functor ≅
    whiskeringLeftFunctor L W E

Next tactic:
exact
    NatIso.ofComponents
      (fun F =>
        eqToIso
          (by
            ext
            change (W.Q ⋙ Localization.Construction.lift L (inverts L W)) ⋙ F = L ⋙ F
            rw [Construction.fac]))
      fun τ => by
        ext
        dsimp [Construction.whiskeringLeftEquivalence, equivalenceFromModel, whiskerLeft]
        erw [NatTrans.comp_app, NatTrans.comp_app, eqToHom_app, eqToHom_app, eqToHom_refl,
          eqToHom_refl, comp_id, id_comp]
        · rfl
        all_goals
          change (W.Q ⋙ Localization.Construction.lift L (inverts L W)) ⋙ _ = L ⋙ _
          rw [Construction.fac]
instance : IsEquivalence (whiskeringLeftFunctor L W E) := by
  refine'
    IsEquivalence.ofIso _
      (IsEquivalence.ofEquivalence
        ((Equivalence.congrLeft (equivalenceFromModel L W).symm).trans
          (Construction.whiskeringLeftEquivalence W E)))
  exact
    NatIso.ofComponents
      (fun F =>
        eqToIso
          (by
            

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Category.{?u.22534, u_1} C
inst✝² : Category.{?u.22538, u_2} D
L : C ⥤ D
W : MorphismProperty C
E : Type u_3
inst✝¹ : Category.{?u.22587, u_3} E
inst✝ : Functor.IsLocalization L W
F : D ⥤ E
⊢ ((Equivalence.congrLeft (equivalenceFromModel L W).symm).trans
            (Construction.whiskeringLeftEquivalence W E)).functor.obj
      F =
    (whiskeringLeftFunctor L W E).obj F

Next tactic:
ext
instance : IsEquivalence (whiskeringLeftFunctor L W E) := by
  refine'
    IsEquivalence.ofIso _
      (IsEquivalence.ofEquivalence
        ((Equivalence.congrLeft (equivalenceFromModel L W).symm).trans
          (Construction.whiskeringLeftEquivalence W E)))
  exact
    NatIso.ofComponents
      (fun F =>
        eqToIso
          (by
            ext
            

Proof state:
case h
C : Type u_1
D : Type u_2
inst✝³ : Category.{?u.22534, u_1} C
inst✝² : Category.{?u.22538, u_2} D
L : C ⥤ D
W : MorphismProperty C
E : Type u_3
inst✝¹ : Category.{?u.22587, u_3} E
inst✝ : Functor.IsLocalization L W
F : D ⥤ E
⊢ (((Equivalence.congrLeft (equivalenceFromModel L W).symm).trans
              (Construction.whiskeringLeftEquivalence W E)).functor.obj
        F).obj =
    ((whiskeringLeftFunctor L W E).obj F).obj

Next tactic:
change (W.Q ⋙ Localization.Construction.lift L (inverts L W)) ⋙ F = L ⋙ F
instance : IsEquivalence (whiskeringLeftFunctor L W E) := by
  refine'
    IsEquivalence.ofIso _
      (IsEquivalence.ofEquivalence
        ((Equivalence.congrLeft (equivalenceFromModel L W).symm).trans
          (Construction.whiskeringLeftEquivalence W E)))
  exact
    NatIso.ofComponents
      (fun F =>
        eqToIso
          (by
            ext
            change (W.Q ⋙ Localization.Construction.lift L (inverts L W)) ⋙ F = L ⋙ F
            

Proof state:
case h
C : Type u_1
D : Type u_2
inst✝³ : Category.{?u.22534, u_1} C
inst✝² : Category.{?u.22538, u_2} D
L : C ⥤ D
W : MorphismProperty C
E : Type u_3
inst✝¹ : Category.{?u.22587, u_3} E
inst✝ : Functor.IsLocalization L W
F : D ⥤ E
⊢ (MorphismProperty.Q W ⋙ Construction.lift L (_ : MorphismProperty.IsInvertedBy W L)) ⋙ F = L ⋙ F

Next tactic:
rw [Construction.fac]