l3lab/ntp-mathlib huggingface dataset:
/-- An auxiliary definition used to define `Ran` and `Ran.adjunction`. -/
@[simps]
def equiv (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] (G : L ⥤ D) :
    (G ⟶ loc ι F) ≃ (((whiskeringLeft _ _ _).obj ι).obj G ⟶ F)
    where
  toFun f :=
    { app := fun x => f.app _ ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 _))
      naturality := by
        intro x y ff
        dsimp only [whiskeringLeft]
        simp only [Functor.comp_map, NatTrans.naturality_assoc, loc_map, Category.assoc]
        congr 1
        haveI : HasLimit (StructuredArrow.map (ι.map ff) ⋙ diagram ι F (ι.obj x)) := h _
        erw [limit.pre_π]
        let t : StructuredArrow.mk (𝟙 (ι.obj x)) ⟶
          (StructuredArrow.map (ι.map ff)).obj (StructuredArrow.mk (𝟙 (ι.obj y))) :=
          StructuredArrow.homMk ff ?_
        convert (limit.w (diagram ι F (ι.obj x)) t).symm using 1
        simp }
  invFun f :=
    { app := fun x => limit.lift (diagram ι F x) (cone _ f)
      naturality := by
        intro x y ff
        apply limit.hom_ext
        intros j
        haveI : HasLimit (StructuredArrow.map ff ⋙ diagram ι F x) := h _
        erw [limit.lift_pre, limit.lift_π, Category.assoc, limit.lift_π (cone _ f) j]
        simp }
  left_inv := by
    intro x
    ext k
    apply limit.hom_ext
    intros j
    dsimp only [cone]
    rw [limit.lift_π]
    simp only [NatTrans.naturality_assoc, loc_map]
    

Proof state:
case w.h.w
S : Type u₁
L : Type u₂
D : Type u₃
inst✝² : Category.{v₁, u₁} S
inst✝¹ : Category.{v₂, u₂} L
inst✝ : Category.{v₃, u₃} D
ι : S ⥤ L
F : S ⥤ D
h : ∀ (x : L), HasLimit (diagram ι F x)
G : L ⥤ D
x : G ⟶ loc ι F
k : L
j : StructuredArrow k ι
⊢ x.app k ≫
      limit.pre (diagram ι F k) (StructuredArrow.map j.hom) ≫
        limit.π (diagram ι F (ι.obj j.right)) (StructuredArrow.mk (𝟙 (ι.obj j.right))) =
    x.app k ≫ limit.π (diagram ι F k) j

Next tactic:
haveI : HasLimit (StructuredArrow.map j.hom ⋙ diagram ι F k) := h _
/-- An auxiliary definition used to define `Ran` and `Ran.adjunction`. -/
@[simps]
def equiv (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] (G : L ⥤ D) :
    (G ⟶ loc ι F) ≃ (((whiskeringLeft _ _ _).obj ι).obj G ⟶ F)
    where
  toFun f :=
    { app := fun x => f.app _ ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 _))
      naturality := by
        intro x y ff
        dsimp only [whiskeringLeft]
        simp only [Functor.comp_map, NatTrans.naturality_assoc, loc_map, Category.assoc]
        congr 1
        haveI : HasLimit (StructuredArrow.map (ι.map ff) ⋙ diagram ι F (ι.obj x)) := h _
        erw [limit.pre_π]
        let t : StructuredArrow.mk (𝟙 (ι.obj x)) ⟶
          (StructuredArrow.map (ι.map ff)).obj (StructuredArrow.mk (𝟙 (ι.obj y))) :=
          StructuredArrow.homMk ff ?_
        convert (limit.w (diagram ι F (ι.obj x)) t).symm using 1
        simp }
  invFun f :=
    { app := fun x => limit.lift (diagram ι F x) (cone _ f)
      naturality := by
        intro x y ff
        apply limit.hom_ext
        intros j
        haveI : HasLimit (StructuredArrow.map ff ⋙ diagram ι F x) := h _
        erw [limit.lift_pre, limit.lift_π, Category.assoc, limit.lift_π (cone _ f) j]
        simp }
  left_inv := by
    intro x
    ext k
    apply limit.hom_ext
    intros j
    dsimp only [cone]
    rw [limit.lift_π]
    simp only [NatTrans.naturality_assoc, loc_map]
    haveI : HasLimit (StructuredArrow.map j.hom ⋙ diagram ι F k) := h _
    

Proof state:
case w.h.w
S : Type u₁
L : Type u₂
D : Type u₃
inst✝² : Category.{v₁, u₁} S
inst✝¹ : Category.{v₂, u₂} L
inst✝ : Category.{v₃, u₃} D
ι : S ⥤ L
F : S ⥤ D
h : ∀ (x : L), HasLimit (diagram ι F x)
G : L ⥤ D
x : G ⟶ loc ι F
k : L
j : StructuredArrow k ι
this : HasLimit (StructuredArrow.map j.hom ⋙ diagram ι F k)
⊢ x.app k ≫
      limit.pre (diagram ι F k) (StructuredArrow.map j.hom) ≫
        limit.π (diagram ι F (ι.obj j.right)) (StructuredArrow.mk (𝟙 (ι.obj j.right))) =
    x.app k ≫ limit.π (diagram ι F k) j

Next tactic:
erw [limit.pre_π]
/-- An auxiliary definition used to define `Ran` and `Ran.adjunction`. -/
@[simps]
def equiv (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] (G : L ⥤ D) :
    (G ⟶ loc ι F) ≃ (((whiskeringLeft _ _ _).obj ι).obj G ⟶ F)
    where
  toFun f :=
    { app := fun x => f.app _ ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 _))
      naturality := by
        intro x y ff
        dsimp only [whiskeringLeft]
        simp only [Functor.comp_map, NatTrans.naturality_assoc, loc_map, Category.assoc]
        congr 1
        haveI : HasLimit (StructuredArrow.map (ι.map ff) ⋙ diagram ι F (ι.obj x)) := h _
        erw [limit.pre_π]
        let t : StructuredArrow.mk (𝟙 (ι.obj x)) ⟶
          (StructuredArrow.map (ι.map ff)).obj (StructuredArrow.mk (𝟙 (ι.obj y))) :=
          StructuredArrow.homMk ff ?_
        convert (limit.w (diagram ι F (ι.obj x)) t).symm using 1
        simp }
  invFun f :=
    { app := fun x => limit.lift (diagram ι F x) (cone _ f)
      naturality := by
        intro x y ff
        apply limit.hom_ext
        intros j
        haveI : HasLimit (StructuredArrow.map ff ⋙ diagram ι F x) := h _
        erw [limit.lift_pre, limit.lift_π, Category.assoc, limit.lift_π (cone _ f) j]
        simp }
  left_inv := by
    intro x
    ext k
    apply limit.hom_ext
    intros j
    dsimp only [cone]
    rw [limit.lift_π]
    simp only [NatTrans.naturality_assoc, loc_map]
    haveI : HasLimit (StructuredArrow.map j.hom ⋙ diagram ι F k) := h _
    erw [limit.pre_π]
    

Proof state:
case w.h.w
S : Type u₁
L : Type u₂
D : Type u₃
inst✝² : Category.{v₁, u₁} S
inst✝¹ : Category.{v₂, u₂} L
inst✝ : Category.{v₃, u₃} D
ι : S ⥤ L
F : S ⥤ D
h : ∀ (x : L), HasLimit (diagram ι F x)
G : L ⥤ D
x : G ⟶ loc ι F
k : L
j : StructuredArrow k ι
this : HasLimit (StructuredArrow.map j.hom ⋙ diagram ι F k)
⊢ x.app k ≫ limit.π (diagram ι F k) ((StructuredArrow.map j.hom).obj (StructuredArrow.mk (𝟙 (ι.obj j.right)))) =
    x.app k ≫ limit.π (diagram ι F k) j

Next tactic:
congr
/-- An auxiliary definition used to define `Ran` and `Ran.adjunction`. -/
@[simps]
def equiv (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] (G : L ⥤ D) :
    (G ⟶ loc ι F) ≃ (((whiskeringLeft _ _ _).obj ι).obj G ⟶ F)
    where
  toFun f :=
    { app := fun x => f.app _ ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 _))
      naturality := by
        intro x y ff
        dsimp only [whiskeringLeft]
        simp only [Functor.comp_map, NatTrans.naturality_assoc, loc_map, Category.assoc]
        congr 1
        haveI : HasLimit (StructuredArrow.map (ι.map ff) ⋙ diagram ι F (ι.obj x)) := h _
        erw [limit.pre_π]
        let t : StructuredArrow.mk (𝟙 (ι.obj x)) ⟶
          (StructuredArrow.map (ι.map ff)).obj (StructuredArrow.mk (𝟙 (ι.obj y))) :=
          StructuredArrow.homMk ff ?_
        convert (limit.w (diagram ι F (ι.obj x)) t).symm using 1
        simp }
  invFun f :=
    { app := fun x => limit.lift (diagram ι F x) (cone _ f)
      naturality := by
        intro x y ff
        apply limit.hom_ext
        intros j
        haveI : HasLimit (StructuredArrow.map ff ⋙ diagram ι F x) := h _
        erw [limit.lift_pre, limit.lift_π, Category.assoc, limit.lift_π (cone _ f) j]
        simp }
  left_inv := by
    intro x
    ext k
    apply limit.hom_ext
    intros j
    dsimp only [cone]
    rw [limit.lift_π]
    simp only [NatTrans.naturality_assoc, loc_map]
    haveI : HasLimit (StructuredArrow.map j.hom ⋙ diagram ι F k) := h _
    erw [limit.pre_π]
    congr
    

Proof state:
case w.h.w.e_a.h.e_7.h
S : Type u₁
L : Type u₂
D : Type u₃
inst✝² : Category.{v₁, u₁} S
inst✝¹ : Category.{v₂, u₂} L
inst✝ : Category.{v₃, u₃} D
ι : S ⥤ L
F : S ⥤ D
h : ∀ (x : L), HasLimit (diagram ι F x)
G : L ⥤ D
x : G ⟶ loc ι F
k : L
j : StructuredArrow k ι
this : HasLimit (StructuredArrow.map j.hom ⋙ diagram ι F k)
⊢ (StructuredArrow.map j.hom).obj (StructuredArrow.mk (𝟙 (ι.obj j.right))) = j

Next tactic:
rcases j with ⟨⟨⟩, _, _⟩
/-- An auxiliary definition used to define `Ran` and `Ran.adjunction`. -/
@[simps]
def equiv (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] (G : L ⥤ D) :
    (G ⟶ loc ι F) ≃ (((whiskeringLeft _ _ _).obj ι).obj G ⟶ F)
    where
  toFun f :=
    { app := fun x => f.app _ ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 _))
      naturality := by
        intro x y ff
        dsimp only [whiskeringLeft]
        simp only [Functor.comp_map, NatTrans.naturality_assoc, loc_map, Category.assoc]
        congr 1
        haveI : HasLimit (StructuredArrow.map (ι.map ff) ⋙ diagram ι F (ι.obj x)) := h _
        erw [limit.pre_π]
        let t : StructuredArrow.mk (𝟙 (ι.obj x)) ⟶
          (StructuredArrow.map (ι.map ff)).obj (StructuredArrow.mk (𝟙 (ι.obj y))) :=
          StructuredArrow.homMk ff ?_
        convert (limit.w (diagram ι F (ι.obj x)) t).symm using 1
        simp }
  invFun f :=
    { app := fun x => limit.lift (diagram ι F x) (cone _ f)
      naturality := by
        intro x y ff
        apply limit.hom_ext
        intros j
        haveI : HasLimit (StructuredArrow.map ff ⋙ diagram ι F x) := h _
        erw [limit.lift_pre, limit.lift_π, Category.assoc, limit.lift_π (cone _ f) j]
        simp }
  left_inv := by
    intro x
    ext k
    apply limit.hom_ext
    intros j
    dsimp only [cone]
    rw [limit.lift_π]
    simp only [NatTrans.naturality_assoc, loc_map]
    haveI : HasLimit (StructuredArrow.map j.hom ⋙ diagram ι F k) := h _
    erw [limit.pre_π]
    congr
    rcases j with ⟨⟨⟩, _, _⟩
    

Proof state:
case w.h.w.e_a.h.e_7.h.mk.mk
S : Type u₁
L : Type u₂
D : Type u₃
inst✝² : Category.{v₁, u₁} S
inst✝¹ : Category.{v₂, u₂} L
inst✝ : Category.{v₃, u₃} D
ι : S ⥤ L
F : S ⥤ D
h : ∀ (x : L), HasLimit (diagram ι F x)
G : L ⥤ D
x : G ⟶ loc ι F
k : L
right✝ : S
as✝ : PUnit.{1}
hom✝ : (Functor.fromPUnit k).obj { as := as✝ } ⟶ ι.obj right✝
this : HasLimit (StructuredArrow.map { left := { as := as✝ }, right := right✝, hom := hom✝ }.hom ⋙ diagram ι F k)
⊢ (StructuredArrow.map { left := { as := as✝ }, right := right✝, hom := hom✝ }.hom).obj
      (StructuredArrow.mk (𝟙 (ι.obj { left := { as := as✝ }, right := right✝, hom := hom✝ }.right))) =
    { left := { as := as✝ }, right := right✝, hom := hom✝ }

Next tactic:
aesop_cat
/-- An auxiliary definition used to define `Ran` and `Ran.adjunction`. -/
@[simps]
def equiv (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] (G : L ⥤ D) :
    (G ⟶ loc ι F) ≃ (((whiskeringLeft _ _ _).obj ι).obj G ⟶ F)
    where
  toFun f :=
    { app := fun x => f.app _ ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 _))
      naturality := by
        intro x y ff
        dsimp only [whiskeringLeft]
        simp only [Functor.comp_map, NatTrans.naturality_assoc, loc_map, Category.assoc]
        congr 1
        haveI : HasLimit (StructuredArrow.map (ι.map ff) ⋙ diagram ι F (ι.obj x)) := h _
        erw [limit.pre_π]
        let t : StructuredArrow.mk (𝟙 (ι.obj x)) ⟶
          (StructuredArrow.map (ι.map ff)).obj (StructuredArrow.mk (𝟙 (ι.obj y))) :=
          StructuredArrow.homMk ff ?_
        convert (limit.w (diagram ι F (ι.obj x)) t).symm using 1
        simp }
  invFun f :=
    { app := fun x => limit.lift (diagram ι F x) (cone _ f)
      naturality := by
        intro x y ff
        apply limit.hom_ext
        intros j
        haveI : HasLimit (StructuredArrow.map ff ⋙ diagram ι F x) := h _
        erw [limit.lift_pre, limit.lift_π, Category.assoc, limit.lift_π (cone _ f) j]
        simp }
  left_inv := by
    intro x
    ext k
    apply limit.hom_ext
    intros j
    dsimp only [cone]
    rw [limit.lift_π]
    simp only [NatTrans.naturality_assoc, loc_map]
    haveI : HasLimit (StructuredArrow.map j.hom ⋙ diagram ι F k) := h _
    erw [limit.pre_π]
    congr
    rcases j with ⟨⟨⟩, _, _⟩
    aesop_cat
  right_inv := by 

Proof state:
S : Type u₁
L : Type u₂
D : Type u₃
inst✝² : Category.{v₁, u₁} S
inst✝¹ : Category.{v₂, u₂} L
inst✝ : Category.{v₃, u₃} D
ι : S ⥤ L
F : S ⥤ D
h : ∀ (x : L), HasLimit (diagram ι F x)
G : L ⥤ D
⊢ Function.RightInverse (fun f => NatTrans.mk fun x => limit.lift (diagram ι F x) (cone x f)) fun f =>
    NatTrans.mk fun x => f.app (ι.obj x) ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 (ι.obj x)))

Next tactic:
aesop_cat
/-- The right Kan extension of a functor. -/
@[simps!]
def ran [∀ X, HasLimitsOfShape (StructuredArrow X ι) D] : (S ⥤ D) ⥤ L ⥤ D :=
  Adjunction.rightAdjointOfEquiv (fun F G => (Ran.equiv ι G F).symm) (by 

Proof state:
S : Type u₁
L : Type u₂
D : Type u₃
inst✝³ : Category.{v₁, u₁} S
inst✝² : Category.{v₂, u₂} L
inst✝¹ : Category.{v₃, u₃} D
ι : S ⥤ L
inst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D
⊢ ∀ (X' X : L ⥤ D) (Y : S ⥤ D) (f : X' ⟶ X) (g : ((whiskeringLeft S L D).obj ι).obj X ⟶ Y),
    ((fun F G => (Ran.equiv ι G F).symm) X' Y) (((whiskeringLeft S L D).obj ι).map f ≫ g) =
      f ≫ ((fun F G => (Ran.equiv ι G F).symm) X Y) g

Next tactic:
{
    -- Porting note: was `tidy`
    intros X' X Y f g
    ext t
    apply limit.hom_ext
    intros j
    dsimp [Ran.equiv]
    simp }
/-- The right Kan extension of a functor. -/
@[simps!]
def ran [∀ X, HasLimitsOfShape (StructuredArrow X ι) D] : (S ⥤ D) ⥤ L ⥤ D :=
  Adjunction.rightAdjointOfEquiv (fun F G => (Ran.equiv ι G F).symm) (by {
    -- Porting note: was `tidy`
    

Proof state:
S : Type u₁
L : Type u₂
D : Type u₃
inst✝³ : Category.{v₁, u₁} S
inst✝² : Category.{v₂, u₂} L
inst✝¹ : Category.{v₃, u₃} D
ι : S ⥤ L
inst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D
⊢ ∀ (X' X : L ⥤ D) (Y : S ⥤ D) (f : X' ⟶ X) (g : ((whiskeringLeft S L D).obj ι).obj X ⟶ Y),
    ((fun F G => (Ran.equiv ι G F).symm) X' Y) (((whiskeringLeft S L D).obj ι).map f ≫ g) =
      f ≫ ((fun F G => (Ran.equiv ι G F).symm) X Y) g

Next tactic:
intros X' X Y f g
/-- The right Kan extension of a functor. -/
@[simps!]
def ran [∀ X, HasLimitsOfShape (StructuredArrow X ι) D] : (S ⥤ D) ⥤ L ⥤ D :=
  Adjunction.rightAdjointOfEquiv (fun F G => (Ran.equiv ι G F).symm) (by {
    -- Porting note: was `tidy`
    intros X' X Y f g
    

Proof state:
S : Type u₁
L : Type u₂
D : Type u₃
inst✝³ : Category.{v₁, u₁} S
inst✝² : Category.{v₂, u₂} L
inst✝¹ : Category.{v₃, u₃} D
ι : S ⥤ L
inst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D
X' X : L ⥤ D
Y : S ⥤ D
f : X' ⟶ X
g : ((whiskeringLeft S L D).obj ι).obj X ⟶ Y
⊢ ((fun F G => (Ran.equiv ι G F).symm) X' Y) (((whiskeringLeft S L D).obj ι).map f ≫ g) =
    f ≫ ((fun F G => (Ran.equiv ι G F).symm) X Y) g

Next tactic:
ext t
/-- The right Kan extension of a functor. -/
@[simps!]
def ran [∀ X, HasLimitsOfShape (StructuredArrow X ι) D] : (S ⥤ D) ⥤ L ⥤ D :=
  Adjunction.rightAdjointOfEquiv (fun F G => (Ran.equiv ι G F).symm) (by {
    -- Porting note: was `tidy`
    intros X' X Y f g
    ext t
    

Proof state:
case w.h
S : Type u₁
L : Type u₂
D : Type u₃
inst✝³ : Category.{v₁, u₁} S
inst✝² : Category.{v₂, u₂} L
inst✝¹ : Category.{v₃, u₃} D
ι : S ⥤ L
inst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D
X' X : L ⥤ D
Y : S ⥤ D
f : X' ⟶ X
g : ((whiskeringLeft S L D).obj ι).obj X ⟶ Y
t : L
⊢ (((fun F G => (Ran.equiv ι G F).symm) X' Y) (((whiskeringLeft S L D).obj ι).map f ≫ g)).app t =
    (f ≫ ((fun F G => (Ran.equiv ι G F).symm) X Y) g).app t

Next tactic:
apply limit.hom_ext
/-- The right Kan extension of a functor. -/
@[simps!]
def ran [∀ X, HasLimitsOfShape (StructuredArrow X ι) D] : (S ⥤ D) ⥤ L ⥤ D :=
  Adjunction.rightAdjointOfEquiv (fun F G => (Ran.equiv ι G F).symm) (by {
    -- Porting note: was `tidy`
    intros X' X Y f g
    ext t
    apply limit.hom_ext
    

Proof state:
case w.h.w
S : Type u₁
L : Type u₂
D : Type u₃
inst✝³ : Category.{v₁, u₁} S
inst✝² : Category.{v₂, u₂} L
inst✝¹ : Category.{v₃, u₃} D
ι : S ⥤ L
inst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D
X' X : L ⥤ D
Y : S ⥤ D
f : X' ⟶ X
g : ((whiskeringLeft S L D).obj ι).obj X ⟶ Y
t : L
⊢ ∀ (j : StructuredArrow t ι),
    (((fun F G => (Ran.equiv ι G F).symm) X' Y) (((whiskeringLeft S L D).obj ι).map f ≫ g)).app t ≫
        limit.π (Ran.diagram ι Y t) j =
      (f ≫ ((fun F G => (Ran.equiv ι G F).symm) X Y) g).app t ≫ limit.π (Ran.diagram ι Y t) j

Next tactic:
intros j
/-- The right Kan extension of a functor. -/
@[simps!]
def ran [∀ X, HasLimitsOfShape (StructuredArrow X ι) D] : (S ⥤ D) ⥤ L ⥤ D :=
  Adjunction.rightAdjointOfEquiv (fun F G => (Ran.equiv ι G F).symm) (by {
    -- Porting note: was `tidy`
    intros X' X Y f g
    ext t
    apply limit.hom_ext
    intros j
    

Proof state:
case w.h.w
S : Type u₁
L : Type u₂
D : Type u₃
inst✝³ : Category.{v₁, u₁} S
inst✝² : Category.{v₂, u₂} L
inst✝¹ : Category.{v₃, u₃} D
ι : S ⥤ L
inst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D
X' X : L ⥤ D
Y : S ⥤ D
f : X' ⟶ X
g : ((whiskeringLeft S L D).obj ι).obj X ⟶ Y
t : L
j : StructuredArrow t ι
⊢ (((fun F G => (Ran.equiv ι G F).symm) X' Y) (((whiskeringLeft S L D).obj ι).map f ≫ g)).app t ≫
      limit.π (Ran.diagram ι Y t) j =
    (f ≫ ((fun F G => (Ran.equiv ι G F).symm) X Y) g).app t ≫ limit.π (Ran.diagram ι Y t) j

Next tactic:
dsimp [Ran.equiv]
/-- The right Kan extension of a functor. -/
@[simps!]
def ran [∀ X, HasLimitsOfShape (StructuredArrow X ι) D] : (S ⥤ D) ⥤ L ⥤ D :=
  Adjunction.rightAdjointOfEquiv (fun F G => (Ran.equiv ι G F).symm) (by {
    -- Porting note: was `tidy`
    intros X' X Y f g
    ext t
    apply limit.hom_ext
    intros j
    dsimp [Ran.equiv]
    

Proof state:
case w.h.w
S : Type u₁
L : Type u₂
D : Type u₃
inst✝³ : Category.{v₁, u₁} S
inst✝² : Category.{v₂, u₂} L
inst✝¹ : Category.{v₃, u₃} D
ι : S ⥤ L
inst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D
X' X : L ⥤ D
Y : S ⥤ D
f : X' ⟶ X
g : ((whiskeringLeft S L D).obj ι).obj X ⟶ Y
t : L
j : StructuredArrow t ι
⊢ limit.lift (Ran.diagram ι Y t)
        { pt := X'.obj t, π := NatTrans.mk fun i => X'.map i.hom ≫ f.app (ι.obj i.right) ≫ g.app i.right } ≫
      limit.π (Ran.diagram ι Y t) j =
    (f.app t ≫
        limit.lift (Ran.diagram ι Y t) { pt := X.obj t, π := NatTrans.mk fun i => X.map i.hom ≫ g.app i.right }) ≫
      limit.π (Ran.diagram ι Y t) j

Next tactic:
simp
theorem reflective [Full ι] [Faithful ι] [∀ X, HasLimitsOfShape (StructuredArrow X ι) D] :
    IsIso (adjunction D ι).counit := by
  

Proof state:
S : Type u₁
L : Type u₂
D : Type u₃
inst✝⁵ : Category.{v₁, u₁} S
inst✝⁴ : Category.{v₂, u₂} L
inst✝³ : Category.{v₃, u₃} D
ι : S ⥤ L
inst✝² : Full ι
inst✝¹ : Faithful ι
inst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D
⊢ IsIso (adjunction D ι).counit

Next tactic:
suffices ∀ (X : S ⥤ D), IsIso (NatTrans.app (adjunction D ι).counit X) by
    apply NatIso.isIso_of_isIso_app
theorem reflective [Full ι] [Faithful ι] [∀ X, HasLimitsOfShape (StructuredArrow X ι) D] :
    IsIso (adjunction D ι).counit := by
  suffices ∀ (X : S ⥤ D), IsIso (NatTrans.app (adjunction D ι).counit X) by
    

Proof state:
S : Type u₁
L : Type u₂
D : Type u₃
inst✝⁵ : Category.{v₁, u₁} S
inst✝⁴ : Category.{v₂, u₂} L
inst✝³ : Category.{v₃, u₃} D
ι : S ⥤ L
inst✝² : Full ι
inst✝¹ : Faithful ι
inst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D
this : ∀ (X : S ⥤ D), IsIso ((adjunction D ι).counit.app X)
⊢ IsIso (adjunction D ι).counit

Next tactic:
apply NatIso.isIso_of_isIso_app
theorem reflective [Full ι] [Faithful ι] [∀ X, HasLimitsOfShape (StructuredArrow X ι) D] :
    IsIso (adjunction D ι).counit := by
  suffices ∀ (X : S ⥤ D), IsIso (NatTrans.app (adjunction D ι).counit X) by
    apply NatIso.isIso_of_isIso_app
  

Proof state:
S : Type u₁
L : Type u₂
D : Type u₃
inst✝⁵ : Category.{v₁, u₁} S
inst✝⁴ : Category.{v₂, u₂} L
inst✝³ : Category.{v₃, u₃} D
ι : S ⥤ L
inst✝² : Full ι
inst✝¹ : Faithful ι
inst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D
⊢ ∀ (X : S ⥤ D), IsIso ((adjunction D ι).counit.app X)

Next tactic:
intro F
theorem reflective [Full ι] [Faithful ι] [∀ X, HasLimitsOfShape (StructuredArrow X ι) D] :
    IsIso (adjunction D ι).counit := by
  suffices ∀ (X : S ⥤ D), IsIso (NatTrans.app (adjunction D ι).counit X) by
    apply NatIso.isIso_of_isIso_app
  intro F
  

Proof state:
S : Type u₁
L : Type u₂
D : Type u₃
inst✝⁵ : Category.{v₁, u₁} S
inst✝⁴ : Category.{v₂, u₂} L
inst✝³ : Category.{v₃, u₃} D
ι : S ⥤ L
inst✝² : Full ι
inst✝¹ : Faithful ι
inst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D
F : S ⥤ D
⊢ IsIso ((adjunction D ι).counit.app F)

Next tactic:
suffices ∀ (X : S), IsIso (NatTrans.app (NatTrans.app (adjunction D ι).counit F) X) by
    apply NatIso.isIso_of_isIso_app
theorem reflective [Full ι] [Faithful ι] [∀ X, HasLimitsOfShape (StructuredArrow X ι) D] :
    IsIso (adjunction D ι).counit := by
  suffices ∀ (X : S ⥤ D), IsIso (NatTrans.app (adjunction D ι).counit X) by
    apply NatIso.isIso_of_isIso_app
  intro F
  suffices ∀ (X : S), IsIso (NatTrans.app (NatTrans.app (adjunction D ι).counit F) X) by
    

Proof state:
S : Type u₁
L : Type u₂
D : Type u₃
inst✝⁵ : Category.{v₁, u₁} S
inst✝⁴ : Category.{v₂, u₂} L
inst✝³ : Category.{v₃, u₃} D
ι : S ⥤ L
inst✝² : Full ι
inst✝¹ : Faithful ι
inst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D
F : S ⥤ D
this : ∀ (X : S), IsIso (((adjunction D ι).counit.app F).app X)
⊢ IsIso ((adjunction D ι).counit.app F)

Next tactic:
apply NatIso.isIso_of_isIso_app
theorem reflective [Full ι] [Faithful ι] [∀ X, HasLimitsOfShape (StructuredArrow X ι) D] :
    IsIso (adjunction D ι).counit := by
  suffices ∀ (X : S ⥤ D), IsIso (NatTrans.app (adjunction D ι).counit X) by
    apply NatIso.isIso_of_isIso_app
  intro F
  suffices ∀ (X : S), IsIso (NatTrans.app (NatTrans.app (adjunction D ι).counit F) X) by
    apply NatIso.isIso_of_isIso_app
  

Proof state:
S : Type u₁
L : Type u₂
D : Type u₃
inst✝⁵ : Category.{v₁, u₁} S
inst✝⁴ : Category.{v₂, u₂} L
inst✝³ : Category.{v₃, u₃} D
ι : S ⥤ L
inst✝² : Full ι
inst✝¹ : Faithful ι
inst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D
F : S ⥤ D
⊢ ∀ (X : S), IsIso (((adjunction D ι).counit.app F).app X)

Next tactic:
intro X
theorem reflective [Full ι] [Faithful ι] [∀ X, HasLimitsOfShape (StructuredArrow X ι) D] :
    IsIso (adjunction D ι).counit := by
  suffices ∀ (X : S ⥤ D), IsIso (NatTrans.app (adjunction D ι).counit X) by
    apply NatIso.isIso_of_isIso_app
  intro F
  suffices ∀ (X : S), IsIso (NatTrans.app (NatTrans.app (adjunction D ι).counit F) X) by
    apply NatIso.isIso_of_isIso_app
  intro X
  

Proof state:
S : Type u₁
L : Type u₂
D : Type u₃
inst✝⁵ : Category.{v₁, u₁} S
inst✝⁴ : Category.{v₂, u₂} L
inst✝³ : Category.{v₃, u₃} D
ι : S ⥤ L
inst✝² : Full ι
inst✝¹ : Faithful ι
inst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D
F : S ⥤ D
X : S
⊢ IsIso (((adjunction D ι).counit.app F).app X)

Next tactic:
dsimp [adjunction, equiv]
theorem reflective [Full ι] [Faithful ι] [∀ X, HasLimitsOfShape (StructuredArrow X ι) D] :
    IsIso (adjunction D ι).counit := by
  suffices ∀ (X : S ⥤ D), IsIso (NatTrans.app (adjunction D ι).counit X) by
    apply NatIso.isIso_of_isIso_app
  intro F
  suffices ∀ (X : S), IsIso (NatTrans.app (NatTrans.app (adjunction D ι).counit F) X) by
    apply NatIso.isIso_of_isIso_app
  intro X
  dsimp [adjunction, equiv]
  

Proof state:
S : Type u₁
L : Type u₂
D : Type u₃
inst✝⁵ : Category.{v₁, u₁} S
inst✝⁴ : Category.{v₂, u₂} L
inst✝³ : Category.{v₃, u₃} D
ι : S ⥤ L
inst✝² : Full ι
inst✝¹ : Faithful ι
inst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D
F : S ⥤ D
X : S
⊢ IsIso (𝟙 (limit (diagram ι F (ι.obj X))) ≫ limit.π (diagram ι F (ι.obj X)) (StructuredArrow.mk (𝟙 (ι.obj X))))

Next tactic:
simp only [Category.id_comp]
theorem reflective [Full ι] [Faithful ι] [∀ X, HasLimitsOfShape (StructuredArrow X ι) D] :
    IsIso (adjunction D ι).counit := by
  suffices ∀ (X : S ⥤ D), IsIso (NatTrans.app (adjunction D ι).counit X) by
    apply NatIso.isIso_of_isIso_app
  intro F
  suffices ∀ (X : S), IsIso (NatTrans.app (NatTrans.app (adjunction D ι).counit F) X) by
    apply NatIso.isIso_of_isIso_app
  intro X
  dsimp [adjunction, equiv]
  simp only [Category.id_comp]
  

Proof state:
S : Type u₁
L : Type u₂
D : Type u₃
inst✝⁵ : Category.{v₁, u₁} S
inst✝⁴ : Category.{v₂, u₂} L
inst✝³ : Category.{v₃, u₃} D
ι : S ⥤ L
inst✝² : Full ι
inst✝¹ : Faithful ι
inst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D
F : S ⥤ D
X : S
⊢ IsIso (limit.π (diagram ι F (ι.obj X)) (StructuredArrow.mk (𝟙 (ι.obj X))))

Next tactic:
exact
    IsIso.of_iso
      ((limit.isLimit _).conePointUniqueUpToIso
        (limitOfDiagramInitial StructuredArrow.mkIdInitial _))